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
/* * GPIOOutput.h * * Created on: Jul. 23, 2021 * Author: bruno */ #ifndef COMMON_STM32_GPIO_GPIOOUTPUT_H_ #define COMMON_STM32_GPIO_GPIOOUTPUT_H_ #include <common/stm32/mcu/MCU.h> typedef struct { MCU* mcu; GPIO_TypeDef* port; uint16_t pin; } GPIOOutput; void gpio_output_init(GPIOOutput* gpio, MCU* mcu, GPIO_TypeDef* port, uint16_t pin, uint32_t mode, uint32_t pull, GPIO_PinState state); void gpio_set(GPIOOutput* gpio, GPIO_PinState state); void gpio_set_low(GPIOOutput* gpio); void gpio_set_high(GPIOOutput* gpio); void gpio_toggle(GPIOOutput* gpio); #endif /* COMMON_STM32_GPIO_GPIOOUTPUT_H_ */
29.14
21
(translation_unit) "/*\n * GPIOOutput.h\n *\n * Created on: Jul. 23, 2021\n * Author: bruno\n */\n\n#ifndef COMMON_STM32_GPIO_GPIOOUTPUT_H_\n#define COMMON_STM32_GPIO_GPIOOUTPUT_H_\n\n#include <common/stm32/mcu/MCU.h>\n\ntypedef struct {\n MCU* mcu;\n GPIO_TypeDef* port;\n uint16_t pin;\n} GPIOOutput;\n\nvoid gpio_output_init(GPIOOutput* gpio, MCU* mcu, GPIO_TypeDef* port,\n uint16_t pin, uint32_t mode, uint32_t pull, GPIO_PinState state);\n\nvoid gpio_set(GPIOOutput* gpio, GPIO_PinState state);\nvoid gpio_set_low(GPIOOutput* gpio);\nvoid gpio_set_high(GPIOOutput* gpio);\nvoid gpio_toggle(GPIOOutput* gpio);\n\n#endif /* COMMON_STM32_GPIO_GPIOOUTPUT_H_ */\n" (comment) "/*\n * GPIOOutput.h\n *\n * Created on: Jul. 23, 2021\n * Author: bruno\n */" (preproc_ifdef) "#ifndef COMMON_STM32_GPIO_GPIOOUTPUT_H_\n#define COMMON_STM32_GPIO_GPIOOUTPUT_H_\n\n#include <common/stm32/mcu/MCU.h>\n\ntypedef struct {\n MCU* mcu;\n GPIO_TypeDef* port;\n uint16_t pin;\n} GPIOOutput;\n\nvoid gpio_output_init(GPIOOutput* gpio, MCU* mcu, GPIO_TypeDef* port,\n uint16_t pin, uint32_t mode, uint32_t pull, GPIO_PinState state);\n\nvoid gpio_set(GPIOOutput* gpio, GPIO_PinState state);\nvoid gpio_set_low(GPIOOutput* gpio);\nvoid gpio_set_high(GPIOOutput* gpio);\nvoid gpio_toggle(GPIOOutput* gpio);\n\n#endif" (#ifndef) "#ifndef" (identifier) "COMMON_STM32_GPIO_GPIOOUTPUT_H_" (preproc_def) "#define COMMON_STM32_GPIO_GPIOOUTPUT_H_\n" (#define) "#define" (identifier) "COMMON_STM32_GPIO_GPIOOUTPUT_H_" (preproc_include) "#include <common/stm32/mcu/MCU.h>\n" (#include) "#include" (system_lib_string) "<common/stm32/mcu/MCU.h>" (type_definition) "typedef struct {\n MCU* mcu;\n GPIO_TypeDef* port;\n uint16_t pin;\n} GPIOOutput;" (typedef) "typedef" (struct_specifier) "struct {\n MCU* mcu;\n GPIO_TypeDef* port;\n uint16_t pin;\n}" (struct) "struct" (field_declaration_list) "{\n MCU* mcu;\n GPIO_TypeDef* port;\n uint16_t pin;\n}" ({) "{" (field_declaration) "MCU* mcu;" (type_identifier) "MCU" (pointer_declarator) "* mcu" (*) "*" (field_identifier) "mcu" (;) ";" (field_declaration) "GPIO_TypeDef* port;" (type_identifier) "GPIO_TypeDef" (pointer_declarator) "* port" (*) "*" (field_identifier) "port" (;) ";" (field_declaration) "uint16_t pin;" (primitive_type) "uint16_t" (field_identifier) "pin" (;) ";" (}) "}" (type_identifier) "GPIOOutput" (;) ";" (declaration) "void gpio_output_init(GPIOOutput* gpio, MCU* mcu, GPIO_TypeDef* port,\n uint16_t pin, uint32_t mode, uint32_t pull, GPIO_PinState state);" (primitive_type) "void" (function_declarator) "gpio_output_init(GPIOOutput* gpio, MCU* mcu, GPIO_TypeDef* port,\n uint16_t pin, uint32_t mode, uint32_t pull, GPIO_PinState state)" (identifier) "gpio_output_init" (parameter_list) "(GPIOOutput* gpio, MCU* mcu, GPIO_TypeDef* port,\n uint16_t pin, uint32_t mode, uint32_t pull, GPIO_PinState state)" (() "(" (parameter_declaration) "GPIOOutput* gpio" (type_identifier) "GPIOOutput" (pointer_declarator) "* gpio" (*) "*" (identifier) "gpio" (,) "," (parameter_declaration) "MCU* mcu" (type_identifier) "MCU" (pointer_declarator) "* mcu" (*) "*" (identifier) "mcu" (,) "," (parameter_declaration) "GPIO_TypeDef* port" (type_identifier) "GPIO_TypeDef" (pointer_declarator) "* port" (*) "*" (identifier) "port" (,) "," (parameter_declaration) "uint16_t pin" (primitive_type) "uint16_t" (identifier) "pin" (,) "," (parameter_declaration) "uint32_t mode" (primitive_type) "uint32_t" (identifier) "mode" (,) "," (parameter_declaration) "uint32_t pull" (primitive_type) "uint32_t" (identifier) "pull" (,) "," (parameter_declaration) "GPIO_PinState state" (type_identifier) "GPIO_PinState" (identifier) "state" ()) ")" (;) ";" (declaration) "void gpio_set(GPIOOutput* gpio, GPIO_PinState state);" (primitive_type) "void" (function_declarator) "gpio_set(GPIOOutput* gpio, GPIO_PinState state)" (identifier) "gpio_set" (parameter_list) "(GPIOOutput* gpio, GPIO_PinState state)" (() "(" (parameter_declaration) "GPIOOutput* gpio" (type_identifier) "GPIOOutput" (pointer_declarator) "* gpio" (*) "*" (identifier) "gpio" (,) "," (parameter_declaration) "GPIO_PinState state" (type_identifier) "GPIO_PinState" (identifier) "state" ()) ")" (;) ";" (declaration) "void gpio_set_low(GPIOOutput* gpio);" (primitive_type) "void" (function_declarator) "gpio_set_low(GPIOOutput* gpio)" (identifier) "gpio_set_low" (parameter_list) "(GPIOOutput* gpio)" (() "(" (parameter_declaration) "GPIOOutput* gpio" (type_identifier) "GPIOOutput" (pointer_declarator) "* gpio" (*) "*" (identifier) "gpio" ()) ")" (;) ";" (declaration) "void gpio_set_high(GPIOOutput* gpio);" (primitive_type) "void" (function_declarator) "gpio_set_high(GPIOOutput* gpio)" (identifier) "gpio_set_high" (parameter_list) "(GPIOOutput* gpio)" (() "(" (parameter_declaration) "GPIOOutput* gpio" (type_identifier) "GPIOOutput" (pointer_declarator) "* gpio" (*) "*" (identifier) "gpio" ()) ")" (;) ";" (declaration) "void gpio_toggle(GPIOOutput* gpio);" (primitive_type) "void" (function_declarator) "gpio_toggle(GPIOOutput* gpio)" (identifier) "gpio_toggle" (parameter_list) "(GPIOOutput* gpio)" (() "(" (parameter_declaration) "GPIOOutput* gpio" (type_identifier) "GPIOOutput" (pointer_declarator) "* gpio" (*) "*" (identifier) "gpio" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* COMMON_STM32_GPIO_GPIOOUTPUT_H_ */"
135
0
{"language": "c", "success": true, "metadata": {"lines": 21, "avg_line_length": 29.14, "nodes": 103, "errors": 0, "source_hash": "5eb6dde7f311c90d604d828bbad635baac39bcb269a539564f71d11dfdbe7ee0", "categorized_nodes": 68}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef COMMON_STM32_GPIO_GPIOOUTPUT_H_\n#define COMMON_STM32_GPIO_GPIOOUTPUT_H_\n\n#include <common/stm32/mcu/MCU.h>\n\ntypedef struct {\n MCU* mcu;\n GPIO_TypeDef* port;\n uint16_t pin;\n} GPIOOutput;\n\nvoid gpio_output_init(GPIOOutput* gpio, MCU* mcu, GPIO_TypeDef* port,\n uint16_t pin, uint32_t mode, uint32_t pull, GPIO_PinState state);\n\nvoid gpio_set(GPIOOutput* gpio, GPIO_PinState state);\nvoid gpio_set_low(GPIOOutput* gpio);\nvoid gpio_set_high(GPIOOutput* gpio);\nvoid gpio_toggle(GPIOOutput* gpio);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 27, 59, 72, 82, 92, 102], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 26, "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": "COMMON_STM32_GPIO_GPIOOUTPUT_H_", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 39}}, {"id": 3, "type": "preproc_def", "text": "#define COMMON_STM32_GPIO_GPIOOUTPUT_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": "COMMON_STM32_GPIO_GPIOOUTPUT_H_", "parent": 3, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 39}}, {"id": 6, "type": "preproc_include", "text": "#include <common/stm32/mcu/MCU.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": "<common/stm32/mcu/MCU.h>", "parent": 6, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 33}}, {"id": 9, "type": "type_definition", "text": "typedef struct {\n MCU* mcu;\n GPIO_TypeDef* port;\n uint16_t pin;\n} GPIOOutput;", "parent": 0, "children": [10, 11, 26], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 16, "column": 13}}, {"id": 10, "type": "typedef", "text": "typedef", "parent": 9, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 11, "type": "struct_specifier", "text": "struct {\n MCU* mcu;\n GPIO_TypeDef* port;\n uint16_t pin;\n}", "parent": 9, "children": [12], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 16, "column": 1}}, {"id": 12, "type": "struct", "text": "struct", "parent": 11, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 14}}, {"id": 13, "type": "field_declaration", "text": "MCU* mcu;", "parent": 11, "children": [14, 15], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 13}}, {"id": 14, "type": "type_identifier", "text": "MCU", "parent": 13, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 7}}, {"id": 15, "type": "pointer_declarator", "text": "* mcu", "parent": 13, "children": [16, 17], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 12}}, {"id": 16, "type": "*", "text": "*", "parent": 15, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 8}}, {"id": 17, "type": "field_identifier", "text": "mcu", "parent": 15, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 12}}, {"id": 18, "type": "field_declaration", "text": "GPIO_TypeDef* port;", "parent": 11, "children": [19, 20], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 23}}, {"id": 19, "type": "type_identifier", "text": "GPIO_TypeDef", "parent": 18, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 16}}, {"id": 20, "type": "pointer_declarator", "text": "* port", "parent": 18, "children": [21, 22], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 22}}, {"id": 21, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 17}}, {"id": 22, "type": "field_identifier", "text": "port", "parent": 20, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 22}}, {"id": 23, "type": "field_declaration", "text": "uint16_t pin;", "parent": 11, "children": [24, 25], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 17}}, {"id": 24, "type": "primitive_type", "text": "uint16_t", "parent": 23, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 12}}, {"id": 25, "type": "field_identifier", "text": "pin", "parent": 23, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 16}}, {"id": 26, "type": "type_identifier", "text": "GPIOOutput", "parent": 9, "children": [], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 12}}, {"id": 27, "type": "declaration", "text": "void gpio_output_init(GPIOOutput* gpio, MCU* mcu, GPIO_TypeDef* port,\n uint16_t pin, uint32_t mode, uint32_t pull, GPIO_PinState state);", "parent": 0, "children": [28, 29], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 73}}, {"id": 28, "type": "primitive_type", "text": "void", "parent": 27, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 4}}, {"id": 29, "type": "function_declarator", "text": "gpio_output_init(GPIOOutput* gpio, MCU* mcu, GPIO_TypeDef* port,\n uint16_t pin, uint32_t mode, uint32_t pull, GPIO_PinState state)", "parent": 27, "children": [30, 31], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 19, "column": 72}}, {"id": 30, "type": "identifier", "text": "gpio_output_init", "parent": 29, "children": [], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 21}}, {"id": 31, "type": "parameter_list", "text": "(GPIOOutput* gpio, MCU* mcu, GPIO_TypeDef* port,\n uint16_t pin, uint32_t mode, uint32_t pull, GPIO_PinState state)", "parent": 29, "children": [32, 37, 42, 47, 50, 53, 56], "start_point": {"row": 18, "column": 21}, "end_point": {"row": 19, "column": 72}}, {"id": 32, "type": "parameter_declaration", "text": "GPIOOutput* gpio", "parent": 31, "children": [33, 34], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 38}}, {"id": 33, "type": "type_identifier", "text": "GPIOOutput", "parent": 32, "children": [], "start_point": {"row": 18, "column": 22}, "end_point": {"row": 18, "column": 32}}, {"id": 34, "type": "pointer_declarator", "text": "* gpio", "parent": 32, "children": [35, 36], "start_point": {"row": 18, "column": 32}, "end_point": {"row": 18, "column": 38}}, {"id": 35, "type": "*", "text": "*", "parent": 34, "children": [], "start_point": {"row": 18, "column": 32}, "end_point": {"row": 18, "column": 33}}, {"id": 36, "type": "identifier", "text": "gpio", "parent": 34, "children": [], "start_point": {"row": 18, "column": 34}, "end_point": {"row": 18, "column": 38}}, {"id": 37, "type": "parameter_declaration", "text": "MCU* mcu", "parent": 31, "children": [38, 39], "start_point": {"row": 18, "column": 40}, "end_point": {"row": 18, "column": 48}}, {"id": 38, "type": "type_identifier", "text": "MCU", "parent": 37, "children": [], "start_point": {"row": 18, "column": 40}, "end_point": {"row": 18, "column": 43}}, {"id": 39, "type": "pointer_declarator", "text": "* mcu", "parent": 37, "children": [40, 41], "start_point": {"row": 18, "column": 43}, "end_point": {"row": 18, "column": 48}}, {"id": 40, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 18, "column": 43}, "end_point": {"row": 18, "column": 44}}, {"id": 41, "type": "identifier", "text": "mcu", "parent": 39, "children": [], "start_point": {"row": 18, "column": 45}, "end_point": {"row": 18, "column": 48}}, {"id": 42, "type": "parameter_declaration", "text": "GPIO_TypeDef* port", "parent": 31, "children": [43, 44], "start_point": {"row": 18, "column": 50}, "end_point": {"row": 18, "column": 68}}, {"id": 43, "type": "type_identifier", "text": "GPIO_TypeDef", "parent": 42, "children": [], "start_point": {"row": 18, "column": 50}, "end_point": {"row": 18, "column": 62}}, {"id": 44, "type": "pointer_declarator", "text": "* port", "parent": 42, "children": [45, 46], "start_point": {"row": 18, "column": 62}, "end_point": {"row": 18, "column": 68}}, {"id": 45, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 18, "column": 62}, "end_point": {"row": 18, "column": 63}}, {"id": 46, "type": "identifier", "text": "port", "parent": 44, "children": [], "start_point": {"row": 18, "column": 64}, "end_point": {"row": 18, "column": 68}}, {"id": 47, "type": "parameter_declaration", "text": "uint16_t pin", "parent": 31, "children": [48, 49], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 20}}, {"id": 48, "type": "primitive_type", "text": "uint16_t", "parent": 47, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 16}}, {"id": 49, "type": "identifier", "text": "pin", "parent": 47, "children": [], "start_point": {"row": 19, "column": 17}, "end_point": {"row": 19, "column": 20}}, {"id": 50, "type": "parameter_declaration", "text": "uint32_t mode", "parent": 31, "children": [51, 52], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 35}}, {"id": 51, "type": "primitive_type", "text": "uint32_t", "parent": 50, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 30}}, {"id": 52, "type": "identifier", "text": "mode", "parent": 50, "children": [], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 35}}, {"id": 53, "type": "parameter_declaration", "text": "uint32_t pull", "parent": 31, "children": [54, 55], "start_point": {"row": 19, "column": 37}, "end_point": {"row": 19, "column": 50}}, {"id": 54, "type": "primitive_type", "text": "uint32_t", "parent": 53, "children": [], "start_point": {"row": 19, "column": 37}, "end_point": {"row": 19, "column": 45}}, {"id": 55, "type": "identifier", "text": "pull", "parent": 53, "children": [], "start_point": {"row": 19, "column": 46}, "end_point": {"row": 19, "column": 50}}, {"id": 56, "type": "parameter_declaration", "text": "GPIO_PinState state", "parent": 31, "children": [57, 58], "start_point": {"row": 19, "column": 52}, "end_point": {"row": 19, "column": 71}}, {"id": 57, "type": "type_identifier", "text": "GPIO_PinState", "parent": 56, "children": [], "start_point": {"row": 19, "column": 52}, "end_point": {"row": 19, "column": 65}}, {"id": 58, "type": "identifier", "text": "state", "parent": 56, "children": [], "start_point": {"row": 19, "column": 66}, "end_point": {"row": 19, "column": 71}}, {"id": 59, "type": "declaration", "text": "void gpio_set(GPIOOutput* gpio, GPIO_PinState state);", "parent": 0, "children": [60, 61], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 53}}, {"id": 60, "type": "primitive_type", "text": "void", "parent": 59, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 4}}, {"id": 61, "type": "function_declarator", "text": "gpio_set(GPIOOutput* gpio, GPIO_PinState state)", "parent": 59, "children": [62, 63], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 52}}, {"id": 62, "type": "identifier", "text": "gpio_set", "parent": 61, "children": [], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 13}}, {"id": 63, "type": "parameter_list", "text": "(GPIOOutput* gpio, GPIO_PinState state)", "parent": 61, "children": [64, 69], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 52}}, {"id": 64, "type": "parameter_declaration", "text": "GPIOOutput* gpio", "parent": 63, "children": [65, 66], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 30}}, {"id": 65, "type": "type_identifier", "text": "GPIOOutput", "parent": 64, "children": [], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 24}}, {"id": 66, "type": "pointer_declarator", "text": "* gpio", "parent": 64, "children": [67, 68], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 30}}, {"id": 67, "type": "*", "text": "*", "parent": 66, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 25}}, {"id": 68, "type": "identifier", "text": "gpio", "parent": 66, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 30}}, {"id": 69, "type": "parameter_declaration", "text": "GPIO_PinState state", "parent": 63, "children": [70, 71], "start_point": {"row": 21, "column": 32}, "end_point": {"row": 21, "column": 51}}, {"id": 70, "type": "type_identifier", "text": "GPIO_PinState", "parent": 69, "children": [], "start_point": {"row": 21, "column": 32}, "end_point": {"row": 21, "column": 45}}, {"id": 71, "type": "identifier", "text": "state", "parent": 69, "children": [], "start_point": {"row": 21, "column": 46}, "end_point": {"row": 21, "column": 51}}, {"id": 72, "type": "declaration", "text": "void gpio_set_low(GPIOOutput* gpio);", "parent": 0, "children": [73, 74], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 36}}, {"id": 73, "type": "primitive_type", "text": "void", "parent": 72, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 4}}, {"id": 74, "type": "function_declarator", "text": "gpio_set_low(GPIOOutput* gpio)", "parent": 72, "children": [75, 76], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 35}}, {"id": 75, "type": "identifier", "text": "gpio_set_low", "parent": 74, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 17}}, {"id": 76, "type": "parameter_list", "text": "(GPIOOutput* gpio)", "parent": 74, "children": [77], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 35}}, {"id": 77, "type": "parameter_declaration", "text": "GPIOOutput* gpio", "parent": 76, "children": [78, 79], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 34}}, {"id": 78, "type": "type_identifier", "text": "GPIOOutput", "parent": 77, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 28}}, {"id": 79, "type": "pointer_declarator", "text": "* gpio", "parent": 77, "children": [80, 81], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 34}}, {"id": 80, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 29}}, {"id": 81, "type": "identifier", "text": "gpio", "parent": 79, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 34}}, {"id": 82, "type": "declaration", "text": "void gpio_set_high(GPIOOutput* gpio);", "parent": 0, "children": [83, 84], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 37}}, {"id": 83, "type": "primitive_type", "text": "void", "parent": 82, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 4}}, {"id": 84, "type": "function_declarator", "text": "gpio_set_high(GPIOOutput* gpio)", "parent": 82, "children": [85, 86], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 36}}, {"id": 85, "type": "identifier", "text": "gpio_set_high", "parent": 84, "children": [], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 18}}, {"id": 86, "type": "parameter_list", "text": "(GPIOOutput* gpio)", "parent": 84, "children": [87], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 36}}, {"id": 87, "type": "parameter_declaration", "text": "GPIOOutput* gpio", "parent": 86, "children": [88, 89], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 35}}, {"id": 88, "type": "type_identifier", "text": "GPIOOutput", "parent": 87, "children": [], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 29}}, {"id": 89, "type": "pointer_declarator", "text": "* gpio", "parent": 87, "children": [90, 91], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 35}}, {"id": 90, "type": "*", "text": "*", "parent": 89, "children": [], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 30}}, {"id": 91, "type": "identifier", "text": "gpio", "parent": 89, "children": [], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 35}}, {"id": 92, "type": "declaration", "text": "void gpio_toggle(GPIOOutput* gpio);", "parent": 0, "children": [93, 94], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 35}}, {"id": 93, "type": "primitive_type", "text": "void", "parent": 92, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 4}}, {"id": 94, "type": "function_declarator", "text": "gpio_toggle(GPIOOutput* gpio)", "parent": 92, "children": [95, 96], "start_point": {"row": 24, "column": 5}, "end_point": {"row": 24, "column": 34}}, {"id": 95, "type": "identifier", "text": "gpio_toggle", "parent": 94, "children": [], "start_point": {"row": 24, "column": 5}, "end_point": {"row": 24, "column": 16}}, {"id": 96, "type": "parameter_list", "text": "(GPIOOutput* gpio)", "parent": 94, "children": [97], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 34}}, {"id": 97, "type": "parameter_declaration", "text": "GPIOOutput* gpio", "parent": 96, "children": [98, 99], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 33}}, {"id": 98, "type": "type_identifier", "text": "GPIOOutput", "parent": 97, "children": [], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 27}}, {"id": 99, "type": "pointer_declarator", "text": "* gpio", "parent": 97, "children": [100, 101], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 33}}, {"id": 100, "type": "*", "text": "*", "parent": 99, "children": [], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 28}}, {"id": 101, "type": "identifier", "text": "gpio", "parent": 99, "children": [], "start_point": {"row": 24, "column": 29}, "end_point": {"row": 24, "column": 33}}, {"id": 102, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}]}, "node_categories": {"declarations": {"functions": [29, 61, 74, 84, 94], "variables": [9, 13, 18, 23, 27, 32, 37, 42, 47, 50, 53, 56, 59, 64, 69, 72, 77, 82, 87, 92, 97], "classes": [11, 12], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 14, 17, 19, 22, 25, 26, 30, 33, 36, 38, 41, 43, 46, 49, 52, 55, 57, 58, 62, 65, 68, 70, 71, 75, 78, 81, 85, 88, 91, 95, 98, 101, 102], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "gpio_output_init(GPIOOutput* gpio, MCU* mcu, GPIO_TypeDef* port,\n uint16_t pin, uint32_t mode"}, {"node_id": 61, "universal_type": "function", "name": "unknown", "text_snippet": "gpio_set(GPIOOutput* gpio, GPIO_PinState state)"}, {"node_id": 74, "universal_type": "function", "name": "unknown", "text_snippet": "gpio_set_low(GPIOOutput* gpio)"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "gpio_set_high(GPIOOutput* gpio)"}, {"node_id": 94, "universal_type": "function", "name": "unknown", "text_snippet": "gpio_toggle(GPIOOutput* gpio)"}], "class_declarations": [{"node_id": 11, "universal_type": "class", "name": "{", "text_snippet": "struct {\n MCU* mcu;\n GPIO_TypeDef* port;\n uint16_t pin;\n}"}, {"node_id": 12, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <common/stm32/mcu/MCU.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\n * GPIOOutput.h\n *\n * Created on: Jul. 23, 2021\n * Author: bruno\n */\n\n#ifndef COMMON_STM32_GPIO_GPIOOUTPUT_H_\n#define COMMON_STM32_GPIO_GPIOOUTPUT_H_\n\n#include <common/stm32/mcu/MCU.h>\n\ntypedef struct {\n MCU* mcu;\n GPIO_TypeDef* port;\n uint16_t pin;\n} GPIOOutput;\n\nvoid gpio_output_init(GPIOOutput* gpio, MCU* mcu, GPIO_TypeDef* port,\n uint16_t pin, uint32_t mode, uint32_t pull, GPIO_PinState state);\n\nvoid gpio_set(GPIOOutput* gpio, GPIO_PinState state);\nvoid gpio_set_low(GPIOOutput* gpio);\nvoid gpio_set_high(GPIOOutput* gpio);\nvoid gpio_toggle(GPIOOutput* gpio);\n\n#endif /* COMMON_STM32_GPIO_GPIOOUTPUT_H_ */\n"}
0
c
/*! * @brief ASN(x) STEMMA SOIL sensor library -- source file * * Library to support the STEMMA SOIL sensor. * * @file /_asnx_lib_/sensors/stemma_soil.c * @author <NAME> * @version 1.2.0 * @date 2021/06/07 * * @see https://learn.adafruit.com/adafruit-stemma-soil-sensor-i2c-capacitive-moisture-sensor/ * @see https://github.com/adafruit/Adafruit_Seesaw */ /***** INCLUDES *******************************************************/ #include "stemma_soil.h" /***** FUNCTIONS ******************************************************/ /*! * Initialization of the STEMMA SOIL sensor. * * @param[out] dev Device structure to be filled * @param[in] address I2C address of the sensor */ STEMMA_RET_t stemma_init(STEMMA_t* dev, uint8_t address) { /* Check if the device is available */ if(i2c_is_available(address) == I2C_RET_OK) { /* Device is available ... store address in device structure */ dev->address = address; /* Return OK */ return STEMMA_RET_OK; } else { /* Return ERROR */ return STEMMA_RET_ERROR_NODEV; } } /*! * Read the version code of the STEMMA SOIL sensor. * Bits [31:16] will be a date code, [15:0] will be the product id. * * @param[in] dev Device structure * @param[out] version Version code read from the sensor * @return OK in case of success; ERROR otherwise */ STEMMA_RET_t stemma_get_version(STEMMA_t* dev, uint32_t* version) { /* Variable for the read result */ uint8_t res[4] = {0}; /* Read in 4 bytes */ if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4) != I2C_RET_OK) { /* Reading failed */ return STEMMA_RET_ERROR; } /* Copy the result */ *version = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3]; /* Return success */ return STEMMA_RET_OK; } /*! * Read the temperature of the sensor in degrees Celsius (°C). * * @param[in] dev Device structure * @param[out] temperature Sensor temperature in degrees Celsius (°C) * @return OK in case of success; ERROR otherwise */ STEMMA_RET_t stemma_get_temperature(STEMMA_t* dev, float* temperature) { /* Variable for the read result */ uint8_t res[4] = {0}; /* Read in 4 bytes */ if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) != I2C_RET_OK) { /* Reading failed */ return STEMMA_RET_ERROR; } /* Get intermediate result */ uint32_t ret = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3]; /* Copy the result */ *temperature = (1.0 / (1UL << 16)) * (float)ret; /* Return success */ return STEMMA_RET_OK; } /*! * Read the humidity of the sensor indicated by its capacitance. * * @param[in] dev Device structure * @param[out] humidity Humidity in percent * @return OK in case of success; ERROR otherwise */ STEMMA_RET_t stemma_get_humidity(STEMMA_t* dev, float* humidity) { /* Variable for the read result */ uint16_t ret = STEMMA_TOUCH_WORKING; /* Capacitance measurement can take some time */ do { /* Read in 2 bytes */ if(i2c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) { /* Reading failed */ return STEMMA_RET_ERROR; } }while(ret == STEMMA_TOUCH_WORKING); /* Copy the result */ *humidity = (((float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) * 100.0; /* Return success */ return STEMMA_RET_OK; } /*! * Read the humidity of the sensor indicated by its capacitance and use * a floating average over a defined number of readings to smooth the value. * * @param[in] dev Device structure * @param[in] structure Floating average structure * @param[out] humidity Humidity in percent * @return OK in case of success; ERROR otherwise */ STEMMA_RET_t stemma_get_humidity_avg(STEMMA_t* dev, STEMMA_AVG_t* structure, float* humidity) { /* Temporary variable for the sensor reading */ float tmp; /* Temporary counter variable */ uint8_t i = 0; /* Static variable for the value array index */ static uint8_t index = 0; /* Get a new reading */ STEMMA_RET_t ret = stemma_get_humidity(dev, &tmp); /* Check if the reading is valid */ if(ret != STEMMA_RET_OK) { /* Something went wrong */ return ret; } /* Check if it is the first reading */ if(structure->empty == 0) { for(i=0; i<STEMMA_AVG_CNT; i++) { structure->value[i] = tmp; index = 1; } } else { /* There are other readings available already */ structure->value[index] = tmp; /* Get new index */ index = (index+1) % STEMMA_AVG_CNT; } /* Calculate average */ double sum = 0; for(i=0; i<STEMMA_AVG_CNT; i++) { sum += structure->value[i]; } sum /= STEMMA_AVG_CNT; /* Copy result to pointer location */ *humidity = sum; /* Return with success */ return STEMMA_RET_OK; }
33.64
152
(translation_unit) "/*!\n * @brief ASN(x) STEMMA SOIL sensor library -- source file\n *\n * Library to support the STEMMA SOIL sensor.\n *\n * @file /_asnx_lib_/sensors/stemma_soil.c\n * @author <NAME>\n * @version 1.2.0\n * @date 2021/06/07\n *\n * @see https://learn.adafruit.com/adafruit-stemma-soil-sensor-i2c-capacitive-moisture-sensor/\n * @see https://github.com/adafruit/Adafruit_Seesaw\n */\n\n\n/***** INCLUDES *******************************************************/\n#include "stemma_soil.h"\n\n\n/***** FUNCTIONS ******************************************************/\n/*!\n * Initialization of the STEMMA SOIL sensor.\n *\n * @param[out] dev Device structure to be filled\n * @param[in] address I2C address of the sensor\n */\nSTEMMA_RET_t stemma_init(STEMMA_t* dev, uint8_t address) {\n /* Check if the device is available */\n if(i2c_is_available(address) == I2C_RET_OK) {\n /* Device is available ... store address in device structure */\n dev->address = address;\n /* Return OK */\n return STEMMA_RET_OK;\n } else {\n /* Return ERROR */\n return STEMMA_RET_ERROR_NODEV;\n }\n}\n\n\n/*!\n * Read the version code of the STEMMA SOIL sensor.\n * Bits [31:16] will be a date code, [15:0] will be the product id.\n * \n * @param[in] dev Device structure\n * @param[out] version Version code read from the sensor\n * @return OK in case of success; ERROR otherwise\n */\nSTEMMA_RET_t stemma_get_version(STEMMA_t* dev, uint32_t* version) {\n /* Variable for the read result */\n uint8_t res[4] = {0};\n /* Read in 4 bytes */\n if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n /* Copy the result */\n *version = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n /* Return success */\n return STEMMA_RET_OK;\n}\n\n\n/*!\n * Read the temperature of the sensor in degrees Celsius (°C).\n * \n * @param[in] dev Device structure\n * @param[out] temperature Sensor temperature in degrees Celsius (°C)\n * @return OK in case of success; ERROR otherwise\n */\nSTEMMA_RET_t stemma_get_temperature(STEMMA_t* dev, float* temperature) {\n /* Variable for the read result */\n uint8_t res[4] = {0};\n /* Read in 4 bytes */\n if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n /* Get intermediate result */\n uint32_t ret = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n /* Copy the result */\n *temperature = (1.0 / (1UL << 16)) * (float)ret;\n /* Return success */\n return STEMMA_RET_OK;\n}\n\n\n/*!\n * Read the humidity of the sensor indicated by its capacitance.\n * \n * @param[in] dev Device structure\n * @param[out] humidity Humidity in percent\n * @return OK in case of success; ERROR otherwise\n */\nSTEMMA_RET_t stemma_get_humidity(STEMMA_t* dev, float* humidity) {\n /* Variable for the read result */\n uint16_t ret = STEMMA_TOUCH_WORKING;\n /* Capacitance measurement can take some time */\n do {\n /* Read in 2 bytes */\n if(i2c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n }while(ret == STEMMA_TOUCH_WORKING);\n /* Copy the result */\n *humidity = (((float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) * 100.0;\n /* Return success */\n return STEMMA_RET_OK;\n}\n\n\n/*!\n * Read the humidity of the sensor indicated by its capacitance and use\n * a floating average over a defined number of readings to smooth the value.\n * \n * @param[in] dev Device structure\n * @param[in] structure Floating average structure\n * @param[out] humidity Humidity in percent\n * @return OK in case of success; ERROR otherwise\n */\nSTEMMA_RET_t stemma_get_humidity_avg(STEMMA_t* dev, STEMMA_AVG_t* structure, float* humidity) {\n /* Temporary variable for the sensor reading */\n float tmp;\n /* Temporary counter variable */\n uint8_t i = 0;\n /* Static variable for the value array index */\n static uint8_t index = 0;\n /* Get a new reading */\n STEMMA_RET_t ret = stemma_get_humidity(dev, &tmp);\n /* Check if the reading is valid */\n if(ret != STEMMA_RET_OK) {\n /* Something went wrong */\n return ret;\n }\n /* Check if it is the first reading */\n if(structure->empty == 0) {\n for(i=0; i<STEMMA_AVG_CNT; i++) {\n structure->value[i] = tmp;\n index = 1;\n }\n } else {\n /* There are other readings available already */\n structure->value[index] = tmp;\n /* Get new index */\n index = (index+1) % STEMMA_AVG_CNT;\n }\n /* Calculate average */\n double sum = 0;\n for(i=0; i<STEMMA_AVG_CNT; i++) {\n sum += structure->value[i];\n }\n sum /= STEMMA_AVG_CNT;\n /* Copy result to pointer location */\n *humidity = sum;\n /* Return with success */\n return STEMMA_RET_OK;\n}\n" (comment) "/*!\n * @brief ASN(x) STEMMA SOIL sensor library -- source file\n *\n * Library to support the STEMMA SOIL sensor.\n *\n * @file /_asnx_lib_/sensors/stemma_soil.c\n * @author <NAME>\n * @version 1.2.0\n * @date 2021/06/07\n *\n * @see https://learn.adafruit.com/adafruit-stemma-soil-sensor-i2c-capacitive-moisture-sensor/\n * @see https://github.com/adafruit/Adafruit_Seesaw\n */" (comment) "/***** INCLUDES *******************************************************/" (preproc_include) "#include "stemma_soil.h"\n" (#include) "#include" (string_literal) ""stemma_soil.h"" (") """ (string_content) "stemma_soil.h" (") """ (comment) "/***** FUNCTIONS ******************************************************/" (comment) "/*!\n * Initialization of the STEMMA SOIL sensor.\n *\n * @param[out] dev Device structure to be filled\n * @param[in] address I2C address of the sensor\n */" (function_definition) "STEMMA_RET_t stemma_init(STEMMA_t* dev, uint8_t address) {\n /* Check if the device is available */\n if(i2c_is_available(address) == I2C_RET_OK) {\n /* Device is available ... store address in device structure */\n dev->address = address;\n /* Return OK */\n return STEMMA_RET_OK;\n } else {\n /* Return ERROR */\n return STEMMA_RET_ERROR_NODEV;\n }\n}" (type_identifier) "STEMMA_RET_t" (function_declarator) "stemma_init(STEMMA_t* dev, uint8_t address)" (identifier) "stemma_init" (parameter_list) "(STEMMA_t* dev, uint8_t address)" (() "(" (parameter_declaration) "STEMMA_t* dev" (type_identifier) "STEMMA_t" (pointer_declarator) "* dev" (*) "*" (identifier) "dev" (,) "," (parameter_declaration) "uint8_t address" (primitive_type) "uint8_t" (identifier) "address" ()) ")" (compound_statement) "{\n /* Check if the device is available */\n if(i2c_is_available(address) == I2C_RET_OK) {\n /* Device is available ... store address in device structure */\n dev->address = address;\n /* Return OK */\n return STEMMA_RET_OK;\n } else {\n /* Return ERROR */\n return STEMMA_RET_ERROR_NODEV;\n }\n}" ({) "{" (comment) "/* Check if the device is available */" (if_statement) "if(i2c_is_available(address) == I2C_RET_OK) {\n /* Device is available ... store address in device structure */\n dev->address = address;\n /* Return OK */\n return STEMMA_RET_OK;\n } else {\n /* Return ERROR */\n return STEMMA_RET_ERROR_NODEV;\n }" (if) "if" (parenthesized_expression) "(i2c_is_available(address) == I2C_RET_OK)" (() "(" (binary_expression) "i2c_is_available(address) == I2C_RET_OK" (call_expression) "i2c_is_available(address)" (identifier) "i2c_is_available" (argument_list) "(address)" (() "(" (identifier) "address" ()) ")" (==) "==" (identifier) "I2C_RET_OK" ()) ")" (compound_statement) "{\n /* Device is available ... store address in device structure */\n dev->address = address;\n /* Return OK */\n return STEMMA_RET_OK;\n }" ({) "{" (comment) "/* Device is available ... store address in device structure */" (expression_statement) "dev->address = address;" (assignment_expression) "dev->address = address" (field_expression) "dev->address" (identifier) "dev" (->) "->" (field_identifier) "address" (=) "=" (identifier) "address" (;) ";" (comment) "/* Return OK */" (return_statement) "return STEMMA_RET_OK;" (return) "return" (identifier) "STEMMA_RET_OK" (;) ";" (}) "}" (else_clause) "else {\n /* Return ERROR */\n return STEMMA_RET_ERROR_NODEV;\n }" (else) "else" (compound_statement) "{\n /* Return ERROR */\n return STEMMA_RET_ERROR_NODEV;\n }" ({) "{" (comment) "/* Return ERROR */" (return_statement) "return STEMMA_RET_ERROR_NODEV;" (return) "return" (identifier) "STEMMA_RET_ERROR_NODEV" (;) ";" (}) "}" (}) "}" (comment) "/*!\n * Read the version code of the STEMMA SOIL sensor.\n * Bits [31:16] will be a date code, [15:0] will be the product id.\n * \n * @param[in] dev Device structure\n * @param[out] version Version code read from the sensor\n * @return OK in case of success; ERROR otherwise\n */" (function_definition) "STEMMA_RET_t stemma_get_version(STEMMA_t* dev, uint32_t* version) {\n /* Variable for the read result */\n uint8_t res[4] = {0};\n /* Read in 4 bytes */\n if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n /* Copy the result */\n *version = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n /* Return success */\n return STEMMA_RET_OK;\n}" (type_identifier) "STEMMA_RET_t" (function_declarator) "stemma_get_version(STEMMA_t* dev, uint32_t* version)" (identifier) "stemma_get_version" (parameter_list) "(STEMMA_t* dev, uint32_t* version)" (() "(" (parameter_declaration) "STEMMA_t* dev" (type_identifier) "STEMMA_t" (pointer_declarator) "* dev" (*) "*" (identifier) "dev" (,) "," (parameter_declaration) "uint32_t* version" (primitive_type) "uint32_t" (pointer_declarator) "* version" (*) "*" (identifier) "version" ()) ")" (compound_statement) "{\n /* Variable for the read result */\n uint8_t res[4] = {0};\n /* Read in 4 bytes */\n if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n /* Copy the result */\n *version = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n /* Return success */\n return STEMMA_RET_OK;\n}" ({) "{" (comment) "/* Variable for the read result */" (declaration) "uint8_t res[4] = {0};" (primitive_type) "uint8_t" (init_declarator) "res[4] = {0}" (array_declarator) "res[4]" (identifier) "res" ([) "[" (number_literal) "4" (]) "]" (=) "=" (initializer_list) "{0}" ({) "{" (number_literal) "0" (}) "}" (;) ";" (comment) "/* Read in 4 bytes */" (if_statement) "if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }" (if) "if" (parenthesized_expression) "(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4) != I2C_RET_OK)" (() "(" (binary_expression) "i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4) != I2C_RET_OK" (call_expression) "i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4)" (identifier) "i2c_read16_block" (argument_list) "(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4)" (() "(" (field_expression) "dev->address" (identifier) "dev" (->) "->" (field_identifier) "address" (,) "," (parenthesized_expression) "(STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8))" (() "(" (binary_expression) "STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)" (identifier) "STEMMA_STATUS_BASE" (|) "|" (parenthesized_expression) "(STEMMA_STATUS_VERSION<<8)" (() "(" (binary_expression) "STEMMA_STATUS_VERSION<<8" (identifier) "STEMMA_STATUS_VERSION" (<<) "<<" (number_literal) "8" ()) ")" ()) ")" (,) "," (identifier) "res" (,) "," (number_literal) "4" ()) ")" (!=) "!=" (identifier) "I2C_RET_OK" ()) ")" (compound_statement) "{\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }" ({) "{" (comment) "/* Reading failed */" (return_statement) "return STEMMA_RET_ERROR;" (return) "return" (identifier) "STEMMA_RET_ERROR" (;) ";" (}) "}" (comment) "/* Copy the result */" (expression_statement) "*version = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];" (assignment_expression) "*version = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3]" (pointer_expression) "*version" (*) "*" (identifier) "version" (=) "=" (binary_expression) "((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3]" (binary_expression) "((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8)" (binary_expression) "((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16)" (parenthesized_expression) "((uint32_t)res[0] << 24)" (() "(" (binary_expression) "(uint32_t)res[0] << 24" (cast_expression) "(uint32_t)res[0]" (() "(" (type_descriptor) "uint32_t" (primitive_type) "uint32_t" ()) ")" (subscript_expression) "res[0]" (identifier) "res" ([) "[" (number_literal) "0" (]) "]" (<<) "<<" (number_literal) "24" ()) ")" (|) "|" (parenthesized_expression) "((uint32_t)res[1] << 16)" (() "(" (binary_expression) "(uint32_t)res[1] << 16" (cast_expression) "(uint32_t)res[1]" (() "(" (type_descriptor) "uint32_t" (primitive_type) "uint32_t" ()) ")" (subscript_expression) "res[1]" (identifier) "res" ([) "[" (number_literal) "1" (]) "]" (<<) "<<" (number_literal) "16" ()) ")" (|) "|" (parenthesized_expression) "((uint32_t)res[2] << 8)" (() "(" (binary_expression) "(uint32_t)res[2] << 8" (cast_expression) "(uint32_t)res[2]" (() "(" (type_descriptor) "uint32_t" (primitive_type) "uint32_t" ()) ")" (subscript_expression) "res[2]" (identifier) "res" ([) "[" (number_literal) "2" (]) "]" (<<) "<<" (number_literal) "8" ()) ")" (|) "|" (cast_expression) "(uint32_t)res[3]" (() "(" (type_descriptor) "uint32_t" (primitive_type) "uint32_t" ()) ")" (subscript_expression) "res[3]" (identifier) "res" ([) "[" (number_literal) "3" (]) "]" (;) ";" (comment) "/* Return success */" (return_statement) "return STEMMA_RET_OK;" (return) "return" (identifier) "STEMMA_RET_OK" (;) ";" (}) "}" (comment) "/*!\n * Read the temperature of the sensor in degrees Celsius (°C).\n * \n * @param[in] dev Device structure\n * @param[out] temperature Sensor temperature in degrees Celsius (°C)\n * @return OK in case of success; ERROR otherwise\n */\nS" (function_definition) "EMMA_RET_t stemma_get_temperature(STEMMA_t* dev, float* temperature) {\n /* Variable for the read result */\n uint8_t res[4] = {0};\n /* Read in 4 bytes */\n if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n /* Get intermediate result */\n uint32_t ret = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n /* Copy the result */\n *temperature = (1.0 / (1UL << 16)) * (float)ret;\n /* Return success */\n return STEMMA_RET_OK;\n}\n\n" (type_identifier) "EMMA_RET_t s" (function_declarator) "emma_get_temperature(STEMMA_t* dev, float* temperature) {" (identifier) "emma_get_temperature(S" (parameter_list) "TEMMA_t* dev, float* temperature) {" (() "T" (parameter_declaration) "EMMA_t* dev, " (type_identifier) "EMMA_t* " (pointer_declarator) "dev, " (*) "d" (identifier) "v, " (,) "f" (parameter_declaration) "oat* temperature) " (primitive_type) "oat* " (pointer_declarator) "temperature) " (*) "t" (identifier) "mperature) " ()) "{" (compound_statement) " /* Variable for the read result */\n uint8_t res[4] = {0};\n /* Read in 4 bytes */\n if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n /* Get intermediate result */\n uint32_t ret = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n /* Copy the result */\n *temperature = (1.0 / (1UL << 16)) * (float)ret;\n /* Return success */\n return STEMMA_RET_OK;\n}\n\n" ({) " " (comment) " Variable for the read result */\n " (declaration) "nt8_t res[4] = {0};\n " (primitive_type) "nt8_t r" (init_declarator) "s[4] = {0};\n" (array_declarator) "s[4] =" (identifier) "s[4" ([) "]" (number_literal) " " (]) "=" (=) "{" (initializer_list) "};\n" ({) "}" (number_literal) ";" (}) "\n" (;) " " (comment) " Read in 4 bytes */\n " (if_statement) "(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n " (if) "(i" (parenthesized_expression) "2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) != I2C_RET_OK) {" (() "2" (binary_expression) "c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) != I2C_RET_OK) " (call_expression) "c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) !" (identifier) "c_read16_block(d" (argument_list) "ev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) !" (() "e" (field_expression) "v->address, " (identifier) "v->" (->) "ad" (field_identifier) "dress, " (,) "(" (parenthesized_expression) "TEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), " (() "T" (binary_expression) "EMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8))," (identifier) "EMMA_STATUS_BASE |" (|) "(" (parenthesized_expression) "TEMMA_STATUS_TEMP<<8))," (() "T" (binary_expression) "EMMA_STATUS_TEMP<<8))" (identifier) "EMMA_STATUS_TEMP<<" (<<) "8)" (number_literal) ")" ()) "," ()) " " (,) "r" (identifier) "s, " (,) "4" (number_literal) " " ()) "!" (!=) " I" (identifier) "C_RET_OK) " ()) "{" (compound_statement) " /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n " ({) " " (comment) " Reading failed */\n " (return_statement) "turn STEMMA_RET_ERROR;\n " (return) "turn S" (identifier) "EMMA_RET_ERROR;\n" (;) " " (}) " " (comment) " Get intermediate result */\n " (declaration) "nt32_t ret = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n " (primitive_type) "nt32_t r" (init_declarator) "t = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n" (identifier) "t =" (=) "(" (binary_expression) "uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n" (binary_expression) "uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) |" (binary_expression) "uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) |" (parenthesized_expression) "uint32_t)res[0] << 24) |" (() "u" (binary_expression) "int32_t)res[0] << 24) " (cast_expression) "int32_t)res[0] <" (() "i" (type_descriptor) "nt32_t)r" (primitive_type) "nt32_t)r" ()) "e" (subscript_expression) "s[0] <" (identifier) "s[0" ([) "]" (number_literal) " " (]) "<" (<<) " 2" (number_literal) ") " ()) "|" (|) "(" (parenthesized_expression) "uint32_t)res[1] << 16) |" (() "u" (binary_expression) "int32_t)res[1] << 16) " (cast_expression) "int32_t)res[1] <" (() "i" (type_descriptor) "nt32_t)r" (primitive_type) "nt32_t)r" ()) "e" (subscript_expression) "s[1] <" (identifier) "s[1" ([) "]" (number_literal) " " (]) "<" (<<) " 1" (number_literal) ") " ()) "|" (|) "(" (parenthesized_expression) "uint32_t)res[2] << 8) |" (() "u" (binary_expression) "int32_t)res[2] << 8) " (cast_expression) "int32_t)res[2] <" (() "i" (type_descriptor) "nt32_t)r" (primitive_type) "nt32_t)r" ()) "e" (subscript_expression) "s[2] <" (identifier) "s[2" ([) "]" (number_literal) " " (]) "<" (<<) " 8" (number_literal) " " ()) "|" (|) "(" (cast_expression) "int32_t)res[3];\n" (() "i" (type_descriptor) "nt32_t)r" (primitive_type) "nt32_t)r" ()) "e" (subscript_expression) "s[3];\n" (identifier) "s[3" ([) "]" (number_literal) ";" (]) "\n" (;) " " (comment) " Copy the result */\n " (expression_statement) "emperature = (1.0 / (1UL << 16)) * (float)ret;\n " (assignment_expression) "emperature = (1.0 / (1UL << 16)) * (float)ret;\n" (pointer_expression) "emperature =" (*) "e" (identifier) "mperature =" (=) "(" (binary_expression) ".0 / (1UL << 16)) * (float)ret;\n" (parenthesized_expression) ".0 / (1UL << 16)) *" (() "." (binary_expression) "0 / (1UL << 16)) " (number_literal) "0 /" (/) "(" (parenthesized_expression) "UL << 16)) " (() "U" (binary_expression) "L << 16))" (number_literal) "L <" (<<) " 1" (number_literal) "))" ()) " " ()) "*" (*) "(" (cast_expression) "loat)ret;\n" (() "l" (type_descriptor) "oat)r" (primitive_type) "oat)r" ()) "e" (identifier) "t;\n" (;) " " (comment) " Return success */\n " (return_statement) "turn STEMMA_RET_OK;\n}" (return) "turn S" (identifier) "EMMA_RET_OK;\n" (;) "}" (}) "\n" (comment) "!\n * Read the humidity of the sensor indicated by its capacitance.\n * \n * @param[in] dev Device structure\n * @param[out] humidity Humidity in percent\n * @return OK in case of success; ERROR otherwise\n */\nS" (function_definition) "EMMA_RET_t stemma_get_humidity(STEMMA_t* dev, float* humidity) {\n /* Variable for the read result */\n uint16_t ret = STEMMA_TOUCH_WORKING;\n /* Capacitance measurement can take some time */\n do {\n /* Read in 2 bytes */\n if(i2c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n }while(ret == STEMMA_TOUCH_WORKING);\n /* Copy the result */\n *humidity = (((float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) * 100.0;\n /* Return success */\n return STEMMA_RET_OK;\n}\n\n" (type_identifier) "EMMA_RET_t s" (function_declarator) "emma_get_humidity(STEMMA_t* dev, float* humidity) {" (identifier) "emma_get_humidity(S" (parameter_list) "TEMMA_t* dev, float* humidity) {" (() "T" (parameter_declaration) "EMMA_t* dev, " (type_identifier) "EMMA_t* " (pointer_declarator) "dev, " (*) "d" (identifier) "v, " (,) "f" (parameter_declaration) "oat* humidity) " (primitive_type) "oat* " (pointer_declarator) "humidity) " (*) "h" (identifier) "midity) " ()) "{" (compound_statement) " /* Variable for the read result */\n uint16_t ret = STEMMA_TOUCH_WORKING;\n /* Capacitance measurement can take some time */\n do {\n /* Read in 2 bytes */\n if(i2c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n }while(ret == STEMMA_TOUCH_WORKING);\n /* Copy the result */\n *humidity = (((float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) * 100.0;\n /* Return success */\n return STEMMA_RET_OK;\n}\n\n" ({) " " (comment) " Variable for the read result */\n " (declaration) "nt16_t ret = STEMMA_TOUCH_WORKING;\n " (primitive_type) "nt16_t r" (init_declarator) "t = STEMMA_TOUCH_WORKING;\n" (identifier) "t =" (=) "S" (identifier) "EMMA_TOUCH_WORKING;\n" (;) " " (comment) " Capacitance measurement can take some time */\n " (do_statement) " {\n /* Read in 2 bytes */\n if(i2c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n }while(ret == STEMMA_TOUCH_WORKING);\n " (do) " {" (compound_statement) " /* Read in 2 bytes */\n if(i2c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n }wh" ({) " " (comment) " Read in 2 bytes */\n " (if_statement) "(i2c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n " (if) "(i" (parenthesized_expression) "2c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) {" (() "2" (binary_expression) "c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) " (call_expression) "c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) !" (identifier) "c_read16_U16BE(d" (argument_list) "ev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) !" (() "e" (field_expression) "v->address, " (identifier) "v->" (->) "ad" (field_identifier) "dress, " (,) "(" (parenthesized_expression) "TEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), " (() "T" (binary_expression) "EMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8))," (identifier) "EMMA_TOUCH_BASE |" (|) "(" (parenthesized_expression) "TEMMA_TOUCH_CH0<<8))," (() "T" (binary_expression) "EMMA_TOUCH_CH0<<8))" (identifier) "EMMA_TOUCH_CH0<<" (<<) "8)" (number_literal) ")" ()) "," ()) " " (,) "&" (pointer_expression) "et) " (&) "e" (identifier) "t) " ()) "!" (!=) " I" (identifier) "C_RET_OK) " ()) "{" (compound_statement) " /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n " ({) " " (comment) " Reading failed */\n " (return_statement) "turn STEMMA_RET_ERROR;\n " (return) "turn S" (identifier) "EMMA_RET_ERROR;\n" (;) " " (}) " " (}) "h" (while) "ile(r" (parenthesized_expression) "et == STEMMA_TOUCH_WORKING);\n" (() "e" (binary_expression) "t == STEMMA_TOUCH_WORKING);" (identifier) "t =" (==) " S" (identifier) "EMMA_TOUCH_WORKING);" ()) "\n" (;) " " (comment) " Copy the result */\n " (expression_statement) "umidity = (((float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) * 100.0;\n " (assignment_expression) "umidity = (((float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) * 100.0;\n" (pointer_expression) "umidity =" (*) "u" (identifier) "midity =" (=) "(" (binary_expression) "(float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) * 100.0;\n" (parenthesized_expression) "(float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) *" (() "(" (binary_expression) "float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) " (parenthesized_expression) "float)ret - STEMMA_CAP_MIN) /" (() "f" (binary_expression) "loat)ret - STEMMA_CAP_MIN) " (cast_expression) "loat)ret -" (() "l" (type_descriptor) "oat)r" (primitive_type) "oat)r" ()) "e" (identifier) "t -" (-) "S" (identifier) "EMMA_CAP_MIN) " ()) "/" (/) "(" (parenthesized_expression) "TEMMA_CAP_MAX - STEMMA_CAP_MIN)) " (() "T" (binary_expression) "EMMA_CAP_MAX - STEMMA_CAP_MIN))" (identifier) "EMMA_CAP_MAX -" (-) "S" (identifier) "EMMA_CAP_MIN))" ()) " " ()) "*" (*) "1" (number_literal) "0.0;\n" (;) " " (comment) " Return success */\n " (return_statement) "turn STEMMA_RET_OK;\n}" (return) "turn S" (identifier) "EMMA_RET_OK;\n" (;) "}" (}) "\n" (comment) "!\n * Read the humidity of the sensor indicated by its capacitance and use\n * a floating average over a defined number of readings to smooth the value.\n * \n * @param[in] dev Device structure\n * @param[in] structure Floating average structure\n * @param[out] humidity Humidity in percent\n * @return OK in case of success; ERROR otherwise\n */\nS" (function_definition) "EMMA_RET_t stemma_get_humidity_avg(STEMMA_t* dev, STEMMA_AVG_t* structure, float* humidity) {\n /* Temporary variable for the sensor reading */\n float tmp;\n /* Temporary counter variable */\n uint8_t i = 0;\n /* Static variable for the value array index */\n static uint8_t index = 0;\n /* Get a new reading */\n STEMMA_RET_t ret = stemma_get_humidity(dev, &tmp);\n /* Check if the reading is valid */\n if(ret != STEMMA_RET_OK) {\n /* Something went wrong */\n return ret;\n }\n /* Check if it is the first reading */\n if(structure->empty == 0) {\n for(i=0; i<STEMMA_AVG_CNT; i++) {\n structure->value[i] = tmp;\n index = 1;\n }\n } else {\n /* There are other readings available already */\n structure->value[index] = tmp;\n /* Get new index */\n index = (index+1) % STEMMA_AVG_CNT;\n }\n /* Calculate average */\n double sum = 0;\n for(i=0; i<STEMMA_AVG_CNT; i++) {\n sum += structure->value[i];\n }\n sum /= STEMMA_AVG_CNT;\n /* Copy result to pointer location */\n *humidity = sum;\n /* Return with success */\n return STEMMA_RET_OK;\n}\n" (type_identifier) "EMMA_RET_t s" (function_declarator) "emma_get_humidity_avg(STEMMA_t* dev, STEMMA_AVG_t* structure, float* humidity) {" (identifier) "emma_get_humidity_avg(S" (parameter_list) "TEMMA_t* dev, STEMMA_AVG_t* structure, float* humidity) {" (() "T" (parameter_declaration) "EMMA_t* dev, " (type_identifier) "EMMA_t* " (pointer_declarator) "dev, " (*) "d" (identifier) "v, " (,) "S" (parameter_declaration) "EMMA_AVG_t* structure, " (type_identifier) "EMMA_AVG_t* " (pointer_declarator) "structure, " (*) "s" (identifier) "ructure, " (,) "f" (parameter_declaration) "oat* humidity) " (primitive_type) "oat* " (pointer_declarator) "humidity) " (*) "h" (identifier) "midity) " ()) "{" (compound_statement) " /* Temporary variable for the sensor reading */\n float tmp;\n /* Temporary counter variable */\n uint8_t i = 0;\n /* Static variable for the value array index */\n static uint8_t index = 0;\n /* Get a new reading */\n STEMMA_RET_t ret = stemma_get_humidity(dev, &tmp);\n /* Check if the reading is valid */\n if(ret != STEMMA_RET_OK) {\n /* Something went wrong */\n return ret;\n }\n /* Check if it is the first reading */\n if(structure->empty == 0) {\n for(i=0; i<STEMMA_AVG_CNT; i++) {\n structure->value[i] = tmp;\n index = 1;\n }\n } else {\n /* There are other readings available already */\n structure->value[index] = tmp;\n /* Get new index */\n index = (index+1) % STEMMA_AVG_CNT;\n }\n /* Calculate average */\n double sum = 0;\n for(i=0; i<STEMMA_AVG_CNT; i++) {\n sum += structure->value[i];\n }\n sum /= STEMMA_AVG_CNT;\n /* Copy result to pointer location */\n *humidity = sum;\n /* Return with success */\n return STEMMA_RET_OK;\n}\n" ({) " " (comment) " Temporary variable for the sensor reading */\n " (declaration) "oat tmp;\n " (primitive_type) "oat t" (identifier) "p;\n" (;) " " (comment) " Temporary counter variable */\n " (declaration) "nt8_t i = 0;\n " (primitive_type) "nt8_t i" (init_declarator) "= 0;\n" (identifier) "=" (=) "0" (number_literal) "\n" (;) " " (comment) " Static variable for the value array index */\n " (declaration) "atic uint8_t index = 0;\n " (storage_class_specifier) "atic u" (static) "atic u" (primitive_type) "nt8_t i" (init_declarator) "dex = 0;\n" (identifier) "dex =" (=) "0" (number_literal) "\n" (;) " " (comment) " Get a new reading */\n " (declaration) "EMMA_RET_t ret = stemma_get_humidity(dev, &tmp);\n " (type_identifier) "EMMA_RET_t r" (init_declarator) "t = stemma_get_humidity(dev, &tmp);\n" (identifier) "t =" (=) "s" (call_expression) "emma_get_humidity(dev, &tmp);\n" (identifier) "emma_get_humidity(d" (argument_list) "ev, &tmp);\n" (() "e" (identifier) "v, " (,) "&" (pointer_expression) "mp);" (&) "m" (identifier) "p);" ()) "\n" (;) " " (comment) " Check if the reading is valid */\n " (if_statement) "(ret != STEMMA_RET_OK) {\n /* Something went wrong */\n return ret;\n }\n " (if) "(r" (parenthesized_expression) "et != STEMMA_RET_OK) {" (() "e" (binary_expression) "t != STEMMA_RET_OK) " (identifier) "t !" (!=) " S" (identifier) "EMMA_RET_OK) " ()) "{" (compound_statement) " /* Something went wrong */\n return ret;\n }\n " ({) " " (comment) " Something went wrong */\n " (return_statement) "turn ret;\n " (return) "turn r" (identifier) "t;\n" (;) " " (}) " " (comment) " Check if it is the first reading */\n " (if_statement) "(structure->empty == 0) {\n for(i=0; i<STEMMA_AVG_CNT; i++) {\n structure->value[i] = tmp;\n index = 1;\n }\n } else {\n /* There are other readings available already */\n structure->value[index] = tmp;\n /* Get new index */\n index = (index+1) % STEMMA_AVG_CNT;\n }\n " (if) "(s" (parenthesized_expression) "tructure->empty == 0) {" (() "t" (binary_expression) "ructure->empty == 0) " (field_expression) "ructure->empty =" (identifier) "ructure->" (->) "em" (field_identifier) "pty =" (==) " 0" (number_literal) " " ()) "{" (compound_statement) " for(i=0; i<STEMMA_AVG_CNT; i++) {\n structure->value[i] = tmp;\n index = 1;\n }\n } e" ({) " " (for_statement) "r(i=0; i<STEMMA_AVG_CNT; i++) {\n structure->value[i] = tmp;\n index = 1;\n }\n " (for) "r(i" (() "=" (assignment_expression) "0; " (identifier) "0" (=) ";" (number_literal) " " (;) "i" (binary_expression) "STEMMA_AVG_CNT; " (identifier) "S" (<) "T" (identifier) "EMMA_AVG_CNT; " (;) "i" (update_expression) "+) " (identifier) "+" (++) ") " ()) "{" (compound_statement) " structure->value[i] = tmp;\n index = 1;\n }\n " ({) " " (expression_statement) "ructure->value[i] = tmp;\n " (assignment_expression) "ructure->value[i] = tmp;\n" (subscript_expression) "ructure->value[i] =" (field_expression) "ructure->value[i" (identifier) "ructure->" (->) "va" (field_identifier) "lue[i" ([) "]" (identifier) " " (]) "=" (=) "t" (identifier) "p;\n" (;) " " (expression_statement) "dex = 1;\n " (assignment_expression) "dex = 1;\n" (identifier) "dex =" (=) "1" (number_literal) "\n" (;) " " (}) " " (}) "e" (else_clause) "se {\n /* There are other readings available already */\n structure->value[index] = tmp;\n /* Get new index */\n index = (index+1) % STEMMA_AVG_CNT;\n }\n " (else) "se {" (compound_statement) " /* There are other readings available already */\n structure->value[index] = tmp;\n /* Get new index */\n index = (index+1) % STEMMA_AVG_CNT;\n }\n " ({) " " (comment) " There are other readings available already */\n " (expression_statement) "ructure->value[index] = tmp;\n " (assignment_expression) "ructure->value[index] = tmp;\n" (subscript_expression) "ructure->value[index] =" (field_expression) "ructure->value[i" (identifier) "ructure->" (->) "va" (field_identifier) "lue[i" ([) "n" (identifier) "dex] " (]) "=" (=) "t" (identifier) "p;\n" (;) " " (comment) " Get new index */\n " (expression_statement) "dex = (index+1) % STEMMA_AVG_CNT;\n " (assignment_expression) "dex = (index+1) % STEMMA_AVG_CNT;\n" (identifier) "dex =" (=) "(" (binary_expression) "ndex+1) % STEMMA_AVG_CNT;\n" (parenthesized_expression) "ndex+1) %" (() "n" (binary_expression) "dex+1) " (identifier) "dex+1" (+) ")" (number_literal) " " ()) "%" (%) "S" (identifier) "EMMA_AVG_CNT;\n" (;) " " (}) " " (comment) " Calculate average */\n " (declaration) "uble sum = 0;\n " (primitive_type) "uble s" (init_declarator) "m = 0;\n" (identifier) "m =" (=) "0" (number_literal) "\n" (;) " " (for_statement) "r(i=0; i<STEMMA_AVG_CNT; i++) {\n sum += structure->value[i];\n }\n " (for) "r(i" (() "=" (assignment_expression) "0; " (identifier) "0" (=) ";" (number_literal) " " (;) "i" (binary_expression) "STEMMA_AVG_CNT; " (identifier) "S" (<) "T" (identifier) "EMMA_AVG_CNT; " (;) "i" (update_expression) "+) " (identifier) "+" (++) ") " ()) "{" (compound_statement) " sum += structure->value[i];\n }\n " ({) " " (expression_statement) "m += structure->value[i];\n " (assignment_expression) "m += structure->value[i];\n" (identifier) "m +" (+=) " s" (subscript_expression) "ructure->value[i];\n" (field_expression) "ructure->value[i" (identifier) "ructure->" (->) "va" (field_identifier) "lue[i" ([) "]" (identifier) ";" (]) "\n" (;) " " (}) " " (expression_statement) "m /= STEMMA_AVG_CNT;\n " (assignment_expression) "m /= STEMMA_AVG_CNT;\n" (identifier) "m /" (/=) " S" (identifier) "EMMA_AVG_CNT;\n" (;) " " (comment) " Copy result to pointer location */\n " (expression_statement) "umidity = sum;\n " (assignment_expression) "umidity = sum;\n" (pointer_expression) "umidity =" (*) "u" (identifier) "midity =" (=) "s" (identifier) "m;\n" (;) " " (comment) " Return with success */\n " (return_statement) "turn STEMMA_RET_OK;\n}" (return) "turn S" (identifier) "EMMA_RET_OK;\n" (;) "}" (}) ""
783
0
{"language": "c", "success": true, "metadata": {"lines": 152, "avg_line_length": 33.64, "nodes": 451, "errors": 0, "source_hash": "959b58ead3a28cf22980ac6b84e3a37a2bfa90bb08012c121434292585378e3b", "categorized_nodes": 324}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"stemma_soil.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"stemma_soil.h\"", "parent": 0, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 24}}, {"id": 3, "type": "function_definition", "text": "STEMMA_RET_t stemma_init(STEMMA_t* dev, uint8_t address) {\n /* Check if the device is available */\n if(i2c_is_available(address) == I2C_RET_OK) {\n /* Device is available ... store address in device structure */\n dev->address = address;\n /* Return OK */\n return STEMMA_RET_OK;\n } else {\n /* Return ERROR */\n return STEMMA_RET_ERROR_NODEV;\n }\n}", "parent": null, "children": [4, 5], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 4, "type": "type_identifier", "text": "STEMMA_RET_t", "parent": 3, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 12}}, {"id": 5, "type": "function_declarator", "text": "stemma_init(STEMMA_t* dev, uint8_t address)", "parent": 3, "children": [6, 7], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 56}}, {"id": 6, "type": "identifier", "text": "stemma_init", "parent": 5, "children": [], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 24}}, {"id": 7, "type": "parameter_list", "text": "(STEMMA_t* dev, uint8_t address)", "parent": 5, "children": [8, 13], "start_point": {"row": 26, "column": 24}, "end_point": {"row": 26, "column": 56}}, {"id": 8, "type": "parameter_declaration", "text": "STEMMA_t* dev", "parent": 7, "children": [9, 10], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 38}}, {"id": 9, "type": "type_identifier", "text": "STEMMA_t", "parent": 8, "children": [], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 33}}, {"id": 10, "type": "pointer_declarator", "text": "* dev", "parent": 8, "children": [11, 12], "start_point": {"row": 26, "column": 33}, "end_point": {"row": 26, "column": 38}}, {"id": 11, "type": "*", "text": "*", "parent": 10, "children": [], "start_point": {"row": 26, "column": 33}, "end_point": {"row": 26, "column": 34}}, {"id": 12, "type": "identifier", "text": "dev", "parent": 10, "children": [], "start_point": {"row": 26, "column": 35}, "end_point": {"row": 26, "column": 38}}, {"id": 13, "type": "parameter_declaration", "text": "uint8_t address", "parent": 7, "children": [14, 15], "start_point": {"row": 26, "column": 40}, "end_point": {"row": 26, "column": 55}}, {"id": 14, "type": "primitive_type", "text": "uint8_t", "parent": 13, "children": [], "start_point": {"row": 26, "column": 40}, "end_point": {"row": 26, "column": 47}}, {"id": 15, "type": "identifier", "text": "address", "parent": 13, "children": [], "start_point": {"row": 26, "column": 48}, "end_point": {"row": 26, "column": 55}}, {"id": 16, "type": "if_statement", "text": "if(i2c_is_available(address) == I2C_RET_OK) {\n /* Device is available ... store address in device structure */\n dev->address = address;\n /* Return OK */\n return STEMMA_RET_OK;\n } else {\n /* Return ERROR */\n return STEMMA_RET_ERROR_NODEV;\n }", "parent": 3, "children": [17, 33], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 36, "column": 4}}, {"id": 17, "type": "parenthesized_expression", "text": "(i2c_is_available(address) == I2C_RET_OK)", "parent": 16, "children": [18], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 46}}, {"id": 18, "type": "binary_expression", "text": "i2c_is_available(address) == I2C_RET_OK", "parent": 17, "children": [19, 23, 24], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 45}}, {"id": 19, "type": "call_expression", "text": "i2c_is_available(address)", "parent": 18, "children": [20, 21], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 31}}, {"id": 20, "type": "identifier", "text": "i2c_is_available", "parent": 19, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 22}}, {"id": 21, "type": "argument_list", "text": "(address)", "parent": 19, "children": [22], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 31}}, {"id": 22, "type": "identifier", "text": "address", "parent": 21, "children": [], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 30}}, {"id": 23, "type": "==", "text": "==", "parent": 18, "children": [], "start_point": {"row": 28, "column": 32}, "end_point": {"row": 28, "column": 34}}, {"id": 24, "type": "identifier", "text": "I2C_RET_OK", "parent": 18, "children": [], "start_point": {"row": 28, "column": 35}, "end_point": {"row": 28, "column": 45}}, {"id": 25, "type": "assignment_expression", "text": "dev->address = address", "parent": 16, "children": [26, 29, 30], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 30}}, {"id": 26, "type": "field_expression", "text": "dev->address", "parent": 25, "children": [27, 28], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 20}}, {"id": 27, "type": "identifier", "text": "dev", "parent": 26, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 11}}, {"id": 28, "type": "field_identifier", "text": "address", "parent": 26, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 20}}, {"id": 29, "type": "=", "text": "=", "parent": 25, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 22}}, {"id": 30, "type": "identifier", "text": "address", "parent": 25, "children": [], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 30}}, {"id": 31, "type": "return_statement", "text": "return STEMMA_RET_OK;", "parent": 16, "children": [32], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 29}}, {"id": 32, "type": "identifier", "text": "STEMMA_RET_OK", "parent": 31, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 28}}, {"id": 33, "type": "else_clause", "text": "else {\n /* Return ERROR */\n return STEMMA_RET_ERROR_NODEV;\n }", "parent": 16, "children": [], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 36, "column": 4}}, {"id": 34, "type": "return_statement", "text": "return STEMMA_RET_ERROR_NODEV;", "parent": 33, "children": [35], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 38}}, {"id": 35, "type": "identifier", "text": "STEMMA_RET_ERROR_NODEV", "parent": 34, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 37}}, {"id": 36, "type": "function_definition", "text": "STEMMA_RET_t stemma_get_version(STEMMA_t* dev, uint32_t* version) {\n /* Variable for the read result */\n uint8_t res[4] = {0};\n /* Read in 4 bytes */\n if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n /* Copy the result */\n *version = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n /* Return success */\n return STEMMA_RET_OK;\n}", "parent": null, "children": [37, 38], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 60, "column": 1}}, {"id": 37, "type": "type_identifier", "text": "STEMMA_RET_t", "parent": 36, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 12}}, {"id": 38, "type": "function_declarator", "text": "stemma_get_version(STEMMA_t* dev, uint32_t* version)", "parent": 36, "children": [39, 40], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 65}}, {"id": 39, "type": "identifier", "text": "stemma_get_version", "parent": 38, "children": [], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 31}}, {"id": 40, "type": "parameter_list", "text": "(STEMMA_t* dev, uint32_t* version)", "parent": 38, "children": [41, 46], "start_point": {"row": 48, "column": 31}, "end_point": {"row": 48, "column": 65}}, {"id": 41, "type": "parameter_declaration", "text": "STEMMA_t* dev", "parent": 40, "children": [42, 43], "start_point": {"row": 48, "column": 32}, "end_point": {"row": 48, "column": 45}}, {"id": 42, "type": "type_identifier", "text": "STEMMA_t", "parent": 41, "children": [], "start_point": {"row": 48, "column": 32}, "end_point": {"row": 48, "column": 40}}, {"id": 43, "type": "pointer_declarator", "text": "* dev", "parent": 41, "children": [44, 45], "start_point": {"row": 48, "column": 40}, "end_point": {"row": 48, "column": 45}}, {"id": 44, "type": "*", "text": "*", "parent": 43, "children": [], "start_point": {"row": 48, "column": 40}, "end_point": {"row": 48, "column": 41}}, {"id": 45, "type": "identifier", "text": "dev", "parent": 43, "children": [], "start_point": {"row": 48, "column": 42}, "end_point": {"row": 48, "column": 45}}, {"id": 46, "type": "parameter_declaration", "text": "uint32_t* version", "parent": 40, "children": [47, 48], "start_point": {"row": 48, "column": 47}, "end_point": {"row": 48, "column": 64}}, {"id": 47, "type": "primitive_type", "text": "uint32_t", "parent": 46, "children": [], "start_point": {"row": 48, "column": 47}, "end_point": {"row": 48, "column": 55}}, {"id": 48, "type": "pointer_declarator", "text": "* version", "parent": 46, "children": [49, 50], "start_point": {"row": 48, "column": 55}, "end_point": {"row": 48, "column": 64}}, {"id": 49, "type": "*", "text": "*", "parent": 48, "children": [], "start_point": {"row": 48, "column": 55}, "end_point": {"row": 48, "column": 56}}, {"id": 50, "type": "identifier", "text": "version", "parent": 48, "children": [], "start_point": {"row": 48, "column": 57}, "end_point": {"row": 48, "column": 64}}, {"id": 51, "type": "declaration", "text": "uint8_t res[4] = {0};", "parent": 36, "children": [52, 53], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 25}}, {"id": 52, "type": "primitive_type", "text": "uint8_t", "parent": 51, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 11}}, {"id": 53, "type": "init_declarator", "text": "res[4] = {0}", "parent": 51, "children": [54, 57, 58], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 24}}, {"id": 54, "type": "array_declarator", "text": "res[4]", "parent": 53, "children": [55, 56], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 18}}, {"id": 55, "type": "identifier", "text": "res", "parent": 54, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 15}}, {"id": 56, "type": "number_literal", "text": "4", "parent": 54, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 17}}, {"id": 57, "type": "=", "text": "=", "parent": 53, "children": [], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 20}}, {"id": 58, "type": "initializer_list", "text": "{0}", "parent": 53, "children": [59], "start_point": {"row": 50, "column": 21}, "end_point": {"row": 50, "column": 24}}, {"id": 59, "type": "number_literal", "text": "0", "parent": 58, "children": [], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 23}}, {"id": 60, "type": "if_statement", "text": "if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }", "parent": 36, "children": [61], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 55, "column": 5}}, {"id": 61, "type": "parenthesized_expression", "text": "(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4) != I2C_RET_OK)", "parent": 60, "children": [62], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 111}}, {"id": 62, "type": "binary_expression", "text": "i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4) != I2C_RET_OK", "parent": 61, "children": [63, 79, 80], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 110}}, {"id": 63, "type": "call_expression", "text": "i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4)", "parent": 62, "children": [64, 65], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 96}}, {"id": 64, "type": "identifier", "text": "i2c_read16_block", "parent": 63, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 23}}, {"id": 65, "type": "argument_list", "text": "(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4)", "parent": 63, "children": [66, 69, 77, 78], "start_point": {"row": 52, "column": 23}, "end_point": {"row": 52, "column": 96}}, {"id": 66, "type": "field_expression", "text": "dev->address", "parent": 65, "children": [67, 68], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 36}}, {"id": 67, "type": "identifier", "text": "dev", "parent": 66, "children": [], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 27}}, {"id": 68, "type": "field_identifier", "text": "address", "parent": 66, "children": [], "start_point": {"row": 52, "column": 29}, "end_point": {"row": 52, "column": 36}}, {"id": 69, "type": "parenthesized_expression", "text": "(STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8))", "parent": 65, "children": [70], "start_point": {"row": 52, "column": 38}, "end_point": {"row": 52, "column": 87}}, {"id": 70, "type": "binary_expression", "text": "STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)", "parent": 69, "children": [71, 72], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 86}}, {"id": 71, "type": "identifier", "text": "STEMMA_STATUS_BASE", "parent": 70, "children": [], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 57}}, {"id": 72, "type": "parenthesized_expression", "text": "(STEMMA_STATUS_VERSION<<8)", "parent": 70, "children": [73], "start_point": {"row": 52, "column": 60}, "end_point": {"row": 52, "column": 86}}, {"id": 73, "type": "binary_expression", "text": "STEMMA_STATUS_VERSION<<8", "parent": 72, "children": [74, 75, 76], "start_point": {"row": 52, "column": 61}, "end_point": {"row": 52, "column": 85}}, {"id": 74, "type": "identifier", "text": "STEMMA_STATUS_VERSION", "parent": 73, "children": [], "start_point": {"row": 52, "column": 61}, "end_point": {"row": 52, "column": 82}}, {"id": 75, "type": "<<", "text": "<<", "parent": 73, "children": [], "start_point": {"row": 52, "column": 82}, "end_point": {"row": 52, "column": 84}}, {"id": 76, "type": "number_literal", "text": "8", "parent": 73, "children": [], "start_point": {"row": 52, "column": 84}, "end_point": {"row": 52, "column": 85}}, {"id": 77, "type": "identifier", "text": "res", "parent": 65, "children": [], "start_point": {"row": 52, "column": 89}, "end_point": {"row": 52, "column": 92}}, {"id": 78, "type": "number_literal", "text": "4", "parent": 65, "children": [], "start_point": {"row": 52, "column": 94}, "end_point": {"row": 52, "column": 95}}, {"id": 79, "type": "!=", "text": "!=", "parent": 62, "children": [], "start_point": {"row": 52, "column": 97}, "end_point": {"row": 52, "column": 99}}, {"id": 80, "type": "identifier", "text": "I2C_RET_OK", "parent": 62, "children": [], "start_point": {"row": 52, "column": 100}, "end_point": {"row": 52, "column": 110}}, {"id": 81, "type": "return_statement", "text": "return STEMMA_RET_ERROR;", "parent": 60, "children": [82], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 32}}, {"id": 82, "type": "identifier", "text": "STEMMA_RET_ERROR", "parent": 81, "children": [], "start_point": {"row": 54, "column": 15}, "end_point": {"row": 54, "column": 31}}, {"id": 83, "type": "assignment_expression", "text": "*version = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3]", "parent": 36, "children": [84, 87, 88], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 111}}, {"id": 84, "type": "pointer_expression", "text": "*version", "parent": 83, "children": [85, 86], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 12}}, {"id": 85, "type": "*", "text": "*", "parent": 84, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 5}}, {"id": 86, "type": "identifier", "text": "version", "parent": 84, "children": [], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 12}}, {"id": 87, "type": "=", "text": "=", "parent": 83, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 14}}, {"id": 88, "type": "binary_expression", "text": "((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3]", "parent": 83, "children": [89, 121], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 111}}, {"id": 89, "type": "binary_expression", "text": "((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8)", "parent": 88, "children": [90, 111], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 92}}, {"id": 90, "type": "binary_expression", "text": "((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16)", "parent": 89, "children": [91, 101], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 66}}, {"id": 91, "type": "parenthesized_expression", "text": "((uint32_t)res[0] << 24)", "parent": 90, "children": [92], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 39}}, {"id": 92, "type": "binary_expression", "text": "(uint32_t)res[0] << 24", "parent": 91, "children": [93, 99, 100], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 38}}, {"id": 93, "type": "cast_expression", "text": "(uint32_t)res[0]", "parent": 92, "children": [94, 96], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 32}}, {"id": 94, "type": "type_descriptor", "text": "uint32_t", "parent": 93, "children": [95], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 25}}, {"id": 95, "type": "primitive_type", "text": "uint32_t", "parent": 94, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 25}}, {"id": 96, "type": "subscript_expression", "text": "res[0]", "parent": 93, "children": [97, 98], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 32}}, {"id": 97, "type": "identifier", "text": "res", "parent": 96, "children": [], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 29}}, {"id": 98, "type": "number_literal", "text": "0", "parent": 96, "children": [], "start_point": {"row": 57, "column": 30}, "end_point": {"row": 57, "column": 31}}, {"id": 99, "type": "<<", "text": "<<", "parent": 92, "children": [], "start_point": {"row": 57, "column": 33}, "end_point": {"row": 57, "column": 35}}, {"id": 100, "type": "number_literal", "text": "24", "parent": 92, "children": [], "start_point": {"row": 57, "column": 36}, "end_point": {"row": 57, "column": 38}}, {"id": 101, "type": "parenthesized_expression", "text": "((uint32_t)res[1] << 16)", "parent": 90, "children": [102], "start_point": {"row": 57, "column": 42}, "end_point": {"row": 57, "column": 66}}, {"id": 102, "type": "binary_expression", "text": "(uint32_t)res[1] << 16", "parent": 101, "children": [103, 109, 110], "start_point": {"row": 57, "column": 43}, "end_point": {"row": 57, "column": 65}}, {"id": 103, "type": "cast_expression", "text": "(uint32_t)res[1]", "parent": 102, "children": [104, 106], "start_point": {"row": 57, "column": 43}, "end_point": {"row": 57, "column": 59}}, {"id": 104, "type": "type_descriptor", "text": "uint32_t", "parent": 103, "children": [105], "start_point": {"row": 57, "column": 44}, "end_point": {"row": 57, "column": 52}}, {"id": 105, "type": "primitive_type", "text": "uint32_t", "parent": 104, "children": [], "start_point": {"row": 57, "column": 44}, "end_point": {"row": 57, "column": 52}}, {"id": 106, "type": "subscript_expression", "text": "res[1]", "parent": 103, "children": [107, 108], "start_point": {"row": 57, "column": 53}, "end_point": {"row": 57, "column": 59}}, {"id": 107, "type": "identifier", "text": "res", "parent": 106, "children": [], "start_point": {"row": 57, "column": 53}, "end_point": {"row": 57, "column": 56}}, {"id": 108, "type": "number_literal", "text": "1", "parent": 106, "children": [], "start_point": {"row": 57, "column": 57}, "end_point": {"row": 57, "column": 58}}, {"id": 109, "type": "<<", "text": "<<", "parent": 102, "children": [], "start_point": {"row": 57, "column": 60}, "end_point": {"row": 57, "column": 62}}, {"id": 110, "type": "number_literal", "text": "16", "parent": 102, "children": [], "start_point": {"row": 57, "column": 63}, "end_point": {"row": 57, "column": 65}}, {"id": 111, "type": "parenthesized_expression", "text": "((uint32_t)res[2] << 8)", "parent": 89, "children": [112], "start_point": {"row": 57, "column": 69}, "end_point": {"row": 57, "column": 92}}, {"id": 112, "type": "binary_expression", "text": "(uint32_t)res[2] << 8", "parent": 111, "children": [113, 119, 120], "start_point": {"row": 57, "column": 70}, "end_point": {"row": 57, "column": 91}}, {"id": 113, "type": "cast_expression", "text": "(uint32_t)res[2]", "parent": 112, "children": [114, 116], "start_point": {"row": 57, "column": 70}, "end_point": {"row": 57, "column": 86}}, {"id": 114, "type": "type_descriptor", "text": "uint32_t", "parent": 113, "children": [115], "start_point": {"row": 57, "column": 71}, "end_point": {"row": 57, "column": 79}}, {"id": 115, "type": "primitive_type", "text": "uint32_t", "parent": 114, "children": [], "start_point": {"row": 57, "column": 71}, "end_point": {"row": 57, "column": 79}}, {"id": 116, "type": "subscript_expression", "text": "res[2]", "parent": 113, "children": [117, 118], "start_point": {"row": 57, "column": 80}, "end_point": {"row": 57, "column": 86}}, {"id": 117, "type": "identifier", "text": "res", "parent": 116, "children": [], "start_point": {"row": 57, "column": 80}, "end_point": {"row": 57, "column": 83}}, {"id": 118, "type": "number_literal", "text": "2", "parent": 116, "children": [], "start_point": {"row": 57, "column": 84}, "end_point": {"row": 57, "column": 85}}, {"id": 119, "type": "<<", "text": "<<", "parent": 112, "children": [], "start_point": {"row": 57, "column": 87}, "end_point": {"row": 57, "column": 89}}, {"id": 120, "type": "number_literal", "text": "8", "parent": 112, "children": [], "start_point": {"row": 57, "column": 90}, "end_point": {"row": 57, "column": 91}}, {"id": 121, "type": "cast_expression", "text": "(uint32_t)res[3]", "parent": 88, "children": [122, 124], "start_point": {"row": 57, "column": 95}, "end_point": {"row": 57, "column": 111}}, {"id": 122, "type": "type_descriptor", "text": "uint32_t", "parent": 121, "children": [123], "start_point": {"row": 57, "column": 96}, "end_point": {"row": 57, "column": 104}}, {"id": 123, "type": "primitive_type", "text": "uint32_t", "parent": 122, "children": [], "start_point": {"row": 57, "column": 96}, "end_point": {"row": 57, "column": 104}}, {"id": 124, "type": "subscript_expression", "text": "res[3]", "parent": 121, "children": [125, 126], "start_point": {"row": 57, "column": 105}, "end_point": {"row": 57, "column": 111}}, {"id": 125, "type": "identifier", "text": "res", "parent": 124, "children": [], "start_point": {"row": 57, "column": 105}, "end_point": {"row": 57, "column": 108}}, {"id": 126, "type": "number_literal", "text": "3", "parent": 124, "children": [], "start_point": {"row": 57, "column": 109}, "end_point": {"row": 57, "column": 110}}, {"id": 127, "type": "return_statement", "text": "return STEMMA_RET_OK;", "parent": 36, "children": [128], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 25}}, {"id": 128, "type": "identifier", "text": "STEMMA_RET_OK", "parent": 127, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 24}}, {"id": 129, "type": "function_definition", "text": "EMMA_RET_t stemma_get_temperature(STEMMA_t* dev, float* temperature) {\n /* Variable for the read result */\n uint8_t res[4] = {0};\n /* Read in 4 bytes */\n if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n /* Get intermediate result */\n uint32_t ret = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n /* Copy the result */\n *temperature = (1.0 / (1UL << 16)) * (float)ret;\n /* Return success */\n return STEMMA_RET_OK;\n}\n\n", "parent": null, "children": [130, 131], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 84, "column": 1}}, {"id": 130, "type": "type_identifier", "text": "EMMA_RET_t s", "parent": 129, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 12}}, {"id": 131, "type": "function_declarator", "text": "emma_get_temperature(STEMMA_t* dev, float* temperature) {", "parent": 129, "children": [132, 133], "start_point": {"row": 70, "column": 13}, "end_point": {"row": 70, "column": 70}}, {"id": 132, "type": "identifier", "text": "emma_get_temperature(S", "parent": 131, "children": [], "start_point": {"row": 70, "column": 13}, "end_point": {"row": 70, "column": 35}}, {"id": 133, "type": "parameter_list", "text": "TEMMA_t* dev, float* temperature) {", "parent": 131, "children": [134, 139], "start_point": {"row": 70, "column": 35}, "end_point": {"row": 70, "column": 70}}, {"id": 134, "type": "parameter_declaration", "text": "EMMA_t* dev, ", "parent": 133, "children": [135, 136], "start_point": {"row": 70, "column": 36}, "end_point": {"row": 70, "column": 49}}, {"id": 135, "type": "type_identifier", "text": "EMMA_t* ", "parent": 134, "children": [], "start_point": {"row": 70, "column": 36}, "end_point": {"row": 70, "column": 44}}, {"id": 136, "type": "pointer_declarator", "text": "dev, ", "parent": 134, "children": [137, 138], "start_point": {"row": 70, "column": 44}, "end_point": {"row": 70, "column": 49}}, {"id": 137, "type": "*", "text": "d", "parent": 136, "children": [], "start_point": {"row": 70, "column": 44}, "end_point": {"row": 70, "column": 45}}, {"id": 138, "type": "identifier", "text": "v, ", "parent": 136, "children": [], "start_point": {"row": 70, "column": 46}, "end_point": {"row": 70, "column": 49}}, {"id": 139, "type": "parameter_declaration", "text": "oat* temperature) ", "parent": 133, "children": [140, 141], "start_point": {"row": 70, "column": 51}, "end_point": {"row": 70, "column": 69}}, {"id": 140, "type": "primitive_type", "text": "oat* ", "parent": 139, "children": [], "start_point": {"row": 70, "column": 51}, "end_point": {"row": 70, "column": 56}}, {"id": 141, "type": "pointer_declarator", "text": "temperature) ", "parent": 139, "children": [142, 143], "start_point": {"row": 70, "column": 56}, "end_point": {"row": 70, "column": 69}}, {"id": 142, "type": "*", "text": "t", "parent": 141, "children": [], "start_point": {"row": 70, "column": 56}, "end_point": {"row": 70, "column": 57}}, {"id": 143, "type": "identifier", "text": "mperature) ", "parent": 141, "children": [], "start_point": {"row": 70, "column": 58}, "end_point": {"row": 70, "column": 69}}, {"id": 144, "type": "declaration", "text": "nt8_t res[4] = {0};\n ", "parent": 129, "children": [145, 146], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 25}}, {"id": 145, "type": "primitive_type", "text": "nt8_t r", "parent": 144, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 11}}, {"id": 146, "type": "init_declarator", "text": "s[4] = {0};\n", "parent": 144, "children": [147, 150], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 24}}, {"id": 147, "type": "array_declarator", "text": "s[4] =", "parent": 146, "children": [148, 149], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 18}}, {"id": 148, "type": "identifier", "text": "s[4", "parent": 147, "children": [], "start_point": {"row": 72, "column": 12}, "end_point": {"row": 72, "column": 15}}, {"id": 149, "type": "number_literal", "text": " ", "parent": 147, "children": [], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 17}}, {"id": 150, "type": "initializer_list", "text": "};\n", "parent": 146, "children": [], "start_point": {"row": 72, "column": 21}, "end_point": {"row": 72, "column": 24}}, {"id": 151, "type": "if_statement", "text": "(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n ", "parent": 129, "children": [152], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 77, "column": 5}}, {"id": 152, "type": "parenthesized_expression", "text": "2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) != I2C_RET_OK) {", "parent": 151, "children": [153], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 108}}, {"id": 153, "type": "binary_expression", "text": "c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) != I2C_RET_OK) ", "parent": 152, "children": [154, 170, 171], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 107}}, {"id": 154, "type": "call_expression", "text": "c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) !", "parent": 153, "children": [155, 156], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 93}}, {"id": 155, "type": "identifier", "text": "c_read16_block(d", "parent": 154, "children": [], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 23}}, {"id": 156, "type": "argument_list", "text": "ev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) !", "parent": 154, "children": [157, 161, 168, 169], "start_point": {"row": 74, "column": 23}, "end_point": {"row": 74, "column": 93}}, {"id": 157, "type": "field_expression", "text": "v->address, ", "parent": 156, "children": [158, 159, 160], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 36}}, {"id": 158, "type": "identifier", "text": "v->", "parent": 157, "children": [], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 27}}, {"id": 159, "type": "->", "text": "ad", "parent": 157, "children": [], "start_point": {"row": 74, "column": 27}, "end_point": {"row": 74, "column": 29}}, {"id": 160, "type": "field_identifier", "text": "dress, ", "parent": 157, "children": [], "start_point": {"row": 74, "column": 29}, "end_point": {"row": 74, "column": 36}}, {"id": 161, "type": "parenthesized_expression", "text": "TEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), ", "parent": 156, "children": [162], "start_point": {"row": 74, "column": 38}, "end_point": {"row": 74, "column": 84}}, {"id": 162, "type": "binary_expression", "text": "EMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)),", "parent": 161, "children": [163, 164], "start_point": {"row": 74, "column": 39}, "end_point": {"row": 74, "column": 83}}, {"id": 163, "type": "identifier", "text": "EMMA_STATUS_BASE |", "parent": 162, "children": [], "start_point": {"row": 74, "column": 39}, "end_point": {"row": 74, "column": 57}}, {"id": 164, "type": "parenthesized_expression", "text": "TEMMA_STATUS_TEMP<<8)),", "parent": 162, "children": [165], "start_point": {"row": 74, "column": 60}, "end_point": {"row": 74, "column": 83}}, {"id": 165, "type": "binary_expression", "text": "EMMA_STATUS_TEMP<<8))", "parent": 164, "children": [166, 167], "start_point": {"row": 74, "column": 61}, "end_point": {"row": 74, "column": 82}}, {"id": 166, "type": "identifier", "text": "EMMA_STATUS_TEMP<<", "parent": 165, "children": [], "start_point": {"row": 74, "column": 61}, "end_point": {"row": 74, "column": 79}}, {"id": 167, "type": "<<", "text": "8)", "parent": 165, "children": [], "start_point": {"row": 74, "column": 79}, "end_point": {"row": 74, "column": 81}}, {"id": 168, "type": "identifier", "text": "s, ", "parent": 156, "children": [], "start_point": {"row": 74, "column": 86}, "end_point": {"row": 74, "column": 89}}, {"id": 169, "type": "number_literal", "text": " ", "parent": 156, "children": [], "start_point": {"row": 74, "column": 91}, "end_point": {"row": 74, "column": 92}}, {"id": 170, "type": "!=", "text": " I", "parent": 153, "children": [], "start_point": {"row": 74, "column": 94}, "end_point": {"row": 74, "column": 96}}, {"id": 171, "type": "identifier", "text": "C_RET_OK) ", "parent": 153, "children": [], "start_point": {"row": 74, "column": 97}, "end_point": {"row": 74, "column": 107}}, {"id": 172, "type": "return_statement", "text": "turn STEMMA_RET_ERROR;\n ", "parent": 151, "children": [173], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 32}}, {"id": 173, "type": "identifier", "text": "EMMA_RET_ERROR;\n", "parent": 172, "children": [], "start_point": {"row": 76, "column": 15}, "end_point": {"row": 76, "column": 31}}, {"id": 174, "type": "declaration", "text": "nt32_t ret = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n ", "parent": 129, "children": [175, 176], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 116}}, {"id": 175, "type": "primitive_type", "text": "nt32_t r", "parent": 174, "children": [], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 12}}, {"id": 176, "type": "init_declarator", "text": "t = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n", "parent": 174, "children": [177, 178], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 115}}, {"id": 177, "type": "identifier", "text": "t =", "parent": 176, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 16}}, {"id": 178, "type": "binary_expression", "text": "uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n", "parent": 176, "children": [179, 209], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 115}}, {"id": 179, "type": "binary_expression", "text": "uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) |", "parent": 178, "children": [180, 199], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 96}}, {"id": 180, "type": "binary_expression", "text": "uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) |", "parent": 179, "children": [181, 190], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 70}}, {"id": 181, "type": "parenthesized_expression", "text": "uint32_t)res[0] << 24) |", "parent": 180, "children": [182], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 43}}, {"id": 182, "type": "binary_expression", "text": "int32_t)res[0] << 24) ", "parent": 181, "children": [183, 189], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 42}}, {"id": 183, "type": "cast_expression", "text": "int32_t)res[0] <", "parent": 182, "children": [184, 186], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 36}}, {"id": 184, "type": "type_descriptor", "text": "nt32_t)r", "parent": 183, "children": [185], "start_point": {"row": 79, "column": 21}, "end_point": {"row": 79, "column": 29}}, {"id": 185, "type": "primitive_type", "text": "nt32_t)r", "parent": 184, "children": [], "start_point": {"row": 79, "column": 21}, "end_point": {"row": 79, "column": 29}}, {"id": 186, "type": "subscript_expression", "text": "s[0] <", "parent": 183, "children": [187, 188], "start_point": {"row": 79, "column": 30}, "end_point": {"row": 79, "column": 36}}, {"id": 187, "type": "identifier", "text": "s[0", "parent": 186, "children": [], "start_point": {"row": 79, "column": 30}, "end_point": {"row": 79, "column": 33}}, {"id": 188, "type": "number_literal", "text": " ", "parent": 186, "children": [], "start_point": {"row": 79, "column": 34}, "end_point": {"row": 79, "column": 35}}, {"id": 189, "type": "<<", "text": " 2", "parent": 182, "children": [], "start_point": {"row": 79, "column": 37}, "end_point": {"row": 79, "column": 39}}, {"id": 190, "type": "parenthesized_expression", "text": "uint32_t)res[1] << 16) |", "parent": 180, "children": [191], "start_point": {"row": 79, "column": 46}, "end_point": {"row": 79, "column": 70}}, {"id": 191, "type": "binary_expression", "text": "int32_t)res[1] << 16) ", "parent": 190, "children": [192, 198], "start_point": {"row": 79, "column": 47}, "end_point": {"row": 79, "column": 69}}, {"id": 192, "type": "cast_expression", "text": "int32_t)res[1] <", "parent": 191, "children": [193, 195], "start_point": {"row": 79, "column": 47}, "end_point": {"row": 79, "column": 63}}, {"id": 193, "type": "type_descriptor", "text": "nt32_t)r", "parent": 192, "children": [194], "start_point": {"row": 79, "column": 48}, "end_point": {"row": 79, "column": 56}}, {"id": 194, "type": "primitive_type", "text": "nt32_t)r", "parent": 193, "children": [], "start_point": {"row": 79, "column": 48}, "end_point": {"row": 79, "column": 56}}, {"id": 195, "type": "subscript_expression", "text": "s[1] <", "parent": 192, "children": [196, 197], "start_point": {"row": 79, "column": 57}, "end_point": {"row": 79, "column": 63}}, {"id": 196, "type": "identifier", "text": "s[1", "parent": 195, "children": [], "start_point": {"row": 79, "column": 57}, "end_point": {"row": 79, "column": 60}}, {"id": 197, "type": "number_literal", "text": " ", "parent": 195, "children": [], "start_point": {"row": 79, "column": 61}, "end_point": {"row": 79, "column": 62}}, {"id": 198, "type": "<<", "text": " 1", "parent": 191, "children": [], "start_point": {"row": 79, "column": 64}, "end_point": {"row": 79, "column": 66}}, {"id": 199, "type": "parenthesized_expression", "text": "uint32_t)res[2] << 8) |", "parent": 179, "children": [200], "start_point": {"row": 79, "column": 73}, "end_point": {"row": 79, "column": 96}}, {"id": 200, "type": "binary_expression", "text": "int32_t)res[2] << 8) ", "parent": 199, "children": [201, 207, 208], "start_point": {"row": 79, "column": 74}, "end_point": {"row": 79, "column": 95}}, {"id": 201, "type": "cast_expression", "text": "int32_t)res[2] <", "parent": 200, "children": [202, 204], "start_point": {"row": 79, "column": 74}, "end_point": {"row": 79, "column": 90}}, {"id": 202, "type": "type_descriptor", "text": "nt32_t)r", "parent": 201, "children": [203], "start_point": {"row": 79, "column": 75}, "end_point": {"row": 79, "column": 83}}, {"id": 203, "type": "primitive_type", "text": "nt32_t)r", "parent": 202, "children": [], "start_point": {"row": 79, "column": 75}, "end_point": {"row": 79, "column": 83}}, {"id": 204, "type": "subscript_expression", "text": "s[2] <", "parent": 201, "children": [205, 206], "start_point": {"row": 79, "column": 84}, "end_point": {"row": 79, "column": 90}}, {"id": 205, "type": "identifier", "text": "s[2", "parent": 204, "children": [], "start_point": {"row": 79, "column": 84}, "end_point": {"row": 79, "column": 87}}, {"id": 206, "type": "number_literal", "text": " ", "parent": 204, "children": [], "start_point": {"row": 79, "column": 88}, "end_point": {"row": 79, "column": 89}}, {"id": 207, "type": "<<", "text": " 8", "parent": 200, "children": [], "start_point": {"row": 79, "column": 91}, "end_point": {"row": 79, "column": 93}}, {"id": 208, "type": "number_literal", "text": " ", "parent": 200, "children": [], "start_point": {"row": 79, "column": 94}, "end_point": {"row": 79, "column": 95}}, {"id": 209, "type": "cast_expression", "text": "int32_t)res[3];\n", "parent": 178, "children": [210, 212], "start_point": {"row": 79, "column": 99}, "end_point": {"row": 79, "column": 115}}, {"id": 210, "type": "type_descriptor", "text": "nt32_t)r", "parent": 209, "children": [211], "start_point": {"row": 79, "column": 100}, "end_point": {"row": 79, "column": 108}}, {"id": 211, "type": "primitive_type", "text": "nt32_t)r", "parent": 210, "children": [], "start_point": {"row": 79, "column": 100}, "end_point": {"row": 79, "column": 108}}, {"id": 212, "type": "subscript_expression", "text": "s[3];\n", "parent": 209, "children": [213], "start_point": {"row": 79, "column": 109}, "end_point": {"row": 79, "column": 115}}, {"id": 213, "type": "identifier", "text": "s[3", "parent": 212, "children": [], "start_point": {"row": 79, "column": 109}, "end_point": {"row": 79, "column": 112}}, {"id": 214, "type": "assignment_expression", "text": "emperature = (1.0 / (1UL << 16)) * (float)ret;\n", "parent": 129, "children": [215, 218], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 51}}, {"id": 215, "type": "pointer_expression", "text": "emperature =", "parent": 214, "children": [216, 217], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 16}}, {"id": 216, "type": "*", "text": "e", "parent": 215, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 5}}, {"id": 217, "type": "identifier", "text": "mperature =", "parent": 215, "children": [], "start_point": {"row": 81, "column": 5}, "end_point": {"row": 81, "column": 16}}, {"id": 218, "type": "binary_expression", "text": ".0 / (1UL << 16)) * (float)ret;\n", "parent": 214, "children": [219, 227], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 51}}, {"id": 219, "type": "parenthesized_expression", "text": ".0 / (1UL << 16)) *", "parent": 218, "children": [220], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 38}}, {"id": 220, "type": "binary_expression", "text": "0 / (1UL << 16)) ", "parent": 219, "children": [221, 222], "start_point": {"row": 81, "column": 20}, "end_point": {"row": 81, "column": 37}}, {"id": 221, "type": "number_literal", "text": "0 /", "parent": 220, "children": [], "start_point": {"row": 81, "column": 20}, "end_point": {"row": 81, "column": 23}}, {"id": 222, "type": "parenthesized_expression", "text": "UL << 16)) ", "parent": 220, "children": [223], "start_point": {"row": 81, "column": 26}, "end_point": {"row": 81, "column": 37}}, {"id": 223, "type": "binary_expression", "text": "L << 16))", "parent": 222, "children": [224, 225, 226], "start_point": {"row": 81, "column": 27}, "end_point": {"row": 81, "column": 36}}, {"id": 224, "type": "number_literal", "text": "L <", "parent": 223, "children": [], "start_point": {"row": 81, "column": 27}, "end_point": {"row": 81, "column": 30}}, {"id": 225, "type": "<<", "text": " 1", "parent": 223, "children": [], "start_point": {"row": 81, "column": 31}, "end_point": {"row": 81, "column": 33}}, {"id": 226, "type": "number_literal", "text": "))", "parent": 223, "children": [], "start_point": {"row": 81, "column": 34}, "end_point": {"row": 81, "column": 36}}, {"id": 227, "type": "cast_expression", "text": "loat)ret;\n", "parent": 218, "children": [228, 230], "start_point": {"row": 81, "column": 41}, "end_point": {"row": 81, "column": 51}}, {"id": 228, "type": "type_descriptor", "text": "oat)r", "parent": 227, "children": [229], "start_point": {"row": 81, "column": 42}, "end_point": {"row": 81, "column": 47}}, {"id": 229, "type": "primitive_type", "text": "oat)r", "parent": 228, "children": [], "start_point": {"row": 81, "column": 42}, "end_point": {"row": 81, "column": 47}}, {"id": 230, "type": "identifier", "text": "t;\n", "parent": 227, "children": [], "start_point": {"row": 81, "column": 48}, "end_point": {"row": 81, "column": 51}}, {"id": 231, "type": "return_statement", "text": "turn STEMMA_RET_OK;\n}", "parent": 129, "children": [232], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 25}}, {"id": 232, "type": "identifier", "text": "EMMA_RET_OK;\n", "parent": 231, "children": [], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 24}}, {"id": 233, "type": "function_definition", "text": "EMMA_RET_t stemma_get_humidity(STEMMA_t* dev, float* humidity) {\n /* Variable for the read result */\n uint16_t ret = STEMMA_TOUCH_WORKING;\n /* Capacitance measurement can take some time */\n do {\n /* Read in 2 bytes */\n if(i2c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n }while(ret == STEMMA_TOUCH_WORKING);\n /* Copy the result */\n *humidity = (((float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) * 100.0;\n /* Return success */\n return STEMMA_RET_OK;\n}\n\n", "parent": null, "children": [234, 235], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 109, "column": 1}}, {"id": 234, "type": "type_identifier", "text": "EMMA_RET_t s", "parent": 233, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 12}}, {"id": 235, "type": "function_declarator", "text": "emma_get_humidity(STEMMA_t* dev, float* humidity) {", "parent": 233, "children": [236, 237], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 64}}, {"id": 236, "type": "identifier", "text": "emma_get_humidity(S", "parent": 235, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 32}}, {"id": 237, "type": "parameter_list", "text": "TEMMA_t* dev, float* humidity) {", "parent": 235, "children": [238, 243], "start_point": {"row": 94, "column": 32}, "end_point": {"row": 94, "column": 64}}, {"id": 238, "type": "parameter_declaration", "text": "EMMA_t* dev, ", "parent": 237, "children": [239, 240], "start_point": {"row": 94, "column": 33}, "end_point": {"row": 94, "column": 46}}, {"id": 239, "type": "type_identifier", "text": "EMMA_t* ", "parent": 238, "children": [], "start_point": {"row": 94, "column": 33}, "end_point": {"row": 94, "column": 41}}, {"id": 240, "type": "pointer_declarator", "text": "dev, ", "parent": 238, "children": [241, 242], "start_point": {"row": 94, "column": 41}, "end_point": {"row": 94, "column": 46}}, {"id": 241, "type": "*", "text": "d", "parent": 240, "children": [], "start_point": {"row": 94, "column": 41}, "end_point": {"row": 94, "column": 42}}, {"id": 242, "type": "identifier", "text": "v, ", "parent": 240, "children": [], "start_point": {"row": 94, "column": 43}, "end_point": {"row": 94, "column": 46}}, {"id": 243, "type": "parameter_declaration", "text": "oat* humidity) ", "parent": 237, "children": [244, 245], "start_point": {"row": 94, "column": 48}, "end_point": {"row": 94, "column": 63}}, {"id": 244, "type": "primitive_type", "text": "oat* ", "parent": 243, "children": [], "start_point": {"row": 94, "column": 48}, "end_point": {"row": 94, "column": 53}}, {"id": 245, "type": "pointer_declarator", "text": "humidity) ", "parent": 243, "children": [246, 247], "start_point": {"row": 94, "column": 53}, "end_point": {"row": 94, "column": 63}}, {"id": 246, "type": "*", "text": "h", "parent": 245, "children": [], "start_point": {"row": 94, "column": 53}, "end_point": {"row": 94, "column": 54}}, {"id": 247, "type": "identifier", "text": "midity) ", "parent": 245, "children": [], "start_point": {"row": 94, "column": 55}, "end_point": {"row": 94, "column": 63}}, {"id": 248, "type": "declaration", "text": "nt16_t ret = STEMMA_TOUCH_WORKING;\n ", "parent": 233, "children": [249, 250], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 40}}, {"id": 249, "type": "primitive_type", "text": "nt16_t r", "parent": 248, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 12}}, {"id": 250, "type": "init_declarator", "text": "t = STEMMA_TOUCH_WORKING;\n", "parent": 248, "children": [251, 252, 253], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 39}}, {"id": 251, "type": "identifier", "text": "t =", "parent": 250, "children": [], "start_point": {"row": 96, "column": 13}, "end_point": {"row": 96, "column": 16}}, {"id": 252, "type": "=", "text": "S", "parent": 250, "children": [], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 18}}, {"id": 253, "type": "identifier", "text": "EMMA_TOUCH_WORKING;\n", "parent": 250, "children": [], "start_point": {"row": 96, "column": 19}, "end_point": {"row": 96, "column": 39}}, {"id": 254, "type": "do_statement", "text": " {\n /* Read in 2 bytes */\n if(i2c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n }while(ret == STEMMA_TOUCH_WORKING);\n ", "parent": 233, "children": [279], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 104, "column": 40}}, {"id": 255, "type": "if_statement", "text": "(i2c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n ", "parent": 254, "children": [256], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 103, "column": 9}}, {"id": 256, "type": "parenthesized_expression", "text": "2c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) {", "parent": 255, "children": [257], "start_point": {"row": 100, "column": 10}, "end_point": {"row": 100, "column": 107}}, {"id": 257, "type": "binary_expression", "text": "c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) ", "parent": 256, "children": [258, 275, 276], "start_point": {"row": 100, "column": 11}, "end_point": {"row": 100, "column": 106}}, {"id": 258, "type": "call_expression", "text": "c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) !", "parent": 257, "children": [259, 260], "start_point": {"row": 100, "column": 11}, "end_point": {"row": 100, "column": 92}}, {"id": 259, "type": "identifier", "text": "c_read16_U16BE(d", "parent": 258, "children": [], "start_point": {"row": 100, "column": 11}, "end_point": {"row": 100, "column": 27}}, {"id": 260, "type": "argument_list", "text": "ev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) !", "parent": 258, "children": [261, 265, 272], "start_point": {"row": 100, "column": 27}, "end_point": {"row": 100, "column": 92}}, {"id": 261, "type": "field_expression", "text": "v->address, ", "parent": 260, "children": [262, 263, 264], "start_point": {"row": 100, "column": 28}, "end_point": {"row": 100, "column": 40}}, {"id": 262, "type": "identifier", "text": "v->", "parent": 261, "children": [], "start_point": {"row": 100, "column": 28}, "end_point": {"row": 100, "column": 31}}, {"id": 263, "type": "->", "text": "ad", "parent": 261, "children": [], "start_point": {"row": 100, "column": 31}, "end_point": {"row": 100, "column": 33}}, {"id": 264, "type": "field_identifier", "text": "dress, ", "parent": 261, "children": [], "start_point": {"row": 100, "column": 33}, "end_point": {"row": 100, "column": 40}}, {"id": 265, "type": "parenthesized_expression", "text": "TEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), ", "parent": 260, "children": [266], "start_point": {"row": 100, "column": 42}, "end_point": {"row": 100, "column": 85}}, {"id": 266, "type": "binary_expression", "text": "EMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)),", "parent": 265, "children": [267, 268], "start_point": {"row": 100, "column": 43}, "end_point": {"row": 100, "column": 84}}, {"id": 267, "type": "identifier", "text": "EMMA_TOUCH_BASE |", "parent": 266, "children": [], "start_point": {"row": 100, "column": 43}, "end_point": {"row": 100, "column": 60}}, {"id": 268, "type": "parenthesized_expression", "text": "TEMMA_TOUCH_CH0<<8)),", "parent": 266, "children": [269], "start_point": {"row": 100, "column": 63}, "end_point": {"row": 100, "column": 84}}, {"id": 269, "type": "binary_expression", "text": "EMMA_TOUCH_CH0<<8))", "parent": 268, "children": [270, 271], "start_point": {"row": 100, "column": 64}, "end_point": {"row": 100, "column": 83}}, {"id": 270, "type": "identifier", "text": "EMMA_TOUCH_CH0<<", "parent": 269, "children": [], "start_point": {"row": 100, "column": 64}, "end_point": {"row": 100, "column": 80}}, {"id": 271, "type": "<<", "text": "8)", "parent": 269, "children": [], "start_point": {"row": 100, "column": 80}, "end_point": {"row": 100, "column": 82}}, {"id": 272, "type": "pointer_expression", "text": "et) ", "parent": 260, "children": [273, 274], "start_point": {"row": 100, "column": 87}, "end_point": {"row": 100, "column": 91}}, {"id": 273, "type": "&", "text": "e", "parent": 272, "children": [], "start_point": {"row": 100, "column": 87}, "end_point": {"row": 100, "column": 88}}, {"id": 274, "type": "identifier", "text": "t) ", "parent": 272, "children": [], "start_point": {"row": 100, "column": 88}, "end_point": {"row": 100, "column": 91}}, {"id": 275, "type": "!=", "text": " I", "parent": 257, "children": [], "start_point": {"row": 100, "column": 93}, "end_point": {"row": 100, "column": 95}}, {"id": 276, "type": "identifier", "text": "C_RET_OK) ", "parent": 257, "children": [], "start_point": {"row": 100, "column": 96}, "end_point": {"row": 100, "column": 106}}, {"id": 277, "type": "return_statement", "text": "turn STEMMA_RET_ERROR;\n ", "parent": 255, "children": [278], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 36}}, {"id": 278, "type": "identifier", "text": "EMMA_RET_ERROR;\n", "parent": 277, "children": [], "start_point": {"row": 102, "column": 19}, "end_point": {"row": 102, "column": 35}}, {"id": 279, "type": "parenthesized_expression", "text": "et == STEMMA_TOUCH_WORKING);\n", "parent": 254, "children": [280], "start_point": {"row": 104, "column": 10}, "end_point": {"row": 104, "column": 39}}, {"id": 280, "type": "binary_expression", "text": "t == STEMMA_TOUCH_WORKING);", "parent": 279, "children": [281, 282, 283], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 38}}, {"id": 281, "type": "identifier", "text": "t =", "parent": 280, "children": [], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 14}}, {"id": 282, "type": "==", "text": " S", "parent": 280, "children": [], "start_point": {"row": 104, "column": 15}, "end_point": {"row": 104, "column": 17}}, {"id": 283, "type": "identifier", "text": "EMMA_TOUCH_WORKING);", "parent": 280, "children": [], "start_point": {"row": 104, "column": 18}, "end_point": {"row": 104, "column": 38}}, {"id": 284, "type": "assignment_expression", "text": "umidity = (((float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) * 100.0;\n", "parent": 233, "children": [285, 288], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 91}}, {"id": 285, "type": "pointer_expression", "text": "umidity =", "parent": 284, "children": [286, 287], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 13}}, {"id": 286, "type": "*", "text": "u", "parent": 285, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 5}}, {"id": 287, "type": "identifier", "text": "midity =", "parent": 285, "children": [], "start_point": {"row": 106, "column": 5}, "end_point": {"row": 106, "column": 13}}, {"id": 288, "type": "binary_expression", "text": "(float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) * 100.0;\n", "parent": 284, "children": [289, 304, 305], "start_point": {"row": 106, "column": 16}, "end_point": {"row": 106, "column": 91}}, {"id": 289, "type": "parenthesized_expression", "text": "(float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) *", "parent": 288, "children": [290], "start_point": {"row": 106, "column": 16}, "end_point": {"row": 106, "column": 83}}, {"id": 290, "type": "binary_expression", "text": "float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) ", "parent": 289, "children": [291, 299], "start_point": {"row": 106, "column": 17}, "end_point": {"row": 106, "column": 82}}, {"id": 291, "type": "parenthesized_expression", "text": "float)ret - STEMMA_CAP_MIN) /", "parent": 290, "children": [292], "start_point": {"row": 106, "column": 17}, "end_point": {"row": 106, "column": 46}}, {"id": 292, "type": "binary_expression", "text": "loat)ret - STEMMA_CAP_MIN) ", "parent": 291, "children": [293, 297, 298], "start_point": {"row": 106, "column": 18}, "end_point": {"row": 106, "column": 45}}, {"id": 293, "type": "cast_expression", "text": "loat)ret -", "parent": 292, "children": [294, 296], "start_point": {"row": 106, "column": 18}, "end_point": {"row": 106, "column": 28}}, {"id": 294, "type": "type_descriptor", "text": "oat)r", "parent": 293, "children": [295], "start_point": {"row": 106, "column": 19}, "end_point": {"row": 106, "column": 24}}, {"id": 295, "type": "primitive_type", "text": "oat)r", "parent": 294, "children": [], "start_point": {"row": 106, "column": 19}, "end_point": {"row": 106, "column": 24}}, {"id": 296, "type": "identifier", "text": "t -", "parent": 293, "children": [], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 28}}, {"id": 297, "type": "-", "text": "S", "parent": 292, "children": [], "start_point": {"row": 106, "column": 29}, "end_point": {"row": 106, "column": 30}}, {"id": 298, "type": "identifier", "text": "EMMA_CAP_MIN) ", "parent": 292, "children": [], "start_point": {"row": 106, "column": 31}, "end_point": {"row": 106, "column": 45}}, {"id": 299, "type": "parenthesized_expression", "text": "TEMMA_CAP_MAX - STEMMA_CAP_MIN)) ", "parent": 290, "children": [300], "start_point": {"row": 106, "column": 49}, "end_point": {"row": 106, "column": 82}}, {"id": 300, "type": "binary_expression", "text": "EMMA_CAP_MAX - STEMMA_CAP_MIN))", "parent": 299, "children": [301, 302, 303], "start_point": {"row": 106, "column": 50}, "end_point": {"row": 106, "column": 81}}, {"id": 301, "type": "identifier", "text": "EMMA_CAP_MAX -", "parent": 300, "children": [], "start_point": {"row": 106, "column": 50}, "end_point": {"row": 106, "column": 64}}, {"id": 302, "type": "-", "text": "S", "parent": 300, "children": [], "start_point": {"row": 106, "column": 65}, "end_point": {"row": 106, "column": 66}}, {"id": 303, "type": "identifier", "text": "EMMA_CAP_MIN))", "parent": 300, "children": [], "start_point": {"row": 106, "column": 67}, "end_point": {"row": 106, "column": 81}}, {"id": 304, "type": "*", "text": "1", "parent": 288, "children": [], "start_point": {"row": 106, "column": 84}, "end_point": {"row": 106, "column": 85}}, {"id": 305, "type": "number_literal", "text": "0.0;\n", "parent": 288, "children": [], "start_point": {"row": 106, "column": 86}, "end_point": {"row": 106, "column": 91}}, {"id": 306, "type": "return_statement", "text": "turn STEMMA_RET_OK;\n}", "parent": 233, "children": [307], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 25}}, {"id": 307, "type": "identifier", "text": "EMMA_RET_OK;\n", "parent": 306, "children": [], "start_point": {"row": 108, "column": 11}, "end_point": {"row": 108, "column": 24}}, {"id": 308, "type": "function_definition", "text": "EMMA_RET_t stemma_get_humidity_avg(STEMMA_t* dev, STEMMA_AVG_t* structure, float* humidity) {\n /* Temporary variable for the sensor reading */\n float tmp;\n /* Temporary counter variable */\n uint8_t i = 0;\n /* Static variable for the value array index */\n static uint8_t index = 0;\n /* Get a new reading */\n STEMMA_RET_t ret = stemma_get_humidity(dev, &tmp);\n /* Check if the reading is valid */\n if(ret != STEMMA_RET_OK) {\n /* Something went wrong */\n return ret;\n }\n /* Check if it is the first reading */\n if(structure->empty == 0) {\n for(i=0; i<STEMMA_AVG_CNT; i++) {\n structure->value[i] = tmp;\n index = 1;\n }\n } else {\n /* There are other readings available already */\n structure->value[index] = tmp;\n /* Get new index */\n index = (index+1) % STEMMA_AVG_CNT;\n }\n /* Calculate average */\n double sum = 0;\n for(i=0; i<STEMMA_AVG_CNT; i++) {\n sum += structure->value[i];\n }\n sum /= STEMMA_AVG_CNT;\n /* Copy result to pointer location */\n *humidity = sum;\n /* Return with success */\n return STEMMA_RET_OK;\n}\n", "parent": null, "children": [309, 310], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 157, "column": 1}}, {"id": 309, "type": "type_identifier", "text": "EMMA_RET_t s", "parent": 308, "children": [], "start_point": {"row": 121, "column": 0}, "end_point": {"row": 121, "column": 12}}, {"id": 310, "type": "function_declarator", "text": "emma_get_humidity_avg(STEMMA_t* dev, STEMMA_AVG_t* structure, float* humidity) {", "parent": 308, "children": [311, 312], "start_point": {"row": 121, "column": 13}, "end_point": {"row": 121, "column": 93}}, {"id": 311, "type": "identifier", "text": "emma_get_humidity_avg(S", "parent": 310, "children": [], "start_point": {"row": 121, "column": 13}, "end_point": {"row": 121, "column": 36}}, {"id": 312, "type": "parameter_list", "text": "TEMMA_t* dev, STEMMA_AVG_t* structure, float* humidity) {", "parent": 310, "children": [313, 318, 323], "start_point": {"row": 121, "column": 36}, "end_point": {"row": 121, "column": 93}}, {"id": 313, "type": "parameter_declaration", "text": "EMMA_t* dev, ", "parent": 312, "children": [314, 315], "start_point": {"row": 121, "column": 37}, "end_point": {"row": 121, "column": 50}}, {"id": 314, "type": "type_identifier", "text": "EMMA_t* ", "parent": 313, "children": [], "start_point": {"row": 121, "column": 37}, "end_point": {"row": 121, "column": 45}}, {"id": 315, "type": "pointer_declarator", "text": "dev, ", "parent": 313, "children": [316, 317], "start_point": {"row": 121, "column": 45}, "end_point": {"row": 121, "column": 50}}, {"id": 316, "type": "*", "text": "d", "parent": 315, "children": [], "start_point": {"row": 121, "column": 45}, "end_point": {"row": 121, "column": 46}}, {"id": 317, "type": "identifier", "text": "v, ", "parent": 315, "children": [], "start_point": {"row": 121, "column": 47}, "end_point": {"row": 121, "column": 50}}, {"id": 318, "type": "parameter_declaration", "text": "EMMA_AVG_t* structure, ", "parent": 312, "children": [319, 320], "start_point": {"row": 121, "column": 52}, "end_point": {"row": 121, "column": 75}}, {"id": 319, "type": "type_identifier", "text": "EMMA_AVG_t* ", "parent": 318, "children": [], "start_point": {"row": 121, "column": 52}, "end_point": {"row": 121, "column": 64}}, {"id": 320, "type": "pointer_declarator", "text": "structure, ", "parent": 318, "children": [321, 322], "start_point": {"row": 121, "column": 64}, "end_point": {"row": 121, "column": 75}}, {"id": 321, "type": "*", "text": "s", "parent": 320, "children": [], "start_point": {"row": 121, "column": 64}, "end_point": {"row": 121, "column": 65}}, {"id": 322, "type": "identifier", "text": "ructure, ", "parent": 320, "children": [], "start_point": {"row": 121, "column": 66}, "end_point": {"row": 121, "column": 75}}, {"id": 323, "type": "parameter_declaration", "text": "oat* humidity) ", "parent": 312, "children": [324, 325], "start_point": {"row": 121, "column": 77}, "end_point": {"row": 121, "column": 92}}, {"id": 324, "type": "primitive_type", "text": "oat* ", "parent": 323, "children": [], "start_point": {"row": 121, "column": 77}, "end_point": {"row": 121, "column": 82}}, {"id": 325, "type": "pointer_declarator", "text": "humidity) ", "parent": 323, "children": [326, 327], "start_point": {"row": 121, "column": 82}, "end_point": {"row": 121, "column": 92}}, {"id": 326, "type": "*", "text": "h", "parent": 325, "children": [], "start_point": {"row": 121, "column": 82}, "end_point": {"row": 121, "column": 83}}, {"id": 327, "type": "identifier", "text": "midity) ", "parent": 325, "children": [], "start_point": {"row": 121, "column": 84}, "end_point": {"row": 121, "column": 92}}, {"id": 328, "type": "declaration", "text": "oat tmp;\n ", "parent": 308, "children": [329, 330], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 14}}, {"id": 329, "type": "primitive_type", "text": "oat t", "parent": 328, "children": [], "start_point": {"row": 123, "column": 4}, "end_point": {"row": 123, "column": 9}}, {"id": 330, "type": "identifier", "text": "p;\n", "parent": 328, "children": [], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 123, "column": 13}}, {"id": 331, "type": "declaration", "text": "nt8_t i = 0;\n ", "parent": 308, "children": [332, 333], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 18}}, {"id": 332, "type": "primitive_type", "text": "nt8_t i", "parent": 331, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 11}}, {"id": 333, "type": "init_declarator", "text": "= 0;\n", "parent": 331, "children": [334, 335, 336], "start_point": {"row": 125, "column": 12}, "end_point": {"row": 125, "column": 17}}, {"id": 334, "type": "identifier", "text": "=", "parent": 333, "children": [], "start_point": {"row": 125, "column": 12}, "end_point": {"row": 125, "column": 13}}, {"id": 335, "type": "=", "text": "0", "parent": 333, "children": [], "start_point": {"row": 125, "column": 14}, "end_point": {"row": 125, "column": 15}}, {"id": 336, "type": "number_literal", "text": "\n", "parent": 333, "children": [], "start_point": {"row": 125, "column": 16}, "end_point": {"row": 125, "column": 17}}, {"id": 337, "type": "declaration", "text": "atic uint8_t index = 0;\n ", "parent": 308, "children": [338, 339, 340], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 29}}, {"id": 338, "type": "storage_class_specifier", "text": "atic u", "parent": 337, "children": [], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 10}}, {"id": 339, "type": "primitive_type", "text": "nt8_t i", "parent": 337, "children": [], "start_point": {"row": 127, "column": 11}, "end_point": {"row": 127, "column": 18}}, {"id": 340, "type": "init_declarator", "text": "dex = 0;\n", "parent": 337, "children": [341, 342, 343], "start_point": {"row": 127, "column": 19}, "end_point": {"row": 127, "column": 28}}, {"id": 341, "type": "identifier", "text": "dex =", "parent": 340, "children": [], "start_point": {"row": 127, "column": 19}, "end_point": {"row": 127, "column": 24}}, {"id": 342, "type": "=", "text": "0", "parent": 340, "children": [], "start_point": {"row": 127, "column": 25}, "end_point": {"row": 127, "column": 26}}, {"id": 343, "type": "number_literal", "text": "\n", "parent": 340, "children": [], "start_point": {"row": 127, "column": 27}, "end_point": {"row": 127, "column": 28}}, {"id": 344, "type": "declaration", "text": "EMMA_RET_t ret = stemma_get_humidity(dev, &tmp);\n ", "parent": 308, "children": [345, 346], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 129, "column": 54}}, {"id": 345, "type": "type_identifier", "text": "EMMA_RET_t r", "parent": 344, "children": [], "start_point": {"row": 129, "column": 4}, "end_point": {"row": 129, "column": 16}}, {"id": 346, "type": "init_declarator", "text": "t = stemma_get_humidity(dev, &tmp);\n", "parent": 344, "children": [347, 348, 349], "start_point": {"row": 129, "column": 17}, "end_point": {"row": 129, "column": 53}}, {"id": 347, "type": "identifier", "text": "t =", "parent": 346, "children": [], "start_point": {"row": 129, "column": 17}, "end_point": {"row": 129, "column": 20}}, {"id": 348, "type": "=", "text": "s", "parent": 346, "children": [], "start_point": {"row": 129, "column": 21}, "end_point": {"row": 129, "column": 22}}, {"id": 349, "type": "call_expression", "text": "emma_get_humidity(dev, &tmp);\n", "parent": 346, "children": [350, 351], "start_point": {"row": 129, "column": 23}, "end_point": {"row": 129, "column": 53}}, {"id": 350, "type": "identifier", "text": "emma_get_humidity(d", "parent": 349, "children": [], "start_point": {"row": 129, "column": 23}, "end_point": {"row": 129, "column": 42}}, {"id": 351, "type": "argument_list", "text": "ev, &tmp);\n", "parent": 349, "children": [352, 353], "start_point": {"row": 129, "column": 42}, "end_point": {"row": 129, "column": 53}}, {"id": 352, "type": "identifier", "text": "v, ", "parent": 351, "children": [], "start_point": {"row": 129, "column": 43}, "end_point": {"row": 129, "column": 46}}, {"id": 353, "type": "pointer_expression", "text": "mp);", "parent": 351, "children": [354, 355], "start_point": {"row": 129, "column": 48}, "end_point": {"row": 129, "column": 52}}, {"id": 354, "type": "&", "text": "m", "parent": 353, "children": [], "start_point": {"row": 129, "column": 48}, "end_point": {"row": 129, "column": 49}}, {"id": 355, "type": "identifier", "text": "p);", "parent": 353, "children": [], "start_point": {"row": 129, "column": 49}, "end_point": {"row": 129, "column": 52}}, {"id": 356, "type": "if_statement", "text": "(ret != STEMMA_RET_OK) {\n /* Something went wrong */\n return ret;\n }\n ", "parent": 308, "children": [357], "start_point": {"row": 131, "column": 4}, "end_point": {"row": 134, "column": 5}}, {"id": 357, "type": "parenthesized_expression", "text": "et != STEMMA_RET_OK) {", "parent": 356, "children": [358], "start_point": {"row": 131, "column": 6}, "end_point": {"row": 131, "column": 28}}, {"id": 358, "type": "binary_expression", "text": "t != STEMMA_RET_OK) ", "parent": 357, "children": [359, 360, 361], "start_point": {"row": 131, "column": 7}, "end_point": {"row": 131, "column": 27}}, {"id": 359, "type": "identifier", "text": "t !", "parent": 358, "children": [], "start_point": {"row": 131, "column": 7}, "end_point": {"row": 131, "column": 10}}, {"id": 360, "type": "!=", "text": " S", "parent": 358, "children": [], "start_point": {"row": 131, "column": 11}, "end_point": {"row": 131, "column": 13}}, {"id": 361, "type": "identifier", "text": "EMMA_RET_OK) ", "parent": 358, "children": [], "start_point": {"row": 131, "column": 14}, "end_point": {"row": 131, "column": 27}}, {"id": 362, "type": "return_statement", "text": "turn ret;\n ", "parent": 356, "children": [363], "start_point": {"row": 133, "column": 8}, "end_point": {"row": 133, "column": 19}}, {"id": 363, "type": "identifier", "text": "t;\n", "parent": 362, "children": [], "start_point": {"row": 133, "column": 15}, "end_point": {"row": 133, "column": 18}}, {"id": 364, "type": "if_statement", "text": "(structure->empty == 0) {\n for(i=0; i<STEMMA_AVG_CNT; i++) {\n structure->value[i] = tmp;\n index = 1;\n }\n } else {\n /* There are other readings available already */\n structure->value[index] = tmp;\n /* Get new index */\n index = (index+1) % STEMMA_AVG_CNT;\n }\n ", "parent": 308, "children": [365, 396], "start_point": {"row": 136, "column": 4}, "end_point": {"row": 146, "column": 5}}, {"id": 365, "type": "parenthesized_expression", "text": "tructure->empty == 0) {", "parent": 364, "children": [366], "start_point": {"row": 136, "column": 6}, "end_point": {"row": 136, "column": 29}}, {"id": 366, "type": "binary_expression", "text": "ructure->empty == 0) ", "parent": 365, "children": [367, 371, 372], "start_point": {"row": 136, "column": 7}, "end_point": {"row": 136, "column": 28}}, {"id": 367, "type": "field_expression", "text": "ructure->empty =", "parent": 366, "children": [368, 369, 370], "start_point": {"row": 136, "column": 7}, "end_point": {"row": 136, "column": 23}}, {"id": 368, "type": "identifier", "text": "ructure->", "parent": 367, "children": [], "start_point": {"row": 136, "column": 7}, "end_point": {"row": 136, "column": 16}}, {"id": 369, "type": "->", "text": "em", "parent": 367, "children": [], "start_point": {"row": 136, "column": 16}, "end_point": {"row": 136, "column": 18}}, {"id": 370, "type": "field_identifier", "text": "pty =", "parent": 367, "children": [], "start_point": {"row": 136, "column": 18}, "end_point": {"row": 136, "column": 23}}, {"id": 371, "type": "==", "text": " 0", "parent": 366, "children": [], "start_point": {"row": 136, "column": 24}, "end_point": {"row": 136, "column": 26}}, {"id": 372, "type": "number_literal", "text": " ", "parent": 366, "children": [], "start_point": {"row": 136, "column": 27}, "end_point": {"row": 136, "column": 28}}, {"id": 373, "type": "for_statement", "text": "r(i=0; i<STEMMA_AVG_CNT; i++) {\n structure->value[i] = tmp;\n index = 1;\n }\n ", "parent": 364, "children": [374, 377, 381], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 140, "column": 9}}, {"id": 374, "type": "assignment_expression", "text": "0; ", "parent": 373, "children": [375, 376], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 15}}, {"id": 375, "type": "identifier", "text": "0", "parent": 374, "children": [], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 13}}, {"id": 376, "type": "number_literal", "text": " ", "parent": 374, "children": [], "start_point": {"row": 137, "column": 14}, "end_point": {"row": 137, "column": 15}}, {"id": 377, "type": "binary_expression", "text": "STEMMA_AVG_CNT; ", "parent": 373, "children": [378, 379, 380], "start_point": {"row": 137, "column": 17}, "end_point": {"row": 137, "column": 33}}, {"id": 378, "type": "identifier", "text": "S", "parent": 377, "children": [], "start_point": {"row": 137, "column": 17}, "end_point": {"row": 137, "column": 18}}, {"id": 379, "type": "<", "text": "T", "parent": 377, "children": [], "start_point": {"row": 137, "column": 18}, "end_point": {"row": 137, "column": 19}}, {"id": 380, "type": "identifier", "text": "EMMA_AVG_CNT; ", "parent": 377, "children": [], "start_point": {"row": 137, "column": 19}, "end_point": {"row": 137, "column": 33}}, {"id": 381, "type": "update_expression", "text": "+) ", "parent": 373, "children": [382], "start_point": {"row": 137, "column": 35}, "end_point": {"row": 137, "column": 38}}, {"id": 382, "type": "identifier", "text": "+", "parent": 381, "children": [], "start_point": {"row": 137, "column": 35}, "end_point": {"row": 137, "column": 36}}, {"id": 383, "type": "assignment_expression", "text": "ructure->value[i] = tmp;\n", "parent": 373, "children": [384, 390, 391], "start_point": {"row": 138, "column": 12}, "end_point": {"row": 138, "column": 37}}, {"id": 384, "type": "subscript_expression", "text": "ructure->value[i] =", "parent": 383, "children": [385, 389], "start_point": {"row": 138, "column": 12}, "end_point": {"row": 138, "column": 31}}, {"id": 385, "type": "field_expression", "text": "ructure->value[i", "parent": 384, "children": [386, 387, 388], "start_point": {"row": 138, "column": 12}, "end_point": {"row": 138, "column": 28}}, {"id": 386, "type": "identifier", "text": "ructure->", "parent": 385, "children": [], "start_point": {"row": 138, "column": 12}, "end_point": {"row": 138, "column": 21}}, {"id": 387, "type": "->", "text": "va", "parent": 385, "children": [], "start_point": {"row": 138, "column": 21}, "end_point": {"row": 138, "column": 23}}, {"id": 388, "type": "field_identifier", "text": "lue[i", "parent": 385, "children": [], "start_point": {"row": 138, "column": 23}, "end_point": {"row": 138, "column": 28}}, {"id": 389, "type": "identifier", "text": " ", "parent": 384, "children": [], "start_point": {"row": 138, "column": 29}, "end_point": {"row": 138, "column": 30}}, {"id": 390, "type": "=", "text": "t", "parent": 383, "children": [], "start_point": {"row": 138, "column": 32}, "end_point": {"row": 138, "column": 33}}, {"id": 391, "type": "identifier", "text": "p;\n", "parent": 383, "children": [], "start_point": {"row": 138, "column": 34}, "end_point": {"row": 138, "column": 37}}, {"id": 392, "type": "assignment_expression", "text": "dex = 1;\n", "parent": 373, "children": [393, 394, 395], "start_point": {"row": 139, "column": 12}, "end_point": {"row": 139, "column": 21}}, {"id": 393, "type": "identifier", "text": "dex =", "parent": 392, "children": [], "start_point": {"row": 139, "column": 12}, "end_point": {"row": 139, "column": 17}}, {"id": 394, "type": "=", "text": "1", "parent": 392, "children": [], "start_point": {"row": 139, "column": 18}, "end_point": {"row": 139, "column": 19}}, {"id": 395, "type": "number_literal", "text": "\n", "parent": 392, "children": [], "start_point": {"row": 139, "column": 20}, "end_point": {"row": 139, "column": 21}}, {"id": 396, "type": "else_clause", "text": "se {\n /* There are other readings available already */\n structure->value[index] = tmp;\n /* Get new index */\n index = (index+1) % STEMMA_AVG_CNT;\n }\n ", "parent": 364, "children": [], "start_point": {"row": 141, "column": 6}, "end_point": {"row": 146, "column": 5}}, {"id": 397, "type": "assignment_expression", "text": "ructure->value[index] = tmp;\n", "parent": 396, "children": [398, 404, 405], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 37}}, {"id": 398, "type": "subscript_expression", "text": "ructure->value[index] =", "parent": 397, "children": [399, 403], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 31}}, {"id": 399, "type": "field_expression", "text": "ructure->value[i", "parent": 398, "children": [400, 401, 402], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 24}}, {"id": 400, "type": "identifier", "text": "ructure->", "parent": 399, "children": [], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 17}}, {"id": 401, "type": "->", "text": "va", "parent": 399, "children": [], "start_point": {"row": 143, "column": 17}, "end_point": {"row": 143, "column": 19}}, {"id": 402, "type": "field_identifier", "text": "lue[i", "parent": 399, "children": [], "start_point": {"row": 143, "column": 19}, "end_point": {"row": 143, "column": 24}}, {"id": 403, "type": "identifier", "text": "dex] ", "parent": 398, "children": [], "start_point": {"row": 143, "column": 25}, "end_point": {"row": 143, "column": 30}}, {"id": 404, "type": "=", "text": "t", "parent": 397, "children": [], "start_point": {"row": 143, "column": 32}, "end_point": {"row": 143, "column": 33}}, {"id": 405, "type": "identifier", "text": "p;\n", "parent": 397, "children": [], "start_point": {"row": 143, "column": 34}, "end_point": {"row": 143, "column": 37}}, {"id": 406, "type": "assignment_expression", "text": "dex = (index+1) % STEMMA_AVG_CNT;\n", "parent": 396, "children": [407, 408], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 42}}, {"id": 407, "type": "identifier", "text": "dex =", "parent": 406, "children": [], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 13}}, {"id": 408, "type": "binary_expression", "text": "ndex+1) % STEMMA_AVG_CNT;\n", "parent": 406, "children": [409, 413, 414], "start_point": {"row": 145, "column": 16}, "end_point": {"row": 145, "column": 42}}, {"id": 409, "type": "parenthesized_expression", "text": "ndex+1) %", "parent": 408, "children": [410], "start_point": {"row": 145, "column": 16}, "end_point": {"row": 145, "column": 25}}, {"id": 410, "type": "binary_expression", "text": "dex+1) ", "parent": 409, "children": [411, 412], "start_point": {"row": 145, "column": 17}, "end_point": {"row": 145, "column": 24}}, {"id": 411, "type": "identifier", "text": "dex+1", "parent": 410, "children": [], "start_point": {"row": 145, "column": 17}, "end_point": {"row": 145, "column": 22}}, {"id": 412, "type": "number_literal", "text": " ", "parent": 410, "children": [], "start_point": {"row": 145, "column": 23}, "end_point": {"row": 145, "column": 24}}, {"id": 413, "type": "%", "text": "S", "parent": 408, "children": [], "start_point": {"row": 145, "column": 26}, "end_point": {"row": 145, "column": 27}}, {"id": 414, "type": "identifier", "text": "EMMA_AVG_CNT;\n", "parent": 408, "children": [], "start_point": {"row": 145, "column": 28}, "end_point": {"row": 145, "column": 42}}, {"id": 415, "type": "declaration", "text": "uble sum = 0;\n ", "parent": 308, "children": [416, 417], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 19}}, {"id": 416, "type": "primitive_type", "text": "uble s", "parent": 415, "children": [], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 10}}, {"id": 417, "type": "init_declarator", "text": "m = 0;\n", "parent": 415, "children": [418, 419, 420], "start_point": {"row": 148, "column": 11}, "end_point": {"row": 148, "column": 18}}, {"id": 418, "type": "identifier", "text": "m =", "parent": 417, "children": [], "start_point": {"row": 148, "column": 11}, "end_point": {"row": 148, "column": 14}}, {"id": 419, "type": "=", "text": "0", "parent": 417, "children": [], "start_point": {"row": 148, "column": 15}, "end_point": {"row": 148, "column": 16}}, {"id": 420, "type": "number_literal", "text": "\n", "parent": 417, "children": [], "start_point": {"row": 148, "column": 17}, "end_point": {"row": 148, "column": 18}}, {"id": 421, "type": "for_statement", "text": "r(i=0; i<STEMMA_AVG_CNT; i++) {\n sum += structure->value[i];\n }\n ", "parent": 308, "children": [422, 425, 429], "start_point": {"row": 149, "column": 4}, "end_point": {"row": 151, "column": 5}}, {"id": 422, "type": "assignment_expression", "text": "0; ", "parent": 421, "children": [423, 424], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 11}}, {"id": 423, "type": "identifier", "text": "0", "parent": 422, "children": [], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 9}}, {"id": 424, "type": "number_literal", "text": " ", "parent": 422, "children": [], "start_point": {"row": 149, "column": 10}, "end_point": {"row": 149, "column": 11}}, {"id": 425, "type": "binary_expression", "text": "STEMMA_AVG_CNT; ", "parent": 421, "children": [426, 427, 428], "start_point": {"row": 149, "column": 13}, "end_point": {"row": 149, "column": 29}}, {"id": 426, "type": "identifier", "text": "S", "parent": 425, "children": [], "start_point": {"row": 149, "column": 13}, "end_point": {"row": 149, "column": 14}}, {"id": 427, "type": "<", "text": "T", "parent": 425, "children": [], "start_point": {"row": 149, "column": 14}, "end_point": {"row": 149, "column": 15}}, {"id": 428, "type": "identifier", "text": "EMMA_AVG_CNT; ", "parent": 425, "children": [], "start_point": {"row": 149, "column": 15}, "end_point": {"row": 149, "column": 29}}, {"id": 429, "type": "update_expression", "text": "+) ", "parent": 421, "children": [430], "start_point": {"row": 149, "column": 31}, "end_point": {"row": 149, "column": 34}}, {"id": 430, "type": "identifier", "text": "+", "parent": 429, "children": [], "start_point": {"row": 149, "column": 31}, "end_point": {"row": 149, "column": 32}}, {"id": 431, "type": "assignment_expression", "text": "m += structure->value[i];\n", "parent": 421, "children": [432, 433, 434], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 34}}, {"id": 432, "type": "identifier", "text": "m +", "parent": 431, "children": [], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 11}}, {"id": 433, "type": "+=", "text": " s", "parent": 431, "children": [], "start_point": {"row": 150, "column": 12}, "end_point": {"row": 150, "column": 14}}, {"id": 434, "type": "subscript_expression", "text": "ructure->value[i];\n", "parent": 431, "children": [435], "start_point": {"row": 150, "column": 15}, "end_point": {"row": 150, "column": 34}}, {"id": 435, "type": "field_expression", "text": "ructure->value[i", "parent": 434, "children": [436, 437, 438], "start_point": {"row": 150, "column": 15}, "end_point": {"row": 150, "column": 31}}, {"id": 436, "type": "identifier", "text": "ructure->", "parent": 435, "children": [], "start_point": {"row": 150, "column": 15}, "end_point": {"row": 150, "column": 24}}, {"id": 437, "type": "->", "text": "va", "parent": 435, "children": [], "start_point": {"row": 150, "column": 24}, "end_point": {"row": 150, "column": 26}}, {"id": 438, "type": "field_identifier", "text": "lue[i", "parent": 435, "children": [], "start_point": {"row": 150, "column": 26}, "end_point": {"row": 150, "column": 31}}, {"id": 439, "type": "assignment_expression", "text": "m /= STEMMA_AVG_CNT;\n", "parent": 308, "children": [440, 441, 442], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 25}}, {"id": 440, "type": "identifier", "text": "m /", "parent": 439, "children": [], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 7}}, {"id": 441, "type": "/=", "text": " S", "parent": 439, "children": [], "start_point": {"row": 152, "column": 8}, "end_point": {"row": 152, "column": 10}}, {"id": 442, "type": "identifier", "text": "EMMA_AVG_CNT;\n", "parent": 439, "children": [], "start_point": {"row": 152, "column": 11}, "end_point": {"row": 152, "column": 25}}, {"id": 443, "type": "assignment_expression", "text": "umidity = sum;\n", "parent": 308, "children": [444, 447, 448], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 19}}, {"id": 444, "type": "pointer_expression", "text": "umidity =", "parent": 443, "children": [445, 446], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 13}}, {"id": 445, "type": "*", "text": "u", "parent": 444, "children": [], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 5}}, {"id": 446, "type": "identifier", "text": "midity =", "parent": 444, "children": [], "start_point": {"row": 154, "column": 5}, "end_point": {"row": 154, "column": 13}}, {"id": 447, "type": "=", "text": "s", "parent": 443, "children": [], "start_point": {"row": 154, "column": 14}, "end_point": {"row": 154, "column": 15}}, {"id": 448, "type": "identifier", "text": "m;\n", "parent": 443, "children": [], "start_point": {"row": 154, "column": 16}, "end_point": {"row": 154, "column": 19}}, {"id": 449, "type": "return_statement", "text": "turn STEMMA_RET_OK;\n}", "parent": 308, "children": [450], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 25}}, {"id": 450, "type": "identifier", "text": "EMMA_RET_OK;\n", "parent": 449, "children": [], "start_point": {"row": 156, "column": 11}, "end_point": {"row": 156, "column": 24}}]}, "node_categories": {"declarations": {"functions": [3, 5, 36, 38, 129, 131, 233, 235, 308, 310], "variables": [8, 13, 41, 46, 51, 134, 139, 144, 174, 238, 243, 248, 313, 318, 323, 328, 331, 337, 344, 415], "classes": [338], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [17, 18, 19, 26, 61, 62, 63, 66, 69, 70, 72, 73, 84, 88, 89, 90, 91, 92, 93, 96, 101, 102, 103, 106, 111, 112, 113, 116, 121, 124, 152, 153, 154, 157, 161, 162, 164, 165, 178, 179, 180, 181, 182, 183, 186, 190, 191, 192, 195, 199, 200, 201, 204, 209, 212, 215, 218, 219, 220, 222, 223, 227, 256, 257, 258, 261, 265, 266, 268, 269, 272, 279, 280, 285, 288, 289, 290, 291, 292, 293, 299, 300, 349, 353, 357, 358, 365, 366, 367, 377, 381, 384, 385, 398, 399, 408, 409, 410, 425, 429, 434, 435, 444], "assignments": [25, 83, 214, 284, 374, 383, 392, 397, 406, 422, 431, 439, 443], "loops": [373, 421], "conditionals": [4, 6, 9, 12, 15, 16, 20, 22, 24, 27, 28, 30, 32, 35, 37, 39, 42, 45, 50, 55, 60, 64, 67, 68, 71, 74, 77, 80, 82, 86, 97, 107, 117, 125, 128, 130, 132, 135, 138, 143, 148, 151, 155, 158, 160, 163, 166, 168, 171, 173, 177, 187, 196, 205, 213, 217, 230, 232, 234, 236, 239, 242, 247, 251, 253, 255, 259, 262, 264, 267, 270, 274, 276, 278, 281, 283, 287, 296, 298, 301, 303, 307, 309, 311, 314, 317, 319, 322, 327, 330, 334, 341, 345, 347, 350, 352, 355, 356, 359, 361, 363, 364, 368, 370, 375, 378, 380, 382, 386, 388, 389, 391, 393, 400, 402, 403, 405, 407, 411, 414, 418, 423, 426, 428, 430, 432, 436, 438, 440, 442, 446, 448, 450], "returns": [31, 34, 81, 127, 172, 231, 277, 306, 362, 449], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 56, 59, 76, 78, 98, 100, 108, 110, 118, 120, 126, 149, 169, 188, 197, 206, 208, 221, 224, 226, 305, 336, 343, 372, 376, 395, 412, 420, 424], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "unknown", "text_snippet": "STEMMA_RET_t stemma_init(STEMMA_t* dev, uint8_t address) {\n /* Check if the device is available */"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "stemma_init(STEMMA_t* dev, uint8_t address)"}, {"node_id": 36, "universal_type": "function", "name": "unknown", "text_snippet": "STEMMA_RET_t stemma_get_version(STEMMA_t* dev, uint32_t* version) {\n /* Variable for the read res"}, {"node_id": 38, "universal_type": "function", "name": "unknown", "text_snippet": "stemma_get_version(STEMMA_t* dev, uint32_t* version)"}, {"node_id": 129, "universal_type": "function", "name": "unknown", "text_snippet": "EMMA_RET_t stemma_get_temperature(STEMMA_t* dev, float* temperature) {\n /* Variable for the read "}, {"node_id": 131, "universal_type": "function", "name": "unknown", "text_snippet": "emma_get_temperature(STEMMA_t* dev, float* temperature) {"}, {"node_id": 233, "universal_type": "function", "name": "unknown", "text_snippet": "EMMA_RET_t stemma_get_humidity(STEMMA_t* dev, float* humidity) {\n /* Variable for the read result"}, {"node_id": 235, "universal_type": "function", "name": "unknown", "text_snippet": "emma_get_humidity(STEMMA_t* dev, float* humidity) {"}, {"node_id": 308, "universal_type": "function", "name": "unknown", "text_snippet": "EMMA_RET_t stemma_get_humidity_avg(STEMMA_t* dev, STEMMA_AVG_t* structure, float* humidity) {\n /*"}, {"node_id": 310, "universal_type": "function", "name": "unknown", "text_snippet": "emma_get_humidity_avg(STEMMA_t* dev, STEMMA_AVG_t* structure, float* humidity) {"}], "class_declarations": [{"node_id": 338, "universal_type": "class", "name": "unknown", "text_snippet": "atic u"}], "import_statements": [{"node_id": 0, "text": "#include \"stemma_soil.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/*!\n * @brief ASN(x) STEMMA SOIL sensor library -- source file\n *\n * Library to support the STEMMA SOIL sensor.\n *\n * @file /_asnx_lib_/sensors/stemma_soil.c\n * @author <NAME>\n * @version 1.2.0\n * @date 2021/06/07\n *\n * @see https://learn.adafruit.com/adafruit-stemma-soil-sensor-i2c-capacitive-moisture-sensor/\n * @see https://github.com/adafruit/Adafruit_Seesaw\n */\n\n\n/***** INCLUDES *******************************************************/\n#include \"stemma_soil.h\"\n\n\n/***** FUNCTIONS ******************************************************/\n/*!\n * Initialization of the STEMMA SOIL sensor.\n *\n * @param[out] dev Device structure to be filled\n * @param[in] address I2C address of the sensor\n */\nSTEMMA_RET_t stemma_init(STEMMA_t* dev, uint8_t address) {\n /* Check if the device is available */\n if(i2c_is_available(address) == I2C_RET_OK) {\n /* Device is available ... store address in device structure */\n dev->address = address;\n /* Return OK */\n return STEMMA_RET_OK;\n } else {\n /* Return ERROR */\n return STEMMA_RET_ERROR_NODEV;\n }\n}\n\n\n/*!\n * Read the version code of the STEMMA SOIL sensor.\n * Bits [31:16] will be a date code, [15:0] will be the product id.\n * \n * @param[in] dev Device structure\n * @param[out] version Version code read from the sensor\n * @return OK in case of success; ERROR otherwise\n */\nSTEMMA_RET_t stemma_get_version(STEMMA_t* dev, uint32_t* version) {\n /* Variable for the read result */\n uint8_t res[4] = {0};\n /* Read in 4 bytes */\n if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_VERSION<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n /* Copy the result */\n *version = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n /* Return success */\n return STEMMA_RET_OK;\n}\n\n\n/*!\n * Read the temperature of the sensor in degrees Celsius (\u00b0C).\n * \n * @param[in] dev Device structure\n * @param[out] temperature Sensor temperature in degrees Celsius (\u00b0C)\n * @return OK in case of success; ERROR otherwise\n */\nSTEMMA_RET_t stemma_get_temperature(STEMMA_t* dev, float* temperature) {\n /* Variable for the read result */\n uint8_t res[4] = {0};\n /* Read in 4 bytes */\n if(i2c_read16_block(dev->address, (STEMMA_STATUS_BASE | (STEMMA_STATUS_TEMP<<8)), res, 4) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n /* Get intermediate result */\n uint32_t ret = ((uint32_t)res[0] << 24) | ((uint32_t)res[1] << 16) | ((uint32_t)res[2] << 8) | (uint32_t)res[3];\n /* Copy the result */\n *temperature = (1.0 / (1UL << 16)) * (float)ret;\n /* Return success */\n return STEMMA_RET_OK;\n}\n\n\n/*!\n * Read the humidity of the sensor indicated by its capacitance.\n * \n * @param[in] dev Device structure\n * @param[out] humidity Humidity in percent\n * @return OK in case of success; ERROR otherwise\n */\nSTEMMA_RET_t stemma_get_humidity(STEMMA_t* dev, float* humidity) {\n /* Variable for the read result */\n uint16_t ret = STEMMA_TOUCH_WORKING;\n /* Capacitance measurement can take some time */\n do {\n /* Read in 2 bytes */\n if(i2c_read16_U16BE(dev->address, (STEMMA_TOUCH_BASE | (STEMMA_TOUCH_CH0<<8)), &ret) != I2C_RET_OK) {\n /* Reading failed */\n return STEMMA_RET_ERROR;\n }\n }while(ret == STEMMA_TOUCH_WORKING);\n /* Copy the result */\n *humidity = (((float)ret - STEMMA_CAP_MIN) / (STEMMA_CAP_MAX - STEMMA_CAP_MIN)) * 100.0;\n /* Return success */\n return STEMMA_RET_OK;\n}\n\n\n/*!\n * Read the humidity of the sensor indicated by its capacitance and use\n * a floating average over a defined number of readings to smooth the value.\n * \n * @param[in] dev Device structure\n * @param[in] structure Floating average structure\n * @param[out] humidity Humidity in percent\n * @return OK in case of success; ERROR otherwise\n */\nSTEMMA_RET_t stemma_get_humidity_avg(STEMMA_t* dev, STEMMA_AVG_t* structure, float* humidity) {\n /* Temporary variable for the sensor reading */\n float tmp;\n /* Temporary counter variable */\n uint8_t i = 0;\n /* Static variable for the value array index */\n static uint8_t index = 0;\n /* Get a new reading */\n STEMMA_RET_t ret = stemma_get_humidity(dev, &tmp);\n /* Check if the reading is valid */\n if(ret != STEMMA_RET_OK) {\n /* Something went wrong */\n return ret;\n }\n /* Check if it is the first reading */\n if(structure->empty == 0) {\n for(i=0; i<STEMMA_AVG_CNT; i++) {\n structure->value[i] = tmp;\n index = 1;\n }\n } else {\n /* There are other readings available already */\n structure->value[index] = tmp;\n /* Get new index */\n index = (index+1) % STEMMA_AVG_CNT;\n }\n /* Calculate average */\n double sum = 0;\n for(i=0; i<STEMMA_AVG_CNT; i++) {\n sum += structure->value[i];\n }\n sum /= STEMMA_AVG_CNT;\n /* Copy result to pointer location */\n *humidity = sum;\n /* Return with success */\n return STEMMA_RET_OK;\n}\n"}
1
c
// Copyright (c) 2006-2013 INRIA Nancy-Grand Est (France). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 3 of the License, // or (at your option) any later version. // See the file LICENSE.LGPL distributed with CGAL. // // Licensees holding a valid commercial license may use this file in // accordance with the commercial license agreement provided with the software. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // // $URL$ // $Id$ // // Author: <NAME> <<EMAIL>> #ifndef CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1 #define CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1 #include <CGAL/Gmpz.h> #include <CGAL/Gmpfr.h> #include <CGAL/Polynomial.h> #include "RS/rs2_isolator_1.h" #ifdef CGAL_USE_RS3 #include "RS/rs23_k_isolator_1.h" #include "RS/rs3_refiner_1.h" #include "RS/rs3_k_refiner_1.h" #else #include "RS/bisection_refiner_1.h" #endif #include "RS/ak_1.h" namespace CGAL{ // Choice of the isolator: RS default or RS-k. #ifdef CGAL_RS_USE_K typedef CGAL::RS23_k_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr> Isolator; #else typedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr> Isolator; #endif // Choice of the refiner: bisection, RS3 or RS3-k. #ifdef CGAL_USE_RS3 #ifdef CGAL_RS_USE_K typedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr> Refiner; #else typedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr> Refiner; #endif #else typedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr> Refiner; #endif typedef CGAL::RS_AK1::Algebraic_kernel_1< CGAL::Polynomial<CGAL::Gmpz>, CGAL::Gmpfr, Isolator, Refiner> Algebraic_kernel_rs_gmpz_d_1; } #endif // CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1
35.77
62
(translation_unit) "// Copyright (c) 2006-2013 INRIA Nancy-Grand Est (France). All rights reserved.\n//\n// This file is part of CGAL (www.cgal.org); you can redistribute it and/or\n// modify it under the terms of the GNU Lesser General Public License as\n// published by the Free Software Foundation; either version 3 of the License,\n// or (at your option) any later version.\n\n// See the file LICENSE.LGPL distributed with CGAL.\n//\n// Licensees holding a valid commercial license may use this file in\n// accordance with the commercial license agreement provided with the software.\n//\n// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE\n// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n//\n// $URL$\n// $Id$\n//\n// Author: <NAME> <<EMAIL>>\n\n#ifndef CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1\n#define CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1\n\n#include <CGAL/Gmpz.h>\n#include <CGAL/Gmpfr.h>\n#include <CGAL/Polynomial.h>\n#include "RS/rs2_isolator_1.h"\n#ifdef CGAL_USE_RS3\n#include "RS/rs23_k_isolator_1.h"\n#include "RS/rs3_refiner_1.h"\n#include "RS/rs3_k_refiner_1.h"\n#else\n#include "RS/bisection_refiner_1.h"\n#endif\n#include "RS/ak_1.h"\n\nnamespace CGAL{\n\n// Choice of the isolator: RS default or RS-k.\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS23_k_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#else\ntypedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#endif\n\n// Choice of the refiner: bisection, RS3 or RS3-k.\n#ifdef CGAL_USE_RS3\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#else\ntypedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n#else\ntypedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n\ntypedef CGAL::RS_AK1::Algebraic_kernel_1<\n CGAL::Polynomial<CGAL::Gmpz>,\n CGAL::Gmpfr,\n Isolator,\n Refiner>\n Algebraic_kernel_rs_gmpz_d_1;\n\n}\n\n#endif // CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1\n" (comment) "// Copyright (c) 2006-2013 INRIA Nancy-Grand Est (France). All rights reserved." (comment) "//" (comment) "// This file is part of CGAL (www.cgal.org); you can redistribute it and/or" (comment) "// modify it under the terms of the GNU Lesser General Public License as" (comment) "// published by the Free Software Foundation; either version 3 of the License," (comment) "// or (at your option) any later version." (comment) "// See the file LICENSE.LGPL distributed with CGAL." (comment) "//" (comment) "// Licensees holding a valid commercial license may use this file in" (comment) "// accordance with the commercial license agreement provided with the software." (comment) "//" (comment) "// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE" (comment) "// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE." (comment) "//" (comment) "// $URL$" (comment) "// $Id$" (comment) "//" (comment) "// Author: <NAME> <<EMAIL>>" (preproc_ifdef) "#ifndef CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1\n#define CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1\n\n#include <CGAL/Gmpz.h>\n#include <CGAL/Gmpfr.h>\n#include <CGAL/Polynomial.h>\n#include "RS/rs2_isolator_1.h"\n#ifdef CGAL_USE_RS3\n#include "RS/rs23_k_isolator_1.h"\n#include "RS/rs3_refiner_1.h"\n#include "RS/rs3_k_refiner_1.h"\n#else\n#include "RS/bisection_refiner_1.h"\n#endif\n#include "RS/ak_1.h"\n\nnamespace CGAL{\n\n// Choice of the isolator: RS default or RS-k.\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS23_k_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#else\ntypedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#endif\n\n// Choice of the refiner: bisection, RS3 or RS3-k.\n#ifdef CGAL_USE_RS3\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#else\ntypedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n#else\ntypedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n\ntypedef CGAL::RS_AK1::Algebraic_kernel_1<\n CGAL::Polynomial<CGAL::Gmpz>,\n CGAL::Gmpfr,\n Isolator,\n Refiner>\n Algebraic_kernel_rs_gmpz_d_1;\n\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1" (preproc_def) "#define CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1\n" (#define) "#define" (identifier) "CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1" (preproc_include) "#include <CGAL/Gmpz.h>\n" (#include) "#include" (system_lib_string) "<CGAL/Gmpz.h>" (preproc_include) "#include <CGAL/Gmpfr.h>\n" (#include) "#include" (system_lib_string) "<CGAL/Gmpfr.h>" (preproc_include) "#include <CGAL/Polynomial.h>\n" (#include) "#include" (system_lib_string) "<CGAL/Polynomial.h>" (preproc_include) "#include "RS/rs2_isolator_1.h"\n" (#include) "#include" (string_literal) ""RS/rs2_isolator_1.h"" (") """ (string_content) "RS/rs2_isolator_1.h" (") """ (preproc_ifdef) "#ifdef CGAL_USE_RS3\n#include "RS/rs23_k_isolator_1.h"\n#include "RS/rs3_refiner_1.h"\n#include "RS/rs3_k_refiner_1.h"\n#else\n#include "RS/bisection_refiner_1.h"\n#endif" (#ifdef) "#ifdef" (identifier) "CGAL_USE_RS3" (preproc_include) "#include "RS/rs23_k_isolator_1.h"\n" (#include) "#include" (string_literal) ""RS/rs23_k_isolator_1.h"" (") """ (string_content) "RS/rs23_k_isolator_1.h" (") """ (preproc_include) "#include "RS/rs3_refiner_1.h"\n" (#include) "#include" (string_literal) ""RS/rs3_refiner_1.h"" (") """ (string_content) "RS/rs3_refiner_1.h" (") """ (preproc_include) "#include "RS/rs3_k_refiner_1.h"\n" (#include) "#include" (string_literal) ""RS/rs3_k_refiner_1.h"" (") """ (string_content) "RS/rs3_k_refiner_1.h" (") """ (preproc_else) "#else\n#include "RS/bisection_refiner_1.h"\n" (#else) "#else" (preproc_include) "#include "RS/bisection_refiner_1.h"\n" (#include) "#include" (string_literal) ""RS/bisection_refiner_1.h"" (") """ (string_content) "RS/bisection_refiner_1.h" (") """ (#endif) "#endif" (preproc_include) "#include "RS/ak_1.h"\n" (#include) "#include" (string_literal) ""RS/ak_1.h"" (") """ (string_content) "RS/ak_1.h" (") """ (function_definition) "namespace CGAL{\n\n// Choice of the isolator: RS default or RS-k.\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS23_k_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#else\ntypedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#endif\n\n// Choice of the refiner: bisection, RS3 or RS3-k.\n#ifdef CGAL_USE_RS3\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#else\ntypedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n#else\ntypedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n\ntypedef CGAL::RS_AK1::Algebraic_kernel_1<\n CGAL::Polynomial<CGAL::Gmpz>,\n CGAL::Gmpfr,\n Isolator,\n Refiner>\n Algebraic_kernel_rs_gmpz_d_1;\n\n}" (type_identifier) "namespace" (identifier) "CGAL" (compound_statement) "{\n\n// Choice of the isolator: RS default or RS-k.\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS23_k_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#else\ntypedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#endif\n\n// Choice of the refiner: bisection, RS3 or RS3-k.\n#ifdef CGAL_USE_RS3\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#else\ntypedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n#else\ntypedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n\ntypedef CGAL::RS_AK1::Algebraic_kernel_1<\n CGAL::Polynomial<CGAL::Gmpz>,\n CGAL::Gmpfr,\n Isolator,\n Refiner>\n Algebraic_kernel_rs_gmpz_d_1;\n\n}" ({) "{" (comment) "// Choice of the isolator: RS default or RS-k." (preproc_ifdef) "#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS23_k_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#else\ntypedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#endif" (#ifdef) "#ifdef" (identifier) "CGAL_RS_USE_K" (type_definition) "typedef CGAL::RS23_k_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;" (typedef) "typedef" (type_identifier) "CGAL" (ERROR) "::RS23_k_isolator_1<CGAL::Polynomial<CGAL::" (:) ":" (:) ":" (type_identifier) "RS23_k_isolator_1" (<) "<" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Polynomial" (<) "<" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Gmpz" (ERROR) ">" (>) ">" (,) "," (ERROR) "CGAL::Gmpfr>" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Gmpfr" (>) ">" (type_identifier) "Isolator" (;) ";" (preproc_else) "#else\ntypedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;" (#else) "#else" (type_definition) "typedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;" (typedef) "typedef" (type_identifier) "CGAL" (ERROR) "::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::" (:) ":" (:) ":" (type_identifier) "RS2" (:) ":" (:) ":" (type_identifier) "RS2_isolator_1" (<) "<" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Polynomial" (<) "<" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Gmpz" (ERROR) ">" (>) ">" (,) "," (ERROR) "CGAL::Gmpfr>" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Gmpfr" (>) ">" (type_identifier) "Isolator" (;) ";" (#endif) "#endif" (comment) "// Choice of the refiner: bisection, RS3 or RS3-k." (preproc_ifdef) "#ifdef CGAL_USE_RS3\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#else\ntypedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n#else\ntypedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif" (#ifdef) "#ifdef" (identifier) "CGAL_USE_RS3" (preproc_ifdef) "#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#else\ntypedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif" (#ifdef) "#ifdef" (identifier) "CGAL_RS_USE_K" (type_definition) "typedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;" (typedef) "typedef" (type_identifier) "CGAL" (ERROR) "::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::" (:) ":" (:) ":" (type_identifier) "RS3" (:) ":" (:) ":" (type_identifier) "RS3_k_refiner_1" (<) "<" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Polynomial" (<) "<" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Gmpz" (ERROR) ">" (>) ">" (,) "," (ERROR) "CGAL::Gmpfr>" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Gmpfr" (>) ">" (type_identifier) "Refiner" (;) ";" (preproc_else) "#else\ntypedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;" (#else) "#else" (type_definition) "typedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;" (typedef) "typedef" (type_identifier) "CGAL" (ERROR) "::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::" (:) ":" (:) ":" (type_identifier) "RS3" (:) ":" (:) ":" (type_identifier) "RS3_refiner_1" (<) "<" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Polynomial" (<) "<" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Gmpz" (ERROR) ">" (>) ">" (,) "," (ERROR) "CGAL::Gmpfr>" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Gmpfr" (>) ">" (type_identifier) "Refiner" (;) ";" (#endif) "#endif" (preproc_else) "#else\ntypedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;" (#else) "#else" (type_definition) "typedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;" (typedef) "typedef" (type_identifier) "CGAL" (ERROR) "::Bisection_refiner_1<CGAL::Polynomial<CGAL::" (:) ":" (:) ":" (type_identifier) "Bisection_refiner_1" (<) "<" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Polynomial" (<) "<" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Gmpz" (ERROR) ">" (>) ">" (,) "," (ERROR) "CGAL::Gmpfr>" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Gmpfr" (>) ">" (type_identifier) "Refiner" (;) ";" (#endif) "#endif" (type_definition) "typedef CGAL::RS_AK1::Algebraic_kernel_1<\n CGAL::Polynomial<CGAL::Gmpz>,\n CGAL::Gmpfr,\n Isolator,\n Refiner>\n Algebraic_kernel_rs_gmpz_d_1;" (typedef) "typedef" (type_identifier) "CGAL" (ERROR) "::RS_AK1::Algebraic_kernel_1<\n CGAL::Polynomial<CGAL::" (:) ":" (:) ":" (type_identifier) "RS_AK1" (:) ":" (:) ":" (type_identifier) "Algebraic_kernel_1" (<) "<" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Polynomial" (<) "<" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Gmpz" (ERROR) ">" (>) ">" (,) "," (ERROR) "CGAL::" (type_identifier) "CGAL" (:) ":" (:) ":" (type_identifier) "Gmpfr" (,) "," (type_identifier) "Isolator" (,) "," (ERROR) "Refiner>" (type_identifier) "Refiner" (>) ">" (type_identifier) "Algebraic_kernel_rs_gmpz_d_1" (;) ";" (}) "}" (#endif) "#endif" (comment) "// CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1"
289
19
{"language": "c", "success": true, "metadata": {"lines": 62, "avg_line_length": 35.77, "nodes": 176, "errors": 0, "source_hash": "284ee7adb15677bb191667d68b0f0311731cd7abe965e4396e1ac8aaf436ed8c", "categorized_nodes": 117}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1\n#define CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1\n\n#include <CGAL/Gmpz.h>\n#include <CGAL/Gmpfr.h>\n#include <CGAL/Polynomial.h>\n#include \"RS/rs2_isolator_1.h\"\n#ifdef CGAL_USE_RS3\n#include \"RS/rs23_k_isolator_1.h\"\n#include \"RS/rs3_refiner_1.h\"\n#include \"RS/rs3_k_refiner_1.h\"\n#else\n#include \"RS/bisection_refiner_1.h\"\n#endif\n#include \"RS/ak_1.h\"\n\nnamespace CGAL{\n\n// Choice of the isolator: RS default or RS-k.\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS23_k_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#else\ntypedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#endif\n\n// Choice of the refiner: bisection, RS3 or RS3-k.\n#ifdef CGAL_USE_RS3\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#else\ntypedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n#else\ntypedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n\ntypedef CGAL::RS_AK1::Algebraic_kernel_1<\n CGAL::Polynomial<CGAL::Gmpz>,\n CGAL::Gmpfr,\n Isolator,\n Refiner>\n Algebraic_kernel_rs_gmpz_d_1;\n\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 36, 39, 175], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 70, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 2, "type": "identifier", "text": "CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1", "parent": 0, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 41}}, {"id": 3, "type": "preproc_def", "text": "#define CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1\n", "parent": 0, "children": [4, 5], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 5, "type": "identifier", "text": "CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1", "parent": 3, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 41}}, {"id": 6, "type": "preproc_include", "text": "#include <CGAL/Gmpz.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<CGAL/Gmpz.h>", "parent": 6, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 22}}, {"id": 9, "type": "preproc_include", "text": "#include <CGAL/Gmpfr.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<CGAL/Gmpfr.h>", "parent": 9, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 23}}, {"id": 12, "type": "preproc_include", "text": "#include <CGAL/Polynomial.h>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<CGAL/Polynomial.h>", "parent": 12, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 28}}, {"id": 15, "type": "preproc_include", "text": "#include \"RS/rs2_isolator_1.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"RS/rs2_isolator_1.h\"", "parent": 15, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 30}}, {"id": 18, "type": "preproc_ifdef", "text": "#ifdef CGAL_USE_RS3\n#include \"RS/rs23_k_isolator_1.h\"\n#include \"RS/rs3_refiner_1.h\"\n#include \"RS/rs3_k_refiner_1.h\"\n#else\n#include \"RS/bisection_refiner_1.h\"\n#endif", "parent": 0, "children": [19, 20, 21, 24, 27, 30, 35], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 19, "type": "#ifdef", "text": "#ifdef", "parent": 18, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 20, "type": "identifier", "text": "CGAL_USE_RS3", "parent": 18, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 19}}, {"id": 21, "type": "preproc_include", "text": "#include \"RS/rs23_k_isolator_1.h\"\n", "parent": 18, "children": [22, 23], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"RS/rs23_k_isolator_1.h\"", "parent": 21, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 33}}, {"id": 24, "type": "preproc_include", "text": "#include \"RS/rs3_refiner_1.h\"\n", "parent": 18, "children": [25, 26], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"RS/rs3_refiner_1.h\"", "parent": 24, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 29}}, {"id": 27, "type": "preproc_include", "text": "#include \"RS/rs3_k_refiner_1.h\"\n", "parent": 18, "children": [28, 29], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"RS/rs3_k_refiner_1.h\"", "parent": 27, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 31}}, {"id": 30, "type": "preproc_else", "text": "#else\n#include \"RS/bisection_refiner_1.h\"\n", "parent": 18, "children": [31, 32], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 31, "type": "#else", "text": "#else", "parent": 30, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 5}}, {"id": 32, "type": "preproc_include", "text": "#include \"RS/bisection_refiner_1.h\"\n", "parent": 30, "children": [33, 34], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 33, "type": "#include", "text": "#include", "parent": 32, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 34, "type": "string_literal", "text": "\"RS/bisection_refiner_1.h\"", "parent": 32, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 35}}, {"id": 35, "type": "#endif", "text": "#endif", "parent": 18, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 6}}, {"id": 36, "type": "preproc_include", "text": "#include \"RS/ak_1.h\"\n", "parent": 0, "children": [37, 38], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 38, "type": "string_literal", "text": "\"RS/ak_1.h\"", "parent": 36, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 20}}, {"id": 39, "type": "function_definition", "text": "namespace CGAL{\n\n// Choice of the isolator: RS default or RS-k.\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS23_k_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#else\ntypedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#endif\n\n// Choice of the refiner: bisection, RS3 or RS3-k.\n#ifdef CGAL_USE_RS3\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#else\ntypedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n#else\ntypedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n\ntypedef CGAL::RS_AK1::Algebraic_kernel_1<\n CGAL::Polynomial<CGAL::Gmpz>,\n CGAL::Gmpfr,\n Isolator,\n Refiner>\n Algebraic_kernel_rs_gmpz_d_1;\n\n}", "parent": 0, "children": [40, 41], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 68, "column": 1}}, {"id": 40, "type": "type_identifier", "text": "namespace", "parent": 39, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 9}}, {"id": 41, "type": "identifier", "text": "CGAL", "parent": 39, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 14}}, {"id": 42, "type": "preproc_ifdef", "text": "#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS23_k_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#else\ntypedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#endif", "parent": 39, "children": [43, 44, 45, 63, 84], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 45, "column": 6}}, {"id": 43, "type": "#ifdef", "text": "#ifdef", "parent": 42, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 6}}, {"id": 44, "type": "identifier", "text": "CGAL_RS_USE_K", "parent": 42, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 20}}, {"id": 45, "type": "type_definition", "text": "typedef CGAL::RS23_k_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;", "parent": 42, "children": [46, 47, 48, 55, 56, 58, 62], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 57}}, {"id": 46, "type": "typedef", "text": "typedef", "parent": 45, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 7}}, {"id": 47, "type": "type_identifier", "text": "CGAL", "parent": 45, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 12}}, {"id": 48, "type": "ERROR", "text": "::RS23_k_isolator_1<CGAL::Polynomial<CGAL::", "parent": 45, "children": [49, 50, 51, 52, 53, 54], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 55}}, {"id": 49, "type": "type_identifier", "text": "RS23_k_isolator_1", "parent": 48, "children": [], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 31}}, {"id": 50, "type": "<", "text": "<", "parent": 48, "children": [], "start_point": {"row": 40, "column": 31}, "end_point": {"row": 40, "column": 32}}, {"id": 51, "type": "type_identifier", "text": "CGAL", "parent": 48, "children": [], "start_point": {"row": 40, "column": 32}, "end_point": {"row": 40, "column": 36}}, {"id": 52, "type": "type_identifier", "text": "Polynomial", "parent": 48, "children": [], "start_point": {"row": 40, "column": 38}, "end_point": {"row": 40, "column": 48}}, {"id": 53, "type": "<", "text": "<", "parent": 48, "children": [], "start_point": {"row": 40, "column": 48}, "end_point": {"row": 40, "column": 49}}, {"id": 54, "type": "type_identifier", "text": "CGAL", "parent": 48, "children": [], "start_point": {"row": 40, "column": 49}, "end_point": {"row": 40, "column": 53}}, {"id": 55, "type": "type_identifier", "text": "Gmpz", "parent": 45, "children": [], "start_point": {"row": 40, "column": 55}, "end_point": {"row": 40, "column": 59}}, {"id": 56, "type": "ERROR", "text": ">", "parent": 45, "children": [57], "start_point": {"row": 40, "column": 59}, "end_point": {"row": 40, "column": 60}}, {"id": 57, "type": ">", "text": ">", "parent": 56, "children": [], "start_point": {"row": 40, "column": 59}, "end_point": {"row": 40, "column": 60}}, {"id": 58, "type": "ERROR", "text": "CGAL::Gmpfr>", "parent": 45, "children": [59, 60, 61], "start_point": {"row": 40, "column": 61}, "end_point": {"row": 40, "column": 73}}, {"id": 59, "type": "type_identifier", "text": "CGAL", "parent": 58, "children": [], "start_point": {"row": 40, "column": 61}, "end_point": {"row": 40, "column": 65}}, {"id": 60, "type": "type_identifier", "text": "Gmpfr", "parent": 58, "children": [], "start_point": {"row": 40, "column": 67}, "end_point": {"row": 40, "column": 72}}, {"id": 61, "type": ">", "text": ">", "parent": 58, "children": [], "start_point": {"row": 40, "column": 72}, "end_point": {"row": 40, "column": 73}}, {"id": 62, "type": "type_identifier", "text": "Isolator", "parent": 45, "children": [], "start_point": {"row": 41, "column": 48}, "end_point": {"row": 41, "column": 56}}, {"id": 63, "type": "preproc_else", "text": "#else\ntypedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;", "parent": 42, "children": [64, 65], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 44, "column": 57}}, {"id": 64, "type": "#else", "text": "#else", "parent": 63, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 5}}, {"id": 65, "type": "type_definition", "text": "typedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;", "parent": 63, "children": [66, 67, 68, 76, 77, 79, 83], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 57}}, {"id": 66, "type": "typedef", "text": "typedef", "parent": 65, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 7}}, {"id": 67, "type": "type_identifier", "text": "CGAL", "parent": 65, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 12}}, {"id": 68, "type": "ERROR", "text": "::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::", "parent": 65, "children": [69, 70, 71, 72, 73, 74, 75], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 57}}, {"id": 69, "type": "type_identifier", "text": "RS2", "parent": 68, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 17}}, {"id": 70, "type": "type_identifier", "text": "RS2_isolator_1", "parent": 68, "children": [], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 33}}, {"id": 71, "type": "<", "text": "<", "parent": 68, "children": [], "start_point": {"row": 43, "column": 33}, "end_point": {"row": 43, "column": 34}}, {"id": 72, "type": "type_identifier", "text": "CGAL", "parent": 68, "children": [], "start_point": {"row": 43, "column": 34}, "end_point": {"row": 43, "column": 38}}, {"id": 73, "type": "type_identifier", "text": "Polynomial", "parent": 68, "children": [], "start_point": {"row": 43, "column": 40}, "end_point": {"row": 43, "column": 50}}, {"id": 74, "type": "<", "text": "<", "parent": 68, "children": [], "start_point": {"row": 43, "column": 50}, "end_point": {"row": 43, "column": 51}}, {"id": 75, "type": "type_identifier", "text": "CGAL", "parent": 68, "children": [], "start_point": {"row": 43, "column": 51}, "end_point": {"row": 43, "column": 55}}, {"id": 76, "type": "type_identifier", "text": "Gmpz", "parent": 65, "children": [], "start_point": {"row": 43, "column": 57}, "end_point": {"row": 43, "column": 61}}, {"id": 77, "type": "ERROR", "text": ">", "parent": 65, "children": [78], "start_point": {"row": 43, "column": 61}, "end_point": {"row": 43, "column": 62}}, {"id": 78, "type": ">", "text": ">", "parent": 77, "children": [], "start_point": {"row": 43, "column": 61}, "end_point": {"row": 43, "column": 62}}, {"id": 79, "type": "ERROR", "text": "CGAL::Gmpfr>", "parent": 65, "children": [80, 81, 82], "start_point": {"row": 43, "column": 63}, "end_point": {"row": 43, "column": 75}}, {"id": 80, "type": "type_identifier", "text": "CGAL", "parent": 79, "children": [], "start_point": {"row": 43, "column": 63}, "end_point": {"row": 43, "column": 67}}, {"id": 81, "type": "type_identifier", "text": "Gmpfr", "parent": 79, "children": [], "start_point": {"row": 43, "column": 69}, "end_point": {"row": 43, "column": 74}}, {"id": 82, "type": ">", "text": ">", "parent": 79, "children": [], "start_point": {"row": 43, "column": 74}, "end_point": {"row": 43, "column": 75}}, {"id": 83, "type": "type_identifier", "text": "Isolator", "parent": 65, "children": [], "start_point": {"row": 44, "column": 48}, "end_point": {"row": 44, "column": 56}}, {"id": 84, "type": "#endif", "text": "#endif", "parent": 42, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 6}}, {"id": 85, "type": "preproc_ifdef", "text": "#ifdef CGAL_USE_RS3\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#else\ntypedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n#else\ntypedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif", "parent": 39, "children": [86, 87, 88, 132, 152], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 59, "column": 6}}, {"id": 86, "type": "#ifdef", "text": "#ifdef", "parent": 85, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 6}}, {"id": 87, "type": "identifier", "text": "CGAL_USE_RS3", "parent": 85, "children": [], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 19}}, {"id": 88, "type": "preproc_ifdef", "text": "#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#else\ntypedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif", "parent": 85, "children": [89, 90, 91, 110, 131], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 55, "column": 6}}, {"id": 89, "type": "#ifdef", "text": "#ifdef", "parent": 88, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 6}}, {"id": 90, "type": "identifier", "text": "CGAL_RS_USE_K", "parent": 88, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 20}}, {"id": 91, "type": "type_definition", "text": "typedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;", "parent": 88, "children": [92, 93, 94, 102, 103, 105, 109], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 51, "column": 56}}, {"id": 92, "type": "typedef", "text": "typedef", "parent": 91, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 7}}, {"id": 93, "type": "type_identifier", "text": "CGAL", "parent": 91, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 12}}, {"id": 94, "type": "ERROR", "text": "::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::", "parent": 91, "children": [95, 96, 97, 98, 99, 100, 101], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 58}}, {"id": 95, "type": "type_identifier", "text": "RS3", "parent": 94, "children": [], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 17}}, {"id": 96, "type": "type_identifier", "text": "RS3_k_refiner_1", "parent": 94, "children": [], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 34}}, {"id": 97, "type": "<", "text": "<", "parent": 94, "children": [], "start_point": {"row": 50, "column": 34}, "end_point": {"row": 50, "column": 35}}, {"id": 98, "type": "type_identifier", "text": "CGAL", "parent": 94, "children": [], "start_point": {"row": 50, "column": 35}, "end_point": {"row": 50, "column": 39}}, {"id": 99, "type": "type_identifier", "text": "Polynomial", "parent": 94, "children": [], "start_point": {"row": 50, "column": 41}, "end_point": {"row": 50, "column": 51}}, {"id": 100, "type": "<", "text": "<", "parent": 94, "children": [], "start_point": {"row": 50, "column": 51}, "end_point": {"row": 50, "column": 52}}, {"id": 101, "type": "type_identifier", "text": "CGAL", "parent": 94, "children": [], "start_point": {"row": 50, "column": 52}, "end_point": {"row": 50, "column": 56}}, {"id": 102, "type": "type_identifier", "text": "Gmpz", "parent": 91, "children": [], "start_point": {"row": 50, "column": 58}, "end_point": {"row": 50, "column": 62}}, {"id": 103, "type": "ERROR", "text": ">", "parent": 91, "children": [104], "start_point": {"row": 50, "column": 62}, "end_point": {"row": 50, "column": 63}}, {"id": 104, "type": ">", "text": ">", "parent": 103, "children": [], "start_point": {"row": 50, "column": 62}, "end_point": {"row": 50, "column": 63}}, {"id": 105, "type": "ERROR", "text": "CGAL::Gmpfr>", "parent": 91, "children": [106, 107, 108], "start_point": {"row": 50, "column": 64}, "end_point": {"row": 50, "column": 76}}, {"id": 106, "type": "type_identifier", "text": "CGAL", "parent": 105, "children": [], "start_point": {"row": 50, "column": 64}, "end_point": {"row": 50, "column": 68}}, {"id": 107, "type": "type_identifier", "text": "Gmpfr", "parent": 105, "children": [], "start_point": {"row": 50, "column": 70}, "end_point": {"row": 50, "column": 75}}, {"id": 108, "type": ">", "text": ">", "parent": 105, "children": [], "start_point": {"row": 50, "column": 75}, "end_point": {"row": 50, "column": 76}}, {"id": 109, "type": "type_identifier", "text": "Refiner", "parent": 91, "children": [], "start_point": {"row": 51, "column": 48}, "end_point": {"row": 51, "column": 55}}, {"id": 110, "type": "preproc_else", "text": "#else\ntypedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;", "parent": 88, "children": [111, 112], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 54, "column": 56}}, {"id": 111, "type": "#else", "text": "#else", "parent": 110, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 5}}, {"id": 112, "type": "type_definition", "text": "typedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;", "parent": 110, "children": [113, 114, 115, 123, 124, 126, 130], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 54, "column": 56}}, {"id": 113, "type": "typedef", "text": "typedef", "parent": 112, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 7}}, {"id": 114, "type": "type_identifier", "text": "CGAL", "parent": 112, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 12}}, {"id": 115, "type": "ERROR", "text": "::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::", "parent": 112, "children": [116, 117, 118, 119, 120, 121, 122], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 56}}, {"id": 116, "type": "type_identifier", "text": "RS3", "parent": 115, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 17}}, {"id": 117, "type": "type_identifier", "text": "RS3_refiner_1", "parent": 115, "children": [], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 32}}, {"id": 118, "type": "<", "text": "<", "parent": 115, "children": [], "start_point": {"row": 53, "column": 32}, "end_point": {"row": 53, "column": 33}}, {"id": 119, "type": "type_identifier", "text": "CGAL", "parent": 115, "children": [], "start_point": {"row": 53, "column": 33}, "end_point": {"row": 53, "column": 37}}, {"id": 120, "type": "type_identifier", "text": "Polynomial", "parent": 115, "children": [], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 49}}, {"id": 121, "type": "<", "text": "<", "parent": 115, "children": [], "start_point": {"row": 53, "column": 49}, "end_point": {"row": 53, "column": 50}}, {"id": 122, "type": "type_identifier", "text": "CGAL", "parent": 115, "children": [], "start_point": {"row": 53, "column": 50}, "end_point": {"row": 53, "column": 54}}, {"id": 123, "type": "type_identifier", "text": "Gmpz", "parent": 112, "children": [], "start_point": {"row": 53, "column": 56}, "end_point": {"row": 53, "column": 60}}, {"id": 124, "type": "ERROR", "text": ">", "parent": 112, "children": [125], "start_point": {"row": 53, "column": 60}, "end_point": {"row": 53, "column": 61}}, {"id": 125, "type": ">", "text": ">", "parent": 124, "children": [], "start_point": {"row": 53, "column": 60}, "end_point": {"row": 53, "column": 61}}, {"id": 126, "type": "ERROR", "text": "CGAL::Gmpfr>", "parent": 112, "children": [127, 128, 129], "start_point": {"row": 53, "column": 62}, "end_point": {"row": 53, "column": 74}}, {"id": 127, "type": "type_identifier", "text": "CGAL", "parent": 126, "children": [], "start_point": {"row": 53, "column": 62}, "end_point": {"row": 53, "column": 66}}, {"id": 128, "type": "type_identifier", "text": "Gmpfr", "parent": 126, "children": [], "start_point": {"row": 53, "column": 68}, "end_point": {"row": 53, "column": 73}}, {"id": 129, "type": ">", "text": ">", "parent": 126, "children": [], "start_point": {"row": 53, "column": 73}, "end_point": {"row": 53, "column": 74}}, {"id": 130, "type": "type_identifier", "text": "Refiner", "parent": 112, "children": [], "start_point": {"row": 54, "column": 48}, "end_point": {"row": 54, "column": 55}}, {"id": 131, "type": "#endif", "text": "#endif", "parent": 88, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 6}}, {"id": 132, "type": "preproc_else", "text": "#else\ntypedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;", "parent": 85, "children": [133, 134], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 58, "column": 56}}, {"id": 133, "type": "#else", "text": "#else", "parent": 132, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 5}}, {"id": 134, "type": "type_definition", "text": "typedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;", "parent": 132, "children": [135, 136, 137, 144, 145, 147, 151], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 58, "column": 56}}, {"id": 135, "type": "typedef", "text": "typedef", "parent": 134, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 7}}, {"id": 136, "type": "type_identifier", "text": "CGAL", "parent": 134, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 12}}, {"id": 137, "type": "ERROR", "text": "::Bisection_refiner_1<CGAL::Polynomial<CGAL::", "parent": 134, "children": [138, 139, 140, 141, 142, 143], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 57}}, {"id": 138, "type": "type_identifier", "text": "Bisection_refiner_1", "parent": 137, "children": [], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 33}}, {"id": 139, "type": "<", "text": "<", "parent": 137, "children": [], "start_point": {"row": 57, "column": 33}, "end_point": {"row": 57, "column": 34}}, {"id": 140, "type": "type_identifier", "text": "CGAL", "parent": 137, "children": [], "start_point": {"row": 57, "column": 34}, "end_point": {"row": 57, "column": 38}}, {"id": 141, "type": "type_identifier", "text": "Polynomial", "parent": 137, "children": [], "start_point": {"row": 57, "column": 40}, "end_point": {"row": 57, "column": 50}}, {"id": 142, "type": "<", "text": "<", "parent": 137, "children": [], "start_point": {"row": 57, "column": 50}, "end_point": {"row": 57, "column": 51}}, {"id": 143, "type": "type_identifier", "text": "CGAL", "parent": 137, "children": [], "start_point": {"row": 57, "column": 51}, "end_point": {"row": 57, "column": 55}}, {"id": 144, "type": "type_identifier", "text": "Gmpz", "parent": 134, "children": [], "start_point": {"row": 57, "column": 57}, "end_point": {"row": 57, "column": 61}}, {"id": 145, "type": "ERROR", "text": ">", "parent": 134, "children": [146], "start_point": {"row": 57, "column": 61}, "end_point": {"row": 57, "column": 62}}, {"id": 146, "type": ">", "text": ">", "parent": 145, "children": [], "start_point": {"row": 57, "column": 61}, "end_point": {"row": 57, "column": 62}}, {"id": 147, "type": "ERROR", "text": "CGAL::Gmpfr>", "parent": 134, "children": [148, 149, 150], "start_point": {"row": 57, "column": 63}, "end_point": {"row": 57, "column": 75}}, {"id": 148, "type": "type_identifier", "text": "CGAL", "parent": 147, "children": [], "start_point": {"row": 57, "column": 63}, "end_point": {"row": 57, "column": 67}}, {"id": 149, "type": "type_identifier", "text": "Gmpfr", "parent": 147, "children": [], "start_point": {"row": 57, "column": 69}, "end_point": {"row": 57, "column": 74}}, {"id": 150, "type": ">", "text": ">", "parent": 147, "children": [], "start_point": {"row": 57, "column": 74}, "end_point": {"row": 57, "column": 75}}, {"id": 151, "type": "type_identifier", "text": "Refiner", "parent": 134, "children": [], "start_point": {"row": 58, "column": 48}, "end_point": {"row": 58, "column": 55}}, {"id": 152, "type": "#endif", "text": "#endif", "parent": 85, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 6}}, {"id": 153, "type": "type_definition", "text": "typedef CGAL::RS_AK1::Algebraic_kernel_1<\n CGAL::Polynomial<CGAL::Gmpz>,\n CGAL::Gmpfr,\n Isolator,\n Refiner>\n Algebraic_kernel_rs_gmpz_d_1;", "parent": 39, "children": [154, 155, 156, 164, 165, 167, 169, 170, 171, 174], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 66, "column": 77}}, {"id": 154, "type": "typedef", "text": "typedef", "parent": 153, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 7}}, {"id": 155, "type": "type_identifier", "text": "CGAL", "parent": 153, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 12}}, {"id": 156, "type": "ERROR", "text": "::RS_AK1::Algebraic_kernel_1<\n CGAL::Polynomial<CGAL::", "parent": 153, "children": [157, 158, 159, 160, 161, 162, 163], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 62, "column": 31}}, {"id": 157, "type": "type_identifier", "text": "RS_AK1", "parent": 156, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 20}}, {"id": 158, "type": "type_identifier", "text": "Algebraic_kernel_1", "parent": 156, "children": [], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 40}}, {"id": 159, "type": "<", "text": "<", "parent": 156, "children": [], "start_point": {"row": 61, "column": 40}, "end_point": {"row": 61, "column": 41}}, {"id": 160, "type": "type_identifier", "text": "CGAL", "parent": 156, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 12}}, {"id": 161, "type": "type_identifier", "text": "Polynomial", "parent": 156, "children": [], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 24}}, {"id": 162, "type": "<", "text": "<", "parent": 156, "children": [], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 25}}, {"id": 163, "type": "type_identifier", "text": "CGAL", "parent": 156, "children": [], "start_point": {"row": 62, "column": 25}, "end_point": {"row": 62, "column": 29}}, {"id": 164, "type": "type_identifier", "text": "Gmpz", "parent": 153, "children": [], "start_point": {"row": 62, "column": 31}, "end_point": {"row": 62, "column": 35}}, {"id": 165, "type": "ERROR", "text": ">", "parent": 153, "children": [166], "start_point": {"row": 62, "column": 35}, "end_point": {"row": 62, "column": 36}}, {"id": 166, "type": ">", "text": ">", "parent": 165, "children": [], "start_point": {"row": 62, "column": 35}, "end_point": {"row": 62, "column": 36}}, {"id": 167, "type": "ERROR", "text": "CGAL::", "parent": 153, "children": [168], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 14}}, {"id": 168, "type": "type_identifier", "text": "CGAL", "parent": 167, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 12}}, {"id": 169, "type": "type_identifier", "text": "Gmpfr", "parent": 153, "children": [], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 19}}, {"id": 170, "type": "type_identifier", "text": "Isolator", "parent": 153, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 16}}, {"id": 171, "type": "ERROR", "text": "Refiner>", "parent": 153, "children": [172, 173], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 16}}, {"id": 172, "type": "type_identifier", "text": "Refiner", "parent": 171, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 15}}, {"id": 173, "type": ">", "text": ">", "parent": 171, "children": [], "start_point": {"row": 65, "column": 15}, "end_point": {"row": 65, "column": 16}}, {"id": 174, "type": "type_identifier", "text": "Algebraic_kernel_rs_gmpz_d_1", "parent": 153, "children": [], "start_point": {"row": 66, "column": 48}, "end_point": {"row": 66, "column": 76}}, {"id": 175, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 6}}]}, "node_categories": {"declarations": {"functions": [39], "variables": [45, 65, 91, 112, 134, 153], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 21, 22, 24, 25, 27, 28, 32, 33, 36, 37], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 18, 19, 20, 35, 40, 41, 42, 43, 44, 47, 49, 51, 52, 54, 55, 59, 60, 62, 67, 69, 70, 72, 73, 75, 76, 80, 81, 83, 84, 85, 86, 87, 88, 89, 90, 93, 95, 96, 98, 99, 101, 102, 106, 107, 109, 114, 116, 117, 119, 120, 122, 123, 127, 128, 130, 131, 136, 138, 140, 141, 143, 144, 148, 149, 151, 152, 155, 157, 158, 160, 161, 163, 164, 168, 169, 170, 172, 174, 175], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 23, 26, 29, 34, 38], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "namespace CGAL{\n\n// Choice of the isolator: RS default or RS-k.\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::R"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <CGAL/Gmpz.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <CGAL/Gmpfr.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <CGAL/Polynomial.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"RS/rs2_isolator_1.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 21, "text": "#include \"RS/rs23_k_isolator_1.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"RS/rs3_refiner_1.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"RS/rs3_k_refiner_1.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 32, "text": "#include \"RS/bisection_refiner_1.h\"\n"}, {"node_id": 33, "text": "#include"}, {"node_id": 36, "text": "#include \"RS/ak_1.h\"\n"}, {"node_id": 37, "text": "#include"}]}, "original_source_code": "// Copyright (c) 2006-2013 INRIA Nancy-Grand Est (France). All rights reserved.\n//\n// This file is part of CGAL (www.cgal.org); you can redistribute it and/or\n// modify it under the terms of the GNU Lesser General Public License as\n// published by the Free Software Foundation; either version 3 of the License,\n// or (at your option) any later version.\n\n// See the file LICENSE.LGPL distributed with CGAL.\n//\n// Licensees holding a valid commercial license may use this file in\n// accordance with the commercial license agreement provided with the software.\n//\n// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE\n// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n//\n// $URL$\n// $Id$\n//\n// Author: <NAME> <<EMAIL>>\n\n#ifndef CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1\n#define CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1\n\n#include <CGAL/Gmpz.h>\n#include <CGAL/Gmpfr.h>\n#include <CGAL/Polynomial.h>\n#include \"RS/rs2_isolator_1.h\"\n#ifdef CGAL_USE_RS3\n#include \"RS/rs23_k_isolator_1.h\"\n#include \"RS/rs3_refiner_1.h\"\n#include \"RS/rs3_k_refiner_1.h\"\n#else\n#include \"RS/bisection_refiner_1.h\"\n#endif\n#include \"RS/ak_1.h\"\n\nnamespace CGAL{\n\n// Choice of the isolator: RS default or RS-k.\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS23_k_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#else\ntypedef CGAL::RS2::RS2_isolator_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Isolator;\n#endif\n\n// Choice of the refiner: bisection, RS3 or RS3-k.\n#ifdef CGAL_USE_RS3\n#ifdef CGAL_RS_USE_K\ntypedef CGAL::RS3::RS3_k_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#else\ntypedef CGAL::RS3::RS3_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n#else\ntypedef CGAL::Bisection_refiner_1<CGAL::Polynomial<CGAL::Gmpz>,CGAL::Gmpfr>\n Refiner;\n#endif\n\ntypedef CGAL::RS_AK1::Algebraic_kernel_1<\n CGAL::Polynomial<CGAL::Gmpz>,\n CGAL::Gmpfr,\n Isolator,\n Refiner>\n Algebraic_kernel_rs_gmpz_d_1;\n\n}\n\n#endif // CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1\n"}
2
c
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>. // #import "Base.h" @interface UTRANNeighbhorMeasurements : Base { } - (void)updateWithData:(id)arg1 logCode:(int)arg2; // IMP=0x00000001000166ec - (id)getLogCodeArray; // IMP=0x000000010001668c - (id)getSectionName; // IMP=0x0000000100016680 - (id)initWithDict:(id)arg1 codeDict:(id)arg2; // IMP=0x00000001000165ec @end
31.14
14
(translation_unit) "//\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#import "Base.h"\n\n@interface UTRANNeighbhorMeasurements : Base\n{\n}\n\n- (void)updateWithData:(id)arg1 logCode:(int)arg2; // IMP=0x00000001000166ec\n- (id)getLogCodeArray; // IMP=0x000000010001668c\n- (id)getSectionName; // IMP=0x0000000100016680\n- (id)initWithDict:(id)arg1 codeDict:(id)arg2; // IMP=0x00000001000165ec\n\n@end\n\n" (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) "//" (preproc_call) "#import "Base.h"\n" (preproc_directive) "#import" (preproc_arg) ""Base.h"" (ERROR) "@" (ERROR) "@" (function_definition) "interface UTRANNeighbhorMeasurements : Base\n{\n}" (type_identifier) "interface" (identifier) "UTRANNeighbhorMeasurements" (ERROR) ": Base" (:) ":" (identifier) "Base" (compound_statement) "{\n}" ({) "{" (}) "}" (ERROR) "- (void)updateWithData:(id)arg1 logCode:(" (unary_expression) "- (void)updateWithData" (-) "-" (cast_expression) "(void)updateWithData" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "updateWithData" (:) ":" (() "(" (identifier) "id" ()) ")" (type_identifier) "arg1" (identifier) "logCode" (:) ":" (() "(" (declaration) "int)arg2;" (primitive_type) "int" (ERROR) ")" ()) ")" (identifier) "arg2" (;) ";" (comment) "// IMP=0x00000001000166ec" (expression_statement) "- (id)getLogCodeArray;" (unary_expression) "- (id)getLogCodeArray" (-) "-" (cast_expression) "(id)getLogCodeArray" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "getLogCodeArray" (;) ";" (comment) "// IMP=0x000000010001668c" (expression_statement) "- (id)getSectionName;" (unary_expression) "- (id)getSectionName" (-) "-" (cast_expression) "(id)getSectionName" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "getSectionName" (;) ";" (comment) "// IMP=0x0000000100016680" (ERROR) "- (id)initWithDict:(id)" (unary_expression) "- (id)initWithDict" (-) "-" (cast_expression) "(id)initWithDict" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "initWithDict" (:) ":" (() "(" (identifier) "id" ()) ")" (declaration) "arg1 codeDict:(id)arg2;" (type_identifier) "arg1" (identifier) "codeDict" (ERROR) ":(id)arg2" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg2" (;) ";" (comment) "// IMP=0x00000001000165ec" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
95
9
{"language": "c", "success": true, "metadata": {"lines": 14, "avg_line_length": 31.14, "nodes": 51, "errors": 0, "source_hash": "5b4cf8632c26df141bb4492629d11d8dca4b77e0cd2afafe5b353f446b2a99e5", "categorized_nodes": 31}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import \"Base.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "\"Base.h\"", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 16}}, {"id": 3, "type": "ERROR", "text": "@", "parent": null, "children": [4], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 5, "type": "function_definition", "text": "interface UTRANNeighbhorMeasurements : Base\n{\n}", "parent": null, "children": [6, 7, 8], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 10, "column": 1}}, {"id": 6, "type": "type_identifier", "text": "interface", "parent": 5, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 10}}, {"id": 7, "type": "identifier", "text": "UTRANNeighbhorMeasurements", "parent": 5, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 37}}, {"id": 8, "type": "ERROR", "text": ": Base", "parent": 5, "children": [9], "start_point": {"row": 8, "column": 38}, "end_point": {"row": 8, "column": 44}}, {"id": 9, "type": "identifier", "text": "Base", "parent": 8, "children": [], "start_point": {"row": 8, "column": 40}, "end_point": {"row": 8, "column": 44}}, {"id": 10, "type": "ERROR", "text": "- (void)updateWithData:(id)arg1 logCode:(", "parent": null, "children": [11, 17, 18, 19], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 41}}, {"id": 11, "type": "unary_expression", "text": "- (void)updateWithData", "parent": 10, "children": [12, 13], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 22}}, {"id": 12, "type": "-", "text": "-", "parent": 11, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 13, "type": "cast_expression", "text": "(void)updateWithData", "parent": 11, "children": [14, 16], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 22}}, {"id": 14, "type": "type_descriptor", "text": "void", "parent": 13, "children": [15], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 7}}, {"id": 15, "type": "primitive_type", "text": "void", "parent": 14, "children": [], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 7}}, {"id": 16, "type": "identifier", "text": "updateWithData", "parent": 13, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 22}}, {"id": 17, "type": "identifier", "text": "id", "parent": 10, "children": [], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 26}}, {"id": 18, "type": "type_identifier", "text": "arg1", "parent": 10, "children": [], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 31}}, {"id": 19, "type": "identifier", "text": "logCode", "parent": 10, "children": [], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 39}}, {"id": 20, "type": "declaration", "text": "int)arg2;", "parent": null, "children": [21, 22], "start_point": {"row": 12, "column": 41}, "end_point": {"row": 12, "column": 50}}, {"id": 21, "type": "primitive_type", "text": "int", "parent": 20, "children": [], "start_point": {"row": 12, "column": 41}, "end_point": {"row": 12, "column": 44}}, {"id": 22, "type": "identifier", "text": "arg2", "parent": 20, "children": [], "start_point": {"row": 12, "column": 45}, "end_point": {"row": 12, "column": 49}}, {"id": 23, "type": "unary_expression", "text": "- (id)getLogCodeArray", "parent": null, "children": [24, 25], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 21}}, {"id": 24, "type": "-", "text": "-", "parent": 23, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 25, "type": "cast_expression", "text": "(id)getLogCodeArray", "parent": 23, "children": [26, 28], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 21}}, {"id": 26, "type": "type_descriptor", "text": "id", "parent": 25, "children": [27], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 5}}, {"id": 27, "type": "type_identifier", "text": "id", "parent": 26, "children": [], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 5}}, {"id": 28, "type": "identifier", "text": "getLogCodeArray", "parent": 25, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 21}}, {"id": 29, "type": "unary_expression", "text": "- (id)getSectionName", "parent": null, "children": [30, 31], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 20}}, {"id": 30, "type": "-", "text": "-", "parent": 29, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 31, "type": "cast_expression", "text": "(id)getSectionName", "parent": 29, "children": [32, 34], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 20}}, {"id": 32, "type": "type_descriptor", "text": "id", "parent": 31, "children": [33], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 5}}, {"id": 33, "type": "type_identifier", "text": "id", "parent": 32, "children": [], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 5}}, {"id": 34, "type": "identifier", "text": "getSectionName", "parent": 31, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 20}}, {"id": 35, "type": "ERROR", "text": "- (id)initWithDict:(id)", "parent": null, "children": [36, 42], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 23}}, {"id": 36, "type": "unary_expression", "text": "- (id)initWithDict", "parent": 35, "children": [37, 38], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 18}}, {"id": 37, "type": "-", "text": "-", "parent": 36, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 38, "type": "cast_expression", "text": "(id)initWithDict", "parent": 36, "children": [39, 41], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 18}}, {"id": 39, "type": "type_descriptor", "text": "id", "parent": 38, "children": [40], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 5}}, {"id": 40, "type": "type_identifier", "text": "id", "parent": 39, "children": [], "start_point": {"row": 15, "column": 3}, "end_point": {"row": 15, "column": 5}}, {"id": 41, "type": "identifier", "text": "initWithDict", "parent": 38, "children": [], "start_point": {"row": 15, "column": 6}, "end_point": {"row": 15, "column": 18}}, {"id": 42, "type": "identifier", "text": "id", "parent": 35, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 22}}, {"id": 43, "type": "declaration", "text": "arg1 codeDict:(id)arg2;", "parent": null, "children": [44, 45, 46], "start_point": {"row": 15, "column": 23}, "end_point": {"row": 15, "column": 46}}, {"id": 44, "type": "type_identifier", "text": "arg1", "parent": 43, "children": [], "start_point": {"row": 15, "column": 23}, "end_point": {"row": 15, "column": 27}}, {"id": 45, "type": "identifier", "text": "codeDict", "parent": 43, "children": [], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 36}}, {"id": 46, "type": "ERROR", "text": ":(id)arg2", "parent": 43, "children": [47, 48], "start_point": {"row": 15, "column": 36}, "end_point": {"row": 15, "column": 45}}, {"id": 47, "type": "identifier", "text": "id", "parent": 46, "children": [], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 40}}, {"id": 48, "type": "identifier", "text": "arg2", "parent": 46, "children": [], "start_point": {"row": 15, "column": 41}, "end_point": {"row": 15, "column": 45}}, {"id": 49, "type": "ERROR", "text": "@", "parent": null, "children": [50], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 50, "type": "ERROR", "text": "@", "parent": 49, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 1}}]}, "node_categories": {"declarations": {"functions": [5], "variables": [20, 43], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [11, 13, 23, 25, 29, 31, 36, 38], "assignments": [], "loops": [], "conditionals": [6, 7, 9, 16, 17, 18, 19, 22, 27, 28, 33, 34, 40, 41, 42, 44, 45, 47, 48], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 5, "universal_type": "function", "name": "UTRANNeighbhorMeasurements", "text_snippet": "interface UTRANNeighbhorMeasurements : Base\n{\n}"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\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#import \"Base.h\"\n\n@interface UTRANNeighbhorMeasurements : Base\n{\n}\n\n- (void)updateWithData:(id)arg1 logCode:(int)arg2;\t// IMP=0x00000001000166ec\n- (id)getLogCodeArray;\t// IMP=0x000000010001668c\n- (id)getSectionName;\t// IMP=0x0000000100016680\n- (id)initWithDict:(id)arg1 codeDict:(id)arg2;\t// IMP=0x00000001000165ec\n\n@end\n\n"}
3
c
#include <string.h> #include <stdlib.h> #include "vm_loader.h" #include "vm.h" #include "vm_util.h" #include "vm_extern.h" #include "vm_hashmap.h" #include "vm_string.h" #include "vm_symbols.h" typedef struct { char name[16]; uint32_t size; uint8_t data[]; } vm_loader_section_t; typedef struct { vm_type_t type; vm_mmid_t name; vm_mmid_t parent; uint32_t code; } vm_loader_object_t; typedef enum { SECTION_PROGMEM, SECTION_SHIFT, SECTION_OBJECT, SECTION_STRING, SECTION_EXTERN, SECTION_SYM_STRING, SECTION_SYM_FILE, SECTION_SYM_FUNC, SECTION_SYM_LINE } section_type_t; typedef struct { const char *const name; const section_type_t type; } section_loader_def_t; static wstring_t** externs = NULL; const void* vm_loader_error_data = NULL; const section_loader_def_t section_name_map[] = { {"PROGMEM", SECTION_PROGMEM}, {"SHIFT", SECTION_SHIFT}, {"OBJECT", SECTION_OBJECT}, {"STRING", SECTION_STRING}, {"EXTERN", SECTION_EXTERN}, {"SYM_STRING", SECTION_SYM_STRING}, {"SYM_FILE", SECTION_SYM_FILE}, {"SYM_FUNC", SECTION_SYM_FUNC}, {"SYM_LINE", SECTION_SYM_LINE}, }; static wstring_t** section_create_stringmap(const uint8_t* data) { uint32_t count = ((uint32_t*)data)[0]; data += 4; wstring_t** map = (wstring_t**)malloc(count * sizeof(wstring_t**)); for (uint32_t i = 0; i < count; i++) { map[i] = (wstring_t*)data; uint32_t size = map[i]->size; data += 4 + ((size + (size&1)) * 2); } return map; } static vm_loader_error_t section_loader_progmem(const uint8_t* data, uint32_t size) { UNUSED(size); vm_progmem = (vm_opcode_t*)data; return VM_LOADER_ERROR_NONE; } static vm_loader_error_t section_loader_shift(const uint8_t* data, uint32_t size) { UNUSED(size); vm_memmap_set_offset(((uint32_t*)data)[0]); return VM_LOADER_ERROR_NONE; } static vm_loader_error_t section_loader_object(const uint8_t* data, uint32_t size) { vm_loader_object_t* objects = (vm_loader_object_t*)data; vm_loader_object_t* end = (vm_loader_object_t*)(data + size); while (objects < end) { void* address = (void*)objects->code; vm_type_t type = objects->type; if (objects->type == VM_EXTERN_T) { address = (void*)vm_extern_native_resolve(externs[objects->code]); if (address == NULL) { address = (void*)vm_extern_resolve(externs[objects->code]); if (address == (void*)0xFFFFFFFF) { vm_loader_error_data = externs[objects->code]; return VM_LOADER_ERROR_EXTERN; } else { type = VM_EXTERN_T; } } else { type = VM_NATIVE_T; } } uint32_t mmid = vm_hashmap_create(8, type, objects->name, objects->parent, address); if (objects->parent == MMID_NULL) { vm_root = mmid; } objects += 1; } return VM_LOADER_ERROR_NONE; } static vm_loader_error_t section_loader_string(const uint8_t* data, uint32_t size) { UNUSED(size); uint32_t count = ((uint32_t*)data)[0]; data += 4; for (uint32_t i = 0; i < count; i++) { wstring_t* str = (wstring_t*)data; vm_string_insert(str->data, str->size); data += 4 + ((str->size + (str->size&1)) * 2); } return VM_LOADER_ERROR_NONE; } static vm_loader_error_t section_loader_extern(const uint8_t* data, uint32_t size) { UNUSED(size); externs = section_create_stringmap(data); return VM_LOADER_ERROR_NONE; } static vm_loader_error_t section_loader_sym_string(const uint8_t* data, uint32_t size) { UNUSED(size); vm_symbols.strings = section_create_stringmap(data); return VM_LOADER_ERROR_NONE; } static vm_loader_error_t section_loader_sym_file(const uint8_t* data, uint32_t size) { vm_symbols.files = (vm_symbols_entry_t*)data; vm_symbols.files_count = size / sizeof(vm_symbols_entry_t); return VM_LOADER_ERROR_NONE; } static vm_loader_error_t section_loader_sym_func(const uint8_t* data, uint32_t size) { vm_symbols.functions = (vm_symbols_entry_t*)data; vm_symbols.functions_count = size / sizeof(vm_symbols_entry_t); return VM_LOADER_ERROR_NONE; } static vm_loader_error_t section_loader_sym_line(const uint8_t* data, uint32_t size) { vm_symbols.lines = (vm_symbols_entry_t*)data; vm_symbols.lines_count = size / sizeof(vm_symbols_entry_t); return VM_LOADER_ERROR_NONE; } static vm_loader_error_t section_loader_dispatch(const char* name, const uint8_t* data, uint32_t size) { for (uint32_t i = 0; i < sizeof(section_name_map) / sizeof(section_name_map[0]); i++) { if (strncmp(name, section_name_map[i].name, 16) == 0) { switch (section_name_map[i].type) { case SECTION_PROGMEM: return section_loader_progmem(data, size); case SECTION_SHIFT: return section_loader_shift(data, size); case SECTION_OBJECT: return section_loader_object(data, size); case SECTION_STRING: return section_loader_string(data, size); case SECTION_EXTERN: return section_loader_extern(data, size); case SECTION_SYM_STRING: return section_loader_sym_string(data, size); case SECTION_SYM_FILE: return section_loader_sym_file(data, size); case SECTION_SYM_FUNC: return section_loader_sym_func(data, size); case SECTION_SYM_LINE: return section_loader_sym_line(data, size); } break; } } vm_loader_error_data = name; return VM_LOADER_ERROR_SECTION; } vm_loader_error_t vm_loader_load(const uint8_t* data, uint32_t size) { if (strncmp((char*)data, "ASB", 4) != 0) { return VM_LOADER_ERROR_MAGICDWORD; } const uint8_t* end = data + size; data += 4; while (data < end) { const vm_loader_section_t* section = (vm_loader_section_t*)data; vm_loader_error_t ret = section_loader_dispatch(section->name, section->data, section->size); if (ret != VM_LOADER_ERROR_NONE) { return ret; } data += section->size + sizeof(vm_loader_section_t); } return VM_LOADER_ERROR_NONE; } const void* vm_loader_get_error_data(void) { return vm_loader_error_data; }
30.98
181
(translation_unit) "#include <string.h>\n#include <stdlib.h>\n#include "vm_loader.h"\n#include "vm.h"\n#include "vm_util.h"\n#include "vm_extern.h"\n#include "vm_hashmap.h"\n#include "vm_string.h"\n#include "vm_symbols.h"\n\ntypedef struct {\n char name[16];\n uint32_t size;\n uint8_t data[];\n} vm_loader_section_t;\n\ntypedef struct {\n vm_type_t type;\n vm_mmid_t name;\n vm_mmid_t parent;\n uint32_t code;\n} vm_loader_object_t;\n\ntypedef enum {\n SECTION_PROGMEM,\n SECTION_SHIFT,\n SECTION_OBJECT,\n SECTION_STRING,\n SECTION_EXTERN,\n SECTION_SYM_STRING,\n SECTION_SYM_FILE,\n SECTION_SYM_FUNC,\n SECTION_SYM_LINE\n} section_type_t;\n\ntypedef struct {\n const char *const name;\n const section_type_t type;\n} section_loader_def_t;\n\nstatic wstring_t** externs = NULL;\nconst void* vm_loader_error_data = NULL;\n\nconst section_loader_def_t section_name_map[] = {\n {"PROGMEM", SECTION_PROGMEM},\n {"SHIFT", SECTION_SHIFT},\n {"OBJECT", SECTION_OBJECT},\n {"STRING", SECTION_STRING},\n {"EXTERN", SECTION_EXTERN},\n {"SYM_STRING", SECTION_SYM_STRING},\n {"SYM_FILE", SECTION_SYM_FILE},\n {"SYM_FUNC", SECTION_SYM_FUNC},\n {"SYM_LINE", SECTION_SYM_LINE},\n};\n\nstatic wstring_t** section_create_stringmap(const uint8_t* data) {\n uint32_t count = ((uint32_t*)data)[0];\n data += 4;\n wstring_t** map = (wstring_t**)malloc(count * sizeof(wstring_t**));\n for (uint32_t i = 0; i < count; i++) {\n map[i] = (wstring_t*)data;\n uint32_t size = map[i]->size;\n data += 4 + ((size + (size&1)) * 2);\n }\n return map;\n}\n\nstatic vm_loader_error_t section_loader_progmem(const uint8_t* data, uint32_t size) {\n UNUSED(size);\n vm_progmem = (vm_opcode_t*)data;\n return VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_shift(const uint8_t* data, uint32_t size) {\n UNUSED(size);\n vm_memmap_set_offset(((uint32_t*)data)[0]);\n return VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_object(const uint8_t* data, uint32_t size) {\n vm_loader_object_t* objects = (vm_loader_object_t*)data;\n vm_loader_object_t* end = (vm_loader_object_t*)(data + size);\n while (objects < end) {\n void* address = (void*)objects->code;\n vm_type_t type = objects->type;\n if (objects->type == VM_EXTERN_T) {\n address = (void*)vm_extern_native_resolve(externs[objects->code]);\n if (address == NULL) {\n address = (void*)vm_extern_resolve(externs[objects->code]);\n if (address == (void*)0xFFFFFFFF) {\n vm_loader_error_data = externs[objects->code];\n return VM_LOADER_ERROR_EXTERN;\n } else {\n type = VM_EXTERN_T;\n }\n } else {\n type = VM_NATIVE_T;\n }\n }\n uint32_t mmid = vm_hashmap_create(8, type, objects->name, objects->parent, address);\n if (objects->parent == MMID_NULL) {\n vm_root = mmid;\n }\n objects += 1;\n }\n return VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_string(const uint8_t* data, uint32_t size) {\n UNUSED(size);\n uint32_t count = ((uint32_t*)data)[0];\n data += 4;\n for (uint32_t i = 0; i < count; i++) {\n wstring_t* str = (wstring_t*)data;\n vm_string_insert(str->data, str->size);\n data += 4 + ((str->size + (str->size&1)) * 2);\n }\n return VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_extern(const uint8_t* data, uint32_t size) {\n UNUSED(size);\n externs = section_create_stringmap(data);\n return VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_sym_string(const uint8_t* data, uint32_t size) {\n UNUSED(size);\n vm_symbols.strings = section_create_stringmap(data);\n return VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_sym_file(const uint8_t* data, uint32_t size) {\n vm_symbols.files = (vm_symbols_entry_t*)data;\n vm_symbols.files_count = size / sizeof(vm_symbols_entry_t);\n return VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_sym_func(const uint8_t* data, uint32_t size) {\n vm_symbols.functions = (vm_symbols_entry_t*)data;\n vm_symbols.functions_count = size / sizeof(vm_symbols_entry_t);\n return VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_sym_line(const uint8_t* data, uint32_t size) {\n vm_symbols.lines = (vm_symbols_entry_t*)data;\n vm_symbols.lines_count = size / sizeof(vm_symbols_entry_t);\n return VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_dispatch(const char* name, const uint8_t* data, uint32_t size) {\n for (uint32_t i = 0; i < sizeof(section_name_map) / sizeof(section_name_map[0]); i++) {\n if (strncmp(name, section_name_map[i].name, 16) == 0) {\n switch (section_name_map[i].type) {\n case SECTION_PROGMEM:\n return section_loader_progmem(data, size);\n case SECTION_SHIFT:\n return section_loader_shift(data, size);\n case SECTION_OBJECT:\n return section_loader_object(data, size);\n case SECTION_STRING:\n return section_loader_string(data, size);\n case SECTION_EXTERN:\n return section_loader_extern(data, size);\n case SECTION_SYM_STRING:\n return section_loader_sym_string(data, size);\n case SECTION_SYM_FILE:\n return section_loader_sym_file(data, size);\n case SECTION_SYM_FUNC:\n return section_loader_sym_func(data, size);\n case SECTION_SYM_LINE:\n return section_loader_sym_line(data, size);\n }\n break;\n }\n }\n vm_loader_error_data = name;\n return VM_LOADER_ERROR_SECTION;\n}\n\nvm_loader_error_t vm_loader_load(const uint8_t* data, uint32_t size) {\n if (strncmp((char*)data, "ASB", 4) != 0) {\n return VM_LOADER_ERROR_MAGICDWORD;\n }\n const uint8_t* end = data + size;\n data += 4;\n while (data < end) {\n const vm_loader_section_t* section = (vm_loader_section_t*)data;\n vm_loader_error_t ret = section_loader_dispatch(section->name, section->data, section->size);\n if (ret != VM_LOADER_ERROR_NONE) {\n return ret;\n }\n data += section->size + sizeof(vm_loader_section_t);\n }\n return VM_LOADER_ERROR_NONE;\n}\n\nconst void* vm_loader_get_error_data(void) {\n return vm_loader_error_data;\n}\n" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include "vm_loader.h"\n" (#include) "#include" (string_literal) ""vm_loader.h"" (") """ (string_content) "vm_loader.h" (") """ (preproc_include) "#include "vm.h"\n" (#include) "#include" (string_literal) ""vm.h"" (") """ (string_content) "vm.h" (") """ (preproc_include) "#include "vm_util.h"\n" (#include) "#include" (string_literal) ""vm_util.h"" (") """ (string_content) "vm_util.h" (") """ (preproc_include) "#include "vm_extern.h"\n" (#include) "#include" (string_literal) ""vm_extern.h"" (") """ (string_content) "vm_extern.h" (") """ (preproc_include) "#include "vm_hashmap.h"\n" (#include) "#include" (string_literal) ""vm_hashmap.h"" (") """ (string_content) "vm_hashmap.h" (") """ (preproc_include) "#include "vm_string.h"\n" (#include) "#include" (string_literal) ""vm_string.h"" (") """ (string_content) "vm_string.h" (") """ (preproc_include) "#include "vm_symbols.h"\n" (#include) "#include" (string_literal) ""vm_symbols.h"" (") """ (string_content) "vm_symbols.h" (") """ (type_definition) "typedef struct {\n char name[16];\n uint32_t size;\n uint8_t data[];\n} vm_loader_section_t;" (typedef) "typedef" (struct_specifier) "struct {\n char name[16];\n uint32_t size;\n uint8_t data[];\n}" (struct) "struct" (field_declaration_list) "{\n char name[16];\n uint32_t size;\n uint8_t data[];\n}" ({) "{" (field_declaration) "char name[16];" (primitive_type) "char" (array_declarator) "name[16]" (field_identifier) "name" ([) "[" (number_literal) "16" (]) "]" (;) ";" (field_declaration) "uint32_t size;" (primitive_type) "uint32_t" (field_identifier) "size" (;) ";" (field_declaration) "uint8_t data[];" (primitive_type) "uint8_t" (array_declarator) "data[]" (field_identifier) "data" ([) "[" (]) "]" (;) ";" (}) "}" (type_identifier) "vm_loader_section_t" (;) ";" (type_definition) "typedef struct {\n vm_type_t type;\n vm_mmid_t name;\n vm_mmid_t parent;\n uint32_t code;\n} vm_loader_object_t;" (typedef) "typedef" (struct_specifier) "struct {\n vm_type_t type;\n vm_mmid_t name;\n vm_mmid_t parent;\n uint32_t code;\n}" (struct) "struct" (field_declaration_list) "{\n vm_type_t type;\n vm_mmid_t name;\n vm_mmid_t parent;\n uint32_t code;\n}" ({) "{" (field_declaration) "vm_type_t type;" (type_identifier) "vm_type_t" (field_identifier) "type" (;) ";" (field_declaration) "vm_mmid_t name;" (type_identifier) "vm_mmid_t" (field_identifier) "name" (;) ";" (field_declaration) "vm_mmid_t parent;" (type_identifier) "vm_mmid_t" (field_identifier) "parent" (;) ";" (field_declaration) "uint32_t code;" (primitive_type) "uint32_t" (field_identifier) "code" (;) ";" (}) "}" (type_identifier) "vm_loader_object_t" (;) ";" (type_definition) "typedef enum {\n SECTION_PROGMEM,\n SECTION_SHIFT,\n SECTION_OBJECT,\n SECTION_STRING,\n SECTION_EXTERN,\n SECTION_SYM_STRING,\n SECTION_SYM_FILE,\n SECTION_SYM_FUNC,\n SECTION_SYM_LINE\n} section_type_t;" (typedef) "typedef" (enum_specifier) "enum {\n SECTION_PROGMEM,\n SECTION_SHIFT,\n SECTION_OBJECT,\n SECTION_STRING,\n SECTION_EXTERN,\n SECTION_SYM_STRING,\n SECTION_SYM_FILE,\n SECTION_SYM_FUNC,\n SECTION_SYM_LINE\n}" (enum) "enum" (enumerator_list) "{\n SECTION_PROGMEM,\n SECTION_SHIFT,\n SECTION_OBJECT,\n SECTION_STRING,\n SECTION_EXTERN,\n SECTION_SYM_STRING,\n SECTION_SYM_FILE,\n SECTION_SYM_FUNC,\n SECTION_SYM_LINE\n}" ({) "{" (enumerator) "SECTION_PROGMEM" (identifier) "SECTION_PROGMEM" (,) "," (enumerator) "SECTION_SHIFT" (identifier) "SECTION_SHIFT" (,) "," (enumerator) "SECTION_OBJECT" (identifier) "SECTION_OBJECT" (,) "," (enumerator) "SECTION_STRING" (identifier) "SECTION_STRING" (,) "," (enumerator) "SECTION_EXTERN" (identifier) "SECTION_EXTERN" (,) "," (enumerator) "SECTION_SYM_STRING" (identifier) "SECTION_SYM_STRING" (,) "," (enumerator) "SECTION_SYM_FILE" (identifier) "SECTION_SYM_FILE" (,) "," (enumerator) "SECTION_SYM_FUNC" (identifier) "SECTION_SYM_FUNC" (,) "," (enumerator) "SECTION_SYM_LINE" (identifier) "SECTION_SYM_LINE" (}) "}" (type_identifier) "section_type_t" (;) ";" (type_definition) "typedef struct {\n const char *const name;\n const section_type_t type;\n} section_loader_def_t;" (typedef) "typedef" (struct_specifier) "struct {\n const char *const name;\n const section_type_t type;\n}" (struct) "struct" (field_declaration_list) "{\n const char *const name;\n const section_type_t type;\n}" ({) "{" (field_declaration) "const char *const name;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*const name" (*) "*" (type_qualifier) "const" (const) "const" (field_identifier) "name" (;) ";" (field_declaration) "const section_type_t type;" (type_qualifier) "const" (const) "const" (type_identifier) "section_type_t" (field_identifier) "type" (;) ";" (}) "}" (type_identifier) "section_loader_def_t" (;) ";" (declaration) "static wstring_t** externs = NULL;" (storage_class_specifier) "static" (static) "static" (type_identifier) "wstring_t" (init_declarator) "** externs = NULL" (pointer_declarator) "** externs" (*) "*" (pointer_declarator) "* externs" (*) "*" (identifier) "externs" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (declaration) "const void* vm_loader_error_data = NULL;" (type_qualifier) "const" (const) "const" (primitive_type) "void" (init_declarator) "* vm_loader_error_data = NULL" (pointer_declarator) "* vm_loader_error_data" (*) "*" (identifier) "vm_loader_error_data" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (declaration) "const section_loader_def_t section_name_map[] = {\n {"PROGMEM", SECTION_PROGMEM},\n {"SHIFT", SECTION_SHIFT},\n {"OBJECT", SECTION_OBJECT},\n {"STRING", SECTION_STRING},\n {"EXTERN", SECTION_EXTERN},\n {"SYM_STRING", SECTION_SYM_STRING},\n {"SYM_FILE", SECTION_SYM_FILE},\n {"SYM_FUNC", SECTION_SYM_FUNC},\n {"SYM_LINE", SECTION_SYM_LINE},\n};" (type_qualifier) "const" (const) "const" (type_identifier) "section_loader_def_t" (init_declarator) "section_name_map[] = {\n {"PROGMEM", SECTION_PROGMEM},\n {"SHIFT", SECTION_SHIFT},\n {"OBJECT", SECTION_OBJECT},\n {"STRING", SECTION_STRING},\n {"EXTERN", SECTION_EXTERN},\n {"SYM_STRING", SECTION_SYM_STRING},\n {"SYM_FILE", SECTION_SYM_FILE},\n {"SYM_FUNC", SECTION_SYM_FUNC},\n {"SYM_LINE", SECTION_SYM_LINE},\n}" (array_declarator) "section_name_map[]" (identifier) "section_name_map" ([) "[" (]) "]" (=) "=" (initializer_list) "{\n {"PROGMEM", SECTION_PROGMEM},\n {"SHIFT", SECTION_SHIFT},\n {"OBJECT", SECTION_OBJECT},\n {"STRING", SECTION_STRING},\n {"EXTERN", SECTION_EXTERN},\n {"SYM_STRING", SECTION_SYM_STRING},\n {"SYM_FILE", SECTION_SYM_FILE},\n {"SYM_FUNC", SECTION_SYM_FUNC},\n {"SYM_LINE", SECTION_SYM_LINE},\n}" ({) "{" (initializer_list) "{"PROGMEM", SECTION_PROGMEM}" ({) "{" (string_literal) ""PROGMEM"" (") """ (string_content) "PROGMEM" (") """ (,) "," (identifier) "SECTION_PROGMEM" (}) "}" (,) "," (initializer_list) "{"SHIFT", SECTION_SHIFT}" ({) "{" (string_literal) ""SHIFT"" (") """ (string_content) "SHIFT" (") """ (,) "," (identifier) "SECTION_SHIFT" (}) "}" (,) "," (initializer_list) "{"OBJECT", SECTION_OBJECT}" ({) "{" (string_literal) ""OBJECT"" (") """ (string_content) "OBJECT" (") """ (,) "," (identifier) "SECTION_OBJECT" (}) "}" (,) "," (initializer_list) "{"STRING", SECTION_STRING}" ({) "{" (string_literal) ""STRING"" (") """ (string_content) "STRING" (") """ (,) "," (identifier) "SECTION_STRING" (}) "}" (,) "," (initializer_list) "{"EXTERN", SECTION_EXTERN}" ({) "{" (string_literal) ""EXTERN"" (") """ (string_content) "EXTERN" (") """ (,) "," (identifier) "SECTION_EXTERN" (}) "}" (,) "," (initializer_list) "{"SYM_STRING", SECTION_SYM_STRING}" ({) "{" (string_literal) ""SYM_STRING"" (") """ (string_content) "SYM_STRING" (") """ (,) "," (identifier) "SECTION_SYM_STRING" (}) "}" (,) "," (initializer_list) "{"SYM_FILE", SECTION_SYM_FILE}" ({) "{" (string_literal) ""SYM_FILE"" (") """ (string_content) "SYM_FILE" (") """ (,) "," (identifier) "SECTION_SYM_FILE" (}) "}" (,) "," (initializer_list) "{"SYM_FUNC", SECTION_SYM_FUNC}" ({) "{" (string_literal) ""SYM_FUNC"" (") """ (string_content) "SYM_FUNC" (") """ (,) "," (identifier) "SECTION_SYM_FUNC" (}) "}" (,) "," (initializer_list) "{"SYM_LINE", SECTION_SYM_LINE}" ({) "{" (string_literal) ""SYM_LINE"" (") """ (string_content) "SYM_LINE" (") """ (,) "," (identifier) "SECTION_SYM_LINE" (}) "}" (,) "," (}) "}" (;) ";" (function_definition) "static wstring_t** section_create_stringmap(const uint8_t* data) {\n uint32_t count = ((uint32_t*)data)[0];\n data += 4;\n wstring_t** map = (wstring_t**)malloc(count * sizeof(wstring_t**));\n for (uint32_t i = 0; i < count; i++) {\n map[i] = (wstring_t*)data;\n uint32_t size = map[i]->size;\n data += 4 + ((size + (size&1)) * 2);\n }\n return map;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "wstring_t" (pointer_declarator) "** section_create_stringmap(const uint8_t* data)" (*) "*" (pointer_declarator) "* section_create_stringmap(const uint8_t* data)" (*) "*" (function_declarator) "section_create_stringmap(const uint8_t* data)" (identifier) "section_create_stringmap" (parameter_list) "(const uint8_t* data)" (() "(" (parameter_declaration) "const uint8_t* data" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (identifier) "data" ()) ")" (compound_statement) "{\n uint32_t count = ((uint32_t*)data)[0];\n data += 4;\n wstring_t** map = (wstring_t**)malloc(count * sizeof(wstring_t**));\n for (uint32_t i = 0; i < count; i++) {\n map[i] = (wstring_t*)data;\n uint32_t size = map[i]->size;\n data += 4 + ((size + (size&1)) * 2);\n }\n return map;\n}" ({) "{" (declaration) "uint32_t count = ((uint32_t*)data)[0];" (primitive_type) "uint32_t" (init_declarator) "count = ((uint32_t*)data)[0]" (identifier) "count" (=) "=" (subscript_expression) "((uint32_t*)data)[0]" (parenthesized_expression) "((uint32_t*)data)" (() "(" (cast_expression) "(uint32_t*)data" (() "(" (type_descriptor) "uint32_t*" (primitive_type) "uint32_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "data" ()) ")" ([) "[" (number_literal) "0" (]) "]" (;) ";" (expression_statement) "data += 4;" (assignment_expression) "data += 4" (identifier) "data" (+=) "+=" (number_literal) "4" (;) ";" (declaration) "wstring_t** map = (wstring_t**)malloc(count * sizeof(wstring_t**));" (type_identifier) "wstring_t" (init_declarator) "** map = (wstring_t**)malloc(count * sizeof(wstring_t**))" (pointer_declarator) "** map" (*) "*" (pointer_declarator) "* map" (*) "*" (identifier) "map" (=) "=" (cast_expression) "(wstring_t**)malloc(count * sizeof(wstring_t**))" (() "(" (type_descriptor) "wstring_t**" (type_identifier) "wstring_t" (abstract_pointer_declarator) "**" (*) "*" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(count * sizeof(wstring_t**))" (identifier) "malloc" (argument_list) "(count * sizeof(wstring_t**))" (() "(" (binary_expression) "count * sizeof(wstring_t**)" (identifier) "count" (*) "*" (sizeof_expression) "sizeof(wstring_t**)" (sizeof) "sizeof" (() "(" (type_descriptor) "wstring_t**" (type_identifier) "wstring_t" (abstract_pointer_declarator) "**" (*) "*" (abstract_pointer_declarator) "*" (*) "*" ()) ")" ()) ")" (;) ";" (for_statement) "for (uint32_t i = 0; i < count; i++) {\n map[i] = (wstring_t*)data;\n uint32_t size = map[i]->size;\n data += 4 + ((size + (size&1)) * 2);\n }" (for) "for" (() "(" (declaration) "uint32_t i = 0;" (primitive_type) "uint32_t" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < count" (identifier) "i" (<) "<" (identifier) "count" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n map[i] = (wstring_t*)data;\n uint32_t size = map[i]->size;\n data += 4 + ((size + (size&1)) * 2);\n }" ({) "{" (expression_statement) "map[i] = (wstring_t*)data;" (assignment_expression) "map[i] = (wstring_t*)data" (subscript_expression) "map[i]" (identifier) "map" ([) "[" (identifier) "i" (]) "]" (=) "=" (cast_expression) "(wstring_t*)data" (() "(" (type_descriptor) "wstring_t*" (type_identifier) "wstring_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "data" (;) ";" (declaration) "uint32_t size = map[i]->size;" (primitive_type) "uint32_t" (init_declarator) "size = map[i]->size" (identifier) "size" (=) "=" (field_expression) "map[i]->size" (subscript_expression) "map[i]" (identifier) "map" ([) "[" (identifier) "i" (]) "]" (->) "->" (field_identifier) "size" (;) ";" (expression_statement) "data += 4 + ((size + (size&1)) * 2);" (assignment_expression) "data += 4 + ((size + (size&1)) * 2)" (identifier) "data" (+=) "+=" (binary_expression) "4 + ((size + (size&1)) * 2)" (number_literal) "4" (+) "+" (parenthesized_expression) "((size + (size&1)) * 2)" (() "(" (binary_expression) "(size + (size&1)) * 2" (parenthesized_expression) "(size + (size&1))" (() "(" (binary_expression) "size + (size&1)" (identifier) "size" (+) "+" (parenthesized_expression) "(size&1)" (() "(" (binary_expression) "size&1" (identifier) "size" (&) "&" (number_literal) "1" ()) ")" ()) ")" (*) "*" (number_literal) "2" ()) ")" (;) ";" (}) "}" (return_statement) "return map;" (return) "return" (identifier) "map" (;) ";" (}) "}" (function_definition) "static vm_loader_error_t section_loader_progmem(const uint8_t* data, uint32_t size) {\n UNUSED(size);\n vm_progmem = (vm_opcode_t*)data;\n return VM_LOADER_ERROR_NONE;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "vm_loader_error_t" (function_declarator) "section_loader_progmem(const uint8_t* data, uint32_t size)" (identifier) "section_loader_progmem" (parameter_list) "(const uint8_t* data, uint32_t size)" (() "(" (parameter_declaration) "const uint8_t* data" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" ()) ")" (compound_statement) "{\n UNUSED(size);\n vm_progmem = (vm_opcode_t*)data;\n return VM_LOADER_ERROR_NONE;\n}" ({) "{" (expression_statement) "UNUSED(size);" (call_expression) "UNUSED(size)" (identifier) "UNUSED" (argument_list) "(size)" (() "(" (identifier) "size" ()) ")" (;) ";" (expression_statement) "vm_progmem = (vm_opcode_t*)data;" (assignment_expression) "vm_progmem = (vm_opcode_t*)data" (identifier) "vm_progmem" (=) "=" (cast_expression) "(vm_opcode_t*)data" (() "(" (type_descriptor) "vm_opcode_t*" (type_identifier) "vm_opcode_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "data" (;) ";" (return_statement) "return VM_LOADER_ERROR_NONE;" (return) "return" (identifier) "VM_LOADER_ERROR_NONE" (;) ";" (}) "}" (function_definition) "static vm_loader_error_t section_loader_shift(const uint8_t* data, uint32_t size) {\n UNUSED(size);\n vm_memmap_set_offset(((uint32_t*)data)[0]);\n return VM_LOADER_ERROR_NONE;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "vm_loader_error_t" (function_declarator) "section_loader_shift(const uint8_t* data, uint32_t size)" (identifier) "section_loader_shift" (parameter_list) "(const uint8_t* data, uint32_t size)" (() "(" (parameter_declaration) "const uint8_t* data" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" ()) ")" (compound_statement) "{\n UNUSED(size);\n vm_memmap_set_offset(((uint32_t*)data)[0]);\n return VM_LOADER_ERROR_NONE;\n}" ({) "{" (expression_statement) "UNUSED(size);" (call_expression) "UNUSED(size)" (identifier) "UNUSED" (argument_list) "(size)" (() "(" (identifier) "size" ()) ")" (;) ";" (expression_statement) "vm_memmap_set_offset(((uint32_t*)data)[0]);" (call_expression) "vm_memmap_set_offset(((uint32_t*)data)[0])" (identifier) "vm_memmap_set_offset" (argument_list) "(((uint32_t*)data)[0])" (() "(" (subscript_expression) "((uint32_t*)data)[0]" (parenthesized_expression) "((uint32_t*)data)" (() "(" (cast_expression) "(uint32_t*)data" (() "(" (type_descriptor) "uint32_t*" (primitive_type) "uint32_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "data" ()) ")" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (return_statement) "return VM_LOADER_ERROR_NONE;" (return) "return" (identifier) "VM_LOADER_ERROR_NONE" (;) ";" (}) "}" (function_definition) "static vm_loader_error_t section_loader_object(const uint8_t* data, uint32_t size) {\n vm_loader_object_t* objects = (vm_loader_object_t*)data;\n vm_loader_object_t* end = (vm_loader_object_t*)(data + size);\n while (objects < end) {\n void* address = (void*)objects->code;\n vm_type_t type = objects->type;\n if (objects->type == VM_EXTERN_T) {\n address = (void*)vm_extern_native_resolve(externs[objects->code]);\n if (address == NULL) {\n address = (void*)vm_extern_resolve(externs[objects->code]);\n if (address == (void*)0xFFFFFFFF) {\n vm_loader_error_data = externs[objects->code];\n return VM_LOADER_ERROR_EXTERN;\n } else {\n type = VM_EXTERN_T;\n }\n } else {\n type = VM_NATIVE_T;\n }\n }\n uint32_t mmid = vm_hashmap_create(8, type, objects->name, objects->parent, address);\n if (objects->parent == MMID_NULL) {\n vm_root = mmid;\n }\n objects += 1;\n }\n return VM_LOADER_ERROR_NONE;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "vm_loader_error_t" (function_declarator) "section_loader_object(const uint8_t* data, uint32_t size)" (identifier) "section_loader_object" (parameter_list) "(const uint8_t* data, uint32_t size)" (() "(" (parameter_declaration) "const uint8_t* data" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" ()) ")" (compound_statement) "{\n vm_loader_object_t* objects = (vm_loader_object_t*)data;\n vm_loader_object_t* end = (vm_loader_object_t*)(data + size);\n while (objects < end) {\n void* address = (void*)objects->code;\n vm_type_t type = objects->type;\n if (objects->type == VM_EXTERN_T) {\n address = (void*)vm_extern_native_resolve(externs[objects->code]);\n if (address == NULL) {\n address = (void*)vm_extern_resolve(externs[objects->code]);\n if (address == (void*)0xFFFFFFFF) {\n vm_loader_error_data = externs[objects->code];\n return VM_LOADER_ERROR_EXTERN;\n } else {\n type = VM_EXTERN_T;\n }\n } else {\n type = VM_NATIVE_T;\n }\n }\n uint32_t mmid = vm_hashmap_create(8, type, objects->name, objects->parent, address);\n if (objects->parent == MMID_NULL) {\n vm_root = mmid;\n }\n objects += 1;\n }\n return VM_LOADER_ERROR_NONE;\n}" ({) "{" (declaration) "vm_loader_object_t* objects = (vm_loader_object_t*)data;" (type_identifier) "vm_loader_object_t" (init_declarator) "* objects = (vm_loader_object_t*)data" (pointer_declarator) "* objects" (*) "*" (identifier) "objects" (=) "=" (cast_expression) "(vm_loader_object_t*)data" (() "(" (type_descriptor) "vm_loader_object_t*" (type_identifier) "vm_loader_object_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "data" (;) ";" (declaration) "vm_loader_object_t* end = (vm_loader_object_t*)(data + size);" (type_identifier) "vm_loader_object_t" (init_declarator) "* end = (vm_loader_object_t*)(data + size)" (pointer_declarator) "* end" (*) "*" (identifier) "end" (=) "=" (cast_expression) "(vm_loader_object_t*)(data + size)" (() "(" (type_descriptor) "vm_loader_object_t*" (type_identifier) "vm_loader_object_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (parenthesized_expression) "(data + size)" (() "(" (binary_expression) "data + size" (identifier) "data" (+) "+" (identifier) "size" ()) ")" (;) ";" (while_statement) "while (objects < end) {\n void* address = (void*)objects->code;\n vm_type_t type = objects->type;\n if (objects->type == VM_EXTERN_T) {\n address = (void*)vm_extern_native_resolve(externs[objects->code]);\n if (address == NULL) {\n address = (void*)vm_extern_resolve(externs[objects->code]);\n if (address == (void*)0xFFFFFFFF) {\n vm_loader_error_data = externs[objects->code];\n return VM_LOADER_ERROR_EXTERN;\n } else {\n type = VM_EXTERN_T;\n }\n } else {\n type = VM_NATIVE_T;\n }\n }\n uint32_t mmid = vm_hashmap_create(8, type, objects->name, objects->parent, address);\n if (objects->parent == MMID_NULL) {\n vm_root = mmid;\n }\n objects += 1;\n }" (while) "while" (parenthesized_expression) "(objects < end)" (() "(" (binary_expression) "objects < end" (identifier) "objects" (<) "<" (identifier) "end" ()) ")" (compound_statement) "{\n void* address = (void*)objects->code;\n vm_type_t type = objects->type;\n if (objects->type == VM_EXTERN_T) {\n address = (void*)vm_extern_native_resolve(externs[objects->code]);\n if (address == NULL) {\n address = (void*)vm_extern_resolve(externs[objects->code]);\n if (address == (void*)0xFFFFFFFF) {\n vm_loader_error_data = externs[objects->code];\n return VM_LOADER_ERROR_EXTERN;\n } else {\n type = VM_EXTERN_T;\n }\n } else {\n type = VM_NATIVE_T;\n }\n }\n uint32_t mmid = vm_hashmap_create(8, type, objects->name, objects->parent, address);\n if (objects->parent == MMID_NULL) {\n vm_root = mmid;\n }\n objects += 1;\n }" ({) "{" (declaration) "void* address = (void*)objects->code;" (primitive_type) "void" (init_declarator) "* address = (void*)objects->code" (pointer_declarator) "* address" (*) "*" (identifier) "address" (=) "=" (cast_expression) "(void*)objects->code" (() "(" (type_descriptor) "void*" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (field_expression) "objects->code" (identifier) "objects" (->) "->" (field_identifier) "code" (;) ";" (declaration) "vm_type_t type = objects->type;" (type_identifier) "vm_type_t" (init_declarator) "type = objects->type" (identifier) "type" (=) "=" (field_expression) "objects->type" (identifier) "objects" (->) "->" (field_identifier) "type" (;) ";" (if_statement) "if (objects->type == VM_EXTERN_T) {\n address = (void*)vm_extern_native_resolve(externs[objects->code]);\n if (address == NULL) {\n address = (void*)vm_extern_resolve(externs[objects->code]);\n if (address == (void*)0xFFFFFFFF) {\n vm_loader_error_data = externs[objects->code];\n return VM_LOADER_ERROR_EXTERN;\n } else {\n type = VM_EXTERN_T;\n }\n } else {\n type = VM_NATIVE_T;\n }\n }" (if) "if" (parenthesized_expression) "(objects->type == VM_EXTERN_T)" (() "(" (binary_expression) "objects->type == VM_EXTERN_T" (field_expression) "objects->type" (identifier) "objects" (->) "->" (field_identifier) "type" (==) "==" (identifier) "VM_EXTERN_T" ()) ")" (compound_statement) "{\n address = (void*)vm_extern_native_resolve(externs[objects->code]);\n if (address == NULL) {\n address = (void*)vm_extern_resolve(externs[objects->code]);\n if (address == (void*)0xFFFFFFFF) {\n vm_loader_error_data = externs[objects->code];\n return VM_LOADER_ERROR_EXTERN;\n } else {\n type = VM_EXTERN_T;\n }\n } else {\n type = VM_NATIVE_T;\n }\n }" ({) "{" (expression_statement) "address = (void*)vm_extern_native_resolve(externs[objects->code]);" (assignment_expression) "address = (void*)vm_extern_native_resolve(externs[objects->code])" (identifier) "address" (=) "=" (cast_expression) "(void*)vm_extern_native_resolve(externs[objects->code])" (() "(" (type_descriptor) "void*" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "vm_extern_native_resolve(externs[objects->code])" (identifier) "vm_extern_native_resolve" (argument_list) "(externs[objects->code])" (() "(" (subscript_expression) "externs[objects->code]" (identifier) "externs" ([) "[" (field_expression) "objects->code" (identifier) "objects" (->) "->" (field_identifier) "code" (]) "]" ()) ")" (;) ";" (if_statement) "if (address == NULL) {\n address = (void*)vm_extern_resolve(externs[objects->code]);\n if (address == (void*)0xFFFFFFFF) {\n vm_loader_error_data = externs[objects->code];\n return VM_LOADER_ERROR_EXTERN;\n } else {\n type = VM_EXTERN_T;\n }\n } else {\n type = VM_NATIVE_T;\n }" (if) "if" (parenthesized_expression) "(address == NULL)" (() "(" (binary_expression) "address == NULL" (identifier) "address" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n address = (void*)vm_extern_resolve(externs[objects->code]);\n if (address == (void*)0xFFFFFFFF) {\n vm_loader_error_data = externs[objects->code];\n return VM_LOADER_ERROR_EXTERN;\n } else {\n type = VM_EXTERN_T;\n }\n }" ({) "{" (expression_statement) "address = (void*)vm_extern_resolve(externs[objects->code]);" (assignment_expression) "address = (void*)vm_extern_resolve(externs[objects->code])" (identifier) "address" (=) "=" (cast_expression) "(void*)vm_extern_resolve(externs[objects->code])" (() "(" (type_descriptor) "void*" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "vm_extern_resolve(externs[objects->code])" (identifier) "vm_extern_resolve" (argument_list) "(externs[objects->code])" (() "(" (subscript_expression) "externs[objects->code]" (identifier) "externs" ([) "[" (field_expression) "objects->code" (identifier) "objects" (->) "->" (field_identifier) "code" (]) "]" ()) ")" (;) ";" (if_statement) "if (address == (void*)0xFFFFFFFF) {\n vm_loader_error_data = externs[objects->code];\n return VM_LOADER_ERROR_EXTERN;\n } else {\n type = VM_EXTERN_T;\n }" (if) "if" (parenthesized_expression) "(address == (void*)0xFFFFFFFF)" (() "(" (binary_expression) "address == (void*)0xFFFFFFFF" (identifier) "address" (==) "==" (cast_expression) "(void*)0xFFFFFFFF" (() "(" (type_descriptor) "void*" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (number_literal) "0xFFFFFFFF" ()) ")" (compound_statement) "{\n vm_loader_error_data = externs[objects->code];\n return VM_LOADER_ERROR_EXTERN;\n }" ({) "{" (expression_statement) "vm_loader_error_data = externs[objects->code];" (assignment_expression) "vm_loader_error_data = externs[objects->code]" (identifier) "vm_loader_error_data" (=) "=" (subscript_expression) "externs[objects->code]" (identifier) "externs" ([) "[" (field_expression) "objects->code" (identifier) "objects" (->) "->" (field_identifier) "code" (]) "]" (;) ";" (return_statement) "return VM_LOADER_ERROR_EXTERN;" (return) "return" (identifier) "VM_LOADER_ERROR_EXTERN" (;) ";" (}) "}" (else_clause) "else {\n type = VM_EXTERN_T;\n }" (else) "else" (compound_statement) "{\n type = VM_EXTERN_T;\n }" ({) "{" (expression_statement) "type = VM_EXTERN_T;" (assignment_expression) "type = VM_EXTERN_T" (identifier) "type" (=) "=" (identifier) "VM_EXTERN_T" (;) ";" (}) "}" (}) "}" (else_clause) "else {\n type = VM_NATIVE_T;\n }" (else) "else" (compound_statement) "{\n type = VM_NATIVE_T;\n }" ({) "{" (expression_statement) "type = VM_NATIVE_T;" (assignment_expression) "type = VM_NATIVE_T" (identifier) "type" (=) "=" (identifier) "VM_NATIVE_T" (;) ";" (}) "}" (}) "}" (declaration) "uint32_t mmid = vm_hashmap_create(8, type, objects->name, objects->parent, address);" (primitive_type) "uint32_t" (init_declarator) "mmid = vm_hashmap_create(8, type, objects->name, objects->parent, address)" (identifier) "mmid" (=) "=" (call_expression) "vm_hashmap_create(8, type, objects->name, objects->parent, address)" (identifier) "vm_hashmap_create" (argument_list) "(8, type, objects->name, objects->parent, address)" (() "(" (number_literal) "8" (,) "," (identifier) "type" (,) "," (field_expression) "objects->name" (identifier) "objects" (->) "->" (field_identifier) "name" (,) "," (field_expression) "objects->parent" (identifier) "objects" (->) "->" (field_identifier) "parent" (,) "," (identifier) "address" ()) ")" (;) ";" (if_statement) "if (objects->parent == MMID_NULL) {\n vm_root = mmid;\n }" (if) "if" (parenthesized_expression) "(objects->parent == MMID_NULL)" (() "(" (binary_expression) "objects->parent == MMID_NULL" (field_expression) "objects->parent" (identifier) "objects" (->) "->" (field_identifier) "parent" (==) "==" (identifier) "MMID_NULL" ()) ")" (compound_statement) "{\n vm_root = mmid;\n }" ({) "{" (expression_statement) "vm_root = mmid;" (assignment_expression) "vm_root = mmid" (identifier) "vm_root" (=) "=" (identifier) "mmid" (;) ";" (}) "}" (expression_statement) "objects += 1;" (assignment_expression) "objects += 1" (identifier) "objects" (+=) "+=" (number_literal) "1" (;) ";" (}) "}" (return_statement) "return VM_LOADER_ERROR_NONE;" (return) "return" (identifier) "VM_LOADER_ERROR_NONE" (;) ";" (}) "}" (function_definition) "static vm_loader_error_t section_loader_string(const uint8_t* data, uint32_t size) {\n UNUSED(size);\n uint32_t count = ((uint32_t*)data)[0];\n data += 4;\n for (uint32_t i = 0; i < count; i++) {\n wstring_t* str = (wstring_t*)data;\n vm_string_insert(str->data, str->size);\n data += 4 + ((str->size + (str->size&1)) * 2);\n }\n return VM_LOADER_ERROR_NONE;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "vm_loader_error_t" (function_declarator) "section_loader_string(const uint8_t* data, uint32_t size)" (identifier) "section_loader_string" (parameter_list) "(const uint8_t* data, uint32_t size)" (() "(" (parameter_declaration) "const uint8_t* data" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" ()) ")" (compound_statement) "{\n UNUSED(size);\n uint32_t count = ((uint32_t*)data)[0];\n data += 4;\n for (uint32_t i = 0; i < count; i++) {\n wstring_t* str = (wstring_t*)data;\n vm_string_insert(str->data, str->size);\n data += 4 + ((str->size + (str->size&1)) * 2);\n }\n return VM_LOADER_ERROR_NONE;\n}" ({) "{" (expression_statement) "UNUSED(size);" (call_expression) "UNUSED(size)" (identifier) "UNUSED" (argument_list) "(size)" (() "(" (identifier) "size" ()) ")" (;) ";" (declaration) "uint32_t count = ((uint32_t*)data)[0];" (primitive_type) "uint32_t" (init_declarator) "count = ((uint32_t*)data)[0]" (identifier) "count" (=) "=" (subscript_expression) "((uint32_t*)data)[0]" (parenthesized_expression) "((uint32_t*)data)" (() "(" (cast_expression) "(uint32_t*)data" (() "(" (type_descriptor) "uint32_t*" (primitive_type) "uint32_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "data" ()) ")" ([) "[" (number_literal) "0" (]) "]" (;) ";" (expression_statement) "data += 4;" (assignment_expression) "data += 4" (identifier) "data" (+=) "+=" (number_literal) "4" (;) ";" (for_statement) "for (uint32_t i = 0; i < count; i++) {\n wstring_t* str = (wstring_t*)data;\n vm_string_insert(str->data, str->size);\n data += 4 + ((str->size + (str->size&1)) * 2);\n }" (for) "for" (() "(" (declaration) "uint32_t i = 0;" (primitive_type) "uint32_t" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < count" (identifier) "i" (<) "<" (identifier) "count" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n wstring_t* str = (wstring_t*)data;\n vm_string_insert(str->data, str->size);\n data += 4 + ((str->size + (str->size&1)) * 2);\n }" ({) "{" (declaration) "wstring_t* str = (wstring_t*)data;" (type_identifier) "wstring_t" (init_declarator) "* str = (wstring_t*)data" (pointer_declarator) "* str" (*) "*" (identifier) "str" (=) "=" (cast_expression) "(wstring_t*)data" (() "(" (type_descriptor) "wstring_t*" (type_identifier) "wstring_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "data" (;) ";" (expression_statement) "vm_string_insert(str->data, str->size);" (call_expression) "vm_string_insert(str->data, str->size)" (identifier) "vm_string_insert" (argument_list) "(str->data, str->size)" (() "(" (field_expression) "str->data" (identifier) "str" (->) "->" (field_identifier) "data" (,) "," (field_expression) "str->size" (identifier) "str" (->) "->" (field_identifier) "size" ()) ")" (;) ";" (expression_statement) "data += 4 + ((str->size + (str->size&1)) * 2);" (assignment_expression) "data += 4 + ((str->size + (str->size&1)) * 2)" (identifier) "data" (+=) "+=" (binary_expression) "4 + ((str->size + (str->size&1)) * 2)" (number_literal) "4" (+) "+" (parenthesized_expression) "((str->size + (str->size&1)) * 2)" (() "(" (binary_expression) "(str->size + (str->size&1)) * 2" (parenthesized_expression) "(str->size + (str->size&1))" (() "(" (binary_expression) "str->size + (str->size&1)" (field_expression) "str->size" (identifier) "str" (->) "->" (field_identifier) "size" (+) "+" (parenthesized_expression) "(str->size&1)" (() "(" (binary_expression) "str->size&1" (field_expression) "str->size" (identifier) "str" (->) "->" (field_identifier) "size" (&) "&" (number_literal) "1" ()) ")" ()) ")" (*) "*" (number_literal) "2" ()) ")" (;) ";" (}) "}" (return_statement) "return VM_LOADER_ERROR_NONE;" (return) "return" (identifier) "VM_LOADER_ERROR_NONE" (;) ";" (}) "}" (function_definition) "static vm_loader_error_t section_loader_extern(const uint8_t* data, uint32_t size) {\n UNUSED(size);\n externs = section_create_stringmap(data);\n return VM_LOADER_ERROR_NONE;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "vm_loader_error_t" (function_declarator) "section_loader_extern(const uint8_t* data, uint32_t size)" (identifier) "section_loader_extern" (parameter_list) "(const uint8_t* data, uint32_t size)" (() "(" (parameter_declaration) "const uint8_t* data" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" ()) ")" (compound_statement) "{\n UNUSED(size);\n externs = section_create_stringmap(data);\n return VM_LOADER_ERROR_NONE;\n}" ({) "{" (expression_statement) "UNUSED(size);" (call_expression) "UNUSED(size)" (identifier) "UNUSED" (argument_list) "(size)" (() "(" (identifier) "size" ()) ")" (;) ";" (expression_statement) "externs = section_create_stringmap(data);" (assignment_expression) "externs = section_create_stringmap(data)" (identifier) "externs" (=) "=" (call_expression) "section_create_stringmap(data)" (identifier) "section_create_stringmap" (argument_list) "(data)" (() "(" (identifier) "data" ()) ")" (;) ";" (return_statement) "return VM_LOADER_ERROR_NONE;" (return) "return" (identifier) "VM_LOADER_ERROR_NONE" (;) ";" (}) "}" (function_definition) "static vm_loader_error_t section_loader_sym_string(const uint8_t* data, uint32_t size) {\n UNUSED(size);\n vm_symbols.strings = section_create_stringmap(data);\n return VM_LOADER_ERROR_NONE;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "vm_loader_error_t" (function_declarator) "section_loader_sym_string(const uint8_t* data, uint32_t size)" (identifier) "section_loader_sym_string" (parameter_list) "(const uint8_t* data, uint32_t size)" (() "(" (parameter_declaration) "const uint8_t* data" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" ()) ")" (compound_statement) "{\n UNUSED(size);\n vm_symbols.strings = section_create_stringmap(data);\n return VM_LOADER_ERROR_NONE;\n}" ({) "{" (expression_statement) "UNUSED(size);" (call_expression) "UNUSED(size)" (identifier) "UNUSED" (argument_list) "(size)" (() "(" (identifier) "size" ()) ")" (;) ";" (expression_statement) "vm_symbols.strings = section_create_stringmap(data);" (assignment_expression) "vm_symbols.strings = section_create_stringmap(data)" (field_expression) "vm_symbols.strings" (identifier) "vm_symbols" (.) "." (field_identifier) "strings" (=) "=" (call_expression) "section_create_stringmap(data)" (identifier) "section_create_stringmap" (argument_list) "(data)" (() "(" (identifier) "data" ()) ")" (;) ";" (return_statement) "return VM_LOADER_ERROR_NONE;" (return) "return" (identifier) "VM_LOADER_ERROR_NONE" (;) ";" (}) "}" (function_definition) "static vm_loader_error_t section_loader_sym_file(const uint8_t* data, uint32_t size) {\n vm_symbols.files = (vm_symbols_entry_t*)data;\n vm_symbols.files_count = size / sizeof(vm_symbols_entry_t);\n return VM_LOADER_ERROR_NONE;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "vm_loader_error_t" (function_declarator) "section_loader_sym_file(const uint8_t* data, uint32_t size)" (identifier) "section_loader_sym_file" (parameter_list) "(const uint8_t* data, uint32_t size)" (() "(" (parameter_declaration) "const uint8_t* data" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" ()) ")" (compound_statement) "{\n vm_symbols.files = (vm_symbols_entry_t*)data;\n vm_symbols.files_count = size / sizeof(vm_symbols_entry_t);\n return VM_LOADER_ERROR_NONE;\n}" ({) "{" (expression_statement) "vm_symbols.files = (vm_symbols_entry_t*)data;" (assignment_expression) "vm_symbols.files = (vm_symbols_entry_t*)data" (field_expression) "vm_symbols.files" (identifier) "vm_symbols" (.) "." (field_identifier) "files" (=) "=" (cast_expression) "(vm_symbols_entry_t*)data" (() "(" (type_descriptor) "vm_symbols_entry_t*" (type_identifier) "vm_symbols_entry_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "data" (;) ";" (expression_statement) "vm_symbols.files_count = size / sizeof(vm_symbols_entry_t);" (assignment_expression) "vm_symbols.files_count = size / sizeof(vm_symbols_entry_t)" (field_expression) "vm_symbols.files_count" (identifier) "vm_symbols" (.) "." (field_identifier) "files_count" (=) "=" (binary_expression) "size / sizeof(vm_symbols_entry_t)" (identifier) "size" (/) "/" (sizeof_expression) "sizeof(vm_symbols_entry_t)" (sizeof) "sizeof" (parenthesized_expression) "(vm_symbols_entry_t)" (() "(" (identifier) "vm_symbols_entry_t" ()) ")" (;) ";" (return_statement) "return VM_LOADER_ERROR_NONE;" (return) "return" (identifier) "VM_LOADER_ERROR_NONE" (;) ";" (}) "}" (function_definition) "static vm_loader_error_t section_loader_sym_func(const uint8_t* data, uint32_t size) {\n vm_symbols.functions = (vm_symbols_entry_t*)data;\n vm_symbols.functions_count = size / sizeof(vm_symbols_entry_t);\n return VM_LOADER_ERROR_NONE;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "vm_loader_error_t" (function_declarator) "section_loader_sym_func(const uint8_t* data, uint32_t size)" (identifier) "section_loader_sym_func" (parameter_list) "(const uint8_t* data, uint32_t size)" (() "(" (parameter_declaration) "const uint8_t* data" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" ()) ")" (compound_statement) "{\n vm_symbols.functions = (vm_symbols_entry_t*)data;\n vm_symbols.functions_count = size / sizeof(vm_symbols_entry_t);\n return VM_LOADER_ERROR_NONE;\n}" ({) "{" (expression_statement) "vm_symbols.functions = (vm_symbols_entry_t*)data;" (assignment_expression) "vm_symbols.functions = (vm_symbols_entry_t*)data" (field_expression) "vm_symbols.functions" (identifier) "vm_symbols" (.) "." (field_identifier) "functions" (=) "=" (cast_expression) "(vm_symbols_entry_t*)data" (() "(" (type_descriptor) "vm_symbols_entry_t*" (type_identifier) "vm_symbols_entry_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "data" (;) ";" (expression_statement) "vm_symbols.functions_count = size / sizeof(vm_symbols_entry_t);" (assignment_expression) "vm_symbols.functions_count = size / sizeof(vm_symbols_entry_t)" (field_expression) "vm_symbols.functions_count" (identifier) "vm_symbols" (.) "." (field_identifier) "functions_count" (=) "=" (binary_expression) "size / sizeof(vm_symbols_entry_t)" (identifier) "size" (/) "/" (sizeof_expression) "sizeof(vm_symbols_entry_t)" (sizeof) "sizeof" (parenthesized_expression) "(vm_symbols_entry_t)" (() "(" (identifier) "vm_symbols_entry_t" ()) ")" (;) ";" (return_statement) "return VM_LOADER_ERROR_NONE;" (return) "return" (identifier) "VM_LOADER_ERROR_NONE" (;) ";" (}) "}" (function_definition) "static vm_loader_error_t section_loader_sym_line(const uint8_t* data, uint32_t size) {\n vm_symbols.lines = (vm_symbols_entry_t*)data;\n vm_symbols.lines_count = size / sizeof(vm_symbols_entry_t);\n return VM_LOADER_ERROR_NONE;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "vm_loader_error_t" (function_declarator) "section_loader_sym_line(const uint8_t* data, uint32_t size)" (identifier) "section_loader_sym_line" (parameter_list) "(const uint8_t* data, uint32_t size)" (() "(" (parameter_declaration) "const uint8_t* data" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" ()) ")" (compound_statement) "{\n vm_symbols.lines = (vm_symbols_entry_t*)data;\n vm_symbols.lines_count = size / sizeof(vm_symbols_entry_t);\n return VM_LOADER_ERROR_NONE;\n}" ({) "{" (expression_statement) "vm_symbols.lines = (vm_symbols_entry_t*)data;" (assignment_expression) "vm_symbols.lines = (vm_symbols_entry_t*)data" (field_expression) "vm_symbols.lines" (identifier) "vm_symbols" (.) "." (field_identifier) "lines" (=) "=" (cast_expression) "(vm_symbols_entry_t*)data" (() "(" (type_descriptor) "vm_symbols_entry_t*" (type_identifier) "vm_symbols_entry_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "data" (;) ";" (expression_statement) "vm_symbols.lines_count = size / sizeof(vm_symbols_entry_t);" (assignment_expression) "vm_symbols.lines_count = size / sizeof(vm_symbols_entry_t)" (field_expression) "vm_symbols.lines_count" (identifier) "vm_symbols" (.) "." (field_identifier) "lines_count" (=) "=" (binary_expression) "size / sizeof(vm_symbols_entry_t)" (identifier) "size" (/) "/" (sizeof_expression) "sizeof(vm_symbols_entry_t)" (sizeof) "sizeof" (parenthesized_expression) "(vm_symbols_entry_t)" (() "(" (identifier) "vm_symbols_entry_t" ()) ")" (;) ";" (return_statement) "return VM_LOADER_ERROR_NONE;" (return) "return" (identifier) "VM_LOADER_ERROR_NONE" (;) ";" (}) "}" (function_definition) "static vm_loader_error_t section_loader_dispatch(const char* name, const uint8_t* data, uint32_t size) {\n for (uint32_t i = 0; i < sizeof(section_name_map) / sizeof(section_name_map[0]); i++) {\n if (strncmp(name, section_name_map[i].name, 16) == 0) {\n switch (section_name_map[i].type) {\n case SECTION_PROGMEM:\n return section_loader_progmem(data, size);\n case SECTION_SHIFT:\n return section_loader_shift(data, size);\n case SECTION_OBJECT:\n return section_loader_object(data, size);\n case SECTION_STRING:\n return section_loader_string(data, size);\n case SECTION_EXTERN:\n return section_loader_extern(data, size);\n case SECTION_SYM_STRING:\n return section_loader_sym_string(data, size);\n case SECTION_SYM_FILE:\n return section_loader_sym_file(data, size);\n case SECTION_SYM_FUNC:\n return section_loader_sym_func(data, size);\n case SECTION_SYM_LINE:\n return section_loader_sym_line(data, size);\n }\n break;\n }\n }\n vm_loader_error_data = name;\n return VM_LOADER_ERROR_SECTION;\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "vm_loader_error_t" (function_declarator) "section_loader_dispatch(const char* name, const uint8_t* data, uint32_t size)" (identifier) "section_loader_dispatch" (parameter_list) "(const char* name, const uint8_t* data, uint32_t size)" (() "(" (parameter_declaration) "const char* name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* name" (*) "*" (identifier) "name" (,) "," (parameter_declaration) "const uint8_t* data" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" ()) ")" (compound_statement) "{\n for (uint32_t i = 0; i < sizeof(section_name_map) / sizeof(section_name_map[0]); i++) {\n if (strncmp(name, section_name_map[i].name, 16) == 0) {\n switch (section_name_map[i].type) {\n case SECTION_PROGMEM:\n return section_loader_progmem(data, size);\n case SECTION_SHIFT:\n return section_loader_shift(data, size);\n case SECTION_OBJECT:\n return section_loader_object(data, size);\n case SECTION_STRING:\n return section_loader_string(data, size);\n case SECTION_EXTERN:\n return section_loader_extern(data, size);\n case SECTION_SYM_STRING:\n return section_loader_sym_string(data, size);\n case SECTION_SYM_FILE:\n return section_loader_sym_file(data, size);\n case SECTION_SYM_FUNC:\n return section_loader_sym_func(data, size);\n case SECTION_SYM_LINE:\n return section_loader_sym_line(data, size);\n }\n break;\n }\n }\n vm_loader_error_data = name;\n return VM_LOADER_ERROR_SECTION;\n}" ({) "{" (for_statement) "for (uint32_t i = 0; i < sizeof(section_name_map) / sizeof(section_name_map[0]); i++) {\n if (strncmp(name, section_name_map[i].name, 16) == 0) {\n switch (section_name_map[i].type) {\n case SECTION_PROGMEM:\n return section_loader_progmem(data, size);\n case SECTION_SHIFT:\n return section_loader_shift(data, size);\n case SECTION_OBJECT:\n return section_loader_object(data, size);\n case SECTION_STRING:\n return section_loader_string(data, size);\n case SECTION_EXTERN:\n return section_loader_extern(data, size);\n case SECTION_SYM_STRING:\n return section_loader_sym_string(data, size);\n case SECTION_SYM_FILE:\n return section_loader_sym_file(data, size);\n case SECTION_SYM_FUNC:\n return section_loader_sym_func(data, size);\n case SECTION_SYM_LINE:\n return section_loader_sym_line(data, size);\n }\n break;\n }\n }" (for) "for" (() "(" (declaration) "uint32_t i = 0;" (primitive_type) "uint32_t" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < sizeof(section_name_map) / sizeof(section_name_map[0])" (identifier) "i" (<) "<" (binary_expression) "sizeof(section_name_map) / sizeof(section_name_map[0])" (sizeof_expression) "sizeof(section_name_map)" (sizeof) "sizeof" (parenthesized_expression) "(section_name_map)" (() "(" (identifier) "section_name_map" ()) ")" (/) "/" (sizeof_expression) "sizeof(section_name_map[0])" (sizeof) "sizeof" (parenthesized_expression) "(section_name_map[0])" (() "(" (subscript_expression) "section_name_map[0]" (identifier) "section_name_map" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n if (strncmp(name, section_name_map[i].name, 16) == 0) {\n switch (section_name_map[i].type) {\n case SECTION_PROGMEM:\n return section_loader_progmem(data, size);\n case SECTION_SHIFT:\n return section_loader_shift(data, size);\n case SECTION_OBJECT:\n return section_loader_object(data, size);\n case SECTION_STRING:\n return section_loader_string(data, size);\n case SECTION_EXTERN:\n return section_loader_extern(data, size);\n case SECTION_SYM_STRING:\n return section_loader_sym_string(data, size);\n case SECTION_SYM_FILE:\n return section_loader_sym_file(data, size);\n case SECTION_SYM_FUNC:\n return section_loader_sym_func(data, size);\n case SECTION_SYM_LINE:\n return section_loader_sym_line(data, size);\n }\n break;\n }\n }" ({) "{" (if_statement) "if (strncmp(name, section_name_map[i].name, 16) == 0) {\n switch (section_name_map[i].type) {\n case SECTION_PROGMEM:\n return section_loader_progmem(data, size);\n case SECTION_SHIFT:\n return section_loader_shift(data, size);\n case SECTION_OBJECT:\n return section_loader_object(data, size);\n case SECTION_STRING:\n return section_loader_string(data, size);\n case SECTION_EXTERN:\n return section_loader_extern(data, size);\n case SECTION_SYM_STRING:\n return section_loader_sym_string(data, size);\n case SECTION_SYM_FILE:\n return section_loader_sym_file(data, size);\n case SECTION_SYM_FUNC:\n return section_loader_sym_func(data, size);\n case SECTION_SYM_LINE:\n return section_loader_sym_line(data, size);\n }\n break;\n }" (if) "if" (parenthesized_expression) "(strncmp(name, section_name_map[i].name, 16) == 0)" (() "(" (binary_expression) "strncmp(name, section_name_map[i].name, 16) == 0" (call_expression) "strncmp(name, section_name_map[i].name, 16)" (identifier) "strncmp" (argument_list) "(name, section_name_map[i].name, 16)" (() "(" (identifier) "name" (,) "," (field_expression) "section_name_map[i].name" (subscript_expression) "section_name_map[i]" (identifier) "section_name_map" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "name" (,) "," (number_literal) "16" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{\n switch (section_name_map[i].type) {\n case SECTION_PROGMEM:\n return section_loader_progmem(data, size);\n case SECTION_SHIFT:\n return section_loader_shift(data, size);\n case SECTION_OBJECT:\n return section_loader_object(data, size);\n case SECTION_STRING:\n return section_loader_string(data, size);\n case SECTION_EXTERN:\n return section_loader_extern(data, size);\n case SECTION_SYM_STRING:\n return section_loader_sym_string(data, size);\n case SECTION_SYM_FILE:\n return section_loader_sym_file(data, size);\n case SECTION_SYM_FUNC:\n return section_loader_sym_func(data, size);\n case SECTION_SYM_LINE:\n return section_loader_sym_line(data, size);\n }\n break;\n }" ({) "{" (switch_statement) "switch (section_name_map[i].type) {\n case SECTION_PROGMEM:\n return section_loader_progmem(data, size);\n case SECTION_SHIFT:\n return section_loader_shift(data, size);\n case SECTION_OBJECT:\n return section_loader_object(data, size);\n case SECTION_STRING:\n return section_loader_string(data, size);\n case SECTION_EXTERN:\n return section_loader_extern(data, size);\n case SECTION_SYM_STRING:\n return section_loader_sym_string(data, size);\n case SECTION_SYM_FILE:\n return section_loader_sym_file(data, size);\n case SECTION_SYM_FUNC:\n return section_loader_sym_func(data, size);\n case SECTION_SYM_LINE:\n return section_loader_sym_line(data, size);\n }" (switch) "switch" (parenthesized_expression) "(section_name_map[i].type)" (() "(" (field_expression) "section_name_map[i].type" (subscript_expression) "section_name_map[i]" (identifier) "section_name_map" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "type" ()) ")" (compound_statement) "{\n case SECTION_PROGMEM:\n return section_loader_progmem(data, size);\n case SECTION_SHIFT:\n return section_loader_shift(data, size);\n case SECTION_OBJECT:\n return section_loader_object(data, size);\n case SECTION_STRING:\n return section_loader_string(data, size);\n case SECTION_EXTERN:\n return section_loader_extern(data, size);\n case SECTION_SYM_STRING:\n return section_loader_sym_string(data, size);\n case SECTION_SYM_FILE:\n return section_loader_sym_file(data, size);\n case SECTION_SYM_FUNC:\n return section_loader_sym_func(data, size);\n case SECTION_SYM_LINE:\n return section_loader_sym_line(data, size);\n }" ({) "{" (case_statement) "case SECTION_PROGMEM:\n return section_loader_progmem(data, size);" (case) "case" (identifier) "SECTION_PROGMEM" (:) ":" (return_statement) "return section_loader_progmem(data, size);" (return) "return" (call_expression) "section_loader_progmem(data, size)" (identifier) "section_loader_progmem" (argument_list) "(data, size)" (() "(" (identifier) "data" (,) "," (identifier) "size" ()) ")" (;) ";" (case_statement) "case SECTION_SHIFT:\n return section_loader_shift(data, size);" (case) "case" (identifier) "SECTION_SHIFT" (:) ":" (return_statement) "return section_loader_shift(data, size);" (return) "return" (call_expression) "section_loader_shift(data, size)" (identifier) "section_loader_shift" (argument_list) "(data, size)" (() "(" (identifier) "data" (,) "," (identifier) "size" ()) ")" (;) ";" (case_statement) "case SECTION_OBJECT:\n return section_loader_object(data, size);" (case) "case" (identifier) "SECTION_OBJECT" (:) ":" (return_statement) "return section_loader_object(data, size);" (return) "return" (call_expression) "section_loader_object(data, size)" (identifier) "section_loader_object" (argument_list) "(data, size)" (() "(" (identifier) "data" (,) "," (identifier) "size" ()) ")" (;) ";" (case_statement) "case SECTION_STRING:\n return section_loader_string(data, size);" (case) "case" (identifier) "SECTION_STRING" (:) ":" (return_statement) "return section_loader_string(data, size);" (return) "return" (call_expression) "section_loader_string(data, size)" (identifier) "section_loader_string" (argument_list) "(data, size)" (() "(" (identifier) "data" (,) "," (identifier) "size" ()) ")" (;) ";" (case_statement) "case SECTION_EXTERN:\n return section_loader_extern(data, size);" (case) "case" (identifier) "SECTION_EXTERN" (:) ":" (return_statement) "return section_loader_extern(data, size);" (return) "return" (call_expression) "section_loader_extern(data, size)" (identifier) "section_loader_extern" (argument_list) "(data, size)" (() "(" (identifier) "data" (,) "," (identifier) "size" ()) ")" (;) ";" (case_statement) "case SECTION_SYM_STRING:\n return section_loader_sym_string(data, size);" (case) "case" (identifier) "SECTION_SYM_STRING" (:) ":" (return_statement) "return section_loader_sym_string(data, size);" (return) "return" (call_expression) "section_loader_sym_string(data, size)" (identifier) "section_loader_sym_string" (argument_list) "(data, size)" (() "(" (identifier) "data" (,) "," (identifier) "size" ()) ")" (;) ";" (case_statement) "case SECTION_SYM_FILE:\n return section_loader_sym_file(data, size);" (case) "case" (identifier) "SECTION_SYM_FILE" (:) ":" (return_statement) "return section_loader_sym_file(data, size);" (return) "return" (call_expression) "section_loader_sym_file(data, size)" (identifier) "section_loader_sym_file" (argument_list) "(data, size)" (() "(" (identifier) "data" (,) "," (identifier) "size" ()) ")" (;) ";" (case_statement) "case SECTION_SYM_FUNC:\n return section_loader_sym_func(data, size);" (case) "case" (identifier) "SECTION_SYM_FUNC" (:) ":" (return_statement) "return section_loader_sym_func(data, size);" (return) "return" (call_expression) "section_loader_sym_func(data, size)" (identifier) "section_loader_sym_func" (argument_list) "(data, size)" (() "(" (identifier) "data" (,) "," (identifier) "size" ()) ")" (;) ";" (case_statement) "case SECTION_SYM_LINE:\n return section_loader_sym_line(data, size);" (case) "case" (identifier) "SECTION_SYM_LINE" (:) ":" (return_statement) "return section_loader_sym_line(data, size);" (return) "return" (call_expression) "section_loader_sym_line(data, size)" (identifier) "section_loader_sym_line" (argument_list) "(data, size)" (() "(" (identifier) "data" (,) "," (identifier) "size" ()) ")" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (expression_statement) "vm_loader_error_data = name;" (assignment_expression) "vm_loader_error_data = name" (identifier) "vm_loader_error_data" (=) "=" (identifier) "name" (;) ";" (return_statement) "return VM_LOADER_ERROR_SECTION;" (return) "return" (identifier) "VM_LOADER_ERROR_SECTION" (;) ";" (}) "}" (function_definition) "vm_loader_error_t vm_loader_load(const uint8_t* data, uint32_t size) {\n if (strncmp((char*)data, "ASB", 4) != 0) {\n return VM_LOADER_ERROR_MAGICDWORD;\n }\n const uint8_t* end = data + size;\n data += 4;\n while (data < end) {\n const vm_loader_section_t* section = (vm_loader_section_t*)data;\n vm_loader_error_t ret = section_loader_dispatch(section->name, section->data, section->size);\n if (ret != VM_LOADER_ERROR_NONE) {\n return ret;\n }\n data += section->size + sizeof(vm_loader_section_t);\n }\n return VM_LOADER_ERROR_NONE;\n}" (type_identifier) "vm_loader_error_t" (function_declarator) "vm_loader_load(const uint8_t* data, uint32_t size)" (identifier) "vm_loader_load" (parameter_list) "(const uint8_t* data, uint32_t size)" (() "(" (parameter_declaration) "const uint8_t* data" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "* data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" ()) ")" (compound_statement) "{\n if (strncmp((char*)data, "ASB", 4) != 0) {\n return VM_LOADER_ERROR_MAGICDWORD;\n }\n const uint8_t* end = data + size;\n data += 4;\n while (data < end) {\n const vm_loader_section_t* section = (vm_loader_section_t*)data;\n vm_loader_error_t ret = section_loader_dispatch(section->name, section->data, section->size);\n if (ret != VM_LOADER_ERROR_NONE) {\n return ret;\n }\n data += section->size + sizeof(vm_loader_section_t);\n }\n return VM_LOADER_ERROR_NONE;\n}" ({) "{" (if_statement) "if (strncmp((char*)data, "ASB", 4) != 0) {\n return VM_LOADER_ERROR_MAGICDWORD;\n }" (if) "if" (parenthesized_expression) "(strncmp((char*)data, "ASB", 4) != 0)" (() "(" (binary_expression) "strncmp((char*)data, "ASB", 4) != 0" (call_expression) "strncmp((char*)data, "ASB", 4)" (identifier) "strncmp" (argument_list) "((char*)data, "ASB", 4)" (() "(" (cast_expression) "(char*)data" (() "(" (type_descriptor) "char*" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "data" (,) "," (string_literal) ""ASB"" (") """ (string_content) "ASB" (") """ (,) "," (number_literal) "4" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n return VM_LOADER_ERROR_MAGICDWORD;\n }" ({) "{" (return_statement) "return VM_LOADER_ERROR_MAGICDWORD;" (return) "return" (identifier) "VM_LOADER_ERROR_MAGICDWORD" (;) ";" (}) "}" (declaration) "const uint8_t* end = data + size;" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (init_declarator) "* end = data + size" (pointer_declarator) "* end" (*) "*" (identifier) "end" (=) "=" (binary_expression) "data + size" (identifier) "data" (+) "+" (identifier) "size" (;) ";" (expression_statement) "data += 4;" (assignment_expression) "data += 4" (identifier) "data" (+=) "+=" (number_literal) "4" (;) ";" (while_statement) "while (data < end) {\n const vm_loader_section_t* section = (vm_loader_section_t*)data;\n vm_loader_error_t ret = section_loader_dispatch(section->name, section->data, section->size);\n if (ret != VM_LOADER_ERROR_NONE) {\n return ret;\n }\n data += section->size + sizeof(vm_loader_section_t);\n }" (while) "while" (parenthesized_expression) "(data < end)" (() "(" (binary_expression) "data < end" (identifier) "data" (<) "<" (identifier) "end" ()) ")" (compound_statement) "{\n const vm_loader_section_t* section = (vm_loader_section_t*)data;\n vm_loader_error_t ret = section_loader_dispatch(section->name, section->data, section->size);\n if (ret != VM_LOADER_ERROR_NONE) {\n return ret;\n }\n data += section->size + sizeof(vm_loader_section_t);\n }" ({) "{" (declaration) "const vm_loader_section_t* section = (vm_loader_section_t*)data;" (type_qualifier) "const" (const) "const" (type_identifier) "vm_loader_section_t" (init_declarator) "* section = (vm_loader_section_t*)data" (pointer_declarator) "* section" (*) "*" (identifier) "section" (=) "=" (cast_expression) "(vm_loader_section_t*)data" (() "(" (type_descriptor) "vm_loader_section_t*" (type_identifier) "vm_loader_section_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "data" (;) ";" (declaration) "vm_loader_error_t ret = section_loader_dispatch(section->name, section->data, section->size);" (type_identifier) "vm_loader_error_t" (init_declarator) "ret = section_loader_dispatch(section->name, section->data, section->size)" (identifier) "ret" (=) "=" (call_expression) "section_loader_dispatch(section->name, section->data, section->size)" (identifier) "section_loader_dispatch" (argument_list) "(section->name, section->data, section->size)" (() "(" (field_expression) "section->name" (identifier) "section" (->) "->" (field_identifier) "name" (,) "," (field_expression) "section->data" (identifier) "section" (->) "->" (field_identifier) "data" (,) "," (field_expression) "section->size" (identifier) "section" (->) "->" (field_identifier) "size" ()) ")" (;) ";" (if_statement) "if (ret != VM_LOADER_ERROR_NONE) {\n return ret;\n }" (if) "if" (parenthesized_expression) "(ret != VM_LOADER_ERROR_NONE)" (() "(" (binary_expression) "ret != VM_LOADER_ERROR_NONE" (identifier) "ret" (!=) "!=" (identifier) "VM_LOADER_ERROR_NONE" ()) ")" (compound_statement) "{\n return ret;\n }" ({) "{" (return_statement) "return ret;" (return) "return" (identifier) "ret" (;) ";" (}) "}" (expression_statement) "data += section->size + sizeof(vm_loader_section_t);" (assignment_expression) "data += section->size + sizeof(vm_loader_section_t)" (identifier) "data" (+=) "+=" (binary_expression) "section->size + sizeof(vm_loader_section_t)" (field_expression) "section->size" (identifier) "section" (->) "->" (field_identifier) "size" (+) "+" (sizeof_expression) "sizeof(vm_loader_section_t)" (sizeof) "sizeof" (parenthesized_expression) "(vm_loader_section_t)" (() "(" (identifier) "vm_loader_section_t" ()) ")" (;) ";" (}) "}" (return_statement) "return VM_LOADER_ERROR_NONE;" (return) "return" (identifier) "VM_LOADER_ERROR_NONE" (;) ";" (}) "}" (function_definition) "const void* vm_loader_get_error_data(void) {\n return vm_loader_error_data;\n}" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "* vm_loader_get_error_data(void)" (*) "*" (function_declarator) "vm_loader_get_error_data(void)" (identifier) "vm_loader_get_error_data" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n return vm_loader_error_data;\n}" ({) "{" (return_statement) "return vm_loader_error_data;" (return) "return" (identifier) "vm_loader_error_data" (;) ";" (}) "}"
1,737
0
{"language": "c", "success": true, "metadata": {"lines": 181, "avg_line_length": 30.98, "nodes": 1035, "errors": 0, "source_hash": "498a8fada1b03cc3e227929f4d324c72087dc45d1843e5e7ea3fe3601af53233", "categorized_nodes": 713}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <string.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": "<string.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include \"vm_loader.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": "\"vm_loader.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 22}}, {"id": 9, "type": "preproc_include", "text": "#include \"vm.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": "\"vm.h\"", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 15}}, {"id": 12, "type": "preproc_include", "text": "#include \"vm_util.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": "\"vm_util.h\"", "parent": 12, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 20}}, {"id": 15, "type": "preproc_include", "text": "#include \"vm_extern.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": "string_literal", "text": "\"vm_extern.h\"", "parent": 15, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 22}}, {"id": 18, "type": "preproc_include", "text": "#include \"vm_hashmap.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": "string_literal", "text": "\"vm_hashmap.h\"", "parent": 18, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 23}}, {"id": 21, "type": "preproc_include", "text": "#include \"vm_string.h\"\n", "parent": null, "children": [22, 23], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"vm_string.h\"", "parent": 21, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 22}}, {"id": 24, "type": "preproc_include", "text": "#include \"vm_symbols.h\"\n", "parent": null, "children": [25, 26], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"vm_symbols.h\"", "parent": 24, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 23}}, {"id": 27, "type": "type_definition", "text": "typedef struct {\n\tchar name[16];\n\tuint32_t size;\n\tuint8_t data[];\n} vm_loader_section_t;", "parent": null, "children": [28, 29, 43], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 14, "column": 22}}, {"id": 28, "type": "typedef", "text": "typedef", "parent": 27, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 29, "type": "struct_specifier", "text": "struct {\n\tchar name[16];\n\tuint32_t size;\n\tuint8_t data[];\n}", "parent": 27, "children": [30], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 14, "column": 1}}, {"id": 30, "type": "struct", "text": "struct", "parent": 29, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 14}}, {"id": 31, "type": "field_declaration", "text": "char name[16];", "parent": 29, "children": [32, 33], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 15}}, {"id": 32, "type": "primitive_type", "text": "char", "parent": 31, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 5}}, {"id": 33, "type": "array_declarator", "text": "name[16]", "parent": 31, "children": [34, 35], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 14}}, {"id": 34, "type": "field_identifier", "text": "name", "parent": 33, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 10}}, {"id": 35, "type": "number_literal", "text": "16", "parent": 33, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 13}}, {"id": 36, "type": "field_declaration", "text": "uint32_t size;", "parent": 29, "children": [37, 38], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 15}}, {"id": 37, "type": "primitive_type", "text": "uint32_t", "parent": 36, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 9}}, {"id": 38, "type": "field_identifier", "text": "size", "parent": 36, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 14}}, {"id": 39, "type": "field_declaration", "text": "uint8_t data[];", "parent": 29, "children": [40, 41], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 16}}, {"id": 40, "type": "primitive_type", "text": "uint8_t", "parent": 39, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 8}}, {"id": 41, "type": "array_declarator", "text": "data[]", "parent": 39, "children": [42], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 15}}, {"id": 42, "type": "field_identifier", "text": "data", "parent": 41, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 13}}, {"id": 43, "type": "type_identifier", "text": "vm_loader_section_t", "parent": 27, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 21}}, {"id": 44, "type": "type_definition", "text": "typedef struct {\n\tvm_type_t type;\n\tvm_mmid_t name;\n\tvm_mmid_t parent;\n\tuint32_t code;\n} vm_loader_object_t;", "parent": null, "children": [45, 46, 60], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 21, "column": 21}}, {"id": 45, "type": "typedef", "text": "typedef", "parent": 44, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 46, "type": "struct_specifier", "text": "struct {\n\tvm_type_t type;\n\tvm_mmid_t name;\n\tvm_mmid_t parent;\n\tuint32_t code;\n}", "parent": 44, "children": [47], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 21, "column": 1}}, {"id": 47, "type": "struct", "text": "struct", "parent": 46, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 14}}, {"id": 48, "type": "field_declaration", "text": "vm_type_t type;", "parent": 46, "children": [49, 50], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 16}}, {"id": 49, "type": "type_identifier", "text": "vm_type_t", "parent": 48, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 10}}, {"id": 50, "type": "field_identifier", "text": "type", "parent": 48, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 15}}, {"id": 51, "type": "field_declaration", "text": "vm_mmid_t name;", "parent": 46, "children": [52, 53], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 16}}, {"id": 52, "type": "type_identifier", "text": "vm_mmid_t", "parent": 51, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 10}}, {"id": 53, "type": "field_identifier", "text": "name", "parent": 51, "children": [], "start_point": {"row": 18, "column": 11}, "end_point": {"row": 18, "column": 15}}, {"id": 54, "type": "field_declaration", "text": "vm_mmid_t parent;", "parent": 46, "children": [55, 56], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 18}}, {"id": 55, "type": "type_identifier", "text": "vm_mmid_t", "parent": 54, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 10}}, {"id": 56, "type": "field_identifier", "text": "parent", "parent": 54, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 17}}, {"id": 57, "type": "field_declaration", "text": "uint32_t code;", "parent": 46, "children": [58, 59], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 15}}, {"id": 58, "type": "primitive_type", "text": "uint32_t", "parent": 57, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 9}}, {"id": 59, "type": "field_identifier", "text": "code", "parent": 57, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 14}}, {"id": 60, "type": "type_identifier", "text": "vm_loader_object_t", "parent": 44, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 20}}, {"id": 61, "type": "type_definition", "text": "typedef enum {\n\tSECTION_PROGMEM,\n\tSECTION_SHIFT,\n\tSECTION_OBJECT,\n\tSECTION_STRING,\n\tSECTION_EXTERN,\n\tSECTION_SYM_STRING,\n\tSECTION_SYM_FILE,\n\tSECTION_SYM_FUNC,\n\tSECTION_SYM_LINE\n} section_type_t;", "parent": null, "children": [62, 63, 84], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 33, "column": 17}}, {"id": 62, "type": "typedef", "text": "typedef", "parent": 61, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 63, "type": "enum_specifier", "text": "enum {\n\tSECTION_PROGMEM,\n\tSECTION_SHIFT,\n\tSECTION_OBJECT,\n\tSECTION_STRING,\n\tSECTION_EXTERN,\n\tSECTION_SYM_STRING,\n\tSECTION_SYM_FILE,\n\tSECTION_SYM_FUNC,\n\tSECTION_SYM_LINE\n}", "parent": 61, "children": [64, 65], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 33, "column": 1}}, {"id": 64, "type": "enum", "text": "enum", "parent": 63, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 12}}, {"id": 65, "type": "enumerator_list", "text": "{\n\tSECTION_PROGMEM,\n\tSECTION_SHIFT,\n\tSECTION_OBJECT,\n\tSECTION_STRING,\n\tSECTION_EXTERN,\n\tSECTION_SYM_STRING,\n\tSECTION_SYM_FILE,\n\tSECTION_SYM_FUNC,\n\tSECTION_SYM_LINE\n}", "parent": 63, "children": [66, 68, 70, 72, 74, 76, 78, 80, 82], "start_point": {"row": 23, "column": 13}, "end_point": {"row": 33, "column": 1}}, {"id": 66, "type": "enumerator", "text": "SECTION_PROGMEM", "parent": 65, "children": [67], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 16}}, {"id": 67, "type": "identifier", "text": "SECTION_PROGMEM", "parent": 66, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 16}}, {"id": 68, "type": "enumerator", "text": "SECTION_SHIFT", "parent": 65, "children": [69], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 14}}, {"id": 69, "type": "identifier", "text": "SECTION_SHIFT", "parent": 68, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 14}}, {"id": 70, "type": "enumerator", "text": "SECTION_OBJECT", "parent": 65, "children": [71], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 15}}, {"id": 71, "type": "identifier", "text": "SECTION_OBJECT", "parent": 70, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 15}}, {"id": 72, "type": "enumerator", "text": "SECTION_STRING", "parent": 65, "children": [73], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 15}}, {"id": 73, "type": "identifier", "text": "SECTION_STRING", "parent": 72, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 15}}, {"id": 74, "type": "enumerator", "text": "SECTION_EXTERN", "parent": 65, "children": [75], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 15}}, {"id": 75, "type": "identifier", "text": "SECTION_EXTERN", "parent": 74, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 15}}, {"id": 76, "type": "enumerator", "text": "SECTION_SYM_STRING", "parent": 65, "children": [77], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 19}}, {"id": 77, "type": "identifier", "text": "SECTION_SYM_STRING", "parent": 76, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 19}}, {"id": 78, "type": "enumerator", "text": "SECTION_SYM_FILE", "parent": 65, "children": [79], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 17}}, {"id": 79, "type": "identifier", "text": "SECTION_SYM_FILE", "parent": 78, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 17}}, {"id": 80, "type": "enumerator", "text": "SECTION_SYM_FUNC", "parent": 65, "children": [81], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 17}}, {"id": 81, "type": "identifier", "text": "SECTION_SYM_FUNC", "parent": 80, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 17}}, {"id": 82, "type": "enumerator", "text": "SECTION_SYM_LINE", "parent": 65, "children": [83], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 17}}, {"id": 83, "type": "identifier", "text": "SECTION_SYM_LINE", "parent": 82, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 17}}, {"id": 84, "type": "type_identifier", "text": "section_type_t", "parent": 61, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 16}}, {"id": 85, "type": "type_definition", "text": "typedef struct {\n\tconst char *const name;\n\tconst section_type_t type;\n} section_loader_def_t;", "parent": null, "children": [86, 87, 97], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 38, "column": 23}}, {"id": 86, "type": "typedef", "text": "typedef", "parent": 85, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 7}}, {"id": 87, "type": "struct_specifier", "text": "struct {\n\tconst char *const name;\n\tconst section_type_t type;\n}", "parent": 85, "children": [88], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 38, "column": 1}}, {"id": 88, "type": "struct", "text": "struct", "parent": 87, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 14}}, {"id": 89, "type": "field_declaration", "text": "const char *const name;", "parent": 87, "children": [90, 91], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 24}}, {"id": 90, "type": "primitive_type", "text": "char", "parent": 89, "children": [], "start_point": {"row": 36, "column": 7}, "end_point": {"row": 36, "column": 11}}, {"id": 91, "type": "pointer_declarator", "text": "*const name", "parent": 89, "children": [92, 93], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 23}}, {"id": 92, "type": "*", "text": "*", "parent": 91, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 13}}, {"id": 93, "type": "field_identifier", "text": "name", "parent": 91, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 23}}, {"id": 94, "type": "field_declaration", "text": "const section_type_t type;", "parent": 87, "children": [95, 96], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 27}}, {"id": 95, "type": "type_identifier", "text": "section_type_t", "parent": 94, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 21}}, {"id": 96, "type": "field_identifier", "text": "type", "parent": 94, "children": [], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 26}}, {"id": 97, "type": "type_identifier", "text": "section_loader_def_t", "parent": 85, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 22}}, {"id": 98, "type": "declaration", "text": "static wstring_t** externs = NULL;", "parent": null, "children": [99, 100], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 34}}, {"id": 99, "type": "type_identifier", "text": "wstring_t", "parent": 98, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 16}}, {"id": 100, "type": "init_declarator", "text": "** externs = NULL", "parent": 98, "children": [101, 106, 107], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 33}}, {"id": 101, "type": "pointer_declarator", "text": "** externs", "parent": 100, "children": [102, 103], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 26}}, {"id": 102, "type": "*", "text": "*", "parent": 101, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 17}}, {"id": 103, "type": "pointer_declarator", "text": "* externs", "parent": 101, "children": [104, 105], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 26}}, {"id": 104, "type": "*", "text": "*", "parent": 103, "children": [], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 18}}, {"id": 105, "type": "identifier", "text": "externs", "parent": 103, "children": [], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 26}}, {"id": 106, "type": "=", "text": "=", "parent": 100, "children": [], "start_point": {"row": 40, "column": 27}, "end_point": {"row": 40, "column": 28}}, {"id": 107, "type": "null", "text": "NULL", "parent": 100, "children": [108], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 33}}, {"id": 108, "type": "NULL", "text": "NULL", "parent": 107, "children": [], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 33}}, {"id": 109, "type": "declaration", "text": "const void* vm_loader_error_data = NULL;", "parent": null, "children": [110, 111], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 40}}, {"id": 110, "type": "primitive_type", "text": "void", "parent": 109, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 10}}, {"id": 111, "type": "init_declarator", "text": "* vm_loader_error_data = NULL", "parent": 109, "children": [112, 115, 116], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 39}}, {"id": 112, "type": "pointer_declarator", "text": "* vm_loader_error_data", "parent": 111, "children": [113, 114], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 32}}, {"id": 113, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 11}}, {"id": 114, "type": "identifier", "text": "vm_loader_error_data", "parent": 112, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 32}}, {"id": 115, "type": "=", "text": "=", "parent": 111, "children": [], "start_point": {"row": 41, "column": 33}, "end_point": {"row": 41, "column": 34}}, {"id": 116, "type": "null", "text": "NULL", "parent": 111, "children": [117], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 39}}, {"id": 117, "type": "NULL", "text": "NULL", "parent": 116, "children": [], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 39}}, {"id": 118, "type": "declaration", "text": "const section_loader_def_t section_name_map[] = {\n\t{\"PROGMEM\", SECTION_PROGMEM},\n\t{\"SHIFT\", SECTION_SHIFT},\n\t{\"OBJECT\", SECTION_OBJECT},\n\t{\"STRING\", SECTION_STRING},\n\t{\"EXTERN\", SECTION_EXTERN},\n\t{\"SYM_STRING\", SECTION_SYM_STRING},\n\t{\"SYM_FILE\", SECTION_SYM_FILE},\n\t{\"SYM_FUNC\", SECTION_SYM_FUNC},\n\t{\"SYM_LINE\", SECTION_SYM_LINE},\n};", "parent": null, "children": [119, 120], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 53, "column": 2}}, {"id": 119, "type": "type_identifier", "text": "section_loader_def_t", "parent": 118, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 26}}, {"id": 120, "type": "init_declarator", "text": "section_name_map[] = {\n\t{\"PROGMEM\", SECTION_PROGMEM},\n\t{\"SHIFT\", SECTION_SHIFT},\n\t{\"OBJECT\", SECTION_OBJECT},\n\t{\"STRING\", SECTION_STRING},\n\t{\"EXTERN\", SECTION_EXTERN},\n\t{\"SYM_STRING\", SECTION_SYM_STRING},\n\t{\"SYM_FILE\", SECTION_SYM_FILE},\n\t{\"SYM_FUNC\", SECTION_SYM_FUNC},\n\t{\"SYM_LINE\", SECTION_SYM_LINE},\n}", "parent": 118, "children": [121, 123, 124], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 53, "column": 1}}, {"id": 121, "type": "array_declarator", "text": "section_name_map[]", "parent": 120, "children": [122], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 45}}, {"id": 122, "type": "identifier", "text": "section_name_map", "parent": 121, "children": [], "start_point": {"row": 43, "column": 27}, "end_point": {"row": 43, "column": 43}}, {"id": 123, "type": "=", "text": "=", "parent": 120, "children": [], "start_point": {"row": 43, "column": 46}, "end_point": {"row": 43, "column": 47}}, {"id": 124, "type": "initializer_list", "text": "{\n\t{\"PROGMEM\", SECTION_PROGMEM},\n\t{\"SHIFT\", SECTION_SHIFT},\n\t{\"OBJECT\", SECTION_OBJECT},\n\t{\"STRING\", SECTION_STRING},\n\t{\"EXTERN\", SECTION_EXTERN},\n\t{\"SYM_STRING\", SECTION_SYM_STRING},\n\t{\"SYM_FILE\", SECTION_SYM_FILE},\n\t{\"SYM_FUNC\", SECTION_SYM_FUNC},\n\t{\"SYM_LINE\", SECTION_SYM_LINE},\n}", "parent": 120, "children": [125, 128, 131, 134, 137, 140, 143, 146, 149], "start_point": {"row": 43, "column": 48}, "end_point": {"row": 53, "column": 1}}, {"id": 125, "type": "initializer_list", "text": "{\"PROGMEM\", SECTION_PROGMEM}", "parent": 124, "children": [126, 127], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 32}}, {"id": 126, "type": "string_literal", "text": "\"PROGMEM\"", "parent": 125, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 11}}, {"id": 127, "type": "identifier", "text": "SECTION_PROGMEM", "parent": 125, "children": [], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 31}}, {"id": 128, "type": "initializer_list", "text": "{\"SHIFT\", SECTION_SHIFT}", "parent": 124, "children": [129, 130], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 30}}, {"id": 129, "type": "string_literal", "text": "\"SHIFT\"", "parent": 128, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 9}}, {"id": 130, "type": "identifier", "text": "SECTION_SHIFT", "parent": 128, "children": [], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 29}}, {"id": 131, "type": "initializer_list", "text": "{\"OBJECT\", SECTION_OBJECT}", "parent": 124, "children": [132, 133], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 31}}, {"id": 132, "type": "string_literal", "text": "\"OBJECT\"", "parent": 131, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 10}}, {"id": 133, "type": "identifier", "text": "SECTION_OBJECT", "parent": 131, "children": [], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 30}}, {"id": 134, "type": "initializer_list", "text": "{\"STRING\", SECTION_STRING}", "parent": 124, "children": [135, 136], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 31}}, {"id": 135, "type": "string_literal", "text": "\"STRING\"", "parent": 134, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 10}}, {"id": 136, "type": "identifier", "text": "SECTION_STRING", "parent": 134, "children": [], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 30}}, {"id": 137, "type": "initializer_list", "text": "{\"EXTERN\", SECTION_EXTERN}", "parent": 124, "children": [138, 139], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 31}}, {"id": 138, "type": "string_literal", "text": "\"EXTERN\"", "parent": 137, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 10}}, {"id": 139, "type": "identifier", "text": "SECTION_EXTERN", "parent": 137, "children": [], "start_point": {"row": 48, "column": 16}, "end_point": {"row": 48, "column": 30}}, {"id": 140, "type": "initializer_list", "text": "{\"SYM_STRING\", SECTION_SYM_STRING}", "parent": 124, "children": [141, 142], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 35}}, {"id": 141, "type": "string_literal", "text": "\"SYM_STRING\"", "parent": 140, "children": [], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 14}}, {"id": 142, "type": "identifier", "text": "SECTION_SYM_STRING", "parent": 140, "children": [], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 34}}, {"id": 143, "type": "initializer_list", "text": "{\"SYM_FILE\", SECTION_SYM_FILE}", "parent": 124, "children": [144, 145], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 33}}, {"id": 144, "type": "string_literal", "text": "\"SYM_FILE\"", "parent": 143, "children": [], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 12}}, {"id": 145, "type": "identifier", "text": "SECTION_SYM_FILE", "parent": 143, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 32}}, {"id": 146, "type": "initializer_list", "text": "{\"SYM_FUNC\", SECTION_SYM_FUNC}", "parent": 124, "children": [147, 148], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 33}}, {"id": 147, "type": "string_literal", "text": "\"SYM_FUNC\"", "parent": 146, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 12}}, {"id": 148, "type": "identifier", "text": "SECTION_SYM_FUNC", "parent": 146, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 32}}, {"id": 149, "type": "initializer_list", "text": "{\"SYM_LINE\", SECTION_SYM_LINE}", "parent": 124, "children": [150, 151], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 33}}, {"id": 150, "type": "string_literal", "text": "\"SYM_LINE\"", "parent": 149, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 12}}, {"id": 151, "type": "identifier", "text": "SECTION_SYM_LINE", "parent": 149, "children": [], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 32}}, {"id": 152, "type": "function_definition", "text": "static wstring_t** section_create_stringmap(const uint8_t* data) {\n\tuint32_t count = ((uint32_t*)data)[0];\n\tdata += 4;\n\twstring_t** map = (wstring_t**)malloc(count * sizeof(wstring_t**));\n\tfor (uint32_t i = 0; i < count; i++) {\n\t\tmap[i] = (wstring_t*)data;\n\t\tuint32_t size = map[i]->size;\n\t\tdata += 4 + ((size + (size&1)) * 2);\n\t}\n\treturn map;\n}", "parent": null, "children": [153, 154], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 153, "type": "type_identifier", "text": "wstring_t", "parent": 152, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 16}}, {"id": 154, "type": "pointer_declarator", "text": "** section_create_stringmap(const uint8_t* data)", "parent": 152, "children": [155, 156], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 64}}, {"id": 155, "type": "*", "text": "*", "parent": 154, "children": [], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 17}}, {"id": 156, "type": "pointer_declarator", "text": "* section_create_stringmap(const uint8_t* data)", "parent": 154, "children": [157, 158], "start_point": {"row": 55, "column": 17}, "end_point": {"row": 55, "column": 64}}, {"id": 157, "type": "*", "text": "*", "parent": 156, "children": [], "start_point": {"row": 55, "column": 17}, "end_point": {"row": 55, "column": 18}}, {"id": 158, "type": "function_declarator", "text": "section_create_stringmap(const uint8_t* data)", "parent": 156, "children": [159, 160], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 64}}, {"id": 159, "type": "identifier", "text": "section_create_stringmap", "parent": 158, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 43}}, {"id": 160, "type": "parameter_list", "text": "(const uint8_t* data)", "parent": 158, "children": [161], "start_point": {"row": 55, "column": 43}, "end_point": {"row": 55, "column": 64}}, {"id": 161, "type": "parameter_declaration", "text": "const uint8_t* data", "parent": 160, "children": [162, 163], "start_point": {"row": 55, "column": 44}, "end_point": {"row": 55, "column": 63}}, {"id": 162, "type": "primitive_type", "text": "uint8_t", "parent": 161, "children": [], "start_point": {"row": 55, "column": 50}, "end_point": {"row": 55, "column": 57}}, {"id": 163, "type": "pointer_declarator", "text": "* data", "parent": 161, "children": [164, 165], "start_point": {"row": 55, "column": 57}, "end_point": {"row": 55, "column": 63}}, {"id": 164, "type": "*", "text": "*", "parent": 163, "children": [], "start_point": {"row": 55, "column": 57}, "end_point": {"row": 55, "column": 58}}, {"id": 165, "type": "identifier", "text": "data", "parent": 163, "children": [], "start_point": {"row": 55, "column": 59}, "end_point": {"row": 55, "column": 63}}, {"id": 166, "type": "declaration", "text": "uint32_t count = ((uint32_t*)data)[0];", "parent": 152, "children": [167, 168], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 39}}, {"id": 167, "type": "primitive_type", "text": "uint32_t", "parent": 166, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 9}}, {"id": 168, "type": "init_declarator", "text": "count = ((uint32_t*)data)[0]", "parent": 166, "children": [169, 170, 171], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 38}}, {"id": 169, "type": "identifier", "text": "count", "parent": 168, "children": [], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 15}}, {"id": 170, "type": "=", "text": "=", "parent": 168, "children": [], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 17}}, {"id": 171, "type": "subscript_expression", "text": "((uint32_t*)data)[0]", "parent": 168, "children": [172, 179], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 38}}, {"id": 172, "type": "parenthesized_expression", "text": "((uint32_t*)data)", "parent": 171, "children": [173], "start_point": {"row": 56, "column": 18}, "end_point": {"row": 56, "column": 35}}, {"id": 173, "type": "cast_expression", "text": "(uint32_t*)data", "parent": 172, "children": [174, 178], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 34}}, {"id": 174, "type": "type_descriptor", "text": "uint32_t*", "parent": 173, "children": [175, 176], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 29}}, {"id": 175, "type": "primitive_type", "text": "uint32_t", "parent": 174, "children": [], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 28}}, {"id": 176, "type": "abstract_pointer_declarator", "text": "*", "parent": 174, "children": [177], "start_point": {"row": 56, "column": 28}, "end_point": {"row": 56, "column": 29}}, {"id": 177, "type": "*", "text": "*", "parent": 176, "children": [], "start_point": {"row": 56, "column": 28}, "end_point": {"row": 56, "column": 29}}, {"id": 178, "type": "identifier", "text": "data", "parent": 173, "children": [], "start_point": {"row": 56, "column": 30}, "end_point": {"row": 56, "column": 34}}, {"id": 179, "type": "number_literal", "text": "0", "parent": 171, "children": [], "start_point": {"row": 56, "column": 36}, "end_point": {"row": 56, "column": 37}}, {"id": 180, "type": "assignment_expression", "text": "data += 4", "parent": 152, "children": [181, 182, 183], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 10}}, {"id": 181, "type": "identifier", "text": "data", "parent": 180, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 5}}, {"id": 182, "type": "+=", "text": "+=", "parent": 180, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 8}}, {"id": 183, "type": "number_literal", "text": "4", "parent": 180, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 10}}, {"id": 184, "type": "declaration", "text": "wstring_t** map = (wstring_t**)malloc(count * sizeof(wstring_t**));", "parent": 152, "children": [185, 186], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 68}}, {"id": 185, "type": "type_identifier", "text": "wstring_t", "parent": 184, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 10}}, {"id": 186, "type": "init_declarator", "text": "** map = (wstring_t**)malloc(count * sizeof(wstring_t**))", "parent": 184, "children": [187, 192, 193], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 67}}, {"id": 187, "type": "pointer_declarator", "text": "** map", "parent": 186, "children": [188, 189], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 16}}, {"id": 188, "type": "*", "text": "*", "parent": 187, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 11}}, {"id": 189, "type": "pointer_declarator", "text": "* map", "parent": 187, "children": [190, 191], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 16}}, {"id": 190, "type": "*", "text": "*", "parent": 189, "children": [], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 12}}, {"id": 191, "type": "identifier", "text": "map", "parent": 189, "children": [], "start_point": {"row": 58, "column": 13}, "end_point": {"row": 58, "column": 16}}, {"id": 192, "type": "=", "text": "=", "parent": 186, "children": [], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 18}}, {"id": 193, "type": "cast_expression", "text": "(wstring_t**)malloc(count * sizeof(wstring_t**))", "parent": 186, "children": [194, 200], "start_point": {"row": 58, "column": 19}, "end_point": {"row": 58, "column": 67}}, {"id": 194, "type": "type_descriptor", "text": "wstring_t**", "parent": 193, "children": [195, 196], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 31}}, {"id": 195, "type": "type_identifier", "text": "wstring_t", "parent": 194, "children": [], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 29}}, {"id": 196, "type": "abstract_pointer_declarator", "text": "**", "parent": 194, "children": [197, 198], "start_point": {"row": 58, "column": 29}, "end_point": {"row": 58, "column": 31}}, {"id": 197, "type": "*", "text": "*", "parent": 196, "children": [], "start_point": {"row": 58, "column": 29}, "end_point": {"row": 58, "column": 30}}, {"id": 198, "type": "abstract_pointer_declarator", "text": "*", "parent": 196, "children": [199], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 58, "column": 31}}, {"id": 199, "type": "*", "text": "*", "parent": 198, "children": [], "start_point": {"row": 58, "column": 30}, "end_point": {"row": 58, "column": 31}}, {"id": 200, "type": "call_expression", "text": "malloc(count * sizeof(wstring_t**))", "parent": 193, "children": [201, 202], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 67}}, {"id": 201, "type": "identifier", "text": "malloc", "parent": 200, "children": [], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 38}}, {"id": 202, "type": "argument_list", "text": "(count * sizeof(wstring_t**))", "parent": 200, "children": [203], "start_point": {"row": 58, "column": 38}, "end_point": {"row": 58, "column": 67}}, {"id": 203, "type": "binary_expression", "text": "count * sizeof(wstring_t**)", "parent": 202, "children": [204, 205, 206], "start_point": {"row": 58, "column": 39}, "end_point": {"row": 58, "column": 66}}, {"id": 204, "type": "identifier", "text": "count", "parent": 203, "children": [], "start_point": {"row": 58, "column": 39}, "end_point": {"row": 58, "column": 44}}, {"id": 205, "type": "*", "text": "*", "parent": 203, "children": [], "start_point": {"row": 58, "column": 45}, "end_point": {"row": 58, "column": 46}}, {"id": 206, "type": "sizeof_expression", "text": "sizeof(wstring_t**)", "parent": 203, "children": [207], "start_point": {"row": 58, "column": 47}, "end_point": {"row": 58, "column": 66}}, {"id": 207, "type": "type_descriptor", "text": "wstring_t**", "parent": 206, "children": [208, 209], "start_point": {"row": 58, "column": 54}, "end_point": {"row": 58, "column": 65}}, {"id": 208, "type": "type_identifier", "text": "wstring_t", "parent": 207, "children": [], "start_point": {"row": 58, "column": 54}, "end_point": {"row": 58, "column": 63}}, {"id": 209, "type": "abstract_pointer_declarator", "text": "**", "parent": 207, "children": [210, 211], "start_point": {"row": 58, "column": 63}, "end_point": {"row": 58, "column": 65}}, {"id": 210, "type": "*", "text": "*", "parent": 209, "children": [], "start_point": {"row": 58, "column": 63}, "end_point": {"row": 58, "column": 64}}, {"id": 211, "type": "abstract_pointer_declarator", "text": "*", "parent": 209, "children": [212], "start_point": {"row": 58, "column": 64}, "end_point": {"row": 58, "column": 65}}, {"id": 212, "type": "*", "text": "*", "parent": 211, "children": [], "start_point": {"row": 58, "column": 64}, "end_point": {"row": 58, "column": 65}}, {"id": 213, "type": "for_statement", "text": "for (uint32_t i = 0; i < count; i++) {\n\t\tmap[i] = (wstring_t*)data;\n\t\tuint32_t size = map[i]->size;\n\t\tdata += 4 + ((size + (size&1)) * 2);\n\t}", "parent": 152, "children": [214, 220, 224], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 63, "column": 2}}, {"id": 214, "type": "declaration", "text": "uint32_t i = 0;", "parent": 213, "children": [215, 216], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 21}}, {"id": 215, "type": "primitive_type", "text": "uint32_t", "parent": 214, "children": [], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 14}}, {"id": 216, "type": "init_declarator", "text": "i = 0", "parent": 214, "children": [217, 218, 219], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 20}}, {"id": 217, "type": "identifier", "text": "i", "parent": 216, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 16}}, {"id": 218, "type": "=", "text": "=", "parent": 216, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 18}}, {"id": 219, "type": "number_literal", "text": "0", "parent": 216, "children": [], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 20}}, {"id": 220, "type": "binary_expression", "text": "i < count", "parent": 213, "children": [221, 222, 223], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 31}}, {"id": 221, "type": "identifier", "text": "i", "parent": 220, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 23}}, {"id": 222, "type": "<", "text": "<", "parent": 220, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 25}}, {"id": 223, "type": "identifier", "text": "count", "parent": 220, "children": [], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 31}}, {"id": 224, "type": "update_expression", "text": "i++", "parent": 213, "children": [225, 226], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 36}}, {"id": 225, "type": "identifier", "text": "i", "parent": 224, "children": [], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 34}}, {"id": 226, "type": "++", "text": "++", "parent": 224, "children": [], "start_point": {"row": 59, "column": 34}, "end_point": {"row": 59, "column": 36}}, {"id": 227, "type": "assignment_expression", "text": "map[i] = (wstring_t*)data", "parent": 213, "children": [228, 231, 232], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 27}}, {"id": 228, "type": "subscript_expression", "text": "map[i]", "parent": 227, "children": [229, 230], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 8}}, {"id": 229, "type": "identifier", "text": "map", "parent": 228, "children": [], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 5}}, {"id": 230, "type": "identifier", "text": "i", "parent": 228, "children": [], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 7}}, {"id": 231, "type": "=", "text": "=", "parent": 227, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 10}}, {"id": 232, "type": "cast_expression", "text": "(wstring_t*)data", "parent": 227, "children": [233, 237], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 27}}, {"id": 233, "type": "type_descriptor", "text": "wstring_t*", "parent": 232, "children": [234, 235], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 22}}, {"id": 234, "type": "type_identifier", "text": "wstring_t", "parent": 233, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 21}}, {"id": 235, "type": "abstract_pointer_declarator", "text": "*", "parent": 233, "children": [236], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 22}}, {"id": 236, "type": "*", "text": "*", "parent": 235, "children": [], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 22}}, {"id": 237, "type": "identifier", "text": "data", "parent": 232, "children": [], "start_point": {"row": 60, "column": 23}, "end_point": {"row": 60, "column": 27}}, {"id": 238, "type": "declaration", "text": "uint32_t size = map[i]->size;", "parent": 213, "children": [239, 240], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 31}}, {"id": 239, "type": "primitive_type", "text": "uint32_t", "parent": 238, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 10}}, {"id": 240, "type": "init_declarator", "text": "size = map[i]->size", "parent": 238, "children": [241, 242, 243], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 30}}, {"id": 241, "type": "identifier", "text": "size", "parent": 240, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 15}}, {"id": 242, "type": "=", "text": "=", "parent": 240, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 17}}, {"id": 243, "type": "field_expression", "text": "map[i]->size", "parent": 240, "children": [244, 247], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 30}}, {"id": 244, "type": "subscript_expression", "text": "map[i]", "parent": 243, "children": [245, 246], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 24}}, {"id": 245, "type": "identifier", "text": "map", "parent": 244, "children": [], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 21}}, {"id": 246, "type": "identifier", "text": "i", "parent": 244, "children": [], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 23}}, {"id": 247, "type": "field_identifier", "text": "size", "parent": 243, "children": [], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 30}}, {"id": 248, "type": "assignment_expression", "text": "data += 4 + ((size + (size&1)) * 2)", "parent": 213, "children": [249, 250, 251], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 37}}, {"id": 249, "type": "identifier", "text": "data", "parent": 248, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 6}}, {"id": 250, "type": "+=", "text": "+=", "parent": 248, "children": [], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 9}}, {"id": 251, "type": "binary_expression", "text": "4 + ((size + (size&1)) * 2)", "parent": 248, "children": [252, 253, 254], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 37}}, {"id": 252, "type": "number_literal", "text": "4", "parent": 251, "children": [], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 11}}, {"id": 253, "type": "+", "text": "+", "parent": 251, "children": [], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 13}}, {"id": 254, "type": "parenthesized_expression", "text": "((size + (size&1)) * 2)", "parent": 251, "children": [255], "start_point": {"row": 62, "column": 14}, "end_point": {"row": 62, "column": 37}}, {"id": 255, "type": "binary_expression", "text": "(size + (size&1)) * 2", "parent": 254, "children": [256, 264, 265], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 36}}, {"id": 256, "type": "parenthesized_expression", "text": "(size + (size&1))", "parent": 255, "children": [257], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 32}}, {"id": 257, "type": "binary_expression", "text": "size + (size&1)", "parent": 256, "children": [258, 259, 260], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 31}}, {"id": 258, "type": "identifier", "text": "size", "parent": 257, "children": [], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 20}}, {"id": 259, "type": "+", "text": "+", "parent": 257, "children": [], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 22}}, {"id": 260, "type": "parenthesized_expression", "text": "(size&1)", "parent": 257, "children": [261], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 31}}, {"id": 261, "type": "binary_expression", "text": "size&1", "parent": 260, "children": [262, 263], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 30}}, {"id": 262, "type": "identifier", "text": "size", "parent": 261, "children": [], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 28}}, {"id": 263, "type": "number_literal", "text": "1", "parent": 261, "children": [], "start_point": {"row": 62, "column": 29}, "end_point": {"row": 62, "column": 30}}, {"id": 264, "type": "*", "text": "*", "parent": 255, "children": [], "start_point": {"row": 62, "column": 33}, "end_point": {"row": 62, "column": 34}}, {"id": 265, "type": "number_literal", "text": "2", "parent": 255, "children": [], "start_point": {"row": 62, "column": 35}, "end_point": {"row": 62, "column": 36}}, {"id": 266, "type": "return_statement", "text": "return map;", "parent": 152, "children": [267], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 12}}, {"id": 267, "type": "identifier", "text": "map", "parent": 266, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 11}}, {"id": 268, "type": "function_definition", "text": "static vm_loader_error_t section_loader_progmem(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);\n\tvm_progmem = (vm_opcode_t*)data;\n\treturn VM_LOADER_ERROR_NONE;\n}", "parent": null, "children": [269, 270], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 71, "column": 1}}, {"id": 269, "type": "type_identifier", "text": "vm_loader_error_t", "parent": 268, "children": [], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 24}}, {"id": 270, "type": "function_declarator", "text": "section_loader_progmem(const uint8_t* data, uint32_t size)", "parent": 268, "children": [271, 272], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 83}}, {"id": 271, "type": "identifier", "text": "section_loader_progmem", "parent": 270, "children": [], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 47}}, {"id": 272, "type": "parameter_list", "text": "(const uint8_t* data, uint32_t size)", "parent": 270, "children": [273, 278], "start_point": {"row": 67, "column": 47}, "end_point": {"row": 67, "column": 83}}, {"id": 273, "type": "parameter_declaration", "text": "const uint8_t* data", "parent": 272, "children": [274, 275], "start_point": {"row": 67, "column": 48}, "end_point": {"row": 67, "column": 67}}, {"id": 274, "type": "primitive_type", "text": "uint8_t", "parent": 273, "children": [], "start_point": {"row": 67, "column": 54}, "end_point": {"row": 67, "column": 61}}, {"id": 275, "type": "pointer_declarator", "text": "* data", "parent": 273, "children": [276, 277], "start_point": {"row": 67, "column": 61}, "end_point": {"row": 67, "column": 67}}, {"id": 276, "type": "*", "text": "*", "parent": 275, "children": [], "start_point": {"row": 67, "column": 61}, "end_point": {"row": 67, "column": 62}}, {"id": 277, "type": "identifier", "text": "data", "parent": 275, "children": [], "start_point": {"row": 67, "column": 63}, "end_point": {"row": 67, "column": 67}}, {"id": 278, "type": "parameter_declaration", "text": "uint32_t size", "parent": 272, "children": [279, 280], "start_point": {"row": 67, "column": 69}, "end_point": {"row": 67, "column": 82}}, {"id": 279, "type": "primitive_type", "text": "uint32_t", "parent": 278, "children": [], "start_point": {"row": 67, "column": 69}, "end_point": {"row": 67, "column": 77}}, {"id": 280, "type": "identifier", "text": "size", "parent": 278, "children": [], "start_point": {"row": 67, "column": 78}, "end_point": {"row": 67, "column": 82}}, {"id": 281, "type": "call_expression", "text": "UNUSED(size)", "parent": 268, "children": [282, 283], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 13}}, {"id": 282, "type": "identifier", "text": "UNUSED", "parent": 281, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 7}}, {"id": 283, "type": "argument_list", "text": "(size)", "parent": 281, "children": [284], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 13}}, {"id": 284, "type": "identifier", "text": "size", "parent": 283, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 12}}, {"id": 285, "type": "assignment_expression", "text": "vm_progmem = (vm_opcode_t*)data", "parent": 268, "children": [286, 287, 288], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 32}}, {"id": 286, "type": "identifier", "text": "vm_progmem", "parent": 285, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 11}}, {"id": 287, "type": "=", "text": "=", "parent": 285, "children": [], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 13}}, {"id": 288, "type": "cast_expression", "text": "(vm_opcode_t*)data", "parent": 285, "children": [289, 293], "start_point": {"row": 69, "column": 14}, "end_point": {"row": 69, "column": 32}}, {"id": 289, "type": "type_descriptor", "text": "vm_opcode_t*", "parent": 288, "children": [290, 291], "start_point": {"row": 69, "column": 15}, "end_point": {"row": 69, "column": 27}}, {"id": 290, "type": "type_identifier", "text": "vm_opcode_t", "parent": 289, "children": [], "start_point": {"row": 69, "column": 15}, "end_point": {"row": 69, "column": 26}}, {"id": 291, "type": "abstract_pointer_declarator", "text": "*", "parent": 289, "children": [292], "start_point": {"row": 69, "column": 26}, "end_point": {"row": 69, "column": 27}}, {"id": 292, "type": "*", "text": "*", "parent": 291, "children": [], "start_point": {"row": 69, "column": 26}, "end_point": {"row": 69, "column": 27}}, {"id": 293, "type": "identifier", "text": "data", "parent": 288, "children": [], "start_point": {"row": 69, "column": 28}, "end_point": {"row": 69, "column": 32}}, {"id": 294, "type": "return_statement", "text": "return VM_LOADER_ERROR_NONE;", "parent": 268, "children": [295], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 29}}, {"id": 295, "type": "identifier", "text": "VM_LOADER_ERROR_NONE", "parent": 294, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 28}}, {"id": 296, "type": "function_definition", "text": "static vm_loader_error_t section_loader_shift(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);\n\tvm_memmap_set_offset(((uint32_t*)data)[0]);\n\treturn VM_LOADER_ERROR_NONE;\n}", "parent": null, "children": [297, 298], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 77, "column": 1}}, {"id": 297, "type": "type_identifier", "text": "vm_loader_error_t", "parent": 296, "children": [], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 24}}, {"id": 298, "type": "function_declarator", "text": "section_loader_shift(const uint8_t* data, uint32_t size)", "parent": 296, "children": [299, 300], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 81}}, {"id": 299, "type": "identifier", "text": "section_loader_shift", "parent": 298, "children": [], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 45}}, {"id": 300, "type": "parameter_list", "text": "(const uint8_t* data, uint32_t size)", "parent": 298, "children": [301, 306], "start_point": {"row": 73, "column": 45}, "end_point": {"row": 73, "column": 81}}, {"id": 301, "type": "parameter_declaration", "text": "const uint8_t* data", "parent": 300, "children": [302, 303], "start_point": {"row": 73, "column": 46}, "end_point": {"row": 73, "column": 65}}, {"id": 302, "type": "primitive_type", "text": "uint8_t", "parent": 301, "children": [], "start_point": {"row": 73, "column": 52}, "end_point": {"row": 73, "column": 59}}, {"id": 303, "type": "pointer_declarator", "text": "* data", "parent": 301, "children": [304, 305], "start_point": {"row": 73, "column": 59}, "end_point": {"row": 73, "column": 65}}, {"id": 304, "type": "*", "text": "*", "parent": 303, "children": [], "start_point": {"row": 73, "column": 59}, "end_point": {"row": 73, "column": 60}}, {"id": 305, "type": "identifier", "text": "data", "parent": 303, "children": [], "start_point": {"row": 73, "column": 61}, "end_point": {"row": 73, "column": 65}}, {"id": 306, "type": "parameter_declaration", "text": "uint32_t size", "parent": 300, "children": [307, 308], "start_point": {"row": 73, "column": 67}, "end_point": {"row": 73, "column": 80}}, {"id": 307, "type": "primitive_type", "text": "uint32_t", "parent": 306, "children": [], "start_point": {"row": 73, "column": 67}, "end_point": {"row": 73, "column": 75}}, {"id": 308, "type": "identifier", "text": "size", "parent": 306, "children": [], "start_point": {"row": 73, "column": 76}, "end_point": {"row": 73, "column": 80}}, {"id": 309, "type": "call_expression", "text": "UNUSED(size)", "parent": 296, "children": [310, 311], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 13}}, {"id": 310, "type": "identifier", "text": "UNUSED", "parent": 309, "children": [], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 7}}, {"id": 311, "type": "argument_list", "text": "(size)", "parent": 309, "children": [312], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 13}}, {"id": 312, "type": "identifier", "text": "size", "parent": 311, "children": [], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 12}}, {"id": 313, "type": "call_expression", "text": "vm_memmap_set_offset(((uint32_t*)data)[0])", "parent": 296, "children": [314, 315], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 43}}, {"id": 314, "type": "identifier", "text": "vm_memmap_set_offset", "parent": 313, "children": [], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 21}}, {"id": 315, "type": "argument_list", "text": "(((uint32_t*)data)[0])", "parent": 313, "children": [316], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 43}}, {"id": 316, "type": "subscript_expression", "text": "((uint32_t*)data)[0]", "parent": 315, "children": [317, 324], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 42}}, {"id": 317, "type": "parenthesized_expression", "text": "((uint32_t*)data)", "parent": 316, "children": [318], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 75, "column": 39}}, {"id": 318, "type": "cast_expression", "text": "(uint32_t*)data", "parent": 317, "children": [319, 323], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 38}}, {"id": 319, "type": "type_descriptor", "text": "uint32_t*", "parent": 318, "children": [320, 321], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 33}}, {"id": 320, "type": "primitive_type", "text": "uint32_t", "parent": 319, "children": [], "start_point": {"row": 75, "column": 24}, "end_point": {"row": 75, "column": 32}}, {"id": 321, "type": "abstract_pointer_declarator", "text": "*", "parent": 319, "children": [322], "start_point": {"row": 75, "column": 32}, "end_point": {"row": 75, "column": 33}}, {"id": 322, "type": "*", "text": "*", "parent": 321, "children": [], "start_point": {"row": 75, "column": 32}, "end_point": {"row": 75, "column": 33}}, {"id": 323, "type": "identifier", "text": "data", "parent": 318, "children": [], "start_point": {"row": 75, "column": 34}, "end_point": {"row": 75, "column": 38}}, {"id": 324, "type": "number_literal", "text": "0", "parent": 316, "children": [], "start_point": {"row": 75, "column": 40}, "end_point": {"row": 75, "column": 41}}, {"id": 325, "type": "return_statement", "text": "return VM_LOADER_ERROR_NONE;", "parent": 296, "children": [326], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 76, "column": 29}}, {"id": 326, "type": "identifier", "text": "VM_LOADER_ERROR_NONE", "parent": 325, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 28}}, {"id": 327, "type": "function_definition", "text": "static vm_loader_error_t section_loader_object(const uint8_t* data, uint32_t size) {\n\tvm_loader_object_t* objects = (vm_loader_object_t*)data;\n\tvm_loader_object_t* end = (vm_loader_object_t*)(data + size);\n\twhile (objects < end) {\n\t\tvoid* address = (void*)objects->code;\n\t\tvm_type_t type = objects->type;\n\t\tif (objects->type == VM_EXTERN_T) {\n\t\t\taddress = (void*)vm_extern_native_resolve(externs[objects->code]);\n\t\t\tif (address == NULL) {\n\t\t\t\taddress = (void*)vm_extern_resolve(externs[objects->code]);\n\t\t\t\tif (address == (void*)0xFFFFFFFF) {\n\t\t\t\t\tvm_loader_error_data = externs[objects->code];\n\t\t\t\t\treturn VM_LOADER_ERROR_EXTERN;\n\t\t\t\t} else {\n\t\t\t\t\ttype = VM_EXTERN_T;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttype = VM_NATIVE_T;\n\t\t\t}\n\t\t}\n\t\tuint32_t mmid = vm_hashmap_create(8, type, objects->name, objects->parent, address);\n\t\tif (objects->parent == MMID_NULL) {\n\t\t\tvm_root = mmid;\n\t\t}\n\t\tobjects += 1;\n\t}\n\treturn VM_LOADER_ERROR_NONE;\n}", "parent": null, "children": [328, 329], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 106, "column": 1}}, {"id": 328, "type": "type_identifier", "text": "vm_loader_error_t", "parent": 327, "children": [], "start_point": {"row": 79, "column": 7}, "end_point": {"row": 79, "column": 24}}, {"id": 329, "type": "function_declarator", "text": "section_loader_object(const uint8_t* data, uint32_t size)", "parent": 327, "children": [330, 331], "start_point": {"row": 79, "column": 25}, "end_point": {"row": 79, "column": 82}}, {"id": 330, "type": "identifier", "text": "section_loader_object", "parent": 329, "children": [], "start_point": {"row": 79, "column": 25}, "end_point": {"row": 79, "column": 46}}, {"id": 331, "type": "parameter_list", "text": "(const uint8_t* data, uint32_t size)", "parent": 329, "children": [332, 337], "start_point": {"row": 79, "column": 46}, "end_point": {"row": 79, "column": 82}}, {"id": 332, "type": "parameter_declaration", "text": "const uint8_t* data", "parent": 331, "children": [333, 334], "start_point": {"row": 79, "column": 47}, "end_point": {"row": 79, "column": 66}}, {"id": 333, "type": "primitive_type", "text": "uint8_t", "parent": 332, "children": [], "start_point": {"row": 79, "column": 53}, "end_point": {"row": 79, "column": 60}}, {"id": 334, "type": "pointer_declarator", "text": "* data", "parent": 332, "children": [335, 336], "start_point": {"row": 79, "column": 60}, "end_point": {"row": 79, "column": 66}}, {"id": 335, "type": "*", "text": "*", "parent": 334, "children": [], "start_point": {"row": 79, "column": 60}, "end_point": {"row": 79, "column": 61}}, {"id": 336, "type": "identifier", "text": "data", "parent": 334, "children": [], "start_point": {"row": 79, "column": 62}, "end_point": {"row": 79, "column": 66}}, {"id": 337, "type": "parameter_declaration", "text": "uint32_t size", "parent": 331, "children": [338, 339], "start_point": {"row": 79, "column": 68}, "end_point": {"row": 79, "column": 81}}, {"id": 338, "type": "primitive_type", "text": "uint32_t", "parent": 337, "children": [], "start_point": {"row": 79, "column": 68}, "end_point": {"row": 79, "column": 76}}, {"id": 339, "type": "identifier", "text": "size", "parent": 337, "children": [], "start_point": {"row": 79, "column": 77}, "end_point": {"row": 79, "column": 81}}, {"id": 340, "type": "declaration", "text": "vm_loader_object_t* objects = (vm_loader_object_t*)data;", "parent": 327, "children": [341, 342], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 57}}, {"id": 341, "type": "type_identifier", "text": "vm_loader_object_t", "parent": 340, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 19}}, {"id": 342, "type": "init_declarator", "text": "* objects = (vm_loader_object_t*)data", "parent": 340, "children": [343, 346, 347], "start_point": {"row": 80, "column": 19}, "end_point": {"row": 80, "column": 56}}, {"id": 343, "type": "pointer_declarator", "text": "* objects", "parent": 342, "children": [344, 345], "start_point": {"row": 80, "column": 19}, "end_point": {"row": 80, "column": 28}}, {"id": 344, "type": "*", "text": "*", "parent": 343, "children": [], "start_point": {"row": 80, "column": 19}, "end_point": {"row": 80, "column": 20}}, {"id": 345, "type": "identifier", "text": "objects", "parent": 343, "children": [], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 28}}, {"id": 346, "type": "=", "text": "=", "parent": 342, "children": [], "start_point": {"row": 80, "column": 29}, "end_point": {"row": 80, "column": 30}}, {"id": 347, "type": "cast_expression", "text": "(vm_loader_object_t*)data", "parent": 342, "children": [348, 352], "start_point": {"row": 80, "column": 31}, "end_point": {"row": 80, "column": 56}}, {"id": 348, "type": "type_descriptor", "text": "vm_loader_object_t*", "parent": 347, "children": [349, 350], "start_point": {"row": 80, "column": 32}, "end_point": {"row": 80, "column": 51}}, {"id": 349, "type": "type_identifier", "text": "vm_loader_object_t", "parent": 348, "children": [], "start_point": {"row": 80, "column": 32}, "end_point": {"row": 80, "column": 50}}, {"id": 350, "type": "abstract_pointer_declarator", "text": "*", "parent": 348, "children": [351], "start_point": {"row": 80, "column": 50}, "end_point": {"row": 80, "column": 51}}, {"id": 351, "type": "*", "text": "*", "parent": 350, "children": [], "start_point": {"row": 80, "column": 50}, "end_point": {"row": 80, "column": 51}}, {"id": 352, "type": "identifier", "text": "data", "parent": 347, "children": [], "start_point": {"row": 80, "column": 52}, "end_point": {"row": 80, "column": 56}}, {"id": 353, "type": "declaration", "text": "vm_loader_object_t* end = (vm_loader_object_t*)(data + size);", "parent": 327, "children": [354, 355], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 62}}, {"id": 354, "type": "type_identifier", "text": "vm_loader_object_t", "parent": 353, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 19}}, {"id": 355, "type": "init_declarator", "text": "* end = (vm_loader_object_t*)(data + size)", "parent": 353, "children": [356, 358, 359], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 61}}, {"id": 356, "type": "pointer_declarator", "text": "* end", "parent": 355, "children": [357], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 24}}, {"id": 357, "type": "*", "text": "*", "parent": 356, "children": [], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 20}}, {"id": 358, "type": "=", "text": "=", "parent": 355, "children": [], "start_point": {"row": 81, "column": 25}, "end_point": {"row": 81, "column": 26}}, {"id": 359, "type": "cast_expression", "text": "(vm_loader_object_t*)(data + size)", "parent": 355, "children": [360, 364], "start_point": {"row": 81, "column": 27}, "end_point": {"row": 81, "column": 61}}, {"id": 360, "type": "type_descriptor", "text": "vm_loader_object_t*", "parent": 359, "children": [361, 362], "start_point": {"row": 81, "column": 28}, "end_point": {"row": 81, "column": 47}}, {"id": 361, "type": "type_identifier", "text": "vm_loader_object_t", "parent": 360, "children": [], "start_point": {"row": 81, "column": 28}, "end_point": {"row": 81, "column": 46}}, {"id": 362, "type": "abstract_pointer_declarator", "text": "*", "parent": 360, "children": [363], "start_point": {"row": 81, "column": 46}, "end_point": {"row": 81, "column": 47}}, {"id": 363, "type": "*", "text": "*", "parent": 362, "children": [], "start_point": {"row": 81, "column": 46}, "end_point": {"row": 81, "column": 47}}, {"id": 364, "type": "parenthesized_expression", "text": "(data + size)", "parent": 359, "children": [365], "start_point": {"row": 81, "column": 48}, "end_point": {"row": 81, "column": 61}}, {"id": 365, "type": "binary_expression", "text": "data + size", "parent": 364, "children": [366, 367, 368], "start_point": {"row": 81, "column": 49}, "end_point": {"row": 81, "column": 60}}, {"id": 366, "type": "identifier", "text": "data", "parent": 365, "children": [], "start_point": {"row": 81, "column": 49}, "end_point": {"row": 81, "column": 53}}, {"id": 367, "type": "+", "text": "+", "parent": 365, "children": [], "start_point": {"row": 81, "column": 54}, "end_point": {"row": 81, "column": 55}}, {"id": 368, "type": "identifier", "text": "size", "parent": 365, "children": [], "start_point": {"row": 81, "column": 56}, "end_point": {"row": 81, "column": 60}}, {"id": 369, "type": "while_statement", "text": "while (objects < end) {\n\t\tvoid* address = (void*)objects->code;\n\t\tvm_type_t type = objects->type;\n\t\tif (objects->type == VM_EXTERN_T) {\n\t\t\taddress = (void*)vm_extern_native_resolve(externs[objects->code]);\n\t\t\tif (address == NULL) {\n\t\t\t\taddress = (void*)vm_extern_resolve(externs[objects->code]);\n\t\t\t\tif (address == (void*)0xFFFFFFFF) {\n\t\t\t\t\tvm_loader_error_data = externs[objects->code];\n\t\t\t\t\treturn VM_LOADER_ERROR_EXTERN;\n\t\t\t\t} else {\n\t\t\t\t\ttype = VM_EXTERN_T;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttype = VM_NATIVE_T;\n\t\t\t}\n\t\t}\n\t\tuint32_t mmid = vm_hashmap_create(8, type, objects->name, objects->parent, address);\n\t\tif (objects->parent == MMID_NULL) {\n\t\t\tvm_root = mmid;\n\t\t}\n\t\tobjects += 1;\n\t}", "parent": 327, "children": [370], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 104, "column": 2}}, {"id": 370, "type": "parenthesized_expression", "text": "(objects < end)", "parent": 369, "children": [371], "start_point": {"row": 82, "column": 7}, "end_point": {"row": 82, "column": 22}}, {"id": 371, "type": "binary_expression", "text": "objects < end", "parent": 370, "children": [372, 373], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 21}}, {"id": 372, "type": "identifier", "text": "objects", "parent": 371, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 15}}, {"id": 373, "type": "<", "text": "<", "parent": 371, "children": [], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 17}}, {"id": 374, "type": "declaration", "text": "void* address = (void*)objects->code;", "parent": 369, "children": [375, 376], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 39}}, {"id": 375, "type": "primitive_type", "text": "void", "parent": 374, "children": [], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 6}}, {"id": 376, "type": "init_declarator", "text": "* address = (void*)objects->code", "parent": 374, "children": [377, 380, 381], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 38}}, {"id": 377, "type": "pointer_declarator", "text": "* address", "parent": 376, "children": [378, 379], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 15}}, {"id": 378, "type": "*", "text": "*", "parent": 377, "children": [], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 7}}, {"id": 379, "type": "identifier", "text": "address", "parent": 377, "children": [], "start_point": {"row": 83, "column": 8}, "end_point": {"row": 83, "column": 15}}, {"id": 380, "type": "=", "text": "=", "parent": 376, "children": [], "start_point": {"row": 83, "column": 16}, "end_point": {"row": 83, "column": 17}}, {"id": 381, "type": "cast_expression", "text": "(void*)objects->code", "parent": 376, "children": [382, 386], "start_point": {"row": 83, "column": 18}, "end_point": {"row": 83, "column": 38}}, {"id": 382, "type": "type_descriptor", "text": "void*", "parent": 381, "children": [383, 384], "start_point": {"row": 83, "column": 19}, "end_point": {"row": 83, "column": 24}}, {"id": 383, "type": "primitive_type", "text": "void", "parent": 382, "children": [], "start_point": {"row": 83, "column": 19}, "end_point": {"row": 83, "column": 23}}, {"id": 384, "type": "abstract_pointer_declarator", "text": "*", "parent": 382, "children": [385], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 24}}, {"id": 385, "type": "*", "text": "*", "parent": 384, "children": [], "start_point": {"row": 83, "column": 23}, "end_point": {"row": 83, "column": 24}}, {"id": 386, "type": "field_expression", "text": "objects->code", "parent": 381, "children": [387, 388], "start_point": {"row": 83, "column": 25}, "end_point": {"row": 83, "column": 38}}, {"id": 387, "type": "identifier", "text": "objects", "parent": 386, "children": [], "start_point": {"row": 83, "column": 25}, "end_point": {"row": 83, "column": 32}}, {"id": 388, "type": "field_identifier", "text": "code", "parent": 386, "children": [], "start_point": {"row": 83, "column": 34}, "end_point": {"row": 83, "column": 38}}, {"id": 389, "type": "declaration", "text": "vm_type_t type = objects->type;", "parent": 369, "children": [390, 391], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 33}}, {"id": 390, "type": "type_identifier", "text": "vm_type_t", "parent": 389, "children": [], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 11}}, {"id": 391, "type": "init_declarator", "text": "type = objects->type", "parent": 389, "children": [392, 393, 394], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 32}}, {"id": 392, "type": "identifier", "text": "type", "parent": 391, "children": [], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 16}}, {"id": 393, "type": "=", "text": "=", "parent": 391, "children": [], "start_point": {"row": 84, "column": 17}, "end_point": {"row": 84, "column": 18}}, {"id": 394, "type": "field_expression", "text": "objects->type", "parent": 391, "children": [395, 396], "start_point": {"row": 84, "column": 19}, "end_point": {"row": 84, "column": 32}}, {"id": 395, "type": "identifier", "text": "objects", "parent": 394, "children": [], "start_point": {"row": 84, "column": 19}, "end_point": {"row": 84, "column": 26}}, {"id": 396, "type": "field_identifier", "text": "type", "parent": 394, "children": [], "start_point": {"row": 84, "column": 28}, "end_point": {"row": 84, "column": 32}}, {"id": 397, "type": "if_statement", "text": "if (objects->type == VM_EXTERN_T) {\n\t\t\taddress = (void*)vm_extern_native_resolve(externs[objects->code]);\n\t\t\tif (address == NULL) {\n\t\t\t\taddress = (void*)vm_extern_resolve(externs[objects->code]);\n\t\t\t\tif (address == (void*)0xFFFFFFFF) {\n\t\t\t\t\tvm_loader_error_data = externs[objects->code];\n\t\t\t\t\treturn VM_LOADER_ERROR_EXTERN;\n\t\t\t\t} else {\n\t\t\t\t\ttype = VM_EXTERN_T;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttype = VM_NATIVE_T;\n\t\t\t}\n\t\t}", "parent": 369, "children": [398], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 98, "column": 3}}, {"id": 398, "type": "parenthesized_expression", "text": "(objects->type == VM_EXTERN_T)", "parent": 397, "children": [399], "start_point": {"row": 85, "column": 5}, "end_point": {"row": 85, "column": 35}}, {"id": 399, "type": "binary_expression", "text": "objects->type == VM_EXTERN_T", "parent": 398, "children": [400, 403, 404], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 34}}, {"id": 400, "type": "field_expression", "text": "objects->type", "parent": 399, "children": [401, 402], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 19}}, {"id": 401, "type": "identifier", "text": "objects", "parent": 400, "children": [], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 13}}, {"id": 402, "type": "field_identifier", "text": "type", "parent": 400, "children": [], "start_point": {"row": 85, "column": 15}, "end_point": {"row": 85, "column": 19}}, {"id": 403, "type": "==", "text": "==", "parent": 399, "children": [], "start_point": {"row": 85, "column": 20}, "end_point": {"row": 85, "column": 22}}, {"id": 404, "type": "identifier", "text": "VM_EXTERN_T", "parent": 399, "children": [], "start_point": {"row": 85, "column": 23}, "end_point": {"row": 85, "column": 34}}, {"id": 405, "type": "assignment_expression", "text": "address = (void*)vm_extern_native_resolve(externs[objects->code])", "parent": 397, "children": [406, 407, 408], "start_point": {"row": 86, "column": 3}, "end_point": {"row": 86, "column": 68}}, {"id": 406, "type": "identifier", "text": "address", "parent": 405, "children": [], "start_point": {"row": 86, "column": 3}, "end_point": {"row": 86, "column": 10}}, {"id": 407, "type": "=", "text": "=", "parent": 405, "children": [], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 12}}, {"id": 408, "type": "cast_expression", "text": "(void*)vm_extern_native_resolve(externs[objects->code])", "parent": 405, "children": [409, 413], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 86, "column": 68}}, {"id": 409, "type": "type_descriptor", "text": "void*", "parent": 408, "children": [410, 411], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 19}}, {"id": 410, "type": "primitive_type", "text": "void", "parent": 409, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 18}}, {"id": 411, "type": "abstract_pointer_declarator", "text": "*", "parent": 409, "children": [412], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 19}}, {"id": 412, "type": "*", "text": "*", "parent": 411, "children": [], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 19}}, {"id": 413, "type": "call_expression", "text": "vm_extern_native_resolve(externs[objects->code])", "parent": 408, "children": [414, 415], "start_point": {"row": 86, "column": 20}, "end_point": {"row": 86, "column": 68}}, {"id": 414, "type": "identifier", "text": "vm_extern_native_resolve", "parent": 413, "children": [], "start_point": {"row": 86, "column": 20}, "end_point": {"row": 86, "column": 44}}, {"id": 415, "type": "argument_list", "text": "(externs[objects->code])", "parent": 413, "children": [416], "start_point": {"row": 86, "column": 44}, "end_point": {"row": 86, "column": 68}}, {"id": 416, "type": "subscript_expression", "text": "externs[objects->code]", "parent": 415, "children": [417, 418], "start_point": {"row": 86, "column": 45}, "end_point": {"row": 86, "column": 67}}, {"id": 417, "type": "identifier", "text": "externs", "parent": 416, "children": [], "start_point": {"row": 86, "column": 45}, "end_point": {"row": 86, "column": 52}}, {"id": 418, "type": "field_expression", "text": "objects->code", "parent": 416, "children": [419, 420], "start_point": {"row": 86, "column": 53}, "end_point": {"row": 86, "column": 66}}, {"id": 419, "type": "identifier", "text": "objects", "parent": 418, "children": [], "start_point": {"row": 86, "column": 53}, "end_point": {"row": 86, "column": 60}}, {"id": 420, "type": "field_identifier", "text": "code", "parent": 418, "children": [], "start_point": {"row": 86, "column": 62}, "end_point": {"row": 86, "column": 66}}, {"id": 421, "type": "if_statement", "text": "if (address == NULL) {\n\t\t\t\taddress = (void*)vm_extern_resolve(externs[objects->code]);\n\t\t\t\tif (address == (void*)0xFFFFFFFF) {\n\t\t\t\t\tvm_loader_error_data = externs[objects->code];\n\t\t\t\t\treturn VM_LOADER_ERROR_EXTERN;\n\t\t\t\t} else {\n\t\t\t\t\ttype = VM_EXTERN_T;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttype = VM_NATIVE_T;\n\t\t\t}", "parent": 397, "children": [422, 470], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 97, "column": 4}}, {"id": 422, "type": "parenthesized_expression", "text": "(address == NULL)", "parent": 421, "children": [423], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 23}}, {"id": 423, "type": "binary_expression", "text": "address == NULL", "parent": 422, "children": [424, 425, 426], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 22}}, {"id": 424, "type": "identifier", "text": "address", "parent": 423, "children": [], "start_point": {"row": 87, "column": 7}, "end_point": {"row": 87, "column": 14}}, {"id": 425, "type": "==", "text": "==", "parent": 423, "children": [], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 17}}, {"id": 426, "type": "null", "text": "NULL", "parent": 423, "children": [427], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 22}}, {"id": 427, "type": "NULL", "text": "NULL", "parent": 426, "children": [], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 22}}, {"id": 428, "type": "assignment_expression", "text": "address = (void*)vm_extern_resolve(externs[objects->code])", "parent": 421, "children": [429, 430, 431], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 62}}, {"id": 429, "type": "identifier", "text": "address", "parent": 428, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 11}}, {"id": 430, "type": "=", "text": "=", "parent": 428, "children": [], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 13}}, {"id": 431, "type": "cast_expression", "text": "(void*)vm_extern_resolve(externs[objects->code])", "parent": 428, "children": [432, 436], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 62}}, {"id": 432, "type": "type_descriptor", "text": "void*", "parent": 431, "children": [433, 434], "start_point": {"row": 88, "column": 15}, "end_point": {"row": 88, "column": 20}}, {"id": 433, "type": "primitive_type", "text": "void", "parent": 432, "children": [], "start_point": {"row": 88, "column": 15}, "end_point": {"row": 88, "column": 19}}, {"id": 434, "type": "abstract_pointer_declarator", "text": "*", "parent": 432, "children": [435], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 20}}, {"id": 435, "type": "*", "text": "*", "parent": 434, "children": [], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 20}}, {"id": 436, "type": "call_expression", "text": "vm_extern_resolve(externs[objects->code])", "parent": 431, "children": [437, 438], "start_point": {"row": 88, "column": 21}, "end_point": {"row": 88, "column": 62}}, {"id": 437, "type": "identifier", "text": "vm_extern_resolve", "parent": 436, "children": [], "start_point": {"row": 88, "column": 21}, "end_point": {"row": 88, "column": 38}}, {"id": 438, "type": "argument_list", "text": "(externs[objects->code])", "parent": 436, "children": [439], "start_point": {"row": 88, "column": 38}, "end_point": {"row": 88, "column": 62}}, {"id": 439, "type": "subscript_expression", "text": "externs[objects->code]", "parent": 438, "children": [440, 441], "start_point": {"row": 88, "column": 39}, "end_point": {"row": 88, "column": 61}}, {"id": 440, "type": "identifier", "text": "externs", "parent": 439, "children": [], "start_point": {"row": 88, "column": 39}, "end_point": {"row": 88, "column": 46}}, {"id": 441, "type": "field_expression", "text": "objects->code", "parent": 439, "children": [442, 443], "start_point": {"row": 88, "column": 47}, "end_point": {"row": 88, "column": 60}}, {"id": 442, "type": "identifier", "text": "objects", "parent": 441, "children": [], "start_point": {"row": 88, "column": 47}, "end_point": {"row": 88, "column": 54}}, {"id": 443, "type": "field_identifier", "text": "code", "parent": 441, "children": [], "start_point": {"row": 88, "column": 56}, "end_point": {"row": 88, "column": 60}}, {"id": 444, "type": "if_statement", "text": "if (address == (void*)0xFFFFFFFF) {\n\t\t\t\t\tvm_loader_error_data = externs[objects->code];\n\t\t\t\t\treturn VM_LOADER_ERROR_EXTERN;\n\t\t\t\t} else {\n\t\t\t\t\ttype = VM_EXTERN_T;\n\t\t\t\t}", "parent": 421, "children": [445, 465], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 94, "column": 5}}, {"id": 445, "type": "parenthesized_expression", "text": "(address == (void*)0xFFFFFFFF)", "parent": 444, "children": [446], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 37}}, {"id": 446, "type": "binary_expression", "text": "address == (void*)0xFFFFFFFF", "parent": 445, "children": [447, 448, 449], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 36}}, {"id": 447, "type": "identifier", "text": "address", "parent": 446, "children": [], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 15}}, {"id": 448, "type": "==", "text": "==", "parent": 446, "children": [], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 18}}, {"id": 449, "type": "cast_expression", "text": "(void*)0xFFFFFFFF", "parent": 446, "children": [450, 454], "start_point": {"row": 89, "column": 19}, "end_point": {"row": 89, "column": 36}}, {"id": 450, "type": "type_descriptor", "text": "void*", "parent": 449, "children": [451, 452], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 25}}, {"id": 451, "type": "primitive_type", "text": "void", "parent": 450, "children": [], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 24}}, {"id": 452, "type": "abstract_pointer_declarator", "text": "*", "parent": 450, "children": [453], "start_point": {"row": 89, "column": 24}, "end_point": {"row": 89, "column": 25}}, {"id": 453, "type": "*", "text": "*", "parent": 452, "children": [], "start_point": {"row": 89, "column": 24}, "end_point": {"row": 89, "column": 25}}, {"id": 454, "type": "number_literal", "text": "0xFFFFFFFF", "parent": 449, "children": [], "start_point": {"row": 89, "column": 26}, "end_point": {"row": 89, "column": 36}}, {"id": 455, "type": "assignment_expression", "text": "vm_loader_error_data = externs[objects->code]", "parent": 444, "children": [456, 457, 458], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 50}}, {"id": 456, "type": "identifier", "text": "vm_loader_error_data", "parent": 455, "children": [], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 25}}, {"id": 457, "type": "=", "text": "=", "parent": 455, "children": [], "start_point": {"row": 90, "column": 26}, "end_point": {"row": 90, "column": 27}}, {"id": 458, "type": "subscript_expression", "text": "externs[objects->code]", "parent": 455, "children": [459, 460], "start_point": {"row": 90, "column": 28}, "end_point": {"row": 90, "column": 50}}, {"id": 459, "type": "identifier", "text": "externs", "parent": 458, "children": [], "start_point": {"row": 90, "column": 28}, "end_point": {"row": 90, "column": 35}}, {"id": 460, "type": "field_expression", "text": "objects->code", "parent": 458, "children": [461, 462], "start_point": {"row": 90, "column": 36}, "end_point": {"row": 90, "column": 49}}, {"id": 461, "type": "identifier", "text": "objects", "parent": 460, "children": [], "start_point": {"row": 90, "column": 36}, "end_point": {"row": 90, "column": 43}}, {"id": 462, "type": "field_identifier", "text": "code", "parent": 460, "children": [], "start_point": {"row": 90, "column": 45}, "end_point": {"row": 90, "column": 49}}, {"id": 463, "type": "return_statement", "text": "return VM_LOADER_ERROR_EXTERN;", "parent": 444, "children": [464], "start_point": {"row": 91, "column": 5}, "end_point": {"row": 91, "column": 35}}, {"id": 464, "type": "identifier", "text": "VM_LOADER_ERROR_EXTERN", "parent": 463, "children": [], "start_point": {"row": 91, "column": 12}, "end_point": {"row": 91, "column": 34}}, {"id": 465, "type": "else_clause", "text": "else {\n\t\t\t\t\ttype = VM_EXTERN_T;\n\t\t\t\t}", "parent": 444, "children": [], "start_point": {"row": 92, "column": 6}, "end_point": {"row": 94, "column": 5}}, {"id": 466, "type": "assignment_expression", "text": "type = VM_EXTERN_T", "parent": 465, "children": [467, 468, 469], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 23}}, {"id": 467, "type": "identifier", "text": "type", "parent": 466, "children": [], "start_point": {"row": 93, "column": 5}, "end_point": {"row": 93, "column": 9}}, {"id": 468, "type": "=", "text": "=", "parent": 466, "children": [], "start_point": {"row": 93, "column": 10}, "end_point": {"row": 93, "column": 11}}, {"id": 469, "type": "identifier", "text": "VM_EXTERN_T", "parent": 466, "children": [], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 93, "column": 23}}, {"id": 470, "type": "else_clause", "text": "else {\n\t\t\t\ttype = VM_NATIVE_T;\n\t\t\t}", "parent": 421, "children": [], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 97, "column": 4}}, {"id": 471, "type": "assignment_expression", "text": "type = VM_NATIVE_T", "parent": 470, "children": [472, 473, 474], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 22}}, {"id": 472, "type": "identifier", "text": "type", "parent": 471, "children": [], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 8}}, {"id": 473, "type": "=", "text": "=", "parent": 471, "children": [], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 10}}, {"id": 474, "type": "identifier", "text": "VM_NATIVE_T", "parent": 471, "children": [], "start_point": {"row": 96, "column": 11}, "end_point": {"row": 96, "column": 22}}, {"id": 475, "type": "declaration", "text": "uint32_t mmid = vm_hashmap_create(8, type, objects->name, objects->parent, address);", "parent": 369, "children": [476, 477], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 86}}, {"id": 476, "type": "primitive_type", "text": "uint32_t", "parent": 475, "children": [], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 10}}, {"id": 477, "type": "init_declarator", "text": "mmid = vm_hashmap_create(8, type, objects->name, objects->parent, address)", "parent": 475, "children": [478, 479, 480], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 85}}, {"id": 478, "type": "identifier", "text": "mmid", "parent": 477, "children": [], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 15}}, {"id": 479, "type": "=", "text": "=", "parent": 477, "children": [], "start_point": {"row": 99, "column": 16}, "end_point": {"row": 99, "column": 17}}, {"id": 480, "type": "call_expression", "text": "vm_hashmap_create(8, type, objects->name, objects->parent, address)", "parent": 477, "children": [481, 482], "start_point": {"row": 99, "column": 18}, "end_point": {"row": 99, "column": 85}}, {"id": 481, "type": "identifier", "text": "vm_hashmap_create", "parent": 480, "children": [], "start_point": {"row": 99, "column": 18}, "end_point": {"row": 99, "column": 35}}, {"id": 482, "type": "argument_list", "text": "(8, type, objects->name, objects->parent, address)", "parent": 480, "children": [483, 484, 485, 488, 491], "start_point": {"row": 99, "column": 35}, "end_point": {"row": 99, "column": 85}}, {"id": 483, "type": "number_literal", "text": "8", "parent": 482, "children": [], "start_point": {"row": 99, "column": 36}, "end_point": {"row": 99, "column": 37}}, {"id": 484, "type": "identifier", "text": "type", "parent": 482, "children": [], "start_point": {"row": 99, "column": 39}, "end_point": {"row": 99, "column": 43}}, {"id": 485, "type": "field_expression", "text": "objects->name", "parent": 482, "children": [486, 487], "start_point": {"row": 99, "column": 45}, "end_point": {"row": 99, "column": 58}}, {"id": 486, "type": "identifier", "text": "objects", "parent": 485, "children": [], "start_point": {"row": 99, "column": 45}, "end_point": {"row": 99, "column": 52}}, {"id": 487, "type": "field_identifier", "text": "name", "parent": 485, "children": [], "start_point": {"row": 99, "column": 54}, "end_point": {"row": 99, "column": 58}}, {"id": 488, "type": "field_expression", "text": "objects->parent", "parent": 482, "children": [489, 490], "start_point": {"row": 99, "column": 60}, "end_point": {"row": 99, "column": 75}}, {"id": 489, "type": "identifier", "text": "objects", "parent": 488, "children": [], "start_point": {"row": 99, "column": 60}, "end_point": {"row": 99, "column": 67}}, {"id": 490, "type": "field_identifier", "text": "parent", "parent": 488, "children": [], "start_point": {"row": 99, "column": 69}, "end_point": {"row": 99, "column": 75}}, {"id": 491, "type": "identifier", "text": "address", "parent": 482, "children": [], "start_point": {"row": 99, "column": 77}, "end_point": {"row": 99, "column": 84}}, {"id": 492, "type": "if_statement", "text": "if (objects->parent == MMID_NULL) {\n\t\t\tvm_root = mmid;\n\t\t}", "parent": 369, "children": [493], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 102, "column": 3}}, {"id": 493, "type": "parenthesized_expression", "text": "(objects->parent == MMID_NULL)", "parent": 492, "children": [494], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 35}}, {"id": 494, "type": "binary_expression", "text": "objects->parent == MMID_NULL", "parent": 493, "children": [495, 498, 499], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 34}}, {"id": 495, "type": "field_expression", "text": "objects->parent", "parent": 494, "children": [496, 497], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 21}}, {"id": 496, "type": "identifier", "text": "objects", "parent": 495, "children": [], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 13}}, {"id": 497, "type": "field_identifier", "text": "parent", "parent": 495, "children": [], "start_point": {"row": 100, "column": 15}, "end_point": {"row": 100, "column": 21}}, {"id": 498, "type": "==", "text": "==", "parent": 494, "children": [], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 24}}, {"id": 499, "type": "identifier", "text": "MMID_NULL", "parent": 494, "children": [], "start_point": {"row": 100, "column": 25}, "end_point": {"row": 100, "column": 34}}, {"id": 500, "type": "assignment_expression", "text": "vm_root = mmid", "parent": 492, "children": [501, 502, 503], "start_point": {"row": 101, "column": 3}, "end_point": {"row": 101, "column": 17}}, {"id": 501, "type": "identifier", "text": "vm_root", "parent": 500, "children": [], "start_point": {"row": 101, "column": 3}, "end_point": {"row": 101, "column": 10}}, {"id": 502, "type": "=", "text": "=", "parent": 500, "children": [], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 12}}, {"id": 503, "type": "identifier", "text": "mmid", "parent": 500, "children": [], "start_point": {"row": 101, "column": 13}, "end_point": {"row": 101, "column": 17}}, {"id": 504, "type": "assignment_expression", "text": "objects += 1", "parent": 369, "children": [505, 506, 507], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 14}}, {"id": 505, "type": "identifier", "text": "objects", "parent": 504, "children": [], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 9}}, {"id": 506, "type": "+=", "text": "+=", "parent": 504, "children": [], "start_point": {"row": 103, "column": 10}, "end_point": {"row": 103, "column": 12}}, {"id": 507, "type": "number_literal", "text": "1", "parent": 504, "children": [], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 14}}, {"id": 508, "type": "return_statement", "text": "return VM_LOADER_ERROR_NONE;", "parent": 327, "children": [509], "start_point": {"row": 105, "column": 1}, "end_point": {"row": 105, "column": 29}}, {"id": 509, "type": "identifier", "text": "VM_LOADER_ERROR_NONE", "parent": 508, "children": [], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 28}}, {"id": 510, "type": "function_definition", "text": "static vm_loader_error_t section_loader_string(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);\n\tuint32_t count = ((uint32_t*)data)[0];\n\tdata += 4;\n\tfor (uint32_t i = 0; i < count; i++) {\n\t\twstring_t* str = (wstring_t*)data;\n\t\tvm_string_insert(str->data, str->size);\n\t\tdata += 4 + ((str->size + (str->size&1)) * 2);\n\t}\n\treturn VM_LOADER_ERROR_NONE;\n}", "parent": null, "children": [511, 512], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 118, "column": 1}}, {"id": 511, "type": "type_identifier", "text": "vm_loader_error_t", "parent": 510, "children": [], "start_point": {"row": 108, "column": 7}, "end_point": {"row": 108, "column": 24}}, {"id": 512, "type": "function_declarator", "text": "section_loader_string(const uint8_t* data, uint32_t size)", "parent": 510, "children": [513, 514], "start_point": {"row": 108, "column": 25}, "end_point": {"row": 108, "column": 82}}, {"id": 513, "type": "identifier", "text": "section_loader_string", "parent": 512, "children": [], "start_point": {"row": 108, "column": 25}, "end_point": {"row": 108, "column": 46}}, {"id": 514, "type": "parameter_list", "text": "(const uint8_t* data, uint32_t size)", "parent": 512, "children": [515, 520], "start_point": {"row": 108, "column": 46}, "end_point": {"row": 108, "column": 82}}, {"id": 515, "type": "parameter_declaration", "text": "const uint8_t* data", "parent": 514, "children": [516, 517], "start_point": {"row": 108, "column": 47}, "end_point": {"row": 108, "column": 66}}, {"id": 516, "type": "primitive_type", "text": "uint8_t", "parent": 515, "children": [], "start_point": {"row": 108, "column": 53}, "end_point": {"row": 108, "column": 60}}, {"id": 517, "type": "pointer_declarator", "text": "* data", "parent": 515, "children": [518, 519], "start_point": {"row": 108, "column": 60}, "end_point": {"row": 108, "column": 66}}, {"id": 518, "type": "*", "text": "*", "parent": 517, "children": [], "start_point": {"row": 108, "column": 60}, "end_point": {"row": 108, "column": 61}}, {"id": 519, "type": "identifier", "text": "data", "parent": 517, "children": [], "start_point": {"row": 108, "column": 62}, "end_point": {"row": 108, "column": 66}}, {"id": 520, "type": "parameter_declaration", "text": "uint32_t size", "parent": 514, "children": [521, 522], "start_point": {"row": 108, "column": 68}, "end_point": {"row": 108, "column": 81}}, {"id": 521, "type": "primitive_type", "text": "uint32_t", "parent": 520, "children": [], "start_point": {"row": 108, "column": 68}, "end_point": {"row": 108, "column": 76}}, {"id": 522, "type": "identifier", "text": "size", "parent": 520, "children": [], "start_point": {"row": 108, "column": 77}, "end_point": {"row": 108, "column": 81}}, {"id": 523, "type": "call_expression", "text": "UNUSED(size)", "parent": 510, "children": [524, 525], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 13}}, {"id": 524, "type": "identifier", "text": "UNUSED", "parent": 523, "children": [], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 7}}, {"id": 525, "type": "argument_list", "text": "(size)", "parent": 523, "children": [526], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 13}}, {"id": 526, "type": "identifier", "text": "size", "parent": 525, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 12}}, {"id": 527, "type": "declaration", "text": "uint32_t count = ((uint32_t*)data)[0];", "parent": 510, "children": [528, 529], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 39}}, {"id": 528, "type": "primitive_type", "text": "uint32_t", "parent": 527, "children": [], "start_point": {"row": 110, "column": 1}, "end_point": {"row": 110, "column": 9}}, {"id": 529, "type": "init_declarator", "text": "count = ((uint32_t*)data)[0]", "parent": 527, "children": [530, 531, 532], "start_point": {"row": 110, "column": 10}, "end_point": {"row": 110, "column": 38}}, {"id": 530, "type": "identifier", "text": "count", "parent": 529, "children": [], "start_point": {"row": 110, "column": 10}, "end_point": {"row": 110, "column": 15}}, {"id": 531, "type": "=", "text": "=", "parent": 529, "children": [], "start_point": {"row": 110, "column": 16}, "end_point": {"row": 110, "column": 17}}, {"id": 532, "type": "subscript_expression", "text": "((uint32_t*)data)[0]", "parent": 529, "children": [533, 540], "start_point": {"row": 110, "column": 18}, "end_point": {"row": 110, "column": 38}}, {"id": 533, "type": "parenthesized_expression", "text": "((uint32_t*)data)", "parent": 532, "children": [534], "start_point": {"row": 110, "column": 18}, "end_point": {"row": 110, "column": 35}}, {"id": 534, "type": "cast_expression", "text": "(uint32_t*)data", "parent": 533, "children": [535, 539], "start_point": {"row": 110, "column": 19}, "end_point": {"row": 110, "column": 34}}, {"id": 535, "type": "type_descriptor", "text": "uint32_t*", "parent": 534, "children": [536, 537], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 29}}, {"id": 536, "type": "primitive_type", "text": "uint32_t", "parent": 535, "children": [], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 110, "column": 28}}, {"id": 537, "type": "abstract_pointer_declarator", "text": "*", "parent": 535, "children": [538], "start_point": {"row": 110, "column": 28}, "end_point": {"row": 110, "column": 29}}, {"id": 538, "type": "*", "text": "*", "parent": 537, "children": [], "start_point": {"row": 110, "column": 28}, "end_point": {"row": 110, "column": 29}}, {"id": 539, "type": "identifier", "text": "data", "parent": 534, "children": [], "start_point": {"row": 110, "column": 30}, "end_point": {"row": 110, "column": 34}}, {"id": 540, "type": "number_literal", "text": "0", "parent": 532, "children": [], "start_point": {"row": 110, "column": 36}, "end_point": {"row": 110, "column": 37}}, {"id": 541, "type": "assignment_expression", "text": "data += 4", "parent": 510, "children": [542, 543, 544], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 10}}, {"id": 542, "type": "identifier", "text": "data", "parent": 541, "children": [], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 5}}, {"id": 543, "type": "+=", "text": "+=", "parent": 541, "children": [], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 8}}, {"id": 544, "type": "number_literal", "text": "4", "parent": 541, "children": [], "start_point": {"row": 111, "column": 9}, "end_point": {"row": 111, "column": 10}}, {"id": 545, "type": "for_statement", "text": "for (uint32_t i = 0; i < count; i++) {\n\t\twstring_t* str = (wstring_t*)data;\n\t\tvm_string_insert(str->data, str->size);\n\t\tdata += 4 + ((str->size + (str->size&1)) * 2);\n\t}", "parent": 510, "children": [546, 552, 556], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 116, "column": 2}}, {"id": 546, "type": "declaration", "text": "uint32_t i = 0;", "parent": 545, "children": [547, 548], "start_point": {"row": 112, "column": 6}, "end_point": {"row": 112, "column": 21}}, {"id": 547, "type": "primitive_type", "text": "uint32_t", "parent": 546, "children": [], "start_point": {"row": 112, "column": 6}, "end_point": {"row": 112, "column": 14}}, {"id": 548, "type": "init_declarator", "text": "i = 0", "parent": 546, "children": [549, 550, 551], "start_point": {"row": 112, "column": 15}, "end_point": {"row": 112, "column": 20}}, {"id": 549, "type": "identifier", "text": "i", "parent": 548, "children": [], "start_point": {"row": 112, "column": 15}, "end_point": {"row": 112, "column": 16}}, {"id": 550, "type": "=", "text": "=", "parent": 548, "children": [], "start_point": {"row": 112, "column": 17}, "end_point": {"row": 112, "column": 18}}, {"id": 551, "type": "number_literal", "text": "0", "parent": 548, "children": [], "start_point": {"row": 112, "column": 19}, "end_point": {"row": 112, "column": 20}}, {"id": 552, "type": "binary_expression", "text": "i < count", "parent": 545, "children": [553, 554, 555], "start_point": {"row": 112, "column": 22}, "end_point": {"row": 112, "column": 31}}, {"id": 553, "type": "identifier", "text": "i", "parent": 552, "children": [], "start_point": {"row": 112, "column": 22}, "end_point": {"row": 112, "column": 23}}, {"id": 554, "type": "<", "text": "<", "parent": 552, "children": [], "start_point": {"row": 112, "column": 24}, "end_point": {"row": 112, "column": 25}}, {"id": 555, "type": "identifier", "text": "count", "parent": 552, "children": [], "start_point": {"row": 112, "column": 26}, "end_point": {"row": 112, "column": 31}}, {"id": 556, "type": "update_expression", "text": "i++", "parent": 545, "children": [557, 558], "start_point": {"row": 112, "column": 33}, "end_point": {"row": 112, "column": 36}}, {"id": 557, "type": "identifier", "text": "i", "parent": 556, "children": [], "start_point": {"row": 112, "column": 33}, "end_point": {"row": 112, "column": 34}}, {"id": 558, "type": "++", "text": "++", "parent": 556, "children": [], "start_point": {"row": 112, "column": 34}, "end_point": {"row": 112, "column": 36}}, {"id": 559, "type": "declaration", "text": "wstring_t* str = (wstring_t*)data;", "parent": 545, "children": [560, 561], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 113, "column": 36}}, {"id": 560, "type": "type_identifier", "text": "wstring_t", "parent": 559, "children": [], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 113, "column": 11}}, {"id": 561, "type": "init_declarator", "text": "* str = (wstring_t*)data", "parent": 559, "children": [562, 565, 566], "start_point": {"row": 113, "column": 11}, "end_point": {"row": 113, "column": 35}}, {"id": 562, "type": "pointer_declarator", "text": "* str", "parent": 561, "children": [563, 564], "start_point": {"row": 113, "column": 11}, "end_point": {"row": 113, "column": 16}}, {"id": 563, "type": "*", "text": "*", "parent": 562, "children": [], "start_point": {"row": 113, "column": 11}, "end_point": {"row": 113, "column": 12}}, {"id": 564, "type": "identifier", "text": "str", "parent": 562, "children": [], "start_point": {"row": 113, "column": 13}, "end_point": {"row": 113, "column": 16}}, {"id": 565, "type": "=", "text": "=", "parent": 561, "children": [], "start_point": {"row": 113, "column": 17}, "end_point": {"row": 113, "column": 18}}, {"id": 566, "type": "cast_expression", "text": "(wstring_t*)data", "parent": 561, "children": [567, 571], "start_point": {"row": 113, "column": 19}, "end_point": {"row": 113, "column": 35}}, {"id": 567, "type": "type_descriptor", "text": "wstring_t*", "parent": 566, "children": [568, 569], "start_point": {"row": 113, "column": 20}, "end_point": {"row": 113, "column": 30}}, {"id": 568, "type": "type_identifier", "text": "wstring_t", "parent": 567, "children": [], "start_point": {"row": 113, "column": 20}, "end_point": {"row": 113, "column": 29}}, {"id": 569, "type": "abstract_pointer_declarator", "text": "*", "parent": 567, "children": [570], "start_point": {"row": 113, "column": 29}, "end_point": {"row": 113, "column": 30}}, {"id": 570, "type": "*", "text": "*", "parent": 569, "children": [], "start_point": {"row": 113, "column": 29}, "end_point": {"row": 113, "column": 30}}, {"id": 571, "type": "identifier", "text": "data", "parent": 566, "children": [], "start_point": {"row": 113, "column": 31}, "end_point": {"row": 113, "column": 35}}, {"id": 572, "type": "call_expression", "text": "vm_string_insert(str->data, str->size)", "parent": 545, "children": [573, 574], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 40}}, {"id": 573, "type": "identifier", "text": "vm_string_insert", "parent": 572, "children": [], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 18}}, {"id": 574, "type": "argument_list", "text": "(str->data, str->size)", "parent": 572, "children": [575, 578], "start_point": {"row": 114, "column": 18}, "end_point": {"row": 114, "column": 40}}, {"id": 575, "type": "field_expression", "text": "str->data", "parent": 574, "children": [576, 577], "start_point": {"row": 114, "column": 19}, "end_point": {"row": 114, "column": 28}}, {"id": 576, "type": "identifier", "text": "str", "parent": 575, "children": [], "start_point": {"row": 114, "column": 19}, "end_point": {"row": 114, "column": 22}}, {"id": 577, "type": "field_identifier", "text": "data", "parent": 575, "children": [], "start_point": {"row": 114, "column": 24}, "end_point": {"row": 114, "column": 28}}, {"id": 578, "type": "field_expression", "text": "str->size", "parent": 574, "children": [579, 580], "start_point": {"row": 114, "column": 30}, "end_point": {"row": 114, "column": 39}}, {"id": 579, "type": "identifier", "text": "str", "parent": 578, "children": [], "start_point": {"row": 114, "column": 30}, "end_point": {"row": 114, "column": 33}}, {"id": 580, "type": "field_identifier", "text": "size", "parent": 578, "children": [], "start_point": {"row": 114, "column": 35}, "end_point": {"row": 114, "column": 39}}, {"id": 581, "type": "assignment_expression", "text": "data += 4 + ((str->size + (str->size&1)) * 2)", "parent": 545, "children": [582, 583, 584], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 47}}, {"id": 582, "type": "identifier", "text": "data", "parent": 581, "children": [], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 6}}, {"id": 583, "type": "+=", "text": "+=", "parent": 581, "children": [], "start_point": {"row": 115, "column": 7}, "end_point": {"row": 115, "column": 9}}, {"id": 584, "type": "binary_expression", "text": "4 + ((str->size + (str->size&1)) * 2)", "parent": 581, "children": [585, 586, 587], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 47}}, {"id": 585, "type": "number_literal", "text": "4", "parent": 584, "children": [], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 11}}, {"id": 586, "type": "+", "text": "+", "parent": 584, "children": [], "start_point": {"row": 115, "column": 12}, "end_point": {"row": 115, "column": 13}}, {"id": 587, "type": "parenthesized_expression", "text": "((str->size + (str->size&1)) * 2)", "parent": 584, "children": [588], "start_point": {"row": 115, "column": 14}, "end_point": {"row": 115, "column": 47}}, {"id": 588, "type": "binary_expression", "text": "(str->size + (str->size&1)) * 2", "parent": 587, "children": [589, 601, 602], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 46}}, {"id": 589, "type": "parenthesized_expression", "text": "(str->size + (str->size&1))", "parent": 588, "children": [590], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 42}}, {"id": 590, "type": "binary_expression", "text": "str->size + (str->size&1)", "parent": 589, "children": [591, 594, 595], "start_point": {"row": 115, "column": 16}, "end_point": {"row": 115, "column": 41}}, {"id": 591, "type": "field_expression", "text": "str->size", "parent": 590, "children": [592, 593], "start_point": {"row": 115, "column": 16}, "end_point": {"row": 115, "column": 25}}, {"id": 592, "type": "identifier", "text": "str", "parent": 591, "children": [], "start_point": {"row": 115, "column": 16}, "end_point": {"row": 115, "column": 19}}, {"id": 593, "type": "field_identifier", "text": "size", "parent": 591, "children": [], "start_point": {"row": 115, "column": 21}, "end_point": {"row": 115, "column": 25}}, {"id": 594, "type": "+", "text": "+", "parent": 590, "children": [], "start_point": {"row": 115, "column": 26}, "end_point": {"row": 115, "column": 27}}, {"id": 595, "type": "parenthesized_expression", "text": "(str->size&1)", "parent": 590, "children": [596], "start_point": {"row": 115, "column": 28}, "end_point": {"row": 115, "column": 41}}, {"id": 596, "type": "binary_expression", "text": "str->size&1", "parent": 595, "children": [597, 600], "start_point": {"row": 115, "column": 29}, "end_point": {"row": 115, "column": 40}}, {"id": 597, "type": "field_expression", "text": "str->size", "parent": 596, "children": [598, 599], "start_point": {"row": 115, "column": 29}, "end_point": {"row": 115, "column": 38}}, {"id": 598, "type": "identifier", "text": "str", "parent": 597, "children": [], "start_point": {"row": 115, "column": 29}, "end_point": {"row": 115, "column": 32}}, {"id": 599, "type": "field_identifier", "text": "size", "parent": 597, "children": [], "start_point": {"row": 115, "column": 34}, "end_point": {"row": 115, "column": 38}}, {"id": 600, "type": "number_literal", "text": "1", "parent": 596, "children": [], "start_point": {"row": 115, "column": 39}, "end_point": {"row": 115, "column": 40}}, {"id": 601, "type": "*", "text": "*", "parent": 588, "children": [], "start_point": {"row": 115, "column": 43}, "end_point": {"row": 115, "column": 44}}, {"id": 602, "type": "number_literal", "text": "2", "parent": 588, "children": [], "start_point": {"row": 115, "column": 45}, "end_point": {"row": 115, "column": 46}}, {"id": 603, "type": "return_statement", "text": "return VM_LOADER_ERROR_NONE;", "parent": 510, "children": [604], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 29}}, {"id": 604, "type": "identifier", "text": "VM_LOADER_ERROR_NONE", "parent": 603, "children": [], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 28}}, {"id": 605, "type": "function_definition", "text": "static vm_loader_error_t section_loader_extern(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);\n\texterns = section_create_stringmap(data);\n\treturn VM_LOADER_ERROR_NONE;\n}", "parent": null, "children": [606, 607], "start_point": {"row": 120, "column": 0}, "end_point": {"row": 124, "column": 1}}, {"id": 606, "type": "type_identifier", "text": "vm_loader_error_t", "parent": 605, "children": [], "start_point": {"row": 120, "column": 7}, "end_point": {"row": 120, "column": 24}}, {"id": 607, "type": "function_declarator", "text": "section_loader_extern(const uint8_t* data, uint32_t size)", "parent": 605, "children": [608, 609], "start_point": {"row": 120, "column": 25}, "end_point": {"row": 120, "column": 82}}, {"id": 608, "type": "identifier", "text": "section_loader_extern", "parent": 607, "children": [], "start_point": {"row": 120, "column": 25}, "end_point": {"row": 120, "column": 46}}, {"id": 609, "type": "parameter_list", "text": "(const uint8_t* data, uint32_t size)", "parent": 607, "children": [610, 615], "start_point": {"row": 120, "column": 46}, "end_point": {"row": 120, "column": 82}}, {"id": 610, "type": "parameter_declaration", "text": "const uint8_t* data", "parent": 609, "children": [611, 612], "start_point": {"row": 120, "column": 47}, "end_point": {"row": 120, "column": 66}}, {"id": 611, "type": "primitive_type", "text": "uint8_t", "parent": 610, "children": [], "start_point": {"row": 120, "column": 53}, "end_point": {"row": 120, "column": 60}}, {"id": 612, "type": "pointer_declarator", "text": "* data", "parent": 610, "children": [613, 614], "start_point": {"row": 120, "column": 60}, "end_point": {"row": 120, "column": 66}}, {"id": 613, "type": "*", "text": "*", "parent": 612, "children": [], "start_point": {"row": 120, "column": 60}, "end_point": {"row": 120, "column": 61}}, {"id": 614, "type": "identifier", "text": "data", "parent": 612, "children": [], "start_point": {"row": 120, "column": 62}, "end_point": {"row": 120, "column": 66}}, {"id": 615, "type": "parameter_declaration", "text": "uint32_t size", "parent": 609, "children": [616, 617], "start_point": {"row": 120, "column": 68}, "end_point": {"row": 120, "column": 81}}, {"id": 616, "type": "primitive_type", "text": "uint32_t", "parent": 615, "children": [], "start_point": {"row": 120, "column": 68}, "end_point": {"row": 120, "column": 76}}, {"id": 617, "type": "identifier", "text": "size", "parent": 615, "children": [], "start_point": {"row": 120, "column": 77}, "end_point": {"row": 120, "column": 81}}, {"id": 618, "type": "call_expression", "text": "UNUSED(size)", "parent": 605, "children": [619, 620], "start_point": {"row": 121, "column": 1}, "end_point": {"row": 121, "column": 13}}, {"id": 619, "type": "identifier", "text": "UNUSED", "parent": 618, "children": [], "start_point": {"row": 121, "column": 1}, "end_point": {"row": 121, "column": 7}}, {"id": 620, "type": "argument_list", "text": "(size)", "parent": 618, "children": [621], "start_point": {"row": 121, "column": 7}, "end_point": {"row": 121, "column": 13}}, {"id": 621, "type": "identifier", "text": "size", "parent": 620, "children": [], "start_point": {"row": 121, "column": 8}, "end_point": {"row": 121, "column": 12}}, {"id": 622, "type": "assignment_expression", "text": "externs = section_create_stringmap(data)", "parent": 605, "children": [623, 624, 625], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 122, "column": 41}}, {"id": 623, "type": "identifier", "text": "externs", "parent": 622, "children": [], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 122, "column": 8}}, {"id": 624, "type": "=", "text": "=", "parent": 622, "children": [], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 122, "column": 10}}, {"id": 625, "type": "call_expression", "text": "section_create_stringmap(data)", "parent": 622, "children": [626, 627], "start_point": {"row": 122, "column": 11}, "end_point": {"row": 122, "column": 41}}, {"id": 626, "type": "identifier", "text": "section_create_stringmap", "parent": 625, "children": [], "start_point": {"row": 122, "column": 11}, "end_point": {"row": 122, "column": 35}}, {"id": 627, "type": "argument_list", "text": "(data)", "parent": 625, "children": [628], "start_point": {"row": 122, "column": 35}, "end_point": {"row": 122, "column": 41}}, {"id": 628, "type": "identifier", "text": "data", "parent": 627, "children": [], "start_point": {"row": 122, "column": 36}, "end_point": {"row": 122, "column": 40}}, {"id": 629, "type": "return_statement", "text": "return VM_LOADER_ERROR_NONE;", "parent": 605, "children": [630], "start_point": {"row": 123, "column": 1}, "end_point": {"row": 123, "column": 29}}, {"id": 630, "type": "identifier", "text": "VM_LOADER_ERROR_NONE", "parent": 629, "children": [], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 28}}, {"id": 631, "type": "function_definition", "text": "static vm_loader_error_t section_loader_sym_string(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);\n\tvm_symbols.strings = section_create_stringmap(data);\n\treturn VM_LOADER_ERROR_NONE;\n}", "parent": null, "children": [632, 633], "start_point": {"row": 126, "column": 0}, "end_point": {"row": 130, "column": 1}}, {"id": 632, "type": "type_identifier", "text": "vm_loader_error_t", "parent": 631, "children": [], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 24}}, {"id": 633, "type": "function_declarator", "text": "section_loader_sym_string(const uint8_t* data, uint32_t size)", "parent": 631, "children": [634, 635], "start_point": {"row": 126, "column": 25}, "end_point": {"row": 126, "column": 86}}, {"id": 634, "type": "identifier", "text": "section_loader_sym_string", "parent": 633, "children": [], "start_point": {"row": 126, "column": 25}, "end_point": {"row": 126, "column": 50}}, {"id": 635, "type": "parameter_list", "text": "(const uint8_t* data, uint32_t size)", "parent": 633, "children": [636, 641], "start_point": {"row": 126, "column": 50}, "end_point": {"row": 126, "column": 86}}, {"id": 636, "type": "parameter_declaration", "text": "const uint8_t* data", "parent": 635, "children": [637, 638], "start_point": {"row": 126, "column": 51}, "end_point": {"row": 126, "column": 70}}, {"id": 637, "type": "primitive_type", "text": "uint8_t", "parent": 636, "children": [], "start_point": {"row": 126, "column": 57}, "end_point": {"row": 126, "column": 64}}, {"id": 638, "type": "pointer_declarator", "text": "* data", "parent": 636, "children": [639, 640], "start_point": {"row": 126, "column": 64}, "end_point": {"row": 126, "column": 70}}, {"id": 639, "type": "*", "text": "*", "parent": 638, "children": [], "start_point": {"row": 126, "column": 64}, "end_point": {"row": 126, "column": 65}}, {"id": 640, "type": "identifier", "text": "data", "parent": 638, "children": [], "start_point": {"row": 126, "column": 66}, "end_point": {"row": 126, "column": 70}}, {"id": 641, "type": "parameter_declaration", "text": "uint32_t size", "parent": 635, "children": [642, 643], "start_point": {"row": 126, "column": 72}, "end_point": {"row": 126, "column": 85}}, {"id": 642, "type": "primitive_type", "text": "uint32_t", "parent": 641, "children": [], "start_point": {"row": 126, "column": 72}, "end_point": {"row": 126, "column": 80}}, {"id": 643, "type": "identifier", "text": "size", "parent": 641, "children": [], "start_point": {"row": 126, "column": 81}, "end_point": {"row": 126, "column": 85}}, {"id": 644, "type": "call_expression", "text": "UNUSED(size)", "parent": 631, "children": [645, 646], "start_point": {"row": 127, "column": 1}, "end_point": {"row": 127, "column": 13}}, {"id": 645, "type": "identifier", "text": "UNUSED", "parent": 644, "children": [], "start_point": {"row": 127, "column": 1}, "end_point": {"row": 127, "column": 7}}, {"id": 646, "type": "argument_list", "text": "(size)", "parent": 644, "children": [647], "start_point": {"row": 127, "column": 7}, "end_point": {"row": 127, "column": 13}}, {"id": 647, "type": "identifier", "text": "size", "parent": 646, "children": [], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 12}}, {"id": 648, "type": "assignment_expression", "text": "vm_symbols.strings = section_create_stringmap(data)", "parent": 631, "children": [649, 652, 653], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 52}}, {"id": 649, "type": "field_expression", "text": "vm_symbols.strings", "parent": 648, "children": [650, 651], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 19}}, {"id": 650, "type": "identifier", "text": "vm_symbols", "parent": 649, "children": [], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 11}}, {"id": 651, "type": "field_identifier", "text": "strings", "parent": 649, "children": [], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 128, "column": 19}}, {"id": 652, "type": "=", "text": "=", "parent": 648, "children": [], "start_point": {"row": 128, "column": 20}, "end_point": {"row": 128, "column": 21}}, {"id": 653, "type": "call_expression", "text": "section_create_stringmap(data)", "parent": 648, "children": [654, 655], "start_point": {"row": 128, "column": 22}, "end_point": {"row": 128, "column": 52}}, {"id": 654, "type": "identifier", "text": "section_create_stringmap", "parent": 653, "children": [], "start_point": {"row": 128, "column": 22}, "end_point": {"row": 128, "column": 46}}, {"id": 655, "type": "argument_list", "text": "(data)", "parent": 653, "children": [656], "start_point": {"row": 128, "column": 46}, "end_point": {"row": 128, "column": 52}}, {"id": 656, "type": "identifier", "text": "data", "parent": 655, "children": [], "start_point": {"row": 128, "column": 47}, "end_point": {"row": 128, "column": 51}}, {"id": 657, "type": "return_statement", "text": "return VM_LOADER_ERROR_NONE;", "parent": 631, "children": [658], "start_point": {"row": 129, "column": 1}, "end_point": {"row": 129, "column": 29}}, {"id": 658, "type": "identifier", "text": "VM_LOADER_ERROR_NONE", "parent": 657, "children": [], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 28}}, {"id": 659, "type": "function_definition", "text": "static vm_loader_error_t section_loader_sym_file(const uint8_t* data, uint32_t size) {\n\tvm_symbols.files = (vm_symbols_entry_t*)data;\n\tvm_symbols.files_count = size / sizeof(vm_symbols_entry_t);\n\treturn VM_LOADER_ERROR_NONE;\n}", "parent": null, "children": [660, 661], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 136, "column": 1}}, {"id": 660, "type": "type_identifier", "text": "vm_loader_error_t", "parent": 659, "children": [], "start_point": {"row": 132, "column": 7}, "end_point": {"row": 132, "column": 24}}, {"id": 661, "type": "function_declarator", "text": "section_loader_sym_file(const uint8_t* data, uint32_t size)", "parent": 659, "children": [662, 663], "start_point": {"row": 132, "column": 25}, "end_point": {"row": 132, "column": 84}}, {"id": 662, "type": "identifier", "text": "section_loader_sym_file", "parent": 661, "children": [], "start_point": {"row": 132, "column": 25}, "end_point": {"row": 132, "column": 48}}, {"id": 663, "type": "parameter_list", "text": "(const uint8_t* data, uint32_t size)", "parent": 661, "children": [664, 669], "start_point": {"row": 132, "column": 48}, "end_point": {"row": 132, "column": 84}}, {"id": 664, "type": "parameter_declaration", "text": "const uint8_t* data", "parent": 663, "children": [665, 666], "start_point": {"row": 132, "column": 49}, "end_point": {"row": 132, "column": 68}}, {"id": 665, "type": "primitive_type", "text": "uint8_t", "parent": 664, "children": [], "start_point": {"row": 132, "column": 55}, "end_point": {"row": 132, "column": 62}}, {"id": 666, "type": "pointer_declarator", "text": "* data", "parent": 664, "children": [667, 668], "start_point": {"row": 132, "column": 62}, "end_point": {"row": 132, "column": 68}}, {"id": 667, "type": "*", "text": "*", "parent": 666, "children": [], "start_point": {"row": 132, "column": 62}, "end_point": {"row": 132, "column": 63}}, {"id": 668, "type": "identifier", "text": "data", "parent": 666, "children": [], "start_point": {"row": 132, "column": 64}, "end_point": {"row": 132, "column": 68}}, {"id": 669, "type": "parameter_declaration", "text": "uint32_t size", "parent": 663, "children": [670, 671], "start_point": {"row": 132, "column": 70}, "end_point": {"row": 132, "column": 83}}, {"id": 670, "type": "primitive_type", "text": "uint32_t", "parent": 669, "children": [], "start_point": {"row": 132, "column": 70}, "end_point": {"row": 132, "column": 78}}, {"id": 671, "type": "identifier", "text": "size", "parent": 669, "children": [], "start_point": {"row": 132, "column": 79}, "end_point": {"row": 132, "column": 83}}, {"id": 672, "type": "assignment_expression", "text": "vm_symbols.files = (vm_symbols_entry_t*)data", "parent": 659, "children": [673, 676, 677], "start_point": {"row": 133, "column": 1}, "end_point": {"row": 133, "column": 45}}, {"id": 673, "type": "field_expression", "text": "vm_symbols.files", "parent": 672, "children": [674, 675], "start_point": {"row": 133, "column": 1}, "end_point": {"row": 133, "column": 17}}, {"id": 674, "type": "identifier", "text": "vm_symbols", "parent": 673, "children": [], "start_point": {"row": 133, "column": 1}, "end_point": {"row": 133, "column": 11}}, {"id": 675, "type": "field_identifier", "text": "files", "parent": 673, "children": [], "start_point": {"row": 133, "column": 12}, "end_point": {"row": 133, "column": 17}}, {"id": 676, "type": "=", "text": "=", "parent": 672, "children": [], "start_point": {"row": 133, "column": 18}, "end_point": {"row": 133, "column": 19}}, {"id": 677, "type": "cast_expression", "text": "(vm_symbols_entry_t*)data", "parent": 672, "children": [678, 682], "start_point": {"row": 133, "column": 20}, "end_point": {"row": 133, "column": 45}}, {"id": 678, "type": "type_descriptor", "text": "vm_symbols_entry_t*", "parent": 677, "children": [679, 680], "start_point": {"row": 133, "column": 21}, "end_point": {"row": 133, "column": 40}}, {"id": 679, "type": "type_identifier", "text": "vm_symbols_entry_t", "parent": 678, "children": [], "start_point": {"row": 133, "column": 21}, "end_point": {"row": 133, "column": 39}}, {"id": 680, "type": "abstract_pointer_declarator", "text": "*", "parent": 678, "children": [681], "start_point": {"row": 133, "column": 39}, "end_point": {"row": 133, "column": 40}}, {"id": 681, "type": "*", "text": "*", "parent": 680, "children": [], "start_point": {"row": 133, "column": 39}, "end_point": {"row": 133, "column": 40}}, {"id": 682, "type": "identifier", "text": "data", "parent": 677, "children": [], "start_point": {"row": 133, "column": 41}, "end_point": {"row": 133, "column": 45}}, {"id": 683, "type": "assignment_expression", "text": "vm_symbols.files_count = size / sizeof(vm_symbols_entry_t)", "parent": 659, "children": [684, 687, 688], "start_point": {"row": 134, "column": 1}, "end_point": {"row": 134, "column": 59}}, {"id": 684, "type": "field_expression", "text": "vm_symbols.files_count", "parent": 683, "children": [685, 686], "start_point": {"row": 134, "column": 1}, "end_point": {"row": 134, "column": 23}}, {"id": 685, "type": "identifier", "text": "vm_symbols", "parent": 684, "children": [], "start_point": {"row": 134, "column": 1}, "end_point": {"row": 134, "column": 11}}, {"id": 686, "type": "field_identifier", "text": "files_count", "parent": 684, "children": [], "start_point": {"row": 134, "column": 12}, "end_point": {"row": 134, "column": 23}}, {"id": 687, "type": "=", "text": "=", "parent": 683, "children": [], "start_point": {"row": 134, "column": 24}, "end_point": {"row": 134, "column": 25}}, {"id": 688, "type": "binary_expression", "text": "size / sizeof(vm_symbols_entry_t)", "parent": 683, "children": [689, 690, 691], "start_point": {"row": 134, "column": 26}, "end_point": {"row": 134, "column": 59}}, {"id": 689, "type": "identifier", "text": "size", "parent": 688, "children": [], "start_point": {"row": 134, "column": 26}, "end_point": {"row": 134, "column": 30}}, {"id": 690, "type": "/", "text": "/", "parent": 688, "children": [], "start_point": {"row": 134, "column": 31}, "end_point": {"row": 134, "column": 32}}, {"id": 691, "type": "sizeof_expression", "text": "sizeof(vm_symbols_entry_t)", "parent": 688, "children": [692], "start_point": {"row": 134, "column": 33}, "end_point": {"row": 134, "column": 59}}, {"id": 692, "type": "parenthesized_expression", "text": "(vm_symbols_entry_t)", "parent": 691, "children": [693], "start_point": {"row": 134, "column": 39}, "end_point": {"row": 134, "column": 59}}, {"id": 693, "type": "identifier", "text": "vm_symbols_entry_t", "parent": 692, "children": [], "start_point": {"row": 134, "column": 40}, "end_point": {"row": 134, "column": 58}}, {"id": 694, "type": "return_statement", "text": "return VM_LOADER_ERROR_NONE;", "parent": 659, "children": [695], "start_point": {"row": 135, "column": 1}, "end_point": {"row": 135, "column": 29}}, {"id": 695, "type": "identifier", "text": "VM_LOADER_ERROR_NONE", "parent": 694, "children": [], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 28}}, {"id": 696, "type": "function_definition", "text": "static vm_loader_error_t section_loader_sym_func(const uint8_t* data, uint32_t size) {\n\tvm_symbols.functions = (vm_symbols_entry_t*)data;\n\tvm_symbols.functions_count = size / sizeof(vm_symbols_entry_t);\n\treturn VM_LOADER_ERROR_NONE;\n}", "parent": null, "children": [697, 698], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 142, "column": 1}}, {"id": 697, "type": "type_identifier", "text": "vm_loader_error_t", "parent": 696, "children": [], "start_point": {"row": 138, "column": 7}, "end_point": {"row": 138, "column": 24}}, {"id": 698, "type": "function_declarator", "text": "section_loader_sym_func(const uint8_t* data, uint32_t size)", "parent": 696, "children": [699, 700], "start_point": {"row": 138, "column": 25}, "end_point": {"row": 138, "column": 84}}, {"id": 699, "type": "identifier", "text": "section_loader_sym_func", "parent": 698, "children": [], "start_point": {"row": 138, "column": 25}, "end_point": {"row": 138, "column": 48}}, {"id": 700, "type": "parameter_list", "text": "(const uint8_t* data, uint32_t size)", "parent": 698, "children": [701, 706], "start_point": {"row": 138, "column": 48}, "end_point": {"row": 138, "column": 84}}, {"id": 701, "type": "parameter_declaration", "text": "const uint8_t* data", "parent": 700, "children": [702, 703], "start_point": {"row": 138, "column": 49}, "end_point": {"row": 138, "column": 68}}, {"id": 702, "type": "primitive_type", "text": "uint8_t", "parent": 701, "children": [], "start_point": {"row": 138, "column": 55}, "end_point": {"row": 138, "column": 62}}, {"id": 703, "type": "pointer_declarator", "text": "* data", "parent": 701, "children": [704, 705], "start_point": {"row": 138, "column": 62}, "end_point": {"row": 138, "column": 68}}, {"id": 704, "type": "*", "text": "*", "parent": 703, "children": [], "start_point": {"row": 138, "column": 62}, "end_point": {"row": 138, "column": 63}}, {"id": 705, "type": "identifier", "text": "data", "parent": 703, "children": [], "start_point": {"row": 138, "column": 64}, "end_point": {"row": 138, "column": 68}}, {"id": 706, "type": "parameter_declaration", "text": "uint32_t size", "parent": 700, "children": [707, 708], "start_point": {"row": 138, "column": 70}, "end_point": {"row": 138, "column": 83}}, {"id": 707, "type": "primitive_type", "text": "uint32_t", "parent": 706, "children": [], "start_point": {"row": 138, "column": 70}, "end_point": {"row": 138, "column": 78}}, {"id": 708, "type": "identifier", "text": "size", "parent": 706, "children": [], "start_point": {"row": 138, "column": 79}, "end_point": {"row": 138, "column": 83}}, {"id": 709, "type": "assignment_expression", "text": "vm_symbols.functions = (vm_symbols_entry_t*)data", "parent": 696, "children": [710, 713, 714], "start_point": {"row": 139, "column": 1}, "end_point": {"row": 139, "column": 49}}, {"id": 710, "type": "field_expression", "text": "vm_symbols.functions", "parent": 709, "children": [711, 712], "start_point": {"row": 139, "column": 1}, "end_point": {"row": 139, "column": 21}}, {"id": 711, "type": "identifier", "text": "vm_symbols", "parent": 710, "children": [], "start_point": {"row": 139, "column": 1}, "end_point": {"row": 139, "column": 11}}, {"id": 712, "type": "field_identifier", "text": "functions", "parent": 710, "children": [], "start_point": {"row": 139, "column": 12}, "end_point": {"row": 139, "column": 21}}, {"id": 713, "type": "=", "text": "=", "parent": 709, "children": [], "start_point": {"row": 139, "column": 22}, "end_point": {"row": 139, "column": 23}}, {"id": 714, "type": "cast_expression", "text": "(vm_symbols_entry_t*)data", "parent": 709, "children": [715, 719], "start_point": {"row": 139, "column": 24}, "end_point": {"row": 139, "column": 49}}, {"id": 715, "type": "type_descriptor", "text": "vm_symbols_entry_t*", "parent": 714, "children": [716, 717], "start_point": {"row": 139, "column": 25}, "end_point": {"row": 139, "column": 44}}, {"id": 716, "type": "type_identifier", "text": "vm_symbols_entry_t", "parent": 715, "children": [], "start_point": {"row": 139, "column": 25}, "end_point": {"row": 139, "column": 43}}, {"id": 717, "type": "abstract_pointer_declarator", "text": "*", "parent": 715, "children": [718], "start_point": {"row": 139, "column": 43}, "end_point": {"row": 139, "column": 44}}, {"id": 718, "type": "*", "text": "*", "parent": 717, "children": [], "start_point": {"row": 139, "column": 43}, "end_point": {"row": 139, "column": 44}}, {"id": 719, "type": "identifier", "text": "data", "parent": 714, "children": [], "start_point": {"row": 139, "column": 45}, "end_point": {"row": 139, "column": 49}}, {"id": 720, "type": "assignment_expression", "text": "vm_symbols.functions_count = size / sizeof(vm_symbols_entry_t)", "parent": 696, "children": [721, 724, 725], "start_point": {"row": 140, "column": 1}, "end_point": {"row": 140, "column": 63}}, {"id": 721, "type": "field_expression", "text": "vm_symbols.functions_count", "parent": 720, "children": [722, 723], "start_point": {"row": 140, "column": 1}, "end_point": {"row": 140, "column": 27}}, {"id": 722, "type": "identifier", "text": "vm_symbols", "parent": 721, "children": [], "start_point": {"row": 140, "column": 1}, "end_point": {"row": 140, "column": 11}}, {"id": 723, "type": "field_identifier", "text": "functions_count", "parent": 721, "children": [], "start_point": {"row": 140, "column": 12}, "end_point": {"row": 140, "column": 27}}, {"id": 724, "type": "=", "text": "=", "parent": 720, "children": [], "start_point": {"row": 140, "column": 28}, "end_point": {"row": 140, "column": 29}}, {"id": 725, "type": "binary_expression", "text": "size / sizeof(vm_symbols_entry_t)", "parent": 720, "children": [726, 727, 728], "start_point": {"row": 140, "column": 30}, "end_point": {"row": 140, "column": 63}}, {"id": 726, "type": "identifier", "text": "size", "parent": 725, "children": [], "start_point": {"row": 140, "column": 30}, "end_point": {"row": 140, "column": 34}}, {"id": 727, "type": "/", "text": "/", "parent": 725, "children": [], "start_point": {"row": 140, "column": 35}, "end_point": {"row": 140, "column": 36}}, {"id": 728, "type": "sizeof_expression", "text": "sizeof(vm_symbols_entry_t)", "parent": 725, "children": [729], "start_point": {"row": 140, "column": 37}, "end_point": {"row": 140, "column": 63}}, {"id": 729, "type": "parenthesized_expression", "text": "(vm_symbols_entry_t)", "parent": 728, "children": [730], "start_point": {"row": 140, "column": 43}, "end_point": {"row": 140, "column": 63}}, {"id": 730, "type": "identifier", "text": "vm_symbols_entry_t", "parent": 729, "children": [], "start_point": {"row": 140, "column": 44}, "end_point": {"row": 140, "column": 62}}, {"id": 731, "type": "return_statement", "text": "return VM_LOADER_ERROR_NONE;", "parent": 696, "children": [732], "start_point": {"row": 141, "column": 1}, "end_point": {"row": 141, "column": 29}}, {"id": 732, "type": "identifier", "text": "VM_LOADER_ERROR_NONE", "parent": 731, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 28}}, {"id": 733, "type": "function_definition", "text": "static vm_loader_error_t section_loader_sym_line(const uint8_t* data, uint32_t size) {\n\tvm_symbols.lines = (vm_symbols_entry_t*)data;\n\tvm_symbols.lines_count = size / sizeof(vm_symbols_entry_t);\n\treturn VM_LOADER_ERROR_NONE;\n}", "parent": null, "children": [734, 735], "start_point": {"row": 144, "column": 0}, "end_point": {"row": 148, "column": 1}}, {"id": 734, "type": "type_identifier", "text": "vm_loader_error_t", "parent": 733, "children": [], "start_point": {"row": 144, "column": 7}, "end_point": {"row": 144, "column": 24}}, {"id": 735, "type": "function_declarator", "text": "section_loader_sym_line(const uint8_t* data, uint32_t size)", "parent": 733, "children": [736, 737], "start_point": {"row": 144, "column": 25}, "end_point": {"row": 144, "column": 84}}, {"id": 736, "type": "identifier", "text": "section_loader_sym_line", "parent": 735, "children": [], "start_point": {"row": 144, "column": 25}, "end_point": {"row": 144, "column": 48}}, {"id": 737, "type": "parameter_list", "text": "(const uint8_t* data, uint32_t size)", "parent": 735, "children": [738, 743], "start_point": {"row": 144, "column": 48}, "end_point": {"row": 144, "column": 84}}, {"id": 738, "type": "parameter_declaration", "text": "const uint8_t* data", "parent": 737, "children": [739, 740], "start_point": {"row": 144, "column": 49}, "end_point": {"row": 144, "column": 68}}, {"id": 739, "type": "primitive_type", "text": "uint8_t", "parent": 738, "children": [], "start_point": {"row": 144, "column": 55}, "end_point": {"row": 144, "column": 62}}, {"id": 740, "type": "pointer_declarator", "text": "* data", "parent": 738, "children": [741, 742], "start_point": {"row": 144, "column": 62}, "end_point": {"row": 144, "column": 68}}, {"id": 741, "type": "*", "text": "*", "parent": 740, "children": [], "start_point": {"row": 144, "column": 62}, "end_point": {"row": 144, "column": 63}}, {"id": 742, "type": "identifier", "text": "data", "parent": 740, "children": [], "start_point": {"row": 144, "column": 64}, "end_point": {"row": 144, "column": 68}}, {"id": 743, "type": "parameter_declaration", "text": "uint32_t size", "parent": 737, "children": [744, 745], "start_point": {"row": 144, "column": 70}, "end_point": {"row": 144, "column": 83}}, {"id": 744, "type": "primitive_type", "text": "uint32_t", "parent": 743, "children": [], "start_point": {"row": 144, "column": 70}, "end_point": {"row": 144, "column": 78}}, {"id": 745, "type": "identifier", "text": "size", "parent": 743, "children": [], "start_point": {"row": 144, "column": 79}, "end_point": {"row": 144, "column": 83}}, {"id": 746, "type": "assignment_expression", "text": "vm_symbols.lines = (vm_symbols_entry_t*)data", "parent": 733, "children": [747, 750, 751], "start_point": {"row": 145, "column": 1}, "end_point": {"row": 145, "column": 45}}, {"id": 747, "type": "field_expression", "text": "vm_symbols.lines", "parent": 746, "children": [748, 749], "start_point": {"row": 145, "column": 1}, "end_point": {"row": 145, "column": 17}}, {"id": 748, "type": "identifier", "text": "vm_symbols", "parent": 747, "children": [], "start_point": {"row": 145, "column": 1}, "end_point": {"row": 145, "column": 11}}, {"id": 749, "type": "field_identifier", "text": "lines", "parent": 747, "children": [], "start_point": {"row": 145, "column": 12}, "end_point": {"row": 145, "column": 17}}, {"id": 750, "type": "=", "text": "=", "parent": 746, "children": [], "start_point": {"row": 145, "column": 18}, "end_point": {"row": 145, "column": 19}}, {"id": 751, "type": "cast_expression", "text": "(vm_symbols_entry_t*)data", "parent": 746, "children": [752, 756], "start_point": {"row": 145, "column": 20}, "end_point": {"row": 145, "column": 45}}, {"id": 752, "type": "type_descriptor", "text": "vm_symbols_entry_t*", "parent": 751, "children": [753, 754], "start_point": {"row": 145, "column": 21}, "end_point": {"row": 145, "column": 40}}, {"id": 753, "type": "type_identifier", "text": "vm_symbols_entry_t", "parent": 752, "children": [], "start_point": {"row": 145, "column": 21}, "end_point": {"row": 145, "column": 39}}, {"id": 754, "type": "abstract_pointer_declarator", "text": "*", "parent": 752, "children": [755], "start_point": {"row": 145, "column": 39}, "end_point": {"row": 145, "column": 40}}, {"id": 755, "type": "*", "text": "*", "parent": 754, "children": [], "start_point": {"row": 145, "column": 39}, "end_point": {"row": 145, "column": 40}}, {"id": 756, "type": "identifier", "text": "data", "parent": 751, "children": [], "start_point": {"row": 145, "column": 41}, "end_point": {"row": 145, "column": 45}}, {"id": 757, "type": "assignment_expression", "text": "vm_symbols.lines_count = size / sizeof(vm_symbols_entry_t)", "parent": 733, "children": [758, 761, 762], "start_point": {"row": 146, "column": 1}, "end_point": {"row": 146, "column": 59}}, {"id": 758, "type": "field_expression", "text": "vm_symbols.lines_count", "parent": 757, "children": [759, 760], "start_point": {"row": 146, "column": 1}, "end_point": {"row": 146, "column": 23}}, {"id": 759, "type": "identifier", "text": "vm_symbols", "parent": 758, "children": [], "start_point": {"row": 146, "column": 1}, "end_point": {"row": 146, "column": 11}}, {"id": 760, "type": "field_identifier", "text": "lines_count", "parent": 758, "children": [], "start_point": {"row": 146, "column": 12}, "end_point": {"row": 146, "column": 23}}, {"id": 761, "type": "=", "text": "=", "parent": 757, "children": [], "start_point": {"row": 146, "column": 24}, "end_point": {"row": 146, "column": 25}}, {"id": 762, "type": "binary_expression", "text": "size / sizeof(vm_symbols_entry_t)", "parent": 757, "children": [763, 764, 765], "start_point": {"row": 146, "column": 26}, "end_point": {"row": 146, "column": 59}}, {"id": 763, "type": "identifier", "text": "size", "parent": 762, "children": [], "start_point": {"row": 146, "column": 26}, "end_point": {"row": 146, "column": 30}}, {"id": 764, "type": "/", "text": "/", "parent": 762, "children": [], "start_point": {"row": 146, "column": 31}, "end_point": {"row": 146, "column": 32}}, {"id": 765, "type": "sizeof_expression", "text": "sizeof(vm_symbols_entry_t)", "parent": 762, "children": [766], "start_point": {"row": 146, "column": 33}, "end_point": {"row": 146, "column": 59}}, {"id": 766, "type": "parenthesized_expression", "text": "(vm_symbols_entry_t)", "parent": 765, "children": [767], "start_point": {"row": 146, "column": 39}, "end_point": {"row": 146, "column": 59}}, {"id": 767, "type": "identifier", "text": "vm_symbols_entry_t", "parent": 766, "children": [], "start_point": {"row": 146, "column": 40}, "end_point": {"row": 146, "column": 58}}, {"id": 768, "type": "return_statement", "text": "return VM_LOADER_ERROR_NONE;", "parent": 733, "children": [769], "start_point": {"row": 147, "column": 1}, "end_point": {"row": 147, "column": 29}}, {"id": 769, "type": "identifier", "text": "VM_LOADER_ERROR_NONE", "parent": 768, "children": [], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 28}}, {"id": 770, "type": "function_definition", "text": "static vm_loader_error_t section_loader_dispatch(const char* name, const uint8_t* data, uint32_t size) {\n\tfor (uint32_t i = 0; i < sizeof(section_name_map) / sizeof(section_name_map[0]); i++) {\n\t\tif (strncmp(name, section_name_map[i].name, 16) == 0) {\n\t\t\tswitch (section_name_map[i].type) {\n\t\t\t\tcase SECTION_PROGMEM:\n\t\t\t\t\treturn section_loader_progmem(data, size);\n\t\t\t\tcase SECTION_SHIFT:\n\t\t\t\t\treturn section_loader_shift(data, size);\n\t\t\t\tcase SECTION_OBJECT:\n\t\t\t\t\treturn section_loader_object(data, size);\n\t\t\t\tcase SECTION_STRING:\n\t\t\t\t\treturn section_loader_string(data, size);\n\t\t\t\tcase SECTION_EXTERN:\n\t\t\t\t\treturn section_loader_extern(data, size);\n\t\t\t\tcase SECTION_SYM_STRING:\n\t\t\t\t\treturn section_loader_sym_string(data, size);\n\t\t\t\tcase SECTION_SYM_FILE:\n\t\t\t\t\treturn section_loader_sym_file(data, size);\n\t\t\t\tcase SECTION_SYM_FUNC:\n\t\t\t\t\treturn section_loader_sym_func(data, size);\n\t\t\t\tcase SECTION_SYM_LINE:\n\t\t\t\t\treturn section_loader_sym_line(data, size);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\tvm_loader_error_data = name;\n\treturn VM_LOADER_ERROR_SECTION;\n}", "parent": null, "children": [771, 772], "start_point": {"row": 150, "column": 0}, "end_point": {"row": 178, "column": 1}}, {"id": 771, "type": "type_identifier", "text": "vm_loader_error_t", "parent": 770, "children": [], "start_point": {"row": 150, "column": 7}, "end_point": {"row": 150, "column": 24}}, {"id": 772, "type": "function_declarator", "text": "section_loader_dispatch(const char* name, const uint8_t* data, uint32_t size)", "parent": 770, "children": [773, 774], "start_point": {"row": 150, "column": 25}, "end_point": {"row": 150, "column": 102}}, {"id": 773, "type": "identifier", "text": "section_loader_dispatch", "parent": 772, "children": [], "start_point": {"row": 150, "column": 25}, "end_point": {"row": 150, "column": 48}}, {"id": 774, "type": "parameter_list", "text": "(const char* name, const uint8_t* data, uint32_t size)", "parent": 772, "children": [775, 780, 785], "start_point": {"row": 150, "column": 48}, "end_point": {"row": 150, "column": 102}}, {"id": 775, "type": "parameter_declaration", "text": "const char* name", "parent": 774, "children": [776, 777], "start_point": {"row": 150, "column": 49}, "end_point": {"row": 150, "column": 65}}, {"id": 776, "type": "primitive_type", "text": "char", "parent": 775, "children": [], "start_point": {"row": 150, "column": 55}, "end_point": {"row": 150, "column": 59}}, {"id": 777, "type": "pointer_declarator", "text": "* name", "parent": 775, "children": [778, 779], "start_point": {"row": 150, "column": 59}, "end_point": {"row": 150, "column": 65}}, {"id": 778, "type": "*", "text": "*", "parent": 777, "children": [], "start_point": {"row": 150, "column": 59}, "end_point": {"row": 150, "column": 60}}, {"id": 779, "type": "identifier", "text": "name", "parent": 777, "children": [], "start_point": {"row": 150, "column": 61}, "end_point": {"row": 150, "column": 65}}, {"id": 780, "type": "parameter_declaration", "text": "const uint8_t* data", "parent": 774, "children": [781, 782], "start_point": {"row": 150, "column": 67}, "end_point": {"row": 150, "column": 86}}, {"id": 781, "type": "primitive_type", "text": "uint8_t", "parent": 780, "children": [], "start_point": {"row": 150, "column": 73}, "end_point": {"row": 150, "column": 80}}, {"id": 782, "type": "pointer_declarator", "text": "* data", "parent": 780, "children": [783, 784], "start_point": {"row": 150, "column": 80}, "end_point": {"row": 150, "column": 86}}, {"id": 783, "type": "*", "text": "*", "parent": 782, "children": [], "start_point": {"row": 150, "column": 80}, "end_point": {"row": 150, "column": 81}}, {"id": 784, "type": "identifier", "text": "data", "parent": 782, "children": [], "start_point": {"row": 150, "column": 82}, "end_point": {"row": 150, "column": 86}}, {"id": 785, "type": "parameter_declaration", "text": "uint32_t size", "parent": 774, "children": [786, 787], "start_point": {"row": 150, "column": 88}, "end_point": {"row": 150, "column": 101}}, {"id": 786, "type": "primitive_type", "text": "uint32_t", "parent": 785, "children": [], "start_point": {"row": 150, "column": 88}, "end_point": {"row": 150, "column": 96}}, {"id": 787, "type": "identifier", "text": "size", "parent": 785, "children": [], "start_point": {"row": 150, "column": 97}, "end_point": {"row": 150, "column": 101}}, {"id": 788, "type": "for_statement", "text": "for (uint32_t i = 0; i < sizeof(section_name_map) / sizeof(section_name_map[0]); i++) {\n\t\tif (strncmp(name, section_name_map[i].name, 16) == 0) {\n\t\t\tswitch (section_name_map[i].type) {\n\t\t\t\tcase SECTION_PROGMEM:\n\t\t\t\t\treturn section_loader_progmem(data, size);\n\t\t\t\tcase SECTION_SHIFT:\n\t\t\t\t\treturn section_loader_shift(data, size);\n\t\t\t\tcase SECTION_OBJECT:\n\t\t\t\t\treturn section_loader_object(data, size);\n\t\t\t\tcase SECTION_STRING:\n\t\t\t\t\treturn section_loader_string(data, size);\n\t\t\t\tcase SECTION_EXTERN:\n\t\t\t\t\treturn section_loader_extern(data, size);\n\t\t\t\tcase SECTION_SYM_STRING:\n\t\t\t\t\treturn section_loader_sym_string(data, size);\n\t\t\t\tcase SECTION_SYM_FILE:\n\t\t\t\t\treturn section_loader_sym_file(data, size);\n\t\t\t\tcase SECTION_SYM_FUNC:\n\t\t\t\t\treturn section_loader_sym_func(data, size);\n\t\t\t\tcase SECTION_SYM_LINE:\n\t\t\t\t\treturn section_loader_sym_line(data, size);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "parent": 770, "children": [789, 795, 808], "start_point": {"row": 151, "column": 1}, "end_point": {"row": 175, "column": 2}}, {"id": 789, "type": "declaration", "text": "uint32_t i = 0;", "parent": 788, "children": [790, 791], "start_point": {"row": 151, "column": 6}, "end_point": {"row": 151, "column": 21}}, {"id": 790, "type": "primitive_type", "text": "uint32_t", "parent": 789, "children": [], "start_point": {"row": 151, "column": 6}, "end_point": {"row": 151, "column": 14}}, {"id": 791, "type": "init_declarator", "text": "i = 0", "parent": 789, "children": [792, 793, 794], "start_point": {"row": 151, "column": 15}, "end_point": {"row": 151, "column": 20}}, {"id": 792, "type": "identifier", "text": "i", "parent": 791, "children": [], "start_point": {"row": 151, "column": 15}, "end_point": {"row": 151, "column": 16}}, {"id": 793, "type": "=", "text": "=", "parent": 791, "children": [], "start_point": {"row": 151, "column": 17}, "end_point": {"row": 151, "column": 18}}, {"id": 794, "type": "number_literal", "text": "0", "parent": 791, "children": [], "start_point": {"row": 151, "column": 19}, "end_point": {"row": 151, "column": 20}}, {"id": 795, "type": "binary_expression", "text": "i < sizeof(section_name_map) / sizeof(section_name_map[0])", "parent": 788, "children": [796, 797, 798], "start_point": {"row": 151, "column": 22}, "end_point": {"row": 151, "column": 80}}, {"id": 796, "type": "identifier", "text": "i", "parent": 795, "children": [], "start_point": {"row": 151, "column": 22}, "end_point": {"row": 151, "column": 23}}, {"id": 797, "type": "<", "text": "<", "parent": 795, "children": [], "start_point": {"row": 151, "column": 24}, "end_point": {"row": 151, "column": 25}}, {"id": 798, "type": "binary_expression", "text": "sizeof(section_name_map) / sizeof(section_name_map[0])", "parent": 795, "children": [799, 802, 803], "start_point": {"row": 151, "column": 26}, "end_point": {"row": 151, "column": 80}}, {"id": 799, "type": "sizeof_expression", "text": "sizeof(section_name_map)", "parent": 798, "children": [800], "start_point": {"row": 151, "column": 26}, "end_point": {"row": 151, "column": 50}}, {"id": 800, "type": "parenthesized_expression", "text": "(section_name_map)", "parent": 799, "children": [801], "start_point": {"row": 151, "column": 32}, "end_point": {"row": 151, "column": 50}}, {"id": 801, "type": "identifier", "text": "section_name_map", "parent": 800, "children": [], "start_point": {"row": 151, "column": 33}, "end_point": {"row": 151, "column": 49}}, {"id": 802, "type": "/", "text": "/", "parent": 798, "children": [], "start_point": {"row": 151, "column": 51}, "end_point": {"row": 151, "column": 52}}, {"id": 803, "type": "sizeof_expression", "text": "sizeof(section_name_map[0])", "parent": 798, "children": [804], "start_point": {"row": 151, "column": 53}, "end_point": {"row": 151, "column": 80}}, {"id": 804, "type": "parenthesized_expression", "text": "(section_name_map[0])", "parent": 803, "children": [805], "start_point": {"row": 151, "column": 59}, "end_point": {"row": 151, "column": 80}}, {"id": 805, "type": "subscript_expression", "text": "section_name_map[0]", "parent": 804, "children": [806, 807], "start_point": {"row": 151, "column": 60}, "end_point": {"row": 151, "column": 79}}, {"id": 806, "type": "identifier", "text": "section_name_map", "parent": 805, "children": [], "start_point": {"row": 151, "column": 60}, "end_point": {"row": 151, "column": 76}}, {"id": 807, "type": "number_literal", "text": "0", "parent": 805, "children": [], "start_point": {"row": 151, "column": 77}, "end_point": {"row": 151, "column": 78}}, {"id": 808, "type": "update_expression", "text": "i++", "parent": 788, "children": [809, 810], "start_point": {"row": 151, "column": 82}, "end_point": {"row": 151, "column": 85}}, {"id": 809, "type": "identifier", "text": "i", "parent": 808, "children": [], "start_point": {"row": 151, "column": 82}, "end_point": {"row": 151, "column": 83}}, {"id": 810, "type": "++", "text": "++", "parent": 808, "children": [], "start_point": {"row": 151, "column": 83}, "end_point": {"row": 151, "column": 85}}, {"id": 811, "type": "if_statement", "text": "if (strncmp(name, section_name_map[i].name, 16) == 0) {\n\t\t\tswitch (section_name_map[i].type) {\n\t\t\t\tcase SECTION_PROGMEM:\n\t\t\t\t\treturn section_loader_progmem(data, size);\n\t\t\t\tcase SECTION_SHIFT:\n\t\t\t\t\treturn section_loader_shift(data, size);\n\t\t\t\tcase SECTION_OBJECT:\n\t\t\t\t\treturn section_loader_object(data, size);\n\t\t\t\tcase SECTION_STRING:\n\t\t\t\t\treturn section_loader_string(data, size);\n\t\t\t\tcase SECTION_EXTERN:\n\t\t\t\t\treturn section_loader_extern(data, size);\n\t\t\t\tcase SECTION_SYM_STRING:\n\t\t\t\t\treturn section_loader_sym_string(data, size);\n\t\t\t\tcase SECTION_SYM_FILE:\n\t\t\t\t\treturn section_loader_sym_file(data, size);\n\t\t\t\tcase SECTION_SYM_FUNC:\n\t\t\t\t\treturn section_loader_sym_func(data, size);\n\t\t\t\tcase SECTION_SYM_LINE:\n\t\t\t\t\treturn section_loader_sym_line(data, size);\n\t\t\t}\n\t\t\tbreak;\n\t\t}", "parent": 788, "children": [812], "start_point": {"row": 152, "column": 2}, "end_point": {"row": 174, "column": 3}}, {"id": 812, "type": "parenthesized_expression", "text": "(strncmp(name, section_name_map[i].name, 16) == 0)", "parent": 811, "children": [813], "start_point": {"row": 152, "column": 5}, "end_point": {"row": 152, "column": 55}}, {"id": 813, "type": "binary_expression", "text": "strncmp(name, section_name_map[i].name, 16) == 0", "parent": 812, "children": [814, 824, 825], "start_point": {"row": 152, "column": 6}, "end_point": {"row": 152, "column": 54}}, {"id": 814, "type": "call_expression", "text": "strncmp(name, section_name_map[i].name, 16)", "parent": 813, "children": [815, 816], "start_point": {"row": 152, "column": 6}, "end_point": {"row": 152, "column": 49}}, {"id": 815, "type": "identifier", "text": "strncmp", "parent": 814, "children": [], "start_point": {"row": 152, "column": 6}, "end_point": {"row": 152, "column": 13}}, {"id": 816, "type": "argument_list", "text": "(name, section_name_map[i].name, 16)", "parent": 814, "children": [817, 818, 823], "start_point": {"row": 152, "column": 13}, "end_point": {"row": 152, "column": 49}}, {"id": 817, "type": "identifier", "text": "name", "parent": 816, "children": [], "start_point": {"row": 152, "column": 14}, "end_point": {"row": 152, "column": 18}}, {"id": 818, "type": "field_expression", "text": "section_name_map[i].name", "parent": 816, "children": [819, 822], "start_point": {"row": 152, "column": 20}, "end_point": {"row": 152, "column": 44}}, {"id": 819, "type": "subscript_expression", "text": "section_name_map[i]", "parent": 818, "children": [820, 821], "start_point": {"row": 152, "column": 20}, "end_point": {"row": 152, "column": 39}}, {"id": 820, "type": "identifier", "text": "section_name_map", "parent": 819, "children": [], "start_point": {"row": 152, "column": 20}, "end_point": {"row": 152, "column": 36}}, {"id": 821, "type": "identifier", "text": "i", "parent": 819, "children": [], "start_point": {"row": 152, "column": 37}, "end_point": {"row": 152, "column": 38}}, {"id": 822, "type": "field_identifier", "text": "name", "parent": 818, "children": [], "start_point": {"row": 152, "column": 40}, "end_point": {"row": 152, "column": 44}}, {"id": 823, "type": "number_literal", "text": "16", "parent": 816, "children": [], "start_point": {"row": 152, "column": 46}, "end_point": {"row": 152, "column": 48}}, {"id": 824, "type": "==", "text": "==", "parent": 813, "children": [], "start_point": {"row": 152, "column": 50}, "end_point": {"row": 152, "column": 52}}, {"id": 825, "type": "number_literal", "text": "0", "parent": 813, "children": [], "start_point": {"row": 152, "column": 53}, "end_point": {"row": 152, "column": 54}}, {"id": 826, "type": "switch_statement", "text": "switch (section_name_map[i].type) {\n\t\t\t\tcase SECTION_PROGMEM:\n\t\t\t\t\treturn section_loader_progmem(data, size);\n\t\t\t\tcase SECTION_SHIFT:\n\t\t\t\t\treturn section_loader_shift(data, size);\n\t\t\t\tcase SECTION_OBJECT:\n\t\t\t\t\treturn section_loader_object(data, size);\n\t\t\t\tcase SECTION_STRING:\n\t\t\t\t\treturn section_loader_string(data, size);\n\t\t\t\tcase SECTION_EXTERN:\n\t\t\t\t\treturn section_loader_extern(data, size);\n\t\t\t\tcase SECTION_SYM_STRING:\n\t\t\t\t\treturn section_loader_sym_string(data, size);\n\t\t\t\tcase SECTION_SYM_FILE:\n\t\t\t\t\treturn section_loader_sym_file(data, size);\n\t\t\t\tcase SECTION_SYM_FUNC:\n\t\t\t\t\treturn section_loader_sym_func(data, size);\n\t\t\t\tcase SECTION_SYM_LINE:\n\t\t\t\t\treturn section_loader_sym_line(data, size);\n\t\t\t}", "parent": 811, "children": [827, 828], "start_point": {"row": 153, "column": 3}, "end_point": {"row": 172, "column": 4}}, {"id": 827, "type": "switch", "text": "switch", "parent": 826, "children": [], "start_point": {"row": 153, "column": 3}, "end_point": {"row": 153, "column": 9}}, {"id": 828, "type": "parenthesized_expression", "text": "(section_name_map[i].type)", "parent": 826, "children": [829], "start_point": {"row": 153, "column": 10}, "end_point": {"row": 153, "column": 36}}, {"id": 829, "type": "field_expression", "text": "section_name_map[i].type", "parent": 828, "children": [830, 833], "start_point": {"row": 153, "column": 11}, "end_point": {"row": 153, "column": 35}}, {"id": 830, "type": "subscript_expression", "text": "section_name_map[i]", "parent": 829, "children": [831, 832], "start_point": {"row": 153, "column": 11}, "end_point": {"row": 153, "column": 30}}, {"id": 831, "type": "identifier", "text": "section_name_map", "parent": 830, "children": [], "start_point": {"row": 153, "column": 11}, "end_point": {"row": 153, "column": 27}}, {"id": 832, "type": "identifier", "text": "i", "parent": 830, "children": [], "start_point": {"row": 153, "column": 28}, "end_point": {"row": 153, "column": 29}}, {"id": 833, "type": "field_identifier", "text": "type", "parent": 829, "children": [], "start_point": {"row": 153, "column": 31}, "end_point": {"row": 153, "column": 35}}, {"id": 834, "type": "case_statement", "text": "case SECTION_PROGMEM:\n\t\t\t\t\treturn section_loader_progmem(data, size);", "parent": 826, "children": [835, 836, 837], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 155, "column": 47}}, {"id": 835, "type": "case", "text": "case", "parent": 834, "children": [], "start_point": {"row": 154, "column": 4}, "end_point": {"row": 154, "column": 8}}, {"id": 836, "type": "identifier", "text": "SECTION_PROGMEM", "parent": 834, "children": [], "start_point": {"row": 154, "column": 9}, "end_point": {"row": 154, "column": 24}}, {"id": 837, "type": "return_statement", "text": "return section_loader_progmem(data, size);", "parent": 834, "children": [838], "start_point": {"row": 155, "column": 5}, "end_point": {"row": 155, "column": 47}}, {"id": 838, "type": "call_expression", "text": "section_loader_progmem(data, size)", "parent": 837, "children": [839, 840], "start_point": {"row": 155, "column": 12}, "end_point": {"row": 155, "column": 46}}, {"id": 839, "type": "identifier", "text": "section_loader_progmem", "parent": 838, "children": [], "start_point": {"row": 155, "column": 12}, "end_point": {"row": 155, "column": 34}}, {"id": 840, "type": "argument_list", "text": "(data, size)", "parent": 838, "children": [841, 842], "start_point": {"row": 155, "column": 34}, "end_point": {"row": 155, "column": 46}}, {"id": 841, "type": "identifier", "text": "data", "parent": 840, "children": [], "start_point": {"row": 155, "column": 35}, "end_point": {"row": 155, "column": 39}}, {"id": 842, "type": "identifier", "text": "size", "parent": 840, "children": [], "start_point": {"row": 155, "column": 41}, "end_point": {"row": 155, "column": 45}}, {"id": 843, "type": "case_statement", "text": "case SECTION_SHIFT:\n\t\t\t\t\treturn section_loader_shift(data, size);", "parent": 826, "children": [844, 845, 846], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 157, "column": 45}}, {"id": 844, "type": "case", "text": "case", "parent": 843, "children": [], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 156, "column": 8}}, {"id": 845, "type": "identifier", "text": "SECTION_SHIFT", "parent": 843, "children": [], "start_point": {"row": 156, "column": 9}, "end_point": {"row": 156, "column": 22}}, {"id": 846, "type": "return_statement", "text": "return section_loader_shift(data, size);", "parent": 843, "children": [847], "start_point": {"row": 157, "column": 5}, "end_point": {"row": 157, "column": 45}}, {"id": 847, "type": "call_expression", "text": "section_loader_shift(data, size)", "parent": 846, "children": [848, 849], "start_point": {"row": 157, "column": 12}, "end_point": {"row": 157, "column": 44}}, {"id": 848, "type": "identifier", "text": "section_loader_shift", "parent": 847, "children": [], "start_point": {"row": 157, "column": 12}, "end_point": {"row": 157, "column": 32}}, {"id": 849, "type": "argument_list", "text": "(data, size)", "parent": 847, "children": [850, 851], "start_point": {"row": 157, "column": 32}, "end_point": {"row": 157, "column": 44}}, {"id": 850, "type": "identifier", "text": "data", "parent": 849, "children": [], "start_point": {"row": 157, "column": 33}, "end_point": {"row": 157, "column": 37}}, {"id": 851, "type": "identifier", "text": "size", "parent": 849, "children": [], "start_point": {"row": 157, "column": 39}, "end_point": {"row": 157, "column": 43}}, {"id": 852, "type": "case_statement", "text": "case SECTION_OBJECT:\n\t\t\t\t\treturn section_loader_object(data, size);", "parent": 826, "children": [853, 854, 855], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 159, "column": 46}}, {"id": 853, "type": "case", "text": "case", "parent": 852, "children": [], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 8}}, {"id": 854, "type": "identifier", "text": "SECTION_OBJECT", "parent": 852, "children": [], "start_point": {"row": 158, "column": 9}, "end_point": {"row": 158, "column": 23}}, {"id": 855, "type": "return_statement", "text": "return section_loader_object(data, size);", "parent": 852, "children": [856], "start_point": {"row": 159, "column": 5}, "end_point": {"row": 159, "column": 46}}, {"id": 856, "type": "call_expression", "text": "section_loader_object(data, size)", "parent": 855, "children": [857, 858], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 45}}, {"id": 857, "type": "identifier", "text": "section_loader_object", "parent": 856, "children": [], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 33}}, {"id": 858, "type": "argument_list", "text": "(data, size)", "parent": 856, "children": [859, 860], "start_point": {"row": 159, "column": 33}, "end_point": {"row": 159, "column": 45}}, {"id": 859, "type": "identifier", "text": "data", "parent": 858, "children": [], "start_point": {"row": 159, "column": 34}, "end_point": {"row": 159, "column": 38}}, {"id": 860, "type": "identifier", "text": "size", "parent": 858, "children": [], "start_point": {"row": 159, "column": 40}, "end_point": {"row": 159, "column": 44}}, {"id": 861, "type": "case_statement", "text": "case SECTION_STRING:\n\t\t\t\t\treturn section_loader_string(data, size);", "parent": 826, "children": [862, 863, 864], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 161, "column": 46}}, {"id": 862, "type": "case", "text": "case", "parent": 861, "children": [], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 8}}, {"id": 863, "type": "identifier", "text": "SECTION_STRING", "parent": 861, "children": [], "start_point": {"row": 160, "column": 9}, "end_point": {"row": 160, "column": 23}}, {"id": 864, "type": "return_statement", "text": "return section_loader_string(data, size);", "parent": 861, "children": [865], "start_point": {"row": 161, "column": 5}, "end_point": {"row": 161, "column": 46}}, {"id": 865, "type": "call_expression", "text": "section_loader_string(data, size)", "parent": 864, "children": [866, 867], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 45}}, {"id": 866, "type": "identifier", "text": "section_loader_string", "parent": 865, "children": [], "start_point": {"row": 161, "column": 12}, "end_point": {"row": 161, "column": 33}}, {"id": 867, "type": "argument_list", "text": "(data, size)", "parent": 865, "children": [868, 869], "start_point": {"row": 161, "column": 33}, "end_point": {"row": 161, "column": 45}}, {"id": 868, "type": "identifier", "text": "data", "parent": 867, "children": [], "start_point": {"row": 161, "column": 34}, "end_point": {"row": 161, "column": 38}}, {"id": 869, "type": "identifier", "text": "size", "parent": 867, "children": [], "start_point": {"row": 161, "column": 40}, "end_point": {"row": 161, "column": 44}}, {"id": 870, "type": "case_statement", "text": "case SECTION_EXTERN:\n\t\t\t\t\treturn section_loader_extern(data, size);", "parent": 826, "children": [871, 872, 873], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 163, "column": 46}}, {"id": 871, "type": "case", "text": "case", "parent": 870, "children": [], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 8}}, {"id": 872, "type": "identifier", "text": "SECTION_EXTERN", "parent": 870, "children": [], "start_point": {"row": 162, "column": 9}, "end_point": {"row": 162, "column": 23}}, {"id": 873, "type": "return_statement", "text": "return section_loader_extern(data, size);", "parent": 870, "children": [874], "start_point": {"row": 163, "column": 5}, "end_point": {"row": 163, "column": 46}}, {"id": 874, "type": "call_expression", "text": "section_loader_extern(data, size)", "parent": 873, "children": [875, 876], "start_point": {"row": 163, "column": 12}, "end_point": {"row": 163, "column": 45}}, {"id": 875, "type": "identifier", "text": "section_loader_extern", "parent": 874, "children": [], "start_point": {"row": 163, "column": 12}, "end_point": {"row": 163, "column": 33}}, {"id": 876, "type": "argument_list", "text": "(data, size)", "parent": 874, "children": [877, 878], "start_point": {"row": 163, "column": 33}, "end_point": {"row": 163, "column": 45}}, {"id": 877, "type": "identifier", "text": "data", "parent": 876, "children": [], "start_point": {"row": 163, "column": 34}, "end_point": {"row": 163, "column": 38}}, {"id": 878, "type": "identifier", "text": "size", "parent": 876, "children": [], "start_point": {"row": 163, "column": 40}, "end_point": {"row": 163, "column": 44}}, {"id": 879, "type": "case_statement", "text": "case SECTION_SYM_STRING:\n\t\t\t\t\treturn section_loader_sym_string(data, size);", "parent": 826, "children": [880, 881, 882], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 165, "column": 50}}, {"id": 880, "type": "case", "text": "case", "parent": 879, "children": [], "start_point": {"row": 164, "column": 4}, "end_point": {"row": 164, "column": 8}}, {"id": 881, "type": "identifier", "text": "SECTION_SYM_STRING", "parent": 879, "children": [], "start_point": {"row": 164, "column": 9}, "end_point": {"row": 164, "column": 27}}, {"id": 882, "type": "return_statement", "text": "return section_loader_sym_string(data, size);", "parent": 879, "children": [883], "start_point": {"row": 165, "column": 5}, "end_point": {"row": 165, "column": 50}}, {"id": 883, "type": "call_expression", "text": "section_loader_sym_string(data, size)", "parent": 882, "children": [884, 885], "start_point": {"row": 165, "column": 12}, "end_point": {"row": 165, "column": 49}}, {"id": 884, "type": "identifier", "text": "section_loader_sym_string", "parent": 883, "children": [], "start_point": {"row": 165, "column": 12}, "end_point": {"row": 165, "column": 37}}, {"id": 885, "type": "argument_list", "text": "(data, size)", "parent": 883, "children": [886, 887], "start_point": {"row": 165, "column": 37}, "end_point": {"row": 165, "column": 49}}, {"id": 886, "type": "identifier", "text": "data", "parent": 885, "children": [], "start_point": {"row": 165, "column": 38}, "end_point": {"row": 165, "column": 42}}, {"id": 887, "type": "identifier", "text": "size", "parent": 885, "children": [], "start_point": {"row": 165, "column": 44}, "end_point": {"row": 165, "column": 48}}, {"id": 888, "type": "case_statement", "text": "case SECTION_SYM_FILE:\n\t\t\t\t\treturn section_loader_sym_file(data, size);", "parent": 826, "children": [889, 890, 891], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 167, "column": 48}}, {"id": 889, "type": "case", "text": "case", "parent": 888, "children": [], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 8}}, {"id": 890, "type": "identifier", "text": "SECTION_SYM_FILE", "parent": 888, "children": [], "start_point": {"row": 166, "column": 9}, "end_point": {"row": 166, "column": 25}}, {"id": 891, "type": "return_statement", "text": "return section_loader_sym_file(data, size);", "parent": 888, "children": [892], "start_point": {"row": 167, "column": 5}, "end_point": {"row": 167, "column": 48}}, {"id": 892, "type": "call_expression", "text": "section_loader_sym_file(data, size)", "parent": 891, "children": [893, 894], "start_point": {"row": 167, "column": 12}, "end_point": {"row": 167, "column": 47}}, {"id": 893, "type": "identifier", "text": "section_loader_sym_file", "parent": 892, "children": [], "start_point": {"row": 167, "column": 12}, "end_point": {"row": 167, "column": 35}}, {"id": 894, "type": "argument_list", "text": "(data, size)", "parent": 892, "children": [895, 896], "start_point": {"row": 167, "column": 35}, "end_point": {"row": 167, "column": 47}}, {"id": 895, "type": "identifier", "text": "data", "parent": 894, "children": [], "start_point": {"row": 167, "column": 36}, "end_point": {"row": 167, "column": 40}}, {"id": 896, "type": "identifier", "text": "size", "parent": 894, "children": [], "start_point": {"row": 167, "column": 42}, "end_point": {"row": 167, "column": 46}}, {"id": 897, "type": "case_statement", "text": "case SECTION_SYM_FUNC:\n\t\t\t\t\treturn section_loader_sym_func(data, size);", "parent": 826, "children": [898, 899, 900], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 169, "column": 48}}, {"id": 898, "type": "case", "text": "case", "parent": 897, "children": [], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 8}}, {"id": 899, "type": "identifier", "text": "SECTION_SYM_FUNC", "parent": 897, "children": [], "start_point": {"row": 168, "column": 9}, "end_point": {"row": 168, "column": 25}}, {"id": 900, "type": "return_statement", "text": "return section_loader_sym_func(data, size);", "parent": 897, "children": [901], "start_point": {"row": 169, "column": 5}, "end_point": {"row": 169, "column": 48}}, {"id": 901, "type": "call_expression", "text": "section_loader_sym_func(data, size)", "parent": 900, "children": [902, 903], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 47}}, {"id": 902, "type": "identifier", "text": "section_loader_sym_func", "parent": 901, "children": [], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 35}}, {"id": 903, "type": "argument_list", "text": "(data, size)", "parent": 901, "children": [904, 905], "start_point": {"row": 169, "column": 35}, "end_point": {"row": 169, "column": 47}}, {"id": 904, "type": "identifier", "text": "data", "parent": 903, "children": [], "start_point": {"row": 169, "column": 36}, "end_point": {"row": 169, "column": 40}}, {"id": 905, "type": "identifier", "text": "size", "parent": 903, "children": [], "start_point": {"row": 169, "column": 42}, "end_point": {"row": 169, "column": 46}}, {"id": 906, "type": "case_statement", "text": "case SECTION_SYM_LINE:\n\t\t\t\t\treturn section_loader_sym_line(data, size);", "parent": 826, "children": [907, 908, 909], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 171, "column": 48}}, {"id": 907, "type": "case", "text": "case", "parent": 906, "children": [], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 170, "column": 8}}, {"id": 908, "type": "identifier", "text": "SECTION_SYM_LINE", "parent": 906, "children": [], "start_point": {"row": 170, "column": 9}, "end_point": {"row": 170, "column": 25}}, {"id": 909, "type": "return_statement", "text": "return section_loader_sym_line(data, size);", "parent": 906, "children": [910], "start_point": {"row": 171, "column": 5}, "end_point": {"row": 171, "column": 48}}, {"id": 910, "type": "call_expression", "text": "section_loader_sym_line(data, size)", "parent": 909, "children": [911, 912], "start_point": {"row": 171, "column": 12}, "end_point": {"row": 171, "column": 47}}, {"id": 911, "type": "identifier", "text": "section_loader_sym_line", "parent": 910, "children": [], "start_point": {"row": 171, "column": 12}, "end_point": {"row": 171, "column": 35}}, {"id": 912, "type": "argument_list", "text": "(data, size)", "parent": 910, "children": [913, 914], "start_point": {"row": 171, "column": 35}, "end_point": {"row": 171, "column": 47}}, {"id": 913, "type": "identifier", "text": "data", "parent": 912, "children": [], "start_point": {"row": 171, "column": 36}, "end_point": {"row": 171, "column": 40}}, {"id": 914, "type": "identifier", "text": "size", "parent": 912, "children": [], "start_point": {"row": 171, "column": 42}, "end_point": {"row": 171, "column": 46}}, {"id": 915, "type": "break_statement", "text": "break;", "parent": 811, "children": [916], "start_point": {"row": 173, "column": 3}, "end_point": {"row": 173, "column": 9}}, {"id": 916, "type": "break", "text": "break", "parent": 915, "children": [], "start_point": {"row": 173, "column": 3}, "end_point": {"row": 173, "column": 8}}, {"id": 917, "type": "assignment_expression", "text": "vm_loader_error_data = name", "parent": 770, "children": [918, 919, 920], "start_point": {"row": 176, "column": 1}, "end_point": {"row": 176, "column": 28}}, {"id": 918, "type": "identifier", "text": "vm_loader_error_data", "parent": 917, "children": [], "start_point": {"row": 176, "column": 1}, "end_point": {"row": 176, "column": 21}}, {"id": 919, "type": "=", "text": "=", "parent": 917, "children": [], "start_point": {"row": 176, "column": 22}, "end_point": {"row": 176, "column": 23}}, {"id": 920, "type": "identifier", "text": "name", "parent": 917, "children": [], "start_point": {"row": 176, "column": 24}, "end_point": {"row": 176, "column": 28}}, {"id": 921, "type": "return_statement", "text": "return VM_LOADER_ERROR_SECTION;", "parent": 770, "children": [922], "start_point": {"row": 177, "column": 1}, "end_point": {"row": 177, "column": 32}}, {"id": 922, "type": "identifier", "text": "VM_LOADER_ERROR_SECTION", "parent": 921, "children": [], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 31}}, {"id": 923, "type": "function_definition", "text": "vm_loader_error_t vm_loader_load(const uint8_t* data, uint32_t size) {\n\tif (strncmp((char*)data, \"ASB\", 4) != 0) {\n\t\treturn VM_LOADER_ERROR_MAGICDWORD;\n\t}\n\tconst uint8_t* end = data + size;\n\tdata += 4;\n\twhile (data < end) {\n\t\tconst vm_loader_section_t* section = (vm_loader_section_t*)data;\n\t\tvm_loader_error_t ret = section_loader_dispatch(section->name, section->data, section->size);\n\t\tif (ret != VM_LOADER_ERROR_NONE) {\n\t\t\treturn ret;\n\t\t}\n\t\tdata += section->size + sizeof(vm_loader_section_t);\n\t}\n\treturn VM_LOADER_ERROR_NONE;\n}", "parent": null, "children": [924, 925], "start_point": {"row": 180, "column": 0}, "end_point": {"row": 195, "column": 1}}, {"id": 924, "type": "type_identifier", "text": "vm_loader_error_t", "parent": 923, "children": [], "start_point": {"row": 180, "column": 0}, "end_point": {"row": 180, "column": 17}}, {"id": 925, "type": "function_declarator", "text": "vm_loader_load(const uint8_t* data, uint32_t size)", "parent": 923, "children": [926, 927], "start_point": {"row": 180, "column": 18}, "end_point": {"row": 180, "column": 68}}, {"id": 926, "type": "identifier", "text": "vm_loader_load", "parent": 925, "children": [], "start_point": {"row": 180, "column": 18}, "end_point": {"row": 180, "column": 32}}, {"id": 927, "type": "parameter_list", "text": "(const uint8_t* data, uint32_t size)", "parent": 925, "children": [928, 933], "start_point": {"row": 180, "column": 32}, "end_point": {"row": 180, "column": 68}}, {"id": 928, "type": "parameter_declaration", "text": "const uint8_t* data", "parent": 927, "children": [929, 930], "start_point": {"row": 180, "column": 33}, "end_point": {"row": 180, "column": 52}}, {"id": 929, "type": "primitive_type", "text": "uint8_t", "parent": 928, "children": [], "start_point": {"row": 180, "column": 39}, "end_point": {"row": 180, "column": 46}}, {"id": 930, "type": "pointer_declarator", "text": "* data", "parent": 928, "children": [931, 932], "start_point": {"row": 180, "column": 46}, "end_point": {"row": 180, "column": 52}}, {"id": 931, "type": "*", "text": "*", "parent": 930, "children": [], "start_point": {"row": 180, "column": 46}, "end_point": {"row": 180, "column": 47}}, {"id": 932, "type": "identifier", "text": "data", "parent": 930, "children": [], "start_point": {"row": 180, "column": 48}, "end_point": {"row": 180, "column": 52}}, {"id": 933, "type": "parameter_declaration", "text": "uint32_t size", "parent": 927, "children": [934, 935], "start_point": {"row": 180, "column": 54}, "end_point": {"row": 180, "column": 67}}, {"id": 934, "type": "primitive_type", "text": "uint32_t", "parent": 933, "children": [], "start_point": {"row": 180, "column": 54}, "end_point": {"row": 180, "column": 62}}, {"id": 935, "type": "identifier", "text": "size", "parent": 933, "children": [], "start_point": {"row": 180, "column": 63}, "end_point": {"row": 180, "column": 67}}, {"id": 936, "type": "if_statement", "text": "if (strncmp((char*)data, \"ASB\", 4) != 0) {\n\t\treturn VM_LOADER_ERROR_MAGICDWORD;\n\t}", "parent": 923, "children": [937], "start_point": {"row": 181, "column": 1}, "end_point": {"row": 183, "column": 2}}, {"id": 937, "type": "parenthesized_expression", "text": "(strncmp((char*)data, \"ASB\", 4) != 0)", "parent": 936, "children": [938], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 41}}, {"id": 938, "type": "binary_expression", "text": "strncmp((char*)data, \"ASB\", 4) != 0", "parent": 937, "children": [939, 950, 951], "start_point": {"row": 181, "column": 5}, "end_point": {"row": 181, "column": 40}}, {"id": 939, "type": "call_expression", "text": "strncmp((char*)data, \"ASB\", 4)", "parent": 938, "children": [940, 941], "start_point": {"row": 181, "column": 5}, "end_point": {"row": 181, "column": 35}}, {"id": 940, "type": "identifier", "text": "strncmp", "parent": 939, "children": [], "start_point": {"row": 181, "column": 5}, "end_point": {"row": 181, "column": 12}}, {"id": 941, "type": "argument_list", "text": "((char*)data, \"ASB\", 4)", "parent": 939, "children": [942, 948, 949], "start_point": {"row": 181, "column": 12}, "end_point": {"row": 181, "column": 35}}, {"id": 942, "type": "cast_expression", "text": "(char*)data", "parent": 941, "children": [943, 947], "start_point": {"row": 181, "column": 13}, "end_point": {"row": 181, "column": 24}}, {"id": 943, "type": "type_descriptor", "text": "char*", "parent": 942, "children": [944, 945], "start_point": {"row": 181, "column": 14}, "end_point": {"row": 181, "column": 19}}, {"id": 944, "type": "primitive_type", "text": "char", "parent": 943, "children": [], "start_point": {"row": 181, "column": 14}, "end_point": {"row": 181, "column": 18}}, {"id": 945, "type": "abstract_pointer_declarator", "text": "*", "parent": 943, "children": [946], "start_point": {"row": 181, "column": 18}, "end_point": {"row": 181, "column": 19}}, {"id": 946, "type": "*", "text": "*", "parent": 945, "children": [], "start_point": {"row": 181, "column": 18}, "end_point": {"row": 181, "column": 19}}, {"id": 947, "type": "identifier", "text": "data", "parent": 942, "children": [], "start_point": {"row": 181, "column": 20}, "end_point": {"row": 181, "column": 24}}, {"id": 948, "type": "string_literal", "text": "\"ASB\"", "parent": 941, "children": [], "start_point": {"row": 181, "column": 26}, "end_point": {"row": 181, "column": 31}}, {"id": 949, "type": "number_literal", "text": "4", "parent": 941, "children": [], "start_point": {"row": 181, "column": 33}, "end_point": {"row": 181, "column": 34}}, {"id": 950, "type": "!=", "text": "!=", "parent": 938, "children": [], "start_point": {"row": 181, "column": 36}, "end_point": {"row": 181, "column": 38}}, {"id": 951, "type": "number_literal", "text": "0", "parent": 938, "children": [], "start_point": {"row": 181, "column": 39}, "end_point": {"row": 181, "column": 40}}, {"id": 952, "type": "return_statement", "text": "return VM_LOADER_ERROR_MAGICDWORD;", "parent": 936, "children": [953], "start_point": {"row": 182, "column": 2}, "end_point": {"row": 182, "column": 36}}, {"id": 953, "type": "identifier", "text": "VM_LOADER_ERROR_MAGICDWORD", "parent": 952, "children": [], "start_point": {"row": 182, "column": 9}, "end_point": {"row": 182, "column": 35}}, {"id": 954, "type": "declaration", "text": "const uint8_t* end = data + size;", "parent": 923, "children": [955, 956], "start_point": {"row": 184, "column": 1}, "end_point": {"row": 184, "column": 34}}, {"id": 955, "type": "primitive_type", "text": "uint8_t", "parent": 954, "children": [], "start_point": {"row": 184, "column": 7}, "end_point": {"row": 184, "column": 14}}, {"id": 956, "type": "init_declarator", "text": "* end = data + size", "parent": 954, "children": [957, 959, 960], "start_point": {"row": 184, "column": 14}, "end_point": {"row": 184, "column": 33}}, {"id": 957, "type": "pointer_declarator", "text": "* end", "parent": 956, "children": [958], "start_point": {"row": 184, "column": 14}, "end_point": {"row": 184, "column": 19}}, {"id": 958, "type": "*", "text": "*", "parent": 957, "children": [], "start_point": {"row": 184, "column": 14}, "end_point": {"row": 184, "column": 15}}, {"id": 959, "type": "=", "text": "=", "parent": 956, "children": [], "start_point": {"row": 184, "column": 20}, "end_point": {"row": 184, "column": 21}}, {"id": 960, "type": "binary_expression", "text": "data + size", "parent": 956, "children": [961, 962, 963], "start_point": {"row": 184, "column": 22}, "end_point": {"row": 184, "column": 33}}, {"id": 961, "type": "identifier", "text": "data", "parent": 960, "children": [], "start_point": {"row": 184, "column": 22}, "end_point": {"row": 184, "column": 26}}, {"id": 962, "type": "+", "text": "+", "parent": 960, "children": [], "start_point": {"row": 184, "column": 27}, "end_point": {"row": 184, "column": 28}}, {"id": 963, "type": "identifier", "text": "size", "parent": 960, "children": [], "start_point": {"row": 184, "column": 29}, "end_point": {"row": 184, "column": 33}}, {"id": 964, "type": "assignment_expression", "text": "data += 4", "parent": 923, "children": [965, 966, 967], "start_point": {"row": 185, "column": 1}, "end_point": {"row": 185, "column": 10}}, {"id": 965, "type": "identifier", "text": "data", "parent": 964, "children": [], "start_point": {"row": 185, "column": 1}, "end_point": {"row": 185, "column": 5}}, {"id": 966, "type": "+=", "text": "+=", "parent": 964, "children": [], "start_point": {"row": 185, "column": 6}, "end_point": {"row": 185, "column": 8}}, {"id": 967, "type": "number_literal", "text": "4", "parent": 964, "children": [], "start_point": {"row": 185, "column": 9}, "end_point": {"row": 185, "column": 10}}, {"id": 968, "type": "while_statement", "text": "while (data < end) {\n\t\tconst vm_loader_section_t* section = (vm_loader_section_t*)data;\n\t\tvm_loader_error_t ret = section_loader_dispatch(section->name, section->data, section->size);\n\t\tif (ret != VM_LOADER_ERROR_NONE) {\n\t\t\treturn ret;\n\t\t}\n\t\tdata += section->size + sizeof(vm_loader_section_t);\n\t}", "parent": 923, "children": [969], "start_point": {"row": 186, "column": 1}, "end_point": {"row": 193, "column": 2}}, {"id": 969, "type": "parenthesized_expression", "text": "(data < end)", "parent": 968, "children": [970], "start_point": {"row": 186, "column": 7}, "end_point": {"row": 186, "column": 19}}, {"id": 970, "type": "binary_expression", "text": "data < end", "parent": 969, "children": [971, 972], "start_point": {"row": 186, "column": 8}, "end_point": {"row": 186, "column": 18}}, {"id": 971, "type": "identifier", "text": "data", "parent": 970, "children": [], "start_point": {"row": 186, "column": 8}, "end_point": {"row": 186, "column": 12}}, {"id": 972, "type": "<", "text": "<", "parent": 970, "children": [], "start_point": {"row": 186, "column": 13}, "end_point": {"row": 186, "column": 14}}, {"id": 973, "type": "declaration", "text": "const vm_loader_section_t* section = (vm_loader_section_t*)data;", "parent": 968, "children": [974, 975], "start_point": {"row": 187, "column": 2}, "end_point": {"row": 187, "column": 66}}, {"id": 974, "type": "type_identifier", "text": "vm_loader_section_t", "parent": 973, "children": [], "start_point": {"row": 187, "column": 8}, "end_point": {"row": 187, "column": 27}}, {"id": 975, "type": "init_declarator", "text": "* section = (vm_loader_section_t*)data", "parent": 973, "children": [976, 979, 980], "start_point": {"row": 187, "column": 27}, "end_point": {"row": 187, "column": 65}}, {"id": 976, "type": "pointer_declarator", "text": "* section", "parent": 975, "children": [977, 978], "start_point": {"row": 187, "column": 27}, "end_point": {"row": 187, "column": 36}}, {"id": 977, "type": "*", "text": "*", "parent": 976, "children": [], "start_point": {"row": 187, "column": 27}, "end_point": {"row": 187, "column": 28}}, {"id": 978, "type": "identifier", "text": "section", "parent": 976, "children": [], "start_point": {"row": 187, "column": 29}, "end_point": {"row": 187, "column": 36}}, {"id": 979, "type": "=", "text": "=", "parent": 975, "children": [], "start_point": {"row": 187, "column": 37}, "end_point": {"row": 187, "column": 38}}, {"id": 980, "type": "cast_expression", "text": "(vm_loader_section_t*)data", "parent": 975, "children": [981, 985], "start_point": {"row": 187, "column": 39}, "end_point": {"row": 187, "column": 65}}, {"id": 981, "type": "type_descriptor", "text": "vm_loader_section_t*", "parent": 980, "children": [982, 983], "start_point": {"row": 187, "column": 40}, "end_point": {"row": 187, "column": 60}}, {"id": 982, "type": "type_identifier", "text": "vm_loader_section_t", "parent": 981, "children": [], "start_point": {"row": 187, "column": 40}, "end_point": {"row": 187, "column": 59}}, {"id": 983, "type": "abstract_pointer_declarator", "text": "*", "parent": 981, "children": [984], "start_point": {"row": 187, "column": 59}, "end_point": {"row": 187, "column": 60}}, {"id": 984, "type": "*", "text": "*", "parent": 983, "children": [], "start_point": {"row": 187, "column": 59}, "end_point": {"row": 187, "column": 60}}, {"id": 985, "type": "identifier", "text": "data", "parent": 980, "children": [], "start_point": {"row": 187, "column": 61}, "end_point": {"row": 187, "column": 65}}, {"id": 986, "type": "declaration", "text": "vm_loader_error_t ret = section_loader_dispatch(section->name, section->data, section->size);", "parent": 968, "children": [987, 988], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 188, "column": 95}}, {"id": 987, "type": "type_identifier", "text": "vm_loader_error_t", "parent": 986, "children": [], "start_point": {"row": 188, "column": 2}, "end_point": {"row": 188, "column": 19}}, {"id": 988, "type": "init_declarator", "text": "ret = section_loader_dispatch(section->name, section->data, section->size)", "parent": 986, "children": [989, 990, 991], "start_point": {"row": 188, "column": 20}, "end_point": {"row": 188, "column": 94}}, {"id": 989, "type": "identifier", "text": "ret", "parent": 988, "children": [], "start_point": {"row": 188, "column": 20}, "end_point": {"row": 188, "column": 23}}, {"id": 990, "type": "=", "text": "=", "parent": 988, "children": [], "start_point": {"row": 188, "column": 24}, "end_point": {"row": 188, "column": 25}}, {"id": 991, "type": "call_expression", "text": "section_loader_dispatch(section->name, section->data, section->size)", "parent": 988, "children": [992, 993], "start_point": {"row": 188, "column": 26}, "end_point": {"row": 188, "column": 94}}, {"id": 992, "type": "identifier", "text": "section_loader_dispatch", "parent": 991, "children": [], "start_point": {"row": 188, "column": 26}, "end_point": {"row": 188, "column": 49}}, {"id": 993, "type": "argument_list", "text": "(section->name, section->data, section->size)", "parent": 991, "children": [994, 997, 1000], "start_point": {"row": 188, "column": 49}, "end_point": {"row": 188, "column": 94}}, {"id": 994, "type": "field_expression", "text": "section->name", "parent": 993, "children": [995, 996], "start_point": {"row": 188, "column": 50}, "end_point": {"row": 188, "column": 63}}, {"id": 995, "type": "identifier", "text": "section", "parent": 994, "children": [], "start_point": {"row": 188, "column": 50}, "end_point": {"row": 188, "column": 57}}, {"id": 996, "type": "field_identifier", "text": "name", "parent": 994, "children": [], "start_point": {"row": 188, "column": 59}, "end_point": {"row": 188, "column": 63}}, {"id": 997, "type": "field_expression", "text": "section->data", "parent": 993, "children": [998, 999], "start_point": {"row": 188, "column": 65}, "end_point": {"row": 188, "column": 78}}, {"id": 998, "type": "identifier", "text": "section", "parent": 997, "children": [], "start_point": {"row": 188, "column": 65}, "end_point": {"row": 188, "column": 72}}, {"id": 999, "type": "field_identifier", "text": "data", "parent": 997, "children": [], "start_point": {"row": 188, "column": 74}, "end_point": {"row": 188, "column": 78}}, {"id": 1000, "type": "field_expression", "text": "section->size", "parent": 993, "children": [1001, 1002], "start_point": {"row": 188, "column": 80}, "end_point": {"row": 188, "column": 93}}, {"id": 1001, "type": "identifier", "text": "section", "parent": 1000, "children": [], "start_point": {"row": 188, "column": 80}, "end_point": {"row": 188, "column": 87}}, {"id": 1002, "type": "field_identifier", "text": "size", "parent": 1000, "children": [], "start_point": {"row": 188, "column": 89}, "end_point": {"row": 188, "column": 93}}, {"id": 1003, "type": "if_statement", "text": "if (ret != VM_LOADER_ERROR_NONE) {\n\t\t\treturn ret;\n\t\t}", "parent": 968, "children": [1004], "start_point": {"row": 189, "column": 2}, "end_point": {"row": 191, "column": 3}}, {"id": 1004, "type": "parenthesized_expression", "text": "(ret != VM_LOADER_ERROR_NONE)", "parent": 1003, "children": [1005], "start_point": {"row": 189, "column": 5}, "end_point": {"row": 189, "column": 34}}, {"id": 1005, "type": "binary_expression", "text": "ret != VM_LOADER_ERROR_NONE", "parent": 1004, "children": [1006, 1007, 1008], "start_point": {"row": 189, "column": 6}, "end_point": {"row": 189, "column": 33}}, {"id": 1006, "type": "identifier", "text": "ret", "parent": 1005, "children": [], "start_point": {"row": 189, "column": 6}, "end_point": {"row": 189, "column": 9}}, {"id": 1007, "type": "!=", "text": "!=", "parent": 1005, "children": [], "start_point": {"row": 189, "column": 10}, "end_point": {"row": 189, "column": 12}}, {"id": 1008, "type": "identifier", "text": "VM_LOADER_ERROR_NONE", "parent": 1005, "children": [], "start_point": {"row": 189, "column": 13}, "end_point": {"row": 189, "column": 33}}, {"id": 1009, "type": "return_statement", "text": "return ret;", "parent": 1003, "children": [1010], "start_point": {"row": 190, "column": 3}, "end_point": {"row": 190, "column": 14}}, {"id": 1010, "type": "identifier", "text": "ret", "parent": 1009, "children": [], "start_point": {"row": 190, "column": 10}, "end_point": {"row": 190, "column": 13}}, {"id": 1011, "type": "assignment_expression", "text": "data += section->size + sizeof(vm_loader_section_t)", "parent": 968, "children": [1012, 1013, 1014], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 53}}, {"id": 1012, "type": "identifier", "text": "data", "parent": 1011, "children": [], "start_point": {"row": 192, "column": 2}, "end_point": {"row": 192, "column": 6}}, {"id": 1013, "type": "+=", "text": "+=", "parent": 1011, "children": [], "start_point": {"row": 192, "column": 7}, "end_point": {"row": 192, "column": 9}}, {"id": 1014, "type": "binary_expression", "text": "section->size + sizeof(vm_loader_section_t)", "parent": 1011, "children": [1015, 1018, 1019], "start_point": {"row": 192, "column": 10}, "end_point": {"row": 192, "column": 53}}, {"id": 1015, "type": "field_expression", "text": "section->size", "parent": 1014, "children": [1016, 1017], "start_point": {"row": 192, "column": 10}, "end_point": {"row": 192, "column": 23}}, {"id": 1016, "type": "identifier", "text": "section", "parent": 1015, "children": [], "start_point": {"row": 192, "column": 10}, "end_point": {"row": 192, "column": 17}}, {"id": 1017, "type": "field_identifier", "text": "size", "parent": 1015, "children": [], "start_point": {"row": 192, "column": 19}, "end_point": {"row": 192, "column": 23}}, {"id": 1018, "type": "+", "text": "+", "parent": 1014, "children": [], "start_point": {"row": 192, "column": 24}, "end_point": {"row": 192, "column": 25}}, {"id": 1019, "type": "sizeof_expression", "text": "sizeof(vm_loader_section_t)", "parent": 1014, "children": [1020], "start_point": {"row": 192, "column": 26}, "end_point": {"row": 192, "column": 53}}, {"id": 1020, "type": "parenthesized_expression", "text": "(vm_loader_section_t)", "parent": 1019, "children": [1021], "start_point": {"row": 192, "column": 32}, "end_point": {"row": 192, "column": 53}}, {"id": 1021, "type": "identifier", "text": "vm_loader_section_t", "parent": 1020, "children": [], "start_point": {"row": 192, "column": 33}, "end_point": {"row": 192, "column": 52}}, {"id": 1022, "type": "return_statement", "text": "return VM_LOADER_ERROR_NONE;", "parent": 923, "children": [1023], "start_point": {"row": 194, "column": 1}, "end_point": {"row": 194, "column": 29}}, {"id": 1023, "type": "identifier", "text": "VM_LOADER_ERROR_NONE", "parent": 1022, "children": [], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 194, "column": 28}}, {"id": 1024, "type": "function_definition", "text": "const void* vm_loader_get_error_data(void) {\n\treturn vm_loader_error_data;\n}", "parent": null, "children": [1025, 1026], "start_point": {"row": 197, "column": 0}, "end_point": {"row": 199, "column": 1}}, {"id": 1025, "type": "primitive_type", "text": "void", "parent": 1024, "children": [], "start_point": {"row": 197, "column": 6}, "end_point": {"row": 197, "column": 10}}, {"id": 1026, "type": "pointer_declarator", "text": "* vm_loader_get_error_data(void)", "parent": 1024, "children": [1027, 1028], "start_point": {"row": 197, "column": 10}, "end_point": {"row": 197, "column": 42}}, {"id": 1027, "type": "*", "text": "*", "parent": 1026, "children": [], "start_point": {"row": 197, "column": 10}, "end_point": {"row": 197, "column": 11}}, {"id": 1028, "type": "function_declarator", "text": "vm_loader_get_error_data(void)", "parent": 1026, "children": [1029, 1030], "start_point": {"row": 197, "column": 12}, "end_point": {"row": 197, "column": 42}}, {"id": 1029, "type": "identifier", "text": "vm_loader_get_error_data", "parent": 1028, "children": [], "start_point": {"row": 197, "column": 12}, "end_point": {"row": 197, "column": 36}}, {"id": 1030, "type": "parameter_list", "text": "(void)", "parent": 1028, "children": [1031], "start_point": {"row": 197, "column": 36}, "end_point": {"row": 197, "column": 42}}, {"id": 1031, "type": "parameter_declaration", "text": "void", "parent": 1030, "children": [1032], "start_point": {"row": 197, "column": 37}, "end_point": {"row": 197, "column": 41}}, {"id": 1032, "type": "primitive_type", "text": "void", "parent": 1031, "children": [], "start_point": {"row": 197, "column": 37}, "end_point": {"row": 197, "column": 41}}, {"id": 1033, "type": "return_statement", "text": "return vm_loader_error_data;", "parent": 1024, "children": [1034], "start_point": {"row": 198, "column": 1}, "end_point": {"row": 198, "column": 29}}, {"id": 1034, "type": "identifier", "text": "vm_loader_error_data", "parent": 1033, "children": [], "start_point": {"row": 198, "column": 8}, "end_point": {"row": 198, "column": 28}}]}, "node_categories": {"declarations": {"functions": [152, 158, 268, 270, 296, 298, 327, 329, 510, 512, 605, 607, 631, 633, 659, 661, 696, 698, 733, 735, 770, 772, 923, 925, 1024, 1028], "variables": [27, 31, 36, 39, 44, 48, 51, 54, 57, 61, 85, 89, 94, 98, 109, 118, 161, 166, 184, 214, 238, 273, 278, 301, 306, 332, 337, 340, 353, 374, 389, 475, 515, 520, 527, 546, 559, 610, 615, 636, 641, 664, 669, 701, 706, 738, 743, 775, 780, 785, 789, 928, 933, 954, 973, 986, 1031], "classes": [29, 30, 46, 47, 87, 88], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25], "modules": [], "enums": [63, 64, 65, 66, 68, 70, 72, 74, 76, 78, 80, 82]}, "statements": {"expressions": [171, 172, 173, 193, 200, 203, 206, 220, 224, 228, 232, 243, 244, 251, 254, 255, 256, 257, 260, 261, 281, 288, 309, 313, 316, 317, 318, 347, 359, 364, 365, 370, 371, 381, 386, 394, 398, 399, 400, 408, 413, 416, 418, 422, 423, 431, 436, 439, 441, 445, 446, 449, 458, 460, 480, 485, 488, 493, 494, 495, 523, 532, 533, 534, 552, 556, 566, 572, 575, 578, 584, 587, 588, 589, 590, 591, 595, 596, 597, 618, 625, 644, 649, 653, 673, 677, 684, 688, 691, 692, 710, 714, 721, 725, 728, 729, 747, 751, 758, 762, 765, 766, 795, 798, 799, 800, 803, 804, 805, 808, 812, 813, 814, 818, 819, 828, 829, 830, 838, 847, 856, 865, 874, 883, 892, 901, 910, 937, 938, 939, 942, 960, 969, 970, 980, 991, 994, 997, 1000, 1004, 1005, 1014, 1015, 1019, 1020], "assignments": [180, 227, 248, 285, 405, 428, 455, 466, 471, 500, 504, 541, 581, 622, 648, 672, 683, 709, 720, 746, 757, 917, 964, 1011], "loops": [213, 369, 545, 788, 968], "conditionals": [34, 38, 42, 43, 49, 50, 52, 53, 55, 56, 59, 60, 67, 69, 71, 73, 75, 77, 79, 81, 83, 84, 93, 95, 96, 97, 99, 105, 114, 119, 122, 127, 130, 133, 136, 139, 142, 145, 148, 151, 153, 159, 165, 169, 178, 181, 185, 191, 195, 201, 204, 208, 217, 221, 223, 225, 229, 230, 234, 237, 241, 245, 246, 247, 249, 258, 262, 267, 269, 271, 277, 280, 282, 284, 286, 290, 293, 295, 297, 299, 305, 308, 310, 312, 314, 323, 326, 328, 330, 336, 339, 341, 345, 349, 352, 354, 361, 366, 368, 372, 379, 387, 388, 390, 392, 395, 396, 397, 401, 402, 404, 406, 414, 417, 419, 420, 421, 424, 429, 437, 440, 442, 443, 444, 447, 456, 459, 461, 462, 464, 467, 469, 472, 474, 478, 481, 484, 486, 487, 489, 490, 491, 492, 496, 497, 499, 501, 503, 505, 509, 511, 513, 519, 522, 524, 526, 530, 539, 542, 549, 553, 555, 557, 560, 564, 568, 571, 573, 576, 577, 579, 580, 582, 592, 593, 598, 599, 604, 606, 608, 614, 617, 619, 621, 623, 626, 628, 630, 632, 634, 640, 643, 645, 647, 650, 651, 654, 656, 658, 660, 662, 668, 671, 674, 675, 679, 682, 685, 686, 689, 693, 695, 697, 699, 705, 708, 711, 712, 716, 719, 722, 723, 726, 730, 732, 734, 736, 742, 745, 748, 749, 753, 756, 759, 760, 763, 767, 769, 771, 773, 779, 784, 787, 792, 796, 801, 806, 809, 811, 815, 817, 820, 821, 822, 826, 827, 831, 832, 833, 834, 835, 836, 839, 841, 842, 843, 844, 845, 848, 850, 851, 852, 853, 854, 857, 859, 860, 861, 862, 863, 866, 868, 869, 870, 871, 872, 875, 877, 878, 879, 880, 881, 884, 886, 887, 888, 889, 890, 893, 895, 896, 897, 898, 899, 902, 904, 905, 906, 907, 908, 911, 913, 914, 918, 920, 922, 924, 926, 932, 935, 936, 940, 947, 953, 961, 963, 965, 971, 974, 978, 982, 985, 987, 989, 992, 995, 996, 998, 999, 1001, 1002, 1003, 1006, 1008, 1010, 1012, 1016, 1017, 1021, 1023, 1029, 1034], "returns": [266, 294, 325, 463, 508, 603, 629, 657, 694, 731, 768, 837, 846, 855, 864, 873, 882, 891, 900, 909, 921, 952, 1009, 1022, 1033], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 26, 35, 126, 129, 132, 135, 138, 141, 144, 147, 150, 179, 183, 219, 252, 263, 265, 324, 454, 483, 507, 540, 544, 551, 585, 600, 602, 794, 807, 823, 825, 948, 949, 951, 967], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 152, "universal_type": "function", "name": "unknown", "text_snippet": "static wstring_t** section_create_stringmap(const uint8_t* data) {\n\tuint32_t count = ((uint32_t*)dat"}, {"node_id": 158, "universal_type": "function", "name": "unknown", "text_snippet": "section_create_stringmap(const uint8_t* data)"}, {"node_id": 268, "universal_type": "function", "name": "unknown", "text_snippet": "static vm_loader_error_t section_loader_progmem(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);"}, {"node_id": 270, "universal_type": "function", "name": "unknown", "text_snippet": "section_loader_progmem(const uint8_t* data, uint32_t size)"}, {"node_id": 296, "universal_type": "function", "name": "unknown", "text_snippet": "static vm_loader_error_t section_loader_shift(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);\n\t"}, {"node_id": 298, "universal_type": "function", "name": "unknown", "text_snippet": "section_loader_shift(const uint8_t* data, uint32_t size)"}, {"node_id": 327, "universal_type": "function", "name": "unknown", "text_snippet": "static vm_loader_error_t section_loader_object(const uint8_t* data, uint32_t size) {\n\tvm_loader_obje"}, {"node_id": 329, "universal_type": "function", "name": "unknown", "text_snippet": "section_loader_object(const uint8_t* data, uint32_t size)"}, {"node_id": 510, "universal_type": "function", "name": "unknown", "text_snippet": "static vm_loader_error_t section_loader_string(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);\n"}, {"node_id": 512, "universal_type": "function", "name": "unknown", "text_snippet": "section_loader_string(const uint8_t* data, uint32_t size)"}, {"node_id": 605, "universal_type": "function", "name": "unknown", "text_snippet": "static vm_loader_error_t section_loader_extern(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);\n"}, {"node_id": 607, "universal_type": "function", "name": "unknown", "text_snippet": "section_loader_extern(const uint8_t* data, uint32_t size)"}, {"node_id": 631, "universal_type": "function", "name": "unknown", "text_snippet": "static vm_loader_error_t section_loader_sym_string(const uint8_t* data, uint32_t size) {\n\tUNUSED(siz"}, {"node_id": 633, "universal_type": "function", "name": "unknown", "text_snippet": "section_loader_sym_string(const uint8_t* data, uint32_t size)"}, {"node_id": 659, "universal_type": "function", "name": "unknown", "text_snippet": "static vm_loader_error_t section_loader_sym_file(const uint8_t* data, uint32_t size) {\n\tvm_symbols.f"}, {"node_id": 661, "universal_type": "function", "name": "unknown", "text_snippet": "section_loader_sym_file(const uint8_t* data, uint32_t size)"}, {"node_id": 696, "universal_type": "function", "name": "unknown", "text_snippet": "static vm_loader_error_t section_loader_sym_func(const uint8_t* data, uint32_t size) {\n\tvm_symbols.f"}, {"node_id": 698, "universal_type": "function", "name": "unknown", "text_snippet": "section_loader_sym_func(const uint8_t* data, uint32_t size)"}, {"node_id": 733, "universal_type": "function", "name": "unknown", "text_snippet": "static vm_loader_error_t section_loader_sym_line(const uint8_t* data, uint32_t size) {\n\tvm_symbols.l"}, {"node_id": 735, "universal_type": "function", "name": "unknown", "text_snippet": "section_loader_sym_line(const uint8_t* data, uint32_t size)"}, {"node_id": 770, "universal_type": "function", "name": "unknown", "text_snippet": "static vm_loader_error_t section_loader_dispatch(const char* name, const uint8_t* data, uint32_t siz"}, {"node_id": 772, "universal_type": "function", "name": "unknown", "text_snippet": "section_loader_dispatch(const char* name, const uint8_t* data, uint32_t size)"}, {"node_id": 923, "universal_type": "function", "name": "unknown", "text_snippet": "vm_loader_error_t vm_loader_load(const uint8_t* data, uint32_t size) {\n\tif (strncmp((char*)data, \"AS"}, {"node_id": 925, "universal_type": "function", "name": "unknown", "text_snippet": "vm_loader_load(const uint8_t* data, uint32_t size)"}, {"node_id": 1024, "universal_type": "function", "name": "unknown", "text_snippet": "const void* vm_loader_get_error_data(void) {\n\treturn vm_loader_error_data;\n}"}, {"node_id": 1028, "universal_type": "function", "name": "unknown", "text_snippet": "vm_loader_get_error_data(void)"}], "class_declarations": [{"node_id": 29, "universal_type": "class", "name": "{", "text_snippet": "struct {\n\tchar name[16];\n\tuint32_t size;\n\tuint8_t data[];\n}"}, {"node_id": 30, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 46, "universal_type": "class", "name": "{", "text_snippet": "struct {\n\tvm_type_t type;\n\tvm_mmid_t name;\n\tvm_mmid_t parent;\n\tuint32_t code;\n}"}, {"node_id": 47, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 87, "universal_type": "class", "name": "{", "text_snippet": "struct {\n\tconst char *const name;\n\tconst section_type_t type;\n}"}, {"node_id": 88, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <string.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 \"vm_loader.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"vm.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"vm_util.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"vm_extern.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"vm_hashmap.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"vm_string.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"vm_symbols.h\"\n"}, {"node_id": 25, "text": "#include"}]}, "original_source_code": "#include <string.h>\n#include <stdlib.h>\n#include \"vm_loader.h\"\n#include \"vm.h\"\n#include \"vm_util.h\"\n#include \"vm_extern.h\"\n#include \"vm_hashmap.h\"\n#include \"vm_string.h\"\n#include \"vm_symbols.h\"\n\ntypedef struct {\n\tchar name[16];\n\tuint32_t size;\n\tuint8_t data[];\n} vm_loader_section_t;\n\ntypedef struct {\n\tvm_type_t type;\n\tvm_mmid_t name;\n\tvm_mmid_t parent;\n\tuint32_t code;\n} vm_loader_object_t;\n\ntypedef enum {\n\tSECTION_PROGMEM,\n\tSECTION_SHIFT,\n\tSECTION_OBJECT,\n\tSECTION_STRING,\n\tSECTION_EXTERN,\n\tSECTION_SYM_STRING,\n\tSECTION_SYM_FILE,\n\tSECTION_SYM_FUNC,\n\tSECTION_SYM_LINE\n} section_type_t;\n\ntypedef struct {\n\tconst char *const name;\n\tconst section_type_t type;\n} section_loader_def_t;\n\nstatic wstring_t** externs = NULL;\nconst void* vm_loader_error_data = NULL;\n\nconst section_loader_def_t section_name_map[] = {\n\t{\"PROGMEM\", SECTION_PROGMEM},\n\t{\"SHIFT\", SECTION_SHIFT},\n\t{\"OBJECT\", SECTION_OBJECT},\n\t{\"STRING\", SECTION_STRING},\n\t{\"EXTERN\", SECTION_EXTERN},\n\t{\"SYM_STRING\", SECTION_SYM_STRING},\n\t{\"SYM_FILE\", SECTION_SYM_FILE},\n\t{\"SYM_FUNC\", SECTION_SYM_FUNC},\n\t{\"SYM_LINE\", SECTION_SYM_LINE},\n};\n\nstatic wstring_t** section_create_stringmap(const uint8_t* data) {\n\tuint32_t count = ((uint32_t*)data)[0];\n\tdata += 4;\n\twstring_t** map = (wstring_t**)malloc(count * sizeof(wstring_t**));\n\tfor (uint32_t i = 0; i < count; i++) {\n\t\tmap[i] = (wstring_t*)data;\n\t\tuint32_t size = map[i]->size;\n\t\tdata += 4 + ((size + (size&1)) * 2);\n\t}\n\treturn map;\n}\n\nstatic vm_loader_error_t section_loader_progmem(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);\n\tvm_progmem = (vm_opcode_t*)data;\n\treturn VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_shift(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);\n\tvm_memmap_set_offset(((uint32_t*)data)[0]);\n\treturn VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_object(const uint8_t* data, uint32_t size) {\n\tvm_loader_object_t* objects = (vm_loader_object_t*)data;\n\tvm_loader_object_t* end = (vm_loader_object_t*)(data + size);\n\twhile (objects < end) {\n\t\tvoid* address = (void*)objects->code;\n\t\tvm_type_t type = objects->type;\n\t\tif (objects->type == VM_EXTERN_T) {\n\t\t\taddress = (void*)vm_extern_native_resolve(externs[objects->code]);\n\t\t\tif (address == NULL) {\n\t\t\t\taddress = (void*)vm_extern_resolve(externs[objects->code]);\n\t\t\t\tif (address == (void*)0xFFFFFFFF) {\n\t\t\t\t\tvm_loader_error_data = externs[objects->code];\n\t\t\t\t\treturn VM_LOADER_ERROR_EXTERN;\n\t\t\t\t} else {\n\t\t\t\t\ttype = VM_EXTERN_T;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttype = VM_NATIVE_T;\n\t\t\t}\n\t\t}\n\t\tuint32_t mmid = vm_hashmap_create(8, type, objects->name, objects->parent, address);\n\t\tif (objects->parent == MMID_NULL) {\n\t\t\tvm_root = mmid;\n\t\t}\n\t\tobjects += 1;\n\t}\n\treturn VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_string(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);\n\tuint32_t count = ((uint32_t*)data)[0];\n\tdata += 4;\n\tfor (uint32_t i = 0; i < count; i++) {\n\t\twstring_t* str = (wstring_t*)data;\n\t\tvm_string_insert(str->data, str->size);\n\t\tdata += 4 + ((str->size + (str->size&1)) * 2);\n\t}\n\treturn VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_extern(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);\n\texterns = section_create_stringmap(data);\n\treturn VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_sym_string(const uint8_t* data, uint32_t size) {\n\tUNUSED(size);\n\tvm_symbols.strings = section_create_stringmap(data);\n\treturn VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_sym_file(const uint8_t* data, uint32_t size) {\n\tvm_symbols.files = (vm_symbols_entry_t*)data;\n\tvm_symbols.files_count = size / sizeof(vm_symbols_entry_t);\n\treturn VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_sym_func(const uint8_t* data, uint32_t size) {\n\tvm_symbols.functions = (vm_symbols_entry_t*)data;\n\tvm_symbols.functions_count = size / sizeof(vm_symbols_entry_t);\n\treturn VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_sym_line(const uint8_t* data, uint32_t size) {\n\tvm_symbols.lines = (vm_symbols_entry_t*)data;\n\tvm_symbols.lines_count = size / sizeof(vm_symbols_entry_t);\n\treturn VM_LOADER_ERROR_NONE;\n}\n\nstatic vm_loader_error_t section_loader_dispatch(const char* name, const uint8_t* data, uint32_t size) {\n\tfor (uint32_t i = 0; i < sizeof(section_name_map) / sizeof(section_name_map[0]); i++) {\n\t\tif (strncmp(name, section_name_map[i].name, 16) == 0) {\n\t\t\tswitch (section_name_map[i].type) {\n\t\t\t\tcase SECTION_PROGMEM:\n\t\t\t\t\treturn section_loader_progmem(data, size);\n\t\t\t\tcase SECTION_SHIFT:\n\t\t\t\t\treturn section_loader_shift(data, size);\n\t\t\t\tcase SECTION_OBJECT:\n\t\t\t\t\treturn section_loader_object(data, size);\n\t\t\t\tcase SECTION_STRING:\n\t\t\t\t\treturn section_loader_string(data, size);\n\t\t\t\tcase SECTION_EXTERN:\n\t\t\t\t\treturn section_loader_extern(data, size);\n\t\t\t\tcase SECTION_SYM_STRING:\n\t\t\t\t\treturn section_loader_sym_string(data, size);\n\t\t\t\tcase SECTION_SYM_FILE:\n\t\t\t\t\treturn section_loader_sym_file(data, size);\n\t\t\t\tcase SECTION_SYM_FUNC:\n\t\t\t\t\treturn section_loader_sym_func(data, size);\n\t\t\t\tcase SECTION_SYM_LINE:\n\t\t\t\t\treturn section_loader_sym_line(data, size);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\tvm_loader_error_data = name;\n\treturn VM_LOADER_ERROR_SECTION;\n}\n\nvm_loader_error_t vm_loader_load(const uint8_t* data, uint32_t size) {\n\tif (strncmp((char*)data, \"ASB\", 4) != 0) {\n\t\treturn VM_LOADER_ERROR_MAGICDWORD;\n\t}\n\tconst uint8_t* end = data + size;\n\tdata += 4;\n\twhile (data < end) {\n\t\tconst vm_loader_section_t* section = (vm_loader_section_t*)data;\n\t\tvm_loader_error_t ret = section_loader_dispatch(section->name, section->data, section->size);\n\t\tif (ret != VM_LOADER_ERROR_NONE) {\n\t\t\treturn ret;\n\t\t}\n\t\tdata += section->size + sizeof(vm_loader_section_t);\n\t}\n\treturn VM_LOADER_ERROR_NONE;\n}\n\nconst void* vm_loader_get_error_data(void) {\n\treturn vm_loader_error_data;\n}\n"}
4
c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "stringList.h" /////////////////////////// // this list is a sorted list of strings // every node contains a string stringList createStringNode(char *str){ // create a node of the list for the given string stringList newnode=(stringList)malloc(sizeof(node)); newnode->string=(char *)malloc(sizeof(char)*(strlen(str)+1)); strcpy(newnode->string,str); newnode->next=NULL; return newnode; } stringList initializeStringList(){ // initialize list return NULL; } // stringList insertGetString(stringList list,char *str,char **returnString){ // // this function searches the given country, if it exists returns a pointer to the string of the country // // if it does not exist, a new node is created, the new country is inserted to the list and a pointer to the string is returned // if(list==NULL){ // if list is emtry // stringList newnode=createStringNode(str); // (*returnString)=newnode->string; // return newnode; // }else{ // stringList prev=NULL; // stringList origin=list; // while(list!=NULL){ //traverse the list // if(strcmp(list->string,str)==0){ // if country is found // (*returnString)=list->string; //return a pointer to the string // return origin; // } // prev=list; // list=list->next; // } // // if country does not exist // stringList newnode=createStringNode(str); //create a new node for this country // (*returnString)=newnode->string; //return a pointer to the string // prev->next=newnode; // attach it to the end of the list // return origin; // } // } stringList insertString(stringList list,char *str){ // insert a string to the list, if the string already exists it is not inserted if(list==NULL){ // if list is emtry stringList newnode=createStringNode(str); return newnode; }else{ stringList prev=NULL; stringList origin=list; while(list!=NULL){ //traverse the list if(strcmp(list->string,str)==0){ // if the same string already exists in the list return origin; } if(strcmp(list->string,str)>0){ // find the "place" that the new string will be inserted in order to keep the list sorted stringList newnode=createStringNode(str); //create a new node for this string if(prev==NULL){ // if it should be inserted at the start of the list newnode->next=origin; // attach the previous first node to the new node return newnode; // return the new node as the start of the list }else{ // if it should be inserted somewhere in the middle of the list stringList temp=prev->next; prev->next=newnode; // attach it to the previous node newnode->next=temp; return origin; } } prev=list; list=list->next; } // if it should be inserted at the end of the list stringList newnode=createStringNode(str); //create a new node for this country prev->next=newnode; // attach it to the end of the list return origin; } } int stringExists(stringList list,char *str){ // this function searches the given string, if it exists returns 1 else it returns 0 if(list==NULL){ // if list is empty return 0; }else{ while(list!=NULL){ //traverse the list if(strcmp(list->string,str)==0){ // if country is found return 1; } list=list->next; } return 0; } } void deleteStringList(stringList list){ // delete (free) the list stringList next; while(list!=NULL){ next=list->next; free(list->string); free(list); list=next; } } /////////////////////////////////
35.02
103
(translation_unit) "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n#include "stringList.h"\n\n\n///////////////////////////\n// this list is a sorted list of strings\n// every node contains a string\n\n\nstringList createStringNode(char *str){ // create a node of the list for the given string\n stringList newnode=(stringList)malloc(sizeof(node));\n newnode->string=(char *)malloc(sizeof(char)*(strlen(str)+1));\n strcpy(newnode->string,str);\n newnode->next=NULL;\n return newnode;\n}\n\nstringList initializeStringList(){ // initialize list\n return NULL;\n}\n\n// stringList insertGetString(stringList list,char *str,char **returnString){\n// // this function searches the given country, if it exists returns a pointer to the string of the country\n// // if it does not exist, a new node is created, the new country is inserted to the list and a pointer to the string is returned\n// if(list==NULL){ // if list is emtry\n// stringList newnode=createStringNode(str);\n// (*returnString)=newnode->string;\n// return newnode;\n// }else{\n// stringList prev=NULL;\n// stringList origin=list;\n// while(list!=NULL){ //traverse the list\n// if(strcmp(list->string,str)==0){ // if country is found\n// (*returnString)=list->string; //return a pointer to the string\n// return origin;\n// }\n// prev=list;\n// list=list->next;\n// }\n// // if country does not exist\n// stringList newnode=createStringNode(str); //create a new node for this country\n// (*returnString)=newnode->string; //return a pointer to the string\n// prev->next=newnode; // attach it to the end of the list\n// return origin;\n// }\n// }\n\nstringList insertString(stringList list,char *str){\n // insert a string to the list, if the string already exists it is not inserted\n if(list==NULL){ // if list is emtry\n stringList newnode=createStringNode(str);\n return newnode;\n }else{\n stringList prev=NULL;\n stringList origin=list;\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }\n if(strcmp(list->string,str)>0){ // find the "place" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }\n prev=list;\n list=list->next;\n }\n // if it should be inserted at the end of the list\n stringList newnode=createStringNode(str); //create a new node for this country\n prev->next=newnode; // attach it to the end of the list\n return origin;\n }\n}\n\nint stringExists(stringList list,char *str){\n // this function searches the given string, if it exists returns 1 else it returns 0\n if(list==NULL){ // if list is empty\n return 0;\n }else{\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }\n list=list->next;\n }\n return 0;\n }\n}\n\n\nvoid deleteStringList(stringList list){ // delete (free) the list\n stringList next;\n while(list!=NULL){\n next=list->next;\n free(list->string);\n free(list);\n list=next;\n }\n}\n/////////////////////////////////\n" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <string.h>\n" (#include) "#include" (system_lib_string) "<string.h>" (preproc_include) "#include <time.h>\n" (#include) "#include" (system_lib_string) "<time.h>" (preproc_include) "#include "stringList.h"\n" (#include) "#include" (string_literal) ""stringList.h"" (") """ (string_content) "stringList.h" (") """ (comment) "///////////////////////////" (comment) "// this list is a sorted list of strings" (comment) "// every node contains a string" (function_definition) "stringList createStringNode(char *str){ // create a node of the list for the given string\n stringList newnode=(stringList)malloc(sizeof(node));\n newnode->string=(char *)malloc(sizeof(char)*(strlen(str)+1));\n strcpy(newnode->string,str);\n newnode->next=NULL;\n return newnode;\n}" (type_identifier) "stringList" (function_declarator) "createStringNode(char *str)" (identifier) "createStringNode" (parameter_list) "(char *str)" (() "(" (parameter_declaration) "char *str" (primitive_type) "char" (pointer_declarator) "*str" (*) "*" (identifier) "str" ()) ")" (compound_statement) "{ // create a node of the list for the given string\n stringList newnode=(stringList)malloc(sizeof(node));\n newnode->string=(char *)malloc(sizeof(char)*(strlen(str)+1));\n strcpy(newnode->string,str);\n newnode->next=NULL;\n return newnode;\n}" ({) "{" (comment) "// create a node of the list for the given string" (declaration) "stringList newnode=(stringList)malloc(sizeof(node));" (type_identifier) "stringList" (init_declarator) "newnode=(stringList)malloc(sizeof(node))" (identifier) "newnode" (=) "=" (cast_expression) "(stringList)malloc(sizeof(node))" (() "(" (type_descriptor) "stringList" (type_identifier) "stringList" ()) ")" (call_expression) "malloc(sizeof(node))" (identifier) "malloc" (argument_list) "(sizeof(node))" (() "(" (sizeof_expression) "sizeof(node)" (sizeof) "sizeof" (parenthesized_expression) "(node)" (() "(" (identifier) "node" ()) ")" ()) ")" (;) ";" (expression_statement) "newnode->string=(char *)malloc(sizeof(char)*(strlen(str)+1));" (assignment_expression) "newnode->string=(char *)malloc(sizeof(char)*(strlen(str)+1))" (field_expression) "newnode->string" (identifier) "newnode" (->) "->" (field_identifier) "string" (=) "=" (cast_expression) "(char *)malloc(sizeof(char)*(strlen(str)+1))" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(sizeof(char)*(strlen(str)+1))" (identifier) "malloc" (argument_list) "(sizeof(char)*(strlen(str)+1))" (() "(" (binary_expression) "sizeof(char)*(strlen(str)+1)" (sizeof_expression) "sizeof(char)" (sizeof) "sizeof" (() "(" (type_descriptor) "char" (primitive_type) "char" ()) ")" (*) "*" (parenthesized_expression) "(strlen(str)+1)" (() "(" (binary_expression) "strlen(str)+1" (call_expression) "strlen(str)" (identifier) "strlen" (argument_list) "(str)" (() "(" (identifier) "str" ()) ")" (+) "+" (number_literal) "1" ()) ")" ()) ")" (;) ";" (expression_statement) "strcpy(newnode->string,str);" (call_expression) "strcpy(newnode->string,str)" (identifier) "strcpy" (argument_list) "(newnode->string,str)" (() "(" (field_expression) "newnode->string" (identifier) "newnode" (->) "->" (field_identifier) "string" (,) "," (identifier) "str" ()) ")" (;) ";" (expression_statement) "newnode->next=NULL;" (assignment_expression) "newnode->next=NULL" (field_expression) "newnode->next" (identifier) "newnode" (->) "->" (field_identifier) "next" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (return_statement) "return newnode;" (return) "return" (identifier) "newnode" (;) ";" (}) "}" (function_definition) "stringList initializeStringList(){ // initialize list\n return NULL;\n}" (type_identifier) "stringList" (function_declarator) "initializeStringList()" (identifier) "initializeStringList" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ // initialize list\n return NULL;\n}" ({) "{" (comment) "// initialize list" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (comment) "// stringList insertGetString(stringList list,char *str,char **returnString){" (comment) "// // this function searches the given country, if it exists returns a pointer to the string of the country" (comment) "// // if it does not exist, a new node is created, the new country is inserted to the list and a pointer to the string is returned" (comment) "// if(list==NULL){ // if list is emtry" (comment) "// stringList newnode=createStringNode(str);" (comment) "// (*returnString)=newnode->string;" (comment) "// return newnode;" (comment) "// }else{" (comment) "// stringList prev=NULL;" (comment) "// stringList origin=list;" (comment) "// while(list!=NULL){ //traverse the list" (comment) "// if(strcmp(list->string,str)==0){ // if country is found" (comment) "// (*returnString)=list->string; //return a pointer to the string" (comment) "// return origin;" (comment) "// }" (comment) "// prev=list;" (comment) "// list=list->next;" (comment) "// }" (comment) "// // if country does not exist" (comment) "// stringList newnode=createStringNode(str); //create a new node for this country" (comment) "// (*returnString)=newnode->string; //return a pointer to the string" (comment) "// prev->next=newnode; // attach it to the end of the list" (comment) "// return origin;" (comment) "// }" (comment) "// }" (function_definition) "stringList insertString(stringList list,char *str){\n // insert a string to the list, if the string already exists it is not inserted\n if(list==NULL){ // if list is emtry\n stringList newnode=createStringNode(str);\n return newnode;\n }else{\n stringList prev=NULL;\n stringList origin=list;\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }\n if(strcmp(list->string,str)>0){ // find the "place" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }\n prev=list;\n list=list->next;\n }\n // if it should be inserted at the end of the list\n stringList newnode=createStringNode(str); //create a new node for this country\n prev->next=newnode; // attach it to the end of the list\n return origin;\n }\n}" (type_identifier) "stringList" (function_declarator) "insertString(stringList list,char *str)" (identifier) "insertString" (parameter_list) "(stringList list,char *str)" (() "(" (parameter_declaration) "stringList list" (type_identifier) "stringList" (identifier) "list" (,) "," (parameter_declaration) "char *str" (primitive_type) "char" (pointer_declarator) "*str" (*) "*" (identifier) "str" ()) ")" (compound_statement) "{\n // insert a string to the list, if the string already exists it is not inserted\n if(list==NULL){ // if list is emtry\n stringList newnode=createStringNode(str);\n return newnode;\n }else{\n stringList prev=NULL;\n stringList origin=list;\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }\n if(strcmp(list->string,str)>0){ // find the "place" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }\n prev=list;\n list=list->next;\n }\n // if it should be inserted at the end of the list\n stringList newnode=createStringNode(str); //create a new node for this country\n prev->next=newnode; // attach it to the end of the list\n return origin;\n }\n}" ({) "{" (comment) "// insert a string to the list, if the string already exists it is not inserted" (if_statement) "if(list==NULL){ // if list is emtry\n stringList newnode=createStringNode(str);\n return newnode;\n }else{\n stringList prev=NULL;\n stringList origin=list;\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }\n if(strcmp(list->string,str)>0){ // find the "place" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }\n prev=list;\n list=list->next;\n }\n // if it should be inserted at the end of the list\n stringList newnode=createStringNode(str); //create a new node for this country\n prev->next=newnode; // attach it to the end of the list\n return origin;\n }" (if) "if" (parenthesized_expression) "(list==NULL)" (() "(" (binary_expression) "list==NULL" (identifier) "list" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{ // if list is emtry\n stringList newnode=createStringNode(str);\n return newnode;\n }" ({) "{" (comment) "// if list is emtry" (declaration) "stringList newnode=createStringNode(str);" (type_identifier) "stringList" (init_declarator) "newnode=createStringNode(str)" (identifier) "newnode" (=) "=" (call_expression) "createStringNode(str)" (identifier) "createStringNode" (argument_list) "(str)" (() "(" (identifier) "str" ()) ")" (;) ";" (return_statement) "return newnode;" (return) "return" (identifier) "newnode" (;) ";" (}) "}" (else_clause) "else{\n stringList prev=NULL;\n stringList origin=list;\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }\n if(strcmp(list->string,str)>0){ // find the "place" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }\n prev=list;\n list=list->next;\n }\n // if it should be inserted at the end of the list\n stringList newnode=createStringNode(str); //create a new node for this country\n prev->next=newnode; // attach it to the end of the list\n return origin;\n }" (else) "else" (compound_statement) "{\n stringList prev=NULL;\n stringList origin=list;\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }\n if(strcmp(list->string,str)>0){ // find the "place" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }\n prev=list;\n list=list->next;\n }\n // if it should be inserted at the end of the list\n stringList newnode=createStringNode(str); //create a new node for this country\n prev->next=newnode; // attach it to the end of the list\n return origin;\n }" ({) "{" (declaration) "stringList prev=NULL;" (type_identifier) "stringList" (init_declarator) "prev=NULL" (identifier) "prev" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (declaration) "stringList origin=list;" (type_identifier) "stringList" (init_declarator) "origin=list" (identifier) "origin" (=) "=" (identifier) "list" (;) ";" (while_statement) "while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }\n if(strcmp(list->string,str)>0){ // find the "place" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }\n prev=list;\n list=list->next;\n }" (while) "while" (parenthesized_expression) "(list!=NULL)" (() "(" (binary_expression) "list!=NULL" (identifier) "list" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{ //traverse the list\n if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }\n if(strcmp(list->string,str)>0){ // find the "place" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }\n prev=list;\n list=list->next;\n }" ({) "{" (comment) "//traverse the list" (if_statement) "if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }" (if) "if" (parenthesized_expression) "(strcmp(list->string,str)==0)" (() "(" (binary_expression) "strcmp(list->string,str)==0" (call_expression) "strcmp(list->string,str)" (identifier) "strcmp" (argument_list) "(list->string,str)" (() "(" (field_expression) "list->string" (identifier) "list" (->) "->" (field_identifier) "string" (,) "," (identifier) "str" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{ // if the same string already exists in the list\n return origin;\n }" ({) "{" (comment) "// if the same string already exists in the list" (return_statement) "return origin;" (return) "return" (identifier) "origin" (;) ";" (}) "}" (if_statement) "if(strcmp(list->string,str)>0){ // find the "place" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }" (if) "if" (parenthesized_expression) "(strcmp(list->string,str)>0)" (() "(" (binary_expression) "strcmp(list->string,str)>0" (call_expression) "strcmp(list->string,str)" (identifier) "strcmp" (argument_list) "(list->string,str)" (() "(" (field_expression) "list->string" (identifier) "list" (->) "->" (field_identifier) "string" (,) "," (identifier) "str" ()) ")" (>) ">" (number_literal) "0" ()) ")" (compound_statement) "{ // find the "place" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }" ({) "{" (comment) "// find the "place" that the new string will be inserted in order to keep the list sorted" (declaration) "stringList newnode=createStringNode(str);" (type_identifier) "stringList" (init_declarator) "newnode=createStringNode(str)" (identifier) "newnode" (=) "=" (call_expression) "createStringNode(str)" (identifier) "createStringNode" (argument_list) "(str)" (() "(" (identifier) "str" ()) ")" (;) ";" (comment) "//create a new node for this string" (if_statement) "if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }" (if) "if" (parenthesized_expression) "(prev==NULL)" (() "(" (binary_expression) "prev==NULL" (identifier) "prev" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }" ({) "{" (comment) "// if it should be inserted at the start of the list" (expression_statement) "newnode->next=origin;" (assignment_expression) "newnode->next=origin" (field_expression) "newnode->next" (identifier) "newnode" (->) "->" (field_identifier) "next" (=) "=" (identifier) "origin" (;) ";" (comment) "// attach the previous first node to the new node" (return_statement) "return newnode;" (return) "return" (identifier) "newnode" (;) ";" (comment) "// return the new node as the start of the list" (}) "}" (else_clause) "else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }" (else) "else" (compound_statement) "{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }" ({) "{" (comment) "// if it should be inserted somewhere in the middle of the list" (declaration) "stringList temp=prev->next;" (type_identifier) "stringList" (init_declarator) "temp=prev->next" (identifier) "temp" (=) "=" (field_expression) "prev->next" (identifier) "prev" (->) "->" (field_identifier) "next" (;) ";" (expression_statement) "prev->next=newnode;" (assignment_expression) "prev->next=newnode" (field_expression) "prev->next" (identifier) "prev" (->) "->" (field_identifier) "next" (=) "=" (identifier) "newnode" (;) ";" (comment) "// attach it to the previous node" (expression_statement) "newnode->next=temp;" (assignment_expression) "newnode->next=temp" (field_expression) "newnode->next" (identifier) "newnode" (->) "->" (field_identifier) "next" (=) "=" (identifier) "temp" (;) ";" (return_statement) "return origin;" (return) "return" (identifier) "origin" (;) ";" (}) "}" (}) "}" (expression_statement) "prev=list;" (assignment_expression) "prev=list" (identifier) "prev" (=) "=" (identifier) "list" (;) ";" (expression_statement) "list=list->next;" (assignment_expression) "list=list->next" (identifier) "list" (=) "=" (field_expression) "list->next" (identifier) "list" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (comment) "// if it should be inserted at the end of the list" (declaration) "stringList newnode=createStringNode(str);" (type_identifier) "stringList" (init_declarator) "newnode=createStringNode(str)" (identifier) "newnode" (=) "=" (call_expression) "createStringNode(str)" (identifier) "createStringNode" (argument_list) "(str)" (() "(" (identifier) "str" ()) ")" (;) ";" (comment) "//create a new node for this country" (expression_statement) "prev->next=newnode;" (assignment_expression) "prev->next=newnode" (field_expression) "prev->next" (identifier) "prev" (->) "->" (field_identifier) "next" (=) "=" (identifier) "newnode" (;) ";" (comment) "// attach it to the end of the list" (return_statement) "return origin;" (return) "return" (identifier) "origin" (;) ";" (}) "}" (}) "}" (function_definition) "int stringExists(stringList list,char *str){\n // this function searches the given string, if it exists returns 1 else it returns 0\n if(list==NULL){ // if list is empty\n return 0;\n }else{\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }\n list=list->next;\n }\n return 0;\n }\n}" (primitive_type) "int" (function_declarator) "stringExists(stringList list,char *str)" (identifier) "stringExists" (parameter_list) "(stringList list,char *str)" (() "(" (parameter_declaration) "stringList list" (type_identifier) "stringList" (identifier) "list" (,) "," (parameter_declaration) "char *str" (primitive_type) "char" (pointer_declarator) "*str" (*) "*" (identifier) "str" ()) ")" (compound_statement) "{\n // this function searches the given string, if it exists returns 1 else it returns 0\n if(list==NULL){ // if list is empty\n return 0;\n }else{\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }\n list=list->next;\n }\n return 0;\n }\n}" ({) "{" (comment) "// this function searches the given string, if it exists returns 1 else it returns 0" (if_statement) "if(list==NULL){ // if list is empty\n return 0;\n }else{\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }\n list=list->next;\n }\n return 0;\n }" (if) "if" (parenthesized_expression) "(list==NULL)" (() "(" (binary_expression) "list==NULL" (identifier) "list" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{ // if list is empty\n return 0;\n }" ({) "{" (comment) "// if list is empty" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (else_clause) "else{\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }\n list=list->next;\n }\n return 0;\n }" (else) "else" (compound_statement) "{\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }\n list=list->next;\n }\n return 0;\n }" ({) "{" (while_statement) "while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }\n list=list->next;\n }" (while) "while" (parenthesized_expression) "(list!=NULL)" (() "(" (binary_expression) "list!=NULL" (identifier) "list" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{ //traverse the list\n if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }\n list=list->next;\n }" ({) "{" (comment) "//traverse the list" (if_statement) "if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }" (if) "if" (parenthesized_expression) "(strcmp(list->string,str)==0)" (() "(" (binary_expression) "strcmp(list->string,str)==0" (call_expression) "strcmp(list->string,str)" (identifier) "strcmp" (argument_list) "(list->string,str)" (() "(" (field_expression) "list->string" (identifier) "list" (->) "->" (field_identifier) "string" (,) "," (identifier) "str" ()) ")" (==) "==" (number_literal) "0" ()) ")" (compound_statement) "{ // if country is found\n return 1;\n }" ({) "{" (comment) "// if country is found" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (expression_statement) "list=list->next;" (assignment_expression) "list=list->next" (identifier) "list" (=) "=" (field_expression) "list->next" (identifier) "list" (->) "->" (field_identifier) "next" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (}) "}" (function_definition) "void deleteStringList(stringList list){ // delete (free) the list\n stringList next;\n while(list!=NULL){\n next=list->next;\n free(list->string);\n free(list);\n list=next;\n }\n}" (primitive_type) "void" (function_declarator) "deleteStringList(stringList list)" (identifier) "deleteStringList" (parameter_list) "(stringList list)" (() "(" (parameter_declaration) "stringList list" (type_identifier) "stringList" (identifier) "list" ()) ")" (compound_statement) "{ // delete (free) the list\n stringList next;\n while(list!=NULL){\n next=list->next;\n free(list->string);\n free(list);\n list=next;\n }\n}" ({) "{" (comment) "// delete (free) the list" (declaration) "stringList next;" (type_identifier) "stringList" (identifier) "next" (;) ";" (while_statement) "while(list!=NULL){\n next=list->next;\n free(list->string);\n free(list);\n list=next;\n }" (while) "while" (parenthesized_expression) "(list!=NULL)" (() "(" (binary_expression) "list!=NULL" (identifier) "list" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n next=list->next;\n free(list->string);\n free(list);\n list=next;\n }" ({) "{" (expression_statement) "next=list->next;" (assignment_expression) "next=list->next" (identifier) "next" (=) "=" (field_expression) "list->next" (identifier) "list" (->) "->" (field_identifier) "next" (;) ";" (expression_statement) "free(list->string);" (call_expression) "free(list->string)" (identifier) "free" (argument_list) "(list->string)" (() "(" (field_expression) "list->string" (identifier) "list" (->) "->" (field_identifier) "string" ()) ")" (;) ";" (expression_statement) "free(list);" (call_expression) "free(list)" (identifier) "free" (argument_list) "(list)" (() "(" (identifier) "list" ()) ")" (;) ";" (expression_statement) "list=next;" (assignment_expression) "list=next" (identifier) "list" (=) "=" (identifier) "next" (;) ";" (}) "}" (}) "}" (comment) "/////////////////////////////////"
589
0
{"language": "c", "success": true, "metadata": {"lines": 103, "avg_line_length": 35.02, "nodes": 331, "errors": 0, "source_hash": "7c06b792181b07febdc13931d2eaa67a9ce5de641ce689219309f80b3f54b2df", "categorized_nodes": 239}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <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 <time.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": "<time.h>", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include \"stringList.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": "\"stringList.h\"", "parent": 12, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 23}}, {"id": 15, "type": "function_definition", "text": "stringList createStringNode(char *str){ // create a node of the list for the given string\n stringList newnode=(stringList)malloc(sizeof(node));\n newnode->string=(char *)malloc(sizeof(char)*(strlen(str)+1));\n strcpy(newnode->string,str);\n newnode->next=NULL;\n return newnode;\n}", "parent": null, "children": [16, 17], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "stringList", "parent": 15, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 10}}, {"id": 17, "type": "function_declarator", "text": "createStringNode(char *str)", "parent": 15, "children": [18, 19], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 38}}, {"id": 18, "type": "identifier", "text": "createStringNode", "parent": 17, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 27}}, {"id": 19, "type": "parameter_list", "text": "(char *str)", "parent": 17, "children": [20], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 38}}, {"id": 20, "type": "parameter_declaration", "text": "char *str", "parent": 19, "children": [21, 22], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 37}}, {"id": 21, "type": "primitive_type", "text": "char", "parent": 20, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 32}}, {"id": 22, "type": "pointer_declarator", "text": "*str", "parent": 20, "children": [23, 24], "start_point": {"row": 12, "column": 33}, "end_point": {"row": 12, "column": 37}}, {"id": 23, "type": "*", "text": "*", "parent": 22, "children": [], "start_point": {"row": 12, "column": 33}, "end_point": {"row": 12, "column": 34}}, {"id": 24, "type": "identifier", "text": "str", "parent": 22, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 37}}, {"id": 25, "type": "declaration", "text": "stringList newnode=(stringList)malloc(sizeof(node));", "parent": 15, "children": [26, 27], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 54}}, {"id": 26, "type": "type_identifier", "text": "stringList", "parent": 25, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 12}}, {"id": 27, "type": "init_declarator", "text": "newnode=(stringList)malloc(sizeof(node))", "parent": 25, "children": [28, 29, 30], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 53}}, {"id": 28, "type": "identifier", "text": "newnode", "parent": 27, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 20}}, {"id": 29, "type": "=", "text": "=", "parent": 27, "children": [], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 21}}, {"id": 30, "type": "cast_expression", "text": "(stringList)malloc(sizeof(node))", "parent": 27, "children": [31, 33], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 53}}, {"id": 31, "type": "type_descriptor", "text": "stringList", "parent": 30, "children": [32], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 32}}, {"id": 32, "type": "type_identifier", "text": "stringList", "parent": 31, "children": [], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 32}}, {"id": 33, "type": "call_expression", "text": "malloc(sizeof(node))", "parent": 30, "children": [34, 35], "start_point": {"row": 13, "column": 33}, "end_point": {"row": 13, "column": 53}}, {"id": 34, "type": "identifier", "text": "malloc", "parent": 33, "children": [], "start_point": {"row": 13, "column": 33}, "end_point": {"row": 13, "column": 39}}, {"id": 35, "type": "argument_list", "text": "(sizeof(node))", "parent": 33, "children": [36], "start_point": {"row": 13, "column": 39}, "end_point": {"row": 13, "column": 53}}, {"id": 36, "type": "sizeof_expression", "text": "sizeof(node)", "parent": 35, "children": [37], "start_point": {"row": 13, "column": 40}, "end_point": {"row": 13, "column": 52}}, {"id": 37, "type": "parenthesized_expression", "text": "(node)", "parent": 36, "children": [38], "start_point": {"row": 13, "column": 46}, "end_point": {"row": 13, "column": 52}}, {"id": 38, "type": "identifier", "text": "node", "parent": 37, "children": [], "start_point": {"row": 13, "column": 47}, "end_point": {"row": 13, "column": 51}}, {"id": 39, "type": "assignment_expression", "text": "newnode->string=(char *)malloc(sizeof(char)*(strlen(str)+1))", "parent": 15, "children": [40, 43, 44], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 62}}, {"id": 40, "type": "field_expression", "text": "newnode->string", "parent": 39, "children": [41, 42], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 17}}, {"id": 41, "type": "identifier", "text": "newnode", "parent": 40, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 9}}, {"id": 42, "type": "field_identifier", "text": "string", "parent": 40, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 17}}, {"id": 43, "type": "=", "text": "=", "parent": 39, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 18}}, {"id": 44, "type": "cast_expression", "text": "(char *)malloc(sizeof(char)*(strlen(str)+1))", "parent": 39, "children": [45, 49], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 14, "column": 62}}, {"id": 45, "type": "type_descriptor", "text": "char *", "parent": 44, "children": [46, 47], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 25}}, {"id": 46, "type": "primitive_type", "text": "char", "parent": 45, "children": [], "start_point": {"row": 14, "column": 19}, "end_point": {"row": 14, "column": 23}}, {"id": 47, "type": "abstract_pointer_declarator", "text": "*", "parent": 45, "children": [48], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 25}}, {"id": 48, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 25}}, {"id": 49, "type": "call_expression", "text": "malloc(sizeof(char)*(strlen(str)+1))", "parent": 44, "children": [50, 51], "start_point": {"row": 14, "column": 26}, "end_point": {"row": 14, "column": 62}}, {"id": 50, "type": "identifier", "text": "malloc", "parent": 49, "children": [], "start_point": {"row": 14, "column": 26}, "end_point": {"row": 14, "column": 32}}, {"id": 51, "type": "argument_list", "text": "(sizeof(char)*(strlen(str)+1))", "parent": 49, "children": [52], "start_point": {"row": 14, "column": 32}, "end_point": {"row": 14, "column": 62}}, {"id": 52, "type": "binary_expression", "text": "sizeof(char)*(strlen(str)+1)", "parent": 51, "children": [53, 56, 57], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 61}}, {"id": 53, "type": "sizeof_expression", "text": "sizeof(char)", "parent": 52, "children": [54], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 45}}, {"id": 54, "type": "type_descriptor", "text": "char", "parent": 53, "children": [55], "start_point": {"row": 14, "column": 40}, "end_point": {"row": 14, "column": 44}}, {"id": 55, "type": "primitive_type", "text": "char", "parent": 54, "children": [], "start_point": {"row": 14, "column": 40}, "end_point": {"row": 14, "column": 44}}, {"id": 56, "type": "*", "text": "*", "parent": 52, "children": [], "start_point": {"row": 14, "column": 45}, "end_point": {"row": 14, "column": 46}}, {"id": 57, "type": "parenthesized_expression", "text": "(strlen(str)+1)", "parent": 52, "children": [58], "start_point": {"row": 14, "column": 46}, "end_point": {"row": 14, "column": 61}}, {"id": 58, "type": "binary_expression", "text": "strlen(str)+1", "parent": 57, "children": [59, 63, 64], "start_point": {"row": 14, "column": 47}, "end_point": {"row": 14, "column": 60}}, {"id": 59, "type": "call_expression", "text": "strlen(str)", "parent": 58, "children": [60, 61], "start_point": {"row": 14, "column": 47}, "end_point": {"row": 14, "column": 58}}, {"id": 60, "type": "identifier", "text": "strlen", "parent": 59, "children": [], "start_point": {"row": 14, "column": 47}, "end_point": {"row": 14, "column": 53}}, {"id": 61, "type": "argument_list", "text": "(str)", "parent": 59, "children": [62], "start_point": {"row": 14, "column": 53}, "end_point": {"row": 14, "column": 58}}, {"id": 62, "type": "identifier", "text": "str", "parent": 61, "children": [], "start_point": {"row": 14, "column": 54}, "end_point": {"row": 14, "column": 57}}, {"id": 63, "type": "+", "text": "+", "parent": 58, "children": [], "start_point": {"row": 14, "column": 58}, "end_point": {"row": 14, "column": 59}}, {"id": 64, "type": "number_literal", "text": "1", "parent": 58, "children": [], "start_point": {"row": 14, "column": 59}, "end_point": {"row": 14, "column": 60}}, {"id": 65, "type": "call_expression", "text": "strcpy(newnode->string,str)", "parent": 15, "children": [66, 67], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 29}}, {"id": 66, "type": "identifier", "text": "strcpy", "parent": 65, "children": [], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 8}}, {"id": 67, "type": "argument_list", "text": "(newnode->string,str)", "parent": 65, "children": [68, 71], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 29}}, {"id": 68, "type": "field_expression", "text": "newnode->string", "parent": 67, "children": [69, 70], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 24}}, {"id": 69, "type": "identifier", "text": "newnode", "parent": 68, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 16}}, {"id": 70, "type": "field_identifier", "text": "string", "parent": 68, "children": [], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 24}}, {"id": 71, "type": "identifier", "text": "str", "parent": 67, "children": [], "start_point": {"row": 15, "column": 25}, "end_point": {"row": 15, "column": 28}}, {"id": 72, "type": "assignment_expression", "text": "newnode->next=NULL", "parent": 15, "children": [73, 76, 77], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 20}}, {"id": 73, "type": "field_expression", "text": "newnode->next", "parent": 72, "children": [74, 75], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 15}}, {"id": 74, "type": "identifier", "text": "newnode", "parent": 73, "children": [], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 9}}, {"id": 75, "type": "field_identifier", "text": "next", "parent": 73, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 15}}, {"id": 76, "type": "=", "text": "=", "parent": 72, "children": [], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 16}}, {"id": 77, "type": "null", "text": "NULL", "parent": 72, "children": [78], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 20}}, {"id": 78, "type": "NULL", "text": "NULL", "parent": 77, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 20}}, {"id": 79, "type": "return_statement", "text": "return newnode;", "parent": 15, "children": [80], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 17}}, {"id": 80, "type": "identifier", "text": "newnode", "parent": 79, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 16}}, {"id": 81, "type": "function_definition", "text": "stringList initializeStringList(){ // initialize list\n return NULL;\n}", "parent": null, "children": [82, 83], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 82, "type": "type_identifier", "text": "stringList", "parent": 81, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 10}}, {"id": 83, "type": "function_declarator", "text": "initializeStringList()", "parent": 81, "children": [84, 85], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 33}}, {"id": 84, "type": "identifier", "text": "initializeStringList", "parent": 83, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 31}}, {"id": 85, "type": "parameter_list", "text": "()", "parent": 83, "children": [], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 33}}, {"id": 86, "type": "return_statement", "text": "return NULL;", "parent": 81, "children": [87], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 14}}, {"id": 87, "type": "null", "text": "NULL", "parent": 86, "children": [88], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 13}}, {"id": 88, "type": "NULL", "text": "NULL", "parent": 87, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 13}}, {"id": 89, "type": "function_definition", "text": "stringList insertString(stringList list,char *str){\n // insert a string to the list, if the string already exists it is not inserted\n if(list==NULL){ // if list is emtry\n stringList newnode=createStringNode(str);\n return newnode;\n }else{\n stringList prev=NULL;\n stringList origin=list;\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }\n if(strcmp(list->string,str)>0){ // find the \"place\" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }\n prev=list;\n list=list->next;\n }\n // if it should be inserted at the end of the list\n stringList newnode=createStringNode(str); //create a new node for this country\n prev->next=newnode; // attach it to the end of the list\n return origin;\n }\n}", "parent": null, "children": [90, 91], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 82, "column": 1}}, {"id": 90, "type": "type_identifier", "text": "stringList", "parent": 89, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 10}}, {"id": 91, "type": "function_declarator", "text": "insertString(stringList list,char *str)", "parent": 89, "children": [92, 93], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 50}}, {"id": 92, "type": "identifier", "text": "insertString", "parent": 91, "children": [], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 23}}, {"id": 93, "type": "parameter_list", "text": "(stringList list,char *str)", "parent": 91, "children": [94, 97], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 50}}, {"id": 94, "type": "parameter_declaration", "text": "stringList list", "parent": 93, "children": [95, 96], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 39}}, {"id": 95, "type": "type_identifier", "text": "stringList", "parent": 94, "children": [], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 34}}, {"id": 96, "type": "identifier", "text": "list", "parent": 94, "children": [], "start_point": {"row": 50, "column": 35}, "end_point": {"row": 50, "column": 39}}, {"id": 97, "type": "parameter_declaration", "text": "char *str", "parent": 93, "children": [98, 99], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 49}}, {"id": 98, "type": "primitive_type", "text": "char", "parent": 97, "children": [], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 44}}, {"id": 99, "type": "pointer_declarator", "text": "*str", "parent": 97, "children": [100, 101], "start_point": {"row": 50, "column": 45}, "end_point": {"row": 50, "column": 49}}, {"id": 100, "type": "*", "text": "*", "parent": 99, "children": [], "start_point": {"row": 50, "column": 45}, "end_point": {"row": 50, "column": 46}}, {"id": 101, "type": "identifier", "text": "str", "parent": 99, "children": [], "start_point": {"row": 50, "column": 46}, "end_point": {"row": 50, "column": 49}}, {"id": 102, "type": "if_statement", "text": "if(list==NULL){ // if list is emtry\n stringList newnode=createStringNode(str);\n return newnode;\n }else{\n stringList prev=NULL;\n stringList origin=list;\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }\n if(strcmp(list->string,str)>0){ // find the \"place\" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }\n prev=list;\n list=list->next;\n }\n // if it should be inserted at the end of the list\n stringList newnode=createStringNode(str); //create a new node for this country\n prev->next=newnode; // attach it to the end of the list\n return origin;\n }", "parent": 89, "children": [103, 120], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 81, "column": 3}}, {"id": 103, "type": "parenthesized_expression", "text": "(list==NULL)", "parent": 102, "children": [104], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 16}}, {"id": 104, "type": "binary_expression", "text": "list==NULL", "parent": 103, "children": [105, 106, 107], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 15}}, {"id": 105, "type": "identifier", "text": "list", "parent": 104, "children": [], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 9}}, {"id": 106, "type": "==", "text": "==", "parent": 104, "children": [], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 11}}, {"id": 107, "type": "null", "text": "NULL", "parent": 104, "children": [108], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 15}}, {"id": 108, "type": "NULL", "text": "NULL", "parent": 107, "children": [], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 15}}, {"id": 109, "type": "declaration", "text": "stringList newnode=createStringNode(str);", "parent": 102, "children": [110, 111], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 45}}, {"id": 110, "type": "type_identifier", "text": "stringList", "parent": 109, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 14}}, {"id": 111, "type": "init_declarator", "text": "newnode=createStringNode(str)", "parent": 109, "children": [112, 113, 114], "start_point": {"row": 53, "column": 15}, "end_point": {"row": 53, "column": 44}}, {"id": 112, "type": "identifier", "text": "newnode", "parent": 111, "children": [], "start_point": {"row": 53, "column": 15}, "end_point": {"row": 53, "column": 22}}, {"id": 113, "type": "=", "text": "=", "parent": 111, "children": [], "start_point": {"row": 53, "column": 22}, "end_point": {"row": 53, "column": 23}}, {"id": 114, "type": "call_expression", "text": "createStringNode(str)", "parent": 111, "children": [115, 116], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 44}}, {"id": 115, "type": "identifier", "text": "createStringNode", "parent": 114, "children": [], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 39}}, {"id": 116, "type": "argument_list", "text": "(str)", "parent": 114, "children": [117], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 44}}, {"id": 117, "type": "identifier", "text": "str", "parent": 116, "children": [], "start_point": {"row": 53, "column": 40}, "end_point": {"row": 53, "column": 43}}, {"id": 118, "type": "return_statement", "text": "return newnode;", "parent": 102, "children": [119], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 19}}, {"id": 119, "type": "identifier", "text": "newnode", "parent": 118, "children": [], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 18}}, {"id": 120, "type": "else_clause", "text": "else{\n stringList prev=NULL;\n stringList origin=list;\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }\n if(strcmp(list->string,str)>0){ // find the \"place\" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }\n prev=list;\n list=list->next;\n }\n // if it should be inserted at the end of the list\n stringList newnode=createStringNode(str); //create a new node for this country\n prev->next=newnode; // attach it to the end of the list\n return origin;\n }", "parent": 102, "children": [], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 81, "column": 3}}, {"id": 121, "type": "declaration", "text": "stringList prev=NULL;", "parent": 120, "children": [122, 123], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 25}}, {"id": 122, "type": "type_identifier", "text": "stringList", "parent": 121, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 14}}, {"id": 123, "type": "init_declarator", "text": "prev=NULL", "parent": 121, "children": [124, 125, 126], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 24}}, {"id": 124, "type": "identifier", "text": "prev", "parent": 123, "children": [], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 19}}, {"id": 125, "type": "=", "text": "=", "parent": 123, "children": [], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 20}}, {"id": 126, "type": "null", "text": "NULL", "parent": 123, "children": [127], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 24}}, {"id": 127, "type": "NULL", "text": "NULL", "parent": 126, "children": [], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 24}}, {"id": 128, "type": "declaration", "text": "stringList origin=list;", "parent": 120, "children": [129, 130], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 27}}, {"id": 129, "type": "type_identifier", "text": "stringList", "parent": 128, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 14}}, {"id": 130, "type": "init_declarator", "text": "origin=list", "parent": 128, "children": [131, 132, 133], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 26}}, {"id": 131, "type": "identifier", "text": "origin", "parent": 130, "children": [], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 21}}, {"id": 132, "type": "=", "text": "=", "parent": 130, "children": [], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 57, "column": 22}}, {"id": 133, "type": "identifier", "text": "list", "parent": 130, "children": [], "start_point": {"row": 57, "column": 22}, "end_point": {"row": 57, "column": 26}}, {"id": 134, "type": "while_statement", "text": "while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }\n if(strcmp(list->string,str)>0){ // find the \"place\" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }\n prev=list;\n list=list->next;\n }", "parent": 120, "children": [135], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 76, "column": 5}}, {"id": 135, "type": "parenthesized_expression", "text": "(list!=NULL)", "parent": 134, "children": [136], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 21}}, {"id": 136, "type": "binary_expression", "text": "list!=NULL", "parent": 135, "children": [137, 138, 139], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 20}}, {"id": 137, "type": "identifier", "text": "list", "parent": 136, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 14}}, {"id": 138, "type": "!=", "text": "!=", "parent": 136, "children": [], "start_point": {"row": 58, "column": 14}, "end_point": {"row": 58, "column": 16}}, {"id": 139, "type": "null", "text": "NULL", "parent": 136, "children": [140], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 20}}, {"id": 140, "type": "NULL", "text": "NULL", "parent": 139, "children": [], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 20}}, {"id": 141, "type": "if_statement", "text": "if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }", "parent": 134, "children": [142], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 61, "column": 7}}, {"id": 142, "type": "parenthesized_expression", "text": "(strcmp(list->string,str)==0)", "parent": 141, "children": [143], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 37}}, {"id": 143, "type": "binary_expression", "text": "strcmp(list->string,str)==0", "parent": 142, "children": [144, 151, 152], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 36}}, {"id": 144, "type": "call_expression", "text": "strcmp(list->string,str)", "parent": 143, "children": [145, 146], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 33}}, {"id": 145, "type": "identifier", "text": "strcmp", "parent": 144, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 15}}, {"id": 146, "type": "argument_list", "text": "(list->string,str)", "parent": 144, "children": [147, 150], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 33}}, {"id": 147, "type": "field_expression", "text": "list->string", "parent": 146, "children": [148, 149], "start_point": {"row": 59, "column": 16}, "end_point": {"row": 59, "column": 28}}, {"id": 148, "type": "identifier", "text": "list", "parent": 147, "children": [], "start_point": {"row": 59, "column": 16}, "end_point": {"row": 59, "column": 20}}, {"id": 149, "type": "field_identifier", "text": "string", "parent": 147, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 28}}, {"id": 150, "type": "identifier", "text": "str", "parent": 146, "children": [], "start_point": {"row": 59, "column": 29}, "end_point": {"row": 59, "column": 32}}, {"id": 151, "type": "==", "text": "==", "parent": 143, "children": [], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 35}}, {"id": 152, "type": "number_literal", "text": "0", "parent": 143, "children": [], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 36}}, {"id": 153, "type": "return_statement", "text": "return origin;", "parent": 141, "children": [154], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 22}}, {"id": 154, "type": "identifier", "text": "origin", "parent": 153, "children": [], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 21}}, {"id": 155, "type": "if_statement", "text": "if(strcmp(list->string,str)>0){ // find the \"place\" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }", "parent": 134, "children": [156], "start_point": {"row": 62, "column": 6}, "end_point": {"row": 73, "column": 7}}, {"id": 156, "type": "parenthesized_expression", "text": "(strcmp(list->string,str)>0)", "parent": 155, "children": [157], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 36}}, {"id": 157, "type": "binary_expression", "text": "strcmp(list->string,str)>0", "parent": 156, "children": [158, 165, 166], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 35}}, {"id": 158, "type": "call_expression", "text": "strcmp(list->string,str)", "parent": 157, "children": [159, 160], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 33}}, {"id": 159, "type": "identifier", "text": "strcmp", "parent": 158, "children": [], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 15}}, {"id": 160, "type": "argument_list", "text": "(list->string,str)", "parent": 158, "children": [161, 164], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 33}}, {"id": 161, "type": "field_expression", "text": "list->string", "parent": 160, "children": [162, 163], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 28}}, {"id": 162, "type": "identifier", "text": "list", "parent": 161, "children": [], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 20}}, {"id": 163, "type": "field_identifier", "text": "string", "parent": 161, "children": [], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 28}}, {"id": 164, "type": "identifier", "text": "str", "parent": 160, "children": [], "start_point": {"row": 62, "column": 29}, "end_point": {"row": 62, "column": 32}}, {"id": 165, "type": ">", "text": ">", "parent": 157, "children": [], "start_point": {"row": 62, "column": 33}, "end_point": {"row": 62, "column": 34}}, {"id": 166, "type": "number_literal", "text": "0", "parent": 157, "children": [], "start_point": {"row": 62, "column": 34}, "end_point": {"row": 62, "column": 35}}, {"id": 167, "type": "declaration", "text": "stringList newnode=createStringNode(str);", "parent": 155, "children": [168, 169], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 49}}, {"id": 168, "type": "type_identifier", "text": "stringList", "parent": 167, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 18}}, {"id": 169, "type": "init_declarator", "text": "newnode=createStringNode(str)", "parent": 167, "children": [170, 171, 172], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 48}}, {"id": 170, "type": "identifier", "text": "newnode", "parent": 169, "children": [], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 26}}, {"id": 171, "type": "=", "text": "=", "parent": 169, "children": [], "start_point": {"row": 63, "column": 26}, "end_point": {"row": 63, "column": 27}}, {"id": 172, "type": "call_expression", "text": "createStringNode(str)", "parent": 169, "children": [173, 174], "start_point": {"row": 63, "column": 27}, "end_point": {"row": 63, "column": 48}}, {"id": 173, "type": "identifier", "text": "createStringNode", "parent": 172, "children": [], "start_point": {"row": 63, "column": 27}, "end_point": {"row": 63, "column": 43}}, {"id": 174, "type": "argument_list", "text": "(str)", "parent": 172, "children": [175], "start_point": {"row": 63, "column": 43}, "end_point": {"row": 63, "column": 48}}, {"id": 175, "type": "identifier", "text": "str", "parent": 174, "children": [], "start_point": {"row": 63, "column": 44}, "end_point": {"row": 63, "column": 47}}, {"id": 176, "type": "if_statement", "text": "if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }", "parent": 155, "children": [177, 191], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 72, "column": 9}}, {"id": 177, "type": "parenthesized_expression", "text": "(prev==NULL)", "parent": 176, "children": [178], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 22}}, {"id": 178, "type": "binary_expression", "text": "prev==NULL", "parent": 177, "children": [179, 180, 181], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 21}}, {"id": 179, "type": "identifier", "text": "prev", "parent": 178, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 15}}, {"id": 180, "type": "==", "text": "==", "parent": 178, "children": [], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 17}}, {"id": 181, "type": "null", "text": "NULL", "parent": 178, "children": [182], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 21}}, {"id": 182, "type": "NULL", "text": "NULL", "parent": 181, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 21}}, {"id": 183, "type": "assignment_expression", "text": "newnode->next=origin", "parent": 176, "children": [184, 187, 188], "start_point": {"row": 65, "column": 10}, "end_point": {"row": 65, "column": 30}}, {"id": 184, "type": "field_expression", "text": "newnode->next", "parent": 183, "children": [185, 186], "start_point": {"row": 65, "column": 10}, "end_point": {"row": 65, "column": 23}}, {"id": 185, "type": "identifier", "text": "newnode", "parent": 184, "children": [], "start_point": {"row": 65, "column": 10}, "end_point": {"row": 65, "column": 17}}, {"id": 186, "type": "field_identifier", "text": "next", "parent": 184, "children": [], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 23}}, {"id": 187, "type": "=", "text": "=", "parent": 183, "children": [], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 24}}, {"id": 188, "type": "identifier", "text": "origin", "parent": 183, "children": [], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 30}}, {"id": 189, "type": "return_statement", "text": "return newnode;", "parent": 176, "children": [190], "start_point": {"row": 66, "column": 10}, "end_point": {"row": 66, "column": 25}}, {"id": 190, "type": "identifier", "text": "newnode", "parent": 189, "children": [], "start_point": {"row": 66, "column": 17}, "end_point": {"row": 66, "column": 24}}, {"id": 191, "type": "else_clause", "text": "else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }", "parent": 176, "children": [], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 72, "column": 9}}, {"id": 192, "type": "declaration", "text": "stringList temp=prev->next;", "parent": 191, "children": [193, 194], "start_point": {"row": 68, "column": 10}, "end_point": {"row": 68, "column": 37}}, {"id": 193, "type": "type_identifier", "text": "stringList", "parent": 192, "children": [], "start_point": {"row": 68, "column": 10}, "end_point": {"row": 68, "column": 20}}, {"id": 194, "type": "init_declarator", "text": "temp=prev->next", "parent": 192, "children": [195, 196, 197], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 36}}, {"id": 195, "type": "identifier", "text": "temp", "parent": 194, "children": [], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 25}}, {"id": 196, "type": "=", "text": "=", "parent": 194, "children": [], "start_point": {"row": 68, "column": 25}, "end_point": {"row": 68, "column": 26}}, {"id": 197, "type": "field_expression", "text": "prev->next", "parent": 194, "children": [198, 199], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 36}}, {"id": 198, "type": "identifier", "text": "prev", "parent": 197, "children": [], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 30}}, {"id": 199, "type": "field_identifier", "text": "next", "parent": 197, "children": [], "start_point": {"row": 68, "column": 32}, "end_point": {"row": 68, "column": 36}}, {"id": 200, "type": "assignment_expression", "text": "prev->next=newnode", "parent": 191, "children": [201, 204, 205], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 28}}, {"id": 201, "type": "field_expression", "text": "prev->next", "parent": 200, "children": [202, 203], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 20}}, {"id": 202, "type": "identifier", "text": "prev", "parent": 201, "children": [], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 14}}, {"id": 203, "type": "field_identifier", "text": "next", "parent": 201, "children": [], "start_point": {"row": 69, "column": 16}, "end_point": {"row": 69, "column": 20}}, {"id": 204, "type": "=", "text": "=", "parent": 200, "children": [], "start_point": {"row": 69, "column": 20}, "end_point": {"row": 69, "column": 21}}, {"id": 205, "type": "identifier", "text": "newnode", "parent": 200, "children": [], "start_point": {"row": 69, "column": 21}, "end_point": {"row": 69, "column": 28}}, {"id": 206, "type": "assignment_expression", "text": "newnode->next=temp", "parent": 191, "children": [207, 210, 211], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 28}}, {"id": 207, "type": "field_expression", "text": "newnode->next", "parent": 206, "children": [208, 209], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 23}}, {"id": 208, "type": "identifier", "text": "newnode", "parent": 207, "children": [], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 17}}, {"id": 209, "type": "field_identifier", "text": "next", "parent": 207, "children": [], "start_point": {"row": 70, "column": 19}, "end_point": {"row": 70, "column": 23}}, {"id": 210, "type": "=", "text": "=", "parent": 206, "children": [], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 24}}, {"id": 211, "type": "identifier", "text": "temp", "parent": 206, "children": [], "start_point": {"row": 70, "column": 24}, "end_point": {"row": 70, "column": 28}}, {"id": 212, "type": "return_statement", "text": "return origin;", "parent": 191, "children": [213], "start_point": {"row": 71, "column": 10}, "end_point": {"row": 71, "column": 24}}, {"id": 213, "type": "identifier", "text": "origin", "parent": 212, "children": [], "start_point": {"row": 71, "column": 17}, "end_point": {"row": 71, "column": 23}}, {"id": 214, "type": "assignment_expression", "text": "prev=list", "parent": 134, "children": [215, 216, 217], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 15}}, {"id": 215, "type": "identifier", "text": "prev", "parent": 214, "children": [], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 10}}, {"id": 216, "type": "=", "text": "=", "parent": 214, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 11}}, {"id": 217, "type": "identifier", "text": "list", "parent": 214, "children": [], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 15}}, {"id": 218, "type": "assignment_expression", "text": "list=list->next", "parent": 134, "children": [219, 220, 221], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 21}}, {"id": 219, "type": "identifier", "text": "list", "parent": 218, "children": [], "start_point": {"row": 75, "column": 6}, "end_point": {"row": 75, "column": 10}}, {"id": 220, "type": "=", "text": "=", "parent": 218, "children": [], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 75, "column": 11}}, {"id": 221, "type": "field_expression", "text": "list->next", "parent": 218, "children": [222, 223], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 21}}, {"id": 222, "type": "identifier", "text": "list", "parent": 221, "children": [], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 15}}, {"id": 223, "type": "field_identifier", "text": "next", "parent": 221, "children": [], "start_point": {"row": 75, "column": 17}, "end_point": {"row": 75, "column": 21}}, {"id": 224, "type": "declaration", "text": "stringList newnode=createStringNode(str);", "parent": 120, "children": [225, 226], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 45}}, {"id": 225, "type": "type_identifier", "text": "stringList", "parent": 224, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 14}}, {"id": 226, "type": "init_declarator", "text": "newnode=createStringNode(str)", "parent": 224, "children": [227, 228, 229], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 44}}, {"id": 227, "type": "identifier", "text": "newnode", "parent": 226, "children": [], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 22}}, {"id": 228, "type": "=", "text": "=", "parent": 226, "children": [], "start_point": {"row": 78, "column": 22}, "end_point": {"row": 78, "column": 23}}, {"id": 229, "type": "call_expression", "text": "createStringNode(str)", "parent": 226, "children": [230, 231], "start_point": {"row": 78, "column": 23}, "end_point": {"row": 78, "column": 44}}, {"id": 230, "type": "identifier", "text": "createStringNode", "parent": 229, "children": [], "start_point": {"row": 78, "column": 23}, "end_point": {"row": 78, "column": 39}}, {"id": 231, "type": "argument_list", "text": "(str)", "parent": 229, "children": [232], "start_point": {"row": 78, "column": 39}, "end_point": {"row": 78, "column": 44}}, {"id": 232, "type": "identifier", "text": "str", "parent": 231, "children": [], "start_point": {"row": 78, "column": 40}, "end_point": {"row": 78, "column": 43}}, {"id": 233, "type": "assignment_expression", "text": "prev->next=newnode", "parent": 120, "children": [234, 237, 238], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 22}}, {"id": 234, "type": "field_expression", "text": "prev->next", "parent": 233, "children": [235, 236], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 14}}, {"id": 235, "type": "identifier", "text": "prev", "parent": 234, "children": [], "start_point": {"row": 79, "column": 4}, "end_point": {"row": 79, "column": 8}}, {"id": 236, "type": "field_identifier", "text": "next", "parent": 234, "children": [], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 14}}, {"id": 237, "type": "=", "text": "=", "parent": 233, "children": [], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 15}}, {"id": 238, "type": "identifier", "text": "newnode", "parent": 233, "children": [], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 22}}, {"id": 239, "type": "return_statement", "text": "return origin;", "parent": 120, "children": [240], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 18}}, {"id": 240, "type": "identifier", "text": "origin", "parent": 239, "children": [], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 17}}, {"id": 241, "type": "function_definition", "text": "int stringExists(stringList list,char *str){\n // this function searches the given string, if it exists returns 1 else it returns 0\n if(list==NULL){ // if list is empty\n return 0;\n }else{\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }\n list=list->next;\n }\n return 0;\n }\n}", "parent": null, "children": [242, 243], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 97, "column": 1}}, {"id": 242, "type": "primitive_type", "text": "int", "parent": 241, "children": [], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 3}}, {"id": 243, "type": "function_declarator", "text": "stringExists(stringList list,char *str)", "parent": 241, "children": [244, 245], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 43}}, {"id": 244, "type": "identifier", "text": "stringExists", "parent": 243, "children": [], "start_point": {"row": 84, "column": 4}, "end_point": {"row": 84, "column": 16}}, {"id": 245, "type": "parameter_list", "text": "(stringList list,char *str)", "parent": 243, "children": [246, 249], "start_point": {"row": 84, "column": 16}, "end_point": {"row": 84, "column": 43}}, {"id": 246, "type": "parameter_declaration", "text": "stringList list", "parent": 245, "children": [247, 248], "start_point": {"row": 84, "column": 17}, "end_point": {"row": 84, "column": 32}}, {"id": 247, "type": "type_identifier", "text": "stringList", "parent": 246, "children": [], "start_point": {"row": 84, "column": 17}, "end_point": {"row": 84, "column": 27}}, {"id": 248, "type": "identifier", "text": "list", "parent": 246, "children": [], "start_point": {"row": 84, "column": 28}, "end_point": {"row": 84, "column": 32}}, {"id": 249, "type": "parameter_declaration", "text": "char *str", "parent": 245, "children": [250, 251], "start_point": {"row": 84, "column": 33}, "end_point": {"row": 84, "column": 42}}, {"id": 250, "type": "primitive_type", "text": "char", "parent": 249, "children": [], "start_point": {"row": 84, "column": 33}, "end_point": {"row": 84, "column": 37}}, {"id": 251, "type": "pointer_declarator", "text": "*str", "parent": 249, "children": [252, 253], "start_point": {"row": 84, "column": 38}, "end_point": {"row": 84, "column": 42}}, {"id": 252, "type": "*", "text": "*", "parent": 251, "children": [], "start_point": {"row": 84, "column": 38}, "end_point": {"row": 84, "column": 39}}, {"id": 253, "type": "identifier", "text": "str", "parent": 251, "children": [], "start_point": {"row": 84, "column": 39}, "end_point": {"row": 84, "column": 42}}, {"id": 254, "type": "if_statement", "text": "if(list==NULL){ // if list is empty\n return 0;\n }else{\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }\n list=list->next;\n }\n return 0;\n }", "parent": 241, "children": [255, 263], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 96, "column": 3}}, {"id": 255, "type": "parenthesized_expression", "text": "(list==NULL)", "parent": 254, "children": [256], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 16}}, {"id": 256, "type": "binary_expression", "text": "list==NULL", "parent": 255, "children": [257, 258, 259], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 15}}, {"id": 257, "type": "identifier", "text": "list", "parent": 256, "children": [], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 9}}, {"id": 258, "type": "==", "text": "==", "parent": 256, "children": [], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 11}}, {"id": 259, "type": "null", "text": "NULL", "parent": 256, "children": [260], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 15}}, {"id": 260, "type": "NULL", "text": "NULL", "parent": 259, "children": [], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 15}}, {"id": 261, "type": "return_statement", "text": "return 0;", "parent": 254, "children": [262], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 13}}, {"id": 262, "type": "number_literal", "text": "0", "parent": 261, "children": [], "start_point": {"row": 87, "column": 11}, "end_point": {"row": 87, "column": 12}}, {"id": 263, "type": "else_clause", "text": "else{\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }\n list=list->next;\n }\n return 0;\n }", "parent": 254, "children": [], "start_point": {"row": 88, "column": 3}, "end_point": {"row": 96, "column": 3}}, {"id": 264, "type": "while_statement", "text": "while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }\n list=list->next;\n }", "parent": 263, "children": [265], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 94, "column": 5}}, {"id": 265, "type": "parenthesized_expression", "text": "(list!=NULL)", "parent": 264, "children": [266], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 21}}, {"id": 266, "type": "binary_expression", "text": "list!=NULL", "parent": 265, "children": [267, 268, 269], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 20}}, {"id": 267, "type": "identifier", "text": "list", "parent": 266, "children": [], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 14}}, {"id": 268, "type": "!=", "text": "!=", "parent": 266, "children": [], "start_point": {"row": 89, "column": 14}, "end_point": {"row": 89, "column": 16}}, {"id": 269, "type": "null", "text": "NULL", "parent": 266, "children": [270], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 20}}, {"id": 270, "type": "NULL", "text": "NULL", "parent": 269, "children": [], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 20}}, {"id": 271, "type": "if_statement", "text": "if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }", "parent": 264, "children": [272], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 92, "column": 7}}, {"id": 272, "type": "parenthesized_expression", "text": "(strcmp(list->string,str)==0)", "parent": 271, "children": [273], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 37}}, {"id": 273, "type": "binary_expression", "text": "strcmp(list->string,str)==0", "parent": 272, "children": [274, 281, 282], "start_point": {"row": 90, "column": 9}, "end_point": {"row": 90, "column": 36}}, {"id": 274, "type": "call_expression", "text": "strcmp(list->string,str)", "parent": 273, "children": [275, 276], "start_point": {"row": 90, "column": 9}, "end_point": {"row": 90, "column": 33}}, {"id": 275, "type": "identifier", "text": "strcmp", "parent": 274, "children": [], "start_point": {"row": 90, "column": 9}, "end_point": {"row": 90, "column": 15}}, {"id": 276, "type": "argument_list", "text": "(list->string,str)", "parent": 274, "children": [277, 280], "start_point": {"row": 90, "column": 15}, "end_point": {"row": 90, "column": 33}}, {"id": 277, "type": "field_expression", "text": "list->string", "parent": 276, "children": [278, 279], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 28}}, {"id": 278, "type": "identifier", "text": "list", "parent": 277, "children": [], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 20}}, {"id": 279, "type": "field_identifier", "text": "string", "parent": 277, "children": [], "start_point": {"row": 90, "column": 22}, "end_point": {"row": 90, "column": 28}}, {"id": 280, "type": "identifier", "text": "str", "parent": 276, "children": [], "start_point": {"row": 90, "column": 29}, "end_point": {"row": 90, "column": 32}}, {"id": 281, "type": "==", "text": "==", "parent": 273, "children": [], "start_point": {"row": 90, "column": 33}, "end_point": {"row": 90, "column": 35}}, {"id": 282, "type": "number_literal", "text": "0", "parent": 273, "children": [], "start_point": {"row": 90, "column": 35}, "end_point": {"row": 90, "column": 36}}, {"id": 283, "type": "return_statement", "text": "return 1;", "parent": 271, "children": [284], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 17}}, {"id": 284, "type": "number_literal", "text": "1", "parent": 283, "children": [], "start_point": {"row": 91, "column": 15}, "end_point": {"row": 91, "column": 16}}, {"id": 285, "type": "assignment_expression", "text": "list=list->next", "parent": 264, "children": [286, 287, 288], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 21}}, {"id": 286, "type": "identifier", "text": "list", "parent": 285, "children": [], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 10}}, {"id": 287, "type": "=", "text": "=", "parent": 285, "children": [], "start_point": {"row": 93, "column": 10}, "end_point": {"row": 93, "column": 11}}, {"id": 288, "type": "field_expression", "text": "list->next", "parent": 285, "children": [289, 290], "start_point": {"row": 93, "column": 11}, "end_point": {"row": 93, "column": 21}}, {"id": 289, "type": "identifier", "text": "list", "parent": 288, "children": [], "start_point": {"row": 93, "column": 11}, "end_point": {"row": 93, "column": 15}}, {"id": 290, "type": "field_identifier", "text": "next", "parent": 288, "children": [], "start_point": {"row": 93, "column": 17}, "end_point": {"row": 93, "column": 21}}, {"id": 291, "type": "return_statement", "text": "return 0;", "parent": 263, "children": [292], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 13}}, {"id": 292, "type": "number_literal", "text": "0", "parent": 291, "children": [], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 12}}, {"id": 293, "type": "function_definition", "text": "void deleteStringList(stringList list){ // delete (free) the list\n stringList next;\n while(list!=NULL){\n next=list->next;\n free(list->string);\n free(list);\n list=next;\n }\n}", "parent": null, "children": [294, 295], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 108, "column": 1}}, {"id": 294, "type": "primitive_type", "text": "void", "parent": 293, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 4}}, {"id": 295, "type": "function_declarator", "text": "deleteStringList(stringList list)", "parent": 293, "children": [296, 297], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 38}}, {"id": 296, "type": "identifier", "text": "deleteStringList", "parent": 295, "children": [], "start_point": {"row": 100, "column": 5}, "end_point": {"row": 100, "column": 21}}, {"id": 297, "type": "parameter_list", "text": "(stringList list)", "parent": 295, "children": [298], "start_point": {"row": 100, "column": 21}, "end_point": {"row": 100, "column": 38}}, {"id": 298, "type": "parameter_declaration", "text": "stringList list", "parent": 297, "children": [299, 300], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 37}}, {"id": 299, "type": "type_identifier", "text": "stringList", "parent": 298, "children": [], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 32}}, {"id": 300, "type": "identifier", "text": "list", "parent": 298, "children": [], "start_point": {"row": 100, "column": 33}, "end_point": {"row": 100, "column": 37}}, {"id": 301, "type": "declaration", "text": "stringList next;", "parent": 293, "children": [302, 303], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 18}}, {"id": 302, "type": "type_identifier", "text": "stringList", "parent": 301, "children": [], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 12}}, {"id": 303, "type": "identifier", "text": "next", "parent": 301, "children": [], "start_point": {"row": 101, "column": 13}, "end_point": {"row": 101, "column": 17}}, {"id": 304, "type": "while_statement", "text": "while(list!=NULL){\n next=list->next;\n free(list->string);\n free(list);\n list=next;\n }", "parent": 293, "children": [305], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 107, "column": 3}}, {"id": 305, "type": "parenthesized_expression", "text": "(list!=NULL)", "parent": 304, "children": [306], "start_point": {"row": 102, "column": 7}, "end_point": {"row": 102, "column": 19}}, {"id": 306, "type": "binary_expression", "text": "list!=NULL", "parent": 305, "children": [307, 308, 309], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 18}}, {"id": 307, "type": "identifier", "text": "list", "parent": 306, "children": [], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 12}}, {"id": 308, "type": "!=", "text": "!=", "parent": 306, "children": [], "start_point": {"row": 102, "column": 12}, "end_point": {"row": 102, "column": 14}}, {"id": 309, "type": "null", "text": "NULL", "parent": 306, "children": [310], "start_point": {"row": 102, "column": 14}, "end_point": {"row": 102, "column": 18}}, {"id": 310, "type": "NULL", "text": "NULL", "parent": 309, "children": [], "start_point": {"row": 102, "column": 14}, "end_point": {"row": 102, "column": 18}}, {"id": 311, "type": "assignment_expression", "text": "next=list->next", "parent": 304, "children": [312, 313, 314], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 19}}, {"id": 312, "type": "identifier", "text": "next", "parent": 311, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 8}}, {"id": 313, "type": "=", "text": "=", "parent": 311, "children": [], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 9}}, {"id": 314, "type": "field_expression", "text": "list->next", "parent": 311, "children": [315, 316], "start_point": {"row": 103, "column": 9}, "end_point": {"row": 103, "column": 19}}, {"id": 315, "type": "identifier", "text": "list", "parent": 314, "children": [], "start_point": {"row": 103, "column": 9}, "end_point": {"row": 103, "column": 13}}, {"id": 316, "type": "field_identifier", "text": "next", "parent": 314, "children": [], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 19}}, {"id": 317, "type": "call_expression", "text": "free(list->string)", "parent": 304, "children": [318, 319], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 22}}, {"id": 318, "type": "identifier", "text": "free", "parent": 317, "children": [], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 8}}, {"id": 319, "type": "argument_list", "text": "(list->string)", "parent": 317, "children": [320], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 22}}, {"id": 320, "type": "field_expression", "text": "list->string", "parent": 319, "children": [321, 322], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 21}}, {"id": 321, "type": "identifier", "text": "list", "parent": 320, "children": [], "start_point": {"row": 104, "column": 9}, "end_point": {"row": 104, "column": 13}}, {"id": 322, "type": "field_identifier", "text": "string", "parent": 320, "children": [], "start_point": {"row": 104, "column": 15}, "end_point": {"row": 104, "column": 21}}, {"id": 323, "type": "call_expression", "text": "free(list)", "parent": 304, "children": [324, 325], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 14}}, {"id": 324, "type": "identifier", "text": "free", "parent": 323, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 8}}, {"id": 325, "type": "argument_list", "text": "(list)", "parent": 323, "children": [326], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 14}}, {"id": 326, "type": "identifier", "text": "list", "parent": 325, "children": [], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 13}}, {"id": 327, "type": "assignment_expression", "text": "list=next", "parent": 304, "children": [328, 329, 330], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 13}}, {"id": 328, "type": "identifier", "text": "list", "parent": 327, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 8}}, {"id": 329, "type": "=", "text": "=", "parent": 327, "children": [], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 9}}, {"id": 330, "type": "identifier", "text": "next", "parent": 327, "children": [], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 13}}]}, "node_categories": {"declarations": {"functions": [15, 17, 81, 83, 89, 91, 241, 243, 293, 295], "variables": [20, 25, 94, 97, 109, 121, 128, 167, 192, 224, 246, 249, 298, 301], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [30, 33, 36, 37, 40, 44, 49, 52, 53, 57, 58, 59, 65, 68, 73, 103, 104, 114, 135, 136, 142, 143, 144, 147, 156, 157, 158, 161, 172, 177, 178, 184, 197, 201, 207, 221, 229, 234, 255, 256, 265, 266, 272, 273, 274, 277, 288, 305, 306, 314, 317, 320, 323], "assignments": [39, 72, 183, 200, 206, 214, 218, 233, 285, 311, 327], "loops": [134, 264, 304], "conditionals": [16, 18, 24, 26, 28, 32, 34, 38, 41, 42, 50, 60, 62, 66, 69, 70, 71, 74, 75, 80, 82, 84, 90, 92, 95, 96, 101, 102, 105, 110, 112, 115, 117, 119, 122, 124, 129, 131, 133, 137, 141, 145, 148, 149, 150, 154, 155, 159, 162, 163, 164, 168, 170, 173, 175, 176, 179, 185, 186, 188, 190, 193, 195, 198, 199, 202, 203, 205, 208, 209, 211, 213, 215, 217, 219, 222, 223, 225, 227, 230, 232, 235, 236, 238, 240, 244, 247, 248, 253, 254, 257, 267, 271, 275, 278, 279, 280, 286, 289, 290, 296, 299, 300, 302, 303, 307, 312, 315, 316, 318, 321, 322, 324, 326, 328, 330], "returns": [79, 86, 118, 153, 189, 212, 239, 261, 283, 291], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 64, 152, 166, 262, 282, 284, 292], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "stringList", "text_snippet": "stringList createStringNode(char *str){ // create a node of the list for the given string\n stringLi"}, {"node_id": 17, "universal_type": "function", "name": "unknown", "text_snippet": "createStringNode(char *str)"}, {"node_id": 81, "universal_type": "function", "name": "unknown", "text_snippet": "stringList initializeStringList(){ // initialize list\n return NULL;\n}"}, {"node_id": 83, "universal_type": "function", "name": "unknown", "text_snippet": "initializeStringList()"}, {"node_id": 89, "universal_type": "function", "name": "to", "text_snippet": "stringList insertString(stringList list,char *str){\n // insert a string to the list, if the string "}, {"node_id": 91, "universal_type": "function", "name": "unknown", "text_snippet": "insertString(stringList list,char *str)"}, {"node_id": 241, "universal_type": "function", "name": "stringExists", "text_snippet": "int stringExists(stringList list,char *str){\n // this function searches the given string, if it exi"}, {"node_id": 243, "universal_type": "function", "name": "unknown", "text_snippet": "stringExists(stringList list,char *str)"}, {"node_id": 293, "universal_type": "function", "name": "deleteStringList", "text_snippet": "void deleteStringList(stringList list){ // delete (free) the list\n stringList next;\n while(list!"}, {"node_id": 295, "universal_type": "function", "name": "unknown", "text_snippet": "deleteStringList(stringList list)"}], "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 <time.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"stringList.h\"\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n#include \"stringList.h\"\n\n\n///////////////////////////\n// this list is a sorted list of strings\n// every node contains a string\n\n\nstringList createStringNode(char *str){ // create a node of the list for the given string\n stringList newnode=(stringList)malloc(sizeof(node));\n newnode->string=(char *)malloc(sizeof(char)*(strlen(str)+1));\n strcpy(newnode->string,str);\n newnode->next=NULL;\n return newnode;\n}\n\nstringList initializeStringList(){ // initialize list\n return NULL;\n}\n\n// stringList insertGetString(stringList list,char *str,char **returnString){\n// // this function searches the given country, if it exists returns a pointer to the string of the country\n// // if it does not exist, a new node is created, the new country is inserted to the list and a pointer to the string is returned\n// if(list==NULL){ // if list is emtry\n// stringList newnode=createStringNode(str);\n// (*returnString)=newnode->string;\n// return newnode;\n// }else{\n// stringList prev=NULL;\n// stringList origin=list;\n// while(list!=NULL){ //traverse the list\n// if(strcmp(list->string,str)==0){ // if country is found\n// (*returnString)=list->string; //return a pointer to the string\n// return origin;\n// }\n// prev=list;\n// list=list->next;\n// }\n// // if country does not exist\n// stringList newnode=createStringNode(str); //create a new node for this country\n// (*returnString)=newnode->string; //return a pointer to the string\n// prev->next=newnode; // attach it to the end of the list\n// return origin;\n// }\n// }\n\nstringList insertString(stringList list,char *str){\n // insert a string to the list, if the string already exists it is not inserted\n if(list==NULL){ // if list is emtry\n stringList newnode=createStringNode(str);\n return newnode;\n }else{\n stringList prev=NULL;\n stringList origin=list;\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if the same string already exists in the list\n return origin;\n }\n if(strcmp(list->string,str)>0){ // find the \"place\" that the new string will be inserted in order to keep the list sorted\n stringList newnode=createStringNode(str); //create a new node for this string\n if(prev==NULL){ // if it should be inserted at the start of the list\n newnode->next=origin; // attach the previous first node to the new node\n return newnode; // return the new node as the start of the list\n }else{ // if it should be inserted somewhere in the middle of the list\n stringList temp=prev->next;\n prev->next=newnode; // attach it to the previous node\n newnode->next=temp;\n return origin;\n }\n }\n prev=list;\n list=list->next;\n }\n // if it should be inserted at the end of the list\n stringList newnode=createStringNode(str); //create a new node for this country\n prev->next=newnode; // attach it to the end of the list\n return origin;\n }\n}\n\nint stringExists(stringList list,char *str){\n // this function searches the given string, if it exists returns 1 else it returns 0\n if(list==NULL){ // if list is empty\n return 0;\n }else{\n while(list!=NULL){ //traverse the list\n if(strcmp(list->string,str)==0){ // if country is found\n return 1;\n }\n list=list->next;\n }\n return 0;\n }\n}\n\n\nvoid deleteStringList(stringList list){ // delete (free) the list\n stringList next;\n while(list!=NULL){\n next=list->next;\n free(list->string);\n free(list);\n list=next;\n }\n}\n/////////////////////////////////\n"}
5
c
#include "geminc.h" #include "naltxt.h" Widget CreateLabelWidget ( Widget parent, char name[], char message[], Arg *args, int n ) /************************************************************************ * CreateLabelWidget * * * * Widget CreateLabelWidget(parent, name, message, args, n) * * * * Input parameters: * * parent Widget * * name[] char * * message[] char * * *args Arg * * n int * ** * ***********************************************************************/ { Widget label_widget; XmString label_text; /*---------------------------------------------------------------------*/ /* * Convert message to XmString */ label_text = XmStringCreateLocalized( message ); /* * Set label_text */ XtSetArg( args[n], XmNlabelString, label_text ); n++; /* * Create label widget */ label_widget = XmCreateLabel( parent, name, args, n ); /* * Free the string */ XmStringFree( label_text); return( label_widget); }
24.98
40
(translation_unit) "#include "geminc.h"\n#include "naltxt.h"\n\n\nWidget CreateLabelWidget ( Widget parent, char name[], char message[], \n Arg *args, int n )\n/************************************************************************\n * CreateLabelWidget *\n * *\n * Widget CreateLabelWidget(parent, name, message, args, n) *\n * *\n * Input parameters: *\n * parent Widget *\n * name[] char *\n * message[] char *\n * *args Arg *\n * n int *\n ** *\n ***********************************************************************/\n{\n Widget label_widget;\n XmString label_text;\n/*---------------------------------------------------------------------*/\n/*\n * Convert message to XmString\n */\n label_text = XmStringCreateLocalized( message );\n\n/*\n * Set label_text \n */\n XtSetArg( args[n], XmNlabelString, label_text ); n++;\n\n/*\n * Create label widget\n */\n label_widget = XmCreateLabel( parent, name, args, n );\n\n/*\n * Free the string\n */\n XmStringFree( label_text);\n\n return( label_widget);\n\n}\n" (preproc_include) "#include "geminc.h"\n" (#include) "#include" (string_literal) ""geminc.h"" (") """ (string_content) "geminc.h" (") """ (preproc_include) "#include "naltxt.h"\n" (#include) "#include" (string_literal) ""naltxt.h"" (") """ (string_content) "naltxt.h" (") """ (function_definition) "Widget CreateLabelWidget ( Widget parent, char name[], char message[], \n Arg *args, int n )\n/************************************************************************\n * CreateLabelWidget *\n * *\n * Widget CreateLabelWidget(parent, name, message, args, n) *\n * *\n * Input parameters: *\n * parent Widget *\n * name[] char *\n * message[] char *\n * *args Arg *\n * n int *\n ** *\n ***********************************************************************/\n{\n Widget label_widget;\n XmString label_text;\n/*---------------------------------------------------------------------*/\n/*\n * Convert message to XmString\n */\n label_text = XmStringCreateLocalized( message );\n\n/*\n * Set label_text \n */\n XtSetArg( args[n], XmNlabelString, label_text ); n++;\n\n/*\n * Create label widget\n */\n label_widget = XmCreateLabel( parent, name, args, n );\n\n/*\n * Free the string\n */\n XmStringFree( label_text);\n\n return( label_widget);\n\n}" (type_identifier) "Widget" (function_declarator) "CreateLabelWidget ( Widget parent, char name[], char message[], \n Arg *args, int n )" (identifier) "CreateLabelWidget" (parameter_list) "( Widget parent, char name[], char message[], \n Arg *args, int n )" (() "(" (parameter_declaration) "Widget parent" (type_identifier) "Widget" (identifier) "parent" (,) "," (parameter_declaration) "char name[]" (primitive_type) "char" (array_declarator) "name[]" (identifier) "name" ([) "[" (]) "]" (,) "," (parameter_declaration) "char message[]" (primitive_type) "char" (array_declarator) "message[]" (identifier) "message" ([) "[" (]) "]" (,) "," (parameter_declaration) "Arg *args" (type_identifier) "Arg" (pointer_declarator) "*args" (*) "*" (identifier) "args" (,) "," (parameter_declaration) "int n" (primitive_type) "int" (identifier) "n" ()) ")" (comment) "/************************************************************************\n * CreateLabelWidget *\n * *\n * Widget CreateLabelWidget(parent, name, message, args, n) *\n * *\n * Input parameters: *\n * parent Widget *\n * name[] char *\n * message[] char *\n * *args Arg *\n * n int *\n ** *\n ***********************************************************************/" (compound_statement) "{\n Widget label_widget;\n XmString label_text;\n/*---------------------------------------------------------------------*/\n/*\n * Convert message to XmString\n */\n label_text = XmStringCreateLocalized( message );\n\n/*\n * Set label_text \n */\n XtSetArg( args[n], XmNlabelString, label_text ); n++;\n\n/*\n * Create label widget\n */\n label_widget = XmCreateLabel( parent, name, args, n );\n\n/*\n * Free the string\n */\n XmStringFree( label_text);\n\n return( label_widget);\n\n}" ({) "{" (declaration) "Widget label_widget;" (type_identifier) "Widget" (identifier) "label_widget" (;) ";" (declaration) "XmString label_text;" (type_identifier) "XmString" (identifier) "label_text" (;) ";" (comment) "/*---------------------------------------------------------------------*/" (comment) "/*\n * Convert message to XmString\n */" (expression_statement) "label_text = XmStringCreateLocalized( message );" (assignment_expression) "label_text = XmStringCreateLocalized( message )" (identifier) "label_text" (=) "=" (call_expression) "XmStringCreateLocalized( message )" (identifier) "XmStringCreateLocalized" (argument_list) "( message )" (() "(" (identifier) "message" ()) ")" (;) ";" (comment) "/*\n * Set label_text \n */" (expression_statement) "XtSetArg( args[n], XmNlabelString, label_text );" (call_expression) "XtSetArg( args[n], XmNlabelString, label_text )" (identifier) "XtSetArg" (argument_list) "( args[n], XmNlabelString, label_text )" (() "(" (subscript_expression) "args[n]" (identifier) "args" ([) "[" (identifier) "n" (]) "]" (,) "," (identifier) "XmNlabelString" (,) "," (identifier) "label_text" ()) ")" (;) ";" (expression_statement) "n++;" (update_expression) "n++" (identifier) "n" (++) "++" (;) ";" (comment) "/*\n * Create label widget\n */" (expression_statement) "label_widget = XmCreateLabel( parent, name, args, n );" (assignment_expression) "label_widget = XmCreateLabel( parent, name, args, n )" (identifier) "label_widget" (=) "=" (call_expression) "XmCreateLabel( parent, name, args, n )" (identifier) "XmCreateLabel" (argument_list) "( parent, name, args, n )" (() "(" (identifier) "parent" (,) "," (identifier) "name" (,) "," (identifier) "args" (,) "," (identifier) "n" ()) ")" (;) ";" (comment) "/*\n * Free the string\n */" (expression_statement) "XmStringFree( label_text);" (call_expression) "XmStringFree( label_text)" (identifier) "XmStringFree" (argument_list) "( label_text)" (() "(" (identifier) "label_text" ()) ")" (;) ";" (return_statement) "return( label_widget);" (return) "return" (parenthesized_expression) "( label_widget)" (() "(" (identifier) "label_widget" ()) ")" (;) ";" (}) "}"
128
0
{"language": "c", "success": true, "metadata": {"lines": 40, "avg_line_length": 24.98, "nodes": 71, "errors": 0, "source_hash": "ba255e2196bbe3722df33448b3415370fc01536533f71cdd21c993b7768ed350", "categorized_nodes": 56}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"geminc.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": "\"geminc.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include \"naltxt.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": "\"naltxt.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "function_definition", "text": "Widget CreateLabelWidget ( Widget parent, char name[], char message[], \n\t\t\t\t\t\t\tArg *args, int n )\n/************************************************************************\n * CreateLabelWidget\t\t\t\t\t\t\t*\n *\t\t\t\t\t\t\t\t\t*\n * Widget CreateLabelWidget(parent, name, message, args, n)\t\t*\n *\t\t\t\t\t\t\t\t\t*\n * Input parameters:\t\t\t\t\t\t\t*\n *\tparent\t\tWidget\t\t\t\t\t\t*\n *\tname[]\t\tchar\t\t\t\t\t\t*\n *\tmessage[]\tchar\t\t\t\t\t\t*\n *\t*args\t\tArg\t\t\t\t\t\t*\n *\tn\t\tint\t\t\t\t\t\t*\n **\t\t\t\t\t\t\t\t\t*\n ***********************************************************************/\n{\n Widget label_widget;\n XmString label_text;\n/*---------------------------------------------------------------------*/\n/*\n * Convert message to XmString\n */\n label_text = XmStringCreateLocalized( message );\n\n/*\n * Set label_text \n */\n XtSetArg( args[n], XmNlabelString, label_text ); n++;\n\n/*\n * Create label widget\n */\n label_widget = XmCreateLabel( parent, name, args, n );\n\n/*\n * Free the string\n */\n XmStringFree( label_text);\n\n return( label_widget);\n\n}", "parent": null, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 7, "type": "type_identifier", "text": "Widget", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 8, "type": "function_declarator", "text": "CreateLabelWidget ( Widget parent, char name[], char message[], \n\t\t\t\t\t\t\tArg *args, int n )", "parent": 6, "children": [9, 10], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 5, "column": 25}}, {"id": 9, "type": "identifier", "text": "CreateLabelWidget", "parent": 8, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 24}}, {"id": 10, "type": "parameter_list", "text": "( Widget parent, char name[], char message[], \n\t\t\t\t\t\t\tArg *args, int n )", "parent": 8, "children": [11, 14, 18, 22, 27], "start_point": {"row": 4, "column": 25}, "end_point": {"row": 5, "column": 25}}, {"id": 11, "type": "parameter_declaration", "text": "Widget parent", "parent": 10, "children": [12, 13], "start_point": {"row": 4, "column": 27}, "end_point": {"row": 4, "column": 40}}, {"id": 12, "type": "type_identifier", "text": "Widget", "parent": 11, "children": [], "start_point": {"row": 4, "column": 27}, "end_point": {"row": 4, "column": 33}}, {"id": 13, "type": "identifier", "text": "parent", "parent": 11, "children": [], "start_point": {"row": 4, "column": 34}, "end_point": {"row": 4, "column": 40}}, {"id": 14, "type": "parameter_declaration", "text": "char name[]", "parent": 10, "children": [15, 16], "start_point": {"row": 4, "column": 42}, "end_point": {"row": 4, "column": 53}}, {"id": 15, "type": "primitive_type", "text": "char", "parent": 14, "children": [], "start_point": {"row": 4, "column": 42}, "end_point": {"row": 4, "column": 46}}, {"id": 16, "type": "array_declarator", "text": "name[]", "parent": 14, "children": [17], "start_point": {"row": 4, "column": 47}, "end_point": {"row": 4, "column": 53}}, {"id": 17, "type": "identifier", "text": "name", "parent": 16, "children": [], "start_point": {"row": 4, "column": 47}, "end_point": {"row": 4, "column": 51}}, {"id": 18, "type": "parameter_declaration", "text": "char message[]", "parent": 10, "children": [19, 20], "start_point": {"row": 4, "column": 55}, "end_point": {"row": 4, "column": 69}}, {"id": 19, "type": "primitive_type", "text": "char", "parent": 18, "children": [], "start_point": {"row": 4, "column": 55}, "end_point": {"row": 4, "column": 59}}, {"id": 20, "type": "array_declarator", "text": "message[]", "parent": 18, "children": [21], "start_point": {"row": 4, "column": 60}, "end_point": {"row": 4, "column": 69}}, {"id": 21, "type": "identifier", "text": "message", "parent": 20, "children": [], "start_point": {"row": 4, "column": 60}, "end_point": {"row": 4, "column": 67}}, {"id": 22, "type": "parameter_declaration", "text": "Arg *args", "parent": 10, "children": [23, 24], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 16}}, {"id": 23, "type": "type_identifier", "text": "Arg", "parent": 22, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 10}}, {"id": 24, "type": "pointer_declarator", "text": "*args", "parent": 22, "children": [25, 26], "start_point": {"row": 5, "column": 11}, "end_point": {"row": 5, "column": 16}}, {"id": 25, "type": "*", "text": "*", "parent": 24, "children": [], "start_point": {"row": 5, "column": 11}, "end_point": {"row": 5, "column": 12}}, {"id": 26, "type": "identifier", "text": "args", "parent": 24, "children": [], "start_point": {"row": 5, "column": 12}, "end_point": {"row": 5, "column": 16}}, {"id": 27, "type": "parameter_declaration", "text": "int n", "parent": 10, "children": [28, 29], "start_point": {"row": 5, "column": 18}, "end_point": {"row": 5, "column": 23}}, {"id": 28, "type": "primitive_type", "text": "int", "parent": 27, "children": [], "start_point": {"row": 5, "column": 18}, "end_point": {"row": 5, "column": 21}}, {"id": 29, "type": "identifier", "text": "n", "parent": 27, "children": [], "start_point": {"row": 5, "column": 22}, "end_point": {"row": 5, "column": 23}}, {"id": 30, "type": "declaration", "text": "Widget label_widget;", "parent": 6, "children": [31, 32], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 22}}, {"id": 31, "type": "type_identifier", "text": "Widget", "parent": 30, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 8}}, {"id": 32, "type": "identifier", "text": "label_widget", "parent": 30, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 21}}, {"id": 33, "type": "declaration", "text": "XmString label_text;", "parent": 6, "children": [34, 35], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 22}}, {"id": 34, "type": "type_identifier", "text": "XmString", "parent": 33, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 10}}, {"id": 35, "type": "identifier", "text": "label_text", "parent": 33, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 21}}, {"id": 36, "type": "assignment_expression", "text": "label_text = XmStringCreateLocalized( message )", "parent": 6, "children": [37, 38, 39], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 51}}, {"id": 37, "type": "identifier", "text": "label_text", "parent": 36, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 14}}, {"id": 38, "type": "=", "text": "=", "parent": 36, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 16}}, {"id": 39, "type": "call_expression", "text": "XmStringCreateLocalized( message )", "parent": 36, "children": [40, 41], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 51}}, {"id": 40, "type": "identifier", "text": "XmStringCreateLocalized", "parent": 39, "children": [], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 40}}, {"id": 41, "type": "argument_list", "text": "( message )", "parent": 39, "children": [42], "start_point": {"row": 26, "column": 40}, "end_point": {"row": 26, "column": 51}}, {"id": 42, "type": "identifier", "text": "message", "parent": 41, "children": [], "start_point": {"row": 26, "column": 42}, "end_point": {"row": 26, "column": 49}}, {"id": 43, "type": "call_expression", "text": "XtSetArg( args[n], XmNlabelString, label_text )", "parent": 6, "children": [44, 45], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 51}}, {"id": 44, "type": "identifier", "text": "XtSetArg", "parent": 43, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 12}}, {"id": 45, "type": "argument_list", "text": "( args[n], XmNlabelString, label_text )", "parent": 43, "children": [46, 49, 50], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 51}}, {"id": 46, "type": "subscript_expression", "text": "args[n]", "parent": 45, "children": [47, 48], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 21}}, {"id": 47, "type": "identifier", "text": "args", "parent": 46, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 18}}, {"id": 48, "type": "identifier", "text": "n", "parent": 46, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 20}}, {"id": 49, "type": "identifier", "text": "XmNlabelString", "parent": 45, "children": [], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 37}}, {"id": 50, "type": "identifier", "text": "label_text", "parent": 45, "children": [], "start_point": {"row": 31, "column": 39}, "end_point": {"row": 31, "column": 49}}, {"id": 51, "type": "update_expression", "text": "n++", "parent": 6, "children": [52, 53], "start_point": {"row": 31, "column": 53}, "end_point": {"row": 31, "column": 56}}, {"id": 52, "type": "identifier", "text": "n", "parent": 51, "children": [], "start_point": {"row": 31, "column": 53}, "end_point": {"row": 31, "column": 54}}, {"id": 53, "type": "++", "text": "++", "parent": 51, "children": [], "start_point": {"row": 31, "column": 54}, "end_point": {"row": 31, "column": 56}}, {"id": 54, "type": "assignment_expression", "text": "label_widget = XmCreateLabel( parent, name, args, n )", "parent": 6, "children": [55, 56, 57], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 57}}, {"id": 55, "type": "identifier", "text": "label_widget", "parent": 54, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 16}}, {"id": 56, "type": "=", "text": "=", "parent": 54, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 18}}, {"id": 57, "type": "call_expression", "text": "XmCreateLabel( parent, name, args, n )", "parent": 54, "children": [58, 59], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 57}}, {"id": 58, "type": "identifier", "text": "XmCreateLabel", "parent": 57, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 32}}, {"id": 59, "type": "argument_list", "text": "( parent, name, args, n )", "parent": 57, "children": [60, 61, 62, 63], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 57}}, {"id": 60, "type": "identifier", "text": "parent", "parent": 59, "children": [], "start_point": {"row": 36, "column": 34}, "end_point": {"row": 36, "column": 40}}, {"id": 61, "type": "identifier", "text": "name", "parent": 59, "children": [], "start_point": {"row": 36, "column": 42}, "end_point": {"row": 36, "column": 46}}, {"id": 62, "type": "identifier", "text": "args", "parent": 59, "children": [], "start_point": {"row": 36, "column": 48}, "end_point": {"row": 36, "column": 52}}, {"id": 63, "type": "identifier", "text": "n", "parent": 59, "children": [], "start_point": {"row": 36, "column": 54}, "end_point": {"row": 36, "column": 55}}, {"id": 64, "type": "call_expression", "text": "XmStringFree( label_text)", "parent": 6, "children": [65, 66], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 29}}, {"id": 65, "type": "identifier", "text": "XmStringFree", "parent": 64, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 16}}, {"id": 66, "type": "argument_list", "text": "( label_text)", "parent": 64, "children": [67], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 29}}, {"id": 67, "type": "identifier", "text": "label_text", "parent": 66, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 28}}, {"id": 68, "type": "return_statement", "text": "return( label_widget);", "parent": 6, "children": [69], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 26}}, {"id": 69, "type": "parenthesized_expression", "text": "( label_widget)", "parent": 68, "children": [70], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 25}}, {"id": 70, "type": "identifier", "text": "label_widget", "parent": 69, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 24}}]}, "node_categories": {"declarations": {"functions": [6, 8], "variables": [11, 14, 18, 22, 27, 30, 33], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [39, 43, 46, 51, 57, 64, 69], "assignments": [36, 54], "loops": [], "conditionals": [7, 9, 12, 13, 17, 21, 23, 26, 29, 31, 32, 34, 35, 37, 40, 42, 44, 47, 48, 49, 50, 52, 55, 58, 60, 61, 62, 63, 65, 67, 70], "returns": [68], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "n", "text_snippet": "Widget CreateLabelWidget ( Widget parent, char name[], char message[], \n\t\t\t\t\t\t\tArg *args, int n )\n/*"}, {"node_id": 8, "universal_type": "function", "name": "n", "text_snippet": "CreateLabelWidget ( Widget parent, char name[], char message[], \n\t\t\t\t\t\t\tArg *args, int n )"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"geminc.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"naltxt.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include \"geminc.h\"\n#include \"naltxt.h\"\n\n\nWidget CreateLabelWidget ( Widget parent, char name[], char message[], \n\t\t\t\t\t\t\tArg *args, int n )\n/************************************************************************\n * CreateLabelWidget\t\t\t\t\t\t\t*\n *\t\t\t\t\t\t\t\t\t*\n * Widget CreateLabelWidget(parent, name, message, args, n)\t\t*\n *\t\t\t\t\t\t\t\t\t*\n * Input parameters:\t\t\t\t\t\t\t*\n *\tparent\t\tWidget\t\t\t\t\t\t*\n *\tname[]\t\tchar\t\t\t\t\t\t*\n *\tmessage[]\tchar\t\t\t\t\t\t*\n *\t*args\t\tArg\t\t\t\t\t\t*\n *\tn\t\tint\t\t\t\t\t\t*\n **\t\t\t\t\t\t\t\t\t*\n ***********************************************************************/\n{\n Widget label_widget;\n XmString label_text;\n/*---------------------------------------------------------------------*/\n/*\n * Convert message to XmString\n */\n label_text = XmStringCreateLocalized( message );\n\n/*\n * Set label_text \n */\n XtSetArg( args[n], XmNlabelString, label_text ); n++;\n\n/*\n * Create label widget\n */\n label_widget = XmCreateLabel( parent, name, args, n );\n\n/*\n * Free the string\n */\n XmStringFree( label_text);\n\n return( label_widget);\n\n}\n"}
6
c
// Generated by Haxe 4.0.0-rc.2+77068e10c #ifndef INCLUDED_openfl_utils__Endian_Endian_Impl_ #define INCLUDED_openfl_utils__Endian_Endian_Impl_ #ifndef HXCPP_H #include <hxcpp.h> #endif HX_DECLARE_CLASS2(lime,_hx_system,Endian) HX_DECLARE_CLASS3(openfl,utils,_Endian,Endian_Impl_) namespace openfl{ namespace utils{ namespace _Endian{ class HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object { public: typedef hx::Object super; typedef Endian_Impl__obj OBJ_; Endian_Impl__obj(); public: enum { _hx_ClassId = 0x3bd39ce0 }; void __construct(); inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="openfl.utils._Endian.Endian_Impl_") { return hx::Object::operator new(inSize,inContainer,inName); } inline void *operator new(size_t inSize, int extra) { return hx::Object::operator new(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_"); } hx::ObjectPtr< Endian_Impl__obj > __new() { hx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj(); __this->__construct(); return __this; } static hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) { Endian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_")); *(void **)__this = Endian_Impl__obj::_hx_vtable; return __this; } static void * _hx_vtable; static Dynamic __CreateEmpty(); static Dynamic __Create(hx::DynamicArray inArgs); //~Endian_Impl__obj(); HX_DO_RTTI_ALL; static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp); static void __register(); bool _hx_isInstanceOf(int inClassId); ::String __ToString() const { return HX_("Endian_Impl_",9b,07,25,91); } static void __boot(); static ::Dynamic _hx_BIG_ENDIAN; static ::Dynamic _hx_LITTLE_ENDIAN; static ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value); static ::Dynamic fromLimeEndian_dyn(); static ::Dynamic fromString(::String value); static ::Dynamic fromString_dyn(); static ::lime::_hx_system::Endian toLimeEndian(int value); static ::Dynamic toLimeEndian_dyn(); static ::String toString(int value); static ::Dynamic toString_dyn(); }; } // end namespace openfl } // end namespace utils } // end namespace _Endian #endif /* INCLUDED_openfl_utils__Endian_Endian_Impl_ */
38.47
60
(translation_unit) "// Generated by Haxe 4.0.0-rc.2+77068e10c\n#ifndef INCLUDED_openfl_utils__Endian_Endian_Impl_\n#define INCLUDED_openfl_utils__Endian_Endian_Impl_\n\n#ifndef HXCPP_H\n#include <hxcpp.h>\n#endif\n\nHX_DECLARE_CLASS2(lime,_hx_system,Endian)\nHX_DECLARE_CLASS3(openfl,utils,_Endian,Endian_Impl_)\n\nnamespace openfl{\nnamespace utils{\nnamespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n public:\n typedef hx::Object super;\n typedef Endian_Impl__obj OBJ_;\n Endian_Impl__obj();\n\n public:\n enum { _hx_ClassId = 0x3bd39ce0 };\n\n void __construct();\n inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="openfl.utils._Endian.Endian_Impl_")\n { return hx::Object::operator new(inSize,inContainer,inName); }\n inline void *operator new(size_t inSize, int extra)\n { return hx::Object::operator new(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_"); }\n\n hx::ObjectPtr< Endian_Impl__obj > __new() {\n hx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n __this->__construct();\n return __this;\n }\n\n static hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n Endian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"));\n *(void **)__this = Endian_Impl__obj::_hx_vtable;\n return __this;\n }\n\n static void * _hx_vtable;\n static Dynamic __CreateEmpty();\n static Dynamic __Create(hx::DynamicArray inArgs);\n //~Endian_Impl__obj();\n\n HX_DO_RTTI_ALL;\n static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);\n static void __register();\n bool _hx_isInstanceOf(int inClassId);\n ::String __ToString() const { return HX_("Endian_Impl_",9b,07,25,91); }\n\n static void __boot();\n static ::Dynamic _hx_BIG_ENDIAN;\n static ::Dynamic _hx_LITTLE_ENDIAN;\n static ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);\n static ::Dynamic fromLimeEndian_dyn();\n\n static ::Dynamic fromString(::String value);\n static ::Dynamic fromString_dyn();\n\n static ::lime::_hx_system::Endian toLimeEndian(int value);\n static ::Dynamic toLimeEndian_dyn();\n\n static ::String toString(int value);\n static ::Dynamic toString_dyn();\n\n};\n\n} // end namespace openfl\n} // end namespace utils\n} // end namespace _Endian\n\n#endif /* INCLUDED_openfl_utils__Endian_Endian_Impl_ */ \n" (comment) "// Generated by Haxe 4.0.0-rc.2+77068e10c" (preproc_ifdef) "#ifndef INCLUDED_openfl_utils__Endian_Endian_Impl_\n#define INCLUDED_openfl_utils__Endian_Endian_Impl_\n\n#ifndef HXCPP_H\n#include <hxcpp.h>\n#endif\n\nHX_DECLARE_CLASS2(lime,_hx_system,Endian)\nHX_DECLARE_CLASS3(openfl,utils,_Endian,Endian_Impl_)\n\nnamespace openfl{\nnamespace utils{\nnamespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n public:\n typedef hx::Object super;\n typedef Endian_Impl__obj OBJ_;\n Endian_Impl__obj();\n\n public:\n enum { _hx_ClassId = 0x3bd39ce0 };\n\n void __construct();\n inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="openfl.utils._Endian.Endian_Impl_")\n { return hx::Object::operator new(inSize,inContainer,inName); }\n inline void *operator new(size_t inSize, int extra)\n { return hx::Object::operator new(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_"); }\n\n hx::ObjectPtr< Endian_Impl__obj > __new() {\n hx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n __this->__construct();\n return __this;\n }\n\n static hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n Endian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"));\n *(void **)__this = Endian_Impl__obj::_hx_vtable;\n return __this;\n }\n\n static void * _hx_vtable;\n static Dynamic __CreateEmpty();\n static Dynamic __Create(hx::DynamicArray inArgs);\n //~Endian_Impl__obj();\n\n HX_DO_RTTI_ALL;\n static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);\n static void __register();\n bool _hx_isInstanceOf(int inClassId);\n ::String __ToString() const { return HX_("Endian_Impl_",9b,07,25,91); }\n\n static void __boot();\n static ::Dynamic _hx_BIG_ENDIAN;\n static ::Dynamic _hx_LITTLE_ENDIAN;\n static ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);\n static ::Dynamic fromLimeEndian_dyn();\n\n static ::Dynamic fromString(::String value);\n static ::Dynamic fromString_dyn();\n\n static ::lime::_hx_system::Endian toLimeEndian(int value);\n static ::Dynamic toLimeEndian_dyn();\n\n static ::String toString(int value);\n static ::Dynamic toString_dyn();\n\n};\n\n} // end namespace openfl\n} // end namespace utils\n} // end namespace _Endian\n\n#endif" (#ifndef) "#ifndef" (identifier) "INCLUDED_openfl_utils__Endian_Endian_Impl_" (preproc_def) "#define INCLUDED_openfl_utils__Endian_Endian_Impl_\n" (#define) "#define" (identifier) "INCLUDED_openfl_utils__Endian_Endian_Impl_" (preproc_ifdef) "#ifndef HXCPP_H\n#include <hxcpp.h>\n#endif" (#ifndef) "#ifndef" (identifier) "HXCPP_H" (preproc_include) "#include <hxcpp.h>\n" (#include) "#include" (system_lib_string) "<hxcpp.h>" (#endif) "#endif" (expression_statement) "HX_DECLARE_CLASS2(lime,_hx_system,Endian)" (call_expression) "HX_DECLARE_CLASS2(lime,_hx_system,Endian)" (identifier) "HX_DECLARE_CLASS2" (argument_list) "(lime,_hx_system,Endian)" (() "(" (identifier) "lime" (,) "," (identifier) "_hx_system" (,) "," (identifier) "Endian" ()) ")" (;) "" (expression_statement) "HX_DECLARE_CLASS3(openfl,utils,_Endian,Endian_Impl_)" (call_expression) "HX_DECLARE_CLASS3(openfl,utils,_Endian,Endian_Impl_)" (identifier) "HX_DECLARE_CLASS3" (argument_list) "(openfl,utils,_Endian,Endian_Impl_)" (() "(" (identifier) "openfl" (,) "," (identifier) "utils" (,) "," (identifier) "_Endian" (,) "," (identifier) "Endian_Impl_" ()) ")" (;) "" (function_definition) "namespace openfl{\nnamespace utils{\nnamespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n public:\n typedef hx::Object super;\n typedef Endian_Impl__obj OBJ_;\n Endian_Impl__obj();\n\n public:\n enum { _hx_ClassId = 0x3bd39ce0 };\n\n void __construct();\n inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="openfl.utils._Endian.Endian_Impl_")\n { return hx::Object::operator new(inSize,inContainer,inName); }\n inline void *operator new(size_t inSize, int extra)\n { return hx::Object::operator new(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_"); }\n\n hx::ObjectPtr< Endian_Impl__obj > __new() {\n hx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n __this->__construct();\n return __this;\n }\n\n static hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n Endian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"));\n *(void **)__this = Endian_Impl__obj::_hx_vtable;\n return __this;\n }\n\n static void * _hx_vtable;\n static Dynamic __CreateEmpty();\n static Dynamic __Create(hx::DynamicArray inArgs);\n //~Endian_Impl__obj();\n\n HX_DO_RTTI_ALL;\n static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);\n static void __register();\n bool _hx_isInstanceOf(int inClassId);\n ::String __ToString() const { return HX_("Endian_Impl_",9b,07,25,91); }\n\n static void __boot();\n static ::Dynamic _hx_BIG_ENDIAN;\n static ::Dynamic _hx_LITTLE_ENDIAN;\n static ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);\n static ::Dynamic fromLimeEndian_dyn();\n\n static ::Dynamic fromString(::String value);\n static ::Dynamic fromString_dyn();\n\n static ::lime::_hx_system::Endian toLimeEndian(int value);\n static ::Dynamic toLimeEndian_dyn();\n\n static ::String toString(int value);\n static ::Dynamic toString_dyn();\n\n};\n\n} // end namespace openfl\n}" (type_identifier) "namespace" (identifier) "openfl" (compound_statement) "{\nnamespace utils{\nnamespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n public:\n typedef hx::Object super;\n typedef Endian_Impl__obj OBJ_;\n Endian_Impl__obj();\n\n public:\n enum { _hx_ClassId = 0x3bd39ce0 };\n\n void __construct();\n inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="openfl.utils._Endian.Endian_Impl_")\n { return hx::Object::operator new(inSize,inContainer,inName); }\n inline void *operator new(size_t inSize, int extra)\n { return hx::Object::operator new(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_"); }\n\n hx::ObjectPtr< Endian_Impl__obj > __new() {\n hx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n __this->__construct();\n return __this;\n }\n\n static hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n Endian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"));\n *(void **)__this = Endian_Impl__obj::_hx_vtable;\n return __this;\n }\n\n static void * _hx_vtable;\n static Dynamic __CreateEmpty();\n static Dynamic __Create(hx::DynamicArray inArgs);\n //~Endian_Impl__obj();\n\n HX_DO_RTTI_ALL;\n static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);\n static void __register();\n bool _hx_isInstanceOf(int inClassId);\n ::String __ToString() const { return HX_("Endian_Impl_",9b,07,25,91); }\n\n static void __boot();\n static ::Dynamic _hx_BIG_ENDIAN;\n static ::Dynamic _hx_LITTLE_ENDIAN;\n static ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);\n static ::Dynamic fromLimeEndian_dyn();\n\n static ::Dynamic fromString(::String value);\n static ::Dynamic fromString_dyn();\n\n static ::lime::_hx_system::Endian toLimeEndian(int value);\n static ::Dynamic toLimeEndian_dyn();\n\n static ::String toString(int value);\n static ::Dynamic toString_dyn();\n\n};\n\n} // end namespace openfl\n}" ({) "{" (function_definition) "namespace utils{\nnamespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n public:\n typedef hx::Object super;\n typedef Endian_Impl__obj OBJ_;\n Endian_Impl__obj();\n\n public:\n enum { _hx_ClassId = 0x3bd39ce0 };\n\n void __construct();\n inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="openfl.utils._Endian.Endian_Impl_")\n { return hx::Object::operator new(inSize,inContainer,inName); }\n inline void *operator new(size_t inSize, int extra)\n { return hx::Object::operator new(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_"); }\n\n hx::ObjectPtr< Endian_Impl__obj > __new() {\n hx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n __this->__construct();\n return __this;\n }\n\n static hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n Endian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"));\n *(void **)__this = Endian_Impl__obj::_hx_vtable;\n return __this;\n }\n\n static void * _hx_vtable;\n static Dynamic __CreateEmpty();\n static Dynamic __Create(hx::DynamicArray inArgs);\n //~Endian_Impl__obj();\n\n HX_DO_RTTI_ALL;\n static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);\n static void __register();\n bool _hx_isInstanceOf(int inClassId);\n ::String __ToString() const { return HX_("Endian_Impl_",9b,07,25,91); }\n\n static void __boot();\n static ::Dynamic _hx_BIG_ENDIAN;\n static ::Dynamic _hx_LITTLE_ENDIAN;\n static ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);\n static ::Dynamic fromLimeEndian_dyn();\n\n static ::Dynamic fromString(::String value);\n static ::Dynamic fromString_dyn();\n\n static ::lime::_hx_system::Endian toLimeEndian(int value);\n static ::Dynamic toLimeEndian_dyn();\n\n static ::String toString(int value);\n static ::Dynamic toString_dyn();\n\n};\n\n}" (type_identifier) "namespace" (identifier) "utils" (compound_statement) "{\nnamespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n public:\n typedef hx::Object super;\n typedef Endian_Impl__obj OBJ_;\n Endian_Impl__obj();\n\n public:\n enum { _hx_ClassId = 0x3bd39ce0 };\n\n void __construct();\n inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="openfl.utils._Endian.Endian_Impl_")\n { return hx::Object::operator new(inSize,inContainer,inName); }\n inline void *operator new(size_t inSize, int extra)\n { return hx::Object::operator new(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_"); }\n\n hx::ObjectPtr< Endian_Impl__obj > __new() {\n hx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n __this->__construct();\n return __this;\n }\n\n static hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n Endian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"));\n *(void **)__this = Endian_Impl__obj::_hx_vtable;\n return __this;\n }\n\n static void * _hx_vtable;\n static Dynamic __CreateEmpty();\n static Dynamic __Create(hx::DynamicArray inArgs);\n //~Endian_Impl__obj();\n\n HX_DO_RTTI_ALL;\n static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);\n static void __register();\n bool _hx_isInstanceOf(int inClassId);\n ::String __ToString() const { return HX_("Endian_Impl_",9b,07,25,91); }\n\n static void __boot();\n static ::Dynamic _hx_BIG_ENDIAN;\n static ::Dynamic _hx_LITTLE_ENDIAN;\n static ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);\n static ::Dynamic fromLimeEndian_dyn();\n\n static ::Dynamic fromString(::String value);\n static ::Dynamic fromString_dyn();\n\n static ::lime::_hx_system::Endian toLimeEndian(int value);\n static ::Dynamic toLimeEndian_dyn();\n\n static ::String toString(int value);\n static ::Dynamic toString_dyn();\n\n};\n\n}" ({) "{" (function_definition) "namespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n public:\n typedef hx::Object super;\n typedef Endian_Impl__obj OBJ_;\n Endian_Impl__obj();\n\n public:\n enum { _hx_ClassId = 0x3bd39ce0 };\n\n void __construct();\n inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="openfl.utils._Endian.Endian_Impl_")\n { return hx::Object::operator new(inSize,inContainer,inName); }\n inline void *operator new(size_t inSize, int extra)\n { return hx::Object::operator new(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_"); }\n\n hx::ObjectPtr< Endian_Impl__obj > __new() {\n hx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n __this->__construct();\n return __this;\n }\n\n static hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n Endian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"));\n *(void **)__this = Endian_Impl__obj::_hx_vtable;\n return __this;\n }\n\n static void * _hx_vtable;\n static Dynamic __CreateEmpty();\n static Dynamic __Create(hx::DynamicArray inArgs);\n //~Endian_Impl__obj();\n\n HX_DO_RTTI_ALL;\n static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);\n static void __register();\n bool _hx_isInstanceOf(int inClassId);\n ::String __ToString() const { return HX_("Endian_Impl_",9b,07,25,91); }\n\n static void __boot();\n static ::Dynamic _hx_BIG_ENDIAN;\n static ::Dynamic _hx_LITTLE_ENDIAN;\n static ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);\n static ::Dynamic fromLimeEndian_dyn();\n\n static ::Dynamic fromString(::String value);\n static ::Dynamic fromString_dyn();\n\n static ::lime::_hx_system::Endian toLimeEndian(int value);\n static ::Dynamic toLimeEndian_dyn();\n\n static ::String toString(int value);\n static ::Dynamic toString_dyn();\n\n}" (type_identifier) "namespace" (identifier) "_Endian" (compound_statement) "{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n public:\n typedef hx::Object super;\n typedef Endian_Impl__obj OBJ_;\n Endian_Impl__obj();\n\n public:\n enum { _hx_ClassId = 0x3bd39ce0 };\n\n void __construct();\n inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="openfl.utils._Endian.Endian_Impl_")\n { return hx::Object::operator new(inSize,inContainer,inName); }\n inline void *operator new(size_t inSize, int extra)\n { return hx::Object::operator new(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_"); }\n\n hx::ObjectPtr< Endian_Impl__obj > __new() {\n hx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n __this->__construct();\n return __this;\n }\n\n static hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n Endian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"));\n *(void **)__this = Endian_Impl__obj::_hx_vtable;\n return __this;\n }\n\n static void * _hx_vtable;\n static Dynamic __CreateEmpty();\n static Dynamic __Create(hx::DynamicArray inArgs);\n //~Endian_Impl__obj();\n\n HX_DO_RTTI_ALL;\n static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);\n static void __register();\n bool _hx_isInstanceOf(int inClassId);\n ::String __ToString() const { return HX_("Endian_Impl_",9b,07,25,91); }\n\n static void __boot();\n static ::Dynamic _hx_BIG_ENDIAN;\n static ::Dynamic _hx_LITTLE_ENDIAN;\n static ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);\n static ::Dynamic fromLimeEndian_dyn();\n\n static ::Dynamic fromString(::String value);\n static ::Dynamic fromString_dyn();\n\n static ::lime::_hx_system::Endian toLimeEndian(int value);\n static ::Dynamic toLimeEndian_dyn();\n\n static ::String toString(int value);\n static ::Dynamic toString_dyn();\n\n}" ({) "{" (declaration) "class HXCPP_CLASS_ATTRIBUTES" (type_identifier) "class" (identifier) "HXCPP_CLASS_ATTRIBUTES" (;) "" (labeled_statement) "Endian_Impl__obj : public hx::Object\n{\n public:\n typedef hx::Object super;\n typedef Endian_Impl__obj OBJ_;\n Endian_Impl__obj();\n\n public:\n enum { _hx_ClassId = 0x3bd39ce0 };\n\n void __construct();\n inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="openfl.utils._Endian.Endian_Impl_")\n { return hx::Object::operator new(inSize,inContainer,inName); }" (statement_identifier) "Endian_Impl__obj" (:) ":" (ERROR) "public hx::Object" (type_identifier) "public" (ERROR) "hx::" (identifier) "hx" (:) ":" (:) ":" (identifier) "Object" (compound_statement) "{\n public:\n typedef hx::Object super;\n typedef Endian_Impl__obj OBJ_;\n Endian_Impl__obj();\n\n public:\n enum { _hx_ClassId = 0x3bd39ce0 };\n\n void __construct();\n inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="openfl.utils._Endian.Endian_Impl_")\n { return hx::Object::operator new(inSize,inContainer,inName); }" ({) "{" (labeled_statement) "public:\n typedef hx::Object super;" (statement_identifier) "public" (ERROR) ":\n typedef hx:" (:) ":" (type_identifier) "typedef" (identifier) "hx" (:) ":" (:) ":" (declaration) "Object super;" (type_identifier) "Object" (identifier) "super" (;) ";" (type_definition) "typedef Endian_Impl__obj OBJ_;" (typedef) "typedef" (type_identifier) "Endian_Impl__obj" (type_identifier) "OBJ_" (;) ";" (expression_statement) "Endian_Impl__obj();" (call_expression) "Endian_Impl__obj()" (identifier) "Endian_Impl__obj" (argument_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "public:\n enum { _hx_ClassId = 0x3bd39ce0 };" (statement_identifier) "public" (:) ":" (declaration) "enum { _hx_ClassId = 0x3bd39ce0 };" (enum_specifier) "enum { _hx_ClassId = 0x3bd39ce0 }" (enum) "enum" (enumerator_list) "{ _hx_ClassId = 0x3bd39ce0 }" ({) "{" (enumerator) "_hx_ClassId = 0x3bd39ce0" (identifier) "_hx_ClassId" (=) "=" (number_literal) "0x3bd39ce0" (}) "}" (identifier) "" (;) ";" (declaration) "void __construct();" (primitive_type) "void" (function_declarator) "__construct()" (identifier) "__construct" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "inline void *operator new(size_t inSize, bool inContainer=false,const char *inName="openfl.utils._Endian.Endian_Impl_")\n { return hx::Object::operator new(inSize,inContainer,inName);" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (init_declarator) "*operator new(size_t inSize, bool inContainer=false" (pointer_declarator) "*operator new(size_t inSize, bool inContainer" (*) "*" (ERROR) "operator" (identifier) "operator" (function_declarator) "new(size_t inSize, bool inContainer" (identifier) "new" (parameter_list) "(size_t inSize, bool inContainer" (() "(" (parameter_declaration) "size_t inSize" (primitive_type) "size_t" (identifier) "inSize" (,) "," (parameter_declaration) "bool inContainer" (primitive_type) "bool" (identifier) "inContainer" ()) "" (=) "=" (false) "false" (,) "," (ERROR) "const char" (identifier) "const" (identifier) "char" (init_declarator) "*inName="openfl.utils._Endian.Endian_Impl_")\n { return hx::Object::operator new(inSize,inContainer,inName)" (pointer_declarator) "*inName" (*) "*" (identifier) "inName" (=) "=" (ERROR) ""openfl.utils._Endian.Endian_Impl_")" (string_literal) ""openfl.utils._Endian.Endian_Impl_"" (") """ (string_content) "openfl.utils._Endian.Endian_Impl_" (") """ ()) ")" (initializer_list) "{ return hx::Object::operator new(inSize,inContainer,inName)" ({) "{" (initializer_pair) "return hx::Object::operator new(inSize,inContainer,inName)" (field_identifier) "return" (ERROR) "hx::Object:" (identifier) "hx" (:) ":" (:) ":" (identifier) "Object" (:) ":" (:) ":" (ERROR) "operator" (identifier) "operator" (call_expression) "new(inSize,inContainer,inName)" (identifier) "new" (argument_list) "(inSize,inContainer,inName)" (() "(" (identifier) "inSize" (,) "," (identifier) "inContainer" (,) "," (identifier) "inName" ()) ")" (}) "" (;) ";" (}) "}" (function_definition) "inline void *operator new(size_t inSize, int extra)\n { return hx::Object::operator new(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_"); }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (pointer_declarator) "*operator new(size_t inSize, int extra)" (*) "*" (ERROR) "operator" (identifier) "operator" (function_declarator) "new(size_t inSize, int extra)" (identifier) "new" (parameter_list) "(size_t inSize, int extra)" (() "(" (parameter_declaration) "size_t inSize" (primitive_type) "size_t" (identifier) "inSize" (,) "," (parameter_declaration) "int extra" (primitive_type) "int" (identifier) "extra" ()) ")" (compound_statement) "{ return hx::Object::operator new(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_"); }" ({) "{" (return_statement) "return hx::Object::operator new(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_");" (return) "return" (ERROR) "hx::Object::operator" (identifier) "hx" (:) ":" (:) ":" (identifier) "Object" (:) ":" (:) ":" (identifier) "operator" (call_expression) "new(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_")" (identifier) "new" (argument_list) "(inSize+extra,false,"openfl.utils._Endian.Endian_Impl_")" (() "(" (binary_expression) "inSize+extra" (identifier) "inSize" (+) "+" (identifier) "extra" (,) "," (false) "false" (,) "," (string_literal) ""openfl.utils._Endian.Endian_Impl_"" (") """ (string_content) "openfl.utils._Endian.Endian_Impl_" (") """ ()) ")" (;) ";" (}) "}" (labeled_statement) "hx::ObjectPtr< Endian_Impl__obj > __new() {\n hx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n __this->__construct();\n return __this;\n }" (statement_identifier) "hx" (:) ":" (ERROR) ":ObjectPtr< Endian_Impl__obj > __new()" (:) ":" (binary_expression) "ObjectPtr< Endian_Impl__obj > __new()" (binary_expression) "ObjectPtr< Endian_Impl__obj" (identifier) "ObjectPtr" (<) "<" (identifier) "Endian_Impl__obj" (>) ">" (call_expression) "__new()" (identifier) "__new" (argument_list) "()" (() "(" ()) ")" (compound_statement) "{\n hx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n __this->__construct();\n return __this;\n }" ({) "{" (labeled_statement) "hx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();" (statement_identifier) "hx" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();" (binary_expression) "ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj()" (binary_expression) "ObjectPtr< Endian_Impl__obj" (identifier) "ObjectPtr" (<) "<" (identifier) "Endian_Impl__obj" (>) ">" (assignment_expression) "__this = new Endian_Impl__obj()" (identifier) "__this" (=) "=" (ERROR) "new" (identifier) "new" (call_expression) "Endian_Impl__obj()" (identifier) "Endian_Impl__obj" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "__this->__construct();" (call_expression) "__this->__construct()" (field_expression) "__this->__construct" (identifier) "__this" (->) "->" (field_identifier) "__construct" (argument_list) "()" (() "(" ()) ")" (;) ";" (return_statement) "return __this;" (return) "return" (identifier) "__this" (;) ";" (}) "}" (function_definition) "static hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n Endian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"));\n *(void **)__this = Endian_Impl__obj::_hx_vtable;\n return __this;\n }" (storage_class_specifier) "static" (static) "static" (type_identifier) "hx" (ERROR) "::ObjectPtr< Endian_Impl__obj >" (:) ":" (:) ":" (identifier) "ObjectPtr" (<) "<" (identifier) "Endian_Impl__obj" (>) ">" (function_declarator) "__alloc(hx::Ctx *_hx_ctx)" (identifier) "__alloc" (parameter_list) "(hx::Ctx *_hx_ctx)" (() "(" (parameter_declaration) "hx::Ctx *_hx_ctx" (type_identifier) "hx" (ERROR) "::Ctx" (:) ":" (:) ":" (identifier) "Ctx" (pointer_declarator) "*_hx_ctx" (*) "*" (identifier) "_hx_ctx" ()) ")" (compound_statement) "{\n Endian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"));\n *(void **)__this = Endian_Impl__obj::_hx_vtable;\n return __this;\n }" ({) "{" (declaration) "Endian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"));" (type_identifier) "Endian_Impl__obj" (init_declarator) "*__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"))" (pointer_declarator) "*__this" (*) "*" (identifier) "__this" (=) "=" (cast_expression) "(Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"))" (() "(" (type_descriptor) "Endian_Impl__obj*" (type_identifier) "Endian_Impl__obj" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (parenthesized_expression) "(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_"))" (() "(" (ERROR) "hx::Ctx::" (identifier) "hx" (:) ":" (:) ":" (identifier) "Ctx" (:) ":" (:) ":" (call_expression) "alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_")" (identifier) "alloc" (argument_list) "(_hx_ctx, sizeof(Endian_Impl__obj), false, "openfl.utils._Endian.Endian_Impl_")" (() "(" (identifier) "_hx_ctx" (,) "," (sizeof_expression) "sizeof(Endian_Impl__obj)" (sizeof) "sizeof" (parenthesized_expression) "(Endian_Impl__obj)" (() "(" (identifier) "Endian_Impl__obj" ()) ")" (,) "," (false) "false" (,) "," (string_literal) ""openfl.utils._Endian.Endian_Impl_"" (") """ (string_content) "openfl.utils._Endian.Endian_Impl_" (") """ ()) ")" ()) ")" (;) ";" (expression_statement) "*(void **)__this = Endian_Impl__obj::_hx_vtable;" (assignment_expression) "*(void **)__this = Endian_Impl__obj" (pointer_expression) "*(void **)__this" (*) "*" (cast_expression) "(void **)__this" (() "(" (type_descriptor) "void **" (primitive_type) "void" (abstract_pointer_declarator) "**" (*) "*" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "__this" (=) "=" (identifier) "Endian_Impl__obj" (ERROR) "::_hx_vtable" (:) ":" (:) ":" (identifier) "_hx_vtable" (;) ";" (return_statement) "return __this;" (return) "return" (identifier) "__this" (;) ";" (}) "}" (declaration) "static void * _hx_vtable;" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (pointer_declarator) "* _hx_vtable" (*) "*" (identifier) "_hx_vtable" (;) ";" (declaration) "static Dynamic __CreateEmpty();" (storage_class_specifier) "static" (static) "static" (type_identifier) "Dynamic" (function_declarator) "__CreateEmpty()" (identifier) "__CreateEmpty" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static Dynamic __Create(hx::DynamicArray inArgs);" (storage_class_specifier) "static" (static) "static" (type_identifier) "Dynamic" (function_declarator) "__Create(hx::DynamicArray inArgs)" (identifier) "__Create" (parameter_list) "(hx::DynamicArray inArgs)" (() "(" (parameter_declaration) "hx::DynamicArray inArgs" (type_identifier) "hx" (ERROR) "::DynamicArray" (:) ":" (:) ":" (identifier) "DynamicArray" (identifier) "inArgs" ()) ")" (;) ";" (comment) "//~Endian_Impl__obj();" (expression_statement) "HX_DO_RTTI_ALL;" (identifier) "HX_DO_RTTI_ALL" (;) ";" (declaration) "static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);" (storage_class_specifier) "static" (static) "static" (primitive_type) "bool" (function_declarator) "__GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp)" (identifier) "__GetStatic" (parameter_list) "(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp)" (() "(" (parameter_declaration) "const ::String &inString" (type_qualifier) "const" (const) "const" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "String" (ERROR) "&" (&) "&" (identifier) "inString" (,) "," (parameter_declaration) "Dynamic &outValue" (type_identifier) "Dynamic" (ERROR) "&" (&) "&" (identifier) "outValue" (,) "," (parameter_declaration) "hx::PropertyAccess inCallProp" (type_identifier) "hx" (ERROR) "::PropertyAccess" (:) ":" (:) ":" (identifier) "PropertyAccess" (identifier) "inCallProp" ()) ")" (;) ";" (declaration) "static void __register();" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "__register()" (identifier) "__register" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool _hx_isInstanceOf(int inClassId);" (primitive_type) "bool" (function_declarator) "_hx_isInstanceOf(int inClassId)" (identifier) "_hx_isInstanceOf" (parameter_list) "(int inClassId)" (() "(" (parameter_declaration) "int inClassId" (primitive_type) "int" (identifier) "inClassId" ()) ")" (;) ";" (ERROR) "::String __ToString() const" (:) ":" (:) ":" (type_identifier) "String" (function_declarator) "__ToString()" (identifier) "__ToString" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return HX_("Endian_Impl_",9b,07,25,91); }" ({) "{" (return_statement) "return HX_("Endian_Impl_",9b,07,25,91);" (return) "return" (call_expression) "HX_("Endian_Impl_",9b,07,25,91)" (identifier) "HX_" (argument_list) "("Endian_Impl_",9b,07,25,91)" (() "(" (string_literal) ""Endian_Impl_"" (") """ (string_content) "Endian_Impl_" (") """ (,) "," (number_literal) "9b" (,) "," (number_literal) "07" (,) "," (number_literal) "25" (,) "," (number_literal) "91" ()) ")" (;) ";" (}) "}" (declaration) "static void __boot();" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "__boot()" (identifier) "__boot" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static ::Dynamic _hx_BIG_ENDIAN;" (storage_class_specifier) "static" (static) "static" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "Dynamic" (identifier) "_hx_BIG_ENDIAN" (;) ";" (declaration) "static ::Dynamic _hx_LITTLE_ENDIAN;" (storage_class_specifier) "static" (static) "static" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "Dynamic" (identifier) "_hx_LITTLE_ENDIAN" (;) ";" (declaration) "static ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);" (storage_class_specifier) "static" (static) "static" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "Dynamic" (function_declarator) "fromLimeEndian( ::lime::_hx_system::Endian value)" (identifier) "fromLimeEndian" (parameter_list) "( ::lime::_hx_system::Endian value)" (() "(" (ERROR) "::" (:) ":" (:) ":" (parameter_declaration) "lime::_hx_system::Endian value" (type_identifier) "lime" (ERROR) "::_hx_system::Endian" (:) ":" (:) ":" (identifier) "_hx_system" (:) ":" (:) ":" (identifier) "Endian" (identifier) "value" ()) ")" (;) ";" (declaration) "static ::Dynamic fromLimeEndian_dyn();" (storage_class_specifier) "static" (static) "static" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "Dynamic" (function_declarator) "fromLimeEndian_dyn()" (identifier) "fromLimeEndian_dyn" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static ::Dynamic fromString(::String value);" (storage_class_specifier) "static" (static) "static" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "Dynamic" (function_declarator) "fromString(::String value)" (identifier) "fromString" (parameter_list) "(::String value)" (() "(" (ERROR) "::" (:) ":" (:) ":" (parameter_declaration) "String value" (type_identifier) "String" (identifier) "value" ()) ")" (;) ";" (declaration) "static ::Dynamic fromString_dyn();" (storage_class_specifier) "static" (static) "static" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "Dynamic" (function_declarator) "fromString_dyn()" (identifier) "fromString_dyn" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static ::lime::_hx_system::Endian toLimeEndian(int value);" (storage_class_specifier) "static" (static) "static" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "lime" (ERROR) "::_hx_system::Endian" (:) ":" (:) ":" (identifier) "_hx_system" (:) ":" (:) ":" (identifier) "Endian" (function_declarator) "toLimeEndian(int value)" (identifier) "toLimeEndian" (parameter_list) "(int value)" (() "(" (parameter_declaration) "int value" (primitive_type) "int" (identifier) "value" ()) ")" (;) ";" (declaration) "static ::Dynamic toLimeEndian_dyn();" (storage_class_specifier) "static" (static) "static" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "Dynamic" (function_declarator) "toLimeEndian_dyn()" (identifier) "toLimeEndian_dyn" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static ::String toString(int value);" (storage_class_specifier) "static" (static) "static" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "String" (function_declarator) "toString(int value)" (identifier) "toString" (parameter_list) "(int value)" (() "(" (parameter_declaration) "int value" (primitive_type) "int" (identifier) "value" ()) ")" (;) ";" (declaration) "static ::Dynamic toString_dyn();" (storage_class_specifier) "static" (static) "static" (ERROR) "::" (:) ":" (:) ":" (type_identifier) "Dynamic" (function_declarator) "toString_dyn()" (identifier) "toString_dyn" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// end namespace openfl" (}) "}" (comment) "// end namespace utils" (ERROR) "}" (}) "}" (comment) "// end namespace _Endian" (#endif) "#endif" (comment) "/* INCLUDED_openfl_utils__Endian_Endian_Impl_ */"
691
38
{"language": "c", "success": true, "metadata": {"lines": 60, "avg_line_length": 38.47, "nodes": 367, "errors": 0, "source_hash": "7e1ae4db4f7668b2094b3d9a49fd5a749426901c42470eaa5b6133e0d02d7c4e", "categorized_nodes": 250}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef INCLUDED_openfl_utils__Endian_Endian_Impl_\n#define INCLUDED_openfl_utils__Endian_Endian_Impl_\n\n#ifndef HXCPP_H\n#include <hxcpp.h>\n#endif\n\nHX_DECLARE_CLASS2(lime,_hx_system,Endian)\nHX_DECLARE_CLASS3(openfl,utils,_Endian,Endian_Impl_)\n\nnamespace openfl{\nnamespace utils{\nnamespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n\tpublic:\n\t\ttypedef hx::Object super;\n\t\ttypedef Endian_Impl__obj OBJ_;\n\t\tEndian_Impl__obj();\n\n\tpublic:\n\t\tenum { _hx_ClassId = 0x3bd39ce0 };\n\n\t\tvoid __construct();\n\t\tinline void *operator new(size_t inSize, bool inContainer=false,const char *inName=\"openfl.utils._Endian.Endian_Impl_\")\n\t\t\t{ return hx::Object::operator new(inSize,inContainer,inName); }\n\t\tinline void *operator new(size_t inSize, int extra)\n\t\t\t{ return hx::Object::operator new(inSize+extra,false,\"openfl.utils._Endian.Endian_Impl_\"); }\n\n\t\thx::ObjectPtr< Endian_Impl__obj > __new() {\n\t\t\thx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n\t\t\t__this->__construct();\n\t\t\treturn __this;\n\t\t}\n\n\t\tstatic hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n\t\t\tEndian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, \"openfl.utils._Endian.Endian_Impl_\"));\n\t\t\t*(void **)__this = Endian_Impl__obj::_hx_vtable;\n\t\t\treturn __this;\n\t\t}\n\n\t\tstatic void * _hx_vtable;\n\t\tstatic Dynamic __CreateEmpty();\n\t\tstatic Dynamic __Create(hx::DynamicArray inArgs);\n\t\t//~Endian_Impl__obj();\n\n\t\tHX_DO_RTTI_ALL;\n\t\tstatic bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);\n\t\tstatic void __register();\n\t\tbool _hx_isInstanceOf(int inClassId);\n\t\t::String __ToString() const { return HX_(\"Endian_Impl_\",9b,07,25,91); }\n\n\t\tstatic void __boot();\n\t\tstatic ::Dynamic _hx_BIG_ENDIAN;\n\t\tstatic ::Dynamic _hx_LITTLE_ENDIAN;\n\t\tstatic ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);\n\t\tstatic ::Dynamic fromLimeEndian_dyn();\n\n\t\tstatic ::Dynamic fromString(::String value);\n\t\tstatic ::Dynamic fromString_dyn();\n\n\t\tstatic ::lime::_hx_system::Endian toLimeEndian(int value);\n\t\tstatic ::Dynamic toLimeEndian_dyn();\n\n\t\tstatic ::String toString(int value);\n\t\tstatic ::Dynamic toString_dyn();\n\n};\n\n} // end namespace openfl\n} // end namespace utils\n} // end namespace _Endian\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 26, 366], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 76, "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": "INCLUDED_openfl_utils__Endian_Endian_Impl_", "parent": 0, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 50}}, {"id": 3, "type": "preproc_def", "text": "#define INCLUDED_openfl_utils__Endian_Endian_Impl_\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": "INCLUDED_openfl_utils__Endian_Endian_Impl_", "parent": 3, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 50}}, {"id": 6, "type": "preproc_ifdef", "text": "#ifndef HXCPP_H\n#include <hxcpp.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": "#ifndef", "text": "#ifndef", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 8, "type": "identifier", "text": "HXCPP_H", "parent": 6, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 15}}, {"id": 9, "type": "preproc_include", "text": "#include <hxcpp.h>\n", "parent": 6, "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": "<hxcpp.h>", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 18}}, {"id": 12, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 6}}, {"id": 13, "type": "call_expression", "text": "HX_DECLARE_CLASS2(lime,_hx_system,Endian)", "parent": 0, "children": [14, 15], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 41}}, {"id": 14, "type": "identifier", "text": "HX_DECLARE_CLASS2", "parent": 13, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 17}}, {"id": 15, "type": "argument_list", "text": "(lime,_hx_system,Endian)", "parent": 13, "children": [16, 17, 18], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 41}}, {"id": 16, "type": "identifier", "text": "lime", "parent": 15, "children": [], "start_point": {"row": 8, "column": 18}, "end_point": {"row": 8, "column": 22}}, {"id": 17, "type": "identifier", "text": "_hx_system", "parent": 15, "children": [], "start_point": {"row": 8, "column": 23}, "end_point": {"row": 8, "column": 33}}, {"id": 18, "type": "identifier", "text": "Endian", "parent": 15, "children": [], "start_point": {"row": 8, "column": 34}, "end_point": {"row": 8, "column": 40}}, {"id": 19, "type": "call_expression", "text": "HX_DECLARE_CLASS3(openfl,utils,_Endian,Endian_Impl_)", "parent": 0, "children": [20, 21], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 52}}, {"id": 20, "type": "identifier", "text": "HX_DECLARE_CLASS3", "parent": 19, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 17}}, {"id": 21, "type": "argument_list", "text": "(openfl,utils,_Endian,Endian_Impl_)", "parent": 19, "children": [22, 23, 24, 25], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 52}}, {"id": 22, "type": "identifier", "text": "openfl", "parent": 21, "children": [], "start_point": {"row": 9, "column": 18}, "end_point": {"row": 9, "column": 24}}, {"id": 23, "type": "identifier", "text": "utils", "parent": 21, "children": [], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 30}}, {"id": 24, "type": "identifier", "text": "_Endian", "parent": 21, "children": [], "start_point": {"row": 9, "column": 31}, "end_point": {"row": 9, "column": 38}}, {"id": 25, "type": "identifier", "text": "Endian_Impl_", "parent": 21, "children": [], "start_point": {"row": 9, "column": 39}, "end_point": {"row": 9, "column": 51}}, {"id": 26, "type": "function_definition", "text": "namespace openfl{\nnamespace utils{\nnamespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n\tpublic:\n\t\ttypedef hx::Object super;\n\t\ttypedef Endian_Impl__obj OBJ_;\n\t\tEndian_Impl__obj();\n\n\tpublic:\n\t\tenum { _hx_ClassId = 0x3bd39ce0 };\n\n\t\tvoid __construct();\n\t\tinline void *operator new(size_t inSize, bool inContainer=false,const char *inName=\"openfl.utils._Endian.Endian_Impl_\")\n\t\t\t{ return hx::Object::operator new(inSize,inContainer,inName); }\n\t\tinline void *operator new(size_t inSize, int extra)\n\t\t\t{ return hx::Object::operator new(inSize+extra,false,\"openfl.utils._Endian.Endian_Impl_\"); }\n\n\t\thx::ObjectPtr< Endian_Impl__obj > __new() {\n\t\t\thx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n\t\t\t__this->__construct();\n\t\t\treturn __this;\n\t\t}\n\n\t\tstatic hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n\t\t\tEndian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, \"openfl.utils._Endian.Endian_Impl_\"));\n\t\t\t*(void **)__this = Endian_Impl__obj::_hx_vtable;\n\t\t\treturn __this;\n\t\t}\n\n\t\tstatic void * _hx_vtable;\n\t\tstatic Dynamic __CreateEmpty();\n\t\tstatic Dynamic __Create(hx::DynamicArray inArgs);\n\t\t//~Endian_Impl__obj();\n\n\t\tHX_DO_RTTI_ALL;\n\t\tstatic bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);\n\t\tstatic void __register();\n\t\tbool _hx_isInstanceOf(int inClassId);\n\t\t::String __ToString() const { return HX_(\"Endian_Impl_\",9b,07,25,91); }\n\n\t\tstatic void __boot();\n\t\tstatic ::Dynamic _hx_BIG_ENDIAN;\n\t\tstatic ::Dynamic _hx_LITTLE_ENDIAN;\n\t\tstatic ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);\n\t\tstatic ::Dynamic fromLimeEndian_dyn();\n\n\t\tstatic ::Dynamic fromString(::String value);\n\t\tstatic ::Dynamic fromString_dyn();\n\n\t\tstatic ::lime::_hx_system::Endian toLimeEndian(int value);\n\t\tstatic ::Dynamic toLimeEndian_dyn();\n\n\t\tstatic ::String toString(int value);\n\t\tstatic ::Dynamic toString_dyn();\n\n};\n\n} // end namespace openfl\n}", "parent": 0, "children": [27, 28], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 73, "column": 1}}, {"id": 27, "type": "type_identifier", "text": "namespace", "parent": 26, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 9}}, {"id": 28, "type": "identifier", "text": "openfl", "parent": 26, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 16}}, {"id": 29, "type": "function_definition", "text": "namespace utils{\nnamespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n\tpublic:\n\t\ttypedef hx::Object super;\n\t\ttypedef Endian_Impl__obj OBJ_;\n\t\tEndian_Impl__obj();\n\n\tpublic:\n\t\tenum { _hx_ClassId = 0x3bd39ce0 };\n\n\t\tvoid __construct();\n\t\tinline void *operator new(size_t inSize, bool inContainer=false,const char *inName=\"openfl.utils._Endian.Endian_Impl_\")\n\t\t\t{ return hx::Object::operator new(inSize,inContainer,inName); }\n\t\tinline void *operator new(size_t inSize, int extra)\n\t\t\t{ return hx::Object::operator new(inSize+extra,false,\"openfl.utils._Endian.Endian_Impl_\"); }\n\n\t\thx::ObjectPtr< Endian_Impl__obj > __new() {\n\t\t\thx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n\t\t\t__this->__construct();\n\t\t\treturn __this;\n\t\t}\n\n\t\tstatic hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n\t\t\tEndian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, \"openfl.utils._Endian.Endian_Impl_\"));\n\t\t\t*(void **)__this = Endian_Impl__obj::_hx_vtable;\n\t\t\treturn __this;\n\t\t}\n\n\t\tstatic void * _hx_vtable;\n\t\tstatic Dynamic __CreateEmpty();\n\t\tstatic Dynamic __Create(hx::DynamicArray inArgs);\n\t\t//~Endian_Impl__obj();\n\n\t\tHX_DO_RTTI_ALL;\n\t\tstatic bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);\n\t\tstatic void __register();\n\t\tbool _hx_isInstanceOf(int inClassId);\n\t\t::String __ToString() const { return HX_(\"Endian_Impl_\",9b,07,25,91); }\n\n\t\tstatic void __boot();\n\t\tstatic ::Dynamic _hx_BIG_ENDIAN;\n\t\tstatic ::Dynamic _hx_LITTLE_ENDIAN;\n\t\tstatic ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);\n\t\tstatic ::Dynamic fromLimeEndian_dyn();\n\n\t\tstatic ::Dynamic fromString(::String value);\n\t\tstatic ::Dynamic fromString_dyn();\n\n\t\tstatic ::lime::_hx_system::Endian toLimeEndian(int value);\n\t\tstatic ::Dynamic toLimeEndian_dyn();\n\n\t\tstatic ::String toString(int value);\n\t\tstatic ::Dynamic toString_dyn();\n\n};\n\n}", "parent": 26, "children": [30, 31], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 72, "column": 1}}, {"id": 30, "type": "type_identifier", "text": "namespace", "parent": 29, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 9}}, {"id": 31, "type": "identifier", "text": "utils", "parent": 29, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 15}}, {"id": 32, "type": "function_definition", "text": "namespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n\tpublic:\n\t\ttypedef hx::Object super;\n\t\ttypedef Endian_Impl__obj OBJ_;\n\t\tEndian_Impl__obj();\n\n\tpublic:\n\t\tenum { _hx_ClassId = 0x3bd39ce0 };\n\n\t\tvoid __construct();\n\t\tinline void *operator new(size_t inSize, bool inContainer=false,const char *inName=\"openfl.utils._Endian.Endian_Impl_\")\n\t\t\t{ return hx::Object::operator new(inSize,inContainer,inName); }\n\t\tinline void *operator new(size_t inSize, int extra)\n\t\t\t{ return hx::Object::operator new(inSize+extra,false,\"openfl.utils._Endian.Endian_Impl_\"); }\n\n\t\thx::ObjectPtr< Endian_Impl__obj > __new() {\n\t\t\thx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n\t\t\t__this->__construct();\n\t\t\treturn __this;\n\t\t}\n\n\t\tstatic hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n\t\t\tEndian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, \"openfl.utils._Endian.Endian_Impl_\"));\n\t\t\t*(void **)__this = Endian_Impl__obj::_hx_vtable;\n\t\t\treturn __this;\n\t\t}\n\n\t\tstatic void * _hx_vtable;\n\t\tstatic Dynamic __CreateEmpty();\n\t\tstatic Dynamic __Create(hx::DynamicArray inArgs);\n\t\t//~Endian_Impl__obj();\n\n\t\tHX_DO_RTTI_ALL;\n\t\tstatic bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);\n\t\tstatic void __register();\n\t\tbool _hx_isInstanceOf(int inClassId);\n\t\t::String __ToString() const { return HX_(\"Endian_Impl_\",9b,07,25,91); }\n\n\t\tstatic void __boot();\n\t\tstatic ::Dynamic _hx_BIG_ENDIAN;\n\t\tstatic ::Dynamic _hx_LITTLE_ENDIAN;\n\t\tstatic ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);\n\t\tstatic ::Dynamic fromLimeEndian_dyn();\n\n\t\tstatic ::Dynamic fromString(::String value);\n\t\tstatic ::Dynamic fromString_dyn();\n\n\t\tstatic ::lime::_hx_system::Endian toLimeEndian(int value);\n\t\tstatic ::Dynamic toLimeEndian_dyn();\n\n\t\tstatic ::String toString(int value);\n\t\tstatic ::Dynamic toString_dyn();\n\n}", "parent": 29, "children": [33, 34], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 70, "column": 1}}, {"id": 33, "type": "type_identifier", "text": "namespace", "parent": 32, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 9}}, {"id": 34, "type": "identifier", "text": "_Endian", "parent": 32, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 17}}, {"id": 35, "type": "declaration", "text": "class HXCPP_CLASS_ATTRIBUTES", "parent": 32, "children": [36], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 28}}, {"id": 36, "type": "identifier", "text": "HXCPP_CLASS_ATTRIBUTES", "parent": 35, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 28}}, {"id": 37, "type": "labeled_statement", "text": "Endian_Impl__obj : public hx::Object\n{\n\tpublic:\n\t\ttypedef hx::Object super;\n\t\ttypedef Endian_Impl__obj OBJ_;\n\t\tEndian_Impl__obj();\n\n\tpublic:\n\t\tenum { _hx_ClassId = 0x3bd39ce0 };\n\n\t\tvoid __construct();\n\t\tinline void *operator new(size_t inSize, bool inContainer=false,const char *inName=\"openfl.utils._Endian.Endian_Impl_\")\n\t\t\t{ return hx::Object::operator new(inSize,inContainer,inName); }", "parent": 32, "children": [38, 39], "start_point": {"row": 16, "column": 29}, "end_point": {"row": 28, "column": 66}}, {"id": 38, "type": "statement_identifier", "text": "Endian_Impl__obj", "parent": 37, "children": [], "start_point": {"row": 16, "column": 29}, "end_point": {"row": 16, "column": 45}}, {"id": 39, "type": "ERROR", "text": "public hx::Object", "parent": 37, "children": [40, 42], "start_point": {"row": 16, "column": 48}, "end_point": {"row": 16, "column": 65}}, {"id": 40, "type": "ERROR", "text": "hx::", "parent": 39, "children": [41], "start_point": {"row": 16, "column": 55}, "end_point": {"row": 16, "column": 59}}, {"id": 41, "type": "identifier", "text": "hx", "parent": 40, "children": [], "start_point": {"row": 16, "column": 55}, "end_point": {"row": 16, "column": 57}}, {"id": 42, "type": "identifier", "text": "Object", "parent": 39, "children": [], "start_point": {"row": 16, "column": 59}, "end_point": {"row": 16, "column": 65}}, {"id": 43, "type": "labeled_statement", "text": "public:\n\t\ttypedef hx::Object super;", "parent": 37, "children": [44, 47], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 19, "column": 27}}, {"id": 44, "type": "ERROR", "text": ":\n\t\ttypedef hx:", "parent": 43, "children": [45, 46], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 19, "column": 13}}, {"id": 45, "type": "type_identifier", "text": "typedef", "parent": 44, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 9}}, {"id": 46, "type": "identifier", "text": "hx", "parent": 44, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 12}}, {"id": 47, "type": "declaration", "text": "Object super;", "parent": 43, "children": [48, 49], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 27}}, {"id": 48, "type": "type_identifier", "text": "Object", "parent": 47, "children": [], "start_point": {"row": 19, "column": 14}, "end_point": {"row": 19, "column": 20}}, {"id": 49, "type": "identifier", "text": "super", "parent": 47, "children": [], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 26}}, {"id": 50, "type": "type_definition", "text": "typedef Endian_Impl__obj OBJ_;", "parent": 37, "children": [51, 52, 53], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 32}}, {"id": 51, "type": "typedef", "text": "typedef", "parent": 50, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 9}}, {"id": 52, "type": "type_identifier", "text": "Endian_Impl__obj", "parent": 50, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 26}}, {"id": 53, "type": "type_identifier", "text": "OBJ_", "parent": 50, "children": [], "start_point": {"row": 20, "column": 27}, "end_point": {"row": 20, "column": 31}}, {"id": 54, "type": "call_expression", "text": "Endian_Impl__obj()", "parent": 37, "children": [55, 56], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 20}}, {"id": 55, "type": "identifier", "text": "Endian_Impl__obj", "parent": 54, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 18}}, {"id": 56, "type": "argument_list", "text": "()", "parent": 54, "children": [], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 20}}, {"id": 57, "type": "labeled_statement", "text": "public:\n\t\tenum { _hx_ClassId = 0x3bd39ce0 };", "parent": 37, "children": [58], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 24, "column": 36}}, {"id": 58, "type": "declaration", "text": "enum { _hx_ClassId = 0x3bd39ce0 };", "parent": 57, "children": [59, 66], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 36}}, {"id": 59, "type": "enum_specifier", "text": "enum { _hx_ClassId = 0x3bd39ce0 }", "parent": 58, "children": [60, 61], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 35}}, {"id": 60, "type": "enum", "text": "enum", "parent": 59, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 6}}, {"id": 61, "type": "enumerator_list", "text": "{ _hx_ClassId = 0x3bd39ce0 }", "parent": 59, "children": [62], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 35}}, {"id": 62, "type": "enumerator", "text": "_hx_ClassId = 0x3bd39ce0", "parent": 61, "children": [63, 64, 65], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 33}}, {"id": 63, "type": "identifier", "text": "_hx_ClassId", "parent": 62, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 20}}, {"id": 64, "type": "=", "text": "=", "parent": 62, "children": [], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 22}}, {"id": 65, "type": "number_literal", "text": "0x3bd39ce0", "parent": 62, "children": [], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 33}}, {"id": 66, "type": "identifier", "text": "", "parent": 58, "children": [], "start_point": {"row": 24, "column": 35}, "end_point": {"row": 24, "column": 35}}, {"id": 67, "type": "declaration", "text": "void __construct();", "parent": 37, "children": [68, 69], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 21}}, {"id": 68, "type": "primitive_type", "text": "void", "parent": 67, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 6}}, {"id": 69, "type": "function_declarator", "text": "__construct()", "parent": 67, "children": [70, 71], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 20}}, {"id": 70, "type": "identifier", "text": "__construct", "parent": 69, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 18}}, {"id": 71, "type": "parameter_list", "text": "()", "parent": 69, "children": [], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 20}}, {"id": 72, "type": "declaration", "text": "inline void *operator new(size_t inSize, bool inContainer=false,const char *inName=\"openfl.utils._Endian.Endian_Impl_\")\n\t\t\t{ return hx::Object::operator new(inSize,inContainer,inName);", "parent": 37, "children": [73, 75, 76, 91, 93], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 28, "column": 64}}, {"id": 73, "type": "storage_class_specifier", "text": "inline", "parent": 72, "children": [74], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 8}}, {"id": 74, "type": "inline", "text": "inline", "parent": 73, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 8}}, {"id": 75, "type": "primitive_type", "text": "void", "parent": 72, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 13}}, {"id": 76, "type": "init_declarator", "text": "*operator new(size_t inSize, bool inContainer=false", "parent": 72, "children": [77, 89, 90], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 65}}, {"id": 77, "type": "pointer_declarator", "text": "*operator new(size_t inSize, bool inContainer", "parent": 76, "children": [78, 79, 81], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 59}}, {"id": 78, "type": "*", "text": "*", "parent": 77, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 15}}, {"id": 79, "type": "ERROR", "text": "operator", "parent": 77, "children": [80], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 23}}, {"id": 80, "type": "identifier", "text": "operator", "parent": 79, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 23}}, {"id": 81, "type": "function_declarator", "text": "new(size_t inSize, bool inContainer", "parent": 77, "children": [82], "start_point": {"row": 27, "column": 24}, "end_point": {"row": 27, "column": 59}}, {"id": 82, "type": "parameter_list", "text": "(size_t inSize, bool inContainer", "parent": 81, "children": [83, 86], "start_point": {"row": 27, "column": 27}, "end_point": {"row": 27, "column": 59}}, {"id": 83, "type": "parameter_declaration", "text": "size_t inSize", "parent": 82, "children": [84, 85], "start_point": {"row": 27, "column": 28}, "end_point": {"row": 27, "column": 41}}, {"id": 84, "type": "primitive_type", "text": "size_t", "parent": 83, "children": [], "start_point": {"row": 27, "column": 28}, "end_point": {"row": 27, "column": 34}}, {"id": 85, "type": "identifier", "text": "inSize", "parent": 83, "children": [], "start_point": {"row": 27, "column": 35}, "end_point": {"row": 27, "column": 41}}, {"id": 86, "type": "parameter_declaration", "text": "bool inContainer", "parent": 82, "children": [87, 88], "start_point": {"row": 27, "column": 43}, "end_point": {"row": 27, "column": 59}}, {"id": 87, "type": "primitive_type", "text": "bool", "parent": 86, "children": [], "start_point": {"row": 27, "column": 43}, "end_point": {"row": 27, "column": 47}}, {"id": 88, "type": "identifier", "text": "inContainer", "parent": 86, "children": [], "start_point": {"row": 27, "column": 48}, "end_point": {"row": 27, "column": 59}}, {"id": 89, "type": "=", "text": "=", "parent": 76, "children": [], "start_point": {"row": 27, "column": 59}, "end_point": {"row": 27, "column": 60}}, {"id": 90, "type": "false", "text": "false", "parent": 76, "children": [], "start_point": {"row": 27, "column": 60}, "end_point": {"row": 27, "column": 65}}, {"id": 91, "type": "ERROR", "text": "const char", "parent": 72, "children": [92], "start_point": {"row": 27, "column": 66}, "end_point": {"row": 27, "column": 76}}, {"id": 92, "type": "identifier", "text": "char", "parent": 91, "children": [], "start_point": {"row": 27, "column": 72}, "end_point": {"row": 27, "column": 76}}, {"id": 93, "type": "init_declarator", "text": "*inName=\"openfl.utils._Endian.Endian_Impl_\")\n\t\t\t{ return hx::Object::operator new(inSize,inContainer,inName)", "parent": 72, "children": [94, 97, 98, 100], "start_point": {"row": 27, "column": 77}, "end_point": {"row": 28, "column": 63}}, {"id": 94, "type": "pointer_declarator", "text": "*inName", "parent": 93, "children": [95, 96], "start_point": {"row": 27, "column": 77}, "end_point": {"row": 27, "column": 84}}, {"id": 95, "type": "*", "text": "*", "parent": 94, "children": [], "start_point": {"row": 27, "column": 77}, "end_point": {"row": 27, "column": 78}}, {"id": 96, "type": "identifier", "text": "inName", "parent": 94, "children": [], "start_point": {"row": 27, "column": 78}, "end_point": {"row": 27, "column": 84}}, {"id": 97, "type": "=", "text": "=", "parent": 93, "children": [], "start_point": {"row": 27, "column": 84}, "end_point": {"row": 27, "column": 85}}, {"id": 98, "type": "ERROR", "text": "\"openfl.utils._Endian.Endian_Impl_\")", "parent": 93, "children": [99], "start_point": {"row": 27, "column": 85}, "end_point": {"row": 27, "column": 121}}, {"id": 99, "type": "string_literal", "text": "\"openfl.utils._Endian.Endian_Impl_\"", "parent": 98, "children": [], "start_point": {"row": 27, "column": 85}, "end_point": {"row": 27, "column": 120}}, {"id": 100, "type": "initializer_list", "text": "{ return hx::Object::operator new(inSize,inContainer,inName)", "parent": 93, "children": [101], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 63}}, {"id": 101, "type": "initializer_pair", "text": "return hx::Object::operator new(inSize,inContainer,inName)", "parent": 100, "children": [102, 105, 107], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 63}}, {"id": 102, "type": "ERROR", "text": "hx::Object:", "parent": 101, "children": [103, 104], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 23}}, {"id": 103, "type": "identifier", "text": "hx", "parent": 102, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 14}}, {"id": 104, "type": "identifier", "text": "Object", "parent": 102, "children": [], "start_point": {"row": 28, "column": 16}, "end_point": {"row": 28, "column": 22}}, {"id": 105, "type": "ERROR", "text": "operator", "parent": 101, "children": [106], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 32}}, {"id": 106, "type": "identifier", "text": "operator", "parent": 105, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 32}}, {"id": 107, "type": "call_expression", "text": "new(inSize,inContainer,inName)", "parent": 101, "children": [108], "start_point": {"row": 28, "column": 33}, "end_point": {"row": 28, "column": 63}}, {"id": 108, "type": "argument_list", "text": "(inSize,inContainer,inName)", "parent": 107, "children": [109, 110, 111], "start_point": {"row": 28, "column": 36}, "end_point": {"row": 28, "column": 63}}, {"id": 109, "type": "identifier", "text": "inSize", "parent": 108, "children": [], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 43}}, {"id": 110, "type": "identifier", "text": "inContainer", "parent": 108, "children": [], "start_point": {"row": 28, "column": 44}, "end_point": {"row": 28, "column": 55}}, {"id": 111, "type": "identifier", "text": "inName", "parent": 108, "children": [], "start_point": {"row": 28, "column": 56}, "end_point": {"row": 28, "column": 62}}, {"id": 112, "type": "function_definition", "text": "inline void *operator new(size_t inSize, int extra)\n\t\t\t{ return hx::Object::operator new(inSize+extra,false,\"openfl.utils._Endian.Endian_Impl_\"); }", "parent": 32, "children": [113, 115, 116], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 30, "column": 95}}, {"id": 113, "type": "storage_class_specifier", "text": "inline", "parent": 112, "children": [114], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 8}}, {"id": 114, "type": "inline", "text": "inline", "parent": 113, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 8}}, {"id": 115, "type": "primitive_type", "text": "void", "parent": 112, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 13}}, {"id": 116, "type": "pointer_declarator", "text": "*operator new(size_t inSize, int extra)", "parent": 112, "children": [117, 118, 120], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 53}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 15}}, {"id": 118, "type": "ERROR", "text": "operator", "parent": 116, "children": [119], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 23}}, {"id": 119, "type": "identifier", "text": "operator", "parent": 118, "children": [], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 23}}, {"id": 120, "type": "function_declarator", "text": "new(size_t inSize, int extra)", "parent": 116, "children": [121], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 53}}, {"id": 121, "type": "parameter_list", "text": "(size_t inSize, int extra)", "parent": 120, "children": [122, 125], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 53}}, {"id": 122, "type": "parameter_declaration", "text": "size_t inSize", "parent": 121, "children": [123, 124], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 41}}, {"id": 123, "type": "primitive_type", "text": "size_t", "parent": 122, "children": [], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 34}}, {"id": 124, "type": "identifier", "text": "inSize", "parent": 122, "children": [], "start_point": {"row": 29, "column": 35}, "end_point": {"row": 29, "column": 41}}, {"id": 125, "type": "parameter_declaration", "text": "int extra", "parent": 121, "children": [126, 127], "start_point": {"row": 29, "column": 43}, "end_point": {"row": 29, "column": 52}}, {"id": 126, "type": "primitive_type", "text": "int", "parent": 125, "children": [], "start_point": {"row": 29, "column": 43}, "end_point": {"row": 29, "column": 46}}, {"id": 127, "type": "identifier", "text": "extra", "parent": 125, "children": [], "start_point": {"row": 29, "column": 47}, "end_point": {"row": 29, "column": 52}}, {"id": 128, "type": "return_statement", "text": "return hx::Object::operator new(inSize+extra,false,\"openfl.utils._Endian.Endian_Impl_\");", "parent": 112, "children": [129, 133], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 93}}, {"id": 129, "type": "ERROR", "text": "hx::Object::operator", "parent": 128, "children": [130, 131, 132], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 32}}, {"id": 130, "type": "identifier", "text": "hx", "parent": 129, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 14}}, {"id": 131, "type": "identifier", "text": "Object", "parent": 129, "children": [], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 22}}, {"id": 132, "type": "identifier", "text": "operator", "parent": 129, "children": [], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 32}}, {"id": 133, "type": "call_expression", "text": "new(inSize+extra,false,\"openfl.utils._Endian.Endian_Impl_\")", "parent": 128, "children": [134], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 92}}, {"id": 134, "type": "argument_list", "text": "(inSize+extra,false,\"openfl.utils._Endian.Endian_Impl_\")", "parent": 133, "children": [135, 139, 140], "start_point": {"row": 30, "column": 36}, "end_point": {"row": 30, "column": 92}}, {"id": 135, "type": "binary_expression", "text": "inSize+extra", "parent": 134, "children": [136, 137, 138], "start_point": {"row": 30, "column": 37}, "end_point": {"row": 30, "column": 49}}, {"id": 136, "type": "identifier", "text": "inSize", "parent": 135, "children": [], "start_point": {"row": 30, "column": 37}, "end_point": {"row": 30, "column": 43}}, {"id": 137, "type": "+", "text": "+", "parent": 135, "children": [], "start_point": {"row": 30, "column": 43}, "end_point": {"row": 30, "column": 44}}, {"id": 138, "type": "identifier", "text": "extra", "parent": 135, "children": [], "start_point": {"row": 30, "column": 44}, "end_point": {"row": 30, "column": 49}}, {"id": 139, "type": "false", "text": "false", "parent": 134, "children": [], "start_point": {"row": 30, "column": 50}, "end_point": {"row": 30, "column": 55}}, {"id": 140, "type": "string_literal", "text": "\"openfl.utils._Endian.Endian_Impl_\"", "parent": 134, "children": [], "start_point": {"row": 30, "column": 56}, "end_point": {"row": 30, "column": 91}}, {"id": 141, "type": "labeled_statement", "text": "hx::ObjectPtr< Endian_Impl__obj > __new() {\n\t\t\thx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n\t\t\t__this->__construct();\n\t\t\treturn __this;\n\t\t}", "parent": 32, "children": [142, 143], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 36, "column": 3}}, {"id": 142, "type": "statement_identifier", "text": "hx", "parent": 141, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 4}}, {"id": 143, "type": "ERROR", "text": ":ObjectPtr< Endian_Impl__obj > __new()", "parent": 141, "children": [144], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 43}}, {"id": 144, "type": "binary_expression", "text": "ObjectPtr< Endian_Impl__obj > __new()", "parent": 143, "children": [145, 149, 150], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 43}}, {"id": 145, "type": "binary_expression", "text": "ObjectPtr< Endian_Impl__obj", "parent": 144, "children": [146, 147, 148], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 33}}, {"id": 146, "type": "identifier", "text": "ObjectPtr", "parent": 145, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 15}}, {"id": 147, "type": "<", "text": "<", "parent": 145, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 16}}, {"id": 148, "type": "identifier", "text": "Endian_Impl__obj", "parent": 145, "children": [], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 33}}, {"id": 149, "type": ">", "text": ">", "parent": 144, "children": [], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 35}}, {"id": 150, "type": "call_expression", "text": "__new()", "parent": 144, "children": [151, 152], "start_point": {"row": 32, "column": 36}, "end_point": {"row": 32, "column": 43}}, {"id": 151, "type": "identifier", "text": "__new", "parent": 150, "children": [], "start_point": {"row": 32, "column": 36}, "end_point": {"row": 32, "column": 41}}, {"id": 152, "type": "argument_list", "text": "()", "parent": 150, "children": [], "start_point": {"row": 32, "column": 41}, "end_point": {"row": 32, "column": 43}}, {"id": 153, "type": "labeled_statement", "text": "hx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();", "parent": 141, "children": [154], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 69}}, {"id": 154, "type": "statement_identifier", "text": "hx", "parent": 153, "children": [], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 5}}, {"id": 155, "type": "binary_expression", "text": "ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj()", "parent": 153, "children": [156, 160, 161], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 68}}, {"id": 156, "type": "binary_expression", "text": "ObjectPtr< Endian_Impl__obj", "parent": 155, "children": [157, 158, 159], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 34}}, {"id": 157, "type": "identifier", "text": "ObjectPtr", "parent": 156, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 16}}, {"id": 158, "type": "<", "text": "<", "parent": 156, "children": [], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 17}}, {"id": 159, "type": "identifier", "text": "Endian_Impl__obj", "parent": 156, "children": [], "start_point": {"row": 33, "column": 18}, "end_point": {"row": 33, "column": 34}}, {"id": 160, "type": ">", "text": ">", "parent": 155, "children": [], "start_point": {"row": 33, "column": 35}, "end_point": {"row": 33, "column": 36}}, {"id": 161, "type": "assignment_expression", "text": "__this = new Endian_Impl__obj()", "parent": 155, "children": [162, 163, 164], "start_point": {"row": 33, "column": 37}, "end_point": {"row": 33, "column": 68}}, {"id": 162, "type": "identifier", "text": "__this", "parent": 161, "children": [], "start_point": {"row": 33, "column": 37}, "end_point": {"row": 33, "column": 43}}, {"id": 163, "type": "=", "text": "=", "parent": 161, "children": [], "start_point": {"row": 33, "column": 44}, "end_point": {"row": 33, "column": 45}}, {"id": 164, "type": "call_expression", "text": "Endian_Impl__obj()", "parent": 161, "children": [165, 166], "start_point": {"row": 33, "column": 50}, "end_point": {"row": 33, "column": 68}}, {"id": 165, "type": "identifier", "text": "Endian_Impl__obj", "parent": 164, "children": [], "start_point": {"row": 33, "column": 50}, "end_point": {"row": 33, "column": 66}}, {"id": 166, "type": "argument_list", "text": "()", "parent": 164, "children": [], "start_point": {"row": 33, "column": 66}, "end_point": {"row": 33, "column": 68}}, {"id": 167, "type": "call_expression", "text": "__this->__construct()", "parent": 141, "children": [168, 171], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 24}}, {"id": 168, "type": "field_expression", "text": "__this->__construct", "parent": 167, "children": [169, 170], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 22}}, {"id": 169, "type": "identifier", "text": "__this", "parent": 168, "children": [], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 9}}, {"id": 170, "type": "field_identifier", "text": "__construct", "parent": 168, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 22}}, {"id": 171, "type": "argument_list", "text": "()", "parent": 167, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 24}}, {"id": 172, "type": "return_statement", "text": "return __this;", "parent": 141, "children": [173], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 17}}, {"id": 173, "type": "identifier", "text": "__this", "parent": 172, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 16}}, {"id": 174, "type": "function_definition", "text": "static hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n\t\t\tEndian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, \"openfl.utils._Endian.Endian_Impl_\"));\n\t\t\t*(void **)__this = Endian_Impl__obj::_hx_vtable;\n\t\t\treturn __this;\n\t\t}", "parent": 32, "children": [175, 176, 181], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 42, "column": 3}}, {"id": 175, "type": "type_identifier", "text": "hx", "parent": 174, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 11}}, {"id": 176, "type": "ERROR", "text": "::ObjectPtr< Endian_Impl__obj >", "parent": 174, "children": [177, 178, 179, 180], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 42}}, {"id": 177, "type": "identifier", "text": "ObjectPtr", "parent": 176, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 22}}, {"id": 178, "type": "<", "text": "<", "parent": 176, "children": [], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 23}}, {"id": 179, "type": "identifier", "text": "Endian_Impl__obj", "parent": 176, "children": [], "start_point": {"row": 38, "column": 24}, "end_point": {"row": 38, "column": 40}}, {"id": 180, "type": ">", "text": ">", "parent": 176, "children": [], "start_point": {"row": 38, "column": 41}, "end_point": {"row": 38, "column": 42}}, {"id": 181, "type": "function_declarator", "text": "__alloc(hx::Ctx *_hx_ctx)", "parent": 174, "children": [182, 183], "start_point": {"row": 38, "column": 43}, "end_point": {"row": 38, "column": 68}}, {"id": 182, "type": "identifier", "text": "__alloc", "parent": 181, "children": [], "start_point": {"row": 38, "column": 43}, "end_point": {"row": 38, "column": 50}}, {"id": 183, "type": "parameter_list", "text": "(hx::Ctx *_hx_ctx)", "parent": 181, "children": [184], "start_point": {"row": 38, "column": 50}, "end_point": {"row": 38, "column": 68}}, {"id": 184, "type": "parameter_declaration", "text": "hx::Ctx *_hx_ctx", "parent": 183, "children": [185, 186, 188], "start_point": {"row": 38, "column": 51}, "end_point": {"row": 38, "column": 67}}, {"id": 185, "type": "type_identifier", "text": "hx", "parent": 184, "children": [], "start_point": {"row": 38, "column": 51}, "end_point": {"row": 38, "column": 53}}, {"id": 186, "type": "ERROR", "text": "::Ctx", "parent": 184, "children": [187], "start_point": {"row": 38, "column": 53}, "end_point": {"row": 38, "column": 58}}, {"id": 187, "type": "identifier", "text": "Ctx", "parent": 186, "children": [], "start_point": {"row": 38, "column": 55}, "end_point": {"row": 38, "column": 58}}, {"id": 188, "type": "pointer_declarator", "text": "*_hx_ctx", "parent": 184, "children": [189, 190], "start_point": {"row": 38, "column": 59}, "end_point": {"row": 38, "column": 67}}, {"id": 189, "type": "*", "text": "*", "parent": 188, "children": [], "start_point": {"row": 38, "column": 59}, "end_point": {"row": 38, "column": 60}}, {"id": 190, "type": "identifier", "text": "_hx_ctx", "parent": 188, "children": [], "start_point": {"row": 38, "column": 60}, "end_point": {"row": 38, "column": 67}}, {"id": 191, "type": "declaration", "text": "Endian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, \"openfl.utils._Endian.Endian_Impl_\"));", "parent": 174, "children": [192, 193], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 145}}, {"id": 192, "type": "type_identifier", "text": "Endian_Impl__obj", "parent": 191, "children": [], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 19}}, {"id": 193, "type": "init_declarator", "text": "*__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, \"openfl.utils._Endian.Endian_Impl_\"))", "parent": 191, "children": [194, 197, 198], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 144}}, {"id": 194, "type": "pointer_declarator", "text": "*__this", "parent": 193, "children": [195, 196], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 27}}, {"id": 195, "type": "*", "text": "*", "parent": 194, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 21}}, {"id": 196, "type": "identifier", "text": "__this", "parent": 194, "children": [], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 27}}, {"id": 197, "type": "=", "text": "=", "parent": 193, "children": [], "start_point": {"row": 39, "column": 28}, "end_point": {"row": 39, "column": 29}}, {"id": 198, "type": "cast_expression", "text": "(Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, \"openfl.utils._Endian.Endian_Impl_\"))", "parent": 193, "children": [199, 203], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 144}}, {"id": 199, "type": "type_descriptor", "text": "Endian_Impl__obj*", "parent": 198, "children": [200, 201], "start_point": {"row": 39, "column": 31}, "end_point": {"row": 39, "column": 48}}, {"id": 200, "type": "type_identifier", "text": "Endian_Impl__obj", "parent": 199, "children": [], "start_point": {"row": 39, "column": 31}, "end_point": {"row": 39, "column": 47}}, {"id": 201, "type": "abstract_pointer_declarator", "text": "*", "parent": 199, "children": [202], "start_point": {"row": 39, "column": 47}, "end_point": {"row": 39, "column": 48}}, {"id": 202, "type": "*", "text": "*", "parent": 201, "children": [], "start_point": {"row": 39, "column": 47}, "end_point": {"row": 39, "column": 48}}, {"id": 203, "type": "parenthesized_expression", "text": "(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, \"openfl.utils._Endian.Endian_Impl_\"))", "parent": 198, "children": [204, 207], "start_point": {"row": 39, "column": 49}, "end_point": {"row": 39, "column": 144}}, {"id": 204, "type": "ERROR", "text": "hx::Ctx::", "parent": 203, "children": [205, 206], "start_point": {"row": 39, "column": 50}, "end_point": {"row": 39, "column": 59}}, {"id": 205, "type": "identifier", "text": "hx", "parent": 204, "children": [], "start_point": {"row": 39, "column": 50}, "end_point": {"row": 39, "column": 52}}, {"id": 206, "type": "identifier", "text": "Ctx", "parent": 204, "children": [], "start_point": {"row": 39, "column": 54}, "end_point": {"row": 39, "column": 57}}, {"id": 207, "type": "call_expression", "text": "alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, \"openfl.utils._Endian.Endian_Impl_\")", "parent": 203, "children": [208, 209], "start_point": {"row": 39, "column": 59}, "end_point": {"row": 39, "column": 143}}, {"id": 208, "type": "identifier", "text": "alloc", "parent": 207, "children": [], "start_point": {"row": 39, "column": 59}, "end_point": {"row": 39, "column": 64}}, {"id": 209, "type": "argument_list", "text": "(_hx_ctx, sizeof(Endian_Impl__obj), false, \"openfl.utils._Endian.Endian_Impl_\")", "parent": 207, "children": [210, 211, 214, 215], "start_point": {"row": 39, "column": 64}, "end_point": {"row": 39, "column": 143}}, {"id": 210, "type": "identifier", "text": "_hx_ctx", "parent": 209, "children": [], "start_point": {"row": 39, "column": 65}, "end_point": {"row": 39, "column": 72}}, {"id": 211, "type": "sizeof_expression", "text": "sizeof(Endian_Impl__obj)", "parent": 209, "children": [212], "start_point": {"row": 39, "column": 74}, "end_point": {"row": 39, "column": 98}}, {"id": 212, "type": "parenthesized_expression", "text": "(Endian_Impl__obj)", "parent": 211, "children": [213], "start_point": {"row": 39, "column": 80}, "end_point": {"row": 39, "column": 98}}, {"id": 213, "type": "identifier", "text": "Endian_Impl__obj", "parent": 212, "children": [], "start_point": {"row": 39, "column": 81}, "end_point": {"row": 39, "column": 97}}, {"id": 214, "type": "false", "text": "false", "parent": 209, "children": [], "start_point": {"row": 39, "column": 100}, "end_point": {"row": 39, "column": 105}}, {"id": 215, "type": "string_literal", "text": "\"openfl.utils._Endian.Endian_Impl_\"", "parent": 209, "children": [], "start_point": {"row": 39, "column": 107}, "end_point": {"row": 39, "column": 142}}, {"id": 216, "type": "assignment_expression", "text": "*(void **)__this = Endian_Impl__obj", "parent": 174, "children": [217, 227, 228], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 38}}, {"id": 217, "type": "pointer_expression", "text": "*(void **)__this", "parent": 216, "children": [218, 219], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 19}}, {"id": 218, "type": "*", "text": "*", "parent": 217, "children": [], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 4}}, {"id": 219, "type": "cast_expression", "text": "(void **)__this", "parent": 217, "children": [220, 226], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 19}}, {"id": 220, "type": "type_descriptor", "text": "void **", "parent": 219, "children": [221, 222], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 12}}, {"id": 221, "type": "primitive_type", "text": "void", "parent": 220, "children": [], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 9}}, {"id": 222, "type": "abstract_pointer_declarator", "text": "**", "parent": 220, "children": [223, 224], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 12}}, {"id": 223, "type": "*", "text": "*", "parent": 222, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 11}}, {"id": 224, "type": "abstract_pointer_declarator", "text": "*", "parent": 222, "children": [225], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 12}}, {"id": 225, "type": "*", "text": "*", "parent": 224, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 12}}, {"id": 226, "type": "identifier", "text": "__this", "parent": 219, "children": [], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 19}}, {"id": 227, "type": "=", "text": "=", "parent": 216, "children": [], "start_point": {"row": 40, "column": 20}, "end_point": {"row": 40, "column": 21}}, {"id": 228, "type": "identifier", "text": "Endian_Impl__obj", "parent": 216, "children": [], "start_point": {"row": 40, "column": 22}, "end_point": {"row": 40, "column": 38}}, {"id": 229, "type": "ERROR", "text": "::_hx_vtable", "parent": 174, "children": [230], "start_point": {"row": 40, "column": 38}, "end_point": {"row": 40, "column": 50}}, {"id": 230, "type": "identifier", "text": "_hx_vtable", "parent": 229, "children": [], "start_point": {"row": 40, "column": 40}, "end_point": {"row": 40, "column": 50}}, {"id": 231, "type": "return_statement", "text": "return __this;", "parent": 174, "children": [232], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 17}}, {"id": 232, "type": "identifier", "text": "__this", "parent": 231, "children": [], "start_point": {"row": 41, "column": 10}, "end_point": {"row": 41, "column": 16}}, {"id": 233, "type": "declaration", "text": "static void * _hx_vtable;", "parent": 32, "children": [234, 235], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 27}}, {"id": 234, "type": "primitive_type", "text": "void", "parent": 233, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 13}}, {"id": 235, "type": "pointer_declarator", "text": "* _hx_vtable", "parent": 233, "children": [236, 237], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 26}}, {"id": 236, "type": "*", "text": "*", "parent": 235, "children": [], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 15}}, {"id": 237, "type": "identifier", "text": "_hx_vtable", "parent": 235, "children": [], "start_point": {"row": 44, "column": 16}, "end_point": {"row": 44, "column": 26}}, {"id": 238, "type": "declaration", "text": "static Dynamic __CreateEmpty();", "parent": 32, "children": [239, 240], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 33}}, {"id": 239, "type": "type_identifier", "text": "Dynamic", "parent": 238, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 16}}, {"id": 240, "type": "function_declarator", "text": "__CreateEmpty()", "parent": 238, "children": [241, 242], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 32}}, {"id": 241, "type": "identifier", "text": "__CreateEmpty", "parent": 240, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 30}}, {"id": 242, "type": "parameter_list", "text": "()", "parent": 240, "children": [], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 32}}, {"id": 243, "type": "declaration", "text": "static Dynamic __Create(hx::DynamicArray inArgs);", "parent": 32, "children": [244, 245], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 51}}, {"id": 244, "type": "type_identifier", "text": "Dynamic", "parent": 243, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 16}}, {"id": 245, "type": "function_declarator", "text": "__Create(hx::DynamicArray inArgs)", "parent": 243, "children": [246, 247], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 50}}, {"id": 246, "type": "identifier", "text": "__Create", "parent": 245, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 25}}, {"id": 247, "type": "parameter_list", "text": "(hx::DynamicArray inArgs)", "parent": 245, "children": [248], "start_point": {"row": 46, "column": 25}, "end_point": {"row": 46, "column": 50}}, {"id": 248, "type": "parameter_declaration", "text": "hx::DynamicArray inArgs", "parent": 247, "children": [249, 250, 252], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 49}}, {"id": 249, "type": "type_identifier", "text": "hx", "parent": 248, "children": [], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 28}}, {"id": 250, "type": "ERROR", "text": "::DynamicArray", "parent": 248, "children": [251], "start_point": {"row": 46, "column": 28}, "end_point": {"row": 46, "column": 42}}, {"id": 251, "type": "identifier", "text": "DynamicArray", "parent": 250, "children": [], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 42}}, {"id": 252, "type": "identifier", "text": "inArgs", "parent": 248, "children": [], "start_point": {"row": 46, "column": 43}, "end_point": {"row": 46, "column": 49}}, {"id": 253, "type": "identifier", "text": "HX_DO_RTTI_ALL", "parent": 32, "children": [], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 16}}, {"id": 254, "type": "declaration", "text": "static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);", "parent": 32, "children": [255, 256], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 102}}, {"id": 255, "type": "primitive_type", "text": "bool", "parent": 254, "children": [], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 13}}, {"id": 256, "type": "function_declarator", "text": "__GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp)", "parent": 254, "children": [257, 258], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 101}}, {"id": 257, "type": "identifier", "text": "__GetStatic", "parent": 256, "children": [], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 25}}, {"id": 258, "type": "parameter_list", "text": "(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp)", "parent": 256, "children": [259, 262, 265], "start_point": {"row": 50, "column": 25}, "end_point": {"row": 50, "column": 101}}, {"id": 259, "type": "parameter_declaration", "text": "const ::String &inString", "parent": 258, "children": [260, 261], "start_point": {"row": 50, "column": 26}, "end_point": {"row": 50, "column": 50}}, {"id": 260, "type": "type_identifier", "text": "String", "parent": 259, "children": [], "start_point": {"row": 50, "column": 34}, "end_point": {"row": 50, "column": 40}}, {"id": 261, "type": "identifier", "text": "inString", "parent": 259, "children": [], "start_point": {"row": 50, "column": 42}, "end_point": {"row": 50, "column": 50}}, {"id": 262, "type": "parameter_declaration", "text": "Dynamic &outValue", "parent": 258, "children": [263, 264], "start_point": {"row": 50, "column": 52}, "end_point": {"row": 50, "column": 69}}, {"id": 263, "type": "type_identifier", "text": "Dynamic", "parent": 262, "children": [], "start_point": {"row": 50, "column": 52}, "end_point": {"row": 50, "column": 59}}, {"id": 264, "type": "identifier", "text": "outValue", "parent": 262, "children": [], "start_point": {"row": 50, "column": 61}, "end_point": {"row": 50, "column": 69}}, {"id": 265, "type": "parameter_declaration", "text": "hx::PropertyAccess inCallProp", "parent": 258, "children": [266, 267, 269], "start_point": {"row": 50, "column": 71}, "end_point": {"row": 50, "column": 100}}, {"id": 266, "type": "type_identifier", "text": "hx", "parent": 265, "children": [], "start_point": {"row": 50, "column": 71}, "end_point": {"row": 50, "column": 73}}, {"id": 267, "type": "ERROR", "text": "::PropertyAccess", "parent": 265, "children": [268], "start_point": {"row": 50, "column": 73}, "end_point": {"row": 50, "column": 89}}, {"id": 268, "type": "identifier", "text": "PropertyAccess", "parent": 267, "children": [], "start_point": {"row": 50, "column": 75}, "end_point": {"row": 50, "column": 89}}, {"id": 269, "type": "identifier", "text": "inCallProp", "parent": 265, "children": [], "start_point": {"row": 50, "column": 90}, "end_point": {"row": 50, "column": 100}}, {"id": 270, "type": "declaration", "text": "static void __register();", "parent": 32, "children": [271, 272], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 27}}, {"id": 271, "type": "primitive_type", "text": "void", "parent": 270, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 13}}, {"id": 272, "type": "function_declarator", "text": "__register()", "parent": 270, "children": [273, 274], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 26}}, {"id": 273, "type": "identifier", "text": "__register", "parent": 272, "children": [], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 24}}, {"id": 274, "type": "parameter_list", "text": "()", "parent": 272, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 26}}, {"id": 275, "type": "declaration", "text": "bool _hx_isInstanceOf(int inClassId);", "parent": 32, "children": [276, 277], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 39}}, {"id": 276, "type": "primitive_type", "text": "bool", "parent": 275, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 6}}, {"id": 277, "type": "function_declarator", "text": "_hx_isInstanceOf(int inClassId)", "parent": 275, "children": [278, 279], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 38}}, {"id": 278, "type": "identifier", "text": "_hx_isInstanceOf", "parent": 277, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 23}}, {"id": 279, "type": "parameter_list", "text": "(int inClassId)", "parent": 277, "children": [280], "start_point": {"row": 52, "column": 23}, "end_point": {"row": 52, "column": 38}}, {"id": 280, "type": "parameter_declaration", "text": "int inClassId", "parent": 279, "children": [281, 282], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 37}}, {"id": 281, "type": "primitive_type", "text": "int", "parent": 280, "children": [], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 27}}, {"id": 282, "type": "identifier", "text": "inClassId", "parent": 280, "children": [], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 37}}, {"id": 283, "type": "ERROR", "text": "::String __ToString() const", "parent": 32, "children": [284, 285], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 29}}, {"id": 284, "type": "type_identifier", "text": "String", "parent": 283, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 10}}, {"id": 285, "type": "function_declarator", "text": "__ToString()", "parent": 283, "children": [286, 287], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 23}}, {"id": 286, "type": "identifier", "text": "__ToString", "parent": 285, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 21}}, {"id": 287, "type": "parameter_list", "text": "()", "parent": 285, "children": [], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 23}}, {"id": 288, "type": "return_statement", "text": "return HX_(\"Endian_Impl_\",9b,07,25,91);", "parent": 32, "children": [289], "start_point": {"row": 53, "column": 32}, "end_point": {"row": 53, "column": 71}}, {"id": 289, "type": "call_expression", "text": "HX_(\"Endian_Impl_\",9b,07,25,91)", "parent": 288, "children": [290, 291], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 70}}, {"id": 290, "type": "identifier", "text": "HX_", "parent": 289, "children": [], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 42}}, {"id": 291, "type": "argument_list", "text": "(\"Endian_Impl_\",9b,07,25,91)", "parent": 289, "children": [292, 293, 294, 295, 296], "start_point": {"row": 53, "column": 42}, "end_point": {"row": 53, "column": 70}}, {"id": 292, "type": "string_literal", "text": "\"Endian_Impl_\"", "parent": 291, "children": [], "start_point": {"row": 53, "column": 43}, "end_point": {"row": 53, "column": 57}}, {"id": 293, "type": "number_literal", "text": "9b", "parent": 291, "children": [], "start_point": {"row": 53, "column": 58}, "end_point": {"row": 53, "column": 60}}, {"id": 294, "type": "number_literal", "text": "07", "parent": 291, "children": [], "start_point": {"row": 53, "column": 61}, "end_point": {"row": 53, "column": 63}}, {"id": 295, "type": "number_literal", "text": "25", "parent": 291, "children": [], "start_point": {"row": 53, "column": 64}, "end_point": {"row": 53, "column": 66}}, {"id": 296, "type": "number_literal", "text": "91", "parent": 291, "children": [], "start_point": {"row": 53, "column": 67}, "end_point": {"row": 53, "column": 69}}, {"id": 297, "type": "declaration", "text": "static void __boot();", "parent": 32, "children": [298, 299], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 23}}, {"id": 298, "type": "primitive_type", "text": "void", "parent": 297, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 13}}, {"id": 299, "type": "function_declarator", "text": "__boot()", "parent": 297, "children": [300, 301], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 22}}, {"id": 300, "type": "identifier", "text": "__boot", "parent": 299, "children": [], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 20}}, {"id": 301, "type": "parameter_list", "text": "()", "parent": 299, "children": [], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 22}}, {"id": 302, "type": "declaration", "text": "static ::Dynamic _hx_BIG_ENDIAN;", "parent": 32, "children": [303, 304], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 35}}, {"id": 303, "type": "type_identifier", "text": "Dynamic", "parent": 302, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 19}}, {"id": 304, "type": "identifier", "text": "_hx_BIG_ENDIAN", "parent": 302, "children": [], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 34}}, {"id": 305, "type": "declaration", "text": "static ::Dynamic _hx_LITTLE_ENDIAN;", "parent": 32, "children": [306, 307], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 38}}, {"id": 306, "type": "type_identifier", "text": "Dynamic", "parent": 305, "children": [], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 19}}, {"id": 307, "type": "identifier", "text": "_hx_LITTLE_ENDIAN", "parent": 305, "children": [], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 37}}, {"id": 308, "type": "declaration", "text": "static ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);", "parent": 32, "children": [309, 310], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 70}}, {"id": 309, "type": "type_identifier", "text": "Dynamic", "parent": 308, "children": [], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 19}}, {"id": 310, "type": "function_declarator", "text": "fromLimeEndian( ::lime::_hx_system::Endian value)", "parent": 308, "children": [311, 312], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 69}}, {"id": 311, "type": "identifier", "text": "fromLimeEndian", "parent": 310, "children": [], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 34}}, {"id": 312, "type": "parameter_list", "text": "( ::lime::_hx_system::Endian value)", "parent": 310, "children": [313], "start_point": {"row": 58, "column": 34}, "end_point": {"row": 58, "column": 69}}, {"id": 313, "type": "parameter_declaration", "text": "lime::_hx_system::Endian value", "parent": 312, "children": [314, 315, 318], "start_point": {"row": 58, "column": 38}, "end_point": {"row": 58, "column": 68}}, {"id": 314, "type": "type_identifier", "text": "lime", "parent": 313, "children": [], "start_point": {"row": 58, "column": 38}, "end_point": {"row": 58, "column": 42}}, {"id": 315, "type": "ERROR", "text": "::_hx_system::Endian", "parent": 313, "children": [316, 317], "start_point": {"row": 58, "column": 42}, "end_point": {"row": 58, "column": 62}}, {"id": 316, "type": "identifier", "text": "_hx_system", "parent": 315, "children": [], "start_point": {"row": 58, "column": 44}, "end_point": {"row": 58, "column": 54}}, {"id": 317, "type": "identifier", "text": "Endian", "parent": 315, "children": [], "start_point": {"row": 58, "column": 56}, "end_point": {"row": 58, "column": 62}}, {"id": 318, "type": "identifier", "text": "value", "parent": 313, "children": [], "start_point": {"row": 58, "column": 63}, "end_point": {"row": 58, "column": 68}}, {"id": 319, "type": "declaration", "text": "static ::Dynamic fromLimeEndian_dyn();", "parent": 32, "children": [320, 321], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 40}}, {"id": 320, "type": "type_identifier", "text": "Dynamic", "parent": 319, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 18}}, {"id": 321, "type": "function_declarator", "text": "fromLimeEndian_dyn()", "parent": 319, "children": [322, 323], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 39}}, {"id": 322, "type": "identifier", "text": "fromLimeEndian_dyn", "parent": 321, "children": [], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 37}}, {"id": 323, "type": "parameter_list", "text": "()", "parent": 321, "children": [], "start_point": {"row": 59, "column": 37}, "end_point": {"row": 59, "column": 39}}, {"id": 324, "type": "declaration", "text": "static ::Dynamic fromString(::String value);", "parent": 32, "children": [325, 326], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 47}}, {"id": 325, "type": "type_identifier", "text": "Dynamic", "parent": 324, "children": [], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 19}}, {"id": 326, "type": "function_declarator", "text": "fromString(::String value)", "parent": 324, "children": [327, 328], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 46}}, {"id": 327, "type": "identifier", "text": "fromString", "parent": 326, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 30}}, {"id": 328, "type": "parameter_list", "text": "(::String value)", "parent": 326, "children": [329], "start_point": {"row": 61, "column": 30}, "end_point": {"row": 61, "column": 46}}, {"id": 329, "type": "parameter_declaration", "text": "String value", "parent": 328, "children": [330, 331], "start_point": {"row": 61, "column": 33}, "end_point": {"row": 61, "column": 45}}, {"id": 330, "type": "type_identifier", "text": "String", "parent": 329, "children": [], "start_point": {"row": 61, "column": 33}, "end_point": {"row": 61, "column": 39}}, {"id": 331, "type": "identifier", "text": "value", "parent": 329, "children": [], "start_point": {"row": 61, "column": 40}, "end_point": {"row": 61, "column": 45}}, {"id": 332, "type": "declaration", "text": "static ::Dynamic fromString_dyn();", "parent": 32, "children": [333, 334], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 36}}, {"id": 333, "type": "type_identifier", "text": "Dynamic", "parent": 332, "children": [], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 18}}, {"id": 334, "type": "function_declarator", "text": "fromString_dyn()", "parent": 332, "children": [335, 336], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 35}}, {"id": 335, "type": "identifier", "text": "fromString_dyn", "parent": 334, "children": [], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 33}}, {"id": 336, "type": "parameter_list", "text": "()", "parent": 334, "children": [], "start_point": {"row": 62, "column": 33}, "end_point": {"row": 62, "column": 35}}, {"id": 337, "type": "declaration", "text": "static ::lime::_hx_system::Endian toLimeEndian(int value);", "parent": 32, "children": [338, 339, 342], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 61}}, {"id": 338, "type": "type_identifier", "text": "lime", "parent": 337, "children": [], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 16}}, {"id": 339, "type": "ERROR", "text": "::_hx_system::Endian", "parent": 337, "children": [340, 341], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 36}}, {"id": 340, "type": "identifier", "text": "_hx_system", "parent": 339, "children": [], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 28}}, {"id": 341, "type": "identifier", "text": "Endian", "parent": 339, "children": [], "start_point": {"row": 64, "column": 30}, "end_point": {"row": 64, "column": 36}}, {"id": 342, "type": "function_declarator", "text": "toLimeEndian(int value)", "parent": 337, "children": [343, 344], "start_point": {"row": 64, "column": 37}, "end_point": {"row": 64, "column": 60}}, {"id": 343, "type": "identifier", "text": "toLimeEndian", "parent": 342, "children": [], "start_point": {"row": 64, "column": 37}, "end_point": {"row": 64, "column": 49}}, {"id": 344, "type": "parameter_list", "text": "(int value)", "parent": 342, "children": [345], "start_point": {"row": 64, "column": 49}, "end_point": {"row": 64, "column": 60}}, {"id": 345, "type": "parameter_declaration", "text": "int value", "parent": 344, "children": [346, 347], "start_point": {"row": 64, "column": 50}, "end_point": {"row": 64, "column": 59}}, {"id": 346, "type": "primitive_type", "text": "int", "parent": 345, "children": [], "start_point": {"row": 64, "column": 50}, "end_point": {"row": 64, "column": 53}}, {"id": 347, "type": "identifier", "text": "value", "parent": 345, "children": [], "start_point": {"row": 64, "column": 54}, "end_point": {"row": 64, "column": 59}}, {"id": 348, "type": "declaration", "text": "static ::Dynamic toLimeEndian_dyn();", "parent": 32, "children": [349, 350], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 38}}, {"id": 349, "type": "type_identifier", "text": "Dynamic", "parent": 348, "children": [], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 18}}, {"id": 350, "type": "function_declarator", "text": "toLimeEndian_dyn()", "parent": 348, "children": [351, 352], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 37}}, {"id": 351, "type": "identifier", "text": "toLimeEndian_dyn", "parent": 350, "children": [], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 35}}, {"id": 352, "type": "parameter_list", "text": "()", "parent": 350, "children": [], "start_point": {"row": 65, "column": 35}, "end_point": {"row": 65, "column": 37}}, {"id": 353, "type": "declaration", "text": "static ::String toString(int value);", "parent": 32, "children": [354, 355], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 38}}, {"id": 354, "type": "type_identifier", "text": "String", "parent": 353, "children": [], "start_point": {"row": 67, "column": 11}, "end_point": {"row": 67, "column": 17}}, {"id": 355, "type": "function_declarator", "text": "toString(int value)", "parent": 353, "children": [356, 357], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 37}}, {"id": 356, "type": "identifier", "text": "toString", "parent": 355, "children": [], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 26}}, {"id": 357, "type": "parameter_list", "text": "(int value)", "parent": 355, "children": [358], "start_point": {"row": 67, "column": 26}, "end_point": {"row": 67, "column": 37}}, {"id": 358, "type": "parameter_declaration", "text": "int value", "parent": 357, "children": [359, 360], "start_point": {"row": 67, "column": 27}, "end_point": {"row": 67, "column": 36}}, {"id": 359, "type": "primitive_type", "text": "int", "parent": 358, "children": [], "start_point": {"row": 67, "column": 27}, "end_point": {"row": 67, "column": 30}}, {"id": 360, "type": "identifier", "text": "value", "parent": 358, "children": [], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 67, "column": 36}}, {"id": 361, "type": "declaration", "text": "static ::Dynamic toString_dyn();", "parent": 32, "children": [362, 363], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 34}}, {"id": 362, "type": "type_identifier", "text": "Dynamic", "parent": 361, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 18}}, {"id": 363, "type": "function_declarator", "text": "toString_dyn()", "parent": 361, "children": [364, 365], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 33}}, {"id": 364, "type": "identifier", "text": "toString_dyn", "parent": 363, "children": [], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 31}}, {"id": 365, "type": "parameter_list", "text": "()", "parent": 363, "children": [], "start_point": {"row": 68, "column": 31}, "end_point": {"row": 68, "column": 33}}, {"id": 366, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 6}}]}, "node_categories": {"declarations": {"functions": [26, 29, 32, 69, 81, 112, 120, 174, 181, 240, 245, 256, 272, 277, 285, 299, 310, 321, 326, 334, 342, 350, 355, 363], "variables": [35, 47, 50, 58, 67, 72, 83, 86, 122, 125, 184, 191, 233, 238, 243, 248, 254, 259, 262, 265, 270, 275, 280, 297, 302, 305, 308, 313, 319, 324, 329, 332, 337, 345, 348, 353, 358, 361], "classes": [73, 113], "imports": [9, 10], "modules": [], "enums": [59, 60, 61, 62]}, "statements": {"expressions": [13, 19, 54, 107, 133, 135, 144, 145, 150, 155, 156, 164, 167, 168, 198, 203, 207, 211, 212, 217, 219, 289], "assignments": [161, 216], "loops": [], "conditionals": [0, 1, 2, 5, 6, 7, 8, 12, 14, 16, 17, 18, 20, 22, 23, 24, 25, 27, 28, 30, 31, 33, 34, 36, 38, 41, 42, 45, 46, 48, 49, 52, 53, 55, 63, 66, 70, 80, 85, 88, 92, 96, 103, 104, 106, 109, 110, 111, 119, 124, 127, 130, 131, 132, 136, 138, 142, 146, 148, 151, 154, 157, 159, 162, 165, 169, 170, 173, 175, 177, 179, 182, 185, 187, 190, 192, 196, 200, 205, 206, 208, 210, 213, 226, 228, 230, 232, 237, 239, 241, 244, 246, 249, 251, 252, 253, 257, 260, 261, 263, 264, 266, 268, 269, 273, 278, 282, 284, 286, 290, 300, 303, 304, 306, 307, 309, 311, 314, 316, 317, 318, 320, 322, 325, 327, 330, 331, 333, 335, 338, 340, 341, 343, 347, 349, 351, 354, 356, 360, 362, 364, 366], "returns": [128, 172, 231, 288], "exceptions": []}, "expressions": {"calls": [], "literals": [11, 65, 99, 140, 215, 292, 293, 294, 295, 296], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 26, "universal_type": "function", "name": "HXCPP_CLASS_ATTRIBUTES", "text_snippet": "namespace openfl{\nnamespace utils{\nnamespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__ob"}, {"node_id": 29, "universal_type": "function", "name": "HXCPP_CLASS_ATTRIBUTES", "text_snippet": "namespace utils{\nnamespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Obj"}, {"node_id": 32, "universal_type": "function", "name": "HXCPP_CLASS_ATTRIBUTES", "text_snippet": "namespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n\tpublic:\n\t\t"}, {"node_id": 69, "universal_type": "function", "name": "unknown", "text_snippet": "__construct()"}, {"node_id": 81, "universal_type": "function", "name": "inContainer", "text_snippet": "new(size_t inSize, bool inContainer"}, {"node_id": 112, "universal_type": "function", "name": "*operator", "text_snippet": "inline void *operator new(size_t inSize, int extra)\n\t\t\t{ return hx::Object::operator new(inSize+extr"}, {"node_id": 120, "universal_type": "function", "name": "extra)", "text_snippet": "new(size_t inSize, int extra)"}, {"node_id": 174, "universal_type": "function", "name": "unknown", "text_snippet": "static hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n\t\t\tEndian_Impl__obj *__this = ("}, {"node_id": 181, "universal_type": "function", "name": "unknown", "text_snippet": "__alloc(hx::Ctx *_hx_ctx)"}, {"node_id": 240, "universal_type": "function", "name": "unknown", "text_snippet": "__CreateEmpty()"}, {"node_id": 245, "universal_type": "function", "name": "unknown", "text_snippet": "__Create(hx::DynamicArray inArgs)"}, {"node_id": 256, "universal_type": "function", "name": "unknown", "text_snippet": "__GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp)"}, {"node_id": 272, "universal_type": "function", "name": "unknown", "text_snippet": "__register()"}, {"node_id": 277, "universal_type": "function", "name": "unknown", "text_snippet": "_hx_isInstanceOf(int inClassId)"}, {"node_id": 285, "universal_type": "function", "name": "unknown", "text_snippet": "__ToString()"}, {"node_id": 299, "universal_type": "function", "name": "unknown", "text_snippet": "__boot()"}, {"node_id": 310, "universal_type": "function", "name": "unknown", "text_snippet": "fromLimeEndian( ::lime::_hx_system::Endian value)"}, {"node_id": 321, "universal_type": "function", "name": "unknown", "text_snippet": "fromLimeEndian_dyn()"}, {"node_id": 326, "universal_type": "function", "name": "unknown", "text_snippet": "fromString(::String value)"}, {"node_id": 334, "universal_type": "function", "name": "unknown", "text_snippet": "fromString_dyn()"}, {"node_id": 342, "universal_type": "function", "name": "unknown", "text_snippet": "toLimeEndian(int value)"}, {"node_id": 350, "universal_type": "function", "name": "unknown", "text_snippet": "toLimeEndian_dyn()"}, {"node_id": 355, "universal_type": "function", "name": "unknown", "text_snippet": "toString(int value)"}, {"node_id": 363, "universal_type": "function", "name": "unknown", "text_snippet": "toString_dyn()"}], "class_declarations": [{"node_id": 73, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 113, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 9, "text": "#include <hxcpp.h>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "// Generated by Haxe 4.0.0-rc.2+77068e10c\n#ifndef INCLUDED_openfl_utils__Endian_Endian_Impl_\n#define INCLUDED_openfl_utils__Endian_Endian_Impl_\n\n#ifndef HXCPP_H\n#include <hxcpp.h>\n#endif\n\nHX_DECLARE_CLASS2(lime,_hx_system,Endian)\nHX_DECLARE_CLASS3(openfl,utils,_Endian,Endian_Impl_)\n\nnamespace openfl{\nnamespace utils{\nnamespace _Endian{\n\n\nclass HXCPP_CLASS_ATTRIBUTES Endian_Impl__obj : public hx::Object\n{\n\tpublic:\n\t\ttypedef hx::Object super;\n\t\ttypedef Endian_Impl__obj OBJ_;\n\t\tEndian_Impl__obj();\n\n\tpublic:\n\t\tenum { _hx_ClassId = 0x3bd39ce0 };\n\n\t\tvoid __construct();\n\t\tinline void *operator new(size_t inSize, bool inContainer=false,const char *inName=\"openfl.utils._Endian.Endian_Impl_\")\n\t\t\t{ return hx::Object::operator new(inSize,inContainer,inName); }\n\t\tinline void *operator new(size_t inSize, int extra)\n\t\t\t{ return hx::Object::operator new(inSize+extra,false,\"openfl.utils._Endian.Endian_Impl_\"); }\n\n\t\thx::ObjectPtr< Endian_Impl__obj > __new() {\n\t\t\thx::ObjectPtr< Endian_Impl__obj > __this = new Endian_Impl__obj();\n\t\t\t__this->__construct();\n\t\t\treturn __this;\n\t\t}\n\n\t\tstatic hx::ObjectPtr< Endian_Impl__obj > __alloc(hx::Ctx *_hx_ctx) {\n\t\t\tEndian_Impl__obj *__this = (Endian_Impl__obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(Endian_Impl__obj), false, \"openfl.utils._Endian.Endian_Impl_\"));\n\t\t\t*(void **)__this = Endian_Impl__obj::_hx_vtable;\n\t\t\treturn __this;\n\t\t}\n\n\t\tstatic void * _hx_vtable;\n\t\tstatic Dynamic __CreateEmpty();\n\t\tstatic Dynamic __Create(hx::DynamicArray inArgs);\n\t\t//~Endian_Impl__obj();\n\n\t\tHX_DO_RTTI_ALL;\n\t\tstatic bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);\n\t\tstatic void __register();\n\t\tbool _hx_isInstanceOf(int inClassId);\n\t\t::String __ToString() const { return HX_(\"Endian_Impl_\",9b,07,25,91); }\n\n\t\tstatic void __boot();\n\t\tstatic ::Dynamic _hx_BIG_ENDIAN;\n\t\tstatic ::Dynamic _hx_LITTLE_ENDIAN;\n\t\tstatic ::Dynamic fromLimeEndian( ::lime::_hx_system::Endian value);\n\t\tstatic ::Dynamic fromLimeEndian_dyn();\n\n\t\tstatic ::Dynamic fromString(::String value);\n\t\tstatic ::Dynamic fromString_dyn();\n\n\t\tstatic ::lime::_hx_system::Endian toLimeEndian(int value);\n\t\tstatic ::Dynamic toLimeEndian_dyn();\n\n\t\tstatic ::String toString(int value);\n\t\tstatic ::Dynamic toString_dyn();\n\n};\n\n} // end namespace openfl\n} // end namespace utils\n} // end namespace _Endian\n\n#endif /* INCLUDED_openfl_utils__Endian_Endian_Impl_ */ \n"}
7
c
// can put any payload here. #include <stdio.h> // the C code for thompson's replicating program, more-or-less. int main() { int i; // Q: why can't we just print prog twice? printf("char prog[] = {\n"); for(i = 0; prog[i]; i++) printf("\t%d,%c", prog[i], (i+1)%8==0 ? '\n' : ' '); printf("0 };\n"); printf("%s", prog); return 0; }
25.31
13
(translation_unit) "// can put any payload here.\n#include <stdio.h>\n\n// the C code for thompson's replicating program, more-or-less.\nint main() { \n int i;\n\n // Q: why can't we just print prog twice?\n printf("char prog[] = {\n");\n for(i = 0; prog[i]; i++)\n printf("\t%d,%c", prog[i], (i+1)%8==0 ? '\n' : ' ');\n printf("0 };\n");\n printf("%s", prog);\n return 0;\n}\n" (comment) "// can put any payload here." (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (comment) "// the C code for thompson's replicating program, more-or-less." (function_definition) "int main() { \n int i;\n\n // Q: why can't we just print prog twice?\n printf("char prog[] = {\n");\n for(i = 0; prog[i]; i++)\n printf("\t%d,%c", prog[i], (i+1)%8==0 ? '\n' : ' ');\n printf("0 };\n");\n printf("%s", prog);\n return 0;\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ \n int i;\n\n // Q: why can't we just print prog twice?\n printf("char prog[] = {\n");\n for(i = 0; prog[i]; i++)\n printf("\t%d,%c", prog[i], (i+1)%8==0 ? '\n' : ' ');\n printf("0 };\n");\n printf("%s", prog);\n return 0;\n}" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (comment) "// Q: why can't we just print prog twice?" (expression_statement) "printf("char prog[] = {\n");" (call_expression) "printf("char prog[] = {\n")" (identifier) "printf" (argument_list) "("char prog[] = {\n")" (() "(" (string_literal) ""char prog[] = {\n"" (") """ (string_content) "char prog[] = {" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (for_statement) "for(i = 0; prog[i]; i++)\n printf("\t%d,%c", prog[i], (i+1)%8==0 ? '\n' : ' ');" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (subscript_expression) "prog[i]" (identifier) "prog" ([) "[" (identifier) "i" (]) "]" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (expression_statement) "printf("\t%d,%c", prog[i], (i+1)%8==0 ? '\n' : ' ');" (call_expression) "printf("\t%d,%c", prog[i], (i+1)%8==0 ? '\n' : ' ')" (identifier) "printf" (argument_list) "("\t%d,%c", prog[i], (i+1)%8==0 ? '\n' : ' ')" (() "(" (string_literal) ""\t%d,%c"" (") """ (escape_sequence) "\t" (string_content) "%d,%c" (") """ (,) "," (subscript_expression) "prog[i]" (identifier) "prog" ([) "[" (identifier) "i" (]) "]" (,) "," (conditional_expression) "(i+1)%8==0 ? '\n' : ' '" (binary_expression) "(i+1)%8==0" (binary_expression) "(i+1)%8" (parenthesized_expression) "(i+1)" (() "(" (binary_expression) "i+1" (identifier) "i" (+) "+" (number_literal) "1" ()) ")" (%) "%" (number_literal) "8" (==) "==" (number_literal) "0" (?) "?" (char_literal) "'\n'" (') "'" (escape_sequence) "\n" (') "'" (:) ":" (char_literal) "' '" (') "'" (character) " " (') "'" ()) ")" (;) ";" (expression_statement) "printf("0 };\n");" (call_expression) "printf("0 };\n")" (identifier) "printf" (argument_list) "("0 };\n")" (() "(" (string_literal) ""0 };\n"" (") """ (string_content) "0 };" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "printf("%s", prog);" (call_expression) "printf("%s", prog)" (identifier) "printf" (argument_list) "("%s", prog)" (() "(" (string_literal) ""%s"" (") """ (string_content) "%s" (") """ (,) "," (identifier) "prog" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
123
0
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 25.31, "nodes": 68, "errors": 0, "source_hash": "18191c20dfdbd8dcd9cb15531fb617da4b8bd83f5bc379d4fadd7e810bb508ff", "categorized_nodes": 46}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.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": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 18}}, {"id": 3, "type": "function_definition", "text": "int main() { \n\tint i;\n\n \t// Q: why can't we just print prog twice?\n\tprintf(\"char prog[] = {\\n\");\n\tfor(i = 0; prog[i]; i++)\n\t\tprintf(\"\\t%d,%c\", prog[i], (i+1)%8==0 ? '\\n' : ' ');\n\tprintf(\"0 };\\n\");\n\tprintf(\"%s\", prog);\n\treturn 0;\n}", "parent": null, "children": [4, 5], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "int", "parent": 3, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 3}}, {"id": 5, "type": "function_declarator", "text": "main()", "parent": 3, "children": [6, 7], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 10}}, {"id": 6, "type": "identifier", "text": "main", "parent": 5, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 8}}, {"id": 7, "type": "parameter_list", "text": "()", "parent": 5, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 10}}, {"id": 8, "type": "declaration", "text": "int i;", "parent": 3, "children": [9, 10], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 7}}, {"id": 9, "type": "primitive_type", "text": "int", "parent": 8, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 4}}, {"id": 10, "type": "identifier", "text": "i", "parent": 8, "children": [], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 6}}, {"id": 11, "type": "call_expression", "text": "printf(\"char prog[] = {\\n\")", "parent": 3, "children": [12, 13], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 28}}, {"id": 12, "type": "identifier", "text": "printf", "parent": 11, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 7}}, {"id": 13, "type": "argument_list", "text": "(\"char prog[] = {\\n\")", "parent": 11, "children": [14], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 28}}, {"id": 14, "type": "string_literal", "text": "\"char prog[] = {\\n\"", "parent": 13, "children": [15], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 27}}, {"id": 15, "type": "escape_sequence", "text": "\\n", "parent": 14, "children": [], "start_point": {"row": 8, "column": 24}, "end_point": {"row": 8, "column": 26}}, {"id": 16, "type": "for_statement", "text": "for(i = 0; prog[i]; i++)\n\t\tprintf(\"\\t%d,%c\", prog[i], (i+1)%8==0 ? '\\n' : ' ');", "parent": 3, "children": [17, 21, 24], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 10, "column": 54}}, {"id": 17, "type": "assignment_expression", "text": "i = 0", "parent": 16, "children": [18, 19, 20], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 10}}, {"id": 18, "type": "identifier", "text": "i", "parent": 17, "children": [], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 6}}, {"id": 19, "type": "=", "text": "=", "parent": 17, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 8}}, {"id": 20, "type": "number_literal", "text": "0", "parent": 17, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 10}}, {"id": 21, "type": "subscript_expression", "text": "prog[i]", "parent": 16, "children": [22, 23], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 19}}, {"id": 22, "type": "identifier", "text": "prog", "parent": 21, "children": [], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 16}}, {"id": 23, "type": "identifier", "text": "i", "parent": 21, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 18}}, {"id": 24, "type": "update_expression", "text": "i++", "parent": 16, "children": [25, 26], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 24}}, {"id": 25, "type": "identifier", "text": "i", "parent": 24, "children": [], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 22}}, {"id": 26, "type": "++", "text": "++", "parent": 24, "children": [], "start_point": {"row": 9, "column": 22}, "end_point": {"row": 9, "column": 24}}, {"id": 27, "type": "call_expression", "text": "printf(\"\\t%d,%c\", prog[i], (i+1)%8==0 ? '\\n' : ' ')", "parent": 16, "children": [28, 29], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 53}}, {"id": 28, "type": "identifier", "text": "printf", "parent": 27, "children": [], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 8}}, {"id": 29, "type": "argument_list", "text": "(\"\\t%d,%c\", prog[i], (i+1)%8==0 ? '\\n' : ' ')", "parent": 27, "children": [30, 32, 35], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 53}}, {"id": 30, "type": "string_literal", "text": "\"\\t%d,%c\"", "parent": 29, "children": [31], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 18}}, {"id": 31, "type": "escape_sequence", "text": "\\t", "parent": 30, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 12}}, {"id": 32, "type": "subscript_expression", "text": "prog[i]", "parent": 29, "children": [33, 34], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 27}}, {"id": 33, "type": "identifier", "text": "prog", "parent": 32, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 24}}, {"id": 34, "type": "identifier", "text": "i", "parent": 32, "children": [], "start_point": {"row": 10, "column": 25}, "end_point": {"row": 10, "column": 26}}, {"id": 35, "type": "conditional_expression", "text": "(i+1)%8==0 ? '\\n' : ' '", "parent": 29, "children": [36, 47, 48, 52], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 52}}, {"id": 36, "type": "binary_expression", "text": "(i+1)%8==0", "parent": 35, "children": [37, 45, 46], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 39}}, {"id": 37, "type": "binary_expression", "text": "(i+1)%8", "parent": 36, "children": [38, 43, 44], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 36}}, {"id": 38, "type": "parenthesized_expression", "text": "(i+1)", "parent": 37, "children": [39], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 34}}, {"id": 39, "type": "binary_expression", "text": "i+1", "parent": 38, "children": [40, 41, 42], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 10, "column": 33}}, {"id": 40, "type": "identifier", "text": "i", "parent": 39, "children": [], "start_point": {"row": 10, "column": 30}, "end_point": {"row": 10, "column": 31}}, {"id": 41, "type": "+", "text": "+", "parent": 39, "children": [], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 32}}, {"id": 42, "type": "number_literal", "text": "1", "parent": 39, "children": [], "start_point": {"row": 10, "column": 32}, "end_point": {"row": 10, "column": 33}}, {"id": 43, "type": "%", "text": "%", "parent": 37, "children": [], "start_point": {"row": 10, "column": 34}, "end_point": {"row": 10, "column": 35}}, {"id": 44, "type": "number_literal", "text": "8", "parent": 37, "children": [], "start_point": {"row": 10, "column": 35}, "end_point": {"row": 10, "column": 36}}, {"id": 45, "type": "==", "text": "==", "parent": 36, "children": [], "start_point": {"row": 10, "column": 36}, "end_point": {"row": 10, "column": 38}}, {"id": 46, "type": "number_literal", "text": "0", "parent": 36, "children": [], "start_point": {"row": 10, "column": 38}, "end_point": {"row": 10, "column": 39}}, {"id": 47, "type": "?", "text": "?", "parent": 35, "children": [], "start_point": {"row": 10, "column": 40}, "end_point": {"row": 10, "column": 41}}, {"id": 48, "type": "char_literal", "text": "'\\n'", "parent": 35, "children": [49, 50, 51], "start_point": {"row": 10, "column": 42}, "end_point": {"row": 10, "column": 46}}, {"id": 49, "type": "'", "text": "'", "parent": 48, "children": [], "start_point": {"row": 10, "column": 42}, "end_point": {"row": 10, "column": 43}}, {"id": 50, "type": "escape_sequence", "text": "\\n", "parent": 48, "children": [], "start_point": {"row": 10, "column": 43}, "end_point": {"row": 10, "column": 45}}, {"id": 51, "type": "'", "text": "'", "parent": 48, "children": [], "start_point": {"row": 10, "column": 45}, "end_point": {"row": 10, "column": 46}}, {"id": 52, "type": "char_literal", "text": "' '", "parent": 35, "children": [53, 54, 55], "start_point": {"row": 10, "column": 49}, "end_point": {"row": 10, "column": 52}}, {"id": 53, "type": "'", "text": "'", "parent": 52, "children": [], "start_point": {"row": 10, "column": 49}, "end_point": {"row": 10, "column": 50}}, {"id": 54, "type": "character", "text": " ", "parent": 52, "children": [], "start_point": {"row": 10, "column": 50}, "end_point": {"row": 10, "column": 51}}, {"id": 55, "type": "'", "text": "'", "parent": 52, "children": [], "start_point": {"row": 10, "column": 51}, "end_point": {"row": 10, "column": 52}}, {"id": 56, "type": "call_expression", "text": "printf(\"0 };\\n\")", "parent": 3, "children": [57, 58], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 17}}, {"id": 57, "type": "identifier", "text": "printf", "parent": 56, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 7}}, {"id": 58, "type": "argument_list", "text": "(\"0 };\\n\")", "parent": 56, "children": [59], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 17}}, {"id": 59, "type": "string_literal", "text": "\"0 };\\n\"", "parent": 58, "children": [60], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 16}}, {"id": 60, "type": "escape_sequence", "text": "\\n", "parent": 59, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 15}}, {"id": 61, "type": "call_expression", "text": "printf(\"%s\", prog)", "parent": 3, "children": [62, 63], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 19}}, {"id": 62, "type": "identifier", "text": "printf", "parent": 61, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 7}}, {"id": 63, "type": "argument_list", "text": "(\"%s\", prog)", "parent": 61, "children": [64, 65], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 19}}, {"id": 64, "type": "string_literal", "text": "\"%s\"", "parent": 63, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 12}}, {"id": 65, "type": "identifier", "text": "prog", "parent": 63, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 18}}, {"id": 66, "type": "return_statement", "text": "return 0;", "parent": 3, "children": [67], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 10}}, {"id": 67, "type": "number_literal", "text": "0", "parent": 66, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 9}}]}, "node_categories": {"declarations": {"functions": [3, 5], "variables": [8], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [11, 21, 24, 27, 32, 36, 37, 38, 39, 56, 61], "assignments": [17], "loops": [16], "conditionals": [6, 10, 12, 18, 22, 23, 25, 28, 33, 34, 35, 40, 57, 62, 65], "returns": [66], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 14, 20, 30, 42, 44, 46, 48, 52, 59, 64, 67], "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\tint i;\n\n \t// Q: why can't we just print prog twice?\n\tprintf(\"char prog[] = {\\n\");\n\tfo"}, {"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": "// can put any payload here.\n#include <stdio.h>\n\n// the C code for thompson's replicating program, more-or-less.\nint main() { \n\tint i;\n\n \t// Q: why can't we just print prog twice?\n\tprintf(\"char prog[] = {\\n\");\n\tfor(i = 0; prog[i]; i++)\n\t\tprintf(\"\\t%d,%c\", prog[i], (i+1)%8==0 ? '\\n' : ' ');\n\tprintf(\"0 };\\n\");\n\tprintf(\"%s\", prog);\n\treturn 0;\n}\n"}
8
c
// // RHReceivePacketCache.h // Pipeline // // Created by zhuruhong on 2019/9/28. // Copyright © 2019年 zhuruhong. All rights reserved. // #import <Foundation/Foundation.h> #import <RHSocketKit/RHSocketKit.h> //NS_ASSUME_NONNULL_BEGIN @interface RHReceivePacketCache : RHDownstreamBuffer @end //NS_ASSUME_NONNULL_END
23.62
13
(translation_unit) "//\n// RHReceivePacketCache.h\n// Pipeline\n//\n// Created by zhuruhong on 2019/9/28.\n// Copyright © 2019年 zhuruhong. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import <RHSocketKit/RHSocketKit.h>\n\n//NS_ASSUME_NONNULL_BEGIN\n\n@interface RHReceivePacketCache : RHDownstreamBuffer\n\n@end\n\n//NS_ASSUME_NONNULL_END\n" (comment) "//" (comment) "// RHReceivePacketCache.h" (comment) "// Pipeline" (comment) "//" (comment) "// Created by zhuruhong on 2019/9/28." (comment) "// Copyright © 2019年 zhuruhong. 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 <RHSocketKit/RHSocketKit.h>\n\n//" (preproc_directive) "port <R" (preproc_arg) "SocketKit/RHSocketKit.h>\n\n/" (comment) "S_ASSUME_NONNULL_BEGIN\n\n@" (ERROR) "terface RHReceivePacketCache : RHDownstreamBuffer\n\n@end\n\n/" (ERROR) "t" (type_identifier) "erface RH" (identifier) "eceivePacketCache : " (:) "H" (identifier) "ownstreamBuffer\n\n@" (ERROR) "d" (identifier) "\n\n/" (comment) "S_ASSUME_NONNULL_END\n"
24
3
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 23.62, "nodes": 13, "errors": 0, "source_hash": "3cd5062c59df58f46f593c01c8b1820d104815f91c4beba28f1e84bb0f5f400c", "categorized_nodes": 6}, "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 <RHSocketKit/RHSocketKit.h>\n\n//", "parent": null, "children": [4, 5], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 4, "type": "preproc_directive", "text": "port <R", "parent": 3, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 5, "type": "preproc_arg", "text": "SocketKit/RHSocketKit.h>\n\n/", "parent": 3, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 35}}, {"id": 6, "type": "ERROR", "text": "terface RHReceivePacketCache : RHDownstreamBuffer\n\n@end\n\n/", "parent": null, "children": [7, 8, 9, 10, 11, 12], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 15, "column": 4}}, {"id": 7, "type": "ERROR", "text": "t", "parent": 6, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 8, "type": "type_identifier", "text": "erface RH", "parent": 6, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 10}}, {"id": 9, "type": "identifier", "text": "eceivePacketCache : ", "parent": 6, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 31}}, {"id": 10, "type": "identifier", "text": "ownstreamBuffer\n\n@", "parent": 6, "children": [], "start_point": {"row": 13, "column": 34}, "end_point": {"row": 13, "column": 52}}, {"id": 11, "type": "ERROR", "text": "d", "parent": 6, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 12, "type": "identifier", "text": "\n\n/", "parent": 6, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [8, 9, 10, 12], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 3], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// RHReceivePacketCache.h\n// Pipeline\n//\n// Created by zhuruhong on 2019/9/28.\n// Copyright \u00a9 2019\u5e74 zhuruhong. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import <RHSocketKit/RHSocketKit.h>\n\n//NS_ASSUME_NONNULL_BEGIN\n\n@interface RHReceivePacketCache : RHDownstreamBuffer\n\n@end\n\n//NS_ASSUME_NONNULL_END\n"}
9
c
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, // but are changed infrequently #if !defined(AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_) #define AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 #define STRICT #define _WIN32_WINNT 0x0400 #define _ATL_FREE_THREADED #include <atlbase.h> //You may derive a class from CComModule and use it if you want to override //something, but do not change the name of _Module #define STATE_NO_CHANGE 12345 #include "ModATLMsg.h" #include "CEventLog.h" class CServiceModule : public CComModule { public: HRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService); HRESULT UnregisterServer(); void Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID); void Start(); void ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv); void Handler(DWORD dwOpcode); void Run(); BOOL IsInstalled(); BOOL Install(); BOOL Uninstall(); LONG Unlock(); void SetServiceStatus( DWORD dwNewState, DWORD dwNewCheckpoint = STATE_NO_CHANGE, DWORD dwNewHint = STATE_NO_CHANGE, DWORD dwNewControls = STATE_NO_CHANGE, DWORD dwExitCode = S_OK, DWORD dwSpecificExit = 0 ); //Implementation private: HANDLE m_hStopEvent; DWORD m_dwRequestedControl; long ReadParameters(); static void WINAPI _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv); static void WINAPI _Handler(DWORD dwOpcode); typedef CComMultiThreadModel::AutoCriticalSection _CritSec; _CritSec m_cs; // data members public: DWORD m_dwMaxTimeout; TCHAR m_szServer[25]; TCHAR m_szServiceName[256]; TCHAR m_szDisplayName[256]; SERVICE_STATUS_HANDLE m_hServiceStatus; SERVICE_STATUS m_status; DWORD dwThreadID; BOOL m_bService; }; extern CServiceModule _Module; #include <atlcom.h> //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. #endif // !defined(AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED)
31.38
65
(translation_unit) "// stdafx.h : include file for standard system include files,\n// or project specific include files that are used frequently,\n// but are changed infrequently\n\n#if !defined(AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_)\n#define AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_\n\n#if _MSC_VER >= 1000\n#pragma once\n#endif // _MSC_VER >= 1000\n\n#define STRICT\n\n\n#define _WIN32_WINNT 0x0400\n#define _ATL_FREE_THREADED\n\n\n#include <atlbase.h>\n//You may derive a class from CComModule and use it if you want to override\n//something, but do not change the name of _Module\n#define STATE_NO_CHANGE 12345\n#include "ModATLMsg.h"\n#include "CEventLog.h"\n\nclass CServiceModule : public CComModule\n{\npublic:\n HRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService);\n HRESULT UnregisterServer();\n void Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID);\n void Start();\n void ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n void Handler(DWORD dwOpcode);\n void Run();\n BOOL IsInstalled();\n BOOL Install();\n BOOL Uninstall();\n LONG Unlock();\n void SetServiceStatus(\n DWORD dwNewState, \n DWORD dwNewCheckpoint = STATE_NO_CHANGE,\n DWORD dwNewHint = STATE_NO_CHANGE,\n DWORD dwNewControls = STATE_NO_CHANGE,\n DWORD dwExitCode = S_OK,\n DWORD dwSpecificExit = 0 );\n\n//Implementation\nprivate:\n HANDLE m_hStopEvent;\n DWORD m_dwRequestedControl;\n long ReadParameters();\n static void WINAPI _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n static void WINAPI _Handler(DWORD dwOpcode);\n\n typedef CComMultiThreadModel::AutoCriticalSection _CritSec;\n _CritSec m_cs;\n\n// data members\npublic:\n DWORD m_dwMaxTimeout;\n TCHAR m_szServer[25];\n TCHAR m_szServiceName[256];\n TCHAR m_szDisplayName[256];\n SERVICE_STATUS_HANDLE m_hServiceStatus;\n SERVICE_STATUS m_status;\n DWORD dwThreadID;\n BOOL m_bService;\n};\n\nextern CServiceModule _Module;\n#include <atlcom.h>\n\n//{{AFX_INSERT_LOCATION}}\n// Microsoft Developer Studio will insert additional declarations immediately before the previous line.\n\n#endif // !defined(AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED)\n" (comment) "// stdafx.h : include file for standard system include files," (comment) "// or project specific include files that are used frequently," (comment) "// but are changed infrequently" (preproc_if) "#if !defined(AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_)\n#define AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_\n\n#if _MSC_VER >= 1000\n#pragma once\n#endif // _MSC_VER >= 1000\n\n#define STRICT\n\n\n#define _WIN32_WINNT 0x0400\n#define _ATL_FREE_THREADED\n\n\n#include <atlbase.h>\n//You may derive a class from CComModule and use it if you want to override\n//something, but do not change the name of _Module\n#define STATE_NO_CHANGE 12345\n#include "ModATLMsg.h"\n#include "CEventLog.h"\n\nclass CServiceModule : public CComModule\n{\npublic:\n HRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService);\n HRESULT UnregisterServer();\n void Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID);\n void Start();\n void ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n void Handler(DWORD dwOpcode);\n void Run();\n BOOL IsInstalled();\n BOOL Install();\n BOOL Uninstall();\n LONG Unlock();\n void SetServiceStatus(\n DWORD dwNewState, \n DWORD dwNewCheckpoint = STATE_NO_CHANGE,\n DWORD dwNewHint = STATE_NO_CHANGE,\n DWORD dwNewControls = STATE_NO_CHANGE,\n DWORD dwExitCode = S_OK,\n DWORD dwSpecificExit = 0 );\n\n//Implementation\nprivate:\n HANDLE m_hStopEvent;\n DWORD m_dwRequestedControl;\n long ReadParameters();\n static void WINAPI _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n static void WINAPI _Handler(DWORD dwOpcode);\n\n typedef CComMultiThreadModel::AutoCriticalSection _CritSec;\n _CritSec m_cs;\n\n// data members\npublic:\n DWORD m_dwMaxTimeout;\n TCHAR m_szServer[25];\n TCHAR m_szServiceName[256];\n TCHAR m_szDisplayName[256];\n SERVICE_STATUS_HANDLE m_hServiceStatus;\n SERVICE_STATUS m_status;\n DWORD dwThreadID;\n BOOL m_bService;\n};\n\nextern CServiceModule _Module;\n#include <atlcom.h>\n\n//{{AFX_INSERT_LOCATION}}\n// Microsoft Developer Studio will insert additional declarations immediately before the previous line.\n\n#endif" (#if) "#if" (unary_expression) "!defined(AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_)" (!) "!" (preproc_defined) "defined(AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_)" (defined) "defined" (() "(" (identifier) "AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_" ()) ")" ( ) "\n" (preproc_def) "#define AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_\n" (#define) "#define" (identifier) "AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__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_def) "#define STRICT\n" (#define) "#define" (identifier) "STRICT" (preproc_def) "#define _WIN32_WINNT 0x0400\n" (#define) "#define" (identifier) "_WIN32_WINNT" (preproc_arg) "0x0400" (preproc_def) "#define _ATL_FREE_THREADED\n" (#define) "#define" (identifier) "_ATL_FREE_THREADED" (preproc_include) "#include <atlbase.h>\n" (#include) "#include" (system_lib_string) "<atlbase.h>" (comment) "//You may derive a class from CComModule and use it if you want to override" (comment) "//something, but do not change the name of _Module" (preproc_def) "#define STATE_NO_CHANGE 12345\n" (#define) "#define" (identifier) "STATE_NO_CHANGE" (preproc_arg) "12345" (preproc_include) "#include "ModATLMsg.h"\n" (#include) "#include" (string_literal) ""ModATLMsg.h"" (") """ (string_content) "ModATLMsg.h" (") """ (preproc_include) "#include "CEventLog.h"\n" (#include) "#include" (string_literal) ""CEventLog.h"" (") """ (string_content) "CEventLog.h" (") """ (function_definition) "class CServiceModule : public CComModule\n{\npublic:\n HRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService);\n HRESULT UnregisterServer();\n void Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID);\n void Start();\n void ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n void Handler(DWORD dwOpcode);\n void Run();\n BOOL IsInstalled();\n BOOL Install();\n BOOL Uninstall();\n LONG Unlock();\n void SetServiceStatus(\n DWORD dwNewState, \n DWORD dwNewCheckpoint = STATE_NO_CHANGE,\n DWORD dwNewHint = STATE_NO_CHANGE,\n DWORD dwNewControls = STATE_NO_CHANGE,\n DWORD dwExitCode = S_OK,\n DWORD dwSpecificExit = 0 );\n\n//Implementation\nprivate:\n HANDLE m_hStopEvent;\n DWORD m_dwRequestedControl;\n long ReadParameters();\n static void WINAPI _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n static void WINAPI _Handler(DWORD dwOpcode);\n\n typedef CComMultiThreadModel::AutoCriticalSection _CritSec;\n _CritSec m_cs;\n\n// data members\npublic:\n DWORD m_dwMaxTimeout;\n TCHAR m_szServer[25];\n TCHAR m_szServiceName[256];\n TCHAR m_szDisplayName[256];\n SERVICE_STATUS_HANDLE m_hServiceStatus;\n SERVICE_STATUS m_status;\n DWORD dwThreadID;\n BOOL m_bService;\n}" (type_identifier) "class" (identifier) "CServiceModule" (ERROR) ": public CComModule" (:) ":" (identifier) "public" (identifier) "CComModule" (compound_statement) "{\npublic:\n HRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService);\n HRESULT UnregisterServer();\n void Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID);\n void Start();\n void ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n void Handler(DWORD dwOpcode);\n void Run();\n BOOL IsInstalled();\n BOOL Install();\n BOOL Uninstall();\n LONG Unlock();\n void SetServiceStatus(\n DWORD dwNewState, \n DWORD dwNewCheckpoint = STATE_NO_CHANGE,\n DWORD dwNewHint = STATE_NO_CHANGE,\n DWORD dwNewControls = STATE_NO_CHANGE,\n DWORD dwExitCode = S_OK,\n DWORD dwSpecificExit = 0 );\n\n//Implementation\nprivate:\n HANDLE m_hStopEvent;\n DWORD m_dwRequestedControl;\n long ReadParameters();\n static void WINAPI _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n static void WINAPI _Handler(DWORD dwOpcode);\n\n typedef CComMultiThreadModel::AutoCriticalSection _CritSec;\n _CritSec m_cs;\n\n// data members\npublic:\n DWORD m_dwMaxTimeout;\n TCHAR m_szServer[25];\n TCHAR m_szServiceName[256];\n TCHAR m_szDisplayName[256];\n SERVICE_STATUS_HANDLE m_hServiceStatus;\n SERVICE_STATUS m_status;\n DWORD dwThreadID;\n BOOL m_bService;\n}" ({) "{" (labeled_statement) "public:\n HRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService);" (statement_identifier) "public" (:) ":" (declaration) "HRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService);" (type_identifier) "HRESULT" (function_declarator) "RegisterServer(BOOL bRegTypeLib, BOOL bService)" (identifier) "RegisterServer" (parameter_list) "(BOOL bRegTypeLib, BOOL bService)" (() "(" (parameter_declaration) "BOOL bRegTypeLib" (type_identifier) "BOOL" (identifier) "bRegTypeLib" (,) "," (parameter_declaration) "BOOL bService" (type_identifier) "BOOL" (identifier) "bService" ()) ")" (;) ";" (declaration) "HRESULT UnregisterServer();" (type_identifier) "HRESULT" (function_declarator) "UnregisterServer()" (identifier) "UnregisterServer" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID);" (primitive_type) "void" (function_declarator) "Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID)" (identifier) "Init" (parameter_list) "(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID)" (() "(" (parameter_declaration) "_ATL_OBJMAP_ENTRY* p" (type_identifier) "_ATL_OBJMAP_ENTRY" (pointer_declarator) "* p" (*) "*" (identifier) "p" (,) "," (parameter_declaration) "HINSTANCE h" (type_identifier) "HINSTANCE" (identifier) "h" (,) "," (parameter_declaration) "UINT nServiceNameID" (type_identifier) "UINT" (identifier) "nServiceNameID" ()) ")" (;) ";" (declaration) "void Start();" (primitive_type) "void" (function_declarator) "Start()" (identifier) "Start" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);" (primitive_type) "void" (function_declarator) "ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv)" (identifier) "ServiceMain" (parameter_list) "(DWORD dwArgc, LPTSTR* lpszArgv)" (() "(" (parameter_declaration) "DWORD dwArgc" (type_identifier) "DWORD" (identifier) "dwArgc" (,) "," (parameter_declaration) "LPTSTR* lpszArgv" (type_identifier) "LPTSTR" (pointer_declarator) "* lpszArgv" (*) "*" (identifier) "lpszArgv" ()) ")" (;) ";" (declaration) "void Handler(DWORD dwOpcode);" (primitive_type) "void" (function_declarator) "Handler(DWORD dwOpcode)" (identifier) "Handler" (parameter_list) "(DWORD dwOpcode)" (() "(" (parameter_declaration) "DWORD dwOpcode" (type_identifier) "DWORD" (identifier) "dwOpcode" ()) ")" (;) ";" (declaration) "void Run();" (primitive_type) "void" (function_declarator) "Run()" (identifier) "Run" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "BOOL IsInstalled();" (type_identifier) "BOOL" (function_declarator) "IsInstalled()" (identifier) "IsInstalled" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "BOOL Install();" (type_identifier) "BOOL" (function_declarator) "Install()" (identifier) "Install" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "BOOL Uninstall();" (type_identifier) "BOOL" (function_declarator) "Uninstall()" (identifier) "Uninstall" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "LONG Unlock();" (type_identifier) "LONG" (function_declarator) "Unlock()" (identifier) "Unlock" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void SetServiceStatus(\n DWORD dwNewState, \n DWORD dwNewCheckpoint = STATE_NO_CHANGE,\n DWORD dwNewHint = STATE_NO_CHANGE,\n DWORD dwNewControls = STATE_NO_CHANGE,\n DWORD dwExitCode = S_OK,\n DWORD dwSpecificExit = 0 );" (primitive_type) "void" (init_declarator) "SetServiceStatus(\n DWORD dwNewState, \n DWORD dwNewCheckpoint = STATE_NO_CHANGE,\n DWORD dwNewHint = STATE_NO_CHANGE,\n DWORD dwNewControls = STATE_NO_CHANGE,\n DWORD dwExitCode = S_OK,\n DWORD dwSpecificExit = 0" (function_declarator) "SetServiceStatus(\n DWORD dwNewState, \n DWORD dwNewCheckpoint = STATE_NO_CHANGE,\n DWORD dwNewHint = STATE_NO_CHANGE,\n DWORD dwNewControls = STATE_NO_CHANGE,\n DWORD dwExitCode = S_OK,\n DWORD dwSpecificExit" (identifier) "SetServiceStatus" (parameter_list) "(\n DWORD dwNewState, \n DWORD dwNewCheckpoint = STATE_NO_CHANGE,\n DWORD dwNewHint = STATE_NO_CHANGE,\n DWORD dwNewControls = STATE_NO_CHANGE,\n DWORD dwExitCode = S_OK,\n DWORD dwSpecificExit" (() "(" (parameter_declaration) "DWORD dwNewState" (type_identifier) "DWORD" (identifier) "dwNewState" (,) "," (parameter_declaration) "DWORD dwNewCheckpoint = STATE_NO_CHANGE" (type_identifier) "DWORD" (ERROR) "dwNewCheckpoint =" (identifier) "dwNewCheckpoint" (=) "=" (identifier) "STATE_NO_CHANGE" (,) "," (parameter_declaration) "DWORD dwNewHint = STATE_NO_CHANGE" (type_identifier) "DWORD" (ERROR) "dwNewHint =" (identifier) "dwNewHint" (=) "=" (identifier) "STATE_NO_CHANGE" (,) "," (parameter_declaration) "DWORD dwNewControls = STATE_NO_CHANGE" (type_identifier) "DWORD" (ERROR) "dwNewControls =" (identifier) "dwNewControls" (=) "=" (identifier) "STATE_NO_CHANGE" (,) "," (parameter_declaration) "DWORD dwExitCode = S_OK" (type_identifier) "DWORD" (ERROR) "dwExitCode =" (identifier) "dwExitCode" (=) "=" (identifier) "S_OK" (,) "," (parameter_declaration) "DWORD dwSpecificExit" (type_identifier) "DWORD" (identifier) "dwSpecificExit" ()) "" (=) "=" (number_literal) "0" (ERROR) ")" ()) ")" (;) ";" (comment) "//Implementation" (labeled_statement) "private:\n HANDLE m_hStopEvent;" (statement_identifier) "private" (:) ":" (declaration) "HANDLE m_hStopEvent;" (type_identifier) "HANDLE" (identifier) "m_hStopEvent" (;) ";" (declaration) "DWORD m_dwRequestedControl;" (type_identifier) "DWORD" (identifier) "m_dwRequestedControl" (;) ";" (declaration) "long ReadParameters();" (sized_type_specifier) "long" (long) "long" (function_declarator) "ReadParameters()" (identifier) "ReadParameters" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static void WINAPI _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (ERROR) "WINAPI" (identifier) "WINAPI" (function_declarator) "_ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv)" (identifier) "_ServiceMain" (parameter_list) "(DWORD dwArgc, LPTSTR* lpszArgv)" (() "(" (parameter_declaration) "DWORD dwArgc" (type_identifier) "DWORD" (identifier) "dwArgc" (,) "," (parameter_declaration) "LPTSTR* lpszArgv" (type_identifier) "LPTSTR" (pointer_declarator) "* lpszArgv" (*) "*" (identifier) "lpszArgv" ()) ")" (;) ";" (declaration) "static void WINAPI _Handler(DWORD dwOpcode);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (ERROR) "WINAPI" (identifier) "WINAPI" (function_declarator) "_Handler(DWORD dwOpcode)" (identifier) "_Handler" (parameter_list) "(DWORD dwOpcode)" (() "(" (parameter_declaration) "DWORD dwOpcode" (type_identifier) "DWORD" (identifier) "dwOpcode" ()) ")" (;) ";" (type_definition) "typedef CComMultiThreadModel::AutoCriticalSection _CritSec;" (typedef) "typedef" (type_identifier) "CComMultiThreadModel" (ERROR) "::AutoCriticalSection" (:) ":" (:) ":" (type_identifier) "AutoCriticalSection" (type_identifier) "_CritSec" (;) ";" (declaration) "_CritSec m_cs;" (type_identifier) "_CritSec" (identifier) "m_cs" (;) ";" (comment) "// data members" (labeled_statement) "public:\n DWORD m_dwMaxTimeout;" (statement_identifier) "public" (:) ":" (declaration) "DWORD m_dwMaxTimeout;" (type_identifier) "DWORD" (identifier) "m_dwMaxTimeout" (;) ";" (declaration) "TCHAR m_szServer[25];" (type_identifier) "TCHAR" (array_declarator) "m_szServer[25]" (identifier) "m_szServer" ([) "[" (number_literal) "25" (]) "]" (;) ";" (declaration) "TCHAR m_szServiceName[256];" (type_identifier) "TCHAR" (array_declarator) "m_szServiceName[256]" (identifier) "m_szServiceName" ([) "[" (number_literal) "256" (]) "]" (;) ";" (declaration) "TCHAR m_szDisplayName[256];" (type_identifier) "TCHAR" (array_declarator) "m_szDisplayName[256]" (identifier) "m_szDisplayName" ([) "[" (number_literal) "256" (]) "]" (;) ";" (declaration) "SERVICE_STATUS_HANDLE m_hServiceStatus;" (type_identifier) "SERVICE_STATUS_HANDLE" (identifier) "m_hServiceStatus" (;) ";" (declaration) "SERVICE_STATUS m_status;" (type_identifier) "SERVICE_STATUS" (identifier) "m_status" (;) ";" (declaration) "DWORD dwThreadID;" (type_identifier) "DWORD" (identifier) "dwThreadID" (;) ";" (declaration) "BOOL m_bService;" (type_identifier) "BOOL" (identifier) "m_bService" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (declaration) "extern CServiceModule _Module;" (storage_class_specifier) "extern" (extern) "extern" (type_identifier) "CServiceModule" (identifier) "_Module" (;) ";" (preproc_include) "#include <atlcom.h>\n" (#include) "#include" (system_lib_string) "<atlcom.h>" (comment) "//{{AFX_INSERT_LOCATION}}" (comment) "// Microsoft Developer Studio will insert additional declarations immediately before the previous line." (#endif) "#endif" (comment) "// !defined(AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED)"
374
9
{"language": "c", "success": true, "metadata": {"lines": 65, "avg_line_length": 31.38, "nodes": 258, "errors": 0, "source_hash": "253cb987ed9f4f87e69c0888fda3f816539bf6e5a560521d4b00a93016959a3e", "categorized_nodes": 186}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_if", "text": "#if !defined(AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_)\n#define AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_\n\n#if _MSC_VER >= 1000\n#pragma once\n#endif // _MSC_VER >= 1000\n\n#define STRICT\n\n\n#define _WIN32_WINNT 0x0400\n#define _ATL_FREE_THREADED\n\n\n#include <atlbase.h>\n//You may derive a class from CComModule and use it if you want to override\n//something, but do not change the name of _Module\n#define STATE_NO_CHANGE 12345\n#include \"ModATLMsg.h\"\n#include \"CEventLog.h\"\n\nclass CServiceModule : public CComModule\n{\npublic:\n\tHRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService);\n\tHRESULT UnregisterServer();\n\tvoid Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID);\n void Start();\n\tvoid ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n void Handler(DWORD dwOpcode);\n void Run();\n BOOL IsInstalled();\n BOOL Install();\n BOOL Uninstall();\n\tLONG Unlock();\n\tvoid SetServiceStatus(\n\t\t\tDWORD dwNewState, \n\t\t\tDWORD dwNewCheckpoint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewHint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewControls = STATE_NO_CHANGE,\n\t\t\tDWORD dwExitCode = S_OK,\n\t\t\tDWORD dwSpecificExit = 0 );\n\n//Implementation\nprivate:\n\tHANDLE m_hStopEvent;\n\tDWORD m_dwRequestedControl;\n\tlong ReadParameters();\n\tstatic void WINAPI _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n static void WINAPI _Handler(DWORD dwOpcode);\n\n\ttypedef CComMultiThreadModel::AutoCriticalSection _CritSec;\n\t_CritSec m_cs;\n\n// data members\npublic:\n\tDWORD m_dwMaxTimeout;\n\tTCHAR m_szServer[25];\n TCHAR m_szServiceName[256];\n\tTCHAR m_szDisplayName[256];\n SERVICE_STATUS_HANDLE m_hServiceStatus;\n SERVICE_STATUS m_status;\n\tDWORD dwThreadID;\n\tBOOL m_bService;\n};\n\nextern CServiceModule _Module;\n#include <atlcom.h>\n\n//{{AFX_INSERT_LOCATION}}\n// Microsoft Developer Studio will insert additional declarations immediately before the previous line.\n\n#endif", "parent": null, "children": [1, 2, 7, 8, 11, 22, 25, 29, 32, 35, 39, 42, 45, 249, 254, 257], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 76, "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_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_)", "parent": 0, "children": [3, 4], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 75}}, {"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_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_)", "parent": 2, "children": [5, 6], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 75}}, {"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_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_", "parent": 4, "children": [], "start_point": {"row": 4, "column": 13}, "end_point": {"row": 4, "column": 74}}, {"id": 7, "type": "\n", "text": "\n", "parent": 0, "children": [], "start_point": {"row": 4, "column": 75}, "end_point": {"row": 5, "column": 0}}, {"id": 8, "type": "preproc_def", "text": "#define AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_\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_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_", "parent": 8, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 69}}, {"id": 11, "type": "preproc_if", "text": "#if _MSC_VER >= 1000\n#pragma once\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": 20}}, {"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": 15}}, {"id": 16, "type": "number_literal", "text": "1000", "parent": 13, "children": [], "start_point": {"row": 7, "column": 16}, "end_point": {"row": 7, "column": 20}}, {"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\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", "parent": 18, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 12}}, {"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_def", "text": "#define STRICT\n", "parent": 0, "children": [23, 24], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 23, "type": "#define", "text": "#define", "parent": 22, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 24, "type": "identifier", "text": "STRICT", "parent": 22, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 14}}, {"id": 25, "type": "preproc_def", "text": "#define _WIN32_WINNT 0x0400\n", "parent": 0, "children": [26, 27, 28], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 26, "type": "#define", "text": "#define", "parent": 25, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 27, "type": "identifier", "text": "_WIN32_WINNT", "parent": 25, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 20}}, {"id": 28, "type": "preproc_arg", "text": "0x0400", "parent": 25, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 27}}, {"id": 29, "type": "preproc_def", "text": "#define _ATL_FREE_THREADED\n", "parent": 0, "children": [30, 31], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 30, "type": "#define", "text": "#define", "parent": 29, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 31, "type": "identifier", "text": "_ATL_FREE_THREADED", "parent": 29, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 26}}, {"id": 32, "type": "preproc_include", "text": "#include <atlbase.h>\n", "parent": 0, "children": [33, 34], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 33, "type": "#include", "text": "#include", "parent": 32, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 34, "type": "system_lib_string", "text": "<atlbase.h>", "parent": 32, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 20}}, {"id": 35, "type": "preproc_def", "text": "#define STATE_NO_CHANGE 12345\n", "parent": 0, "children": [36, 37, 38], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 36, "type": "#define", "text": "#define", "parent": 35, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 37, "type": "identifier", "text": "STATE_NO_CHANGE", "parent": 35, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 23}}, {"id": 38, "type": "preproc_arg", "text": "12345", "parent": 35, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 29}}, {"id": 39, "type": "preproc_include", "text": "#include \"ModATLMsg.h\"\n", "parent": 0, "children": [40, 41], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 41, "type": "string_literal", "text": "\"ModATLMsg.h\"", "parent": 39, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 22}}, {"id": 42, "type": "preproc_include", "text": "#include \"CEventLog.h\"\n", "parent": 0, "children": [43, 44], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 43, "type": "#include", "text": "#include", "parent": 42, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 44, "type": "string_literal", "text": "\"CEventLog.h\"", "parent": 42, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 22}}, {"id": 45, "type": "function_definition", "text": "class CServiceModule : public CComModule\n{\npublic:\n\tHRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService);\n\tHRESULT UnregisterServer();\n\tvoid Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID);\n void Start();\n\tvoid ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n void Handler(DWORD dwOpcode);\n void Run();\n BOOL IsInstalled();\n BOOL Install();\n BOOL Uninstall();\n\tLONG Unlock();\n\tvoid SetServiceStatus(\n\t\t\tDWORD dwNewState, \n\t\t\tDWORD dwNewCheckpoint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewHint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewControls = STATE_NO_CHANGE,\n\t\t\tDWORD dwExitCode = S_OK,\n\t\t\tDWORD dwSpecificExit = 0 );\n\n//Implementation\nprivate:\n\tHANDLE m_hStopEvent;\n\tDWORD m_dwRequestedControl;\n\tlong ReadParameters();\n\tstatic void WINAPI _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n static void WINAPI _Handler(DWORD dwOpcode);\n\n\ttypedef CComMultiThreadModel::AutoCriticalSection _CritSec;\n\t_CritSec m_cs;\n\n// data members\npublic:\n\tDWORD m_dwMaxTimeout;\n\tTCHAR m_szServer[25];\n TCHAR m_szServiceName[256];\n\tTCHAR m_szDisplayName[256];\n SERVICE_STATUS_HANDLE m_hServiceStatus;\n SERVICE_STATUS m_status;\n\tDWORD dwThreadID;\n\tBOOL m_bService;\n}", "parent": 0, "children": [46, 47], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 68, "column": 1}}, {"id": 46, "type": "identifier", "text": "CServiceModule", "parent": 45, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 20}}, {"id": 47, "type": "ERROR", "text": ": public CComModule", "parent": 45, "children": [48], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 40}}, {"id": 48, "type": "identifier", "text": "CComModule", "parent": 47, "children": [], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 40}}, {"id": 49, "type": "labeled_statement", "text": "public:\n\tHRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService);", "parent": 45, "children": [50], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 57}}, {"id": 50, "type": "declaration", "text": "HRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService);", "parent": 49, "children": [51, 52], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 57}}, {"id": 51, "type": "type_identifier", "text": "HRESULT", "parent": 50, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 8}}, {"id": 52, "type": "function_declarator", "text": "RegisterServer(BOOL bRegTypeLib, BOOL bService)", "parent": 50, "children": [53, 54], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 56}}, {"id": 53, "type": "identifier", "text": "RegisterServer", "parent": 52, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 23}}, {"id": 54, "type": "parameter_list", "text": "(BOOL bRegTypeLib, BOOL bService)", "parent": 52, "children": [55, 58], "start_point": {"row": 28, "column": 23}, "end_point": {"row": 28, "column": 56}}, {"id": 55, "type": "parameter_declaration", "text": "BOOL bRegTypeLib", "parent": 54, "children": [56, 57], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 40}}, {"id": 56, "type": "type_identifier", "text": "BOOL", "parent": 55, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 28}}, {"id": 57, "type": "identifier", "text": "bRegTypeLib", "parent": 55, "children": [], "start_point": {"row": 28, "column": 29}, "end_point": {"row": 28, "column": 40}}, {"id": 58, "type": "parameter_declaration", "text": "BOOL bService", "parent": 54, "children": [59, 60], "start_point": {"row": 28, "column": 42}, "end_point": {"row": 28, "column": 55}}, {"id": 59, "type": "type_identifier", "text": "BOOL", "parent": 58, "children": [], "start_point": {"row": 28, "column": 42}, "end_point": {"row": 28, "column": 46}}, {"id": 60, "type": "identifier", "text": "bService", "parent": 58, "children": [], "start_point": {"row": 28, "column": 47}, "end_point": {"row": 28, "column": 55}}, {"id": 61, "type": "declaration", "text": "HRESULT UnregisterServer();", "parent": 45, "children": [62, 63], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 28}}, {"id": 62, "type": "type_identifier", "text": "HRESULT", "parent": 61, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 8}}, {"id": 63, "type": "function_declarator", "text": "UnregisterServer()", "parent": 61, "children": [64, 65], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 27}}, {"id": 64, "type": "identifier", "text": "UnregisterServer", "parent": 63, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 25}}, {"id": 65, "type": "parameter_list", "text": "()", "parent": 63, "children": [], "start_point": {"row": 29, "column": 25}, "end_point": {"row": 29, "column": 27}}, {"id": 66, "type": "declaration", "text": "void Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID);", "parent": 45, "children": [67, 68], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 67}}, {"id": 67, "type": "primitive_type", "text": "void", "parent": 66, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 5}}, {"id": 68, "type": "function_declarator", "text": "Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID)", "parent": 66, "children": [69, 70], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 66}}, {"id": 69, "type": "identifier", "text": "Init", "parent": 68, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 10}}, {"id": 70, "type": "parameter_list", "text": "(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID)", "parent": 68, "children": [71, 76, 79], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 66}}, {"id": 71, "type": "parameter_declaration", "text": "_ATL_OBJMAP_ENTRY* p", "parent": 70, "children": [72, 73], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 31}}, {"id": 72, "type": "type_identifier", "text": "_ATL_OBJMAP_ENTRY", "parent": 71, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 28}}, {"id": 73, "type": "pointer_declarator", "text": "* p", "parent": 71, "children": [74, 75], "start_point": {"row": 30, "column": 28}, "end_point": {"row": 30, "column": 31}}, {"id": 74, "type": "*", "text": "*", "parent": 73, "children": [], "start_point": {"row": 30, "column": 28}, "end_point": {"row": 30, "column": 29}}, {"id": 75, "type": "identifier", "text": "p", "parent": 73, "children": [], "start_point": {"row": 30, "column": 30}, "end_point": {"row": 30, "column": 31}}, {"id": 76, "type": "parameter_declaration", "text": "HINSTANCE h", "parent": 70, "children": [77, 78], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 44}}, {"id": 77, "type": "type_identifier", "text": "HINSTANCE", "parent": 76, "children": [], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 42}}, {"id": 78, "type": "identifier", "text": "h", "parent": 76, "children": [], "start_point": {"row": 30, "column": 43}, "end_point": {"row": 30, "column": 44}}, {"id": 79, "type": "parameter_declaration", "text": "UINT nServiceNameID", "parent": 70, "children": [80, 81], "start_point": {"row": 30, "column": 46}, "end_point": {"row": 30, "column": 65}}, {"id": 80, "type": "type_identifier", "text": "UINT", "parent": 79, "children": [], "start_point": {"row": 30, "column": 46}, "end_point": {"row": 30, "column": 50}}, {"id": 81, "type": "identifier", "text": "nServiceNameID", "parent": 79, "children": [], "start_point": {"row": 30, "column": 51}, "end_point": {"row": 30, "column": 65}}, {"id": 82, "type": "declaration", "text": "void Start();", "parent": 45, "children": [83, 84], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 17}}, {"id": 83, "type": "primitive_type", "text": "void", "parent": 82, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 8}}, {"id": 84, "type": "function_declarator", "text": "Start()", "parent": 82, "children": [85, 86], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 16}}, {"id": 85, "type": "identifier", "text": "Start", "parent": 84, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 14}}, {"id": 86, "type": "parameter_list", "text": "()", "parent": 84, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 16}}, {"id": 87, "type": "declaration", "text": "void ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);", "parent": 45, "children": [88, 89], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 50}}, {"id": 88, "type": "primitive_type", "text": "void", "parent": 87, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 5}}, {"id": 89, "type": "function_declarator", "text": "ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv)", "parent": 87, "children": [90, 91], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 49}}, {"id": 90, "type": "identifier", "text": "ServiceMain", "parent": 89, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 17}}, {"id": 91, "type": "parameter_list", "text": "(DWORD dwArgc, LPTSTR* lpszArgv)", "parent": 89, "children": [92, 95], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 49}}, {"id": 92, "type": "parameter_declaration", "text": "DWORD dwArgc", "parent": 91, "children": [93, 94], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 30}}, {"id": 93, "type": "type_identifier", "text": "DWORD", "parent": 92, "children": [], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 23}}, {"id": 94, "type": "identifier", "text": "dwArgc", "parent": 92, "children": [], "start_point": {"row": 32, "column": 24}, "end_point": {"row": 32, "column": 30}}, {"id": 95, "type": "parameter_declaration", "text": "LPTSTR* lpszArgv", "parent": 91, "children": [96, 97], "start_point": {"row": 32, "column": 32}, "end_point": {"row": 32, "column": 48}}, {"id": 96, "type": "type_identifier", "text": "LPTSTR", "parent": 95, "children": [], "start_point": {"row": 32, "column": 32}, "end_point": {"row": 32, "column": 38}}, {"id": 97, "type": "pointer_declarator", "text": "* lpszArgv", "parent": 95, "children": [98, 99], "start_point": {"row": 32, "column": 38}, "end_point": {"row": 32, "column": 48}}, {"id": 98, "type": "*", "text": "*", "parent": 97, "children": [], "start_point": {"row": 32, "column": 38}, "end_point": {"row": 32, "column": 39}}, {"id": 99, "type": "identifier", "text": "lpszArgv", "parent": 97, "children": [], "start_point": {"row": 32, "column": 40}, "end_point": {"row": 32, "column": 48}}, {"id": 100, "type": "declaration", "text": "void Handler(DWORD dwOpcode);", "parent": 45, "children": [101, 102], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 33}}, {"id": 101, "type": "primitive_type", "text": "void", "parent": 100, "children": [], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 33, "column": 8}}, {"id": 102, "type": "function_declarator", "text": "Handler(DWORD dwOpcode)", "parent": 100, "children": [103, 104], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 32}}, {"id": 103, "type": "identifier", "text": "Handler", "parent": 102, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 16}}, {"id": 104, "type": "parameter_list", "text": "(DWORD dwOpcode)", "parent": 102, "children": [105], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 32}}, {"id": 105, "type": "parameter_declaration", "text": "DWORD dwOpcode", "parent": 104, "children": [106, 107], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 31}}, {"id": 106, "type": "type_identifier", "text": "DWORD", "parent": 105, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 22}}, {"id": 107, "type": "identifier", "text": "dwOpcode", "parent": 105, "children": [], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 31}}, {"id": 108, "type": "declaration", "text": "void Run();", "parent": 45, "children": [109, 110], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 15}}, {"id": 109, "type": "primitive_type", "text": "void", "parent": 108, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 8}}, {"id": 110, "type": "function_declarator", "text": "Run()", "parent": 108, "children": [111, 112], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 14}}, {"id": 111, "type": "identifier", "text": "Run", "parent": 110, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 12}}, {"id": 112, "type": "parameter_list", "text": "()", "parent": 110, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 14}}, {"id": 113, "type": "declaration", "text": "BOOL IsInstalled();", "parent": 45, "children": [114, 115], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 23}}, {"id": 114, "type": "type_identifier", "text": "BOOL", "parent": 113, "children": [], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 8}}, {"id": 115, "type": "function_declarator", "text": "IsInstalled()", "parent": 113, "children": [116, 117], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 22}}, {"id": 116, "type": "identifier", "text": "IsInstalled", "parent": 115, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 20}}, {"id": 117, "type": "parameter_list", "text": "()", "parent": 115, "children": [], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 22}}, {"id": 118, "type": "declaration", "text": "BOOL Install();", "parent": 45, "children": [119, 120], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 19}}, {"id": 119, "type": "type_identifier", "text": "BOOL", "parent": 118, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 8}}, {"id": 120, "type": "function_declarator", "text": "Install()", "parent": 118, "children": [121, 122], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 18}}, {"id": 121, "type": "identifier", "text": "Install", "parent": 120, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 16}}, {"id": 122, "type": "parameter_list", "text": "()", "parent": 120, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 18}}, {"id": 123, "type": "declaration", "text": "BOOL Uninstall();", "parent": 45, "children": [124, 125], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 21}}, {"id": 124, "type": "type_identifier", "text": "BOOL", "parent": 123, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 8}}, {"id": 125, "type": "function_declarator", "text": "Uninstall()", "parent": 123, "children": [126, 127], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 20}}, {"id": 126, "type": "identifier", "text": "Uninstall", "parent": 125, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 18}}, {"id": 127, "type": "parameter_list", "text": "()", "parent": 125, "children": [], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 20}}, {"id": 128, "type": "declaration", "text": "LONG Unlock();", "parent": 45, "children": [129, 130], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 15}}, {"id": 129, "type": "type_identifier", "text": "LONG", "parent": 128, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 5}}, {"id": 130, "type": "function_declarator", "text": "Unlock()", "parent": 128, "children": [131, 132], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 14}}, {"id": 131, "type": "identifier", "text": "Unlock", "parent": 130, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 12}}, {"id": 132, "type": "parameter_list", "text": "()", "parent": 130, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 14}}, {"id": 133, "type": "declaration", "text": "void SetServiceStatus(\n\t\t\tDWORD dwNewState, \n\t\t\tDWORD dwNewCheckpoint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewHint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewControls = STATE_NO_CHANGE,\n\t\t\tDWORD dwExitCode = S_OK,\n\t\t\tDWORD dwSpecificExit = 0 );", "parent": 45, "children": [134, 135], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 45, "column": 30}}, {"id": 134, "type": "primitive_type", "text": "void", "parent": 133, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 5}}, {"id": 135, "type": "init_declarator", "text": "SetServiceStatus(\n\t\t\tDWORD dwNewState, \n\t\t\tDWORD dwNewCheckpoint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewHint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewControls = STATE_NO_CHANGE,\n\t\t\tDWORD dwExitCode = S_OK,\n\t\t\tDWORD dwSpecificExit = 0", "parent": 133, "children": [136, 169, 170], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 45, "column": 27}}, {"id": 136, "type": "function_declarator", "text": "SetServiceStatus(\n\t\t\tDWORD dwNewState, \n\t\t\tDWORD dwNewCheckpoint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewHint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewControls = STATE_NO_CHANGE,\n\t\t\tDWORD dwExitCode = S_OK,\n\t\t\tDWORD dwSpecificExit", "parent": 135, "children": [137, 138], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 45, "column": 23}}, {"id": 137, "type": "identifier", "text": "SetServiceStatus", "parent": 136, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 22}}, {"id": 138, "type": "parameter_list", "text": "(\n\t\t\tDWORD dwNewState, \n\t\t\tDWORD dwNewCheckpoint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewHint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewControls = STATE_NO_CHANGE,\n\t\t\tDWORD dwExitCode = S_OK,\n\t\t\tDWORD dwSpecificExit", "parent": 136, "children": [139, 142, 148, 154, 160, 166], "start_point": {"row": 39, "column": 22}, "end_point": {"row": 45, "column": 23}}, {"id": 139, "type": "parameter_declaration", "text": "DWORD dwNewState", "parent": 138, "children": [140, 141], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 19}}, {"id": 140, "type": "type_identifier", "text": "DWORD", "parent": 139, "children": [], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 8}}, {"id": 141, "type": "identifier", "text": "dwNewState", "parent": 139, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 19}}, {"id": 142, "type": "parameter_declaration", "text": "DWORD dwNewCheckpoint = STATE_NO_CHANGE", "parent": 138, "children": [143, 144, 147], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 42}}, {"id": 143, "type": "type_identifier", "text": "DWORD", "parent": 142, "children": [], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 8}}, {"id": 144, "type": "ERROR", "text": "dwNewCheckpoint =", "parent": 142, "children": [145, 146], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 26}}, {"id": 145, "type": "identifier", "text": "dwNewCheckpoint", "parent": 144, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 24}}, {"id": 146, "type": "=", "text": "=", "parent": 144, "children": [], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 26}}, {"id": 147, "type": "identifier", "text": "STATE_NO_CHANGE", "parent": 142, "children": [], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 42}}, {"id": 148, "type": "parameter_declaration", "text": "DWORD dwNewHint = STATE_NO_CHANGE", "parent": 138, "children": [149, 150, 153], "start_point": {"row": 42, "column": 3}, "end_point": {"row": 42, "column": 36}}, {"id": 149, "type": "type_identifier", "text": "DWORD", "parent": 148, "children": [], "start_point": {"row": 42, "column": 3}, "end_point": {"row": 42, "column": 8}}, {"id": 150, "type": "ERROR", "text": "dwNewHint =", "parent": 148, "children": [151, 152], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 20}}, {"id": 151, "type": "identifier", "text": "dwNewHint", "parent": 150, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 18}}, {"id": 152, "type": "=", "text": "=", "parent": 150, "children": [], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 20}}, {"id": 153, "type": "identifier", "text": "STATE_NO_CHANGE", "parent": 148, "children": [], "start_point": {"row": 42, "column": 21}, "end_point": {"row": 42, "column": 36}}, {"id": 154, "type": "parameter_declaration", "text": "DWORD dwNewControls = STATE_NO_CHANGE", "parent": 138, "children": [155, 156, 159], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 40}}, {"id": 155, "type": "type_identifier", "text": "DWORD", "parent": 154, "children": [], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 8}}, {"id": 156, "type": "ERROR", "text": "dwNewControls =", "parent": 154, "children": [157, 158], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 24}}, {"id": 157, "type": "identifier", "text": "dwNewControls", "parent": 156, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 22}}, {"id": 158, "type": "=", "text": "=", "parent": 156, "children": [], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 24}}, {"id": 159, "type": "identifier", "text": "STATE_NO_CHANGE", "parent": 154, "children": [], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 43, "column": 40}}, {"id": 160, "type": "parameter_declaration", "text": "DWORD dwExitCode = S_OK", "parent": 138, "children": [161, 162, 165], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 26}}, {"id": 161, "type": "type_identifier", "text": "DWORD", "parent": 160, "children": [], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 8}}, {"id": 162, "type": "ERROR", "text": "dwExitCode =", "parent": 160, "children": [163, 164], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 21}}, {"id": 163, "type": "identifier", "text": "dwExitCode", "parent": 162, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 19}}, {"id": 164, "type": "=", "text": "=", "parent": 162, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 21}}, {"id": 165, "type": "identifier", "text": "S_OK", "parent": 160, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 26}}, {"id": 166, "type": "parameter_declaration", "text": "DWORD dwSpecificExit", "parent": 138, "children": [167, 168], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 23}}, {"id": 167, "type": "type_identifier", "text": "DWORD", "parent": 166, "children": [], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 8}}, {"id": 168, "type": "identifier", "text": "dwSpecificExit", "parent": 166, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 23}}, {"id": 169, "type": "=", "text": "=", "parent": 135, "children": [], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 25}}, {"id": 170, "type": "number_literal", "text": "0", "parent": 135, "children": [], "start_point": {"row": 45, "column": 26}, "end_point": {"row": 45, "column": 27}}, {"id": 171, "type": "labeled_statement", "text": "private:\n\tHANDLE m_hStopEvent;", "parent": 45, "children": [172], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 49, "column": 21}}, {"id": 172, "type": "declaration", "text": "HANDLE m_hStopEvent;", "parent": 171, "children": [173, 174], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 21}}, {"id": 173, "type": "type_identifier", "text": "HANDLE", "parent": 172, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 7}}, {"id": 174, "type": "identifier", "text": "m_hStopEvent", "parent": 172, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 20}}, {"id": 175, "type": "declaration", "text": "DWORD m_dwRequestedControl;", "parent": 45, "children": [176, 177], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 28}}, {"id": 176, "type": "type_identifier", "text": "DWORD", "parent": 175, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 6}}, {"id": 177, "type": "identifier", "text": "m_dwRequestedControl", "parent": 175, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 27}}, {"id": 178, "type": "declaration", "text": "long ReadParameters();", "parent": 45, "children": [179, 181], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 23}}, {"id": 179, "type": "sized_type_specifier", "text": "long", "parent": 178, "children": [180], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 5}}, {"id": 180, "type": "long", "text": "long", "parent": 179, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 5}}, {"id": 181, "type": "function_declarator", "text": "ReadParameters()", "parent": 178, "children": [182, 183], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 22}}, {"id": 182, "type": "identifier", "text": "ReadParameters", "parent": 181, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 20}}, {"id": 183, "type": "parameter_list", "text": "()", "parent": 181, "children": [], "start_point": {"row": 51, "column": 20}, "end_point": {"row": 51, "column": 22}}, {"id": 184, "type": "declaration", "text": "static void WINAPI _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);", "parent": 45, "children": [185, 186, 188], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 65}}, {"id": 185, "type": "primitive_type", "text": "void", "parent": 184, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 12}}, {"id": 186, "type": "ERROR", "text": "WINAPI", "parent": 184, "children": [187], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 19}}, {"id": 187, "type": "identifier", "text": "WINAPI", "parent": 186, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 19}}, {"id": 188, "type": "function_declarator", "text": "_ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv)", "parent": 184, "children": [189, 190], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 64}}, {"id": 189, "type": "identifier", "text": "_ServiceMain", "parent": 188, "children": [], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 32}}, {"id": 190, "type": "parameter_list", "text": "(DWORD dwArgc, LPTSTR* lpszArgv)", "parent": 188, "children": [191, 194], "start_point": {"row": 52, "column": 32}, "end_point": {"row": 52, "column": 64}}, {"id": 191, "type": "parameter_declaration", "text": "DWORD dwArgc", "parent": 190, "children": [192, 193], "start_point": {"row": 52, "column": 33}, "end_point": {"row": 52, "column": 45}}, {"id": 192, "type": "type_identifier", "text": "DWORD", "parent": 191, "children": [], "start_point": {"row": 52, "column": 33}, "end_point": {"row": 52, "column": 38}}, {"id": 193, "type": "identifier", "text": "dwArgc", "parent": 191, "children": [], "start_point": {"row": 52, "column": 39}, "end_point": {"row": 52, "column": 45}}, {"id": 194, "type": "parameter_declaration", "text": "LPTSTR* lpszArgv", "parent": 190, "children": [195, 196], "start_point": {"row": 52, "column": 47}, "end_point": {"row": 52, "column": 63}}, {"id": 195, "type": "type_identifier", "text": "LPTSTR", "parent": 194, "children": [], "start_point": {"row": 52, "column": 47}, "end_point": {"row": 52, "column": 53}}, {"id": 196, "type": "pointer_declarator", "text": "* lpszArgv", "parent": 194, "children": [197, 198], "start_point": {"row": 52, "column": 53}, "end_point": {"row": 52, "column": 63}}, {"id": 197, "type": "*", "text": "*", "parent": 196, "children": [], "start_point": {"row": 52, "column": 53}, "end_point": {"row": 52, "column": 54}}, {"id": 198, "type": "identifier", "text": "lpszArgv", "parent": 196, "children": [], "start_point": {"row": 52, "column": 55}, "end_point": {"row": 52, "column": 63}}, {"id": 199, "type": "declaration", "text": "static void WINAPI _Handler(DWORD dwOpcode);", "parent": 45, "children": [200, 201, 203], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 48}}, {"id": 200, "type": "primitive_type", "text": "void", "parent": 199, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 15}}, {"id": 201, "type": "ERROR", "text": "WINAPI", "parent": 199, "children": [202], "start_point": {"row": 53, "column": 16}, "end_point": {"row": 53, "column": 22}}, {"id": 202, "type": "identifier", "text": "WINAPI", "parent": 201, "children": [], "start_point": {"row": 53, "column": 16}, "end_point": {"row": 53, "column": 22}}, {"id": 203, "type": "function_declarator", "text": "_Handler(DWORD dwOpcode)", "parent": 199, "children": [204, 205], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 47}}, {"id": 204, "type": "identifier", "text": "_Handler", "parent": 203, "children": [], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 31}}, {"id": 205, "type": "parameter_list", "text": "(DWORD dwOpcode)", "parent": 203, "children": [206], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 47}}, {"id": 206, "type": "parameter_declaration", "text": "DWORD dwOpcode", "parent": 205, "children": [207, 208], "start_point": {"row": 53, "column": 32}, "end_point": {"row": 53, "column": 46}}, {"id": 207, "type": "type_identifier", "text": "DWORD", "parent": 206, "children": [], "start_point": {"row": 53, "column": 32}, "end_point": {"row": 53, "column": 37}}, {"id": 208, "type": "identifier", "text": "dwOpcode", "parent": 206, "children": [], "start_point": {"row": 53, "column": 38}, "end_point": {"row": 53, "column": 46}}, {"id": 209, "type": "type_definition", "text": "typedef CComMultiThreadModel::AutoCriticalSection _CritSec;", "parent": 45, "children": [210, 211, 212, 214], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 60}}, {"id": 210, "type": "typedef", "text": "typedef", "parent": 209, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 8}}, {"id": 211, "type": "type_identifier", "text": "CComMultiThreadModel", "parent": 209, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 29}}, {"id": 212, "type": "ERROR", "text": "::AutoCriticalSection", "parent": 209, "children": [213], "start_point": {"row": 55, "column": 29}, "end_point": {"row": 55, "column": 50}}, {"id": 213, "type": "type_identifier", "text": "AutoCriticalSection", "parent": 212, "children": [], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 50}}, {"id": 214, "type": "type_identifier", "text": "_CritSec", "parent": 209, "children": [], "start_point": {"row": 55, "column": 51}, "end_point": {"row": 55, "column": 59}}, {"id": 215, "type": "declaration", "text": "_CritSec m_cs;", "parent": 45, "children": [216, 217], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 15}}, {"id": 216, "type": "type_identifier", "text": "_CritSec", "parent": 215, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 9}}, {"id": 217, "type": "identifier", "text": "m_cs", "parent": 215, "children": [], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 14}}, {"id": 218, "type": "labeled_statement", "text": "public:\n\tDWORD m_dwMaxTimeout;", "parent": 45, "children": [219], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 60, "column": 22}}, {"id": 219, "type": "declaration", "text": "DWORD m_dwMaxTimeout;", "parent": 218, "children": [220, 221], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 22}}, {"id": 220, "type": "type_identifier", "text": "DWORD", "parent": 219, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 6}}, {"id": 221, "type": "identifier", "text": "m_dwMaxTimeout", "parent": 219, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 21}}, {"id": 222, "type": "declaration", "text": "TCHAR m_szServer[25];", "parent": 45, "children": [223, 224], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 22}}, {"id": 223, "type": "type_identifier", "text": "TCHAR", "parent": 222, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 6}}, {"id": 224, "type": "array_declarator", "text": "m_szServer[25]", "parent": 222, "children": [225, 226], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 21}}, {"id": 225, "type": "identifier", "text": "m_szServer", "parent": 224, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 17}}, {"id": 226, "type": "number_literal", "text": "25", "parent": 224, "children": [], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 20}}, {"id": 227, "type": "declaration", "text": "TCHAR m_szServiceName[256];", "parent": 45, "children": [228, 229], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 31}}, {"id": 228, "type": "type_identifier", "text": "TCHAR", "parent": 227, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 9}}, {"id": 229, "type": "array_declarator", "text": "m_szServiceName[256]", "parent": 227, "children": [230, 231], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 30}}, {"id": 230, "type": "identifier", "text": "m_szServiceName", "parent": 229, "children": [], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 25}}, {"id": 231, "type": "number_literal", "text": "256", "parent": 229, "children": [], "start_point": {"row": 62, "column": 26}, "end_point": {"row": 62, "column": 29}}, {"id": 232, "type": "declaration", "text": "TCHAR m_szDisplayName[256];", "parent": 45, "children": [233, 234], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 28}}, {"id": 233, "type": "type_identifier", "text": "TCHAR", "parent": 232, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 6}}, {"id": 234, "type": "array_declarator", "text": "m_szDisplayName[256]", "parent": 232, "children": [235, 236], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 27}}, {"id": 235, "type": "identifier", "text": "m_szDisplayName", "parent": 234, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 22}}, {"id": 236, "type": "number_literal", "text": "256", "parent": 234, "children": [], "start_point": {"row": 63, "column": 23}, "end_point": {"row": 63, "column": 26}}, {"id": 237, "type": "declaration", "text": "SERVICE_STATUS_HANDLE m_hServiceStatus;", "parent": 45, "children": [238, 239], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 43}}, {"id": 238, "type": "type_identifier", "text": "SERVICE_STATUS_HANDLE", "parent": 237, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 25}}, {"id": 239, "type": "identifier", "text": "m_hServiceStatus", "parent": 237, "children": [], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 42}}, {"id": 240, "type": "declaration", "text": "SERVICE_STATUS m_status;", "parent": 45, "children": [241, 242], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 28}}, {"id": 241, "type": "type_identifier", "text": "SERVICE_STATUS", "parent": 240, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 18}}, {"id": 242, "type": "identifier", "text": "m_status", "parent": 240, "children": [], "start_point": {"row": 65, "column": 19}, "end_point": {"row": 65, "column": 27}}, {"id": 243, "type": "declaration", "text": "DWORD dwThreadID;", "parent": 45, "children": [244, 245], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 18}}, {"id": 244, "type": "type_identifier", "text": "DWORD", "parent": 243, "children": [], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 6}}, {"id": 245, "type": "identifier", "text": "dwThreadID", "parent": 243, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 17}}, {"id": 246, "type": "declaration", "text": "BOOL m_bService;", "parent": 45, "children": [247, 248], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 17}}, {"id": 247, "type": "type_identifier", "text": "BOOL", "parent": 246, "children": [], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 5}}, {"id": 248, "type": "identifier", "text": "m_bService", "parent": 246, "children": [], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 16}}, {"id": 249, "type": "declaration", "text": "extern CServiceModule _Module;", "parent": 0, "children": [250, 252, 253], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 30}}, {"id": 250, "type": "storage_class_specifier", "text": "extern", "parent": 249, "children": [251], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 6}}, {"id": 251, "type": "extern", "text": "extern", "parent": 250, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 6}}, {"id": 252, "type": "type_identifier", "text": "CServiceModule", "parent": 249, "children": [], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 21}}, {"id": 253, "type": "identifier", "text": "_Module", "parent": 249, "children": [], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 29}}, {"id": 254, "type": "preproc_include", "text": "#include <atlcom.h>\n", "parent": 0, "children": [255, 256], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 72, "column": 0}}, {"id": 255, "type": "#include", "text": "#include", "parent": 254, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 8}}, {"id": 256, "type": "system_lib_string", "text": "<atlcom.h>", "parent": 254, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 19}}, {"id": 257, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 6}}]}, "node_categories": {"declarations": {"functions": [45, 52, 63, 68, 84, 89, 102, 110, 115, 120, 125, 130, 136, 181, 188, 203], "variables": [50, 55, 58, 61, 66, 71, 76, 79, 82, 87, 92, 95, 100, 105, 108, 113, 118, 123, 128, 133, 139, 142, 148, 154, 160, 166, 172, 175, 178, 184, 191, 194, 199, 206, 209, 215, 219, 222, 227, 232, 237, 240, 243, 246, 249], "classes": [250], "imports": [32, 33, 39, 40, 42, 43, 254, 255], "modules": [], "enums": []}, "statements": {"expressions": [2, 13], "assignments": [], "loops": [], "conditionals": [0, 1, 6, 10, 11, 12, 14, 21, 24, 27, 31, 37, 46, 48, 51, 53, 56, 57, 59, 60, 62, 64, 69, 72, 75, 77, 78, 80, 81, 85, 90, 93, 94, 96, 99, 103, 106, 107, 111, 114, 116, 119, 121, 124, 126, 129, 131, 137, 140, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 168, 173, 174, 176, 177, 179, 182, 187, 189, 192, 193, 195, 198, 202, 204, 207, 208, 211, 213, 214, 216, 217, 220, 221, 223, 225, 228, 230, 233, 235, 238, 239, 241, 242, 244, 245, 247, 248, 252, 253, 257], "returns": [], "exceptions": []}, "expressions": {"calls": [18], "literals": [16, 34, 41, 44, 170, 226, 231, 236, 256], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 45, "universal_type": "function", "name": "CServiceModule", "text_snippet": "class CServiceModule : public CComModule\n{\npublic:\n\tHRESULT RegisterServer(BOOL bRegTypeLib, BOOL bS"}, {"node_id": 52, "universal_type": "function", "name": "unknown", "text_snippet": "RegisterServer(BOOL bRegTypeLib, BOOL bService)"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "UnregisterServer()"}, {"node_id": 68, "universal_type": "function", "name": "unknown", "text_snippet": "Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID)"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "Start()"}, {"node_id": 89, "universal_type": "function", "name": "unknown", "text_snippet": "ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv)"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "Handler(DWORD dwOpcode)"}, {"node_id": 110, "universal_type": "function", "name": "unknown", "text_snippet": "Run()"}, {"node_id": 115, "universal_type": "function", "name": "unknown", "text_snippet": "IsInstalled()"}, {"node_id": 120, "universal_type": "function", "name": "unknown", "text_snippet": "Install()"}, {"node_id": 125, "universal_type": "function", "name": "unknown", "text_snippet": "Uninstall()"}, {"node_id": 130, "universal_type": "function", "name": "unknown", "text_snippet": "Unlock()"}, {"node_id": 136, "universal_type": "function", "name": "unknown", "text_snippet": "SetServiceStatus(\n\t\t\tDWORD dwNewState, \n\t\t\tDWORD dwNewCheckpoint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewHi"}, {"node_id": 181, "universal_type": "function", "name": "unknown", "text_snippet": "ReadParameters()"}, {"node_id": 188, "universal_type": "function", "name": "unknown", "text_snippet": "_ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv)"}, {"node_id": 203, "universal_type": "function", "name": "unknown", "text_snippet": "_Handler(DWORD dwOpcode)"}], "class_declarations": [{"node_id": 250, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 32, "text": "#include <atlbase.h>\n"}, {"node_id": 33, "text": "#include"}, {"node_id": 39, "text": "#include \"ModATLMsg.h\"\n"}, {"node_id": 40, "text": "#include"}, {"node_id": 42, "text": "#include \"CEventLog.h\"\n"}, {"node_id": 43, "text": "#include"}, {"node_id": 254, "text": "#include <atlcom.h>\n"}, {"node_id": 255, "text": "#include"}]}, "original_source_code": "// stdafx.h : include file for standard system include files,\n// or project specific include files that are used frequently,\n// but are changed infrequently\n\n#if !defined(AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_)\n#define AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED_\n\n#if _MSC_VER >= 1000\n#pragma once\n#endif // _MSC_VER >= 1000\n\n#define STRICT\n\n\n#define _WIN32_WINNT 0x0400\n#define _ATL_FREE_THREADED\n\n\n#include <atlbase.h>\n//You may derive a class from CComModule and use it if you want to override\n//something, but do not change the name of _Module\n#define STATE_NO_CHANGE 12345\n#include \"ModATLMsg.h\"\n#include \"CEventLog.h\"\n\nclass CServiceModule : public CComModule\n{\npublic:\n\tHRESULT RegisterServer(BOOL bRegTypeLib, BOOL bService);\n\tHRESULT UnregisterServer();\n\tvoid Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID);\n void Start();\n\tvoid ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n void Handler(DWORD dwOpcode);\n void Run();\n BOOL IsInstalled();\n BOOL Install();\n BOOL Uninstall();\n\tLONG Unlock();\n\tvoid SetServiceStatus(\n\t\t\tDWORD dwNewState, \n\t\t\tDWORD dwNewCheckpoint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewHint = STATE_NO_CHANGE,\n\t\t\tDWORD dwNewControls = STATE_NO_CHANGE,\n\t\t\tDWORD dwExitCode = S_OK,\n\t\t\tDWORD dwSpecificExit = 0 );\n\n//Implementation\nprivate:\n\tHANDLE m_hStopEvent;\n\tDWORD m_dwRequestedControl;\n\tlong ReadParameters();\n\tstatic void WINAPI _ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv);\n static void WINAPI _Handler(DWORD dwOpcode);\n\n\ttypedef CComMultiThreadModel::AutoCriticalSection _CritSec;\n\t_CritSec m_cs;\n\n// data members\npublic:\n\tDWORD m_dwMaxTimeout;\n\tTCHAR m_szServer[25];\n TCHAR m_szServiceName[256];\n\tTCHAR m_szDisplayName[256];\n SERVICE_STATUS_HANDLE m_hServiceStatus;\n SERVICE_STATUS m_status;\n\tDWORD dwThreadID;\n\tBOOL m_bService;\n};\n\nextern CServiceModule _Module;\n#include <atlcom.h>\n\n//{{AFX_INSERT_LOCATION}}\n// Microsoft Developer Studio will insert additional declarations immediately before the previous line.\n\n#endif // !defined(AFX_STDAFX_H__D285D157_ED84_11D1_8466_0020AF05ED45__INCLUDED)\n"}
10
c
/* * Copyright (c) 2012-2015, <NAME> and other contributors * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef _FIBER_TEST_HELPER_H_ #define _FIBER_TEST_HELPER_H_ #include <stdio.h> #include <inttypes.h> #include <errno.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <fiber_manager.h> #define test_assert(expr) \ do { \ if(!(expr)) { \ fprintf(stderr, "%s:%d TEST FAILED: %s\n", __FILE__, __LINE__, #expr);\ *(int*)0 = 0; \ } \ } while(0) static inline void fiber_manager_print_stats() { fiber_manager_stats_t stats; fiber_manager_all_stats(&stats); printf("yield_count: %" PRIu64 "\nsteal_count: %" PRIu64 "\nfailed_steal_count: %" PRIu64 "\nspin_count: %" PRIu64 "\nsignal_spin_count: %" PRIu64 "\nmulti_signal_spin_count: %" PRIu64 "\nwake_mpsc_spin_count: %" PRIu64 "\nwake_mpmc_spin_count: %" PRIu64 "\npoll_count: %" PRIu64 "\nevent_wait_count: %" PRIu64 "\nlock_contention_count: %" PRIu64 "\n", stats.yield_count, stats.steal_count, stats.failed_steal_count, stats.spin_count, stats.signal_spin_count, stats.multi_signal_spin_count, stats.wake_mpsc_spin_count, stats.wake_mpmc_spin_count, stats.poll_count, stats.event_wait_count, stats.lock_contention_count); } #endif
37.95
57
(translation_unit) "/*\n * Copyright (c) 2012-2015, <NAME> and other contributors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\n#ifndef _FIBER_TEST_HELPER_H_\n#define _FIBER_TEST_HELPER_H_\n\n#include <stdio.h>\n#include <inttypes.h>\n#include <errno.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include <string.h>\n#include <fiber_manager.h>\n\n#define test_assert(expr) \\n do { \\n if(!(expr)) { \\n fprintf(stderr, "%s:%d TEST FAILED: %s\n", __FILE__, __LINE__, #expr);\\n *(int*)0 = 0; \\n } \\n } while(0)\n\nstatic inline void fiber_manager_print_stats()\n{\n fiber_manager_stats_t stats;\n fiber_manager_all_stats(&stats);\n printf("yield_count: %" PRIu64\n "\nsteal_count: %" PRIu64\n "\nfailed_steal_count: %" PRIu64\n "\nspin_count: %" PRIu64\n "\nsignal_spin_count: %" PRIu64\n "\nmulti_signal_spin_count: %" PRIu64\n "\nwake_mpsc_spin_count: %" PRIu64\n "\nwake_mpmc_spin_count: %" PRIu64\n "\npoll_count: %" PRIu64\n "\nevent_wait_count: %" PRIu64\n "\nlock_contention_count: %" PRIu64\n "\n",\n stats.yield_count,\n stats.steal_count,\n stats.failed_steal_count,\n stats.spin_count,\n stats.signal_spin_count,\n stats.multi_signal_spin_count,\n stats.wake_mpsc_spin_count,\n stats.wake_mpmc_spin_count,\n stats.poll_count,\n stats.event_wait_count,\n stats.lock_contention_count);\n}\n\n#endif\n\n" (comment) "/*\n * Copyright (c) 2012-2015, <NAME> and other contributors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */" (preproc_ifdef) "#ifndef _FIBER_TEST_HELPER_H_\n#define _FIBER_TEST_HELPER_H_\n\n#include <stdio.h>\n#include <inttypes.h>\n#include <errno.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include <string.h>\n#include <fiber_manager.h>\n\n#define test_assert(expr) \\n do { \\n if(!(expr)) { \\n fprintf(stderr, "%s:%d TEST FAILED: %s\n", __FILE__, __LINE__, #expr);\\n *(int*)0 = 0; \\n } \\n } while(0)\n\nstatic inline void fiber_manager_print_stats()\n{\n fiber_manager_stats_t stats;\n fiber_manager_all_stats(&stats);\n printf("yield_count: %" PRIu64\n "\nsteal_count: %" PRIu64\n "\nfailed_steal_count: %" PRIu64\n "\nspin_count: %" PRIu64\n "\nsignal_spin_count: %" PRIu64\n "\nmulti_signal_spin_count: %" PRIu64\n "\nwake_mpsc_spin_count: %" PRIu64\n "\nwake_mpmc_spin_count: %" PRIu64\n "\npoll_count: %" PRIu64\n "\nevent_wait_count: %" PRIu64\n "\nlock_contention_count: %" PRIu64\n "\n",\n stats.yield_count,\n stats.steal_count,\n stats.failed_steal_count,\n stats.spin_count,\n stats.signal_spin_count,\n stats.multi_signal_spin_count,\n stats.wake_mpsc_spin_count,\n stats.wake_mpmc_spin_count,\n stats.poll_count,\n stats.event_wait_count,\n stats.lock_contention_count);\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "_FIBER_TEST_HELPER_H_" (preproc_def) "#define _FIBER_TEST_HELPER_H_\n" (#define) "#define" (identifier) "_FIBER_TEST_HELPER_H_" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <inttypes.h>\n" (#include) "#include" (system_lib_string) "<inttypes.h>" (preproc_include) "#include <errno.h>\n" (#include) "#include" (system_lib_string) "<errno.h>" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (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 <fiber_manager.h>\n" (#include) "#include" (system_lib_string) "<fiber_manager.h>" (preproc_function_def) "#define test_assert(expr) \\n do { \\n if(!(expr)) { \\n fprintf(stderr, "%s:%d TEST FAILED: %s\n", __FILE__, __LINE__, #expr);\\n *(int*)0 = 0; \\n } \\n } while(0)\n" (#define) "#define" (identifier) "test_assert" (preproc_params) "(expr)" (() "(" (identifier) "expr" ()) ")" (preproc_arg) "do { \\n if(!(expr)) { \\n fprintf(stderr, "%s:%d TEST FAILED: %s\n", __FILE__, __LINE__, #expr);\\n *(int*)0 = 0; \\n } \\n } while(0)" (function_definition) "static inline void fiber_manager_print_stats()\n{\n fiber_manager_stats_t stats;\n fiber_manager_all_stats(&stats);\n printf("yield_count: %" PRIu64\n "\nsteal_count: %" PRIu64\n "\nfailed_steal_count: %" PRIu64\n "\nspin_count: %" PRIu64\n "\nsignal_spin_count: %" PRIu64\n "\nmulti_signal_spin_count: %" PRIu64\n "\nwake_mpsc_spin_count: %" PRIu64\n "\nwake_mpmc_spin_count: %" PRIu64\n "\npoll_count: %" PRIu64\n "\nevent_wait_count: %" PRIu64\n "\nlock_contention_count: %" PRIu64\n "\n",\n stats.yield_count,\n stats.steal_count,\n stats.failed_steal_count,\n stats.spin_count,\n stats.signal_spin_count,\n stats.multi_signal_spin_count,\n stats.wake_mpsc_spin_count,\n stats.wake_mpmc_spin_count,\n stats.poll_count,\n stats.event_wait_count,\n stats.lock_contention_count);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "fiber_manager_print_stats()" (identifier) "fiber_manager_print_stats" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n fiber_manager_stats_t stats;\n fiber_manager_all_stats(&stats);\n printf("yield_count: %" PRIu64\n "\nsteal_count: %" PRIu64\n "\nfailed_steal_count: %" PRIu64\n "\nspin_count: %" PRIu64\n "\nsignal_spin_count: %" PRIu64\n "\nmulti_signal_spin_count: %" PRIu64\n "\nwake_mpsc_spin_count: %" PRIu64\n "\nwake_mpmc_spin_count: %" PRIu64\n "\npoll_count: %" PRIu64\n "\nevent_wait_count: %" PRIu64\n "\nlock_contention_count: %" PRIu64\n "\n",\n stats.yield_count,\n stats.steal_count,\n stats.failed_steal_count,\n stats.spin_count,\n stats.signal_spin_count,\n stats.multi_signal_spin_count,\n stats.wake_mpsc_spin_count,\n stats.wake_mpmc_spin_count,\n stats.poll_count,\n stats.event_wait_count,\n stats.lock_contention_count);\n}" ({) "{" (declaration) "fiber_manager_stats_t stats;" (type_identifier) "fiber_manager_stats_t" (identifier) "stats" (;) ";" (expression_statement) "fiber_manager_all_stats(&stats);" (call_expression) "fiber_manager_all_stats(&stats)" (identifier) "fiber_manager_all_stats" (argument_list) "(&stats)" (() "(" (pointer_expression) "&stats" (&) "&" (identifier) "stats" ()) ")" (;) ";" (expression_statement) "printf("yield_count: %" PRIu64\n "\nsteal_count: %" PRIu64\n "\nfailed_steal_count: %" PRIu64\n "\nspin_count: %" PRIu64\n "\nsignal_spin_count: %" PRIu64\n "\nmulti_signal_spin_count: %" PRIu64\n "\nwake_mpsc_spin_count: %" PRIu64\n "\nwake_mpmc_spin_count: %" PRIu64\n "\npoll_count: %" PRIu64\n "\nevent_wait_count: %" PRIu64\n "\nlock_contention_count: %" PRIu64\n "\n",\n stats.yield_count,\n stats.steal_count,\n stats.failed_steal_count,\n stats.spin_count,\n stats.signal_spin_count,\n stats.multi_signal_spin_count,\n stats.wake_mpsc_spin_count,\n stats.wake_mpmc_spin_count,\n stats.poll_count,\n stats.event_wait_count,\n stats.lock_contention_count);" (call_expression) "printf("yield_count: %" PRIu64\n "\nsteal_count: %" PRIu64\n "\nfailed_steal_count: %" PRIu64\n "\nspin_count: %" PRIu64\n "\nsignal_spin_count: %" PRIu64\n "\nmulti_signal_spin_count: %" PRIu64\n "\nwake_mpsc_spin_count: %" PRIu64\n "\nwake_mpmc_spin_count: %" PRIu64\n "\npoll_count: %" PRIu64\n "\nevent_wait_count: %" PRIu64\n "\nlock_contention_count: %" PRIu64\n "\n",\n stats.yield_count,\n stats.steal_count,\n stats.failed_steal_count,\n stats.spin_count,\n stats.signal_spin_count,\n stats.multi_signal_spin_count,\n stats.wake_mpsc_spin_count,\n stats.wake_mpmc_spin_count,\n stats.poll_count,\n stats.event_wait_count,\n stats.lock_contention_count)" (identifier) "printf" (argument_list) "("yield_count: %" PRIu64\n "\nsteal_count: %" PRIu64\n "\nfailed_steal_count: %" PRIu64\n "\nspin_count: %" PRIu64\n "\nsignal_spin_count: %" PRIu64\n "\nmulti_signal_spin_count: %" PRIu64\n "\nwake_mpsc_spin_count: %" PRIu64\n "\nwake_mpmc_spin_count: %" PRIu64\n "\npoll_count: %" PRIu64\n "\nevent_wait_count: %" PRIu64\n "\nlock_contention_count: %" PRIu64\n "\n",\n stats.yield_count,\n stats.steal_count,\n stats.failed_steal_count,\n stats.spin_count,\n stats.signal_spin_count,\n stats.multi_signal_spin_count,\n stats.wake_mpsc_spin_count,\n stats.wake_mpmc_spin_count,\n stats.poll_count,\n stats.event_wait_count,\n stats.lock_contention_count)" (() "(" (concatenated_string) ""yield_count: %" PRIu64\n "\nsteal_count: %" PRIu64\n "\nfailed_steal_count: %" PRIu64\n "\nspin_count: %" PRIu64\n "\nsignal_spin_count: %" PRIu64\n "\nmulti_signal_spin_count: %" PRIu64\n "\nwake_mpsc_spin_count: %" PRIu64\n "\nwake_mpmc_spin_count: %" PRIu64\n "\npoll_count: %" PRIu64\n "\nevent_wait_count: %" PRIu64\n "\nlock_contention_count: %" PRIu64\n "\n"" (string_literal) ""yield_count: %"" (") """ (string_content) "yield_count: %" (") """ (identifier) "PRIu64" (string_literal) ""\nsteal_count: %"" (") """ (escape_sequence) "\n" (string_content) "steal_count: %" (") """ (identifier) "PRIu64" (string_literal) ""\nfailed_steal_count: %"" (") """ (escape_sequence) "\n" (string_content) "failed_steal_count: %" (") """ (identifier) "PRIu64" (string_literal) ""\nspin_count: %"" (") """ (escape_sequence) "\n" (string_content) "spin_count: %" (") """ (identifier) "PRIu64" (string_literal) ""\nsignal_spin_count: %"" (") """ (escape_sequence) "\n" (string_content) "signal_spin_count: %" (") """ (identifier) "PRIu64" (string_literal) ""\nmulti_signal_spin_count: %"" (") """ (escape_sequence) "\n" (string_content) "multi_signal_spin_count: %" (") """ (identifier) "PRIu64" (string_literal) ""\nwake_mpsc_spin_count: %"" (") """ (escape_sequence) "\n" (string_content) "wake_mpsc_spin_count: %" (") """ (identifier) "PRIu64" (string_literal) ""\nwake_mpmc_spin_count: %"" (") """ (escape_sequence) "\n" (string_content) "wake_mpmc_spin_count: %" (") """ (identifier) "PRIu64" (string_literal) ""\npoll_count: %"" (") """ (escape_sequence) "\n" (string_content) "poll_count: %" (") """ (identifier) "PRIu64" (string_literal) ""\nevent_wait_count: %"" (") """ (escape_sequence) "\n" (string_content) "event_wait_count: %" (") """ (identifier) "PRIu64" (string_literal) ""\nlock_contention_count: %"" (") """ (escape_sequence) "\n" (string_content) "lock_contention_count: %" (") """ (identifier) "PRIu64" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ (,) "," (field_expression) "stats.yield_count" (identifier) "stats" (.) "." (field_identifier) "yield_count" (,) "," (field_expression) "stats.steal_count" (identifier) "stats" (.) "." (field_identifier) "steal_count" (,) "," (field_expression) "stats.failed_steal_count" (identifier) "stats" (.) "." (field_identifier) "failed_steal_count" (,) "," (field_expression) "stats.spin_count" (identifier) "stats" (.) "." (field_identifier) "spin_count" (,) "," (field_expression) "stats.signal_spin_count" (identifier) "stats" (.) "." (field_identifier) "signal_spin_count" (,) "," (field_expression) "stats.multi_signal_spin_count" (identifier) "stats" (.) "." (field_identifier) "multi_signal_spin_count" (,) "," (field_expression) "stats.wake_mpsc_spin_count" (identifier) "stats" (.) "." (field_identifier) "wake_mpsc_spin_count" (,) "," (field_expression) "stats.wake_mpmc_spin_count" (identifier) "stats" (.) "." (field_identifier) "wake_mpmc_spin_count" (,) "," (field_expression) "stats.poll_count" (identifier) "stats" (.) "." (field_identifier) "poll_count" (,) "," (field_expression) "stats.event_wait_count" (identifier) "stats" (.) "." (field_identifier) "event_wait_count" (,) "," (field_expression) "stats.lock_contention_count" (identifier) "stats" (.) "." (field_identifier) "lock_contention_count" ()) ")" (;) ";" (}) "}" (#endif) "#endif"
198
0
{"language": "c", "success": true, "metadata": {"lines": 57, "avg_line_length": 37.95, "nodes": 120, "errors": 0, "source_hash": "490341334c5d9e72afd4a4dec7e780de2fa00c51ed95a425f4e167d4ff735996", "categorized_nodes": 99}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _FIBER_TEST_HELPER_H_\n#define _FIBER_TEST_HELPER_H_\n\n#include <stdio.h>\n#include <inttypes.h>\n#include <errno.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include <string.h>\n#include <fiber_manager.h>\n\n#define test_assert(expr) \\\n do { \\\n if(!(expr)) { \\\n fprintf(stderr, \"%s:%d TEST FAILED: %s\\n\", __FILE__, __LINE__, #expr);\\\n *(int*)0 = 0; \\\n } \\\n } while(0)\n\nstatic inline void fiber_manager_print_stats()\n{\n fiber_manager_stats_t stats;\n fiber_manager_all_stats(&stats);\n printf(\"yield_count: %\" PRIu64\n \"\\nsteal_count: %\" PRIu64\n \"\\nfailed_steal_count: %\" PRIu64\n \"\\nspin_count: %\" PRIu64\n \"\\nsignal_spin_count: %\" PRIu64\n \"\\nmulti_signal_spin_count: %\" PRIu64\n \"\\nwake_mpsc_spin_count: %\" PRIu64\n \"\\nwake_mpmc_spin_count: %\" PRIu64\n \"\\npoll_count: %\" PRIu64\n \"\\nevent_wait_count: %\" PRIu64\n \"\\nlock_contention_count: %\" PRIu64\n \"\\n\",\n stats.yield_count,\n stats.steal_count,\n stats.failed_steal_count,\n stats.spin_count,\n stats.signal_spin_count,\n stats.multi_signal_spin_count,\n stats.wake_mpsc_spin_count,\n stats.wake_mpmc_spin_count,\n stats.poll_count,\n stats.event_wait_count,\n stats.lock_contention_count);\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 33, 119], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 64, "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": "_FIBER_TEST_HELPER_H_", "parent": 0, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 29}}, {"id": 3, "type": "preproc_def", "text": "#define _FIBER_TEST_HELPER_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 5, "type": "identifier", "text": "_FIBER_TEST_HELPER_H_", "parent": 3, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 29}}, {"id": 6, "type": "preproc_include", "text": "#include <stdio.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": "system_lib_string", "text": "<stdio.h>", "parent": 6, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <inttypes.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": "<inttypes.h>", "parent": 9, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 21}}, {"id": 12, "type": "preproc_include", "text": "#include <errno.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": "<errno.h>", "parent": 12, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 18}}, {"id": 15, "type": "preproc_include", "text": "#include <unistd.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": "system_lib_string", "text": "<unistd.h>", "parent": 15, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 19}}, {"id": 18, "type": "preproc_include", "text": "#include <stdlib.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": "system_lib_string", "text": "<stdlib.h>", "parent": 18, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 19}}, {"id": 21, "type": "preproc_include", "text": "#include <string.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": "system_lib_string", "text": "<string.h>", "parent": 21, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 19}}, {"id": 24, "type": "preproc_include", "text": "#include <fiber_manager.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": "system_lib_string", "text": "<fiber_manager.h>", "parent": 24, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 26}}, {"id": 27, "type": "preproc_function_def", "text": "#define test_assert(expr) \\\n do { \\\n if(!(expr)) { \\\n fprintf(stderr, \"%s:%d TEST FAILED: %s\\n\", __FILE__, __LINE__, #expr);\\\n *(int*)0 = 0; \\\n } \\\n } while(0)\n", "parent": 0, "children": [28, 29, 30, 32], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 28, "type": "#define", "text": "#define", "parent": 27, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 29, "type": "identifier", "text": "test_assert", "parent": 27, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 19}}, {"id": 30, "type": "preproc_params", "text": "(expr)", "parent": 27, "children": [31], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 25}}, {"id": 31, "type": "identifier", "text": "expr", "parent": 30, "children": [], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 24}}, {"id": 32, "type": "preproc_arg", "text": "do { \\\n if(!(expr)) { \\\n fprintf(stderr, \"%s:%d TEST FAILED: %s\\n\", __FILE__, __LINE__, #expr);\\\n *(int*)0 = 0; \\\n } \\\n } while(0)", "parent": 27, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 33, "column": 14}}, {"id": 33, "type": "function_definition", "text": "static inline void fiber_manager_print_stats()\n{\n fiber_manager_stats_t stats;\n fiber_manager_all_stats(&stats);\n printf(\"yield_count: %\" PRIu64\n \"\\nsteal_count: %\" PRIu64\n \"\\nfailed_steal_count: %\" PRIu64\n \"\\nspin_count: %\" PRIu64\n \"\\nsignal_spin_count: %\" PRIu64\n \"\\nmulti_signal_spin_count: %\" PRIu64\n \"\\nwake_mpsc_spin_count: %\" PRIu64\n \"\\nwake_mpmc_spin_count: %\" PRIu64\n \"\\npoll_count: %\" PRIu64\n \"\\nevent_wait_count: %\" PRIu64\n \"\\nlock_contention_count: %\" PRIu64\n \"\\n\",\n stats.yield_count,\n stats.steal_count,\n stats.failed_steal_count,\n stats.spin_count,\n stats.signal_spin_count,\n stats.multi_signal_spin_count,\n stats.wake_mpsc_spin_count,\n stats.wake_mpmc_spin_count,\n stats.poll_count,\n stats.event_wait_count,\n stats.lock_contention_count);\n}", "parent": 0, "children": [34, 36, 37], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 62, "column": 1}}, {"id": 34, "type": "storage_class_specifier", "text": "inline", "parent": 33, "children": [35], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 13}}, {"id": 35, "type": "inline", "text": "inline", "parent": 34, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 13}}, {"id": 36, "type": "primitive_type", "text": "void", "parent": 33, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 18}}, {"id": 37, "type": "function_declarator", "text": "fiber_manager_print_stats()", "parent": 33, "children": [38, 39], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 46}}, {"id": 38, "type": "identifier", "text": "fiber_manager_print_stats", "parent": 37, "children": [], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 44}}, {"id": 39, "type": "parameter_list", "text": "()", "parent": 37, "children": [], "start_point": {"row": 35, "column": 44}, "end_point": {"row": 35, "column": 46}}, {"id": 40, "type": "declaration", "text": "fiber_manager_stats_t stats;", "parent": 33, "children": [41, 42], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 32}}, {"id": 41, "type": "type_identifier", "text": "fiber_manager_stats_t", "parent": 40, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 25}}, {"id": 42, "type": "identifier", "text": "stats", "parent": 40, "children": [], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 31}}, {"id": 43, "type": "call_expression", "text": "fiber_manager_all_stats(&stats)", "parent": 33, "children": [44, 45], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 35}}, {"id": 44, "type": "identifier", "text": "fiber_manager_all_stats", "parent": 43, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 27}}, {"id": 45, "type": "argument_list", "text": "(&stats)", "parent": 43, "children": [46], "start_point": {"row": 38, "column": 27}, "end_point": {"row": 38, "column": 35}}, {"id": 46, "type": "pointer_expression", "text": "&stats", "parent": 45, "children": [47], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 34}}, {"id": 47, "type": "identifier", "text": "stats", "parent": 46, "children": [], "start_point": {"row": 38, "column": 29}, "end_point": {"row": 38, "column": 34}}, {"id": 48, "type": "call_expression", "text": "printf(\"yield_count: %\" PRIu64\n \"\\nsteal_count: %\" PRIu64\n \"\\nfailed_steal_count: %\" PRIu64\n \"\\nspin_count: %\" PRIu64\n \"\\nsignal_spin_count: %\" PRIu64\n \"\\nmulti_signal_spin_count: %\" PRIu64\n \"\\nwake_mpsc_spin_count: %\" PRIu64\n \"\\nwake_mpmc_spin_count: %\" PRIu64\n \"\\npoll_count: %\" PRIu64\n \"\\nevent_wait_count: %\" PRIu64\n \"\\nlock_contention_count: %\" PRIu64\n \"\\n\",\n stats.yield_count,\n stats.steal_count,\n stats.failed_steal_count,\n stats.spin_count,\n stats.signal_spin_count,\n stats.multi_signal_spin_count,\n stats.wake_mpsc_spin_count,\n stats.wake_mpmc_spin_count,\n stats.poll_count,\n stats.event_wait_count,\n stats.lock_contention_count)", "parent": 33, "children": [49, 50], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 61, "column": 39}}, {"id": 49, "type": "identifier", "text": "printf", "parent": 48, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 10}}, {"id": 50, "type": "argument_list", "text": "(\"yield_count: %\" PRIu64\n \"\\nsteal_count: %\" PRIu64\n \"\\nfailed_steal_count: %\" PRIu64\n \"\\nspin_count: %\" PRIu64\n \"\\nsignal_spin_count: %\" PRIu64\n \"\\nmulti_signal_spin_count: %\" PRIu64\n \"\\nwake_mpsc_spin_count: %\" PRIu64\n \"\\nwake_mpmc_spin_count: %\" PRIu64\n \"\\npoll_count: %\" PRIu64\n \"\\nevent_wait_count: %\" PRIu64\n \"\\nlock_contention_count: %\" PRIu64\n \"\\n\",\n stats.yield_count,\n stats.steal_count,\n stats.failed_steal_count,\n stats.spin_count,\n stats.signal_spin_count,\n stats.multi_signal_spin_count,\n stats.wake_mpsc_spin_count,\n stats.wake_mpmc_spin_count,\n stats.poll_count,\n stats.event_wait_count,\n stats.lock_contention_count)", "parent": 48, "children": [51, 86, 89, 92, 95, 98, 101, 104, 107, 110, 113, 116], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 61, "column": 39}}, {"id": 51, "type": "concatenated_string", "text": "\"yield_count: %\" PRIu64\n \"\\nsteal_count: %\" PRIu64\n \"\\nfailed_steal_count: %\" PRIu64\n \"\\nspin_count: %\" PRIu64\n \"\\nsignal_spin_count: %\" PRIu64\n \"\\nmulti_signal_spin_count: %\" PRIu64\n \"\\nwake_mpsc_spin_count: %\" PRIu64\n \"\\nwake_mpmc_spin_count: %\" PRIu64\n \"\\npoll_count: %\" PRIu64\n \"\\nevent_wait_count: %\" PRIu64\n \"\\nlock_contention_count: %\" PRIu64\n \"\\n\"", "parent": 50, "children": [52, 53, 54, 56, 57, 59, 60, 62, 63, 65, 66, 68, 69, 71, 72, 74, 75, 77, 78, 80, 81, 83, 84], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 50, "column": 15}}, {"id": 52, "type": "string_literal", "text": "\"yield_count: %\"", "parent": 51, "children": [], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 27}}, {"id": 53, "type": "identifier", "text": "PRIu64", "parent": 51, "children": [], "start_point": {"row": 39, "column": 28}, "end_point": {"row": 39, "column": 34}}, {"id": 54, "type": "string_literal", "text": "\"\\nsteal_count: %\"", "parent": 51, "children": [55], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 29}}, {"id": 55, "type": "escape_sequence", "text": "\\n", "parent": 54, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 14}}, {"id": 56, "type": "identifier", "text": "PRIu64", "parent": 51, "children": [], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 36}}, {"id": 57, "type": "string_literal", "text": "\"\\nfailed_steal_count: %\"", "parent": 51, "children": [58], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 36}}, {"id": 58, "type": "escape_sequence", "text": "\\n", "parent": 57, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 14}}, {"id": 59, "type": "identifier", "text": "PRIu64", "parent": 51, "children": [], "start_point": {"row": 41, "column": 37}, "end_point": {"row": 41, "column": 43}}, {"id": 60, "type": "string_literal", "text": "\"\\nspin_count: %\"", "parent": 51, "children": [61], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 28}}, {"id": 61, "type": "escape_sequence", "text": "\\n", "parent": 60, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 14}}, {"id": 62, "type": "identifier", "text": "PRIu64", "parent": 51, "children": [], "start_point": {"row": 42, "column": 29}, "end_point": {"row": 42, "column": 35}}, {"id": 63, "type": "string_literal", "text": "\"\\nsignal_spin_count: %\"", "parent": 51, "children": [64], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 35}}, {"id": 64, "type": "escape_sequence", "text": "\\n", "parent": 63, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 14}}, {"id": 65, "type": "identifier", "text": "PRIu64", "parent": 51, "children": [], "start_point": {"row": 43, "column": 36}, "end_point": {"row": 43, "column": 42}}, {"id": 66, "type": "string_literal", "text": "\"\\nmulti_signal_spin_count: %\"", "parent": 51, "children": [67], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 41}}, {"id": 67, "type": "escape_sequence", "text": "\\n", "parent": 66, "children": [], "start_point": {"row": 44, "column": 12}, "end_point": {"row": 44, "column": 14}}, {"id": 68, "type": "identifier", "text": "PRIu64", "parent": 51, "children": [], "start_point": {"row": 44, "column": 42}, "end_point": {"row": 44, "column": 48}}, {"id": 69, "type": "string_literal", "text": "\"\\nwake_mpsc_spin_count: %\"", "parent": 51, "children": [70], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 38}}, {"id": 70, "type": "escape_sequence", "text": "\\n", "parent": 69, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 14}}, {"id": 71, "type": "identifier", "text": "PRIu64", "parent": 51, "children": [], "start_point": {"row": 45, "column": 39}, "end_point": {"row": 45, "column": 45}}, {"id": 72, "type": "string_literal", "text": "\"\\nwake_mpmc_spin_count: %\"", "parent": 51, "children": [73], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 38}}, {"id": 73, "type": "escape_sequence", "text": "\\n", "parent": 72, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 14}}, {"id": 74, "type": "identifier", "text": "PRIu64", "parent": 51, "children": [], "start_point": {"row": 46, "column": 39}, "end_point": {"row": 46, "column": 45}}, {"id": 75, "type": "string_literal", "text": "\"\\npoll_count: %\"", "parent": 51, "children": [76], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 28}}, {"id": 76, "type": "escape_sequence", "text": "\\n", "parent": 75, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 14}}, {"id": 77, "type": "identifier", "text": "PRIu64", "parent": 51, "children": [], "start_point": {"row": 47, "column": 29}, "end_point": {"row": 47, "column": 35}}, {"id": 78, "type": "string_literal", "text": "\"\\nevent_wait_count: %\"", "parent": 51, "children": [79], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 34}}, {"id": 79, "type": "escape_sequence", "text": "\\n", "parent": 78, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 14}}, {"id": 80, "type": "identifier", "text": "PRIu64", "parent": 51, "children": [], "start_point": {"row": 48, "column": 35}, "end_point": {"row": 48, "column": 41}}, {"id": 81, "type": "string_literal", "text": "\"\\nlock_contention_count: %\"", "parent": 51, "children": [82], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 39}}, {"id": 82, "type": "escape_sequence", "text": "\\n", "parent": 81, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 14}}, {"id": 83, "type": "identifier", "text": "PRIu64", "parent": 51, "children": [], "start_point": {"row": 49, "column": 40}, "end_point": {"row": 49, "column": 46}}, {"id": 84, "type": "string_literal", "text": "\"\\n\"", "parent": 51, "children": [85], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 15}}, {"id": 85, "type": "escape_sequence", "text": "\\n", "parent": 84, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 14}}, {"id": 86, "type": "field_expression", "text": "stats.yield_count", "parent": 50, "children": [87, 88], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 28}}, {"id": 87, "type": "identifier", "text": "stats", "parent": 86, "children": [], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 16}}, {"id": 88, "type": "field_identifier", "text": "yield_count", "parent": 86, "children": [], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 28}}, {"id": 89, "type": "field_expression", "text": "stats.steal_count", "parent": 50, "children": [90, 91], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 28}}, {"id": 90, "type": "identifier", "text": "stats", "parent": 89, "children": [], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 16}}, {"id": 91, "type": "field_identifier", "text": "steal_count", "parent": 89, "children": [], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 28}}, {"id": 92, "type": "field_expression", "text": "stats.failed_steal_count", "parent": 50, "children": [93, 94], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 35}}, {"id": 93, "type": "identifier", "text": "stats", "parent": 92, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 16}}, {"id": 94, "type": "field_identifier", "text": "failed_steal_count", "parent": 92, "children": [], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 35}}, {"id": 95, "type": "field_expression", "text": "stats.spin_count", "parent": 50, "children": [96, 97], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 27}}, {"id": 96, "type": "identifier", "text": "stats", "parent": 95, "children": [], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 16}}, {"id": 97, "type": "field_identifier", "text": "spin_count", "parent": 95, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 27}}, {"id": 98, "type": "field_expression", "text": "stats.signal_spin_count", "parent": 50, "children": [99, 100], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 34}}, {"id": 99, "type": "identifier", "text": "stats", "parent": 98, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 16}}, {"id": 100, "type": "field_identifier", "text": "signal_spin_count", "parent": 98, "children": [], "start_point": {"row": 55, "column": 17}, "end_point": {"row": 55, "column": 34}}, {"id": 101, "type": "field_expression", "text": "stats.multi_signal_spin_count", "parent": 50, "children": [102, 103], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 40}}, {"id": 102, "type": "identifier", "text": "stats", "parent": 101, "children": [], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 16}}, {"id": 103, "type": "field_identifier", "text": "multi_signal_spin_count", "parent": 101, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 40}}, {"id": 104, "type": "field_expression", "text": "stats.wake_mpsc_spin_count", "parent": 50, "children": [105, 106], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 37}}, {"id": 105, "type": "identifier", "text": "stats", "parent": 104, "children": [], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 16}}, {"id": 106, "type": "field_identifier", "text": "wake_mpsc_spin_count", "parent": 104, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 37}}, {"id": 107, "type": "field_expression", "text": "stats.wake_mpmc_spin_count", "parent": 50, "children": [108, 109], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 37}}, {"id": 108, "type": "identifier", "text": "stats", "parent": 107, "children": [], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 16}}, {"id": 109, "type": "field_identifier", "text": "wake_mpmc_spin_count", "parent": 107, "children": [], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 37}}, {"id": 110, "type": "field_expression", "text": "stats.poll_count", "parent": 50, "children": [111, 112], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 27}}, {"id": 111, "type": "identifier", "text": "stats", "parent": 110, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 16}}, {"id": 112, "type": "field_identifier", "text": "poll_count", "parent": 110, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 27}}, {"id": 113, "type": "field_expression", "text": "stats.event_wait_count", "parent": 50, "children": [114, 115], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 33}}, {"id": 114, "type": "identifier", "text": "stats", "parent": 113, "children": [], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 16}}, {"id": 115, "type": "field_identifier", "text": "event_wait_count", "parent": 113, "children": [], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 33}}, {"id": 116, "type": "field_expression", "text": "stats.lock_contention_count", "parent": 50, "children": [117, 118], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 38}}, {"id": 117, "type": "identifier", "text": "stats", "parent": 116, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 16}}, {"id": 118, "type": "field_identifier", "text": "lock_contention_count", "parent": 116, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 38}}, {"id": 119, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 6}}]}, "node_categories": {"declarations": {"functions": [27, 33, 37], "variables": [40], "classes": [34], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25], "modules": [], "enums": []}, "statements": {"expressions": [43, 46, 48, 86, 89, 92, 95, 98, 101, 104, 107, 110, 113, 116], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 29, 31, 38, 41, 42, 44, 47, 49, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 87, 88, 90, 91, 93, 94, 96, 97, 99, 100, 102, 103, 105, 106, 108, 109, 111, 112, 114, 115, 117, 118, 119], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 51, 52, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 27, "universal_type": "function", "name": "unknown", "text_snippet": "#define test_assert(expr) \\\n do { \\\n if(!(expr)) { \\\n fprintf(stderr, \"%s:%d TE"}, {"node_id": 33, "universal_type": "function", "name": "fiber_manager_print_stats", "text_snippet": "static inline void fiber_manager_print_stats()\n{\n fiber_manager_stats_t stats;\n fiber_manager_"}, {"node_id": 37, "universal_type": "function", "name": "unknown", "text_snippet": "fiber_manager_print_stats()"}], "class_declarations": [{"node_id": 34, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 6, "text": "#include <stdio.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <inttypes.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <errno.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 <stdlib.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <string.h>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <fiber_manager.h>\n"}, {"node_id": 25, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (c) 2012-2015, <NAME> and other contributors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\n#ifndef _FIBER_TEST_HELPER_H_\n#define _FIBER_TEST_HELPER_H_\n\n#include <stdio.h>\n#include <inttypes.h>\n#include <errno.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include <string.h>\n#include <fiber_manager.h>\n\n#define test_assert(expr) \\\n do { \\\n if(!(expr)) { \\\n fprintf(stderr, \"%s:%d TEST FAILED: %s\\n\", __FILE__, __LINE__, #expr);\\\n *(int*)0 = 0; \\\n } \\\n } while(0)\n\nstatic inline void fiber_manager_print_stats()\n{\n fiber_manager_stats_t stats;\n fiber_manager_all_stats(&stats);\n printf(\"yield_count: %\" PRIu64\n \"\\nsteal_count: %\" PRIu64\n \"\\nfailed_steal_count: %\" PRIu64\n \"\\nspin_count: %\" PRIu64\n \"\\nsignal_spin_count: %\" PRIu64\n \"\\nmulti_signal_spin_count: %\" PRIu64\n \"\\nwake_mpsc_spin_count: %\" PRIu64\n \"\\nwake_mpmc_spin_count: %\" PRIu64\n \"\\npoll_count: %\" PRIu64\n \"\\nevent_wait_count: %\" PRIu64\n \"\\nlock_contention_count: %\" PRIu64\n \"\\n\",\n stats.yield_count,\n stats.steal_count,\n stats.failed_steal_count,\n stats.spin_count,\n stats.signal_spin_count,\n stats.multi_signal_spin_count,\n stats.wake_mpsc_spin_count,\n stats.wake_mpmc_spin_count,\n stats.poll_count,\n stats.event_wait_count,\n stats.lock_contention_count);\n}\n\n#endif\n\n"}
11
c
#ifndef DTK_POINTS_H #define DTK_POINTS_H #include <memory> #include <boost/utility.hpp> #include "dtkConfig.h" #include "dtkTx.h" #include "dtkIDTypes.h" #include "dtkGraphicsKernel.h" namespace dtk { //! A points container /*! It is used in many graphical element in DTK, * such as Mesh, Graph */ class dtkPoints: public boost::noncopyable { public: typedef std::shared_ptr<dtkPoints> Ptr; public: virtual ~dtkPoints() {} virtual const GK::Point3& GetPoint(dtkID id) const = 0; virtual bool SetPoint(dtkID id, const GK::Point3 &coord) = 0; virtual size_t GetNumberOfPoints() const = 0; virtual dtkID GetMaxID() const = 0; virtual void Begin() const = 0; virtual bool Next(dtkID &id, GK::Point3 &coord) const = 0; virtual void InsertPoint(dtkID id, const GK::Point3 & coord) = 0; virtual void DeletePoint(dtkID id) = 0; }; } #include "dtkPointsVector.h" #endif //DTK_POINTS
27.91
32
(translation_unit) "#ifndef DTK_POINTS_H\n#define DTK_POINTS_H\n\n#include <memory>\n#include <boost/utility.hpp>\n\n#include "dtkConfig.h"\n#include "dtkTx.h"\n#include "dtkIDTypes.h"\n\n#include "dtkGraphicsKernel.h"\n\nnamespace dtk\n{\n //! A points container\n /*! It is used in many graphical element in DTK,\n * such as Mesh, Graph\n */\n class dtkPoints: public boost::noncopyable\n {\n public:\n typedef std::shared_ptr<dtkPoints> Ptr;\n\n public:\n virtual ~dtkPoints() {}\n virtual const GK::Point3& GetPoint(dtkID id) const = 0;\n virtual bool SetPoint(dtkID id, const GK::Point3 &coord) = 0;\n\n virtual size_t GetNumberOfPoints() const = 0;\n virtual dtkID GetMaxID() const = 0;\n\n virtual void Begin() const = 0;\n virtual bool Next(dtkID &id, GK::Point3 &coord) const = 0;\n\n virtual void InsertPoint(dtkID id, const GK::Point3 & coord) = 0;\n virtual void DeletePoint(dtkID id) = 0;\n\n };\n}\n\n#include "dtkPointsVector.h"\n\n#endif //DTK_POINTS\n" (preproc_ifdef) "#ifndef DTK_POINTS_H\n#define DTK_POINTS_H\n\n#include <memory>\n#include <boost/utility.hpp>\n\n#include "dtkConfig.h"\n#include "dtkTx.h"\n#include "dtkIDTypes.h"\n\n#include "dtkGraphicsKernel.h"\n\nnamespace dtk\n{\n //! A points container\n /*! It is used in many graphical element in DTK,\n * such as Mesh, Graph\n */\n class dtkPoints: public boost::noncopyable\n {\n public:\n typedef std::shared_ptr<dtkPoints> Ptr;\n\n public:\n virtual ~dtkPoints() {}\n virtual const GK::Point3& GetPoint(dtkID id) const = 0;\n virtual bool SetPoint(dtkID id, const GK::Point3 &coord) = 0;\n\n virtual size_t GetNumberOfPoints() const = 0;\n virtual dtkID GetMaxID() const = 0;\n\n virtual void Begin() const = 0;\n virtual bool Next(dtkID &id, GK::Point3 &coord) const = 0;\n\n virtual void InsertPoint(dtkID id, const GK::Point3 & coord) = 0;\n virtual void DeletePoint(dtkID id) = 0;\n\n };\n}\n\n#include "dtkPointsVector.h"\n\n#endif" (#ifndef) "#ifndef" (identifier) "DTK_POINTS_H" (preproc_def) "#define DTK_POINTS_H\n" (#define) "#define" (identifier) "DTK_POINTS_H" (preproc_include) "#include <memory>\n" (#include) "#include" (system_lib_string) "<memory>" (preproc_include) "#include <boost/utility.hpp>\n" (#include) "#include" (system_lib_string) "<boost/utility.hpp>" (preproc_include) "#include "dtkConfig.h"\n" (#include) "#include" (string_literal) ""dtkConfig.h"" (") """ (string_content) "dtkConfig.h" (") """ (preproc_include) "#include "dtkTx.h"\n" (#include) "#include" (string_literal) ""dtkTx.h"" (") """ (string_content) "dtkTx.h" (") """ (preproc_include) "#include "dtkIDTypes.h"\n" (#include) "#include" (string_literal) ""dtkIDTypes.h"" (") """ (string_content) "dtkIDTypes.h" (") """ (preproc_include) "#include "dtkGraphicsKernel.h"\n" (#include) "#include" (string_literal) ""dtkGraphicsKernel.h"" (") """ (string_content) "dtkGraphicsKernel.h" (") """ (ERROR) "namespace dtk\n{\n //! A points container\n /*! It is used in many graphical element in DTK,\n * such as Mesh, Graph\n */\n class dtkPoints: public boost::noncopyable\n {\n public:\n typedef std::shared_ptr<dtkPoints> Ptr;\n\n public:\n virtual ~dtkPoints() {}\n virtual const GK::Point3& GetPoint(dtkID id) const = 0;\n virtual bool SetPoint(dtkID id, const GK::Point3 &coord) = 0;\n\n virtual size_t GetNumberOfPoints() const = 0;\n virtual dtkID GetMaxID() const = 0;\n\n virtual void Begin() const = 0;\n virtual bool Next(dtkID &id, GK::Point3 &coord) const = 0;\n\n virtual void InsertPoint(dtkID id, const GK::Point3 & coord) = 0;\n virtual void DeletePoint(dtkID id) = 0;\n\n };\n}\n\n#include "dtkPointsVector.h"" (type_identifier) "namespace" (identifier) "dtk" ({) "{" (comment) "//! A points container" (comment) "/*! It is used in many graphical element in DTK,\n * such as Mesh, Graph\n */" (type_identifier) "class" (ERROR) "dtkPoints: public boost::" (identifier) "dtkPoints" (:) ":" (identifier) "public" (identifier) "boost" (:) ":" (:) ":" (identifier) "noncopyable" ({) "{" (labeled_statement) "public:\n typedef std::shared_ptr<dtkPoints> Ptr;" (statement_identifier) "public" (ERROR) ":\n typedef std:" (:) ":" (type_identifier) "typedef" (identifier) "std" (:) ":" (:) ":" (expression_statement) "shared_ptr<dtkPoints> Ptr;" (binary_expression) "shared_ptr<dtkPoints> Ptr" (binary_expression) "shared_ptr<dtkPoints" (identifier) "shared_ptr" (<) "<" (identifier) "dtkPoints" (>) ">" (identifier) "Ptr" (;) ";" (labeled_statement) "public:\n virtual ~dtkPoints() {}\n virtual const GK::Point3& GetPoint(dtkID id) const = 0;" (statement_identifier) "public" (:) ":" (declaration) "virtual ~dtkPoints() {}\n virtual const GK::Point3& GetPoint(dtkID id) const = 0;" (type_identifier) "virtual" (ERROR) "~dtkPoints() {}\n virtual const GK::Point3&" (~) "~" (function_declarator) "dtkPoints()" (identifier) "dtkPoints" (parameter_list) "()" (() "(" ()) ")" ({) "{" (}) "}" (identifier) "virtual" (identifier) "const" (identifier) "GK" (:) ":" (:) ":" (identifier) "Point3" (&) "&" (init_declarator) "GetPoint(dtkID id) const = 0" (function_declarator) "GetPoint(dtkID id) const" (identifier) "GetPoint" (parameter_list) "(dtkID id)" (() "(" (parameter_declaration) "dtkID id" (type_identifier) "dtkID" (identifier) "id" ()) ")" (identifier) "const" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual bool SetPoint(dtkID id, const GK::Point3 &coord) = 0;" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (init_declarator) "SetPoint(dtkID id, const GK::Point3 &coord) = 0" (function_declarator) "SetPoint(dtkID id, const GK::Point3 &coord)" (identifier) "SetPoint" (parameter_list) "(dtkID id, const GK::Point3 &coord)" (() "(" (parameter_declaration) "dtkID id" (type_identifier) "dtkID" (identifier) "id" (,) "," (parameter_declaration) "const GK::Point3 &coord" (type_qualifier) "const" (const) "const" (type_identifier) "GK" (ERROR) "::Point3 &" (:) ":" (:) ":" (identifier) "Point3" (&) "&" (identifier) "coord" ()) ")" (=) "=" (number_literal) "0" (;) ";" (type_identifier) "virtual" (ERROR) "size_t" (identifier) "size_t" (function_declarator) "GetNumberOfPoints()" (identifier) "GetNumberOfPoints" (parameter_list) "()" (() "(" ()) ")" (declaration) "const = 0;\n virtual dtkID GetMaxID() const = 0;" (type_qualifier) "const" (const) "const" (ERROR) "= 0;" (=) "=" (number_literal) "0" (;) ";" (type_identifier) "virtual" (ERROR) "dtkID" (identifier) "dtkID" (init_declarator) "GetMaxID() const = 0" (function_declarator) "GetMaxID() const" (identifier) "GetMaxID" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void Begin() const = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "Begin() const = 0" (function_declarator) "Begin() const" (identifier) "Begin" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual bool Next(dtkID &id, GK::Point3 &coord) const = 0;" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (init_declarator) "Next(dtkID &id, GK::Point3 &coord) const = 0" (function_declarator) "Next(dtkID &id, GK::Point3 &coord) const" (identifier) "Next" (parameter_list) "(dtkID &id, GK::Point3 &coord)" (() "(" (parameter_declaration) "dtkID &id" (type_identifier) "dtkID" (ERROR) "&" (&) "&" (identifier) "id" (,) "," (parameter_declaration) "GK::Point3 &coord" (type_identifier) "GK" (ERROR) "::Point3 &" (:) ":" (:) ":" (identifier) "Point3" (&) "&" (identifier) "coord" ()) ")" (identifier) "const" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void InsertPoint(dtkID id, const GK::Point3 & coord) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "InsertPoint(dtkID id, const GK::Point3 & coord) = 0" (function_declarator) "InsertPoint(dtkID id, const GK::Point3 & coord)" (identifier) "InsertPoint" (parameter_list) "(dtkID id, const GK::Point3 & coord)" (() "(" (parameter_declaration) "dtkID id" (type_identifier) "dtkID" (identifier) "id" (,) "," (parameter_declaration) "const GK::Point3 & coord" (type_qualifier) "const" (const) "const" (type_identifier) "GK" (ERROR) "::Point3 &" (:) ":" (:) ":" (identifier) "Point3" (&) "&" (identifier) "coord" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual void DeletePoint(dtkID id) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "DeletePoint(dtkID id) = 0" (function_declarator) "DeletePoint(dtkID id)" (identifier) "DeletePoint" (parameter_list) "(dtkID id)" (() "(" (parameter_declaration) "dtkID id" (type_identifier) "dtkID" (identifier) "id" ()) ")" (=) "=" (number_literal) "0" (;) ";" (ERROR) "};\n}\n\n#include "dtkPointsVector." (}) "}" (;) ";" (}) "}" (#include) "#include" (") """ (identifier) "dtkPointsVector" (.) "." (identifier) "h" (") """ (#endif) "#endif" (comment) "//DTK_POINTS"
256
17
{"language": "c", "success": true, "metadata": {"lines": 32, "avg_line_length": 27.91, "nodes": 163, "errors": 0, "source_hash": "0bbbb2a8d9ab985fc9fab1e6b709763797958d451e8b1aca6bbe5d6209b180d1", "categorized_nodes": 116}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef DTK_POINTS_H\n#define DTK_POINTS_H\n\n#include <memory>\n#include <boost/utility.hpp>\n\n#include \"dtkConfig.h\"\n#include \"dtkTx.h\"\n#include \"dtkIDTypes.h\"\n\n#include \"dtkGraphicsKernel.h\"\n\nnamespace dtk\n{\n //! A points container\n /*! It is used in many graphical element in DTK,\n * such as Mesh, Graph\n */\n\tclass dtkPoints: public boost::noncopyable\n\t{\n\tpublic:\n\t\ttypedef std::shared_ptr<dtkPoints> Ptr;\n\n\tpublic:\n\t\tvirtual ~dtkPoints() {}\n virtual const GK::Point3& GetPoint(dtkID id) const = 0;\n\t\tvirtual bool SetPoint(dtkID id, const GK::Point3 &coord) = 0;\n\n\t\tvirtual size_t GetNumberOfPoints() const = 0;\n\t\tvirtual dtkID GetMaxID() const = 0;\n\n\t\tvirtual void Begin() const = 0;\n\t\tvirtual bool Next(dtkID &id, GK::Point3 &coord) const = 0;\n\n\t\tvirtual void InsertPoint(dtkID id, const GK::Point3 & coord) = 0;\n\t\tvirtual void DeletePoint(dtkID id) = 0;\n\n\t};\n}\n\n#include \"dtkPointsVector.h\"\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 162], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 42, "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": "DTK_POINTS_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 20}}, {"id": 3, "type": "preproc_def", "text": "#define DTK_POINTS_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": "DTK_POINTS_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "#include <memory>\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": "<memory>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <boost/utility.hpp>\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": "<boost/utility.hpp>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 28}}, {"id": 12, "type": "preproc_include", "text": "#include \"dtkConfig.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": "string_literal", "text": "\"dtkConfig.h\"", "parent": 12, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 22}}, {"id": 15, "type": "preproc_include", "text": "#include \"dtkTx.h\"\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": "string_literal", "text": "\"dtkTx.h\"", "parent": 15, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 18}}, {"id": 18, "type": "preproc_include", "text": "#include \"dtkIDTypes.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": "string_literal", "text": "\"dtkIDTypes.h\"", "parent": 18, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 23}}, {"id": 21, "type": "preproc_include", "text": "#include \"dtkGraphicsKernel.h\"\n", "parent": 0, "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": "string_literal", "text": "\"dtkGraphicsKernel.h\"", "parent": 21, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 30}}, {"id": 24, "type": "ERROR", "text": "namespace dtk\n{\n //! A points container\n /*! It is used in many graphical element in DTK,\n * such as Mesh, Graph\n */\n\tclass dtkPoints: public boost::noncopyable\n\t{\n\tpublic:\n\t\ttypedef std::shared_ptr<dtkPoints> Ptr;\n\n\tpublic:\n\t\tvirtual ~dtkPoints() {}\n virtual const GK::Point3& GetPoint(dtkID id) const = 0;\n\t\tvirtual bool SetPoint(dtkID id, const GK::Point3 &coord) = 0;\n\n\t\tvirtual size_t GetNumberOfPoints() const = 0;\n\t\tvirtual dtkID GetMaxID() const = 0;\n\n\t\tvirtual void Begin() const = 0;\n\t\tvirtual bool Next(dtkID &id, GK::Point3 &coord) const = 0;\n\n\t\tvirtual void InsertPoint(dtkID id, const GK::Point3 & coord) = 0;\n\t\tvirtual void DeletePoint(dtkID id) = 0;\n\n\t};\n}\n\n#include \"dtkPointsVector.h\"", "parent": 0, "children": [25, 26, 27, 30, 31, 42, 62, 80, 81, 83, 86, 99, 109, 127, 145, 158, 161], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 40, "column": 28}}, {"id": 25, "type": "type_identifier", "text": "namespace", "parent": 24, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 9}}, {"id": 26, "type": "identifier", "text": "dtk", "parent": 24, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 13}}, {"id": 27, "type": "ERROR", "text": "dtkPoints: public boost::", "parent": 24, "children": [28, 29], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 32}}, {"id": 28, "type": "identifier", "text": "dtkPoints", "parent": 27, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 16}}, {"id": 29, "type": "identifier", "text": "boost", "parent": 27, "children": [], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 30}}, {"id": 30, "type": "identifier", "text": "noncopyable", "parent": 24, "children": [], "start_point": {"row": 18, "column": 32}, "end_point": {"row": 18, "column": 43}}, {"id": 31, "type": "labeled_statement", "text": "public:\n\t\ttypedef std::shared_ptr<dtkPoints> Ptr;", "parent": 24, "children": [32], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 21, "column": 41}}, {"id": 32, "type": "ERROR", "text": ":\n\t\ttypedef std:", "parent": 31, "children": [33, 34], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 21, "column": 14}}, {"id": 33, "type": "type_identifier", "text": "typedef", "parent": 32, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 9}}, {"id": 34, "type": "identifier", "text": "std", "parent": 32, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 13}}, {"id": 35, "type": "binary_expression", "text": "shared_ptr<dtkPoints> Ptr", "parent": 31, "children": [36, 40, 41], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 40}}, {"id": 36, "type": "binary_expression", "text": "shared_ptr<dtkPoints", "parent": 35, "children": [37, 38, 39], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 35}}, {"id": 37, "type": "identifier", "text": "shared_ptr", "parent": 36, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 25}}, {"id": 38, "type": "<", "text": "<", "parent": 36, "children": [], "start_point": {"row": 21, "column": 25}, "end_point": {"row": 21, "column": 26}}, {"id": 39, "type": "identifier", "text": "dtkPoints", "parent": 36, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 35}}, {"id": 40, "type": ">", "text": ">", "parent": 35, "children": [], "start_point": {"row": 21, "column": 35}, "end_point": {"row": 21, "column": 36}}, {"id": 41, "type": "identifier", "text": "Ptr", "parent": 35, "children": [], "start_point": {"row": 21, "column": 37}, "end_point": {"row": 21, "column": 40}}, {"id": 42, "type": "labeled_statement", "text": "public:\n\t\tvirtual ~dtkPoints() {}\n virtual const GK::Point3& GetPoint(dtkID id) const = 0;", "parent": 24, "children": [43], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 25, "column": 63}}, {"id": 43, "type": "declaration", "text": "virtual ~dtkPoints() {}\n virtual const GK::Point3& GetPoint(dtkID id) const = 0;", "parent": 42, "children": [44, 45, 53], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 25, "column": 63}}, {"id": 44, "type": "type_identifier", "text": "virtual", "parent": 43, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 9}}, {"id": 45, "type": "ERROR", "text": "~dtkPoints() {}\n virtual const GK::Point3&", "parent": 43, "children": [46, 47, 50, 51, 52], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 25, "column": 33}}, {"id": 46, "type": "~", "text": "~", "parent": 45, "children": [], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 11}}, {"id": 47, "type": "function_declarator", "text": "dtkPoints()", "parent": 45, "children": [48, 49], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 22}}, {"id": 48, "type": "identifier", "text": "dtkPoints", "parent": 47, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 20}}, {"id": 49, "type": "parameter_list", "text": "()", "parent": 47, "children": [], "start_point": {"row": 24, "column": 20}, "end_point": {"row": 24, "column": 22}}, {"id": 50, "type": "identifier", "text": "virtual", "parent": 45, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 15}}, {"id": 51, "type": "identifier", "text": "GK", "parent": 45, "children": [], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 24}}, {"id": 52, "type": "identifier", "text": "Point3", "parent": 45, "children": [], "start_point": {"row": 25, "column": 26}, "end_point": {"row": 25, "column": 32}}, {"id": 53, "type": "init_declarator", "text": "GetPoint(dtkID id) const = 0", "parent": 43, "children": [54, 60, 61], "start_point": {"row": 25, "column": 34}, "end_point": {"row": 25, "column": 62}}, {"id": 54, "type": "function_declarator", "text": "GetPoint(dtkID id) const", "parent": 53, "children": [55, 56], "start_point": {"row": 25, "column": 34}, "end_point": {"row": 25, "column": 58}}, {"id": 55, "type": "identifier", "text": "GetPoint", "parent": 54, "children": [], "start_point": {"row": 25, "column": 34}, "end_point": {"row": 25, "column": 42}}, {"id": 56, "type": "parameter_list", "text": "(dtkID id)", "parent": 54, "children": [57], "start_point": {"row": 25, "column": 42}, "end_point": {"row": 25, "column": 52}}, {"id": 57, "type": "parameter_declaration", "text": "dtkID id", "parent": 56, "children": [58, 59], "start_point": {"row": 25, "column": 43}, "end_point": {"row": 25, "column": 51}}, {"id": 58, "type": "type_identifier", "text": "dtkID", "parent": 57, "children": [], "start_point": {"row": 25, "column": 43}, "end_point": {"row": 25, "column": 48}}, {"id": 59, "type": "identifier", "text": "id", "parent": 57, "children": [], "start_point": {"row": 25, "column": 49}, "end_point": {"row": 25, "column": 51}}, {"id": 60, "type": "=", "text": "=", "parent": 53, "children": [], "start_point": {"row": 25, "column": 59}, "end_point": {"row": 25, "column": 60}}, {"id": 61, "type": "number_literal", "text": "0", "parent": 53, "children": [], "start_point": {"row": 25, "column": 61}, "end_point": {"row": 25, "column": 62}}, {"id": 62, "type": "declaration", "text": "virtual bool SetPoint(dtkID id, const GK::Point3 &coord) = 0;", "parent": 24, "children": [63, 64, 66], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 63}}, {"id": 63, "type": "type_identifier", "text": "virtual", "parent": 62, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 9}}, {"id": 64, "type": "ERROR", "text": "bool", "parent": 62, "children": [65], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 14}}, {"id": 65, "type": "identifier", "text": "bool", "parent": 64, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 14}}, {"id": 66, "type": "init_declarator", "text": "SetPoint(dtkID id, const GK::Point3 &coord) = 0", "parent": 62, "children": [67, 78, 79], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 62}}, {"id": 67, "type": "function_declarator", "text": "SetPoint(dtkID id, const GK::Point3 &coord)", "parent": 66, "children": [68, 69], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 58}}, {"id": 68, "type": "identifier", "text": "SetPoint", "parent": 67, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 23}}, {"id": 69, "type": "parameter_list", "text": "(dtkID id, const GK::Point3 &coord)", "parent": 67, "children": [70, 73], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 58}}, {"id": 70, "type": "parameter_declaration", "text": "dtkID id", "parent": 69, "children": [71, 72], "start_point": {"row": 26, "column": 24}, "end_point": {"row": 26, "column": 32}}, {"id": 71, "type": "type_identifier", "text": "dtkID", "parent": 70, "children": [], "start_point": {"row": 26, "column": 24}, "end_point": {"row": 26, "column": 29}}, {"id": 72, "type": "identifier", "text": "id", "parent": 70, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 32}}, {"id": 73, "type": "parameter_declaration", "text": "const GK::Point3 &coord", "parent": 69, "children": [74, 75, 77], "start_point": {"row": 26, "column": 34}, "end_point": {"row": 26, "column": 57}}, {"id": 74, "type": "type_identifier", "text": "GK", "parent": 73, "children": [], "start_point": {"row": 26, "column": 40}, "end_point": {"row": 26, "column": 42}}, {"id": 75, "type": "ERROR", "text": "::Point3 &", "parent": 73, "children": [76], "start_point": {"row": 26, "column": 42}, "end_point": {"row": 26, "column": 52}}, {"id": 76, "type": "identifier", "text": "Point3", "parent": 75, "children": [], "start_point": {"row": 26, "column": 44}, "end_point": {"row": 26, "column": 50}}, {"id": 77, "type": "identifier", "text": "coord", "parent": 73, "children": [], "start_point": {"row": 26, "column": 52}, "end_point": {"row": 26, "column": 57}}, {"id": 78, "type": "=", "text": "=", "parent": 66, "children": [], "start_point": {"row": 26, "column": 59}, "end_point": {"row": 26, "column": 60}}, {"id": 79, "type": "number_literal", "text": "0", "parent": 66, "children": [], "start_point": {"row": 26, "column": 61}, "end_point": {"row": 26, "column": 62}}, {"id": 80, "type": "type_identifier", "text": "virtual", "parent": 24, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 9}}, {"id": 81, "type": "ERROR", "text": "size_t", "parent": 24, "children": [82], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 16}}, {"id": 82, "type": "identifier", "text": "size_t", "parent": 81, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 16}}, {"id": 83, "type": "function_declarator", "text": "GetNumberOfPoints()", "parent": 24, "children": [84, 85], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 36}}, {"id": 84, "type": "identifier", "text": "GetNumberOfPoints", "parent": 83, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 34}}, {"id": 85, "type": "parameter_list", "text": "()", "parent": 83, "children": [], "start_point": {"row": 28, "column": 34}, "end_point": {"row": 28, "column": 36}}, {"id": 86, "type": "declaration", "text": "const = 0;\n\t\tvirtual dtkID GetMaxID() const = 0;", "parent": 24, "children": [87, 90, 91, 93], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 29, "column": 37}}, {"id": 87, "type": "ERROR", "text": "= 0;", "parent": 86, "children": [88, 89], "start_point": {"row": 28, "column": 43}, "end_point": {"row": 28, "column": 47}}, {"id": 88, "type": "=", "text": "=", "parent": 87, "children": [], "start_point": {"row": 28, "column": 43}, "end_point": {"row": 28, "column": 44}}, {"id": 89, "type": "number_literal", "text": "0", "parent": 87, "children": [], "start_point": {"row": 28, "column": 45}, "end_point": {"row": 28, "column": 46}}, {"id": 90, "type": "type_identifier", "text": "virtual", "parent": 86, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 9}}, {"id": 91, "type": "ERROR", "text": "dtkID", "parent": 86, "children": [92], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 15}}, {"id": 92, "type": "identifier", "text": "dtkID", "parent": 91, "children": [], "start_point": {"row": 29, "column": 10}, "end_point": {"row": 29, "column": 15}}, {"id": 93, "type": "init_declarator", "text": "GetMaxID() const = 0", "parent": 86, "children": [94, 97, 98], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 36}}, {"id": 94, "type": "function_declarator", "text": "GetMaxID() const", "parent": 93, "children": [95, 96], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 32}}, {"id": 95, "type": "identifier", "text": "GetMaxID", "parent": 94, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 24}}, {"id": 96, "type": "parameter_list", "text": "()", "parent": 94, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 26}}, {"id": 97, "type": "=", "text": "=", "parent": 93, "children": [], "start_point": {"row": 29, "column": 33}, "end_point": {"row": 29, "column": 34}}, {"id": 98, "type": "number_literal", "text": "0", "parent": 93, "children": [], "start_point": {"row": 29, "column": 35}, "end_point": {"row": 29, "column": 36}}, {"id": 99, "type": "declaration", "text": "virtual void Begin() const = 0;", "parent": 24, "children": [100, 101, 103], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 33}}, {"id": 100, "type": "type_identifier", "text": "virtual", "parent": 99, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 9}}, {"id": 101, "type": "ERROR", "text": "void", "parent": 99, "children": [102], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 14}}, {"id": 102, "type": "identifier", "text": "void", "parent": 101, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 14}}, {"id": 103, "type": "init_declarator", "text": "Begin() const = 0", "parent": 99, "children": [104, 107, 108], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 32}}, {"id": 104, "type": "function_declarator", "text": "Begin() const", "parent": 103, "children": [105, 106], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 28}}, {"id": 105, "type": "identifier", "text": "Begin", "parent": 104, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 20}}, {"id": 106, "type": "parameter_list", "text": "()", "parent": 104, "children": [], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 22}}, {"id": 107, "type": "=", "text": "=", "parent": 103, "children": [], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 31, "column": 30}}, {"id": 108, "type": "number_literal", "text": "0", "parent": 103, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 32}}, {"id": 109, "type": "declaration", "text": "virtual bool Next(dtkID &id, GK::Point3 &coord) const = 0;", "parent": 24, "children": [110, 111, 113], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 60}}, {"id": 110, "type": "type_identifier", "text": "virtual", "parent": 109, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 9}}, {"id": 111, "type": "ERROR", "text": "bool", "parent": 109, "children": [112], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 14}}, {"id": 112, "type": "identifier", "text": "bool", "parent": 111, "children": [], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 14}}, {"id": 113, "type": "init_declarator", "text": "Next(dtkID &id, GK::Point3 &coord) const = 0", "parent": 109, "children": [114, 125, 126], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 59}}, {"id": 114, "type": "function_declarator", "text": "Next(dtkID &id, GK::Point3 &coord) const", "parent": 113, "children": [115, 116], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 55}}, {"id": 115, "type": "identifier", "text": "Next", "parent": 114, "children": [], "start_point": {"row": 32, "column": 15}, "end_point": {"row": 32, "column": 19}}, {"id": 116, "type": "parameter_list", "text": "(dtkID &id, GK::Point3 &coord)", "parent": 114, "children": [117, 120], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 32, "column": 49}}, {"id": 117, "type": "parameter_declaration", "text": "dtkID &id", "parent": 116, "children": [118, 119], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 29}}, {"id": 118, "type": "type_identifier", "text": "dtkID", "parent": 117, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 25}}, {"id": 119, "type": "identifier", "text": "id", "parent": 117, "children": [], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 29}}, {"id": 120, "type": "parameter_declaration", "text": "GK::Point3 &coord", "parent": 116, "children": [121, 122, 124], "start_point": {"row": 32, "column": 31}, "end_point": {"row": 32, "column": 48}}, {"id": 121, "type": "type_identifier", "text": "GK", "parent": 120, "children": [], "start_point": {"row": 32, "column": 31}, "end_point": {"row": 32, "column": 33}}, {"id": 122, "type": "ERROR", "text": "::Point3 &", "parent": 120, "children": [123], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 43}}, {"id": 123, "type": "identifier", "text": "Point3", "parent": 122, "children": [], "start_point": {"row": 32, "column": 35}, "end_point": {"row": 32, "column": 41}}, {"id": 124, "type": "identifier", "text": "coord", "parent": 120, "children": [], "start_point": {"row": 32, "column": 43}, "end_point": {"row": 32, "column": 48}}, {"id": 125, "type": "=", "text": "=", "parent": 113, "children": [], "start_point": {"row": 32, "column": 56}, "end_point": {"row": 32, "column": 57}}, {"id": 126, "type": "number_literal", "text": "0", "parent": 113, "children": [], "start_point": {"row": 32, "column": 58}, "end_point": {"row": 32, "column": 59}}, {"id": 127, "type": "declaration", "text": "virtual void InsertPoint(dtkID id, const GK::Point3 & coord) = 0;", "parent": 24, "children": [128, 129, 131], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 67}}, {"id": 128, "type": "type_identifier", "text": "virtual", "parent": 127, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 9}}, {"id": 129, "type": "ERROR", "text": "void", "parent": 127, "children": [130], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 14}}, {"id": 130, "type": "identifier", "text": "void", "parent": 129, "children": [], "start_point": {"row": 34, "column": 10}, "end_point": {"row": 34, "column": 14}}, {"id": 131, "type": "init_declarator", "text": "InsertPoint(dtkID id, const GK::Point3 & coord) = 0", "parent": 127, "children": [132, 143, 144], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 66}}, {"id": 132, "type": "function_declarator", "text": "InsertPoint(dtkID id, const GK::Point3 & coord)", "parent": 131, "children": [133, 134], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 62}}, {"id": 133, "type": "identifier", "text": "InsertPoint", "parent": 132, "children": [], "start_point": {"row": 34, "column": 15}, "end_point": {"row": 34, "column": 26}}, {"id": 134, "type": "parameter_list", "text": "(dtkID id, const GK::Point3 & coord)", "parent": 132, "children": [135, 138], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 62}}, {"id": 135, "type": "parameter_declaration", "text": "dtkID id", "parent": 134, "children": [136, 137], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 35}}, {"id": 136, "type": "type_identifier", "text": "dtkID", "parent": 135, "children": [], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 32}}, {"id": 137, "type": "identifier", "text": "id", "parent": 135, "children": [], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 35}}, {"id": 138, "type": "parameter_declaration", "text": "const GK::Point3 & coord", "parent": 134, "children": [139, 140, 142], "start_point": {"row": 34, "column": 37}, "end_point": {"row": 34, "column": 61}}, {"id": 139, "type": "type_identifier", "text": "GK", "parent": 138, "children": [], "start_point": {"row": 34, "column": 43}, "end_point": {"row": 34, "column": 45}}, {"id": 140, "type": "ERROR", "text": "::Point3 &", "parent": 138, "children": [141], "start_point": {"row": 34, "column": 45}, "end_point": {"row": 34, "column": 55}}, {"id": 141, "type": "identifier", "text": "Point3", "parent": 140, "children": [], "start_point": {"row": 34, "column": 47}, "end_point": {"row": 34, "column": 53}}, {"id": 142, "type": "identifier", "text": "coord", "parent": 138, "children": [], "start_point": {"row": 34, "column": 56}, "end_point": {"row": 34, "column": 61}}, {"id": 143, "type": "=", "text": "=", "parent": 131, "children": [], "start_point": {"row": 34, "column": 63}, "end_point": {"row": 34, "column": 64}}, {"id": 144, "type": "number_literal", "text": "0", "parent": 131, "children": [], "start_point": {"row": 34, "column": 65}, "end_point": {"row": 34, "column": 66}}, {"id": 145, "type": "declaration", "text": "virtual void DeletePoint(dtkID id) = 0;", "parent": 24, "children": [146, 147, 149], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 41}}, {"id": 146, "type": "type_identifier", "text": "virtual", "parent": 145, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 9}}, {"id": 147, "type": "ERROR", "text": "void", "parent": 145, "children": [148], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 14}}, {"id": 148, "type": "identifier", "text": "void", "parent": 147, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 14}}, {"id": 149, "type": "init_declarator", "text": "DeletePoint(dtkID id) = 0", "parent": 145, "children": [150, 156, 157], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 40}}, {"id": 150, "type": "function_declarator", "text": "DeletePoint(dtkID id)", "parent": 149, "children": [151, 152], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 36}}, {"id": 151, "type": "identifier", "text": "DeletePoint", "parent": 150, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 26}}, {"id": 152, "type": "parameter_list", "text": "(dtkID id)", "parent": 150, "children": [153], "start_point": {"row": 35, "column": 26}, "end_point": {"row": 35, "column": 36}}, {"id": 153, "type": "parameter_declaration", "text": "dtkID id", "parent": 152, "children": [154, 155], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 35}}, {"id": 154, "type": "type_identifier", "text": "dtkID", "parent": 153, "children": [], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 32}}, {"id": 155, "type": "identifier", "text": "id", "parent": 153, "children": [], "start_point": {"row": 35, "column": 33}, "end_point": {"row": 35, "column": 35}}, {"id": 156, "type": "=", "text": "=", "parent": 149, "children": [], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 38}}, {"id": 157, "type": "number_literal", "text": "0", "parent": 149, "children": [], "start_point": {"row": 35, "column": 39}, "end_point": {"row": 35, "column": 40}}, {"id": 158, "type": "ERROR", "text": "};\n}\n\n#include \"dtkPointsVector.", "parent": 24, "children": [159, 160], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 40, "column": 26}}, {"id": 159, "type": "#include", "text": "#include", "parent": 158, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 8}}, {"id": 160, "type": "identifier", "text": "dtkPointsVector", "parent": 158, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 25}}, {"id": 161, "type": "identifier", "text": "h", "parent": 24, "children": [], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 27}}, {"id": 162, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 6}}]}, "node_categories": {"declarations": {"functions": [47, 54, 67, 83, 94, 104, 114, 132, 150], "variables": [43, 57, 62, 70, 73, 86, 99, 109, 117, 120, 127, 135, 138, 145, 153], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 159], "modules": [], "enums": []}, "statements": {"expressions": [35, 36], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 25, 26, 28, 29, 30, 33, 34, 37, 39, 41, 44, 48, 50, 51, 52, 55, 58, 59, 63, 65, 68, 71, 72, 74, 76, 77, 80, 82, 84, 90, 92, 95, 100, 102, 105, 110, 112, 115, 118, 119, 121, 123, 124, 128, 130, 133, 136, 137, 139, 141, 142, 146, 148, 151, 154, 155, 160, 161, 162], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 61, 79, 89, 98, 108, 126, 144, 157], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 47, "universal_type": "function", "name": "unknown", "text_snippet": "dtkPoints()"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "GetPoint(dtkID id) const"}, {"node_id": 67, "universal_type": "function", "name": "unknown", "text_snippet": "SetPoint(dtkID id, const GK::Point3 &coord)"}, {"node_id": 83, "universal_type": "function", "name": "unknown", "text_snippet": "GetNumberOfPoints()"}, {"node_id": 94, "universal_type": "function", "name": "unknown", "text_snippet": "GetMaxID() const"}, {"node_id": 104, "universal_type": "function", "name": "unknown", "text_snippet": "Begin() const"}, {"node_id": 114, "universal_type": "function", "name": "unknown", "text_snippet": "Next(dtkID &id, GK::Point3 &coord) const"}, {"node_id": 132, "universal_type": "function", "name": "unknown", "text_snippet": "InsertPoint(dtkID id, const GK::Point3 & coord)"}, {"node_id": 150, "universal_type": "function", "name": "unknown", "text_snippet": "DeletePoint(dtkID id)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <memory>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <boost/utility.hpp>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"dtkConfig.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"dtkTx.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"dtkIDTypes.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"dtkGraphicsKernel.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 159, "text": "#include"}]}, "original_source_code": "#ifndef DTK_POINTS_H\n#define DTK_POINTS_H\n\n#include <memory>\n#include <boost/utility.hpp>\n\n#include \"dtkConfig.h\"\n#include \"dtkTx.h\"\n#include \"dtkIDTypes.h\"\n\n#include \"dtkGraphicsKernel.h\"\n\nnamespace dtk\n{\n //! A points container\n /*! It is used in many graphical element in DTK,\n * such as Mesh, Graph\n */\n\tclass dtkPoints: public boost::noncopyable\n\t{\n\tpublic:\n\t\ttypedef std::shared_ptr<dtkPoints> Ptr;\n\n\tpublic:\n\t\tvirtual ~dtkPoints() {}\n virtual const GK::Point3& GetPoint(dtkID id) const = 0;\n\t\tvirtual bool SetPoint(dtkID id, const GK::Point3 &coord) = 0;\n\n\t\tvirtual size_t GetNumberOfPoints() const = 0;\n\t\tvirtual dtkID GetMaxID() const = 0;\n\n\t\tvirtual void Begin() const = 0;\n\t\tvirtual bool Next(dtkID &id, GK::Point3 &coord) const = 0;\n\n\t\tvirtual void InsertPoint(dtkID id, const GK::Point3 & coord) = 0;\n\t\tvirtual void DeletePoint(dtkID id) = 0;\n\n\t};\n}\n\n#include \"dtkPointsVector.h\"\n\n#endif //DTK_POINTS\n"}
12
c
#include "gyro_factory.h" static int gyro_factory_open(struct inode *inode, struct file *file) { file->private_data = gyro_context_obj; if (file->private_data == NULL) { GYRO_ERR("null pointer!!\n"); return -EINVAL; } return nonseekable_open(inode, file); } static int gyro_factory_release(struct inode *inode, struct file *file) { file->private_data = NULL; return 0; } static int gyro_set_cali(int data[GYRO_AXES_NUM]) { struct gyro_context *cxt = gyro_context_obj; GYRO_LOG(" factory gyro cali %d,%d,%d \n",data[GYRO_AXIS_X],data[GYRO_AXIS_Y],data[GYRO_AXIS_Z] ); GYRO_LOG(" original gyro cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]); cxt->cali_sw[GYRO_AXIS_X] += data[GYRO_AXIS_X]; cxt->cali_sw[GYRO_AXIS_Y] += data[GYRO_AXIS_Y]; cxt->cali_sw[GYRO_AXIS_Z] += data[GYRO_AXIS_Z]; GYRO_LOG(" GYRO new cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]); return 0; } static int gyro_clear_cali(void) { struct gyro_context *cxt = gyro_context_obj; cxt->cali_sw[GYRO_AXIS_X] = 0; cxt->cali_sw[GYRO_AXIS_Y] = 0; cxt->cali_sw[GYRO_AXIS_Z] = 0; GYRO_LOG(" GYRO after clear cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z] ); return 0; } static long gyro_factory_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { void __user *data; long err = 0; struct gyro_context *cxt = gyro_context_obj; int x,y,z,status; char strbuf[256]; int cali[3] = {0}; SENSOR_DATA sensor_data = {0}; int smtRes; if (_IOC_DIR(cmd) & _IOC_READ) { err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd)); } else if (_IOC_DIR(cmd) & _IOC_WRITE) { err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd)); } if (err) { GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd)); return -EFAULT; } switch (cmd) { case GYROSCOPE_IOCTL_INIT: if(cxt->gyro_ctl.enable_nodata!= NULL){ err = cxt->gyro_ctl.enable_nodata(1); if(err < 0) { GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n"); break; } GYRO_LOG("GYROSCOPE_IOCTL_INIT\n"); }else{ GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA "); } break; case GYROSCOPE_IOCTL_SMT_DATA: data = (void __user *) arg; if (data == NULL) { err = -EINVAL; break; } smtRes = 1; err = copy_to_user(data, &smtRes, sizeof(smtRes)); if (err) { err = -EINVAL; GYRO_ERR("copy gyro data to user failed!\n"); } break; case GYROSCOPE_IOCTL_READ_SENSORDATA: data = (void __user *) arg; if (data == NULL) { err = -EINVAL; break; } if(cxt->gyro_data.get_data != NULL){ err = cxt->gyro_data.get_data(&x, &y, &z, &status); if(err < 0) { GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n"); break; } x+=cxt->cali_sw[0]; y+=cxt->cali_sw[1]; z+=cxt->cali_sw[2]; sprintf(strbuf, "%x %x %x", x, y, z); GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\n", x, y, z); GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\n", strbuf); if (copy_to_user(data, strbuf, strlen(strbuf)+1)) { err = -EFAULT; break; } }else{ GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA "); } break; case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW: data = (void __user *) arg; if (data == NULL) { err = -EINVAL; break; } if(cxt->gyro_data.get_raw_data != NULL){ err = cxt->gyro_data.get_raw_data(&x, &y, &z); if(err < 0) { GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n"); break; } x+=cxt->cali_sw[0]; y+=cxt->cali_sw[1]; z+=cxt->cali_sw[2]; sprintf(strbuf, "%x %x %x", x, y, z); GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\n", x, y, z); if (copy_to_user(data, strbuf, strlen(strbuf)+1)) { err = -EFAULT; break; } }else{ GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n "); } break; case GYROSCOPE_IOCTL_SET_CALI: data = (void __user*)arg; if (data == NULL) { err = -EINVAL; break; } if (copy_from_user(&sensor_data, data, sizeof(sensor_data))) { err = -EFAULT; break; } cali[0] = sensor_data.x ; cali[1] = sensor_data.y ; cali[2] = sensor_data.z ; GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\n", cali[0], cali[1], cali[2]); gyro_set_cali(cali); /* if(cxt->gyro_ctl.gyro_calibration != NULL) { err = cxt->gyro_ctl.gyro_calibration(SETCALI, cali); if(err < 0) { GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI fail!\n"); break; } } */ break; case GYROSCOPE_IOCTL_CLR_CALI: /* if(cxt->gyro_ctl.gyro_calibration != NULL) { err = cxt->gyro_ctl.gyro_calibration(CLRCALI, cali); if(err < 0) { GYRO_LOG("GYROSCOPE_IOCTL_CLR_CALI fail!\n"); break; } } */ gyro_clear_cali(); break; case GYROSCOPE_IOCTL_GET_CALI: data = (void __user*)arg; if (data == NULL) { err = -EINVAL; break; } /* if(cxt->gyro_ctl.gyro_calibration != NULL) { err = cxt->gyro_ctl.gyro_calibration(GETCALI, cali); if(err < 0) { GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI fail!\n"); break; } } */ GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\n", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2]); sensor_data.x = cxt->cali_sw[0]; ; sensor_data.y = cxt->cali_sw[1]; ; sensor_data.z = cxt->cali_sw[2]; ; if (copy_to_user(data, &sensor_data, sizeof(sensor_data))) { err = -EFAULT; break; } break; default: GYRO_LOG("unknown IOCTL: 0x%08x\n", cmd); err = -ENOIOCTLCMD; break; } return err; } static struct file_operations gyro_factory_fops = { .open = gyro_factory_open, .release = gyro_factory_release, .unlocked_ioctl = gyro_factory_unlocked_ioctl, }; static struct miscdevice gyro_factory_device = { .minor = MISC_DYNAMIC_MINOR, .name = "gyroscope", .fops = &gyro_factory_fops, }; int gyro_factory_device_init() { int error = 0; struct gyro_context *cxt = gyro_context_obj; if (!cxt->gyro_ctl.is_use_common_factory) { GYRO_LOG("Node of '/dev/gyroscope' has already existed!\n"); return -1; } if ((error = misc_register(&gyro_factory_device))) { GYRO_LOG("gyro_factory_device register failed\n"); error = -1; } return error; }
26.63
254
(translation_unit) "#include "gyro_factory.h"\n\nstatic int gyro_factory_open(struct inode *inode, struct file *file)\n{\n file->private_data = gyro_context_obj;\n\n if (file->private_data == NULL)\n {\n GYRO_ERR("null pointer!!\n");\n return -EINVAL;\n }\n return nonseekable_open(inode, file);\n}\n\nstatic int gyro_factory_release(struct inode *inode, struct file *file)\n{\n file->private_data = NULL;\n return 0;\n}\n\nstatic int gyro_set_cali(int data[GYRO_AXES_NUM])\n{\n struct gyro_context *cxt = gyro_context_obj;\n GYRO_LOG(" factory gyro cali %d,%d,%d \n",data[GYRO_AXIS_X],data[GYRO_AXIS_Y],data[GYRO_AXIS_Z] );\n GYRO_LOG(" original gyro cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]);\n cxt->cali_sw[GYRO_AXIS_X] += data[GYRO_AXIS_X];\n cxt->cali_sw[GYRO_AXIS_Y] += data[GYRO_AXIS_Y];\n cxt->cali_sw[GYRO_AXIS_Z] += data[GYRO_AXIS_Z];\n GYRO_LOG(" GYRO new cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]);\n\n return 0;\n}\n\nstatic int gyro_clear_cali(void)\n{\n struct gyro_context *cxt = gyro_context_obj;\n cxt->cali_sw[GYRO_AXIS_X] = 0;\n cxt->cali_sw[GYRO_AXIS_Y] = 0;\n cxt->cali_sw[GYRO_AXIS_Z] = 0;\n GYRO_LOG(" GYRO after clear cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z] );\n return 0;\n}\n\nstatic long gyro_factory_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)\n{\n void __user *data;\n long err = 0;\n struct gyro_context *cxt = gyro_context_obj;\n int x,y,z,status;\n char strbuf[256];\n int cali[3] = {0};\n SENSOR_DATA sensor_data = {0};\n int smtRes;\n \n if (_IOC_DIR(cmd) & _IOC_READ)\n {\n err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd));\n }\n else if (_IOC_DIR(cmd) & _IOC_WRITE)\n {\n err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));\n }\n\n if (err)\n {\n GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd));\n return -EFAULT;\n }\n\n switch (cmd)\n {\n case GYROSCOPE_IOCTL_INIT:\n if(cxt->gyro_ctl.enable_nodata!= NULL){\n err = cxt->gyro_ctl.enable_nodata(1);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n GYRO_LOG("GYROSCOPE_IOCTL_INIT\n");\n\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }\n break;\n case GYROSCOPE_IOCTL_SMT_DATA:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n smtRes = 1;\n err = copy_to_user(data, &smtRes, sizeof(smtRes));\n if (err)\n {\n err = -EINVAL;\n GYRO_ERR("copy gyro data to user failed!\n");\n }\n\n break; \n case GYROSCOPE_IOCTL_READ_SENSORDATA:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if(cxt->gyro_data.get_data != NULL){\n err = cxt->gyro_data.get_data(&x, &y, &z, &status);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\n", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\n", strbuf);\n \n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }\n break;\n \n case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if(cxt->gyro_data.get_raw_data != NULL){\n err = cxt->gyro_data.get_raw_data(&x, &y, &z);\n if(err < 0)\n {\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\n", x, y, z);\n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n ");\n }\n break; \n case GYROSCOPE_IOCTL_SET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if (copy_from_user(&sensor_data, data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break; \n }\n cali[0] = sensor_data.x ;\n cali[1] = sensor_data.y ;\n cali[2] = sensor_data.z ;\n GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\n", cali[0], cali[1], cali[2]);\n gyro_set_cali(cali);\n/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(SETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI fail!\n");\n break;\n }\n } \n */\n break;\n\n case GYROSCOPE_IOCTL_CLR_CALI:\n /*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(CLRCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_CLR_CALI fail!\n");\n break;\n }\n } \n */\n gyro_clear_cali();\n break;\n\n case GYROSCOPE_IOCTL_GET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n /*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(GETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI fail!\n");\n break;\n }\n }\n */\n GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\n", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2]);\n sensor_data.x = cxt->cali_sw[0]; ; \n sensor_data.y = cxt->cali_sw[1]; ;\n sensor_data.z = cxt->cali_sw[2]; ;\n if (copy_to_user(data, &sensor_data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break;\n }\n break;\n \n default:\n GYRO_LOG("unknown IOCTL: 0x%08x\n", cmd);\n err = -ENOIOCTLCMD;\n break;\n\n }\n return err;\n}\n\n\nstatic struct file_operations gyro_factory_fops = {\n .open = gyro_factory_open,\n .release = gyro_factory_release,\n .unlocked_ioctl = gyro_factory_unlocked_ioctl,\n};\n\nstatic struct miscdevice gyro_factory_device = {\n .minor = MISC_DYNAMIC_MINOR,\n .name = "gyroscope",\n .fops = &gyro_factory_fops,\n};\n\nint gyro_factory_device_init()\n{\n int error = 0;\n struct gyro_context *cxt = gyro_context_obj;\n\n if (!cxt->gyro_ctl.is_use_common_factory) {\n GYRO_LOG("Node of '/dev/gyroscope' has already existed!\n");\n return -1;\n }\n if ((error = misc_register(&gyro_factory_device)))\n {\n GYRO_LOG("gyro_factory_device register failed\n");\n error = -1;\n } \n return error;\n}\n\n\n\n\n" (preproc_include) "#include "gyro_factory.h"\n" (#include) "#include" (string_literal) ""gyro_factory.h"" (") """ (string_content) "gyro_factory.h" (") """ (function_definition) "static int gyro_factory_open(struct inode *inode, struct file *file)\n{\n file->private_data = gyro_context_obj;\n\n if (file->private_data == NULL)\n {\n GYRO_ERR("null pointer!!\n");\n return -EINVAL;\n }\n return nonseekable_open(inode, file);\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "gyro_factory_open(struct inode *inode, struct file *file)" (identifier) "gyro_factory_open" (parameter_list) "(struct inode *inode, struct file *file)" (() "(" (parameter_declaration) "struct inode *inode" (struct_specifier) "struct inode" (struct) "struct" (type_identifier) "inode" (pointer_declarator) "*inode" (*) "*" (identifier) "inode" (,) "," (parameter_declaration) "struct file *file" (struct_specifier) "struct file" (struct) "struct" (type_identifier) "file" (pointer_declarator) "*file" (*) "*" (identifier) "file" ()) ")" (compound_statement) "{\n file->private_data = gyro_context_obj;\n\n if (file->private_data == NULL)\n {\n GYRO_ERR("null pointer!!\n");\n return -EINVAL;\n }\n return nonseekable_open(inode, file);\n}" ({) "{" (expression_statement) "file->private_data = gyro_context_obj;" (assignment_expression) "file->private_data = gyro_context_obj" (field_expression) "file->private_data" (identifier) "file" (->) "->" (field_identifier) "private_data" (=) "=" (identifier) "gyro_context_obj" (;) ";" (if_statement) "if (file->private_data == NULL)\n {\n GYRO_ERR("null pointer!!\n");\n return -EINVAL;\n }" (if) "if" (parenthesized_expression) "(file->private_data == NULL)" (() "(" (binary_expression) "file->private_data == NULL" (field_expression) "file->private_data" (identifier) "file" (->) "->" (field_identifier) "private_data" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n GYRO_ERR("null pointer!!\n");\n return -EINVAL;\n }" ({) "{" (expression_statement) "GYRO_ERR("null pointer!!\n");" (call_expression) "GYRO_ERR("null pointer!!\n")" (identifier) "GYRO_ERR" (argument_list) "("null pointer!!\n")" (() "(" (string_literal) ""null pointer!!\n"" (") """ (string_content) "null pointer!!" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return -EINVAL;" (return) "return" (unary_expression) "-EINVAL" (-) "-" (identifier) "EINVAL" (;) ";" (}) "}" (return_statement) "return nonseekable_open(inode, file);" (return) "return" (call_expression) "nonseekable_open(inode, file)" (identifier) "nonseekable_open" (argument_list) "(inode, file)" (() "(" (identifier) "inode" (,) "," (identifier) "file" ()) ")" (;) ";" (}) "}" (function_definition) "static int gyro_factory_release(struct inode *inode, struct file *file)\n{\n file->private_data = NULL;\n return 0;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "gyro_factory_release(struct inode *inode, struct file *file)" (identifier) "gyro_factory_release" (parameter_list) "(struct inode *inode, struct file *file)" (() "(" (parameter_declaration) "struct inode *inode" (struct_specifier) "struct inode" (struct) "struct" (type_identifier) "inode" (pointer_declarator) "*inode" (*) "*" (identifier) "inode" (,) "," (parameter_declaration) "struct file *file" (struct_specifier) "struct file" (struct) "struct" (type_identifier) "file" (pointer_declarator) "*file" (*) "*" (identifier) "file" ()) ")" (compound_statement) "{\n file->private_data = NULL;\n return 0;\n}" ({) "{" (expression_statement) "file->private_data = NULL;" (assignment_expression) "file->private_data = NULL" (field_expression) "file->private_data" (identifier) "file" (->) "->" (field_identifier) "private_data" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "static int gyro_set_cali(int data[GYRO_AXES_NUM])\n{\n struct gyro_context *cxt = gyro_context_obj;\n GYRO_LOG(" factory gyro cali %d,%d,%d \n",data[GYRO_AXIS_X],data[GYRO_AXIS_Y],data[GYRO_AXIS_Z] );\n GYRO_LOG(" original gyro cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]);\n cxt->cali_sw[GYRO_AXIS_X] += data[GYRO_AXIS_X];\n cxt->cali_sw[GYRO_AXIS_Y] += data[GYRO_AXIS_Y];\n cxt->cali_sw[GYRO_AXIS_Z] += data[GYRO_AXIS_Z];\n GYRO_LOG(" GYRO new cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]);\n\n return 0;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "gyro_set_cali(int data[GYRO_AXES_NUM])" (identifier) "gyro_set_cali" (parameter_list) "(int data[GYRO_AXES_NUM])" (() "(" (parameter_declaration) "int data[GYRO_AXES_NUM]" (primitive_type) "int" (array_declarator) "data[GYRO_AXES_NUM]" (identifier) "data" ([) "[" (identifier) "GYRO_AXES_NUM" (]) "]" ()) ")" (compound_statement) "{\n struct gyro_context *cxt = gyro_context_obj;\n GYRO_LOG(" factory gyro cali %d,%d,%d \n",data[GYRO_AXIS_X],data[GYRO_AXIS_Y],data[GYRO_AXIS_Z] );\n GYRO_LOG(" original gyro cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]);\n cxt->cali_sw[GYRO_AXIS_X] += data[GYRO_AXIS_X];\n cxt->cali_sw[GYRO_AXIS_Y] += data[GYRO_AXIS_Y];\n cxt->cali_sw[GYRO_AXIS_Z] += data[GYRO_AXIS_Z];\n GYRO_LOG(" GYRO new cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]);\n\n return 0;\n}" ({) "{" (declaration) "struct gyro_context *cxt = gyro_context_obj;" (struct_specifier) "struct gyro_context" (struct) "struct" (type_identifier) "gyro_context" (init_declarator) "*cxt = gyro_context_obj" (pointer_declarator) "*cxt" (*) "*" (identifier) "cxt" (=) "=" (identifier) "gyro_context_obj" (;) ";" (expression_statement) "GYRO_LOG(" factory gyro cali %d,%d,%d \n",data[GYRO_AXIS_X],data[GYRO_AXIS_Y],data[GYRO_AXIS_Z] );" (call_expression) "GYRO_LOG(" factory gyro cali %d,%d,%d \n",data[GYRO_AXIS_X],data[GYRO_AXIS_Y],data[GYRO_AXIS_Z] )" (identifier) "GYRO_LOG" (argument_list) "(" factory gyro cali %d,%d,%d \n",data[GYRO_AXIS_X],data[GYRO_AXIS_Y],data[GYRO_AXIS_Z] )" (() "(" (string_literal) "" factory gyro cali %d,%d,%d \n"" (") """ (string_content) " factory gyro cali %d,%d,%d " (escape_sequence) "\n" (") """ (,) "," (subscript_expression) "data[GYRO_AXIS_X]" (identifier) "data" ([) "[" (identifier) "GYRO_AXIS_X" (]) "]" (,) "," (subscript_expression) "data[GYRO_AXIS_Y]" (identifier) "data" ([) "[" (identifier) "GYRO_AXIS_Y" (]) "]" (,) "," (subscript_expression) "data[GYRO_AXIS_Z]" (identifier) "data" ([) "[" (identifier) "GYRO_AXIS_Z" (]) "]" ()) ")" (;) ";" (expression_statement) "GYRO_LOG(" original gyro cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]);" (call_expression) "GYRO_LOG(" original gyro cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z])" (identifier) "GYRO_LOG" (argument_list) "(" original gyro cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z])" (() "(" (string_literal) "" original gyro cali %d,%d,%d \n"" (") """ (string_content) " original gyro cali %d,%d,%d " (escape_sequence) "\n" (") """ (,) "," (subscript_expression) "cxt->cali_sw[GYRO_AXIS_X]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_X" (]) "]" (,) "," (subscript_expression) "cxt->cali_sw[GYRO_AXIS_Y]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_Y" (]) "]" (,) "," (subscript_expression) "cxt->cali_sw[GYRO_AXIS_Z]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_Z" (]) "]" ()) ")" (;) ";" (expression_statement) "cxt->cali_sw[GYRO_AXIS_X] += data[GYRO_AXIS_X];" (assignment_expression) "cxt->cali_sw[GYRO_AXIS_X] += data[GYRO_AXIS_X]" (subscript_expression) "cxt->cali_sw[GYRO_AXIS_X]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_X" (]) "]" (+=) "+=" (subscript_expression) "data[GYRO_AXIS_X]" (identifier) "data" ([) "[" (identifier) "GYRO_AXIS_X" (]) "]" (;) ";" (expression_statement) "cxt->cali_sw[GYRO_AXIS_Y] += data[GYRO_AXIS_Y];" (assignment_expression) "cxt->cali_sw[GYRO_AXIS_Y] += data[GYRO_AXIS_Y]" (subscript_expression) "cxt->cali_sw[GYRO_AXIS_Y]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_Y" (]) "]" (+=) "+=" (subscript_expression) "data[GYRO_AXIS_Y]" (identifier) "data" ([) "[" (identifier) "GYRO_AXIS_Y" (]) "]" (;) ";" (expression_statement) "cxt->cali_sw[GYRO_AXIS_Z] += data[GYRO_AXIS_Z];" (assignment_expression) "cxt->cali_sw[GYRO_AXIS_Z] += data[GYRO_AXIS_Z]" (subscript_expression) "cxt->cali_sw[GYRO_AXIS_Z]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_Z" (]) "]" (+=) "+=" (subscript_expression) "data[GYRO_AXIS_Z]" (identifier) "data" ([) "[" (identifier) "GYRO_AXIS_Z" (]) "]" (;) ";" (expression_statement) "GYRO_LOG(" GYRO new cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]);" (call_expression) "GYRO_LOG(" GYRO new cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z])" (identifier) "GYRO_LOG" (argument_list) "(" GYRO new cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z])" (() "(" (string_literal) "" GYRO new cali %d,%d,%d \n"" (") """ (string_content) " GYRO new cali %d,%d,%d " (escape_sequence) "\n" (") """ (,) "," (subscript_expression) "cxt->cali_sw[GYRO_AXIS_X]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_X" (]) "]" (,) "," (subscript_expression) "cxt->cali_sw[GYRO_AXIS_Y]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_Y" (]) "]" (,) "," (subscript_expression) "cxt->cali_sw[GYRO_AXIS_Z]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_Z" (]) "]" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "static int gyro_clear_cali(void)\n{\n struct gyro_context *cxt = gyro_context_obj;\n cxt->cali_sw[GYRO_AXIS_X] = 0;\n cxt->cali_sw[GYRO_AXIS_Y] = 0;\n cxt->cali_sw[GYRO_AXIS_Z] = 0;\n GYRO_LOG(" GYRO after clear cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z] );\n return 0;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "gyro_clear_cali(void)" (identifier) "gyro_clear_cali" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n struct gyro_context *cxt = gyro_context_obj;\n cxt->cali_sw[GYRO_AXIS_X] = 0;\n cxt->cali_sw[GYRO_AXIS_Y] = 0;\n cxt->cali_sw[GYRO_AXIS_Z] = 0;\n GYRO_LOG(" GYRO after clear cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z] );\n return 0;\n}" ({) "{" (declaration) "struct gyro_context *cxt = gyro_context_obj;" (struct_specifier) "struct gyro_context" (struct) "struct" (type_identifier) "gyro_context" (init_declarator) "*cxt = gyro_context_obj" (pointer_declarator) "*cxt" (*) "*" (identifier) "cxt" (=) "=" (identifier) "gyro_context_obj" (;) ";" (expression_statement) "cxt->cali_sw[GYRO_AXIS_X] = 0;" (assignment_expression) "cxt->cali_sw[GYRO_AXIS_X] = 0" (subscript_expression) "cxt->cali_sw[GYRO_AXIS_X]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_X" (]) "]" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "cxt->cali_sw[GYRO_AXIS_Y] = 0;" (assignment_expression) "cxt->cali_sw[GYRO_AXIS_Y] = 0" (subscript_expression) "cxt->cali_sw[GYRO_AXIS_Y]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_Y" (]) "]" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "cxt->cali_sw[GYRO_AXIS_Z] = 0;" (assignment_expression) "cxt->cali_sw[GYRO_AXIS_Z] = 0" (subscript_expression) "cxt->cali_sw[GYRO_AXIS_Z]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_Z" (]) "]" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "GYRO_LOG(" GYRO after clear cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z] );" (call_expression) "GYRO_LOG(" GYRO after clear cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z] )" (identifier) "GYRO_LOG" (argument_list) "(" GYRO after clear cali %d,%d,%d \n",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z] )" (() "(" (string_literal) "" GYRO after clear cali %d,%d,%d \n"" (") """ (string_content) " GYRO after clear cali %d,%d,%d " (escape_sequence) "\n" (") """ (,) "," (subscript_expression) "cxt->cali_sw[GYRO_AXIS_X]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_X" (]) "]" (,) "," (subscript_expression) "cxt->cali_sw[GYRO_AXIS_Y]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_Y" (]) "]" (,) "," (subscript_expression) "cxt->cali_sw[GYRO_AXIS_Z]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (identifier) "GYRO_AXIS_Z" (]) "]" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "static long gyro_factory_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)\n{\n void __user *data;\n long err = 0;\n struct gyro_context *cxt = gyro_context_obj;\n int x,y,z,status;\n char strbuf[256];\n int cali[3] = {0};\n SENSOR_DATA sensor_data = {0};\n int smtRes;\n \n if (_IOC_DIR(cmd) & _IOC_READ)\n {\n err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd));\n }\n else if (_IOC_DIR(cmd) & _IOC_WRITE)\n {\n err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));\n }\n\n if (err)\n {\n GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd));\n return -EFAULT;\n }\n\n switch (cmd)\n {\n case GYROSCOPE_IOCTL_INIT:\n if(cxt->gyro_ctl.enable_nodata!= NULL){\n err = cxt->gyro_ctl.enable_nodata(1);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n GYRO_LOG("GYROSCOPE_IOCTL_INIT\n");\n\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }\n break;\n case GYROSCOPE_IOCTL_SMT_DATA:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n smtRes = 1;\n err = copy_to_user(data, &smtRes, sizeof(smtRes));\n if (err)\n {\n err = -EINVAL;\n GYRO_ERR("copy gyro data to user failed!\n");\n }\n\n break; \n case GYROSCOPE_IOCTL_READ_SENSORDATA:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if(cxt->gyro_data.get_data != NULL){\n err = cxt->gyro_data.get_data(&x, &y, &z, &status);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\n", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\n", strbuf);\n \n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }\n break;\n \n case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if(cxt->gyro_data.get_raw_data != NULL){\n err = cxt->gyro_data.get_raw_data(&x, &y, &z);\n if(err < 0)\n {\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\n", x, y, z);\n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n ");\n }\n break; \n case GYROSCOPE_IOCTL_SET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if (copy_from_user(&sensor_data, data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break; \n }\n cali[0] = sensor_data.x ;\n cali[1] = sensor_data.y ;\n cali[2] = sensor_data.z ;\n GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\n", cali[0], cali[1], cali[2]);\n gyro_set_cali(cali);\n/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(SETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI fail!\n");\n break;\n }\n } \n */\n break;\n\n case GYROSCOPE_IOCTL_CLR_CALI:\n /*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(CLRCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_CLR_CALI fail!\n");\n break;\n }\n } \n */\n gyro_clear_cali();\n break;\n\n case GYROSCOPE_IOCTL_GET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n /*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(GETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI fail!\n");\n break;\n }\n }\n */\n GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\n", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2]);\n sensor_data.x = cxt->cali_sw[0]; ; \n sensor_data.y = cxt->cali_sw[1]; ;\n sensor_data.z = cxt->cali_sw[2]; ;\n if (copy_to_user(data, &sensor_data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break;\n }\n break;\n \n default:\n GYRO_LOG("unknown IOCTL: 0x%08x\n", cmd);\n err = -ENOIOCTLCMD;\n break;\n\n }\n return err;\n}" (storage_class_specifier) "static" (static) "static" (sized_type_specifier) "long" (long) "long" (function_declarator) "gyro_factory_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)" (identifier) "gyro_factory_unlocked_ioctl" (parameter_list) "(struct file *file, unsigned int cmd, unsigned long arg)" (() "(" (parameter_declaration) "struct file *file" (struct_specifier) "struct file" (struct) "struct" (type_identifier) "file" (pointer_declarator) "*file" (*) "*" (identifier) "file" (,) "," (parameter_declaration) "unsigned int cmd" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "cmd" (,) "," (parameter_declaration) "unsigned long arg" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (identifier) "arg" ()) ")" (compound_statement) "{\n void __user *data;\n long err = 0;\n struct gyro_context *cxt = gyro_context_obj;\n int x,y,z,status;\n char strbuf[256];\n int cali[3] = {0};\n SENSOR_DATA sensor_data = {0};\n int smtRes;\n \n if (_IOC_DIR(cmd) & _IOC_READ)\n {\n err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd));\n }\n else if (_IOC_DIR(cmd) & _IOC_WRITE)\n {\n err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));\n }\n\n if (err)\n {\n GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd));\n return -EFAULT;\n }\n\n switch (cmd)\n {\n case GYROSCOPE_IOCTL_INIT:\n if(cxt->gyro_ctl.enable_nodata!= NULL){\n err = cxt->gyro_ctl.enable_nodata(1);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n GYRO_LOG("GYROSCOPE_IOCTL_INIT\n");\n\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }\n break;\n case GYROSCOPE_IOCTL_SMT_DATA:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n smtRes = 1;\n err = copy_to_user(data, &smtRes, sizeof(smtRes));\n if (err)\n {\n err = -EINVAL;\n GYRO_ERR("copy gyro data to user failed!\n");\n }\n\n break; \n case GYROSCOPE_IOCTL_READ_SENSORDATA:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if(cxt->gyro_data.get_data != NULL){\n err = cxt->gyro_data.get_data(&x, &y, &z, &status);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\n", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\n", strbuf);\n \n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }\n break;\n \n case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if(cxt->gyro_data.get_raw_data != NULL){\n err = cxt->gyro_data.get_raw_data(&x, &y, &z);\n if(err < 0)\n {\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\n", x, y, z);\n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n ");\n }\n break; \n case GYROSCOPE_IOCTL_SET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if (copy_from_user(&sensor_data, data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break; \n }\n cali[0] = sensor_data.x ;\n cali[1] = sensor_data.y ;\n cali[2] = sensor_data.z ;\n GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\n", cali[0], cali[1], cali[2]);\n gyro_set_cali(cali);\n/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(SETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI fail!\n");\n break;\n }\n } \n */\n break;\n\n case GYROSCOPE_IOCTL_CLR_CALI:\n /*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(CLRCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_CLR_CALI fail!\n");\n break;\n }\n } \n */\n gyro_clear_cali();\n break;\n\n case GYROSCOPE_IOCTL_GET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n /*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(GETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI fail!\n");\n break;\n }\n }\n */\n GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\n", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2]);\n sensor_data.x = cxt->cali_sw[0]; ; \n sensor_data.y = cxt->cali_sw[1]; ;\n sensor_data.z = cxt->cali_sw[2]; ;\n if (copy_to_user(data, &sensor_data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break;\n }\n break;\n \n default:\n GYRO_LOG("unknown IOCTL: 0x%08x\n", cmd);\n err = -ENOIOCTLCMD;\n break;\n\n }\n return err;\n}" ({) "{" (declaration) "void __user *data;" (primitive_type) "void" (ERROR) "__user" (identifier) "__user" (pointer_declarator) "*data" (*) "*" (identifier) "data" (;) ";" (declaration) "long err = 0;" (sized_type_specifier) "long" (long) "long" (init_declarator) "err = 0" (identifier) "err" (=) "=" (number_literal) "0" (;) ";" (declaration) "struct gyro_context *cxt = gyro_context_obj;" (struct_specifier) "struct gyro_context" (struct) "struct" (type_identifier) "gyro_context" (init_declarator) "*cxt = gyro_context_obj" (pointer_declarator) "*cxt" (*) "*" (identifier) "cxt" (=) "=" (identifier) "gyro_context_obj" (;) ";" (declaration) "int x,y,z,status;" (primitive_type) "int" (identifier) "x" (,) "," (identifier) "y" (,) "," (identifier) "z" (,) "," (identifier) "status" (;) ";" (declaration) "char strbuf[256];" (primitive_type) "char" (array_declarator) "strbuf[256]" (identifier) "strbuf" ([) "[" (number_literal) "256" (]) "]" (;) ";" (declaration) "int cali[3] = {0};" (primitive_type) "int" (init_declarator) "cali[3] = {0}" (array_declarator) "cali[3]" (identifier) "cali" ([) "[" (number_literal) "3" (]) "]" (=) "=" (initializer_list) "{0}" ({) "{" (number_literal) "0" (}) "}" (;) ";" (declaration) "SENSOR_DATA sensor_data = {0};" (type_identifier) "SENSOR_DATA" (init_declarator) "sensor_data = {0}" (identifier) "sensor_data" (=) "=" (initializer_list) "{0}" ({) "{" (number_literal) "0" (}) "}" (;) ";" (declaration) "int smtRes;" (primitive_type) "int" (identifier) "smtRes" (;) ";" (if_statement) "if (_IOC_DIR(cmd) & _IOC_READ)\n {\n err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd));\n }\n else if (_IOC_DIR(cmd) & _IOC_WRITE)\n {\n err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));\n }" (if) "if" (parenthesized_expression) "(_IOC_DIR(cmd) & _IOC_READ)" (() "(" (binary_expression) "_IOC_DIR(cmd) & _IOC_READ" (call_expression) "_IOC_DIR(cmd)" (identifier) "_IOC_DIR" (argument_list) "(cmd)" (() "(" (identifier) "cmd" ()) ")" (&) "&" (identifier) "_IOC_READ" ()) ")" (compound_statement) "{\n err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd));\n }" ({) "{" (expression_statement) "err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd));" (assignment_expression) "err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd))" (identifier) "err" (=) "=" (unary_expression) "!access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd))" (!) "!" (call_expression) "access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd))" (identifier) "access_ok" (argument_list) "(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd))" (() "(" (identifier) "VERIFY_WRITE" (,) "," (cast_expression) "(void __user *)arg" (() "(" (ERROR) "void" (primitive_type) "void" (type_descriptor) "__user *" (type_identifier) "__user" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "arg" (,) "," (call_expression) "_IOC_SIZE(cmd)" (identifier) "_IOC_SIZE" (argument_list) "(cmd)" (() "(" (identifier) "cmd" ()) ")" ()) ")" (;) ";" (}) "}" (else_clause) "else if (_IOC_DIR(cmd) & _IOC_WRITE)\n {\n err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));\n }" (else) "else" (if_statement) "if (_IOC_DIR(cmd) & _IOC_WRITE)\n {\n err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));\n }" (if) "if" (parenthesized_expression) "(_IOC_DIR(cmd) & _IOC_WRITE)" (() "(" (binary_expression) "_IOC_DIR(cmd) & _IOC_WRITE" (call_expression) "_IOC_DIR(cmd)" (identifier) "_IOC_DIR" (argument_list) "(cmd)" (() "(" (identifier) "cmd" ()) ")" (&) "&" (identifier) "_IOC_WRITE" ()) ")" (compound_statement) "{\n err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));\n }" ({) "{" (expression_statement) "err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));" (assignment_expression) "err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd))" (identifier) "err" (=) "=" (unary_expression) "!access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd))" (!) "!" (call_expression) "access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd))" (identifier) "access_ok" (argument_list) "(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd))" (() "(" (identifier) "VERIFY_READ" (,) "," (cast_expression) "(void __user *)arg" (() "(" (ERROR) "void" (primitive_type) "void" (type_descriptor) "__user *" (type_identifier) "__user" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "arg" (,) "," (call_expression) "_IOC_SIZE(cmd)" (identifier) "_IOC_SIZE" (argument_list) "(cmd)" (() "(" (identifier) "cmd" ()) ")" ()) ")" (;) ";" (}) "}" (if_statement) "if (err)\n {\n GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd));\n return -EFAULT;\n }" (if) "if" (parenthesized_expression) "(err)" (() "(" (identifier) "err" ()) ")" (compound_statement) "{\n GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd));\n return -EFAULT;\n }" ({) "{" (expression_statement) "GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd));" (call_expression) "GYRO_ERR("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd))" (identifier) "GYRO_ERR" (argument_list) "("access error: %08X, (%2d, %2d)\n", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd))" (() "(" (string_literal) ""access error: %08X, (%2d, %2d)\n"" (") """ (string_content) "access error: %08X, (%2d, %2d)" (escape_sequence) "\n" (") """ (,) "," (identifier) "cmd" (,) "," (call_expression) "_IOC_DIR(cmd)" (identifier) "_IOC_DIR" (argument_list) "(cmd)" (() "(" (identifier) "cmd" ()) ")" (,) "," (call_expression) "_IOC_SIZE(cmd)" (identifier) "_IOC_SIZE" (argument_list) "(cmd)" (() "(" (identifier) "cmd" ()) ")" ()) ")" (;) ";" (return_statement) "return -EFAULT;" (return) "return" (unary_expression) "-EFAULT" (-) "-" (identifier) "EFAULT" (;) ";" (}) "}" (switch_statement) "switch (cmd)\n {\n case GYROSCOPE_IOCTL_INIT:\n if(cxt->gyro_ctl.enable_nodata!= NULL){\n err = cxt->gyro_ctl.enable_nodata(1);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n GYRO_LOG("GYROSCOPE_IOCTL_INIT\n");\n\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }\n break;\n case GYROSCOPE_IOCTL_SMT_DATA:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n smtRes = 1;\n err = copy_to_user(data, &smtRes, sizeof(smtRes));\n if (err)\n {\n err = -EINVAL;\n GYRO_ERR("copy gyro data to user failed!\n");\n }\n\n break; \n case GYROSCOPE_IOCTL_READ_SENSORDATA:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if(cxt->gyro_data.get_data != NULL){\n err = cxt->gyro_data.get_data(&x, &y, &z, &status);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\n", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\n", strbuf);\n \n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }\n break;\n \n case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if(cxt->gyro_data.get_raw_data != NULL){\n err = cxt->gyro_data.get_raw_data(&x, &y, &z);\n if(err < 0)\n {\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\n", x, y, z);\n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n ");\n }\n break; \n case GYROSCOPE_IOCTL_SET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if (copy_from_user(&sensor_data, data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break; \n }\n cali[0] = sensor_data.x ;\n cali[1] = sensor_data.y ;\n cali[2] = sensor_data.z ;\n GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\n", cali[0], cali[1], cali[2]);\n gyro_set_cali(cali);\n/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(SETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI fail!\n");\n break;\n }\n } \n */\n break;\n\n case GYROSCOPE_IOCTL_CLR_CALI:\n /*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(CLRCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_CLR_CALI fail!\n");\n break;\n }\n } \n */\n gyro_clear_cali();\n break;\n\n case GYROSCOPE_IOCTL_GET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n /*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(GETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI fail!\n");\n break;\n }\n }\n */\n GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\n", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2]);\n sensor_data.x = cxt->cali_sw[0]; ; \n sensor_data.y = cxt->cali_sw[1]; ;\n sensor_data.z = cxt->cali_sw[2]; ;\n if (copy_to_user(data, &sensor_data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break;\n }\n break;\n \n default:\n GYRO_LOG("unknown IOCTL: 0x%08x\n", cmd);\n err = -ENOIOCTLCMD;\n break;\n\n }" (switch) "switch" (parenthesized_expression) "(cmd)" (() "(" (identifier) "cmd" ()) ")" (compound_statement) "{\n case GYROSCOPE_IOCTL_INIT:\n if(cxt->gyro_ctl.enable_nodata!= NULL){\n err = cxt->gyro_ctl.enable_nodata(1);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n GYRO_LOG("GYROSCOPE_IOCTL_INIT\n");\n\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }\n break;\n case GYROSCOPE_IOCTL_SMT_DATA:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n smtRes = 1;\n err = copy_to_user(data, &smtRes, sizeof(smtRes));\n if (err)\n {\n err = -EINVAL;\n GYRO_ERR("copy gyro data to user failed!\n");\n }\n\n break; \n case GYROSCOPE_IOCTL_READ_SENSORDATA:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if(cxt->gyro_data.get_data != NULL){\n err = cxt->gyro_data.get_data(&x, &y, &z, &status);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\n", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\n", strbuf);\n \n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }\n break;\n \n case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if(cxt->gyro_data.get_raw_data != NULL){\n err = cxt->gyro_data.get_raw_data(&x, &y, &z);\n if(err < 0)\n {\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\n", x, y, z);\n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n ");\n }\n break; \n case GYROSCOPE_IOCTL_SET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if (copy_from_user(&sensor_data, data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break; \n }\n cali[0] = sensor_data.x ;\n cali[1] = sensor_data.y ;\n cali[2] = sensor_data.z ;\n GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\n", cali[0], cali[1], cali[2]);\n gyro_set_cali(cali);\n/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(SETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI fail!\n");\n break;\n }\n } \n */\n break;\n\n case GYROSCOPE_IOCTL_CLR_CALI:\n /*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(CLRCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_CLR_CALI fail!\n");\n break;\n }\n } \n */\n gyro_clear_cali();\n break;\n\n case GYROSCOPE_IOCTL_GET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n /*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(GETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI fail!\n");\n break;\n }\n }\n */\n GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\n", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2]);\n sensor_data.x = cxt->cali_sw[0]; ; \n sensor_data.y = cxt->cali_sw[1]; ;\n sensor_data.z = cxt->cali_sw[2]; ;\n if (copy_to_user(data, &sensor_data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break;\n }\n break;\n \n default:\n GYRO_LOG("unknown IOCTL: 0x%08x\n", cmd);\n err = -ENOIOCTLCMD;\n break;\n\n }" ({) "{" (case_statement) "case GYROSCOPE_IOCTL_INIT:\n if(cxt->gyro_ctl.enable_nodata!= NULL){\n err = cxt->gyro_ctl.enable_nodata(1);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n GYRO_LOG("GYROSCOPE_IOCTL_INIT\n");\n\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }\n break;" (case) "case" (identifier) "GYROSCOPE_IOCTL_INIT" (:) ":" (if_statement) "if(cxt->gyro_ctl.enable_nodata!= NULL){\n err = cxt->gyro_ctl.enable_nodata(1);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n GYRO_LOG("GYROSCOPE_IOCTL_INIT\n");\n\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }" (if) "if" (parenthesized_expression) "(cxt->gyro_ctl.enable_nodata!= NULL)" (() "(" (binary_expression) "cxt->gyro_ctl.enable_nodata!= NULL" (field_expression) "cxt->gyro_ctl.enable_nodata" (field_expression) "cxt->gyro_ctl" (identifier) "cxt" (->) "->" (field_identifier) "gyro_ctl" (.) "." (field_identifier) "enable_nodata" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n err = cxt->gyro_ctl.enable_nodata(1);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n GYRO_LOG("GYROSCOPE_IOCTL_INIT\n");\n\n }" ({) "{" (expression_statement) "err = cxt->gyro_ctl.enable_nodata(1);" (assignment_expression) "err = cxt->gyro_ctl.enable_nodata(1)" (identifier) "err" (=) "=" (call_expression) "cxt->gyro_ctl.enable_nodata(1)" (field_expression) "cxt->gyro_ctl.enable_nodata" (field_expression) "cxt->gyro_ctl" (identifier) "cxt" (->) "->" (field_identifier) "gyro_ctl" (.) "." (field_identifier) "enable_nodata" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (if_statement) "if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }" (if) "if" (parenthesized_expression) "(err < 0)" (() "(" (binary_expression) "err < 0" (identifier) "err" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }" ({) "{" (expression_statement) "GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");" (call_expression) "GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n")" (identifier) "GYRO_LOG" (argument_list) "("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n")" (() "(" (string_literal) ""GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n"" (") """ (string_content) "GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (expression_statement) "GYRO_LOG("GYROSCOPE_IOCTL_INIT\n");" (call_expression) "GYRO_LOG("GYROSCOPE_IOCTL_INIT\n")" (identifier) "GYRO_LOG" (argument_list) "("GYROSCOPE_IOCTL_INIT\n")" (() "(" (string_literal) ""GYROSCOPE_IOCTL_INIT\n"" (") """ (string_content) "GYROSCOPE_IOCTL_INIT" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}" (else_clause) "else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }" (else) "else" (compound_statement) "{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }" ({) "{" (expression_statement) "GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");" (call_expression) "GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ")" (identifier) "GYRO_LOG" (argument_list) "("GYROSCOPE_IOCTL_READ_SENSORDATA ")" (() "(" (string_literal) ""GYROSCOPE_IOCTL_READ_SENSORDATA "" (") """ (string_content) "GYROSCOPE_IOCTL_READ_SENSORDATA " (") """ ()) ")" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case GYROSCOPE_IOCTL_SMT_DATA:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n smtRes = 1;\n err = copy_to_user(data, &smtRes, sizeof(smtRes));\n if (err)\n {\n err = -EINVAL;\n GYRO_ERR("copy gyro data to user failed!\n");\n }\n\n break;" (case) "case" (identifier) "GYROSCOPE_IOCTL_SMT_DATA" (:) ":" (expression_statement) "data = (void __user *) arg;" (assignment_expression) "data = (void __user *) arg" (identifier) "data" (=) "=" (cast_expression) "(void __user *) arg" (() "(" (ERROR) "void" (primitive_type) "void" (type_descriptor) "__user *" (type_identifier) "__user" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "arg" (;) ";" (if_statement) "if (data == NULL)\n {\n err = -EINVAL;\n break; \n }" (if) "if" (parenthesized_expression) "(data == NULL)" (() "(" (binary_expression) "data == NULL" (identifier) "data" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n err = -EINVAL;\n break; \n }" ({) "{" (expression_statement) "err = -EINVAL;" (assignment_expression) "err = -EINVAL" (identifier) "err" (=) "=" (unary_expression) "-EINVAL" (-) "-" (identifier) "EINVAL" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (expression_statement) "smtRes = 1;" (assignment_expression) "smtRes = 1" (identifier) "smtRes" (=) "=" (number_literal) "1" (;) ";" (expression_statement) "err = copy_to_user(data, &smtRes, sizeof(smtRes));" (assignment_expression) "err = copy_to_user(data, &smtRes, sizeof(smtRes))" (identifier) "err" (=) "=" (call_expression) "copy_to_user(data, &smtRes, sizeof(smtRes))" (identifier) "copy_to_user" (argument_list) "(data, &smtRes, sizeof(smtRes))" (() "(" (identifier) "data" (,) "," (pointer_expression) "&smtRes" (&) "&" (identifier) "smtRes" (,) "," (sizeof_expression) "sizeof(smtRes)" (sizeof) "sizeof" (parenthesized_expression) "(smtRes)" (() "(" (identifier) "smtRes" ()) ")" ()) ")" (;) ";" (if_statement) "if (err)\n {\n err = -EINVAL;\n GYRO_ERR("copy gyro data to user failed!\n");\n }" (if) "if" (parenthesized_expression) "(err)" (() "(" (identifier) "err" ()) ")" (compound_statement) "{\n err = -EINVAL;\n GYRO_ERR("copy gyro data to user failed!\n");\n }" ({) "{" (expression_statement) "err = -EINVAL;" (assignment_expression) "err = -EINVAL" (identifier) "err" (=) "=" (unary_expression) "-EINVAL" (-) "-" (identifier) "EINVAL" (;) ";" (expression_statement) "GYRO_ERR("copy gyro data to user failed!\n");" (call_expression) "GYRO_ERR("copy gyro data to user failed!\n")" (identifier) "GYRO_ERR" (argument_list) "("copy gyro data to user failed!\n")" (() "(" (string_literal) ""copy gyro data to user failed!\n"" (") """ (string_content) "copy gyro data to user failed!" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case GYROSCOPE_IOCTL_READ_SENSORDATA:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if(cxt->gyro_data.get_data != NULL){\n err = cxt->gyro_data.get_data(&x, &y, &z, &status);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\n", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\n", strbuf);\n \n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }\n break;" (case) "case" (identifier) "GYROSCOPE_IOCTL_READ_SENSORDATA" (:) ":" (expression_statement) "data = (void __user *) arg;" (assignment_expression) "data = (void __user *) arg" (identifier) "data" (=) "=" (cast_expression) "(void __user *) arg" (() "(" (ERROR) "void" (primitive_type) "void" (type_descriptor) "__user *" (type_identifier) "__user" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "arg" (;) ";" (if_statement) "if (data == NULL)\n {\n err = -EINVAL;\n break; \n }" (if) "if" (parenthesized_expression) "(data == NULL)" (() "(" (binary_expression) "data == NULL" (identifier) "data" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n err = -EINVAL;\n break; \n }" ({) "{" (expression_statement) "err = -EINVAL;" (assignment_expression) "err = -EINVAL" (identifier) "err" (=) "=" (unary_expression) "-EINVAL" (-) "-" (identifier) "EINVAL" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (if_statement) "if(cxt->gyro_data.get_data != NULL){\n err = cxt->gyro_data.get_data(&x, &y, &z, &status);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\n", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\n", strbuf);\n \n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }" (if) "if" (parenthesized_expression) "(cxt->gyro_data.get_data != NULL)" (() "(" (binary_expression) "cxt->gyro_data.get_data != NULL" (field_expression) "cxt->gyro_data.get_data" (field_expression) "cxt->gyro_data" (identifier) "cxt" (->) "->" (field_identifier) "gyro_data" (.) "." (field_identifier) "get_data" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n err = cxt->gyro_data.get_data(&x, &y, &z, &status);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\n", x, y, z);\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\n", strbuf);\n \n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }" ({) "{" (expression_statement) "err = cxt->gyro_data.get_data(&x, &y, &z, &status);" (assignment_expression) "err = cxt->gyro_data.get_data(&x, &y, &z, &status)" (identifier) "err" (=) "=" (call_expression) "cxt->gyro_data.get_data(&x, &y, &z, &status)" (field_expression) "cxt->gyro_data.get_data" (field_expression) "cxt->gyro_data" (identifier) "cxt" (->) "->" (field_identifier) "gyro_data" (.) "." (field_identifier) "get_data" (argument_list) "(&x, &y, &z, &status)" (() "(" (pointer_expression) "&x" (&) "&" (identifier) "x" (,) "," (pointer_expression) "&y" (&) "&" (identifier) "y" (,) "," (pointer_expression) "&z" (&) "&" (identifier) "z" (,) "," (pointer_expression) "&status" (&) "&" (identifier) "status" ()) ")" (;) ";" (if_statement) "if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }" (if) "if" (parenthesized_expression) "(err < 0)" (() "(" (binary_expression) "err < 0" (identifier) "err" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");\n break;\n }" ({) "{" (expression_statement) "GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n");" (call_expression) "GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n")" (identifier) "GYRO_LOG" (argument_list) "("GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n")" (() "(" (string_literal) ""GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\n"" (") """ (string_content) "GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (expression_statement) "x+=cxt->cali_sw[0];" (assignment_expression) "x+=cxt->cali_sw[0]" (identifier) "x" (+=) "+=" (subscript_expression) "cxt->cali_sw[0]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (number_literal) "0" (]) "]" (;) ";" (expression_statement) "y+=cxt->cali_sw[1];" (assignment_expression) "y+=cxt->cali_sw[1]" (identifier) "y" (+=) "+=" (subscript_expression) "cxt->cali_sw[1]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (number_literal) "1" (]) "]" (;) ";" (expression_statement) "z+=cxt->cali_sw[2];" (assignment_expression) "z+=cxt->cali_sw[2]" (identifier) "z" (+=) "+=" (subscript_expression) "cxt->cali_sw[2]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (number_literal) "2" (]) "]" (;) ";" (expression_statement) "sprintf(strbuf, "%x %x %x", x, y, z);" (call_expression) "sprintf(strbuf, "%x %x %x", x, y, z)" (identifier) "sprintf" (argument_list) "(strbuf, "%x %x %x", x, y, z)" (() "(" (identifier) "strbuf" (,) "," (string_literal) ""%x %x %x"" (") """ (string_content) "%x %x %x" (") """ (,) "," (identifier) "x" (,) "," (identifier) "y" (,) "," (identifier) "z" ()) ")" (;) ";" (expression_statement) "GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\n", x, y, z);" (call_expression) "GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\n", x, y, z)" (identifier) "GYRO_LOG" (argument_list) "("GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\n", x, y, z)" (() "(" (string_literal) ""GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\n"" (") """ (string_content) "GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!" (escape_sequence) "\n" (") """ (,) "," (identifier) "x" (,) "," (identifier) "y" (,) "," (identifier) "z" ()) ")" (;) ";" (expression_statement) "GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\n", strbuf);" (call_expression) "GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\n", strbuf)" (identifier) "GYRO_LOG" (argument_list) "("GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\n", strbuf)" (() "(" (string_literal) ""GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\n"" (") """ (string_content) "GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!" (escape_sequence) "\n" (") """ (,) "," (identifier) "strbuf" ()) ")" (;) ";" (if_statement) "if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }" (if) "if" (parenthesized_expression) "(copy_to_user(data, strbuf, strlen(strbuf)+1))" (() "(" (call_expression) "copy_to_user(data, strbuf, strlen(strbuf)+1)" (identifier) "copy_to_user" (argument_list) "(data, strbuf, strlen(strbuf)+1)" (() "(" (identifier) "data" (,) "," (identifier) "strbuf" (,) "," (binary_expression) "strlen(strbuf)+1" (call_expression) "strlen(strbuf)" (identifier) "strlen" (argument_list) "(strbuf)" (() "(" (identifier) "strbuf" ()) ")" (+) "+" (number_literal) "1" ()) ")" ()) ")" (compound_statement) "{\n err = -EFAULT;\n break; \n }" ({) "{" (expression_statement) "err = -EFAULT;" (assignment_expression) "err = -EFAULT" (identifier) "err" (=) "=" (unary_expression) "-EFAULT" (-) "-" (identifier) "EFAULT" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (else_clause) "else{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }" (else) "else" (compound_statement) "{\n GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");\n }" ({) "{" (expression_statement) "GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ");" (call_expression) "GYRO_LOG("GYROSCOPE_IOCTL_READ_SENSORDATA ")" (identifier) "GYRO_LOG" (argument_list) "("GYROSCOPE_IOCTL_READ_SENSORDATA ")" (() "(" (string_literal) ""GYROSCOPE_IOCTL_READ_SENSORDATA "" (") """ (string_content) "GYROSCOPE_IOCTL_READ_SENSORDATA " (") """ ()) ")" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW:\n data = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if(cxt->gyro_data.get_raw_data != NULL){\n err = cxt->gyro_data.get_raw_data(&x, &y, &z);\n if(err < 0)\n {\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\n", x, y, z);\n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n ");\n }\n break;" (case) "case" (identifier) "GYROSCOPE_IOCTL_READ_SENSORDATA_RAW" (:) ":" (expression_statement) "data = (void __user *) arg;" (assignment_expression) "data = (void __user *) arg" (identifier) "data" (=) "=" (cast_expression) "(void __user *) arg" (() "(" (ERROR) "void" (primitive_type) "void" (type_descriptor) "__user *" (type_identifier) "__user" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "arg" (;) ";" (if_statement) "if (data == NULL)\n {\n err = -EINVAL;\n break; \n }" (if) "if" (parenthesized_expression) "(data == NULL)" (() "(" (binary_expression) "data == NULL" (identifier) "data" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n err = -EINVAL;\n break; \n }" ({) "{" (expression_statement) "err = -EINVAL;" (assignment_expression) "err = -EINVAL" (identifier) "err" (=) "=" (unary_expression) "-EINVAL" (-) "-" (identifier) "EINVAL" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (if_statement) "if(cxt->gyro_data.get_raw_data != NULL){\n err = cxt->gyro_data.get_raw_data(&x, &y, &z);\n if(err < 0)\n {\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\n", x, y, z);\n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }else{\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n ");\n }" (if) "if" (parenthesized_expression) "(cxt->gyro_data.get_raw_data != NULL)" (() "(" (binary_expression) "cxt->gyro_data.get_raw_data != NULL" (field_expression) "cxt->gyro_data.get_raw_data" (field_expression) "cxt->gyro_data" (identifier) "cxt" (->) "->" (field_identifier) "gyro_data" (.) "." (field_identifier) "get_raw_data" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n err = cxt->gyro_data.get_raw_data(&x, &y, &z);\n if(err < 0)\n {\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n");\n break;\n }\n x+=cxt->cali_sw[0];\n y+=cxt->cali_sw[1];\n z+=cxt->cali_sw[2];\n sprintf(strbuf, "%x %x %x", x, y, z);\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\n", x, y, z);\n if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }\n }" ({) "{" (expression_statement) "err = cxt->gyro_data.get_raw_data(&x, &y, &z);" (assignment_expression) "err = cxt->gyro_data.get_raw_data(&x, &y, &z)" (identifier) "err" (=) "=" (call_expression) "cxt->gyro_data.get_raw_data(&x, &y, &z)" (field_expression) "cxt->gyro_data.get_raw_data" (field_expression) "cxt->gyro_data" (identifier) "cxt" (->) "->" (field_identifier) "gyro_data" (.) "." (field_identifier) "get_raw_data" (argument_list) "(&x, &y, &z)" (() "(" (pointer_expression) "&x" (&) "&" (identifier) "x" (,) "," (pointer_expression) "&y" (&) "&" (identifier) "y" (,) "," (pointer_expression) "&z" (&) "&" (identifier) "z" ()) ")" (;) ";" (if_statement) "if(err < 0)\n {\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n");\n break;\n }" (if) "if" (parenthesized_expression) "(err < 0)" (() "(" (binary_expression) "err < 0" (identifier) "err" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n");\n break;\n }" ({) "{" (expression_statement) "GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n");" (call_expression) "GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n")" (identifier) "GYRO_LOG" (argument_list) "("GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n")" (() "(" (string_literal) ""GSENSOR_IOCTL_READ_RAW_DATA read data fail!\n"" (") """ (string_content) "GSENSOR_IOCTL_READ_RAW_DATA read data fail!" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (expression_statement) "x+=cxt->cali_sw[0];" (assignment_expression) "x+=cxt->cali_sw[0]" (identifier) "x" (+=) "+=" (subscript_expression) "cxt->cali_sw[0]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (number_literal) "0" (]) "]" (;) ";" (expression_statement) "y+=cxt->cali_sw[1];" (assignment_expression) "y+=cxt->cali_sw[1]" (identifier) "y" (+=) "+=" (subscript_expression) "cxt->cali_sw[1]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (number_literal) "1" (]) "]" (;) ";" (expression_statement) "z+=cxt->cali_sw[2];" (assignment_expression) "z+=cxt->cali_sw[2]" (identifier) "z" (+=) "+=" (subscript_expression) "cxt->cali_sw[2]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (number_literal) "2" (]) "]" (;) ";" (expression_statement) "sprintf(strbuf, "%x %x %x", x, y, z);" (call_expression) "sprintf(strbuf, "%x %x %x", x, y, z)" (identifier) "sprintf" (argument_list) "(strbuf, "%x %x %x", x, y, z)" (() "(" (identifier) "strbuf" (,) "," (string_literal) ""%x %x %x"" (") """ (string_content) "%x %x %x" (") """ (,) "," (identifier) "x" (,) "," (identifier) "y" (,) "," (identifier) "z" ()) ")" (;) ";" (expression_statement) "GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\n", x, y, z);" (call_expression) "GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\n", x, y, z)" (identifier) "GYRO_LOG" (argument_list) "("GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\n", x, y, z)" (() "(" (string_literal) ""GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\n"" (") """ (string_content) "GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!" (escape_sequence) "\n" (") """ (,) "," (identifier) "x" (,) "," (identifier) "y" (,) "," (identifier) "z" ()) ")" (;) ";" (if_statement) "if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n {\n err = -EFAULT;\n break; \n }" (if) "if" (parenthesized_expression) "(copy_to_user(data, strbuf, strlen(strbuf)+1))" (() "(" (call_expression) "copy_to_user(data, strbuf, strlen(strbuf)+1)" (identifier) "copy_to_user" (argument_list) "(data, strbuf, strlen(strbuf)+1)" (() "(" (identifier) "data" (,) "," (identifier) "strbuf" (,) "," (binary_expression) "strlen(strbuf)+1" (call_expression) "strlen(strbuf)" (identifier) "strlen" (argument_list) "(strbuf)" (() "(" (identifier) "strbuf" ()) ")" (+) "+" (number_literal) "1" ()) ")" ()) ")" (compound_statement) "{\n err = -EFAULT;\n break; \n }" ({) "{" (expression_statement) "err = -EFAULT;" (assignment_expression) "err = -EFAULT" (identifier) "err" (=) "=" (unary_expression) "-EFAULT" (-) "-" (identifier) "EFAULT" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (else_clause) "else{\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n ");\n }" (else) "else" (compound_statement) "{\n GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n ");\n }" ({) "{" (expression_statement) "GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n ");" (call_expression) "GYRO_LOG("GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n ")" (identifier) "GYRO_LOG" (argument_list) "("GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n ")" (() "(" (string_literal) ""GSENSOR_IOCTL_READ_RAW_DATA FAIL!\n "" (") """ (string_content) "GSENSOR_IOCTL_READ_RAW_DATA FAIL!" (escape_sequence) "\n" (string_content) " " (") """ ()) ")" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case GYROSCOPE_IOCTL_SET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if (copy_from_user(&sensor_data, data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break; \n }\n cali[0] = sensor_data.x ;\n cali[1] = sensor_data.y ;\n cali[2] = sensor_data.z ;\n GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\n", cali[0], cali[1], cali[2]);\n gyro_set_cali(cali);\n/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(SETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI fail!\n");\n break;\n }\n } \n */\n break;" (case) "case" (identifier) "GYROSCOPE_IOCTL_SET_CALI" (:) ":" (expression_statement) "data = (void __user*)arg;" (assignment_expression) "data = (void __user*)arg" (identifier) "data" (=) "=" (cast_expression) "(void __user*)arg" (() "(" (ERROR) "void" (primitive_type) "void" (type_descriptor) "__user*" (type_identifier) "__user" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "arg" (;) ";" (if_statement) "if (data == NULL)\n {\n err = -EINVAL;\n break; \n }" (if) "if" (parenthesized_expression) "(data == NULL)" (() "(" (binary_expression) "data == NULL" (identifier) "data" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n err = -EINVAL;\n break; \n }" ({) "{" (expression_statement) "err = -EINVAL;" (assignment_expression) "err = -EINVAL" (identifier) "err" (=) "=" (unary_expression) "-EINVAL" (-) "-" (identifier) "EINVAL" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (if_statement) "if (copy_from_user(&sensor_data, data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break; \n }" (if) "if" (parenthesized_expression) "(copy_from_user(&sensor_data, data, sizeof(sensor_data)))" (() "(" (call_expression) "copy_from_user(&sensor_data, data, sizeof(sensor_data))" (identifier) "copy_from_user" (argument_list) "(&sensor_data, data, sizeof(sensor_data))" (() "(" (pointer_expression) "&sensor_data" (&) "&" (identifier) "sensor_data" (,) "," (identifier) "data" (,) "," (sizeof_expression) "sizeof(sensor_data)" (sizeof) "sizeof" (parenthesized_expression) "(sensor_data)" (() "(" (identifier) "sensor_data" ()) ")" ()) ")" ()) ")" (compound_statement) "{\n err = -EFAULT;\n break; \n }" ({) "{" (expression_statement) "err = -EFAULT;" (assignment_expression) "err = -EFAULT" (identifier) "err" (=) "=" (unary_expression) "-EFAULT" (-) "-" (identifier) "EFAULT" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (expression_statement) "cali[0] = sensor_data.x ;" (assignment_expression) "cali[0] = sensor_data.x" (subscript_expression) "cali[0]" (identifier) "cali" ([) "[" (number_literal) "0" (]) "]" (=) "=" (field_expression) "sensor_data.x" (identifier) "sensor_data" (.) "." (field_identifier) "x" (;) ";" (expression_statement) "cali[1] = sensor_data.y ;" (assignment_expression) "cali[1] = sensor_data.y" (subscript_expression) "cali[1]" (identifier) "cali" ([) "[" (number_literal) "1" (]) "]" (=) "=" (field_expression) "sensor_data.y" (identifier) "sensor_data" (.) "." (field_identifier) "y" (;) ";" (expression_statement) "cali[2] = sensor_data.z ;" (assignment_expression) "cali[2] = sensor_data.z" (subscript_expression) "cali[2]" (identifier) "cali" ([) "[" (number_literal) "2" (]) "]" (=) "=" (field_expression) "sensor_data.z" (identifier) "sensor_data" (.) "." (field_identifier) "z" (;) ";" (expression_statement) "GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\n", cali[0], cali[1], cali[2]);" (call_expression) "GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\n", cali[0], cali[1], cali[2])" (identifier) "GYRO_LOG" (argument_list) "("GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\n", cali[0], cali[1], cali[2])" (() "(" (string_literal) ""GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\n"" (") """ (string_content) "GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!" (escape_sequence) "\n" (") """ (,) "," (subscript_expression) "cali[0]" (identifier) "cali" ([) "[" (number_literal) "0" (]) "]" (,) "," (subscript_expression) "cali[1]" (identifier) "cali" ([) "[" (number_literal) "1" (]) "]" (,) "," (subscript_expression) "cali[2]" (identifier) "cali" ([) "[" (number_literal) "2" (]) "]" ()) ")" (;) ";" (expression_statement) "gyro_set_cali(cali);" (call_expression) "gyro_set_cali(cali)" (identifier) "gyro_set_cali" (argument_list) "(cali)" (() "(" (identifier) "cali" ()) ")" (;) ";" (comment) "/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(SETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_SET_CALI fail!\n");\n break;\n }\n } \n */" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case GYROSCOPE_IOCTL_CLR_CALI:\n /*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(CLRCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_CLR_CALI fail!\n");\n break;\n }\n } \n */\n gyro_clear_cali();\n break;" (case) "case" (identifier) "GYROSCOPE_IOCTL_CLR_CALI" (:) ":" (comment) "/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(CLRCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_CLR_CALI fail!\n");\n break;\n }\n } \n */" (expression_statement) "gyro_clear_cali();" (call_expression) "gyro_clear_cali()" (identifier) "gyro_clear_cali" (argument_list) "()" (() "(" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case GYROSCOPE_IOCTL_GET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n /*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(GETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI fail!\n");\n break;\n }\n }\n */\n GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\n", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2]);\n sensor_data.x = cxt->cali_sw[0]; ; \n sensor_data.y = cxt->cali_sw[1]; ;\n sensor_data.z = cxt->cali_sw[2]; ;\n if (copy_to_user(data, &sensor_data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break;\n }\n break;" (case) "case" (identifier) "GYROSCOPE_IOCTL_GET_CALI" (:) ":" (expression_statement) "data = (void __user*)arg;" (assignment_expression) "data = (void __user*)arg" (identifier) "data" (=) "=" (cast_expression) "(void __user*)arg" (() "(" (ERROR) "void" (primitive_type) "void" (type_descriptor) "__user*" (type_identifier) "__user" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "arg" (;) ";" (if_statement) "if (data == NULL)\n {\n err = -EINVAL;\n break; \n }" (if) "if" (parenthesized_expression) "(data == NULL)" (() "(" (binary_expression) "data == NULL" (identifier) "data" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n err = -EINVAL;\n break; \n }" ({) "{" (expression_statement) "err = -EINVAL;" (assignment_expression) "err = -EINVAL" (identifier) "err" (=) "=" (unary_expression) "-EINVAL" (-) "-" (identifier) "EINVAL" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (comment) "/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n {\n err = cxt->gyro_ctl.gyro_calibration(GETCALI, cali);\n if(err < 0)\n {\n GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI fail!\n");\n break;\n }\n }\n */" (expression_statement) "GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\n", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2]);" (call_expression) "GYRO_LOG("GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\n", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2])" (identifier) "GYRO_LOG" (argument_list) "("GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\n", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2])" (() "(" (string_literal) ""GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\n"" (") """ (string_content) "GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!" (escape_sequence) "\n" (") """ (,) "," (subscript_expression) "cxt->cali_sw[0]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (number_literal) "0" (]) "]" (,) "," (subscript_expression) "cxt->cali_sw[1]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (number_literal) "1" (]) "]" (,) "," (subscript_expression) "cxt->cali_sw[2]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (number_literal) "2" (]) "]" ()) ")" (;) ";" (expression_statement) "sensor_data.x = cxt->cali_sw[0];" (assignment_expression) "sensor_data.x = cxt->cali_sw[0]" (field_expression) "sensor_data.x" (identifier) "sensor_data" (.) "." (field_identifier) "x" (=) "=" (subscript_expression) "cxt->cali_sw[0]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (number_literal) "0" (]) "]" (;) ";" (expression_statement) ";" (;) ";" (expression_statement) "sensor_data.y = cxt->cali_sw[1];" (assignment_expression) "sensor_data.y = cxt->cali_sw[1]" (field_expression) "sensor_data.y" (identifier) "sensor_data" (.) "." (field_identifier) "y" (=) "=" (subscript_expression) "cxt->cali_sw[1]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (number_literal) "1" (]) "]" (;) ";" (expression_statement) ";" (;) ";" (expression_statement) "sensor_data.z = cxt->cali_sw[2];" (assignment_expression) "sensor_data.z = cxt->cali_sw[2]" (field_expression) "sensor_data.z" (identifier) "sensor_data" (.) "." (field_identifier) "z" (=) "=" (subscript_expression) "cxt->cali_sw[2]" (field_expression) "cxt->cali_sw" (identifier) "cxt" (->) "->" (field_identifier) "cali_sw" ([) "[" (number_literal) "2" (]) "]" (;) ";" (expression_statement) ";" (;) ";" (if_statement) "if (copy_to_user(data, &sensor_data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break;\n }" (if) "if" (parenthesized_expression) "(copy_to_user(data, &sensor_data, sizeof(sensor_data)))" (() "(" (call_expression) "copy_to_user(data, &sensor_data, sizeof(sensor_data))" (identifier) "copy_to_user" (argument_list) "(data, &sensor_data, sizeof(sensor_data))" (() "(" (identifier) "data" (,) "," (pointer_expression) "&sensor_data" (&) "&" (identifier) "sensor_data" (,) "," (sizeof_expression) "sizeof(sensor_data)" (sizeof) "sizeof" (parenthesized_expression) "(sensor_data)" (() "(" (identifier) "sensor_data" ()) ")" ()) ")" ()) ")" (compound_statement) "{\n err = -EFAULT;\n break;\n }" ({) "{" (expression_statement) "err = -EFAULT;" (assignment_expression) "err = -EFAULT" (identifier) "err" (=) "=" (unary_expression) "-EFAULT" (-) "-" (identifier) "EFAULT" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default:\n GYRO_LOG("unknown IOCTL: 0x%08x\n", cmd);\n err = -ENOIOCTLCMD;\n break;" (default) "default" (:) ":" (expression_statement) "GYRO_LOG("unknown IOCTL: 0x%08x\n", cmd);" (call_expression) "GYRO_LOG("unknown IOCTL: 0x%08x\n", cmd)" (identifier) "GYRO_LOG" (argument_list) "("unknown IOCTL: 0x%08x\n", cmd)" (() "(" (string_literal) ""unknown IOCTL: 0x%08x\n"" (") """ (string_content) "unknown IOCTL: 0x%08x" (escape_sequence) "\n" (") """ (,) "," (identifier) "cmd" ()) ")" (;) ";" (expression_statement) "err = -ENOIOCTLCMD;" (assignment_expression) "err = -ENOIOCTLCMD" (identifier) "err" (=) "=" (unary_expression) "-ENOIOCTLCMD" (-) "-" (identifier) "ENOIOCTLCMD" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (return_statement) "return err;" (return) "return" (identifier) "err" (;) ";" (}) "}" (declaration) "static struct file_operations gyro_factory_fops = {\n .open = gyro_factory_open,\n .release = gyro_factory_release,\n .unlocked_ioctl = gyro_factory_unlocked_ioctl,\n};" (storage_class_specifier) "static" (static) "static" (struct_specifier) "struct file_operations" (struct) "struct" (type_identifier) "file_operations" (init_declarator) "gyro_factory_fops = {\n .open = gyro_factory_open,\n .release = gyro_factory_release,\n .unlocked_ioctl = gyro_factory_unlocked_ioctl,\n}" (identifier) "gyro_factory_fops" (=) "=" (initializer_list) "{\n .open = gyro_factory_open,\n .release = gyro_factory_release,\n .unlocked_ioctl = gyro_factory_unlocked_ioctl,\n}" ({) "{" (initializer_pair) ".open = gyro_factory_open" (field_designator) ".open" (.) "." (field_identifier) "open" (=) "=" (identifier) "gyro_factory_open" (,) "," (initializer_pair) ".release = gyro_factory_release" (field_designator) ".release" (.) "." (field_identifier) "release" (=) "=" (identifier) "gyro_factory_release" (,) "," (initializer_pair) ".unlocked_ioctl = gyro_factory_unlocked_ioctl" (field_designator) ".unlocked_ioctl" (.) "." (field_identifier) "unlocked_ioctl" (=) "=" (identifier) "gyro_factory_unlocked_ioctl" (,) "," (}) "}" (;) ";" (declaration) "static struct miscdevice gyro_factory_device = {\n .minor = MISC_DYNAMIC_MINOR,\n .name = "gyroscope",\n .fops = &gyro_factory_fops,\n};" (storage_class_specifier) "static" (static) "static" (struct_specifier) "struct miscdevice" (struct) "struct" (type_identifier) "miscdevice" (init_declarator) "gyro_factory_device = {\n .minor = MISC_DYNAMIC_MINOR,\n .name = "gyroscope",\n .fops = &gyro_factory_fops,\n}" (identifier) "gyro_factory_device" (=) "=" (initializer_list) "{\n .minor = MISC_DYNAMIC_MINOR,\n .name = "gyroscope",\n .fops = &gyro_factory_fops,\n}" ({) "{" (initializer_pair) ".minor = MISC_DYNAMIC_MINOR" (field_designator) ".minor" (.) "." (field_identifier) "minor" (=) "=" (identifier) "MISC_DYNAMIC_MINOR" (,) "," (initializer_pair) ".name = "gyroscope"" (field_designator) ".name" (.) "." (field_identifier) "name" (=) "=" (string_literal) ""gyroscope"" (") """ (string_content) "gyroscope" (") """ (,) "," (initializer_pair) ".fops = &gyro_factory_fops" (field_designator) ".fops" (.) "." (field_identifier) "fops" (=) "=" (pointer_expression) "&gyro_factory_fops" (&) "&" (identifier) "gyro_factory_fops" (,) "," (}) "}" (;) ";" (function_definition) "int gyro_factory_device_init()\n{\n int error = 0;\n struct gyro_context *cxt = gyro_context_obj;\n\n if (!cxt->gyro_ctl.is_use_common_factory) {\n GYRO_LOG("Node of '/dev/gyroscope' has already existed!\n");\n return -1;\n }\n if ((error = misc_register(&gyro_factory_device)))\n {\n GYRO_LOG("gyro_factory_device register failed\n");\n error = -1;\n } \n return error;\n}" (primitive_type) "int" (function_declarator) "gyro_factory_device_init()" (identifier) "gyro_factory_device_init" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n int error = 0;\n struct gyro_context *cxt = gyro_context_obj;\n\n if (!cxt->gyro_ctl.is_use_common_factory) {\n GYRO_LOG("Node of '/dev/gyroscope' has already existed!\n");\n return -1;\n }\n if ((error = misc_register(&gyro_factory_device)))\n {\n GYRO_LOG("gyro_factory_device register failed\n");\n error = -1;\n } \n return error;\n}" ({) "{" (declaration) "int error = 0;" (primitive_type) "int" (init_declarator) "error = 0" (identifier) "error" (=) "=" (number_literal) "0" (;) ";" (declaration) "struct gyro_context *cxt = gyro_context_obj;" (struct_specifier) "struct gyro_context" (struct) "struct" (type_identifier) "gyro_context" (init_declarator) "*cxt = gyro_context_obj" (pointer_declarator) "*cxt" (*) "*" (identifier) "cxt" (=) "=" (identifier) "gyro_context_obj" (;) ";" (if_statement) "if (!cxt->gyro_ctl.is_use_common_factory) {\n GYRO_LOG("Node of '/dev/gyroscope' has already existed!\n");\n return -1;\n }" (if) "if" (parenthesized_expression) "(!cxt->gyro_ctl.is_use_common_factory)" (() "(" (unary_expression) "!cxt->gyro_ctl.is_use_common_factory" (!) "!" (field_expression) "cxt->gyro_ctl.is_use_common_factory" (field_expression) "cxt->gyro_ctl" (identifier) "cxt" (->) "->" (field_identifier) "gyro_ctl" (.) "." (field_identifier) "is_use_common_factory" ()) ")" (compound_statement) "{\n GYRO_LOG("Node of '/dev/gyroscope' has already existed!\n");\n return -1;\n }" ({) "{" (expression_statement) "GYRO_LOG("Node of '/dev/gyroscope' has already existed!\n");" (call_expression) "GYRO_LOG("Node of '/dev/gyroscope' has already existed!\n")" (identifier) "GYRO_LOG" (argument_list) "("Node of '/dev/gyroscope' has already existed!\n")" (() "(" (string_literal) ""Node of '/dev/gyroscope' has already existed!\n"" (") """ (string_content) "Node of '/dev/gyroscope' has already existed!" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return -1;" (return) "return" (number_literal) "-1" (;) ";" (}) "}" (if_statement) "if ((error = misc_register(&gyro_factory_device)))\n {\n GYRO_LOG("gyro_factory_device register failed\n");\n error = -1;\n }" (if) "if" (parenthesized_expression) "((error = misc_register(&gyro_factory_device)))" (() "(" (parenthesized_expression) "(error = misc_register(&gyro_factory_device))" (() "(" (assignment_expression) "error = misc_register(&gyro_factory_device)" (identifier) "error" (=) "=" (call_expression) "misc_register(&gyro_factory_device)" (identifier) "misc_register" (argument_list) "(&gyro_factory_device)" (() "(" (pointer_expression) "&gyro_factory_device" (&) "&" (identifier) "gyro_factory_device" ()) ")" ()) ")" ()) ")" (compound_statement) "{\n GYRO_LOG("gyro_factory_device register failed\n");\n error = -1;\n }" ({) "{" (expression_statement) "GYRO_LOG("gyro_factory_device register failed\n");" (call_expression) "GYRO_LOG("gyro_factory_device register failed\n")" (identifier) "GYRO_LOG" (argument_list) "("gyro_factory_device register failed\n")" (() "(" (string_literal) ""gyro_factory_device register failed\n"" (") """ (string_content) "gyro_factory_device register failed" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "error = -1;" (assignment_expression) "error = -1" (identifier) "error" (=) "=" (number_literal) "-1" (;) ";" (}) "}" (return_statement) "return error;" (return) "return" (identifier) "error" (;) ";" (}) "}"
1,962
8
{"language": "c", "success": true, "metadata": {"lines": 254, "avg_line_length": 26.63, "nodes": 1130, "errors": 0, "source_hash": "0d4c73b168380f328ce546371aace21d449d852d347dd98d3815e5a140813b93", "categorized_nodes": 804}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"gyro_factory.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": "\"gyro_factory.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 25}}, {"id": 3, "type": "function_definition", "text": "static int gyro_factory_open(struct inode *inode, struct file *file)\n{\n file->private_data = gyro_context_obj;\n\n if (file->private_data == NULL)\n {\n GYRO_ERR(\"null pointer!!\\n\");\n return -EINVAL;\n }\n return nonseekable_open(inode, file);\n}", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "int", "parent": 3, "children": [], "start_point": {"row": 2, "column": 7}, "end_point": {"row": 2, "column": 10}}, {"id": 5, "type": "function_declarator", "text": "gyro_factory_open(struct inode *inode, struct file *file)", "parent": 3, "children": [6, 7], "start_point": {"row": 2, "column": 11}, "end_point": {"row": 2, "column": 68}}, {"id": 6, "type": "identifier", "text": "gyro_factory_open", "parent": 5, "children": [], "start_point": {"row": 2, "column": 11}, "end_point": {"row": 2, "column": 28}}, {"id": 7, "type": "parameter_list", "text": "(struct inode *inode, struct file *file)", "parent": 5, "children": [8, 15], "start_point": {"row": 2, "column": 28}, "end_point": {"row": 2, "column": 68}}, {"id": 8, "type": "parameter_declaration", "text": "struct inode *inode", "parent": 7, "children": [9, 12], "start_point": {"row": 2, "column": 29}, "end_point": {"row": 2, "column": 48}}, {"id": 9, "type": "struct_specifier", "text": "struct inode", "parent": 8, "children": [10, 11], "start_point": {"row": 2, "column": 29}, "end_point": {"row": 2, "column": 41}}, {"id": 10, "type": "struct", "text": "struct", "parent": 9, "children": [], "start_point": {"row": 2, "column": 29}, "end_point": {"row": 2, "column": 35}}, {"id": 11, "type": "type_identifier", "text": "inode", "parent": 9, "children": [], "start_point": {"row": 2, "column": 36}, "end_point": {"row": 2, "column": 41}}, {"id": 12, "type": "pointer_declarator", "text": "*inode", "parent": 8, "children": [13, 14], "start_point": {"row": 2, "column": 42}, "end_point": {"row": 2, "column": 48}}, {"id": 13, "type": "*", "text": "*", "parent": 12, "children": [], "start_point": {"row": 2, "column": 42}, "end_point": {"row": 2, "column": 43}}, {"id": 14, "type": "identifier", "text": "inode", "parent": 12, "children": [], "start_point": {"row": 2, "column": 43}, "end_point": {"row": 2, "column": 48}}, {"id": 15, "type": "parameter_declaration", "text": "struct file *file", "parent": 7, "children": [16, 19], "start_point": {"row": 2, "column": 50}, "end_point": {"row": 2, "column": 67}}, {"id": 16, "type": "struct_specifier", "text": "struct file", "parent": 15, "children": [17, 18], "start_point": {"row": 2, "column": 50}, "end_point": {"row": 2, "column": 61}}, {"id": 17, "type": "struct", "text": "struct", "parent": 16, "children": [], "start_point": {"row": 2, "column": 50}, "end_point": {"row": 2, "column": 56}}, {"id": 18, "type": "type_identifier", "text": "file", "parent": 16, "children": [], "start_point": {"row": 2, "column": 57}, "end_point": {"row": 2, "column": 61}}, {"id": 19, "type": "pointer_declarator", "text": "*file", "parent": 15, "children": [20, 21], "start_point": {"row": 2, "column": 62}, "end_point": {"row": 2, "column": 67}}, {"id": 20, "type": "*", "text": "*", "parent": 19, "children": [], "start_point": {"row": 2, "column": 62}, "end_point": {"row": 2, "column": 63}}, {"id": 21, "type": "identifier", "text": "file", "parent": 19, "children": [], "start_point": {"row": 2, "column": 63}, "end_point": {"row": 2, "column": 67}}, {"id": 22, "type": "assignment_expression", "text": "file->private_data = gyro_context_obj", "parent": 3, "children": [23, 26, 27], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 41}}, {"id": 23, "type": "field_expression", "text": "file->private_data", "parent": 22, "children": [24, 25], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 22}}, {"id": 24, "type": "identifier", "text": "file", "parent": 23, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 8}}, {"id": 25, "type": "field_identifier", "text": "private_data", "parent": 23, "children": [], "start_point": {"row": 4, "column": 10}, "end_point": {"row": 4, "column": 22}}, {"id": 26, "type": "=", "text": "=", "parent": 22, "children": [], "start_point": {"row": 4, "column": 23}, "end_point": {"row": 4, "column": 24}}, {"id": 27, "type": "identifier", "text": "gyro_context_obj", "parent": 22, "children": [], "start_point": {"row": 4, "column": 25}, "end_point": {"row": 4, "column": 41}}, {"id": 28, "type": "if_statement", "text": "if (file->private_data == NULL)\n {\n GYRO_ERR(\"null pointer!!\\n\");\n return -EINVAL;\n }", "parent": 3, "children": [29], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 10, "column": 5}}, {"id": 29, "type": "parenthesized_expression", "text": "(file->private_data == NULL)", "parent": 28, "children": [30], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 35}}, {"id": 30, "type": "binary_expression", "text": "file->private_data == NULL", "parent": 29, "children": [31, 34, 35], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 34}}, {"id": 31, "type": "field_expression", "text": "file->private_data", "parent": 30, "children": [32, 33], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 26}}, {"id": 32, "type": "identifier", "text": "file", "parent": 31, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 12}}, {"id": 33, "type": "field_identifier", "text": "private_data", "parent": 31, "children": [], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 26}}, {"id": 34, "type": "==", "text": "==", "parent": 30, "children": [], "start_point": {"row": 6, "column": 27}, "end_point": {"row": 6, "column": 29}}, {"id": 35, "type": "null", "text": "NULL", "parent": 30, "children": [36], "start_point": {"row": 6, "column": 30}, "end_point": {"row": 6, "column": 34}}, {"id": 36, "type": "NULL", "text": "NULL", "parent": 35, "children": [], "start_point": {"row": 6, "column": 30}, "end_point": {"row": 6, "column": 34}}, {"id": 37, "type": "call_expression", "text": "GYRO_ERR(\"null pointer!!\\n\")", "parent": 28, "children": [38, 39], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 36}}, {"id": 38, "type": "identifier", "text": "GYRO_ERR", "parent": 37, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 16}}, {"id": 39, "type": "argument_list", "text": "(\"null pointer!!\\n\")", "parent": 37, "children": [40], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 36}}, {"id": 40, "type": "string_literal", "text": "\"null pointer!!\\n\"", "parent": 39, "children": [41], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 35}}, {"id": 41, "type": "escape_sequence", "text": "\\n", "parent": 40, "children": [], "start_point": {"row": 8, "column": 32}, "end_point": {"row": 8, "column": 34}}, {"id": 42, "type": "return_statement", "text": "return -EINVAL;", "parent": 28, "children": [43], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 23}}, {"id": 43, "type": "unary_expression", "text": "-EINVAL", "parent": 42, "children": [44, 45], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 22}}, {"id": 44, "type": "-", "text": "-", "parent": 43, "children": [], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 16}}, {"id": 45, "type": "identifier", "text": "EINVAL", "parent": 43, "children": [], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 22}}, {"id": 46, "type": "return_statement", "text": "return nonseekable_open(inode, file);", "parent": 3, "children": [47], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 41}}, {"id": 47, "type": "call_expression", "text": "nonseekable_open(inode, file)", "parent": 46, "children": [48, 49], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 40}}, {"id": 48, "type": "identifier", "text": "nonseekable_open", "parent": 47, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 27}}, {"id": 49, "type": "argument_list", "text": "(inode, file)", "parent": 47, "children": [50, 51], "start_point": {"row": 11, "column": 27}, "end_point": {"row": 11, "column": 40}}, {"id": 50, "type": "identifier", "text": "inode", "parent": 49, "children": [], "start_point": {"row": 11, "column": 28}, "end_point": {"row": 11, "column": 33}}, {"id": 51, "type": "identifier", "text": "file", "parent": 49, "children": [], "start_point": {"row": 11, "column": 35}, "end_point": {"row": 11, "column": 39}}, {"id": 52, "type": "function_definition", "text": "static int gyro_factory_release(struct inode *inode, struct file *file)\n{\n file->private_data = NULL;\n return 0;\n}", "parent": null, "children": [53, 54], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 53, "type": "primitive_type", "text": "int", "parent": 52, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 10}}, {"id": 54, "type": "function_declarator", "text": "gyro_factory_release(struct inode *inode, struct file *file)", "parent": 52, "children": [55, 56], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 71}}, {"id": 55, "type": "identifier", "text": "gyro_factory_release", "parent": 54, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 31}}, {"id": 56, "type": "parameter_list", "text": "(struct inode *inode, struct file *file)", "parent": 54, "children": [57, 64], "start_point": {"row": 14, "column": 31}, "end_point": {"row": 14, "column": 71}}, {"id": 57, "type": "parameter_declaration", "text": "struct inode *inode", "parent": 56, "children": [58, 61], "start_point": {"row": 14, "column": 32}, "end_point": {"row": 14, "column": 51}}, {"id": 58, "type": "struct_specifier", "text": "struct inode", "parent": 57, "children": [59, 60], "start_point": {"row": 14, "column": 32}, "end_point": {"row": 14, "column": 44}}, {"id": 59, "type": "struct", "text": "struct", "parent": 58, "children": [], "start_point": {"row": 14, "column": 32}, "end_point": {"row": 14, "column": 38}}, {"id": 60, "type": "type_identifier", "text": "inode", "parent": 58, "children": [], "start_point": {"row": 14, "column": 39}, "end_point": {"row": 14, "column": 44}}, {"id": 61, "type": "pointer_declarator", "text": "*inode", "parent": 57, "children": [62, 63], "start_point": {"row": 14, "column": 45}, "end_point": {"row": 14, "column": 51}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 14, "column": 45}, "end_point": {"row": 14, "column": 46}}, {"id": 63, "type": "identifier", "text": "inode", "parent": 61, "children": [], "start_point": {"row": 14, "column": 46}, "end_point": {"row": 14, "column": 51}}, {"id": 64, "type": "parameter_declaration", "text": "struct file *file", "parent": 56, "children": [65, 68], "start_point": {"row": 14, "column": 53}, "end_point": {"row": 14, "column": 70}}, {"id": 65, "type": "struct_specifier", "text": "struct file", "parent": 64, "children": [66, 67], "start_point": {"row": 14, "column": 53}, "end_point": {"row": 14, "column": 64}}, {"id": 66, "type": "struct", "text": "struct", "parent": 65, "children": [], "start_point": {"row": 14, "column": 53}, "end_point": {"row": 14, "column": 59}}, {"id": 67, "type": "type_identifier", "text": "file", "parent": 65, "children": [], "start_point": {"row": 14, "column": 60}, "end_point": {"row": 14, "column": 64}}, {"id": 68, "type": "pointer_declarator", "text": "*file", "parent": 64, "children": [69, 70], "start_point": {"row": 14, "column": 65}, "end_point": {"row": 14, "column": 70}}, {"id": 69, "type": "*", "text": "*", "parent": 68, "children": [], "start_point": {"row": 14, "column": 65}, "end_point": {"row": 14, "column": 66}}, {"id": 70, "type": "identifier", "text": "file", "parent": 68, "children": [], "start_point": {"row": 14, "column": 66}, "end_point": {"row": 14, "column": 70}}, {"id": 71, "type": "assignment_expression", "text": "file->private_data = NULL", "parent": 52, "children": [72, 75, 76], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 29}}, {"id": 72, "type": "field_expression", "text": "file->private_data", "parent": 71, "children": [73, 74], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 22}}, {"id": 73, "type": "identifier", "text": "file", "parent": 72, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 8}}, {"id": 74, "type": "field_identifier", "text": "private_data", "parent": 72, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 22}}, {"id": 75, "type": "=", "text": "=", "parent": 71, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 24}}, {"id": 76, "type": "null", "text": "NULL", "parent": 71, "children": [77], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 29}}, {"id": 77, "type": "NULL", "text": "NULL", "parent": 76, "children": [], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 29}}, {"id": 78, "type": "return_statement", "text": "return 0;", "parent": 52, "children": [79], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 13}}, {"id": 79, "type": "number_literal", "text": "0", "parent": 78, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 12}}, {"id": 80, "type": "function_definition", "text": "static int gyro_set_cali(int data[GYRO_AXES_NUM])\n{\n\tstruct gyro_context *cxt = gyro_context_obj;\n\tGYRO_LOG(\" factory gyro cali %d,%d,%d \\n\",data[GYRO_AXIS_X],data[GYRO_AXIS_Y],data[GYRO_AXIS_Z] );\n\tGYRO_LOG(\" original gyro cali %d,%d,%d \\n\",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]);\n\tcxt->cali_sw[GYRO_AXIS_X] += data[GYRO_AXIS_X];\n cxt->cali_sw[GYRO_AXIS_Y] += data[GYRO_AXIS_Y];\n cxt->cali_sw[GYRO_AXIS_Z] += data[GYRO_AXIS_Z];\n\tGYRO_LOG(\" GYRO new cali %d,%d,%d \\n\",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]);\n\n\treturn 0;\n}", "parent": null, "children": [81, 82], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 81, "type": "primitive_type", "text": "int", "parent": 80, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 10}}, {"id": 82, "type": "function_declarator", "text": "gyro_set_cali(int data[GYRO_AXES_NUM])", "parent": 80, "children": [83, 84], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 49}}, {"id": 83, "type": "identifier", "text": "gyro_set_cali", "parent": 82, "children": [], "start_point": {"row": 20, "column": 11}, "end_point": {"row": 20, "column": 24}}, {"id": 84, "type": "parameter_list", "text": "(int data[GYRO_AXES_NUM])", "parent": 82, "children": [85], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 49}}, {"id": 85, "type": "parameter_declaration", "text": "int data[GYRO_AXES_NUM]", "parent": 84, "children": [86, 87], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 48}}, {"id": 86, "type": "primitive_type", "text": "int", "parent": 85, "children": [], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 28}}, {"id": 87, "type": "array_declarator", "text": "data[GYRO_AXES_NUM]", "parent": 85, "children": [88, 89], "start_point": {"row": 20, "column": 29}, "end_point": {"row": 20, "column": 48}}, {"id": 88, "type": "identifier", "text": "data", "parent": 87, "children": [], "start_point": {"row": 20, "column": 29}, "end_point": {"row": 20, "column": 33}}, {"id": 89, "type": "identifier", "text": "GYRO_AXES_NUM", "parent": 87, "children": [], "start_point": {"row": 20, "column": 34}, "end_point": {"row": 20, "column": 47}}, {"id": 90, "type": "declaration", "text": "struct gyro_context *cxt = gyro_context_obj;", "parent": 80, "children": [91, 94], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 45}}, {"id": 91, "type": "struct_specifier", "text": "struct gyro_context", "parent": 90, "children": [92, 93], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 20}}, {"id": 92, "type": "struct", "text": "struct", "parent": 91, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 7}}, {"id": 93, "type": "type_identifier", "text": "gyro_context", "parent": 91, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 20}}, {"id": 94, "type": "init_declarator", "text": "*cxt = gyro_context_obj", "parent": 90, "children": [95, 98, 99], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 44}}, {"id": 95, "type": "pointer_declarator", "text": "*cxt", "parent": 94, "children": [96, 97], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 25}}, {"id": 96, "type": "*", "text": "*", "parent": 95, "children": [], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 22}}, {"id": 97, "type": "identifier", "text": "cxt", "parent": 95, "children": [], "start_point": {"row": 22, "column": 22}, "end_point": {"row": 22, "column": 25}}, {"id": 98, "type": "=", "text": "=", "parent": 94, "children": [], "start_point": {"row": 22, "column": 26}, "end_point": {"row": 22, "column": 27}}, {"id": 99, "type": "identifier", "text": "gyro_context_obj", "parent": 94, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 44}}, {"id": 100, "type": "call_expression", "text": "GYRO_LOG(\" factory gyro cali %d,%d,%d \\n\",data[GYRO_AXIS_X],data[GYRO_AXIS_Y],data[GYRO_AXIS_Z] )", "parent": 80, "children": [101, 102], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 98}}, {"id": 101, "type": "identifier", "text": "GYRO_LOG", "parent": 100, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 9}}, {"id": 102, "type": "argument_list", "text": "(\" factory gyro cali %d,%d,%d \\n\",data[GYRO_AXIS_X],data[GYRO_AXIS_Y],data[GYRO_AXIS_Z] )", "parent": 100, "children": [103, 105, 108, 111], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 98}}, {"id": 103, "type": "string_literal", "text": "\" factory gyro cali %d,%d,%d \\n\"", "parent": 102, "children": [104], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 42}}, {"id": 104, "type": "escape_sequence", "text": "\\n", "parent": 103, "children": [], "start_point": {"row": 23, "column": 39}, "end_point": {"row": 23, "column": 41}}, {"id": 105, "type": "subscript_expression", "text": "data[GYRO_AXIS_X]", "parent": 102, "children": [106, 107], "start_point": {"row": 23, "column": 43}, "end_point": {"row": 23, "column": 60}}, {"id": 106, "type": "identifier", "text": "data", "parent": 105, "children": [], "start_point": {"row": 23, "column": 43}, "end_point": {"row": 23, "column": 47}}, {"id": 107, "type": "identifier", "text": "GYRO_AXIS_X", "parent": 105, "children": [], "start_point": {"row": 23, "column": 48}, "end_point": {"row": 23, "column": 59}}, {"id": 108, "type": "subscript_expression", "text": "data[GYRO_AXIS_Y]", "parent": 102, "children": [109, 110], "start_point": {"row": 23, "column": 61}, "end_point": {"row": 23, "column": 78}}, {"id": 109, "type": "identifier", "text": "data", "parent": 108, "children": [], "start_point": {"row": 23, "column": 61}, "end_point": {"row": 23, "column": 65}}, {"id": 110, "type": "identifier", "text": "GYRO_AXIS_Y", "parent": 108, "children": [], "start_point": {"row": 23, "column": 66}, "end_point": {"row": 23, "column": 77}}, {"id": 111, "type": "subscript_expression", "text": "data[GYRO_AXIS_Z]", "parent": 102, "children": [112, 113], "start_point": {"row": 23, "column": 79}, "end_point": {"row": 23, "column": 96}}, {"id": 112, "type": "identifier", "text": "data", "parent": 111, "children": [], "start_point": {"row": 23, "column": 79}, "end_point": {"row": 23, "column": 83}}, {"id": 113, "type": "identifier", "text": "GYRO_AXIS_Z", "parent": 111, "children": [], "start_point": {"row": 23, "column": 84}, "end_point": {"row": 23, "column": 95}}, {"id": 114, "type": "call_expression", "text": "GYRO_LOG(\" original gyro cali %d,%d,%d \\n\",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z])", "parent": 80, "children": [115, 116], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 123}}, {"id": 115, "type": "identifier", "text": "GYRO_LOG", "parent": 114, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 9}}, {"id": 116, "type": "argument_list", "text": "(\" original gyro cali %d,%d,%d \\n\",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z])", "parent": 114, "children": [117, 119, 124, 129], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 123}}, {"id": 117, "type": "string_literal", "text": "\" original gyro cali %d,%d,%d \\n\"", "parent": 116, "children": [118], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 44}}, {"id": 118, "type": "escape_sequence", "text": "\\n", "parent": 117, "children": [], "start_point": {"row": 24, "column": 41}, "end_point": {"row": 24, "column": 43}}, {"id": 119, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_X]", "parent": 116, "children": [120, 123], "start_point": {"row": 24, "column": 45}, "end_point": {"row": 24, "column": 70}}, {"id": 120, "type": "field_expression", "text": "cxt->cali_sw", "parent": 119, "children": [121, 122], "start_point": {"row": 24, "column": 45}, "end_point": {"row": 24, "column": 57}}, {"id": 121, "type": "identifier", "text": "cxt", "parent": 120, "children": [], "start_point": {"row": 24, "column": 45}, "end_point": {"row": 24, "column": 48}}, {"id": 122, "type": "field_identifier", "text": "cali_sw", "parent": 120, "children": [], "start_point": {"row": 24, "column": 50}, "end_point": {"row": 24, "column": 57}}, {"id": 123, "type": "identifier", "text": "GYRO_AXIS_X", "parent": 119, "children": [], "start_point": {"row": 24, "column": 58}, "end_point": {"row": 24, "column": 69}}, {"id": 124, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_Y]", "parent": 116, "children": [125, 128], "start_point": {"row": 24, "column": 71}, "end_point": {"row": 24, "column": 96}}, {"id": 125, "type": "field_expression", "text": "cxt->cali_sw", "parent": 124, "children": [126, 127], "start_point": {"row": 24, "column": 71}, "end_point": {"row": 24, "column": 83}}, {"id": 126, "type": "identifier", "text": "cxt", "parent": 125, "children": [], "start_point": {"row": 24, "column": 71}, "end_point": {"row": 24, "column": 74}}, {"id": 127, "type": "field_identifier", "text": "cali_sw", "parent": 125, "children": [], "start_point": {"row": 24, "column": 76}, "end_point": {"row": 24, "column": 83}}, {"id": 128, "type": "identifier", "text": "GYRO_AXIS_Y", "parent": 124, "children": [], "start_point": {"row": 24, "column": 84}, "end_point": {"row": 24, "column": 95}}, {"id": 129, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_Z]", "parent": 116, "children": [130, 133], "start_point": {"row": 24, "column": 97}, "end_point": {"row": 24, "column": 122}}, {"id": 130, "type": "field_expression", "text": "cxt->cali_sw", "parent": 129, "children": [131, 132], "start_point": {"row": 24, "column": 97}, "end_point": {"row": 24, "column": 109}}, {"id": 131, "type": "identifier", "text": "cxt", "parent": 130, "children": [], "start_point": {"row": 24, "column": 97}, "end_point": {"row": 24, "column": 100}}, {"id": 132, "type": "field_identifier", "text": "cali_sw", "parent": 130, "children": [], "start_point": {"row": 24, "column": 102}, "end_point": {"row": 24, "column": 109}}, {"id": 133, "type": "identifier", "text": "GYRO_AXIS_Z", "parent": 129, "children": [], "start_point": {"row": 24, "column": 110}, "end_point": {"row": 24, "column": 121}}, {"id": 134, "type": "assignment_expression", "text": "cxt->cali_sw[GYRO_AXIS_X] += data[GYRO_AXIS_X]", "parent": 80, "children": [135, 140, 141], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 47}}, {"id": 135, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_X]", "parent": 134, "children": [136, 139], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 26}}, {"id": 136, "type": "field_expression", "text": "cxt->cali_sw", "parent": 135, "children": [137, 138], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 13}}, {"id": 137, "type": "identifier", "text": "cxt", "parent": 136, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 4}}, {"id": 138, "type": "field_identifier", "text": "cali_sw", "parent": 136, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 13}}, {"id": 139, "type": "identifier", "text": "GYRO_AXIS_X", "parent": 135, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 25}}, {"id": 140, "type": "+=", "text": "+=", "parent": 134, "children": [], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 29}}, {"id": 141, "type": "subscript_expression", "text": "data[GYRO_AXIS_X]", "parent": 134, "children": [142, 143], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 47}}, {"id": 142, "type": "identifier", "text": "data", "parent": 141, "children": [], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 34}}, {"id": 143, "type": "identifier", "text": "GYRO_AXIS_X", "parent": 141, "children": [], "start_point": {"row": 25, "column": 35}, "end_point": {"row": 25, "column": 46}}, {"id": 144, "type": "assignment_expression", "text": "cxt->cali_sw[GYRO_AXIS_Y] += data[GYRO_AXIS_Y]", "parent": 80, "children": [145, 150, 151], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 50}}, {"id": 145, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_Y]", "parent": 144, "children": [146, 149], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 29}}, {"id": 146, "type": "field_expression", "text": "cxt->cali_sw", "parent": 145, "children": [147, 148], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 16}}, {"id": 147, "type": "identifier", "text": "cxt", "parent": 146, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 7}}, {"id": 148, "type": "field_identifier", "text": "cali_sw", "parent": 146, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 16}}, {"id": 149, "type": "identifier", "text": "GYRO_AXIS_Y", "parent": 145, "children": [], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 28}}, {"id": 150, "type": "+=", "text": "+=", "parent": 144, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 32}}, {"id": 151, "type": "subscript_expression", "text": "data[GYRO_AXIS_Y]", "parent": 144, "children": [152, 153], "start_point": {"row": 26, "column": 33}, "end_point": {"row": 26, "column": 50}}, {"id": 152, "type": "identifier", "text": "data", "parent": 151, "children": [], "start_point": {"row": 26, "column": 33}, "end_point": {"row": 26, "column": 37}}, {"id": 153, "type": "identifier", "text": "GYRO_AXIS_Y", "parent": 151, "children": [], "start_point": {"row": 26, "column": 38}, "end_point": {"row": 26, "column": 49}}, {"id": 154, "type": "assignment_expression", "text": "cxt->cali_sw[GYRO_AXIS_Z] += data[GYRO_AXIS_Z]", "parent": 80, "children": [155, 160, 161], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 50}}, {"id": 155, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_Z]", "parent": 154, "children": [156, 159], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 29}}, {"id": 156, "type": "field_expression", "text": "cxt->cali_sw", "parent": 155, "children": [157, 158], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 16}}, {"id": 157, "type": "identifier", "text": "cxt", "parent": 156, "children": [], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 7}}, {"id": 158, "type": "field_identifier", "text": "cali_sw", "parent": 156, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 16}}, {"id": 159, "type": "identifier", "text": "GYRO_AXIS_Z", "parent": 155, "children": [], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 28}}, {"id": 160, "type": "+=", "text": "+=", "parent": 154, "children": [], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 32}}, {"id": 161, "type": "subscript_expression", "text": "data[GYRO_AXIS_Z]", "parent": 154, "children": [162, 163], "start_point": {"row": 27, "column": 33}, "end_point": {"row": 27, "column": 50}}, {"id": 162, "type": "identifier", "text": "data", "parent": 161, "children": [], "start_point": {"row": 27, "column": 33}, "end_point": {"row": 27, "column": 37}}, {"id": 163, "type": "identifier", "text": "GYRO_AXIS_Z", "parent": 161, "children": [], "start_point": {"row": 27, "column": 38}, "end_point": {"row": 27, "column": 49}}, {"id": 164, "type": "call_expression", "text": "GYRO_LOG(\" GYRO new cali %d,%d,%d \\n\",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z])", "parent": 80, "children": [165, 166], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 117}}, {"id": 165, "type": "identifier", "text": "GYRO_LOG", "parent": 164, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 9}}, {"id": 166, "type": "argument_list", "text": "(\" GYRO new cali %d,%d,%d \\n\",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z])", "parent": 164, "children": [167, 169, 174, 179], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 117}}, {"id": 167, "type": "string_literal", "text": "\" GYRO new cali %d,%d,%d \\n\"", "parent": 166, "children": [168], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 38}}, {"id": 168, "type": "escape_sequence", "text": "\\n", "parent": 167, "children": [], "start_point": {"row": 28, "column": 35}, "end_point": {"row": 28, "column": 37}}, {"id": 169, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_X]", "parent": 166, "children": [170, 173], "start_point": {"row": 28, "column": 39}, "end_point": {"row": 28, "column": 64}}, {"id": 170, "type": "field_expression", "text": "cxt->cali_sw", "parent": 169, "children": [171, 172], "start_point": {"row": 28, "column": 39}, "end_point": {"row": 28, "column": 51}}, {"id": 171, "type": "identifier", "text": "cxt", "parent": 170, "children": [], "start_point": {"row": 28, "column": 39}, "end_point": {"row": 28, "column": 42}}, {"id": 172, "type": "field_identifier", "text": "cali_sw", "parent": 170, "children": [], "start_point": {"row": 28, "column": 44}, "end_point": {"row": 28, "column": 51}}, {"id": 173, "type": "identifier", "text": "GYRO_AXIS_X", "parent": 169, "children": [], "start_point": {"row": 28, "column": 52}, "end_point": {"row": 28, "column": 63}}, {"id": 174, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_Y]", "parent": 166, "children": [175, 178], "start_point": {"row": 28, "column": 65}, "end_point": {"row": 28, "column": 90}}, {"id": 175, "type": "field_expression", "text": "cxt->cali_sw", "parent": 174, "children": [176, 177], "start_point": {"row": 28, "column": 65}, "end_point": {"row": 28, "column": 77}}, {"id": 176, "type": "identifier", "text": "cxt", "parent": 175, "children": [], "start_point": {"row": 28, "column": 65}, "end_point": {"row": 28, "column": 68}}, {"id": 177, "type": "field_identifier", "text": "cali_sw", "parent": 175, "children": [], "start_point": {"row": 28, "column": 70}, "end_point": {"row": 28, "column": 77}}, {"id": 178, "type": "identifier", "text": "GYRO_AXIS_Y", "parent": 174, "children": [], "start_point": {"row": 28, "column": 78}, "end_point": {"row": 28, "column": 89}}, {"id": 179, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_Z]", "parent": 166, "children": [180, 183], "start_point": {"row": 28, "column": 91}, "end_point": {"row": 28, "column": 116}}, {"id": 180, "type": "field_expression", "text": "cxt->cali_sw", "parent": 179, "children": [181, 182], "start_point": {"row": 28, "column": 91}, "end_point": {"row": 28, "column": 103}}, {"id": 181, "type": "identifier", "text": "cxt", "parent": 180, "children": [], "start_point": {"row": 28, "column": 91}, "end_point": {"row": 28, "column": 94}}, {"id": 182, "type": "field_identifier", "text": "cali_sw", "parent": 180, "children": [], "start_point": {"row": 28, "column": 96}, "end_point": {"row": 28, "column": 103}}, {"id": 183, "type": "identifier", "text": "GYRO_AXIS_Z", "parent": 179, "children": [], "start_point": {"row": 28, "column": 104}, "end_point": {"row": 28, "column": 115}}, {"id": 184, "type": "return_statement", "text": "return 0;", "parent": 80, "children": [185], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 10}}, {"id": 185, "type": "number_literal", "text": "0", "parent": 184, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 9}}, {"id": 186, "type": "function_definition", "text": "static int gyro_clear_cali(void)\n{\n\tstruct gyro_context *cxt = gyro_context_obj;\n\tcxt->cali_sw[GYRO_AXIS_X] = 0;\n cxt->cali_sw[GYRO_AXIS_Y] = 0;\n cxt->cali_sw[GYRO_AXIS_Z] = 0;\n\tGYRO_LOG(\" GYRO after clear cali %d,%d,%d \\n\",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z] );\n\treturn 0;\n}", "parent": null, "children": [187, 188], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 41, "column": 1}}, {"id": 187, "type": "primitive_type", "text": "int", "parent": 186, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 10}}, {"id": 188, "type": "function_declarator", "text": "gyro_clear_cali(void)", "parent": 186, "children": [189, 190], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 32}}, {"id": 189, "type": "identifier", "text": "gyro_clear_cali", "parent": 188, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 26}}, {"id": 190, "type": "parameter_list", "text": "(void)", "parent": 188, "children": [191], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 32}}, {"id": 191, "type": "parameter_declaration", "text": "void", "parent": 190, "children": [192], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 31}}, {"id": 192, "type": "primitive_type", "text": "void", "parent": 191, "children": [], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 31}}, {"id": 193, "type": "declaration", "text": "struct gyro_context *cxt = gyro_context_obj;", "parent": 186, "children": [194, 197], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 45}}, {"id": 194, "type": "struct_specifier", "text": "struct gyro_context", "parent": 193, "children": [195, 196], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 20}}, {"id": 195, "type": "struct", "text": "struct", "parent": 194, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 7}}, {"id": 196, "type": "type_identifier", "text": "gyro_context", "parent": 194, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 20}}, {"id": 197, "type": "init_declarator", "text": "*cxt = gyro_context_obj", "parent": 193, "children": [198, 201, 202], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 44}}, {"id": 198, "type": "pointer_declarator", "text": "*cxt", "parent": 197, "children": [199, 200], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 25}}, {"id": 199, "type": "*", "text": "*", "parent": 198, "children": [], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 22}}, {"id": 200, "type": "identifier", "text": "cxt", "parent": 198, "children": [], "start_point": {"row": 35, "column": 22}, "end_point": {"row": 35, "column": 25}}, {"id": 201, "type": "=", "text": "=", "parent": 197, "children": [], "start_point": {"row": 35, "column": 26}, "end_point": {"row": 35, "column": 27}}, {"id": 202, "type": "identifier", "text": "gyro_context_obj", "parent": 197, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 44}}, {"id": 203, "type": "assignment_expression", "text": "cxt->cali_sw[GYRO_AXIS_X] = 0", "parent": 186, "children": [204, 209, 210], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 30}}, {"id": 204, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_X]", "parent": 203, "children": [205, 208], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 26}}, {"id": 205, "type": "field_expression", "text": "cxt->cali_sw", "parent": 204, "children": [206, 207], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 13}}, {"id": 206, "type": "identifier", "text": "cxt", "parent": 205, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 4}}, {"id": 207, "type": "field_identifier", "text": "cali_sw", "parent": 205, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 13}}, {"id": 208, "type": "identifier", "text": "GYRO_AXIS_X", "parent": 204, "children": [], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 25}}, {"id": 209, "type": "=", "text": "=", "parent": 203, "children": [], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 28}}, {"id": 210, "type": "number_literal", "text": "0", "parent": 203, "children": [], "start_point": {"row": 36, "column": 29}, "end_point": {"row": 36, "column": 30}}, {"id": 211, "type": "assignment_expression", "text": "cxt->cali_sw[GYRO_AXIS_Y] = 0", "parent": 186, "children": [212, 217, 218], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 33}}, {"id": 212, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_Y]", "parent": 211, "children": [213, 216], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 29}}, {"id": 213, "type": "field_expression", "text": "cxt->cali_sw", "parent": 212, "children": [214, 215], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 16}}, {"id": 214, "type": "identifier", "text": "cxt", "parent": 213, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 7}}, {"id": 215, "type": "field_identifier", "text": "cali_sw", "parent": 213, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 16}}, {"id": 216, "type": "identifier", "text": "GYRO_AXIS_Y", "parent": 212, "children": [], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 28}}, {"id": 217, "type": "=", "text": "=", "parent": 211, "children": [], "start_point": {"row": 37, "column": 30}, "end_point": {"row": 37, "column": 31}}, {"id": 218, "type": "number_literal", "text": "0", "parent": 211, "children": [], "start_point": {"row": 37, "column": 32}, "end_point": {"row": 37, "column": 33}}, {"id": 219, "type": "assignment_expression", "text": "cxt->cali_sw[GYRO_AXIS_Z] = 0", "parent": 186, "children": [220, 225, 226], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 33}}, {"id": 220, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_Z]", "parent": 219, "children": [221, 224], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 29}}, {"id": 221, "type": "field_expression", "text": "cxt->cali_sw", "parent": 220, "children": [222, 223], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 16}}, {"id": 222, "type": "identifier", "text": "cxt", "parent": 221, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 7}}, {"id": 223, "type": "field_identifier", "text": "cali_sw", "parent": 221, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 16}}, {"id": 224, "type": "identifier", "text": "GYRO_AXIS_Z", "parent": 220, "children": [], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 28}}, {"id": 225, "type": "=", "text": "=", "parent": 219, "children": [], "start_point": {"row": 38, "column": 30}, "end_point": {"row": 38, "column": 31}}, {"id": 226, "type": "number_literal", "text": "0", "parent": 219, "children": [], "start_point": {"row": 38, "column": 32}, "end_point": {"row": 38, "column": 33}}, {"id": 227, "type": "call_expression", "text": "GYRO_LOG(\" GYRO after clear cali %d,%d,%d \\n\",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z] )", "parent": 186, "children": [228, 229], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 126}}, {"id": 228, "type": "identifier", "text": "GYRO_LOG", "parent": 227, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 9}}, {"id": 229, "type": "argument_list", "text": "(\" GYRO after clear cali %d,%d,%d \\n\",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z] )", "parent": 227, "children": [230, 232, 237, 242], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 126}}, {"id": 230, "type": "string_literal", "text": "\" GYRO after clear cali %d,%d,%d \\n\"", "parent": 229, "children": [231], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 46}}, {"id": 231, "type": "escape_sequence", "text": "\\n", "parent": 230, "children": [], "start_point": {"row": 39, "column": 43}, "end_point": {"row": 39, "column": 45}}, {"id": 232, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_X]", "parent": 229, "children": [233, 236], "start_point": {"row": 39, "column": 47}, "end_point": {"row": 39, "column": 72}}, {"id": 233, "type": "field_expression", "text": "cxt->cali_sw", "parent": 232, "children": [234, 235], "start_point": {"row": 39, "column": 47}, "end_point": {"row": 39, "column": 59}}, {"id": 234, "type": "identifier", "text": "cxt", "parent": 233, "children": [], "start_point": {"row": 39, "column": 47}, "end_point": {"row": 39, "column": 50}}, {"id": 235, "type": "field_identifier", "text": "cali_sw", "parent": 233, "children": [], "start_point": {"row": 39, "column": 52}, "end_point": {"row": 39, "column": 59}}, {"id": 236, "type": "identifier", "text": "GYRO_AXIS_X", "parent": 232, "children": [], "start_point": {"row": 39, "column": 60}, "end_point": {"row": 39, "column": 71}}, {"id": 237, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_Y]", "parent": 229, "children": [238, 241], "start_point": {"row": 39, "column": 73}, "end_point": {"row": 39, "column": 98}}, {"id": 238, "type": "field_expression", "text": "cxt->cali_sw", "parent": 237, "children": [239, 240], "start_point": {"row": 39, "column": 73}, "end_point": {"row": 39, "column": 85}}, {"id": 239, "type": "identifier", "text": "cxt", "parent": 238, "children": [], "start_point": {"row": 39, "column": 73}, "end_point": {"row": 39, "column": 76}}, {"id": 240, "type": "field_identifier", "text": "cali_sw", "parent": 238, "children": [], "start_point": {"row": 39, "column": 78}, "end_point": {"row": 39, "column": 85}}, {"id": 241, "type": "identifier", "text": "GYRO_AXIS_Y", "parent": 237, "children": [], "start_point": {"row": 39, "column": 86}, "end_point": {"row": 39, "column": 97}}, {"id": 242, "type": "subscript_expression", "text": "cxt->cali_sw[GYRO_AXIS_Z]", "parent": 229, "children": [243, 246], "start_point": {"row": 39, "column": 99}, "end_point": {"row": 39, "column": 124}}, {"id": 243, "type": "field_expression", "text": "cxt->cali_sw", "parent": 242, "children": [244, 245], "start_point": {"row": 39, "column": 99}, "end_point": {"row": 39, "column": 111}}, {"id": 244, "type": "identifier", "text": "cxt", "parent": 243, "children": [], "start_point": {"row": 39, "column": 99}, "end_point": {"row": 39, "column": 102}}, {"id": 245, "type": "field_identifier", "text": "cali_sw", "parent": 243, "children": [], "start_point": {"row": 39, "column": 104}, "end_point": {"row": 39, "column": 111}}, {"id": 246, "type": "identifier", "text": "GYRO_AXIS_Z", "parent": 242, "children": [], "start_point": {"row": 39, "column": 112}, "end_point": {"row": 39, "column": 123}}, {"id": 247, "type": "return_statement", "text": "return 0;", "parent": 186, "children": [248], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 10}}, {"id": 248, "type": "number_literal", "text": "0", "parent": 247, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 9}}, {"id": 249, "type": "function_definition", "text": "static long gyro_factory_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)\n{\n void __user *data;\n long err = 0;\n\tstruct gyro_context *cxt = gyro_context_obj;\n\tint x,y,z,status;\n\tchar strbuf[256];\n int cali[3] = {0};\n SENSOR_DATA sensor_data = {0};\n\tint smtRes;\n\t\n if (_IOC_DIR(cmd) & _IOC_READ)\n {\n err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd));\n }\n else if (_IOC_DIR(cmd) & _IOC_WRITE)\n {\n err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));\n }\n\n if (err)\n {\n GYRO_ERR(\"access error: %08X, (%2d, %2d)\\n\", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd));\n return -EFAULT;\n }\n\n switch (cmd)\n {\n case GYROSCOPE_IOCTL_INIT:\n\t\tif(cxt->gyro_ctl.enable_nodata!= NULL){\n\t\t\terr = cxt->gyro_ctl.enable_nodata(1);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_INIT\\n\");\n\n\t\t}else{\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \");\n\t\t}\n\t break;\n case GYROSCOPE_IOCTL_SMT_DATA:\n\t\tdata = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\tsmtRes = 1;\n err = copy_to_user(data, &smtRes, sizeof(smtRes));\n if (err)\n {\n err = -EINVAL;\n GYRO_ERR(\"copy gyro data to user failed!\\n\");\n }\n\n break; \n case GYROSCOPE_IOCTL_READ_SENSORDATA:\n\t\tdata = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\tif(cxt->gyro_data.get_data != NULL){\n\t\t\terr = cxt->gyro_data.get_data(&x, &y, &z, &status);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx+=cxt->cali_sw[0];\n\t\t\ty+=cxt->cali_sw[1];\n\t\t\tz+=cxt->cali_sw[2];\n\t\t\tsprintf(strbuf, \"%x %x %x\", x, y, z);\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\\n\", x, y, z);\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\\n\", strbuf);\n\t\t\t\n\t if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n\t {\n\t err = -EFAULT;\n\t break; \n\t }\n\t\t}else{\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \");\n\t\t}\n break;\n\t\t\n case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW:\n\t\tdata = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\tif(cxt->gyro_data.get_raw_data != NULL){\n\t\t\terr = cxt->gyro_data.get_raw_data(&x, &y, &z);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx+=cxt->cali_sw[0];\n\t\t\ty+=cxt->cali_sw[1];\n\t\t\tz+=cxt->cali_sw[2];\n\t\t\tsprintf(strbuf, \"%x %x %x\", x, y, z);\n\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\\n\", x, y, z);\n\t if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n\t {\n\t err = -EFAULT;\n\t break; \n\t }\n\t\t}else{\n\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA FAIL!\\n \");\n\t\t}\n break; \n case GYROSCOPE_IOCTL_SET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if (copy_from_user(&sensor_data, data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break; \n }\n cali[0] = sensor_data.x ;\n cali[1] = sensor_data.y ;\n cali[2] = sensor_data.z ;\n\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\\n\", cali[0], cali[1], cali[2]);\n gyro_set_cali(cali);\n/*\n\t\tif(cxt->gyro_ctl.gyro_calibration != NULL)\n\t\t{\n\t\t\terr = cxt->gyro_ctl.gyro_calibration(SETCALI, cali);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_SET_CALI fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} \n\t\t*/\n break;\n\n case GYROSCOPE_IOCTL_CLR_CALI:\n\t\t/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n\t\t{\n\t\t\terr = cxt->gyro_ctl.gyro_calibration(CLRCALI, cali);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_CLR_CALI fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} \n\t\t*/\n\t\tgyro_clear_cali();\n break;\n\n case GYROSCOPE_IOCTL_GET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\t/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n\t\t{\n\t\t\terr = cxt->gyro_ctl.gyro_calibration(GETCALI, cali);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_GET_CALI fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\\n\", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2]);\n sensor_data.x = cxt->cali_sw[0]; ; \n sensor_data.y = cxt->cali_sw[1]; ;\n sensor_data.z = cxt->cali_sw[2]; ;\n if (copy_to_user(data, &sensor_data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break;\n }\n break;\n\t\t\n default:\n GYRO_LOG(\"unknown IOCTL: 0x%08x\\n\", cmd);\n err = -ENOIOCTLCMD;\n break;\n\n }\n return err;\n}", "parent": null, "children": [250, 252], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 241, "column": 1}}, {"id": 250, "type": "sized_type_specifier", "text": "long", "parent": 249, "children": [251], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 11}}, {"id": 251, "type": "long", "text": "long", "parent": 250, "children": [], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 11}}, {"id": 252, "type": "function_declarator", "text": "gyro_factory_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)", "parent": 249, "children": [253, 254], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 95}}, {"id": 253, "type": "identifier", "text": "gyro_factory_unlocked_ioctl", "parent": 252, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 39}}, {"id": 254, "type": "parameter_list", "text": "(struct file *file, unsigned int cmd, unsigned long arg)", "parent": 252, "children": [255, 262, 267], "start_point": {"row": 43, "column": 39}, "end_point": {"row": 43, "column": 95}}, {"id": 255, "type": "parameter_declaration", "text": "struct file *file", "parent": 254, "children": [256, 259], "start_point": {"row": 43, "column": 40}, "end_point": {"row": 43, "column": 57}}, {"id": 256, "type": "struct_specifier", "text": "struct file", "parent": 255, "children": [257, 258], "start_point": {"row": 43, "column": 40}, "end_point": {"row": 43, "column": 51}}, {"id": 257, "type": "struct", "text": "struct", "parent": 256, "children": [], "start_point": {"row": 43, "column": 40}, "end_point": {"row": 43, "column": 46}}, {"id": 258, "type": "type_identifier", "text": "file", "parent": 256, "children": [], "start_point": {"row": 43, "column": 47}, "end_point": {"row": 43, "column": 51}}, {"id": 259, "type": "pointer_declarator", "text": "*file", "parent": 255, "children": [260, 261], "start_point": {"row": 43, "column": 52}, "end_point": {"row": 43, "column": 57}}, {"id": 260, "type": "*", "text": "*", "parent": 259, "children": [], "start_point": {"row": 43, "column": 52}, "end_point": {"row": 43, "column": 53}}, {"id": 261, "type": "identifier", "text": "file", "parent": 259, "children": [], "start_point": {"row": 43, "column": 53}, "end_point": {"row": 43, "column": 57}}, {"id": 262, "type": "parameter_declaration", "text": "unsigned int cmd", "parent": 254, "children": [263, 266], "start_point": {"row": 43, "column": 59}, "end_point": {"row": 43, "column": 75}}, {"id": 263, "type": "sized_type_specifier", "text": "unsigned int", "parent": 262, "children": [264, 265], "start_point": {"row": 43, "column": 59}, "end_point": {"row": 43, "column": 71}}, {"id": 264, "type": "unsigned", "text": "unsigned", "parent": 263, "children": [], "start_point": {"row": 43, "column": 59}, "end_point": {"row": 43, "column": 67}}, {"id": 265, "type": "primitive_type", "text": "int", "parent": 263, "children": [], "start_point": {"row": 43, "column": 68}, "end_point": {"row": 43, "column": 71}}, {"id": 266, "type": "identifier", "text": "cmd", "parent": 262, "children": [], "start_point": {"row": 43, "column": 72}, "end_point": {"row": 43, "column": 75}}, {"id": 267, "type": "parameter_declaration", "text": "unsigned long arg", "parent": 254, "children": [268, 271], "start_point": {"row": 43, "column": 77}, "end_point": {"row": 43, "column": 94}}, {"id": 268, "type": "sized_type_specifier", "text": "unsigned long", "parent": 267, "children": [269, 270], "start_point": {"row": 43, "column": 77}, "end_point": {"row": 43, "column": 90}}, {"id": 269, "type": "unsigned", "text": "unsigned", "parent": 268, "children": [], "start_point": {"row": 43, "column": 77}, "end_point": {"row": 43, "column": 85}}, {"id": 270, "type": "long", "text": "long", "parent": 268, "children": [], "start_point": {"row": 43, "column": 86}, "end_point": {"row": 43, "column": 90}}, {"id": 271, "type": "identifier", "text": "arg", "parent": 267, "children": [], "start_point": {"row": 43, "column": 91}, "end_point": {"row": 43, "column": 94}}, {"id": 272, "type": "declaration", "text": "void __user *data;", "parent": 249, "children": [273, 274, 276], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 22}}, {"id": 273, "type": "primitive_type", "text": "void", "parent": 272, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 8}}, {"id": 274, "type": "ERROR", "text": "__user", "parent": 272, "children": [275], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 15}}, {"id": 275, "type": "identifier", "text": "__user", "parent": 274, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 15}}, {"id": 276, "type": "pointer_declarator", "text": "*data", "parent": 272, "children": [277, 278], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 21}}, {"id": 277, "type": "*", "text": "*", "parent": 276, "children": [], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 17}}, {"id": 278, "type": "identifier", "text": "data", "parent": 276, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 21}}, {"id": 279, "type": "declaration", "text": "long err = 0;", "parent": 249, "children": [280, 282], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 17}}, {"id": 280, "type": "sized_type_specifier", "text": "long", "parent": 279, "children": [281], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 8}}, {"id": 281, "type": "long", "text": "long", "parent": 280, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 8}}, {"id": 282, "type": "init_declarator", "text": "err = 0", "parent": 279, "children": [283, 284, 285], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 16}}, {"id": 283, "type": "identifier", "text": "err", "parent": 282, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 12}}, {"id": 284, "type": "=", "text": "=", "parent": 282, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 14}}, {"id": 285, "type": "number_literal", "text": "0", "parent": 282, "children": [], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 16}}, {"id": 286, "type": "declaration", "text": "struct gyro_context *cxt = gyro_context_obj;", "parent": 249, "children": [287, 290], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 45}}, {"id": 287, "type": "struct_specifier", "text": "struct gyro_context", "parent": 286, "children": [288, 289], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 20}}, {"id": 288, "type": "struct", "text": "struct", "parent": 287, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 7}}, {"id": 289, "type": "type_identifier", "text": "gyro_context", "parent": 287, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 20}}, {"id": 290, "type": "init_declarator", "text": "*cxt = gyro_context_obj", "parent": 286, "children": [291, 294, 295], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 44}}, {"id": 291, "type": "pointer_declarator", "text": "*cxt", "parent": 290, "children": [292, 293], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 25}}, {"id": 292, "type": "*", "text": "*", "parent": 291, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 22}}, {"id": 293, "type": "identifier", "text": "cxt", "parent": 291, "children": [], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 25}}, {"id": 294, "type": "=", "text": "=", "parent": 290, "children": [], "start_point": {"row": 47, "column": 26}, "end_point": {"row": 47, "column": 27}}, {"id": 295, "type": "identifier", "text": "gyro_context_obj", "parent": 290, "children": [], "start_point": {"row": 47, "column": 28}, "end_point": {"row": 47, "column": 44}}, {"id": 296, "type": "declaration", "text": "int x,y,z,status;", "parent": 249, "children": [297, 298, 299, 300, 301], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 18}}, {"id": 297, "type": "primitive_type", "text": "int", "parent": 296, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 4}}, {"id": 298, "type": "identifier", "text": "x", "parent": 296, "children": [], "start_point": {"row": 48, "column": 5}, "end_point": {"row": 48, "column": 6}}, {"id": 299, "type": "identifier", "text": "y", "parent": 296, "children": [], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 8}}, {"id": 300, "type": "identifier", "text": "z", "parent": 296, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 10}}, {"id": 301, "type": "identifier", "text": "status", "parent": 296, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 17}}, {"id": 302, "type": "declaration", "text": "char strbuf[256];", "parent": 249, "children": [303, 304], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 18}}, {"id": 303, "type": "primitive_type", "text": "char", "parent": 302, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 5}}, {"id": 304, "type": "array_declarator", "text": "strbuf[256]", "parent": 302, "children": [305, 306], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 17}}, {"id": 305, "type": "identifier", "text": "strbuf", "parent": 304, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 12}}, {"id": 306, "type": "number_literal", "text": "256", "parent": 304, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 16}}, {"id": 307, "type": "declaration", "text": "int cali[3] = {0};", "parent": 249, "children": [308, 309], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 22}}, {"id": 308, "type": "primitive_type", "text": "int", "parent": 307, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 7}}, {"id": 309, "type": "init_declarator", "text": "cali[3] = {0}", "parent": 307, "children": [310, 313, 314], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 21}}, {"id": 310, "type": "array_declarator", "text": "cali[3]", "parent": 309, "children": [311, 312], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 15}}, {"id": 311, "type": "identifier", "text": "cali", "parent": 310, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 12}}, {"id": 312, "type": "number_literal", "text": "3", "parent": 310, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 14}}, {"id": 313, "type": "=", "text": "=", "parent": 309, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 17}}, {"id": 314, "type": "initializer_list", "text": "{0}", "parent": 309, "children": [315], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 21}}, {"id": 315, "type": "number_literal", "text": "0", "parent": 314, "children": [], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 20}}, {"id": 316, "type": "declaration", "text": "SENSOR_DATA sensor_data = {0};", "parent": 249, "children": [317, 318], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 34}}, {"id": 317, "type": "type_identifier", "text": "SENSOR_DATA", "parent": 316, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 15}}, {"id": 318, "type": "init_declarator", "text": "sensor_data = {0}", "parent": 316, "children": [319, 320, 321], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 33}}, {"id": 319, "type": "identifier", "text": "sensor_data", "parent": 318, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 27}}, {"id": 320, "type": "=", "text": "=", "parent": 318, "children": [], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 29}}, {"id": 321, "type": "initializer_list", "text": "{0}", "parent": 318, "children": [322], "start_point": {"row": 51, "column": 30}, "end_point": {"row": 51, "column": 33}}, {"id": 322, "type": "number_literal", "text": "0", "parent": 321, "children": [], "start_point": {"row": 51, "column": 31}, "end_point": {"row": 51, "column": 32}}, {"id": 323, "type": "declaration", "text": "int smtRes;", "parent": 249, "children": [324, 325], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 12}}, {"id": 324, "type": "primitive_type", "text": "int", "parent": 323, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 4}}, {"id": 325, "type": "identifier", "text": "smtRes", "parent": 323, "children": [], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 11}}, {"id": 326, "type": "if_statement", "text": "if (_IOC_DIR(cmd) & _IOC_READ)\n {\n err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd));\n }\n else if (_IOC_DIR(cmd) & _IOC_WRITE)\n {\n err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));\n }", "parent": 249, "children": [327, 355], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 61, "column": 5}}, {"id": 327, "type": "parenthesized_expression", "text": "(_IOC_DIR(cmd) & _IOC_READ)", "parent": 326, "children": [328], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 34}}, {"id": 328, "type": "binary_expression", "text": "_IOC_DIR(cmd) & _IOC_READ", "parent": 327, "children": [329, 333], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 33}}, {"id": 329, "type": "call_expression", "text": "_IOC_DIR(cmd)", "parent": 328, "children": [330, 331], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 21}}, {"id": 330, "type": "identifier", "text": "_IOC_DIR", "parent": 329, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 16}}, {"id": 331, "type": "argument_list", "text": "(cmd)", "parent": 329, "children": [332], "start_point": {"row": 54, "column": 16}, "end_point": {"row": 54, "column": 21}}, {"id": 332, "type": "identifier", "text": "cmd", "parent": 331, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 20}}, {"id": 333, "type": "identifier", "text": "_IOC_READ", "parent": 328, "children": [], "start_point": {"row": 54, "column": 24}, "end_point": {"row": 54, "column": 33}}, {"id": 334, "type": "assignment_expression", "text": "err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd))", "parent": 326, "children": [335, 336, 337], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 74}}, {"id": 335, "type": "identifier", "text": "err", "parent": 334, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 11}}, {"id": 336, "type": "=", "text": "=", "parent": 334, "children": [], "start_point": {"row": 56, "column": 12}, "end_point": {"row": 56, "column": 13}}, {"id": 337, "type": "unary_expression", "text": "!access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd))", "parent": 334, "children": [338, 339], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 74}}, {"id": 338, "type": "!", "text": "!", "parent": 337, "children": [], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 15}}, {"id": 339, "type": "call_expression", "text": "access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd))", "parent": 337, "children": [340, 341], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 74}}, {"id": 340, "type": "identifier", "text": "access_ok", "parent": 339, "children": [], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 24}}, {"id": 341, "type": "argument_list", "text": "(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd))", "parent": 339, "children": [342, 343, 351], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 74}}, {"id": 342, "type": "identifier", "text": "VERIFY_WRITE", "parent": 341, "children": [], "start_point": {"row": 56, "column": 25}, "end_point": {"row": 56, "column": 37}}, {"id": 343, "type": "cast_expression", "text": "(void __user *)arg", "parent": 341, "children": [344, 346, 350], "start_point": {"row": 56, "column": 39}, "end_point": {"row": 56, "column": 57}}, {"id": 344, "type": "ERROR", "text": "void", "parent": 343, "children": [345], "start_point": {"row": 56, "column": 40}, "end_point": {"row": 56, "column": 44}}, {"id": 345, "type": "primitive_type", "text": "void", "parent": 344, "children": [], "start_point": {"row": 56, "column": 40}, "end_point": {"row": 56, "column": 44}}, {"id": 346, "type": "type_descriptor", "text": "__user *", "parent": 343, "children": [347, 348], "start_point": {"row": 56, "column": 45}, "end_point": {"row": 56, "column": 53}}, {"id": 347, "type": "type_identifier", "text": "__user", "parent": 346, "children": [], "start_point": {"row": 56, "column": 45}, "end_point": {"row": 56, "column": 51}}, {"id": 348, "type": "abstract_pointer_declarator", "text": "*", "parent": 346, "children": [349], "start_point": {"row": 56, "column": 52}, "end_point": {"row": 56, "column": 53}}, {"id": 349, "type": "*", "text": "*", "parent": 348, "children": [], "start_point": {"row": 56, "column": 52}, "end_point": {"row": 56, "column": 53}}, {"id": 350, "type": "identifier", "text": "arg", "parent": 343, "children": [], "start_point": {"row": 56, "column": 54}, "end_point": {"row": 56, "column": 57}}, {"id": 351, "type": "call_expression", "text": "_IOC_SIZE(cmd)", "parent": 341, "children": [352, 353], "start_point": {"row": 56, "column": 59}, "end_point": {"row": 56, "column": 73}}, {"id": 352, "type": "identifier", "text": "_IOC_SIZE", "parent": 351, "children": [], "start_point": {"row": 56, "column": 59}, "end_point": {"row": 56, "column": 68}}, {"id": 353, "type": "argument_list", "text": "(cmd)", "parent": 351, "children": [354], "start_point": {"row": 56, "column": 68}, "end_point": {"row": 56, "column": 73}}, {"id": 354, "type": "identifier", "text": "cmd", "parent": 353, "children": [], "start_point": {"row": 56, "column": 69}, "end_point": {"row": 56, "column": 72}}, {"id": 355, "type": "else_clause", "text": "else if (_IOC_DIR(cmd) & _IOC_WRITE)\n {\n err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));\n }", "parent": 326, "children": [356], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 61, "column": 5}}, {"id": 356, "type": "if_statement", "text": "if (_IOC_DIR(cmd) & _IOC_WRITE)\n {\n err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));\n }", "parent": 355, "children": [357], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 61, "column": 5}}, {"id": 357, "type": "parenthesized_expression", "text": "(_IOC_DIR(cmd) & _IOC_WRITE)", "parent": 356, "children": [358], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 40}}, {"id": 358, "type": "binary_expression", "text": "_IOC_DIR(cmd) & _IOC_WRITE", "parent": 357, "children": [359, 363], "start_point": {"row": 58, "column": 13}, "end_point": {"row": 58, "column": 39}}, {"id": 359, "type": "call_expression", "text": "_IOC_DIR(cmd)", "parent": 358, "children": [360, 361], "start_point": {"row": 58, "column": 13}, "end_point": {"row": 58, "column": 26}}, {"id": 360, "type": "identifier", "text": "_IOC_DIR", "parent": 359, "children": [], "start_point": {"row": 58, "column": 13}, "end_point": {"row": 58, "column": 21}}, {"id": 361, "type": "argument_list", "text": "(cmd)", "parent": 359, "children": [362], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 26}}, {"id": 362, "type": "identifier", "text": "cmd", "parent": 361, "children": [], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 25}}, {"id": 363, "type": "identifier", "text": "_IOC_WRITE", "parent": 358, "children": [], "start_point": {"row": 58, "column": 29}, "end_point": {"row": 58, "column": 39}}, {"id": 364, "type": "assignment_expression", "text": "err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd))", "parent": 356, "children": [365, 366, 367], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 73}}, {"id": 365, "type": "identifier", "text": "err", "parent": 364, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 11}}, {"id": 366, "type": "=", "text": "=", "parent": 364, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 13}}, {"id": 367, "type": "unary_expression", "text": "!access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd))", "parent": 364, "children": [368, 369], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 73}}, {"id": 368, "type": "!", "text": "!", "parent": 367, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 15}}, {"id": 369, "type": "call_expression", "text": "access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd))", "parent": 367, "children": [370, 371], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 73}}, {"id": 370, "type": "identifier", "text": "access_ok", "parent": 369, "children": [], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 24}}, {"id": 371, "type": "argument_list", "text": "(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd))", "parent": 369, "children": [372, 373, 381], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 73}}, {"id": 372, "type": "identifier", "text": "VERIFY_READ", "parent": 371, "children": [], "start_point": {"row": 60, "column": 25}, "end_point": {"row": 60, "column": 36}}, {"id": 373, "type": "cast_expression", "text": "(void __user *)arg", "parent": 371, "children": [374, 376, 380], "start_point": {"row": 60, "column": 38}, "end_point": {"row": 60, "column": 56}}, {"id": 374, "type": "ERROR", "text": "void", "parent": 373, "children": [375], "start_point": {"row": 60, "column": 39}, "end_point": {"row": 60, "column": 43}}, {"id": 375, "type": "primitive_type", "text": "void", "parent": 374, "children": [], "start_point": {"row": 60, "column": 39}, "end_point": {"row": 60, "column": 43}}, {"id": 376, "type": "type_descriptor", "text": "__user *", "parent": 373, "children": [377, 378], "start_point": {"row": 60, "column": 44}, "end_point": {"row": 60, "column": 52}}, {"id": 377, "type": "type_identifier", "text": "__user", "parent": 376, "children": [], "start_point": {"row": 60, "column": 44}, "end_point": {"row": 60, "column": 50}}, {"id": 378, "type": "abstract_pointer_declarator", "text": "*", "parent": 376, "children": [379], "start_point": {"row": 60, "column": 51}, "end_point": {"row": 60, "column": 52}}, {"id": 379, "type": "*", "text": "*", "parent": 378, "children": [], "start_point": {"row": 60, "column": 51}, "end_point": {"row": 60, "column": 52}}, {"id": 380, "type": "identifier", "text": "arg", "parent": 373, "children": [], "start_point": {"row": 60, "column": 53}, "end_point": {"row": 60, "column": 56}}, {"id": 381, "type": "call_expression", "text": "_IOC_SIZE(cmd)", "parent": 371, "children": [382, 383], "start_point": {"row": 60, "column": 58}, "end_point": {"row": 60, "column": 72}}, {"id": 382, "type": "identifier", "text": "_IOC_SIZE", "parent": 381, "children": [], "start_point": {"row": 60, "column": 58}, "end_point": {"row": 60, "column": 67}}, {"id": 383, "type": "argument_list", "text": "(cmd)", "parent": 381, "children": [384], "start_point": {"row": 60, "column": 67}, "end_point": {"row": 60, "column": 72}}, {"id": 384, "type": "identifier", "text": "cmd", "parent": 383, "children": [], "start_point": {"row": 60, "column": 68}, "end_point": {"row": 60, "column": 71}}, {"id": 385, "type": "if_statement", "text": "if (err)\n {\n GYRO_ERR(\"access error: %08X, (%2d, %2d)\\n\", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd));\n return -EFAULT;\n }", "parent": 249, "children": [386], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 67, "column": 5}}, {"id": 386, "type": "parenthesized_expression", "text": "(err)", "parent": 385, "children": [387], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 12}}, {"id": 387, "type": "identifier", "text": "err", "parent": 386, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 11}}, {"id": 388, "type": "call_expression", "text": "GYRO_ERR(\"access error: %08X, (%2d, %2d)\\n\", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd))", "parent": 385, "children": [389, 390], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 88}}, {"id": 389, "type": "identifier", "text": "GYRO_ERR", "parent": 388, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 16}}, {"id": 390, "type": "argument_list", "text": "(\"access error: %08X, (%2d, %2d)\\n\", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd))", "parent": 388, "children": [391, 393, 394, 398], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 88}}, {"id": 391, "type": "string_literal", "text": "\"access error: %08X, (%2d, %2d)\\n\"", "parent": 390, "children": [392], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 51}}, {"id": 392, "type": "escape_sequence", "text": "\\n", "parent": 391, "children": [], "start_point": {"row": 65, "column": 48}, "end_point": {"row": 65, "column": 50}}, {"id": 393, "type": "identifier", "text": "cmd", "parent": 390, "children": [], "start_point": {"row": 65, "column": 53}, "end_point": {"row": 65, "column": 56}}, {"id": 394, "type": "call_expression", "text": "_IOC_DIR(cmd)", "parent": 390, "children": [395, 396], "start_point": {"row": 65, "column": 58}, "end_point": {"row": 65, "column": 71}}, {"id": 395, "type": "identifier", "text": "_IOC_DIR", "parent": 394, "children": [], "start_point": {"row": 65, "column": 58}, "end_point": {"row": 65, "column": 66}}, {"id": 396, "type": "argument_list", "text": "(cmd)", "parent": 394, "children": [397], "start_point": {"row": 65, "column": 66}, "end_point": {"row": 65, "column": 71}}, {"id": 397, "type": "identifier", "text": "cmd", "parent": 396, "children": [], "start_point": {"row": 65, "column": 67}, "end_point": {"row": 65, "column": 70}}, {"id": 398, "type": "call_expression", "text": "_IOC_SIZE(cmd)", "parent": 390, "children": [399, 400], "start_point": {"row": 65, "column": 73}, "end_point": {"row": 65, "column": 87}}, {"id": 399, "type": "identifier", "text": "_IOC_SIZE", "parent": 398, "children": [], "start_point": {"row": 65, "column": 73}, "end_point": {"row": 65, "column": 82}}, {"id": 400, "type": "argument_list", "text": "(cmd)", "parent": 398, "children": [401], "start_point": {"row": 65, "column": 82}, "end_point": {"row": 65, "column": 87}}, {"id": 401, "type": "identifier", "text": "cmd", "parent": 400, "children": [], "start_point": {"row": 65, "column": 83}, "end_point": {"row": 65, "column": 86}}, {"id": 402, "type": "return_statement", "text": "return -EFAULT;", "parent": 385, "children": [403], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 23}}, {"id": 403, "type": "unary_expression", "text": "-EFAULT", "parent": 402, "children": [404, 405], "start_point": {"row": 66, "column": 15}, "end_point": {"row": 66, "column": 22}}, {"id": 404, "type": "-", "text": "-", "parent": 403, "children": [], "start_point": {"row": 66, "column": 15}, "end_point": {"row": 66, "column": 16}}, {"id": 405, "type": "identifier", "text": "EFAULT", "parent": 403, "children": [], "start_point": {"row": 66, "column": 16}, "end_point": {"row": 66, "column": 22}}, {"id": 406, "type": "switch_statement", "text": "switch (cmd)\n {\n case GYROSCOPE_IOCTL_INIT:\n\t\tif(cxt->gyro_ctl.enable_nodata!= NULL){\n\t\t\terr = cxt->gyro_ctl.enable_nodata(1);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_INIT\\n\");\n\n\t\t}else{\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \");\n\t\t}\n\t break;\n case GYROSCOPE_IOCTL_SMT_DATA:\n\t\tdata = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\tsmtRes = 1;\n err = copy_to_user(data, &smtRes, sizeof(smtRes));\n if (err)\n {\n err = -EINVAL;\n GYRO_ERR(\"copy gyro data to user failed!\\n\");\n }\n\n break; \n case GYROSCOPE_IOCTL_READ_SENSORDATA:\n\t\tdata = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\tif(cxt->gyro_data.get_data != NULL){\n\t\t\terr = cxt->gyro_data.get_data(&x, &y, &z, &status);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx+=cxt->cali_sw[0];\n\t\t\ty+=cxt->cali_sw[1];\n\t\t\tz+=cxt->cali_sw[2];\n\t\t\tsprintf(strbuf, \"%x %x %x\", x, y, z);\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\\n\", x, y, z);\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\\n\", strbuf);\n\t\t\t\n\t if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n\t {\n\t err = -EFAULT;\n\t break; \n\t }\n\t\t}else{\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \");\n\t\t}\n break;\n\t\t\n case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW:\n\t\tdata = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\tif(cxt->gyro_data.get_raw_data != NULL){\n\t\t\terr = cxt->gyro_data.get_raw_data(&x, &y, &z);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx+=cxt->cali_sw[0];\n\t\t\ty+=cxt->cali_sw[1];\n\t\t\tz+=cxt->cali_sw[2];\n\t\t\tsprintf(strbuf, \"%x %x %x\", x, y, z);\n\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\\n\", x, y, z);\n\t if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n\t {\n\t err = -EFAULT;\n\t break; \n\t }\n\t\t}else{\n\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA FAIL!\\n \");\n\t\t}\n break; \n case GYROSCOPE_IOCTL_SET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if (copy_from_user(&sensor_data, data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break; \n }\n cali[0] = sensor_data.x ;\n cali[1] = sensor_data.y ;\n cali[2] = sensor_data.z ;\n\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\\n\", cali[0], cali[1], cali[2]);\n gyro_set_cali(cali);\n/*\n\t\tif(cxt->gyro_ctl.gyro_calibration != NULL)\n\t\t{\n\t\t\terr = cxt->gyro_ctl.gyro_calibration(SETCALI, cali);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_SET_CALI fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} \n\t\t*/\n break;\n\n case GYROSCOPE_IOCTL_CLR_CALI:\n\t\t/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n\t\t{\n\t\t\terr = cxt->gyro_ctl.gyro_calibration(CLRCALI, cali);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_CLR_CALI fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} \n\t\t*/\n\t\tgyro_clear_cali();\n break;\n\n case GYROSCOPE_IOCTL_GET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\t/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n\t\t{\n\t\t\terr = cxt->gyro_ctl.gyro_calibration(GETCALI, cali);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_GET_CALI fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\\n\", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2]);\n sensor_data.x = cxt->cali_sw[0]; ; \n sensor_data.y = cxt->cali_sw[1]; ;\n sensor_data.z = cxt->cali_sw[2]; ;\n if (copy_to_user(data, &sensor_data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break;\n }\n break;\n\t\t\n default:\n GYRO_LOG(\"unknown IOCTL: 0x%08x\\n\", cmd);\n err = -ENOIOCTLCMD;\n break;\n\n }", "parent": 249, "children": [407, 408], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 239, "column": 5}}, {"id": 407, "type": "switch", "text": "switch", "parent": 406, "children": [], "start_point": {"row": 69, "column": 4}, "end_point": {"row": 69, "column": 10}}, {"id": 408, "type": "parenthesized_expression", "text": "(cmd)", "parent": 406, "children": [409], "start_point": {"row": 69, "column": 11}, "end_point": {"row": 69, "column": 16}}, {"id": 409, "type": "identifier", "text": "cmd", "parent": 408, "children": [], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 15}}, {"id": 410, "type": "case_statement", "text": "case GYROSCOPE_IOCTL_INIT:\n\t\tif(cxt->gyro_ctl.enable_nodata!= NULL){\n\t\t\terr = cxt->gyro_ctl.enable_nodata(1);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_INIT\\n\");\n\n\t\t}else{\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \");\n\t\t}\n\t break;", "parent": 406, "children": [411, 412, 413, 458], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 84, "column": 11}}, {"id": 411, "type": "case", "text": "case", "parent": 410, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 8}}, {"id": 412, "type": "identifier", "text": "GYROSCOPE_IOCTL_INIT", "parent": 410, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 29}}, {"id": 413, "type": "if_statement", "text": "if(cxt->gyro_ctl.enable_nodata!= NULL){\n\t\t\terr = cxt->gyro_ctl.enable_nodata(1);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_INIT\\n\");\n\n\t\t}else{\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \");\n\t\t}", "parent": 410, "children": [414, 453], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 83, "column": 3}}, {"id": 414, "type": "parenthesized_expression", "text": "(cxt->gyro_ctl.enable_nodata!= NULL)", "parent": 413, "children": [415], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 40}}, {"id": 415, "type": "binary_expression", "text": "cxt->gyro_ctl.enable_nodata!= NULL", "parent": 414, "children": [416, 421, 422], "start_point": {"row": 72, "column": 5}, "end_point": {"row": 72, "column": 39}}, {"id": 416, "type": "field_expression", "text": "cxt->gyro_ctl.enable_nodata", "parent": 415, "children": [417, 420], "start_point": {"row": 72, "column": 5}, "end_point": {"row": 72, "column": 32}}, {"id": 417, "type": "field_expression", "text": "cxt->gyro_ctl", "parent": 416, "children": [418, 419], "start_point": {"row": 72, "column": 5}, "end_point": {"row": 72, "column": 18}}, {"id": 418, "type": "identifier", "text": "cxt", "parent": 417, "children": [], "start_point": {"row": 72, "column": 5}, "end_point": {"row": 72, "column": 8}}, {"id": 419, "type": "field_identifier", "text": "gyro_ctl", "parent": 417, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 18}}, {"id": 420, "type": "field_identifier", "text": "enable_nodata", "parent": 416, "children": [], "start_point": {"row": 72, "column": 19}, "end_point": {"row": 72, "column": 32}}, {"id": 421, "type": "!=", "text": "!=", "parent": 415, "children": [], "start_point": {"row": 72, "column": 32}, "end_point": {"row": 72, "column": 34}}, {"id": 422, "type": "null", "text": "NULL", "parent": 415, "children": [423], "start_point": {"row": 72, "column": 35}, "end_point": {"row": 72, "column": 39}}, {"id": 423, "type": "NULL", "text": "NULL", "parent": 422, "children": [], "start_point": {"row": 72, "column": 35}, "end_point": {"row": 72, "column": 39}}, {"id": 424, "type": "assignment_expression", "text": "err = cxt->gyro_ctl.enable_nodata(1)", "parent": 413, "children": [425, 426, 427], "start_point": {"row": 73, "column": 3}, "end_point": {"row": 73, "column": 39}}, {"id": 425, "type": "identifier", "text": "err", "parent": 424, "children": [], "start_point": {"row": 73, "column": 3}, "end_point": {"row": 73, "column": 6}}, {"id": 426, "type": "=", "text": "=", "parent": 424, "children": [], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 8}}, {"id": 427, "type": "call_expression", "text": "cxt->gyro_ctl.enable_nodata(1)", "parent": 424, "children": [428, 433], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 39}}, {"id": 428, "type": "field_expression", "text": "cxt->gyro_ctl.enable_nodata", "parent": 427, "children": [429, 432], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 36}}, {"id": 429, "type": "field_expression", "text": "cxt->gyro_ctl", "parent": 428, "children": [430, 431], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 22}}, {"id": 430, "type": "identifier", "text": "cxt", "parent": 429, "children": [], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 12}}, {"id": 431, "type": "field_identifier", "text": "gyro_ctl", "parent": 429, "children": [], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 22}}, {"id": 432, "type": "field_identifier", "text": "enable_nodata", "parent": 428, "children": [], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 36}}, {"id": 433, "type": "argument_list", "text": "(1)", "parent": 427, "children": [434], "start_point": {"row": 73, "column": 36}, "end_point": {"row": 73, "column": 39}}, {"id": 434, "type": "number_literal", "text": "1", "parent": 433, "children": [], "start_point": {"row": 73, "column": 37}, "end_point": {"row": 73, "column": 38}}, {"id": 435, "type": "if_statement", "text": "if(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}", "parent": 413, "children": [436], "start_point": {"row": 74, "column": 3}, "end_point": {"row": 78, "column": 4}}, {"id": 436, "type": "parenthesized_expression", "text": "(err < 0)", "parent": 435, "children": [437], "start_point": {"row": 74, "column": 5}, "end_point": {"row": 74, "column": 14}}, {"id": 437, "type": "binary_expression", "text": "err < 0", "parent": 436, "children": [438, 439, 440], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 13}}, {"id": 438, "type": "identifier", "text": "err", "parent": 437, "children": [], "start_point": {"row": 74, "column": 6}, "end_point": {"row": 74, "column": 9}}, {"id": 439, "type": "<", "text": "<", "parent": 437, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 11}}, {"id": 440, "type": "number_literal", "text": "0", "parent": 437, "children": [], "start_point": {"row": 74, "column": 12}, "end_point": {"row": 74, "column": 13}}, {"id": 441, "type": "call_expression", "text": "GYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\")", "parent": 435, "children": [442, 443], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 65}}, {"id": 442, "type": "identifier", "text": "GYRO_LOG", "parent": 441, "children": [], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 12}}, {"id": 443, "type": "argument_list", "text": "(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\")", "parent": 441, "children": [444], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 65}}, {"id": 444, "type": "string_literal", "text": "\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\"", "parent": 443, "children": [445], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 64}}, {"id": 445, "type": "escape_sequence", "text": "\\n", "parent": 444, "children": [], "start_point": {"row": 76, "column": 61}, "end_point": {"row": 76, "column": 63}}, {"id": 446, "type": "break_statement", "text": "break;", "parent": 435, "children": [447], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 10}}, {"id": 447, "type": "break", "text": "break", "parent": 446, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 9}}, {"id": 448, "type": "call_expression", "text": "GYRO_LOG(\"GYROSCOPE_IOCTL_INIT\\n\")", "parent": 413, "children": [449, 450], "start_point": {"row": 79, "column": 3}, "end_point": {"row": 79, "column": 37}}, {"id": 449, "type": "identifier", "text": "GYRO_LOG", "parent": 448, "children": [], "start_point": {"row": 79, "column": 3}, "end_point": {"row": 79, "column": 11}}, {"id": 450, "type": "argument_list", "text": "(\"GYROSCOPE_IOCTL_INIT\\n\")", "parent": 448, "children": [451], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 37}}, {"id": 451, "type": "string_literal", "text": "\"GYROSCOPE_IOCTL_INIT\\n\"", "parent": 450, "children": [452], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 36}}, {"id": 452, "type": "escape_sequence", "text": "\\n", "parent": 451, "children": [], "start_point": {"row": 79, "column": 33}, "end_point": {"row": 79, "column": 35}}, {"id": 453, "type": "else_clause", "text": "else{\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \");\n\t\t}", "parent": 413, "children": [], "start_point": {"row": 81, "column": 3}, "end_point": {"row": 83, "column": 3}}, {"id": 454, "type": "call_expression", "text": "GYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \")", "parent": 453, "children": [455, 456], "start_point": {"row": 82, "column": 3}, "end_point": {"row": 82, "column": 47}}, {"id": 455, "type": "identifier", "text": "GYRO_LOG", "parent": 454, "children": [], "start_point": {"row": 82, "column": 3}, "end_point": {"row": 82, "column": 11}}, {"id": 456, "type": "argument_list", "text": "(\"GYROSCOPE_IOCTL_READ_SENSORDATA \")", "parent": 454, "children": [457], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 47}}, {"id": 457, "type": "string_literal", "text": "\"GYROSCOPE_IOCTL_READ_SENSORDATA \"", "parent": 456, "children": [], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 46}}, {"id": 458, "type": "break_statement", "text": "break;", "parent": 410, "children": [459], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 11}}, {"id": 459, "type": "break", "text": "break", "parent": 458, "children": [], "start_point": {"row": 84, "column": 5}, "end_point": {"row": 84, "column": 10}}, {"id": 460, "type": "case_statement", "text": "case GYROSCOPE_IOCTL_SMT_DATA:\n\t\tdata = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\tsmtRes = 1;\n err = copy_to_user(data, &smtRes, sizeof(smtRes));\n if (err)\n {\n err = -EINVAL;\n GYRO_ERR(\"copy gyro data to user failed!\\n\");\n }\n\n break;", "parent": 406, "children": [461, 462, 474, 505, 519], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 100, "column": 14}}, {"id": 461, "type": "case", "text": "case", "parent": 460, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 8}}, {"id": 462, "type": "identifier", "text": "GYROSCOPE_IOCTL_SMT_DATA", "parent": 460, "children": [], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 33}}, {"id": 463, "type": "assignment_expression", "text": "data = (void __user *) arg", "parent": 460, "children": [464, 465, 466], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 28}}, {"id": 464, "type": "identifier", "text": "data", "parent": 463, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 6}}, {"id": 465, "type": "=", "text": "=", "parent": 463, "children": [], "start_point": {"row": 86, "column": 7}, "end_point": {"row": 86, "column": 8}}, {"id": 466, "type": "cast_expression", "text": "(void __user *) arg", "parent": 463, "children": [467, 469, 473], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 28}}, {"id": 467, "type": "ERROR", "text": "void", "parent": 466, "children": [468], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 86, "column": 14}}, {"id": 468, "type": "primitive_type", "text": "void", "parent": 467, "children": [], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 86, "column": 14}}, {"id": 469, "type": "type_descriptor", "text": "__user *", "parent": 466, "children": [470, 471], "start_point": {"row": 86, "column": 15}, "end_point": {"row": 86, "column": 23}}, {"id": 470, "type": "type_identifier", "text": "__user", "parent": 469, "children": [], "start_point": {"row": 86, "column": 15}, "end_point": {"row": 86, "column": 21}}, {"id": 471, "type": "abstract_pointer_declarator", "text": "*", "parent": 469, "children": [472], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 23}}, {"id": 472, "type": "*", "text": "*", "parent": 471, "children": [], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 23}}, {"id": 473, "type": "identifier", "text": "arg", "parent": 466, "children": [], "start_point": {"row": 86, "column": 25}, "end_point": {"row": 86, "column": 28}}, {"id": 474, "type": "if_statement", "text": "if (data == NULL)\n {\n err = -EINVAL;\n break; \n }", "parent": 460, "children": [475], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 91, "column": 9}}, {"id": 475, "type": "parenthesized_expression", "text": "(data == NULL)", "parent": 474, "children": [476], "start_point": {"row": 87, "column": 11}, "end_point": {"row": 87, "column": 25}}, {"id": 476, "type": "binary_expression", "text": "data == NULL", "parent": 475, "children": [477, 478, 479], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 24}}, {"id": 477, "type": "identifier", "text": "data", "parent": 476, "children": [], "start_point": {"row": 87, "column": 12}, "end_point": {"row": 87, "column": 16}}, {"id": 478, "type": "==", "text": "==", "parent": 476, "children": [], "start_point": {"row": 87, "column": 17}, "end_point": {"row": 87, "column": 19}}, {"id": 479, "type": "null", "text": "NULL", "parent": 476, "children": [480], "start_point": {"row": 87, "column": 20}, "end_point": {"row": 87, "column": 24}}, {"id": 480, "type": "NULL", "text": "NULL", "parent": 479, "children": [], "start_point": {"row": 87, "column": 20}, "end_point": {"row": 87, "column": 24}}, {"id": 481, "type": "assignment_expression", "text": "err = -EINVAL", "parent": 474, "children": [482, 483, 484], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 89, "column": 25}}, {"id": 482, "type": "identifier", "text": "err", "parent": 481, "children": [], "start_point": {"row": 89, "column": 12}, "end_point": {"row": 89, "column": 15}}, {"id": 483, "type": "=", "text": "=", "parent": 481, "children": [], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 17}}, {"id": 484, "type": "unary_expression", "text": "-EINVAL", "parent": 481, "children": [485, 486], "start_point": {"row": 89, "column": 18}, "end_point": {"row": 89, "column": 25}}, {"id": 485, "type": "-", "text": "-", "parent": 484, "children": [], "start_point": {"row": 89, "column": 18}, "end_point": {"row": 89, "column": 19}}, {"id": 486, "type": "identifier", "text": "EINVAL", "parent": 484, "children": [], "start_point": {"row": 89, "column": 19}, "end_point": {"row": 89, "column": 25}}, {"id": 487, "type": "break_statement", "text": "break;", "parent": 474, "children": [488], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 18}}, {"id": 488, "type": "break", "text": "break", "parent": 487, "children": [], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 17}}, {"id": 489, "type": "assignment_expression", "text": "smtRes = 1", "parent": 460, "children": [490, 491, 492], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 12}}, {"id": 490, "type": "identifier", "text": "smtRes", "parent": 489, "children": [], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 8}}, {"id": 491, "type": "=", "text": "=", "parent": 489, "children": [], "start_point": {"row": 92, "column": 9}, "end_point": {"row": 92, "column": 10}}, {"id": 492, "type": "number_literal", "text": "1", "parent": 489, "children": [], "start_point": {"row": 92, "column": 11}, "end_point": {"row": 92, "column": 12}}, {"id": 493, "type": "assignment_expression", "text": "err = copy_to_user(data, &smtRes, sizeof(smtRes))", "parent": 460, "children": [494, 495, 496], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 58}}, {"id": 494, "type": "identifier", "text": "err", "parent": 493, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 11}}, {"id": 495, "type": "=", "text": "=", "parent": 493, "children": [], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 93, "column": 13}}, {"id": 496, "type": "call_expression", "text": "copy_to_user(data, &smtRes, sizeof(smtRes))", "parent": 493, "children": [497, 498], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 58}}, {"id": 497, "type": "identifier", "text": "copy_to_user", "parent": 496, "children": [], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 26}}, {"id": 498, "type": "argument_list", "text": "(data, &smtRes, sizeof(smtRes))", "parent": 496, "children": [499, 500, 502], "start_point": {"row": 93, "column": 26}, "end_point": {"row": 93, "column": 58}}, {"id": 499, "type": "identifier", "text": "data", "parent": 498, "children": [], "start_point": {"row": 93, "column": 27}, "end_point": {"row": 93, "column": 31}}, {"id": 500, "type": "pointer_expression", "text": "&smtRes", "parent": 498, "children": [501], "start_point": {"row": 93, "column": 33}, "end_point": {"row": 93, "column": 40}}, {"id": 501, "type": "identifier", "text": "smtRes", "parent": 500, "children": [], "start_point": {"row": 93, "column": 34}, "end_point": {"row": 93, "column": 40}}, {"id": 502, "type": "sizeof_expression", "text": "sizeof(smtRes)", "parent": 498, "children": [503], "start_point": {"row": 93, "column": 43}, "end_point": {"row": 93, "column": 57}}, {"id": 503, "type": "parenthesized_expression", "text": "(smtRes)", "parent": 502, "children": [504], "start_point": {"row": 93, "column": 49}, "end_point": {"row": 93, "column": 57}}, {"id": 504, "type": "identifier", "text": "smtRes", "parent": 503, "children": [], "start_point": {"row": 93, "column": 50}, "end_point": {"row": 93, "column": 56}}, {"id": 505, "type": "if_statement", "text": "if (err)\n {\n err = -EINVAL;\n GYRO_ERR(\"copy gyro data to user failed!\\n\");\n }", "parent": 460, "children": [506], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 98, "column": 9}}, {"id": 506, "type": "parenthesized_expression", "text": "(err)", "parent": 505, "children": [507], "start_point": {"row": 94, "column": 11}, "end_point": {"row": 94, "column": 16}}, {"id": 507, "type": "identifier", "text": "err", "parent": 506, "children": [], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 15}}, {"id": 508, "type": "assignment_expression", "text": "err = -EINVAL", "parent": 505, "children": [509, 510, 511], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 25}}, {"id": 509, "type": "identifier", "text": "err", "parent": 508, "children": [], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 15}}, {"id": 510, "type": "=", "text": "=", "parent": 508, "children": [], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 17}}, {"id": 511, "type": "unary_expression", "text": "-EINVAL", "parent": 508, "children": [512, 513], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 25}}, {"id": 512, "type": "-", "text": "-", "parent": 511, "children": [], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 19}}, {"id": 513, "type": "identifier", "text": "EINVAL", "parent": 511, "children": [], "start_point": {"row": 96, "column": 19}, "end_point": {"row": 96, "column": 25}}, {"id": 514, "type": "call_expression", "text": "GYRO_ERR(\"copy gyro data to user failed!\\n\")", "parent": 505, "children": [515, 516], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 56}}, {"id": 515, "type": "identifier", "text": "GYRO_ERR", "parent": 514, "children": [], "start_point": {"row": 97, "column": 12}, "end_point": {"row": 97, "column": 20}}, {"id": 516, "type": "argument_list", "text": "(\"copy gyro data to user failed!\\n\")", "parent": 514, "children": [517], "start_point": {"row": 97, "column": 20}, "end_point": {"row": 97, "column": 56}}, {"id": 517, "type": "string_literal", "text": "\"copy gyro data to user failed!\\n\"", "parent": 516, "children": [518], "start_point": {"row": 97, "column": 21}, "end_point": {"row": 97, "column": 55}}, {"id": 518, "type": "escape_sequence", "text": "\\n", "parent": 517, "children": [], "start_point": {"row": 97, "column": 52}, "end_point": {"row": 97, "column": 54}}, {"id": 519, "type": "break_statement", "text": "break;", "parent": 460, "children": [520], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 14}}, {"id": 520, "type": "break", "text": "break", "parent": 519, "children": [], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 13}}, {"id": 521, "type": "case_statement", "text": "case GYROSCOPE_IOCTL_READ_SENSORDATA:\n\t\tdata = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\tif(cxt->gyro_data.get_data != NULL){\n\t\t\terr = cxt->gyro_data.get_data(&x, &y, &z, &status);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx+=cxt->cali_sw[0];\n\t\t\ty+=cxt->cali_sw[1];\n\t\t\tz+=cxt->cali_sw[2];\n\t\t\tsprintf(strbuf, \"%x %x %x\", x, y, z);\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\\n\", x, y, z);\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\\n\", strbuf);\n\t\t\t\n\t if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n\t {\n\t err = -EFAULT;\n\t break; \n\t }\n\t\t}else{\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \");\n\t\t}\n break;", "parent": 406, "children": [522, 523, 535, 550, 665], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 130, "column": 14}}, {"id": 522, "type": "case", "text": "case", "parent": 521, "children": [], "start_point": {"row": 101, "column": 4}, "end_point": {"row": 101, "column": 8}}, {"id": 523, "type": "identifier", "text": "GYROSCOPE_IOCTL_READ_SENSORDATA", "parent": 521, "children": [], "start_point": {"row": 101, "column": 9}, "end_point": {"row": 101, "column": 40}}, {"id": 524, "type": "assignment_expression", "text": "data = (void __user *) arg", "parent": 521, "children": [525, 526, 527], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 28}}, {"id": 525, "type": "identifier", "text": "data", "parent": 524, "children": [], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 6}}, {"id": 526, "type": "=", "text": "=", "parent": 524, "children": [], "start_point": {"row": 102, "column": 7}, "end_point": {"row": 102, "column": 8}}, {"id": 527, "type": "cast_expression", "text": "(void __user *) arg", "parent": 524, "children": [528, 530, 534], "start_point": {"row": 102, "column": 9}, "end_point": {"row": 102, "column": 28}}, {"id": 528, "type": "ERROR", "text": "void", "parent": 527, "children": [529], "start_point": {"row": 102, "column": 10}, "end_point": {"row": 102, "column": 14}}, {"id": 529, "type": "primitive_type", "text": "void", "parent": 528, "children": [], "start_point": {"row": 102, "column": 10}, "end_point": {"row": 102, "column": 14}}, {"id": 530, "type": "type_descriptor", "text": "__user *", "parent": 527, "children": [531, 532], "start_point": {"row": 102, "column": 15}, "end_point": {"row": 102, "column": 23}}, {"id": 531, "type": "type_identifier", "text": "__user", "parent": 530, "children": [], "start_point": {"row": 102, "column": 15}, "end_point": {"row": 102, "column": 21}}, {"id": 532, "type": "abstract_pointer_declarator", "text": "*", "parent": 530, "children": [533], "start_point": {"row": 102, "column": 22}, "end_point": {"row": 102, "column": 23}}, {"id": 533, "type": "*", "text": "*", "parent": 532, "children": [], "start_point": {"row": 102, "column": 22}, "end_point": {"row": 102, "column": 23}}, {"id": 534, "type": "identifier", "text": "arg", "parent": 527, "children": [], "start_point": {"row": 102, "column": 25}, "end_point": {"row": 102, "column": 28}}, {"id": 535, "type": "if_statement", "text": "if (data == NULL)\n {\n err = -EINVAL;\n break; \n }", "parent": 521, "children": [536], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 107, "column": 9}}, {"id": 536, "type": "parenthesized_expression", "text": "(data == NULL)", "parent": 535, "children": [537], "start_point": {"row": 103, "column": 11}, "end_point": {"row": 103, "column": 25}}, {"id": 537, "type": "binary_expression", "text": "data == NULL", "parent": 536, "children": [538, 539, 540], "start_point": {"row": 103, "column": 12}, "end_point": {"row": 103, "column": 24}}, {"id": 538, "type": "identifier", "text": "data", "parent": 537, "children": [], "start_point": {"row": 103, "column": 12}, "end_point": {"row": 103, "column": 16}}, {"id": 539, "type": "==", "text": "==", "parent": 537, "children": [], "start_point": {"row": 103, "column": 17}, "end_point": {"row": 103, "column": 19}}, {"id": 540, "type": "null", "text": "NULL", "parent": 537, "children": [541], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 24}}, {"id": 541, "type": "NULL", "text": "NULL", "parent": 540, "children": [], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 24}}, {"id": 542, "type": "assignment_expression", "text": "err = -EINVAL", "parent": 535, "children": [543, 544, 545], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 25}}, {"id": 543, "type": "identifier", "text": "err", "parent": 542, "children": [], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 15}}, {"id": 544, "type": "=", "text": "=", "parent": 542, "children": [], "start_point": {"row": 105, "column": 16}, "end_point": {"row": 105, "column": 17}}, {"id": 545, "type": "unary_expression", "text": "-EINVAL", "parent": 542, "children": [546, 547], "start_point": {"row": 105, "column": 18}, "end_point": {"row": 105, "column": 25}}, {"id": 546, "type": "-", "text": "-", "parent": 545, "children": [], "start_point": {"row": 105, "column": 18}, "end_point": {"row": 105, "column": 19}}, {"id": 547, "type": "identifier", "text": "EINVAL", "parent": 545, "children": [], "start_point": {"row": 105, "column": 19}, "end_point": {"row": 105, "column": 25}}, {"id": 548, "type": "break_statement", "text": "break;", "parent": 535, "children": [549], "start_point": {"row": 106, "column": 12}, "end_point": {"row": 106, "column": 18}}, {"id": 549, "type": "break", "text": "break", "parent": 548, "children": [], "start_point": {"row": 106, "column": 12}, "end_point": {"row": 106, "column": 17}}, {"id": 550, "type": "if_statement", "text": "if(cxt->gyro_data.get_data != NULL){\n\t\t\terr = cxt->gyro_data.get_data(&x, &y, &z, &status);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx+=cxt->cali_sw[0];\n\t\t\ty+=cxt->cali_sw[1];\n\t\t\tz+=cxt->cali_sw[2];\n\t\t\tsprintf(strbuf, \"%x %x %x\", x, y, z);\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\\n\", x, y, z);\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\\n\", strbuf);\n\t\t\t\n\t if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n\t {\n\t err = -EFAULT;\n\t break; \n\t }\n\t\t}else{\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \");\n\t\t}", "parent": 521, "children": [551, 660], "start_point": {"row": 108, "column": 2}, "end_point": {"row": 129, "column": 3}}, {"id": 551, "type": "parenthesized_expression", "text": "(cxt->gyro_data.get_data != NULL)", "parent": 550, "children": [552], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 37}}, {"id": 552, "type": "binary_expression", "text": "cxt->gyro_data.get_data != NULL", "parent": 551, "children": [553, 558, 559], "start_point": {"row": 108, "column": 5}, "end_point": {"row": 108, "column": 36}}, {"id": 553, "type": "field_expression", "text": "cxt->gyro_data.get_data", "parent": 552, "children": [554, 557], "start_point": {"row": 108, "column": 5}, "end_point": {"row": 108, "column": 28}}, {"id": 554, "type": "field_expression", "text": "cxt->gyro_data", "parent": 553, "children": [555, 556], "start_point": {"row": 108, "column": 5}, "end_point": {"row": 108, "column": 19}}, {"id": 555, "type": "identifier", "text": "cxt", "parent": 554, "children": [], "start_point": {"row": 108, "column": 5}, "end_point": {"row": 108, "column": 8}}, {"id": 556, "type": "field_identifier", "text": "gyro_data", "parent": 554, "children": [], "start_point": {"row": 108, "column": 10}, "end_point": {"row": 108, "column": 19}}, {"id": 557, "type": "field_identifier", "text": "get_data", "parent": 553, "children": [], "start_point": {"row": 108, "column": 20}, "end_point": {"row": 108, "column": 28}}, {"id": 558, "type": "!=", "text": "!=", "parent": 552, "children": [], "start_point": {"row": 108, "column": 29}, "end_point": {"row": 108, "column": 31}}, {"id": 559, "type": "null", "text": "NULL", "parent": 552, "children": [560], "start_point": {"row": 108, "column": 32}, "end_point": {"row": 108, "column": 36}}, {"id": 560, "type": "NULL", "text": "NULL", "parent": 559, "children": [], "start_point": {"row": 108, "column": 32}, "end_point": {"row": 108, "column": 36}}, {"id": 561, "type": "assignment_expression", "text": "err = cxt->gyro_data.get_data(&x, &y, &z, &status)", "parent": 550, "children": [562, 563, 564], "start_point": {"row": 109, "column": 3}, "end_point": {"row": 109, "column": 53}}, {"id": 562, "type": "identifier", "text": "err", "parent": 561, "children": [], "start_point": {"row": 109, "column": 3}, "end_point": {"row": 109, "column": 6}}, {"id": 563, "type": "=", "text": "=", "parent": 561, "children": [], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 8}}, {"id": 564, "type": "call_expression", "text": "cxt->gyro_data.get_data(&x, &y, &z, &status)", "parent": 561, "children": [565, 570], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 109, "column": 53}}, {"id": 565, "type": "field_expression", "text": "cxt->gyro_data.get_data", "parent": 564, "children": [566, 569], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 109, "column": 32}}, {"id": 566, "type": "field_expression", "text": "cxt->gyro_data", "parent": 565, "children": [567, 568], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 109, "column": 23}}, {"id": 567, "type": "identifier", "text": "cxt", "parent": 566, "children": [], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 109, "column": 12}}, {"id": 568, "type": "field_identifier", "text": "gyro_data", "parent": 566, "children": [], "start_point": {"row": 109, "column": 14}, "end_point": {"row": 109, "column": 23}}, {"id": 569, "type": "field_identifier", "text": "get_data", "parent": 565, "children": [], "start_point": {"row": 109, "column": 24}, "end_point": {"row": 109, "column": 32}}, {"id": 570, "type": "argument_list", "text": "(&x, &y, &z, &status)", "parent": 564, "children": [571, 573, 575, 577], "start_point": {"row": 109, "column": 32}, "end_point": {"row": 109, "column": 53}}, {"id": 571, "type": "pointer_expression", "text": "&x", "parent": 570, "children": [572], "start_point": {"row": 109, "column": 33}, "end_point": {"row": 109, "column": 35}}, {"id": 572, "type": "identifier", "text": "x", "parent": 571, "children": [], "start_point": {"row": 109, "column": 34}, "end_point": {"row": 109, "column": 35}}, {"id": 573, "type": "pointer_expression", "text": "&y", "parent": 570, "children": [574], "start_point": {"row": 109, "column": 37}, "end_point": {"row": 109, "column": 39}}, {"id": 574, "type": "identifier", "text": "y", "parent": 573, "children": [], "start_point": {"row": 109, "column": 38}, "end_point": {"row": 109, "column": 39}}, {"id": 575, "type": "pointer_expression", "text": "&z", "parent": 570, "children": [576], "start_point": {"row": 109, "column": 41}, "end_point": {"row": 109, "column": 43}}, {"id": 576, "type": "identifier", "text": "z", "parent": 575, "children": [], "start_point": {"row": 109, "column": 42}, "end_point": {"row": 109, "column": 43}}, {"id": 577, "type": "pointer_expression", "text": "&status", "parent": 570, "children": [578], "start_point": {"row": 109, "column": 45}, "end_point": {"row": 109, "column": 52}}, {"id": 578, "type": "identifier", "text": "status", "parent": 577, "children": [], "start_point": {"row": 109, "column": 46}, "end_point": {"row": 109, "column": 52}}, {"id": 579, "type": "if_statement", "text": "if(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}", "parent": 550, "children": [580], "start_point": {"row": 110, "column": 3}, "end_point": {"row": 114, "column": 4}}, {"id": 580, "type": "parenthesized_expression", "text": "(err < 0)", "parent": 579, "children": [581], "start_point": {"row": 110, "column": 5}, "end_point": {"row": 110, "column": 14}}, {"id": 581, "type": "binary_expression", "text": "err < 0", "parent": 580, "children": [582, 583, 584], "start_point": {"row": 110, "column": 6}, "end_point": {"row": 110, "column": 13}}, {"id": 582, "type": "identifier", "text": "err", "parent": 581, "children": [], "start_point": {"row": 110, "column": 6}, "end_point": {"row": 110, "column": 9}}, {"id": 583, "type": "<", "text": "<", "parent": 581, "children": [], "start_point": {"row": 110, "column": 10}, "end_point": {"row": 110, "column": 11}}, {"id": 584, "type": "number_literal", "text": "0", "parent": 581, "children": [], "start_point": {"row": 110, "column": 12}, "end_point": {"row": 110, "column": 13}}, {"id": 585, "type": "call_expression", "text": "GYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\")", "parent": 579, "children": [586, 587], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 65}}, {"id": 586, "type": "identifier", "text": "GYRO_LOG", "parent": 585, "children": [], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 12}}, {"id": 587, "type": "argument_list", "text": "(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\")", "parent": 585, "children": [588], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 65}}, {"id": 588, "type": "string_literal", "text": "\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\"", "parent": 587, "children": [589], "start_point": {"row": 112, "column": 13}, "end_point": {"row": 112, "column": 64}}, {"id": 589, "type": "escape_sequence", "text": "\\n", "parent": 588, "children": [], "start_point": {"row": 112, "column": 61}, "end_point": {"row": 112, "column": 63}}, {"id": 590, "type": "break_statement", "text": "break;", "parent": 579, "children": [591], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 10}}, {"id": 591, "type": "break", "text": "break", "parent": 590, "children": [], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 9}}, {"id": 592, "type": "assignment_expression", "text": "x+=cxt->cali_sw[0]", "parent": 550, "children": [593, 594, 595], "start_point": {"row": 115, "column": 3}, "end_point": {"row": 115, "column": 21}}, {"id": 593, "type": "identifier", "text": "x", "parent": 592, "children": [], "start_point": {"row": 115, "column": 3}, "end_point": {"row": 115, "column": 4}}, {"id": 594, "type": "+=", "text": "+=", "parent": 592, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 6}}, {"id": 595, "type": "subscript_expression", "text": "cxt->cali_sw[0]", "parent": 592, "children": [596, 599], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 21}}, {"id": 596, "type": "field_expression", "text": "cxt->cali_sw", "parent": 595, "children": [597, 598], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 18}}, {"id": 597, "type": "identifier", "text": "cxt", "parent": 596, "children": [], "start_point": {"row": 115, "column": 6}, "end_point": {"row": 115, "column": 9}}, {"id": 598, "type": "field_identifier", "text": "cali_sw", "parent": 596, "children": [], "start_point": {"row": 115, "column": 11}, "end_point": {"row": 115, "column": 18}}, {"id": 599, "type": "number_literal", "text": "0", "parent": 595, "children": [], "start_point": {"row": 115, "column": 19}, "end_point": {"row": 115, "column": 20}}, {"id": 600, "type": "assignment_expression", "text": "y+=cxt->cali_sw[1]", "parent": 550, "children": [601, 602, 603], "start_point": {"row": 116, "column": 3}, "end_point": {"row": 116, "column": 21}}, {"id": 601, "type": "identifier", "text": "y", "parent": 600, "children": [], "start_point": {"row": 116, "column": 3}, "end_point": {"row": 116, "column": 4}}, {"id": 602, "type": "+=", "text": "+=", "parent": 600, "children": [], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 6}}, {"id": 603, "type": "subscript_expression", "text": "cxt->cali_sw[1]", "parent": 600, "children": [604, 607], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 21}}, {"id": 604, "type": "field_expression", "text": "cxt->cali_sw", "parent": 603, "children": [605, 606], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 18}}, {"id": 605, "type": "identifier", "text": "cxt", "parent": 604, "children": [], "start_point": {"row": 116, "column": 6}, "end_point": {"row": 116, "column": 9}}, {"id": 606, "type": "field_identifier", "text": "cali_sw", "parent": 604, "children": [], "start_point": {"row": 116, "column": 11}, "end_point": {"row": 116, "column": 18}}, {"id": 607, "type": "number_literal", "text": "1", "parent": 603, "children": [], "start_point": {"row": 116, "column": 19}, "end_point": {"row": 116, "column": 20}}, {"id": 608, "type": "assignment_expression", "text": "z+=cxt->cali_sw[2]", "parent": 550, "children": [609, 610, 611], "start_point": {"row": 117, "column": 3}, "end_point": {"row": 117, "column": 21}}, {"id": 609, "type": "identifier", "text": "z", "parent": 608, "children": [], "start_point": {"row": 117, "column": 3}, "end_point": {"row": 117, "column": 4}}, {"id": 610, "type": "+=", "text": "+=", "parent": 608, "children": [], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 6}}, {"id": 611, "type": "subscript_expression", "text": "cxt->cali_sw[2]", "parent": 608, "children": [612, 615], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 21}}, {"id": 612, "type": "field_expression", "text": "cxt->cali_sw", "parent": 611, "children": [613, 614], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 18}}, {"id": 613, "type": "identifier", "text": "cxt", "parent": 612, "children": [], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 9}}, {"id": 614, "type": "field_identifier", "text": "cali_sw", "parent": 612, "children": [], "start_point": {"row": 117, "column": 11}, "end_point": {"row": 117, "column": 18}}, {"id": 615, "type": "number_literal", "text": "2", "parent": 611, "children": [], "start_point": {"row": 117, "column": 19}, "end_point": {"row": 117, "column": 20}}, {"id": 616, "type": "call_expression", "text": "sprintf(strbuf, \"%x %x %x\", x, y, z)", "parent": 550, "children": [617, 618], "start_point": {"row": 118, "column": 3}, "end_point": {"row": 118, "column": 39}}, {"id": 617, "type": "identifier", "text": "sprintf", "parent": 616, "children": [], "start_point": {"row": 118, "column": 3}, "end_point": {"row": 118, "column": 10}}, {"id": 618, "type": "argument_list", "text": "(strbuf, \"%x %x %x\", x, y, z)", "parent": 616, "children": [619, 620, 621, 622, 623], "start_point": {"row": 118, "column": 10}, "end_point": {"row": 118, "column": 39}}, {"id": 619, "type": "identifier", "text": "strbuf", "parent": 618, "children": [], "start_point": {"row": 118, "column": 11}, "end_point": {"row": 118, "column": 17}}, {"id": 620, "type": "string_literal", "text": "\"%x %x %x\"", "parent": 618, "children": [], "start_point": {"row": 118, "column": 19}, "end_point": {"row": 118, "column": 29}}, {"id": 621, "type": "identifier", "text": "x", "parent": 618, "children": [], "start_point": {"row": 118, "column": 31}, "end_point": {"row": 118, "column": 32}}, {"id": 622, "type": "identifier", "text": "y", "parent": 618, "children": [], "start_point": {"row": 118, "column": 34}, "end_point": {"row": 118, "column": 35}}, {"id": 623, "type": "identifier", "text": "z", "parent": 618, "children": [], "start_point": {"row": 118, "column": 37}, "end_point": {"row": 118, "column": 38}}, {"id": 624, "type": "call_expression", "text": "GYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\\n\", x, y, z)", "parent": 550, "children": [625, 626], "start_point": {"row": 119, "column": 3}, "end_point": {"row": 119, "column": 83}}, {"id": 625, "type": "identifier", "text": "GYRO_LOG", "parent": 624, "children": [], "start_point": {"row": 119, "column": 3}, "end_point": {"row": 119, "column": 11}}, {"id": 626, "type": "argument_list", "text": "(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\\n\", x, y, z)", "parent": 624, "children": [627, 629, 630, 631], "start_point": {"row": 119, "column": 11}, "end_point": {"row": 119, "column": 83}}, {"id": 627, "type": "string_literal", "text": "\"GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\\n\"", "parent": 626, "children": [628], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 73}}, {"id": 628, "type": "escape_sequence", "text": "\\n", "parent": 627, "children": [], "start_point": {"row": 119, "column": 70}, "end_point": {"row": 119, "column": 72}}, {"id": 629, "type": "identifier", "text": "x", "parent": 626, "children": [], "start_point": {"row": 119, "column": 75}, "end_point": {"row": 119, "column": 76}}, {"id": 630, "type": "identifier", "text": "y", "parent": 626, "children": [], "start_point": {"row": 119, "column": 78}, "end_point": {"row": 119, "column": 79}}, {"id": 631, "type": "identifier", "text": "z", "parent": 626, "children": [], "start_point": {"row": 119, "column": 81}, "end_point": {"row": 119, "column": 82}}, {"id": 632, "type": "call_expression", "text": "GYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\\n\", strbuf)", "parent": 550, "children": [633, 634], "start_point": {"row": 120, "column": 3}, "end_point": {"row": 120, "column": 76}}, {"id": 633, "type": "identifier", "text": "GYRO_LOG", "parent": 632, "children": [], "start_point": {"row": 120, "column": 3}, "end_point": {"row": 120, "column": 11}}, {"id": 634, "type": "argument_list", "text": "(\"GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\\n\", strbuf)", "parent": 632, "children": [635, 637], "start_point": {"row": 120, "column": 11}, "end_point": {"row": 120, "column": 76}}, {"id": 635, "type": "string_literal", "text": "\"GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\\n\"", "parent": 634, "children": [636], "start_point": {"row": 120, "column": 12}, "end_point": {"row": 120, "column": 67}}, {"id": 636, "type": "escape_sequence", "text": "\\n", "parent": 635, "children": [], "start_point": {"row": 120, "column": 64}, "end_point": {"row": 120, "column": 66}}, {"id": 637, "type": "identifier", "text": "strbuf", "parent": 634, "children": [], "start_point": {"row": 120, "column": 69}, "end_point": {"row": 120, "column": 75}}, {"id": 638, "type": "if_statement", "text": "if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n\t {\n\t err = -EFAULT;\n\t break; \n\t }", "parent": 550, "children": [639], "start_point": {"row": 122, "column": 9}, "end_point": {"row": 126, "column": 10}}, {"id": 639, "type": "parenthesized_expression", "text": "(copy_to_user(data, strbuf, strlen(strbuf)+1))", "parent": 638, "children": [640], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 58}}, {"id": 640, "type": "call_expression", "text": "copy_to_user(data, strbuf, strlen(strbuf)+1)", "parent": 639, "children": [641, 642], "start_point": {"row": 122, "column": 13}, "end_point": {"row": 122, "column": 57}}, {"id": 641, "type": "identifier", "text": "copy_to_user", "parent": 640, "children": [], "start_point": {"row": 122, "column": 13}, "end_point": {"row": 122, "column": 25}}, {"id": 642, "type": "argument_list", "text": "(data, strbuf, strlen(strbuf)+1)", "parent": 640, "children": [643, 644, 645], "start_point": {"row": 122, "column": 25}, "end_point": {"row": 122, "column": 57}}, {"id": 643, "type": "identifier", "text": "data", "parent": 642, "children": [], "start_point": {"row": 122, "column": 26}, "end_point": {"row": 122, "column": 30}}, {"id": 644, "type": "identifier", "text": "strbuf", "parent": 642, "children": [], "start_point": {"row": 122, "column": 32}, "end_point": {"row": 122, "column": 38}}, {"id": 645, "type": "binary_expression", "text": "strlen(strbuf)+1", "parent": 642, "children": [646, 650, 651], "start_point": {"row": 122, "column": 40}, "end_point": {"row": 122, "column": 56}}, {"id": 646, "type": "call_expression", "text": "strlen(strbuf)", "parent": 645, "children": [647, 648], "start_point": {"row": 122, "column": 40}, "end_point": {"row": 122, "column": 54}}, {"id": 647, "type": "identifier", "text": "strlen", "parent": 646, "children": [], "start_point": {"row": 122, "column": 40}, "end_point": {"row": 122, "column": 46}}, {"id": 648, "type": "argument_list", "text": "(strbuf)", "parent": 646, "children": [649], "start_point": {"row": 122, "column": 46}, "end_point": {"row": 122, "column": 54}}, {"id": 649, "type": "identifier", "text": "strbuf", "parent": 648, "children": [], "start_point": {"row": 122, "column": 47}, "end_point": {"row": 122, "column": 53}}, {"id": 650, "type": "+", "text": "+", "parent": 645, "children": [], "start_point": {"row": 122, "column": 54}, "end_point": {"row": 122, "column": 55}}, {"id": 651, "type": "number_literal", "text": "1", "parent": 645, "children": [], "start_point": {"row": 122, "column": 55}, "end_point": {"row": 122, "column": 56}}, {"id": 652, "type": "assignment_expression", "text": "err = -EFAULT", "parent": 638, "children": [653, 654, 655], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 26}}, {"id": 653, "type": "identifier", "text": "err", "parent": 652, "children": [], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 16}}, {"id": 654, "type": "=", "text": "=", "parent": 652, "children": [], "start_point": {"row": 124, "column": 17}, "end_point": {"row": 124, "column": 18}}, {"id": 655, "type": "unary_expression", "text": "-EFAULT", "parent": 652, "children": [656, 657], "start_point": {"row": 124, "column": 19}, "end_point": {"row": 124, "column": 26}}, {"id": 656, "type": "-", "text": "-", "parent": 655, "children": [], "start_point": {"row": 124, "column": 19}, "end_point": {"row": 124, "column": 20}}, {"id": 657, "type": "identifier", "text": "EFAULT", "parent": 655, "children": [], "start_point": {"row": 124, "column": 20}, "end_point": {"row": 124, "column": 26}}, {"id": 658, "type": "break_statement", "text": "break;", "parent": 638, "children": [659], "start_point": {"row": 125, "column": 13}, "end_point": {"row": 125, "column": 19}}, {"id": 659, "type": "break", "text": "break", "parent": 658, "children": [], "start_point": {"row": 125, "column": 13}, "end_point": {"row": 125, "column": 18}}, {"id": 660, "type": "else_clause", "text": "else{\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \");\n\t\t}", "parent": 550, "children": [], "start_point": {"row": 127, "column": 3}, "end_point": {"row": 129, "column": 3}}, {"id": 661, "type": "call_expression", "text": "GYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \")", "parent": 660, "children": [662, 663], "start_point": {"row": 128, "column": 3}, "end_point": {"row": 128, "column": 47}}, {"id": 662, "type": "identifier", "text": "GYRO_LOG", "parent": 661, "children": [], "start_point": {"row": 128, "column": 3}, "end_point": {"row": 128, "column": 11}}, {"id": 663, "type": "argument_list", "text": "(\"GYROSCOPE_IOCTL_READ_SENSORDATA \")", "parent": 661, "children": [664], "start_point": {"row": 128, "column": 11}, "end_point": {"row": 128, "column": 47}}, {"id": 664, "type": "string_literal", "text": "\"GYROSCOPE_IOCTL_READ_SENSORDATA \"", "parent": 663, "children": [], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 128, "column": 46}}, {"id": 665, "type": "break_statement", "text": "break;", "parent": 521, "children": [666], "start_point": {"row": 130, "column": 8}, "end_point": {"row": 130, "column": 14}}, {"id": 666, "type": "break", "text": "break", "parent": 665, "children": [], "start_point": {"row": 130, "column": 8}, "end_point": {"row": 130, "column": 13}}, {"id": 667, "type": "case_statement", "text": "case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW:\n\t\tdata = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\tif(cxt->gyro_data.get_raw_data != NULL){\n\t\t\terr = cxt->gyro_data.get_raw_data(&x, &y, &z);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx+=cxt->cali_sw[0];\n\t\t\ty+=cxt->cali_sw[1];\n\t\t\tz+=cxt->cali_sw[2];\n\t\t\tsprintf(strbuf, \"%x %x %x\", x, y, z);\n\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\\n\", x, y, z);\n\t if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n\t {\n\t err = -EFAULT;\n\t break; \n\t }\n\t\t}else{\n\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA FAIL!\\n \");\n\t\t}\n break;", "parent": 406, "children": [668, 669, 681, 696, 804], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 159, "column": 14}}, {"id": 668, "type": "case", "text": "case", "parent": 667, "children": [], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 8}}, {"id": 669, "type": "identifier", "text": "GYROSCOPE_IOCTL_READ_SENSORDATA_RAW", "parent": 667, "children": [], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 132, "column": 44}}, {"id": 670, "type": "assignment_expression", "text": "data = (void __user *) arg", "parent": 667, "children": [671, 672, 673], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 133, "column": 28}}, {"id": 671, "type": "identifier", "text": "data", "parent": 670, "children": [], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 133, "column": 6}}, {"id": 672, "type": "=", "text": "=", "parent": 670, "children": [], "start_point": {"row": 133, "column": 7}, "end_point": {"row": 133, "column": 8}}, {"id": 673, "type": "cast_expression", "text": "(void __user *) arg", "parent": 670, "children": [674, 676, 680], "start_point": {"row": 133, "column": 9}, "end_point": {"row": 133, "column": 28}}, {"id": 674, "type": "ERROR", "text": "void", "parent": 673, "children": [675], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 14}}, {"id": 675, "type": "primitive_type", "text": "void", "parent": 674, "children": [], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 14}}, {"id": 676, "type": "type_descriptor", "text": "__user *", "parent": 673, "children": [677, 678], "start_point": {"row": 133, "column": 15}, "end_point": {"row": 133, "column": 23}}, {"id": 677, "type": "type_identifier", "text": "__user", "parent": 676, "children": [], "start_point": {"row": 133, "column": 15}, "end_point": {"row": 133, "column": 21}}, {"id": 678, "type": "abstract_pointer_declarator", "text": "*", "parent": 676, "children": [679], "start_point": {"row": 133, "column": 22}, "end_point": {"row": 133, "column": 23}}, {"id": 679, "type": "*", "text": "*", "parent": 678, "children": [], "start_point": {"row": 133, "column": 22}, "end_point": {"row": 133, "column": 23}}, {"id": 680, "type": "identifier", "text": "arg", "parent": 673, "children": [], "start_point": {"row": 133, "column": 25}, "end_point": {"row": 133, "column": 28}}, {"id": 681, "type": "if_statement", "text": "if (data == NULL)\n {\n err = -EINVAL;\n break; \n }", "parent": 667, "children": [682], "start_point": {"row": 134, "column": 8}, "end_point": {"row": 138, "column": 9}}, {"id": 682, "type": "parenthesized_expression", "text": "(data == NULL)", "parent": 681, "children": [683], "start_point": {"row": 134, "column": 11}, "end_point": {"row": 134, "column": 25}}, {"id": 683, "type": "binary_expression", "text": "data == NULL", "parent": 682, "children": [684, 685, 686], "start_point": {"row": 134, "column": 12}, "end_point": {"row": 134, "column": 24}}, {"id": 684, "type": "identifier", "text": "data", "parent": 683, "children": [], "start_point": {"row": 134, "column": 12}, "end_point": {"row": 134, "column": 16}}, {"id": 685, "type": "==", "text": "==", "parent": 683, "children": [], "start_point": {"row": 134, "column": 17}, "end_point": {"row": 134, "column": 19}}, {"id": 686, "type": "null", "text": "NULL", "parent": 683, "children": [687], "start_point": {"row": 134, "column": 20}, "end_point": {"row": 134, "column": 24}}, {"id": 687, "type": "NULL", "text": "NULL", "parent": 686, "children": [], "start_point": {"row": 134, "column": 20}, "end_point": {"row": 134, "column": 24}}, {"id": 688, "type": "assignment_expression", "text": "err = -EINVAL", "parent": 681, "children": [689, 690, 691], "start_point": {"row": 136, "column": 12}, "end_point": {"row": 136, "column": 25}}, {"id": 689, "type": "identifier", "text": "err", "parent": 688, "children": [], "start_point": {"row": 136, "column": 12}, "end_point": {"row": 136, "column": 15}}, {"id": 690, "type": "=", "text": "=", "parent": 688, "children": [], "start_point": {"row": 136, "column": 16}, "end_point": {"row": 136, "column": 17}}, {"id": 691, "type": "unary_expression", "text": "-EINVAL", "parent": 688, "children": [692, 693], "start_point": {"row": 136, "column": 18}, "end_point": {"row": 136, "column": 25}}, {"id": 692, "type": "-", "text": "-", "parent": 691, "children": [], "start_point": {"row": 136, "column": 18}, "end_point": {"row": 136, "column": 19}}, {"id": 693, "type": "identifier", "text": "EINVAL", "parent": 691, "children": [], "start_point": {"row": 136, "column": 19}, "end_point": {"row": 136, "column": 25}}, {"id": 694, "type": "break_statement", "text": "break;", "parent": 681, "children": [695], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 18}}, {"id": 695, "type": "break", "text": "break", "parent": 694, "children": [], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 17}}, {"id": 696, "type": "if_statement", "text": "if(cxt->gyro_data.get_raw_data != NULL){\n\t\t\terr = cxt->gyro_data.get_raw_data(&x, &y, &z);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx+=cxt->cali_sw[0];\n\t\t\ty+=cxt->cali_sw[1];\n\t\t\tz+=cxt->cali_sw[2];\n\t\t\tsprintf(strbuf, \"%x %x %x\", x, y, z);\n\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\\n\", x, y, z);\n\t if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n\t {\n\t err = -EFAULT;\n\t break; \n\t }\n\t\t}else{\n\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA FAIL!\\n \");\n\t\t}", "parent": 667, "children": [697, 798], "start_point": {"row": 139, "column": 2}, "end_point": {"row": 158, "column": 3}}, {"id": 697, "type": "parenthesized_expression", "text": "(cxt->gyro_data.get_raw_data != NULL)", "parent": 696, "children": [698], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 41}}, {"id": 698, "type": "binary_expression", "text": "cxt->gyro_data.get_raw_data != NULL", "parent": 697, "children": [699, 704, 705], "start_point": {"row": 139, "column": 5}, "end_point": {"row": 139, "column": 40}}, {"id": 699, "type": "field_expression", "text": "cxt->gyro_data.get_raw_data", "parent": 698, "children": [700, 703], "start_point": {"row": 139, "column": 5}, "end_point": {"row": 139, "column": 32}}, {"id": 700, "type": "field_expression", "text": "cxt->gyro_data", "parent": 699, "children": [701, 702], "start_point": {"row": 139, "column": 5}, "end_point": {"row": 139, "column": 19}}, {"id": 701, "type": "identifier", "text": "cxt", "parent": 700, "children": [], "start_point": {"row": 139, "column": 5}, "end_point": {"row": 139, "column": 8}}, {"id": 702, "type": "field_identifier", "text": "gyro_data", "parent": 700, "children": [], "start_point": {"row": 139, "column": 10}, "end_point": {"row": 139, "column": 19}}, {"id": 703, "type": "field_identifier", "text": "get_raw_data", "parent": 699, "children": [], "start_point": {"row": 139, "column": 20}, "end_point": {"row": 139, "column": 32}}, {"id": 704, "type": "!=", "text": "!=", "parent": 698, "children": [], "start_point": {"row": 139, "column": 33}, "end_point": {"row": 139, "column": 35}}, {"id": 705, "type": "null", "text": "NULL", "parent": 698, "children": [706], "start_point": {"row": 139, "column": 36}, "end_point": {"row": 139, "column": 40}}, {"id": 706, "type": "NULL", "text": "NULL", "parent": 705, "children": [], "start_point": {"row": 139, "column": 36}, "end_point": {"row": 139, "column": 40}}, {"id": 707, "type": "assignment_expression", "text": "err = cxt->gyro_data.get_raw_data(&x, &y, &z)", "parent": 696, "children": [708, 709, 710], "start_point": {"row": 140, "column": 3}, "end_point": {"row": 140, "column": 48}}, {"id": 708, "type": "identifier", "text": "err", "parent": 707, "children": [], "start_point": {"row": 140, "column": 3}, "end_point": {"row": 140, "column": 6}}, {"id": 709, "type": "=", "text": "=", "parent": 707, "children": [], "start_point": {"row": 140, "column": 7}, "end_point": {"row": 140, "column": 8}}, {"id": 710, "type": "call_expression", "text": "cxt->gyro_data.get_raw_data(&x, &y, &z)", "parent": 707, "children": [711, 716], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 48}}, {"id": 711, "type": "field_expression", "text": "cxt->gyro_data.get_raw_data", "parent": 710, "children": [712, 715], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 36}}, {"id": 712, "type": "field_expression", "text": "cxt->gyro_data", "parent": 711, "children": [713, 714], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 23}}, {"id": 713, "type": "identifier", "text": "cxt", "parent": 712, "children": [], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 12}}, {"id": 714, "type": "field_identifier", "text": "gyro_data", "parent": 712, "children": [], "start_point": {"row": 140, "column": 14}, "end_point": {"row": 140, "column": 23}}, {"id": 715, "type": "field_identifier", "text": "get_raw_data", "parent": 711, "children": [], "start_point": {"row": 140, "column": 24}, "end_point": {"row": 140, "column": 36}}, {"id": 716, "type": "argument_list", "text": "(&x, &y, &z)", "parent": 710, "children": [717, 719, 721], "start_point": {"row": 140, "column": 36}, "end_point": {"row": 140, "column": 48}}, {"id": 717, "type": "pointer_expression", "text": "&x", "parent": 716, "children": [718], "start_point": {"row": 140, "column": 37}, "end_point": {"row": 140, "column": 39}}, {"id": 718, "type": "identifier", "text": "x", "parent": 717, "children": [], "start_point": {"row": 140, "column": 38}, "end_point": {"row": 140, "column": 39}}, {"id": 719, "type": "pointer_expression", "text": "&y", "parent": 716, "children": [720], "start_point": {"row": 140, "column": 41}, "end_point": {"row": 140, "column": 43}}, {"id": 720, "type": "identifier", "text": "y", "parent": 719, "children": [], "start_point": {"row": 140, "column": 42}, "end_point": {"row": 140, "column": 43}}, {"id": 721, "type": "pointer_expression", "text": "&z", "parent": 716, "children": [722], "start_point": {"row": 140, "column": 45}, "end_point": {"row": 140, "column": 47}}, {"id": 722, "type": "identifier", "text": "z", "parent": 721, "children": [], "start_point": {"row": 140, "column": 46}, "end_point": {"row": 140, "column": 47}}, {"id": 723, "type": "if_statement", "text": "if(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}", "parent": 696, "children": [724], "start_point": {"row": 141, "column": 3}, "end_point": {"row": 145, "column": 4}}, {"id": 724, "type": "parenthesized_expression", "text": "(err < 0)", "parent": 723, "children": [725], "start_point": {"row": 141, "column": 5}, "end_point": {"row": 141, "column": 14}}, {"id": 725, "type": "binary_expression", "text": "err < 0", "parent": 724, "children": [726, 727, 728], "start_point": {"row": 141, "column": 6}, "end_point": {"row": 141, "column": 13}}, {"id": 726, "type": "identifier", "text": "err", "parent": 725, "children": [], "start_point": {"row": 141, "column": 6}, "end_point": {"row": 141, "column": 9}}, {"id": 727, "type": "<", "text": "<", "parent": 725, "children": [], "start_point": {"row": 141, "column": 10}, "end_point": {"row": 141, "column": 11}}, {"id": 728, "type": "number_literal", "text": "0", "parent": 725, "children": [], "start_point": {"row": 141, "column": 12}, "end_point": {"row": 141, "column": 13}}, {"id": 729, "type": "call_expression", "text": "GYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA read data fail!\\n\")", "parent": 723, "children": [730, 731], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 61}}, {"id": 730, "type": "identifier", "text": "GYRO_LOG", "parent": 729, "children": [], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 143, "column": 12}}, {"id": 731, "type": "argument_list", "text": "(\"GSENSOR_IOCTL_READ_RAW_DATA read data fail!\\n\")", "parent": 729, "children": [732], "start_point": {"row": 143, "column": 12}, "end_point": {"row": 143, "column": 61}}, {"id": 732, "type": "string_literal", "text": "\"GSENSOR_IOCTL_READ_RAW_DATA read data fail!\\n\"", "parent": 731, "children": [733], "start_point": {"row": 143, "column": 13}, "end_point": {"row": 143, "column": 60}}, {"id": 733, "type": "escape_sequence", "text": "\\n", "parent": 732, "children": [], "start_point": {"row": 143, "column": 57}, "end_point": {"row": 143, "column": 59}}, {"id": 734, "type": "break_statement", "text": "break;", "parent": 723, "children": [735], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 10}}, {"id": 735, "type": "break", "text": "break", "parent": 734, "children": [], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 9}}, {"id": 736, "type": "assignment_expression", "text": "x+=cxt->cali_sw[0]", "parent": 696, "children": [737, 738, 739], "start_point": {"row": 146, "column": 3}, "end_point": {"row": 146, "column": 21}}, {"id": 737, "type": "identifier", "text": "x", "parent": 736, "children": [], "start_point": {"row": 146, "column": 3}, "end_point": {"row": 146, "column": 4}}, {"id": 738, "type": "+=", "text": "+=", "parent": 736, "children": [], "start_point": {"row": 146, "column": 4}, "end_point": {"row": 146, "column": 6}}, {"id": 739, "type": "subscript_expression", "text": "cxt->cali_sw[0]", "parent": 736, "children": [740, 743], "start_point": {"row": 146, "column": 6}, "end_point": {"row": 146, "column": 21}}, {"id": 740, "type": "field_expression", "text": "cxt->cali_sw", "parent": 739, "children": [741, 742], "start_point": {"row": 146, "column": 6}, "end_point": {"row": 146, "column": 18}}, {"id": 741, "type": "identifier", "text": "cxt", "parent": 740, "children": [], "start_point": {"row": 146, "column": 6}, "end_point": {"row": 146, "column": 9}}, {"id": 742, "type": "field_identifier", "text": "cali_sw", "parent": 740, "children": [], "start_point": {"row": 146, "column": 11}, "end_point": {"row": 146, "column": 18}}, {"id": 743, "type": "number_literal", "text": "0", "parent": 739, "children": [], "start_point": {"row": 146, "column": 19}, "end_point": {"row": 146, "column": 20}}, {"id": 744, "type": "assignment_expression", "text": "y+=cxt->cali_sw[1]", "parent": 696, "children": [745, 746, 747], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 21}}, {"id": 745, "type": "identifier", "text": "y", "parent": 744, "children": [], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 4}}, {"id": 746, "type": "+=", "text": "+=", "parent": 744, "children": [], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 6}}, {"id": 747, "type": "subscript_expression", "text": "cxt->cali_sw[1]", "parent": 744, "children": [748, 751], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 21}}, {"id": 748, "type": "field_expression", "text": "cxt->cali_sw", "parent": 747, "children": [749, 750], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 18}}, {"id": 749, "type": "identifier", "text": "cxt", "parent": 748, "children": [], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 9}}, {"id": 750, "type": "field_identifier", "text": "cali_sw", "parent": 748, "children": [], "start_point": {"row": 147, "column": 11}, "end_point": {"row": 147, "column": 18}}, {"id": 751, "type": "number_literal", "text": "1", "parent": 747, "children": [], "start_point": {"row": 147, "column": 19}, "end_point": {"row": 147, "column": 20}}, {"id": 752, "type": "assignment_expression", "text": "z+=cxt->cali_sw[2]", "parent": 696, "children": [753, 754, 755], "start_point": {"row": 148, "column": 3}, "end_point": {"row": 148, "column": 21}}, {"id": 753, "type": "identifier", "text": "z", "parent": 752, "children": [], "start_point": {"row": 148, "column": 3}, "end_point": {"row": 148, "column": 4}}, {"id": 754, "type": "+=", "text": "+=", "parent": 752, "children": [], "start_point": {"row": 148, "column": 4}, "end_point": {"row": 148, "column": 6}}, {"id": 755, "type": "subscript_expression", "text": "cxt->cali_sw[2]", "parent": 752, "children": [756, 759], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 21}}, {"id": 756, "type": "field_expression", "text": "cxt->cali_sw", "parent": 755, "children": [757, 758], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 18}}, {"id": 757, "type": "identifier", "text": "cxt", "parent": 756, "children": [], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 9}}, {"id": 758, "type": "field_identifier", "text": "cali_sw", "parent": 756, "children": [], "start_point": {"row": 148, "column": 11}, "end_point": {"row": 148, "column": 18}}, {"id": 759, "type": "number_literal", "text": "2", "parent": 755, "children": [], "start_point": {"row": 148, "column": 19}, "end_point": {"row": 148, "column": 20}}, {"id": 760, "type": "call_expression", "text": "sprintf(strbuf, \"%x %x %x\", x, y, z)", "parent": 696, "children": [761, 762], "start_point": {"row": 149, "column": 3}, "end_point": {"row": 149, "column": 39}}, {"id": 761, "type": "identifier", "text": "sprintf", "parent": 760, "children": [], "start_point": {"row": 149, "column": 3}, "end_point": {"row": 149, "column": 10}}, {"id": 762, "type": "argument_list", "text": "(strbuf, \"%x %x %x\", x, y, z)", "parent": 760, "children": [763, 764, 765, 766, 767], "start_point": {"row": 149, "column": 10}, "end_point": {"row": 149, "column": 39}}, {"id": 763, "type": "identifier", "text": "strbuf", "parent": 762, "children": [], "start_point": {"row": 149, "column": 11}, "end_point": {"row": 149, "column": 17}}, {"id": 764, "type": "string_literal", "text": "\"%x %x %x\"", "parent": 762, "children": [], "start_point": {"row": 149, "column": 19}, "end_point": {"row": 149, "column": 29}}, {"id": 765, "type": "identifier", "text": "x", "parent": 762, "children": [], "start_point": {"row": 149, "column": 31}, "end_point": {"row": 149, "column": 32}}, {"id": 766, "type": "identifier", "text": "y", "parent": 762, "children": [], "start_point": {"row": 149, "column": 34}, "end_point": {"row": 149, "column": 35}}, {"id": 767, "type": "identifier", "text": "z", "parent": 762, "children": [], "start_point": {"row": 149, "column": 37}, "end_point": {"row": 149, "column": 38}}, {"id": 768, "type": "call_expression", "text": "GYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\\n\", x, y, z)", "parent": 696, "children": [769, 770], "start_point": {"row": 150, "column": 3}, "end_point": {"row": 150, "column": 79}}, {"id": 769, "type": "identifier", "text": "GYRO_LOG", "parent": 768, "children": [], "start_point": {"row": 150, "column": 3}, "end_point": {"row": 150, "column": 11}}, {"id": 770, "type": "argument_list", "text": "(\"GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\\n\", x, y, z)", "parent": 768, "children": [771, 773, 774, 775], "start_point": {"row": 150, "column": 11}, "end_point": {"row": 150, "column": 79}}, {"id": 771, "type": "string_literal", "text": "\"GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\\n\"", "parent": 770, "children": [772], "start_point": {"row": 150, "column": 12}, "end_point": {"row": 150, "column": 69}}, {"id": 772, "type": "escape_sequence", "text": "\\n", "parent": 771, "children": [], "start_point": {"row": 150, "column": 66}, "end_point": {"row": 150, "column": 68}}, {"id": 773, "type": "identifier", "text": "x", "parent": 770, "children": [], "start_point": {"row": 150, "column": 71}, "end_point": {"row": 150, "column": 72}}, {"id": 774, "type": "identifier", "text": "y", "parent": 770, "children": [], "start_point": {"row": 150, "column": 74}, "end_point": {"row": 150, "column": 75}}, {"id": 775, "type": "identifier", "text": "z", "parent": 770, "children": [], "start_point": {"row": 150, "column": 77}, "end_point": {"row": 150, "column": 78}}, {"id": 776, "type": "if_statement", "text": "if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n\t {\n\t err = -EFAULT;\n\t break; \n\t }", "parent": 696, "children": [777], "start_point": {"row": 151, "column": 9}, "end_point": {"row": 155, "column": 10}}, {"id": 777, "type": "parenthesized_expression", "text": "(copy_to_user(data, strbuf, strlen(strbuf)+1))", "parent": 776, "children": [778], "start_point": {"row": 151, "column": 12}, "end_point": {"row": 151, "column": 58}}, {"id": 778, "type": "call_expression", "text": "copy_to_user(data, strbuf, strlen(strbuf)+1)", "parent": 777, "children": [779, 780], "start_point": {"row": 151, "column": 13}, "end_point": {"row": 151, "column": 57}}, {"id": 779, "type": "identifier", "text": "copy_to_user", "parent": 778, "children": [], "start_point": {"row": 151, "column": 13}, "end_point": {"row": 151, "column": 25}}, {"id": 780, "type": "argument_list", "text": "(data, strbuf, strlen(strbuf)+1)", "parent": 778, "children": [781, 782, 783], "start_point": {"row": 151, "column": 25}, "end_point": {"row": 151, "column": 57}}, {"id": 781, "type": "identifier", "text": "data", "parent": 780, "children": [], "start_point": {"row": 151, "column": 26}, "end_point": {"row": 151, "column": 30}}, {"id": 782, "type": "identifier", "text": "strbuf", "parent": 780, "children": [], "start_point": {"row": 151, "column": 32}, "end_point": {"row": 151, "column": 38}}, {"id": 783, "type": "binary_expression", "text": "strlen(strbuf)+1", "parent": 780, "children": [784, 788, 789], "start_point": {"row": 151, "column": 40}, "end_point": {"row": 151, "column": 56}}, {"id": 784, "type": "call_expression", "text": "strlen(strbuf)", "parent": 783, "children": [785, 786], "start_point": {"row": 151, "column": 40}, "end_point": {"row": 151, "column": 54}}, {"id": 785, "type": "identifier", "text": "strlen", "parent": 784, "children": [], "start_point": {"row": 151, "column": 40}, "end_point": {"row": 151, "column": 46}}, {"id": 786, "type": "argument_list", "text": "(strbuf)", "parent": 784, "children": [787], "start_point": {"row": 151, "column": 46}, "end_point": {"row": 151, "column": 54}}, {"id": 787, "type": "identifier", "text": "strbuf", "parent": 786, "children": [], "start_point": {"row": 151, "column": 47}, "end_point": {"row": 151, "column": 53}}, {"id": 788, "type": "+", "text": "+", "parent": 783, "children": [], "start_point": {"row": 151, "column": 54}, "end_point": {"row": 151, "column": 55}}, {"id": 789, "type": "number_literal", "text": "1", "parent": 783, "children": [], "start_point": {"row": 151, "column": 55}, "end_point": {"row": 151, "column": 56}}, {"id": 790, "type": "assignment_expression", "text": "err = -EFAULT", "parent": 776, "children": [791, 792, 793], "start_point": {"row": 153, "column": 13}, "end_point": {"row": 153, "column": 26}}, {"id": 791, "type": "identifier", "text": "err", "parent": 790, "children": [], "start_point": {"row": 153, "column": 13}, "end_point": {"row": 153, "column": 16}}, {"id": 792, "type": "=", "text": "=", "parent": 790, "children": [], "start_point": {"row": 153, "column": 17}, "end_point": {"row": 153, "column": 18}}, {"id": 793, "type": "unary_expression", "text": "-EFAULT", "parent": 790, "children": [794, 795], "start_point": {"row": 153, "column": 19}, "end_point": {"row": 153, "column": 26}}, {"id": 794, "type": "-", "text": "-", "parent": 793, "children": [], "start_point": {"row": 153, "column": 19}, "end_point": {"row": 153, "column": 20}}, {"id": 795, "type": "identifier", "text": "EFAULT", "parent": 793, "children": [], "start_point": {"row": 153, "column": 20}, "end_point": {"row": 153, "column": 26}}, {"id": 796, "type": "break_statement", "text": "break;", "parent": 776, "children": [797], "start_point": {"row": 154, "column": 13}, "end_point": {"row": 154, "column": 19}}, {"id": 797, "type": "break", "text": "break", "parent": 796, "children": [], "start_point": {"row": 154, "column": 13}, "end_point": {"row": 154, "column": 18}}, {"id": 798, "type": "else_clause", "text": "else{\n\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA FAIL!\\n \");\n\t\t}", "parent": 696, "children": [], "start_point": {"row": 156, "column": 3}, "end_point": {"row": 158, "column": 3}}, {"id": 799, "type": "call_expression", "text": "GYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA FAIL!\\n \")", "parent": 798, "children": [800, 801], "start_point": {"row": 157, "column": 3}, "end_point": {"row": 157, "column": 51}}, {"id": 800, "type": "identifier", "text": "GYRO_LOG", "parent": 799, "children": [], "start_point": {"row": 157, "column": 3}, "end_point": {"row": 157, "column": 11}}, {"id": 801, "type": "argument_list", "text": "(\"GSENSOR_IOCTL_READ_RAW_DATA FAIL!\\n \")", "parent": 799, "children": [802], "start_point": {"row": 157, "column": 11}, "end_point": {"row": 157, "column": 51}}, {"id": 802, "type": "string_literal", "text": "\"GSENSOR_IOCTL_READ_RAW_DATA FAIL!\\n \"", "parent": 801, "children": [803], "start_point": {"row": 157, "column": 12}, "end_point": {"row": 157, "column": 50}}, {"id": 803, "type": "escape_sequence", "text": "\\n", "parent": 802, "children": [], "start_point": {"row": 157, "column": 46}, "end_point": {"row": 157, "column": 48}}, {"id": 804, "type": "break_statement", "text": "break;", "parent": 667, "children": [805], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 159, "column": 14}}, {"id": 805, "type": "break", "text": "break", "parent": 804, "children": [], "start_point": {"row": 159, "column": 8}, "end_point": {"row": 159, "column": 13}}, {"id": 806, "type": "case_statement", "text": "case GYROSCOPE_IOCTL_SET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if (copy_from_user(&sensor_data, data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break; \n }\n cali[0] = sensor_data.x ;\n cali[1] = sensor_data.y ;\n cali[2] = sensor_data.z ;\n\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\\n\", cali[0], cali[1], cali[2]);\n gyro_set_cali(cali);\n/*\n\t\tif(cxt->gyro_ctl.gyro_calibration != NULL)\n\t\t{\n\t\t\terr = cxt->gyro_ctl.gyro_calibration(SETCALI, cali);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_SET_CALI fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} \n\t\t*/\n break;", "parent": 406, "children": [807, 808, 820, 835, 896], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 188, "column": 14}}, {"id": 807, "type": "case", "text": "case", "parent": 806, "children": [], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 8}}, {"id": 808, "type": "identifier", "text": "GYROSCOPE_IOCTL_SET_CALI", "parent": 806, "children": [], "start_point": {"row": 160, "column": 9}, "end_point": {"row": 160, "column": 33}}, {"id": 809, "type": "assignment_expression", "text": "data = (void __user*)arg", "parent": 806, "children": [810, 811, 812], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 161, "column": 32}}, {"id": 810, "type": "identifier", "text": "data", "parent": 809, "children": [], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 161, "column": 12}}, {"id": 811, "type": "=", "text": "=", "parent": 809, "children": [], "start_point": {"row": 161, "column": 13}, "end_point": {"row": 161, "column": 14}}, {"id": 812, "type": "cast_expression", "text": "(void __user*)arg", "parent": 809, "children": [813, 815, 819], "start_point": {"row": 161, "column": 15}, "end_point": {"row": 161, "column": 32}}, {"id": 813, "type": "ERROR", "text": "void", "parent": 812, "children": [814], "start_point": {"row": 161, "column": 16}, "end_point": {"row": 161, "column": 20}}, {"id": 814, "type": "primitive_type", "text": "void", "parent": 813, "children": [], "start_point": {"row": 161, "column": 16}, "end_point": {"row": 161, "column": 20}}, {"id": 815, "type": "type_descriptor", "text": "__user*", "parent": 812, "children": [816, 817], "start_point": {"row": 161, "column": 21}, "end_point": {"row": 161, "column": 28}}, {"id": 816, "type": "type_identifier", "text": "__user", "parent": 815, "children": [], "start_point": {"row": 161, "column": 21}, "end_point": {"row": 161, "column": 27}}, {"id": 817, "type": "abstract_pointer_declarator", "text": "*", "parent": 815, "children": [818], "start_point": {"row": 161, "column": 27}, "end_point": {"row": 161, "column": 28}}, {"id": 818, "type": "*", "text": "*", "parent": 817, "children": [], "start_point": {"row": 161, "column": 27}, "end_point": {"row": 161, "column": 28}}, {"id": 819, "type": "identifier", "text": "arg", "parent": 812, "children": [], "start_point": {"row": 161, "column": 29}, "end_point": {"row": 161, "column": 32}}, {"id": 820, "type": "if_statement", "text": "if (data == NULL)\n {\n err = -EINVAL;\n break; \n }", "parent": 806, "children": [821], "start_point": {"row": 162, "column": 8}, "end_point": {"row": 166, "column": 9}}, {"id": 821, "type": "parenthesized_expression", "text": "(data == NULL)", "parent": 820, "children": [822], "start_point": {"row": 162, "column": 11}, "end_point": {"row": 162, "column": 25}}, {"id": 822, "type": "binary_expression", "text": "data == NULL", "parent": 821, "children": [823, 824, 825], "start_point": {"row": 162, "column": 12}, "end_point": {"row": 162, "column": 24}}, {"id": 823, "type": "identifier", "text": "data", "parent": 822, "children": [], "start_point": {"row": 162, "column": 12}, "end_point": {"row": 162, "column": 16}}, {"id": 824, "type": "==", "text": "==", "parent": 822, "children": [], "start_point": {"row": 162, "column": 17}, "end_point": {"row": 162, "column": 19}}, {"id": 825, "type": "null", "text": "NULL", "parent": 822, "children": [826], "start_point": {"row": 162, "column": 20}, "end_point": {"row": 162, "column": 24}}, {"id": 826, "type": "NULL", "text": "NULL", "parent": 825, "children": [], "start_point": {"row": 162, "column": 20}, "end_point": {"row": 162, "column": 24}}, {"id": 827, "type": "assignment_expression", "text": "err = -EINVAL", "parent": 820, "children": [828, 829, 830], "start_point": {"row": 164, "column": 12}, "end_point": {"row": 164, "column": 25}}, {"id": 828, "type": "identifier", "text": "err", "parent": 827, "children": [], "start_point": {"row": 164, "column": 12}, "end_point": {"row": 164, "column": 15}}, {"id": 829, "type": "=", "text": "=", "parent": 827, "children": [], "start_point": {"row": 164, "column": 16}, "end_point": {"row": 164, "column": 17}}, {"id": 830, "type": "unary_expression", "text": "-EINVAL", "parent": 827, "children": [831, 832], "start_point": {"row": 164, "column": 18}, "end_point": {"row": 164, "column": 25}}, {"id": 831, "type": "-", "text": "-", "parent": 830, "children": [], "start_point": {"row": 164, "column": 18}, "end_point": {"row": 164, "column": 19}}, {"id": 832, "type": "identifier", "text": "EINVAL", "parent": 830, "children": [], "start_point": {"row": 164, "column": 19}, "end_point": {"row": 164, "column": 25}}, {"id": 833, "type": "break_statement", "text": "break;", "parent": 820, "children": [834], "start_point": {"row": 165, "column": 12}, "end_point": {"row": 165, "column": 18}}, {"id": 834, "type": "break", "text": "break", "parent": 833, "children": [], "start_point": {"row": 165, "column": 12}, "end_point": {"row": 165, "column": 17}}, {"id": 835, "type": "if_statement", "text": "if (copy_from_user(&sensor_data, data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break; \n }", "parent": 806, "children": [836], "start_point": {"row": 167, "column": 8}, "end_point": {"row": 171, "column": 9}}, {"id": 836, "type": "parenthesized_expression", "text": "(copy_from_user(&sensor_data, data, sizeof(sensor_data)))", "parent": 835, "children": [837], "start_point": {"row": 167, "column": 11}, "end_point": {"row": 167, "column": 68}}, {"id": 837, "type": "call_expression", "text": "copy_from_user(&sensor_data, data, sizeof(sensor_data))", "parent": 836, "children": [838, 839], "start_point": {"row": 167, "column": 12}, "end_point": {"row": 167, "column": 67}}, {"id": 838, "type": "identifier", "text": "copy_from_user", "parent": 837, "children": [], "start_point": {"row": 167, "column": 12}, "end_point": {"row": 167, "column": 26}}, {"id": 839, "type": "argument_list", "text": "(&sensor_data, data, sizeof(sensor_data))", "parent": 837, "children": [840, 842, 843], "start_point": {"row": 167, "column": 26}, "end_point": {"row": 167, "column": 67}}, {"id": 840, "type": "pointer_expression", "text": "&sensor_data", "parent": 839, "children": [841], "start_point": {"row": 167, "column": 27}, "end_point": {"row": 167, "column": 39}}, {"id": 841, "type": "identifier", "text": "sensor_data", "parent": 840, "children": [], "start_point": {"row": 167, "column": 28}, "end_point": {"row": 167, "column": 39}}, {"id": 842, "type": "identifier", "text": "data", "parent": 839, "children": [], "start_point": {"row": 167, "column": 41}, "end_point": {"row": 167, "column": 45}}, {"id": 843, "type": "sizeof_expression", "text": "sizeof(sensor_data)", "parent": 839, "children": [844], "start_point": {"row": 167, "column": 47}, "end_point": {"row": 167, "column": 66}}, {"id": 844, "type": "parenthesized_expression", "text": "(sensor_data)", "parent": 843, "children": [845], "start_point": {"row": 167, "column": 53}, "end_point": {"row": 167, "column": 66}}, {"id": 845, "type": "identifier", "text": "sensor_data", "parent": 844, "children": [], "start_point": {"row": 167, "column": 54}, "end_point": {"row": 167, "column": 65}}, {"id": 846, "type": "assignment_expression", "text": "err = -EFAULT", "parent": 835, "children": [847, 848, 849], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 25}}, {"id": 847, "type": "identifier", "text": "err", "parent": 846, "children": [], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 15}}, {"id": 848, "type": "=", "text": "=", "parent": 846, "children": [], "start_point": {"row": 169, "column": 16}, "end_point": {"row": 169, "column": 17}}, {"id": 849, "type": "unary_expression", "text": "-EFAULT", "parent": 846, "children": [850, 851], "start_point": {"row": 169, "column": 18}, "end_point": {"row": 169, "column": 25}}, {"id": 850, "type": "-", "text": "-", "parent": 849, "children": [], "start_point": {"row": 169, "column": 18}, "end_point": {"row": 169, "column": 19}}, {"id": 851, "type": "identifier", "text": "EFAULT", "parent": 849, "children": [], "start_point": {"row": 169, "column": 19}, "end_point": {"row": 169, "column": 25}}, {"id": 852, "type": "break_statement", "text": "break;", "parent": 835, "children": [853], "start_point": {"row": 170, "column": 12}, "end_point": {"row": 170, "column": 18}}, {"id": 853, "type": "break", "text": "break", "parent": 852, "children": [], "start_point": {"row": 170, "column": 12}, "end_point": {"row": 170, "column": 17}}, {"id": 854, "type": "assignment_expression", "text": "cali[0] = sensor_data.x", "parent": 806, "children": [855, 858, 859], "start_point": {"row": 172, "column": 8}, "end_point": {"row": 172, "column": 31}}, {"id": 855, "type": "subscript_expression", "text": "cali[0]", "parent": 854, "children": [856, 857], "start_point": {"row": 172, "column": 8}, "end_point": {"row": 172, "column": 15}}, {"id": 856, "type": "identifier", "text": "cali", "parent": 855, "children": [], "start_point": {"row": 172, "column": 8}, "end_point": {"row": 172, "column": 12}}, {"id": 857, "type": "number_literal", "text": "0", "parent": 855, "children": [], "start_point": {"row": 172, "column": 13}, "end_point": {"row": 172, "column": 14}}, {"id": 858, "type": "=", "text": "=", "parent": 854, "children": [], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 17}}, {"id": 859, "type": "field_expression", "text": "sensor_data.x", "parent": 854, "children": [860, 861], "start_point": {"row": 172, "column": 18}, "end_point": {"row": 172, "column": 31}}, {"id": 860, "type": "identifier", "text": "sensor_data", "parent": 859, "children": [], "start_point": {"row": 172, "column": 18}, "end_point": {"row": 172, "column": 29}}, {"id": 861, "type": "field_identifier", "text": "x", "parent": 859, "children": [], "start_point": {"row": 172, "column": 30}, "end_point": {"row": 172, "column": 31}}, {"id": 862, "type": "assignment_expression", "text": "cali[1] = sensor_data.y", "parent": 806, "children": [863, 866, 867], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 31}}, {"id": 863, "type": "subscript_expression", "text": "cali[1]", "parent": 862, "children": [864, 865], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 15}}, {"id": 864, "type": "identifier", "text": "cali", "parent": 863, "children": [], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 12}}, {"id": 865, "type": "number_literal", "text": "1", "parent": 863, "children": [], "start_point": {"row": 173, "column": 13}, "end_point": {"row": 173, "column": 14}}, {"id": 866, "type": "=", "text": "=", "parent": 862, "children": [], "start_point": {"row": 173, "column": 16}, "end_point": {"row": 173, "column": 17}}, {"id": 867, "type": "field_expression", "text": "sensor_data.y", "parent": 862, "children": [868, 869], "start_point": {"row": 173, "column": 18}, "end_point": {"row": 173, "column": 31}}, {"id": 868, "type": "identifier", "text": "sensor_data", "parent": 867, "children": [], "start_point": {"row": 173, "column": 18}, "end_point": {"row": 173, "column": 29}}, {"id": 869, "type": "field_identifier", "text": "y", "parent": 867, "children": [], "start_point": {"row": 173, "column": 30}, "end_point": {"row": 173, "column": 31}}, {"id": 870, "type": "assignment_expression", "text": "cali[2] = sensor_data.z", "parent": 806, "children": [871, 874, 875], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 31}}, {"id": 871, "type": "subscript_expression", "text": "cali[2]", "parent": 870, "children": [872, 873], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 15}}, {"id": 872, "type": "identifier", "text": "cali", "parent": 871, "children": [], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 12}}, {"id": 873, "type": "number_literal", "text": "2", "parent": 871, "children": [], "start_point": {"row": 174, "column": 13}, "end_point": {"row": 174, "column": 14}}, {"id": 874, "type": "=", "text": "=", "parent": 870, "children": [], "start_point": {"row": 174, "column": 16}, "end_point": {"row": 174, "column": 17}}, {"id": 875, "type": "field_expression", "text": "sensor_data.z", "parent": 870, "children": [876, 877], "start_point": {"row": 174, "column": 18}, "end_point": {"row": 174, "column": 31}}, {"id": 876, "type": "identifier", "text": "sensor_data", "parent": 875, "children": [], "start_point": {"row": 174, "column": 18}, "end_point": {"row": 174, "column": 29}}, {"id": 877, "type": "field_identifier", "text": "z", "parent": 875, "children": [], "start_point": {"row": 174, "column": 30}, "end_point": {"row": 174, "column": 31}}, {"id": 878, "type": "call_expression", "text": "GYRO_LOG(\"GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\\n\", cali[0], cali[1], cali[2])", "parent": 806, "children": [879, 880], "start_point": {"row": 175, "column": 2}, "end_point": {"row": 175, "column": 88}}, {"id": 879, "type": "identifier", "text": "GYRO_LOG", "parent": 878, "children": [], "start_point": {"row": 175, "column": 2}, "end_point": {"row": 175, "column": 10}}, {"id": 880, "type": "argument_list", "text": "(\"GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\\n\", cali[0], cali[1], cali[2])", "parent": 878, "children": [881, 883, 886, 889], "start_point": {"row": 175, "column": 10}, "end_point": {"row": 175, "column": 88}}, {"id": 881, "type": "string_literal", "text": "\"GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\\n\"", "parent": 880, "children": [882], "start_point": {"row": 175, "column": 11}, "end_point": {"row": 175, "column": 60}}, {"id": 882, "type": "escape_sequence", "text": "\\n", "parent": 881, "children": [], "start_point": {"row": 175, "column": 57}, "end_point": {"row": 175, "column": 59}}, {"id": 883, "type": "subscript_expression", "text": "cali[0]", "parent": 880, "children": [884, 885], "start_point": {"row": 175, "column": 62}, "end_point": {"row": 175, "column": 69}}, {"id": 884, "type": "identifier", "text": "cali", "parent": 883, "children": [], "start_point": {"row": 175, "column": 62}, "end_point": {"row": 175, "column": 66}}, {"id": 885, "type": "number_literal", "text": "0", "parent": 883, "children": [], "start_point": {"row": 175, "column": 67}, "end_point": {"row": 175, "column": 68}}, {"id": 886, "type": "subscript_expression", "text": "cali[1]", "parent": 880, "children": [887, 888], "start_point": {"row": 175, "column": 71}, "end_point": {"row": 175, "column": 78}}, {"id": 887, "type": "identifier", "text": "cali", "parent": 886, "children": [], "start_point": {"row": 175, "column": 71}, "end_point": {"row": 175, "column": 75}}, {"id": 888, "type": "number_literal", "text": "1", "parent": 886, "children": [], "start_point": {"row": 175, "column": 76}, "end_point": {"row": 175, "column": 77}}, {"id": 889, "type": "subscript_expression", "text": "cali[2]", "parent": 880, "children": [890, 891], "start_point": {"row": 175, "column": 80}, "end_point": {"row": 175, "column": 87}}, {"id": 890, "type": "identifier", "text": "cali", "parent": 889, "children": [], "start_point": {"row": 175, "column": 80}, "end_point": {"row": 175, "column": 84}}, {"id": 891, "type": "number_literal", "text": "2", "parent": 889, "children": [], "start_point": {"row": 175, "column": 85}, "end_point": {"row": 175, "column": 86}}, {"id": 892, "type": "call_expression", "text": "gyro_set_cali(cali)", "parent": 806, "children": [893, 894], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 27}}, {"id": 893, "type": "identifier", "text": "gyro_set_cali", "parent": 892, "children": [], "start_point": {"row": 176, "column": 8}, "end_point": {"row": 176, "column": 21}}, {"id": 894, "type": "argument_list", "text": "(cali)", "parent": 892, "children": [895], "start_point": {"row": 176, "column": 21}, "end_point": {"row": 176, "column": 27}}, {"id": 895, "type": "identifier", "text": "cali", "parent": 894, "children": [], "start_point": {"row": 176, "column": 22}, "end_point": {"row": 176, "column": 26}}, {"id": 896, "type": "break_statement", "text": "break;", "parent": 806, "children": [897], "start_point": {"row": 188, "column": 8}, "end_point": {"row": 188, "column": 14}}, {"id": 897, "type": "break", "text": "break", "parent": 896, "children": [], "start_point": {"row": 188, "column": 8}, "end_point": {"row": 188, "column": 13}}, {"id": 898, "type": "case_statement", "text": "case GYROSCOPE_IOCTL_CLR_CALI:\n\t\t/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n\t\t{\n\t\t\terr = cxt->gyro_ctl.gyro_calibration(CLRCALI, cali);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_CLR_CALI fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} \n\t\t*/\n\t\tgyro_clear_cali();\n break;", "parent": 406, "children": [899, 900, 904], "start_point": {"row": 190, "column": 4}, "end_point": {"row": 203, "column": 14}}, {"id": 899, "type": "case", "text": "case", "parent": 898, "children": [], "start_point": {"row": 190, "column": 4}, "end_point": {"row": 190, "column": 8}}, {"id": 900, "type": "identifier", "text": "GYROSCOPE_IOCTL_CLR_CALI", "parent": 898, "children": [], "start_point": {"row": 190, "column": 9}, "end_point": {"row": 190, "column": 33}}, {"id": 901, "type": "call_expression", "text": "gyro_clear_cali()", "parent": 898, "children": [902, 903], "start_point": {"row": 202, "column": 2}, "end_point": {"row": 202, "column": 19}}, {"id": 902, "type": "identifier", "text": "gyro_clear_cali", "parent": 901, "children": [], "start_point": {"row": 202, "column": 2}, "end_point": {"row": 202, "column": 17}}, {"id": 903, "type": "argument_list", "text": "()", "parent": 901, "children": [], "start_point": {"row": 202, "column": 17}, "end_point": {"row": 202, "column": 19}}, {"id": 904, "type": "break_statement", "text": "break;", "parent": 898, "children": [905], "start_point": {"row": 203, "column": 8}, "end_point": {"row": 203, "column": 14}}, {"id": 905, "type": "break", "text": "break", "parent": 904, "children": [], "start_point": {"row": 203, "column": 8}, "end_point": {"row": 203, "column": 13}}, {"id": 906, "type": "case_statement", "text": "case GYROSCOPE_IOCTL_GET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\t/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n\t\t{\n\t\t\terr = cxt->gyro_ctl.gyro_calibration(GETCALI, cali);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_GET_CALI fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\\n\", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2]);\n sensor_data.x = cxt->cali_sw[0]; ; \n sensor_data.y = cxt->cali_sw[1]; ;\n sensor_data.z = cxt->cali_sw[2]; ;\n if (copy_to_user(data, &sensor_data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break;\n }\n break;", "parent": 406, "children": [907, 908, 920, 985, 1004], "start_point": {"row": 205, "column": 4}, "end_point": {"row": 232, "column": 14}}, {"id": 907, "type": "case", "text": "case", "parent": 906, "children": [], "start_point": {"row": 205, "column": 4}, "end_point": {"row": 205, "column": 8}}, {"id": 908, "type": "identifier", "text": "GYROSCOPE_IOCTL_GET_CALI", "parent": 906, "children": [], "start_point": {"row": 205, "column": 9}, "end_point": {"row": 205, "column": 33}}, {"id": 909, "type": "assignment_expression", "text": "data = (void __user*)arg", "parent": 906, "children": [910, 911, 912], "start_point": {"row": 206, "column": 8}, "end_point": {"row": 206, "column": 32}}, {"id": 910, "type": "identifier", "text": "data", "parent": 909, "children": [], "start_point": {"row": 206, "column": 8}, "end_point": {"row": 206, "column": 12}}, {"id": 911, "type": "=", "text": "=", "parent": 909, "children": [], "start_point": {"row": 206, "column": 13}, "end_point": {"row": 206, "column": 14}}, {"id": 912, "type": "cast_expression", "text": "(void __user*)arg", "parent": 909, "children": [913, 915, 919], "start_point": {"row": 206, "column": 15}, "end_point": {"row": 206, "column": 32}}, {"id": 913, "type": "ERROR", "text": "void", "parent": 912, "children": [914], "start_point": {"row": 206, "column": 16}, "end_point": {"row": 206, "column": 20}}, {"id": 914, "type": "primitive_type", "text": "void", "parent": 913, "children": [], "start_point": {"row": 206, "column": 16}, "end_point": {"row": 206, "column": 20}}, {"id": 915, "type": "type_descriptor", "text": "__user*", "parent": 912, "children": [916, 917], "start_point": {"row": 206, "column": 21}, "end_point": {"row": 206, "column": 28}}, {"id": 916, "type": "type_identifier", "text": "__user", "parent": 915, "children": [], "start_point": {"row": 206, "column": 21}, "end_point": {"row": 206, "column": 27}}, {"id": 917, "type": "abstract_pointer_declarator", "text": "*", "parent": 915, "children": [918], "start_point": {"row": 206, "column": 27}, "end_point": {"row": 206, "column": 28}}, {"id": 918, "type": "*", "text": "*", "parent": 917, "children": [], "start_point": {"row": 206, "column": 27}, "end_point": {"row": 206, "column": 28}}, {"id": 919, "type": "identifier", "text": "arg", "parent": 912, "children": [], "start_point": {"row": 206, "column": 29}, "end_point": {"row": 206, "column": 32}}, {"id": 920, "type": "if_statement", "text": "if (data == NULL)\n {\n err = -EINVAL;\n break; \n }", "parent": 906, "children": [921], "start_point": {"row": 207, "column": 8}, "end_point": {"row": 211, "column": 9}}, {"id": 921, "type": "parenthesized_expression", "text": "(data == NULL)", "parent": 920, "children": [922], "start_point": {"row": 207, "column": 11}, "end_point": {"row": 207, "column": 25}}, {"id": 922, "type": "binary_expression", "text": "data == NULL", "parent": 921, "children": [923, 924, 925], "start_point": {"row": 207, "column": 12}, "end_point": {"row": 207, "column": 24}}, {"id": 923, "type": "identifier", "text": "data", "parent": 922, "children": [], "start_point": {"row": 207, "column": 12}, "end_point": {"row": 207, "column": 16}}, {"id": 924, "type": "==", "text": "==", "parent": 922, "children": [], "start_point": {"row": 207, "column": 17}, "end_point": {"row": 207, "column": 19}}, {"id": 925, "type": "null", "text": "NULL", "parent": 922, "children": [926], "start_point": {"row": 207, "column": 20}, "end_point": {"row": 207, "column": 24}}, {"id": 926, "type": "NULL", "text": "NULL", "parent": 925, "children": [], "start_point": {"row": 207, "column": 20}, "end_point": {"row": 207, "column": 24}}, {"id": 927, "type": "assignment_expression", "text": "err = -EINVAL", "parent": 920, "children": [928, 929, 930], "start_point": {"row": 209, "column": 12}, "end_point": {"row": 209, "column": 25}}, {"id": 928, "type": "identifier", "text": "err", "parent": 927, "children": [], "start_point": {"row": 209, "column": 12}, "end_point": {"row": 209, "column": 15}}, {"id": 929, "type": "=", "text": "=", "parent": 927, "children": [], "start_point": {"row": 209, "column": 16}, "end_point": {"row": 209, "column": 17}}, {"id": 930, "type": "unary_expression", "text": "-EINVAL", "parent": 927, "children": [931, 932], "start_point": {"row": 209, "column": 18}, "end_point": {"row": 209, "column": 25}}, {"id": 931, "type": "-", "text": "-", "parent": 930, "children": [], "start_point": {"row": 209, "column": 18}, "end_point": {"row": 209, "column": 19}}, {"id": 932, "type": "identifier", "text": "EINVAL", "parent": 930, "children": [], "start_point": {"row": 209, "column": 19}, "end_point": {"row": 209, "column": 25}}, {"id": 933, "type": "break_statement", "text": "break;", "parent": 920, "children": [934], "start_point": {"row": 210, "column": 12}, "end_point": {"row": 210, "column": 18}}, {"id": 934, "type": "break", "text": "break", "parent": 933, "children": [], "start_point": {"row": 210, "column": 12}, "end_point": {"row": 210, "column": 17}}, {"id": 935, "type": "call_expression", "text": "GYRO_LOG(\"GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\\n\", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2])", "parent": 906, "children": [936, 937], "start_point": {"row": 223, "column": 2}, "end_point": {"row": 223, "column": 113}}, {"id": 936, "type": "identifier", "text": "GYRO_LOG", "parent": 935, "children": [], "start_point": {"row": 223, "column": 2}, "end_point": {"row": 223, "column": 10}}, {"id": 937, "type": "argument_list", "text": "(\"GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\\n\", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2])", "parent": 935, "children": [938, 940, 945, 950], "start_point": {"row": 223, "column": 10}, "end_point": {"row": 223, "column": 113}}, {"id": 938, "type": "string_literal", "text": "\"GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\\n\"", "parent": 937, "children": [939], "start_point": {"row": 223, "column": 11}, "end_point": {"row": 223, "column": 60}}, {"id": 939, "type": "escape_sequence", "text": "\\n", "parent": 938, "children": [], "start_point": {"row": 223, "column": 57}, "end_point": {"row": 223, "column": 59}}, {"id": 940, "type": "subscript_expression", "text": "cxt->cali_sw[0]", "parent": 937, "children": [941, 944], "start_point": {"row": 223, "column": 62}, "end_point": {"row": 223, "column": 77}}, {"id": 941, "type": "field_expression", "text": "cxt->cali_sw", "parent": 940, "children": [942, 943], "start_point": {"row": 223, "column": 62}, "end_point": {"row": 223, "column": 74}}, {"id": 942, "type": "identifier", "text": "cxt", "parent": 941, "children": [], "start_point": {"row": 223, "column": 62}, "end_point": {"row": 223, "column": 65}}, {"id": 943, "type": "field_identifier", "text": "cali_sw", "parent": 941, "children": [], "start_point": {"row": 223, "column": 67}, "end_point": {"row": 223, "column": 74}}, {"id": 944, "type": "number_literal", "text": "0", "parent": 940, "children": [], "start_point": {"row": 223, "column": 75}, "end_point": {"row": 223, "column": 76}}, {"id": 945, "type": "subscript_expression", "text": "cxt->cali_sw[1]", "parent": 937, "children": [946, 949], "start_point": {"row": 223, "column": 80}, "end_point": {"row": 223, "column": 95}}, {"id": 946, "type": "field_expression", "text": "cxt->cali_sw", "parent": 945, "children": [947, 948], "start_point": {"row": 223, "column": 80}, "end_point": {"row": 223, "column": 92}}, {"id": 947, "type": "identifier", "text": "cxt", "parent": 946, "children": [], "start_point": {"row": 223, "column": 80}, "end_point": {"row": 223, "column": 83}}, {"id": 948, "type": "field_identifier", "text": "cali_sw", "parent": 946, "children": [], "start_point": {"row": 223, "column": 85}, "end_point": {"row": 223, "column": 92}}, {"id": 949, "type": "number_literal", "text": "1", "parent": 945, "children": [], "start_point": {"row": 223, "column": 93}, "end_point": {"row": 223, "column": 94}}, {"id": 950, "type": "subscript_expression", "text": "cxt->cali_sw[2]", "parent": 937, "children": [951, 954], "start_point": {"row": 223, "column": 97}, "end_point": {"row": 223, "column": 112}}, {"id": 951, "type": "field_expression", "text": "cxt->cali_sw", "parent": 950, "children": [952, 953], "start_point": {"row": 223, "column": 97}, "end_point": {"row": 223, "column": 109}}, {"id": 952, "type": "identifier", "text": "cxt", "parent": 951, "children": [], "start_point": {"row": 223, "column": 97}, "end_point": {"row": 223, "column": 100}}, {"id": 953, "type": "field_identifier", "text": "cali_sw", "parent": 951, "children": [], "start_point": {"row": 223, "column": 102}, "end_point": {"row": 223, "column": 109}}, {"id": 954, "type": "number_literal", "text": "2", "parent": 950, "children": [], "start_point": {"row": 223, "column": 110}, "end_point": {"row": 223, "column": 111}}, {"id": 955, "type": "assignment_expression", "text": "sensor_data.x = cxt->cali_sw[0]", "parent": 906, "children": [956, 959, 960], "start_point": {"row": 224, "column": 8}, "end_point": {"row": 224, "column": 39}}, {"id": 956, "type": "field_expression", "text": "sensor_data.x", "parent": 955, "children": [957, 958], "start_point": {"row": 224, "column": 8}, "end_point": {"row": 224, "column": 21}}, {"id": 957, "type": "identifier", "text": "sensor_data", "parent": 956, "children": [], "start_point": {"row": 224, "column": 8}, "end_point": {"row": 224, "column": 19}}, {"id": 958, "type": "field_identifier", "text": "x", "parent": 956, "children": [], "start_point": {"row": 224, "column": 20}, "end_point": {"row": 224, "column": 21}}, {"id": 959, "type": "=", "text": "=", "parent": 955, "children": [], "start_point": {"row": 224, "column": 22}, "end_point": {"row": 224, "column": 23}}, {"id": 960, "type": "subscript_expression", "text": "cxt->cali_sw[0]", "parent": 955, "children": [961, 964], "start_point": {"row": 224, "column": 24}, "end_point": {"row": 224, "column": 39}}, {"id": 961, "type": "field_expression", "text": "cxt->cali_sw", "parent": 960, "children": [962, 963], "start_point": {"row": 224, "column": 24}, "end_point": {"row": 224, "column": 36}}, {"id": 962, "type": "identifier", "text": "cxt", "parent": 961, "children": [], "start_point": {"row": 224, "column": 24}, "end_point": {"row": 224, "column": 27}}, {"id": 963, "type": "field_identifier", "text": "cali_sw", "parent": 961, "children": [], "start_point": {"row": 224, "column": 29}, "end_point": {"row": 224, "column": 36}}, {"id": 964, "type": "number_literal", "text": "0", "parent": 960, "children": [], "start_point": {"row": 224, "column": 37}, "end_point": {"row": 224, "column": 38}}, {"id": 965, "type": "assignment_expression", "text": "sensor_data.y = cxt->cali_sw[1]", "parent": 906, "children": [966, 969, 970], "start_point": {"row": 225, "column": 8}, "end_point": {"row": 225, "column": 39}}, {"id": 966, "type": "field_expression", "text": "sensor_data.y", "parent": 965, "children": [967, 968], "start_point": {"row": 225, "column": 8}, "end_point": {"row": 225, "column": 21}}, {"id": 967, "type": "identifier", "text": "sensor_data", "parent": 966, "children": [], "start_point": {"row": 225, "column": 8}, "end_point": {"row": 225, "column": 19}}, {"id": 968, "type": "field_identifier", "text": "y", "parent": 966, "children": [], "start_point": {"row": 225, "column": 20}, "end_point": {"row": 225, "column": 21}}, {"id": 969, "type": "=", "text": "=", "parent": 965, "children": [], "start_point": {"row": 225, "column": 22}, "end_point": {"row": 225, "column": 23}}, {"id": 970, "type": "subscript_expression", "text": "cxt->cali_sw[1]", "parent": 965, "children": [971, 974], "start_point": {"row": 225, "column": 24}, "end_point": {"row": 225, "column": 39}}, {"id": 971, "type": "field_expression", "text": "cxt->cali_sw", "parent": 970, "children": [972, 973], "start_point": {"row": 225, "column": 24}, "end_point": {"row": 225, "column": 36}}, {"id": 972, "type": "identifier", "text": "cxt", "parent": 971, "children": [], "start_point": {"row": 225, "column": 24}, "end_point": {"row": 225, "column": 27}}, {"id": 973, "type": "field_identifier", "text": "cali_sw", "parent": 971, "children": [], "start_point": {"row": 225, "column": 29}, "end_point": {"row": 225, "column": 36}}, {"id": 974, "type": "number_literal", "text": "1", "parent": 970, "children": [], "start_point": {"row": 225, "column": 37}, "end_point": {"row": 225, "column": 38}}, {"id": 975, "type": "assignment_expression", "text": "sensor_data.z = cxt->cali_sw[2]", "parent": 906, "children": [976, 979, 980], "start_point": {"row": 226, "column": 8}, "end_point": {"row": 226, "column": 39}}, {"id": 976, "type": "field_expression", "text": "sensor_data.z", "parent": 975, "children": [977, 978], "start_point": {"row": 226, "column": 8}, "end_point": {"row": 226, "column": 21}}, {"id": 977, "type": "identifier", "text": "sensor_data", "parent": 976, "children": [], "start_point": {"row": 226, "column": 8}, "end_point": {"row": 226, "column": 19}}, {"id": 978, "type": "field_identifier", "text": "z", "parent": 976, "children": [], "start_point": {"row": 226, "column": 20}, "end_point": {"row": 226, "column": 21}}, {"id": 979, "type": "=", "text": "=", "parent": 975, "children": [], "start_point": {"row": 226, "column": 22}, "end_point": {"row": 226, "column": 23}}, {"id": 980, "type": "subscript_expression", "text": "cxt->cali_sw[2]", "parent": 975, "children": [981, 984], "start_point": {"row": 226, "column": 24}, "end_point": {"row": 226, "column": 39}}, {"id": 981, "type": "field_expression", "text": "cxt->cali_sw", "parent": 980, "children": [982, 983], "start_point": {"row": 226, "column": 24}, "end_point": {"row": 226, "column": 36}}, {"id": 982, "type": "identifier", "text": "cxt", "parent": 981, "children": [], "start_point": {"row": 226, "column": 24}, "end_point": {"row": 226, "column": 27}}, {"id": 983, "type": "field_identifier", "text": "cali_sw", "parent": 981, "children": [], "start_point": {"row": 226, "column": 29}, "end_point": {"row": 226, "column": 36}}, {"id": 984, "type": "number_literal", "text": "2", "parent": 980, "children": [], "start_point": {"row": 226, "column": 37}, "end_point": {"row": 226, "column": 38}}, {"id": 985, "type": "if_statement", "text": "if (copy_to_user(data, &sensor_data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break;\n }", "parent": 906, "children": [986], "start_point": {"row": 227, "column": 8}, "end_point": {"row": 231, "column": 9}}, {"id": 986, "type": "parenthesized_expression", "text": "(copy_to_user(data, &sensor_data, sizeof(sensor_data)))", "parent": 985, "children": [987], "start_point": {"row": 227, "column": 11}, "end_point": {"row": 227, "column": 66}}, {"id": 987, "type": "call_expression", "text": "copy_to_user(data, &sensor_data, sizeof(sensor_data))", "parent": 986, "children": [988, 989], "start_point": {"row": 227, "column": 12}, "end_point": {"row": 227, "column": 65}}, {"id": 988, "type": "identifier", "text": "copy_to_user", "parent": 987, "children": [], "start_point": {"row": 227, "column": 12}, "end_point": {"row": 227, "column": 24}}, {"id": 989, "type": "argument_list", "text": "(data, &sensor_data, sizeof(sensor_data))", "parent": 987, "children": [990, 991, 993], "start_point": {"row": 227, "column": 24}, "end_point": {"row": 227, "column": 65}}, {"id": 990, "type": "identifier", "text": "data", "parent": 989, "children": [], "start_point": {"row": 227, "column": 25}, "end_point": {"row": 227, "column": 29}}, {"id": 991, "type": "pointer_expression", "text": "&sensor_data", "parent": 989, "children": [992], "start_point": {"row": 227, "column": 31}, "end_point": {"row": 227, "column": 43}}, {"id": 992, "type": "identifier", "text": "sensor_data", "parent": 991, "children": [], "start_point": {"row": 227, "column": 32}, "end_point": {"row": 227, "column": 43}}, {"id": 993, "type": "sizeof_expression", "text": "sizeof(sensor_data)", "parent": 989, "children": [994], "start_point": {"row": 227, "column": 45}, "end_point": {"row": 227, "column": 64}}, {"id": 994, "type": "parenthesized_expression", "text": "(sensor_data)", "parent": 993, "children": [995], "start_point": {"row": 227, "column": 51}, "end_point": {"row": 227, "column": 64}}, {"id": 995, "type": "identifier", "text": "sensor_data", "parent": 994, "children": [], "start_point": {"row": 227, "column": 52}, "end_point": {"row": 227, "column": 63}}, {"id": 996, "type": "assignment_expression", "text": "err = -EFAULT", "parent": 985, "children": [997, 998, 999], "start_point": {"row": 229, "column": 12}, "end_point": {"row": 229, "column": 25}}, {"id": 997, "type": "identifier", "text": "err", "parent": 996, "children": [], "start_point": {"row": 229, "column": 12}, "end_point": {"row": 229, "column": 15}}, {"id": 998, "type": "=", "text": "=", "parent": 996, "children": [], "start_point": {"row": 229, "column": 16}, "end_point": {"row": 229, "column": 17}}, {"id": 999, "type": "unary_expression", "text": "-EFAULT", "parent": 996, "children": [1000, 1001], "start_point": {"row": 229, "column": 18}, "end_point": {"row": 229, "column": 25}}, {"id": 1000, "type": "-", "text": "-", "parent": 999, "children": [], "start_point": {"row": 229, "column": 18}, "end_point": {"row": 229, "column": 19}}, {"id": 1001, "type": "identifier", "text": "EFAULT", "parent": 999, "children": [], "start_point": {"row": 229, "column": 19}, "end_point": {"row": 229, "column": 25}}, {"id": 1002, "type": "break_statement", "text": "break;", "parent": 985, "children": [1003], "start_point": {"row": 230, "column": 12}, "end_point": {"row": 230, "column": 18}}, {"id": 1003, "type": "break", "text": "break", "parent": 1002, "children": [], "start_point": {"row": 230, "column": 12}, "end_point": {"row": 230, "column": 17}}, {"id": 1004, "type": "break_statement", "text": "break;", "parent": 906, "children": [1005], "start_point": {"row": 232, "column": 8}, "end_point": {"row": 232, "column": 14}}, {"id": 1005, "type": "break", "text": "break", "parent": 1004, "children": [], "start_point": {"row": 232, "column": 8}, "end_point": {"row": 232, "column": 13}}, {"id": 1006, "type": "case_statement", "text": "default:\n GYRO_LOG(\"unknown IOCTL: 0x%08x\\n\", cmd);\n err = -ENOIOCTLCMD;\n break;", "parent": 406, "children": [1007, 1020], "start_point": {"row": 234, "column": 4}, "end_point": {"row": 237, "column": 14}}, {"id": 1007, "type": "default", "text": "default", "parent": 1006, "children": [], "start_point": {"row": 234, "column": 4}, "end_point": {"row": 234, "column": 11}}, {"id": 1008, "type": "call_expression", "text": "GYRO_LOG(\"unknown IOCTL: 0x%08x\\n\", cmd)", "parent": 1006, "children": [1009, 1010], "start_point": {"row": 235, "column": 8}, "end_point": {"row": 235, "column": 48}}, {"id": 1009, "type": "identifier", "text": "GYRO_LOG", "parent": 1008, "children": [], "start_point": {"row": 235, "column": 8}, "end_point": {"row": 235, "column": 16}}, {"id": 1010, "type": "argument_list", "text": "(\"unknown IOCTL: 0x%08x\\n\", cmd)", "parent": 1008, "children": [1011, 1013], "start_point": {"row": 235, "column": 16}, "end_point": {"row": 235, "column": 48}}, {"id": 1011, "type": "string_literal", "text": "\"unknown IOCTL: 0x%08x\\n\"", "parent": 1010, "children": [1012], "start_point": {"row": 235, "column": 17}, "end_point": {"row": 235, "column": 42}}, {"id": 1012, "type": "escape_sequence", "text": "\\n", "parent": 1011, "children": [], "start_point": {"row": 235, "column": 39}, "end_point": {"row": 235, "column": 41}}, {"id": 1013, "type": "identifier", "text": "cmd", "parent": 1010, "children": [], "start_point": {"row": 235, "column": 44}, "end_point": {"row": 235, "column": 47}}, {"id": 1014, "type": "assignment_expression", "text": "err = -ENOIOCTLCMD", "parent": 1006, "children": [1015, 1016, 1017], "start_point": {"row": 236, "column": 8}, "end_point": {"row": 236, "column": 26}}, {"id": 1015, "type": "identifier", "text": "err", "parent": 1014, "children": [], "start_point": {"row": 236, "column": 8}, "end_point": {"row": 236, "column": 11}}, {"id": 1016, "type": "=", "text": "=", "parent": 1014, "children": [], "start_point": {"row": 236, "column": 12}, "end_point": {"row": 236, "column": 13}}, {"id": 1017, "type": "unary_expression", "text": "-ENOIOCTLCMD", "parent": 1014, "children": [1018, 1019], "start_point": {"row": 236, "column": 14}, "end_point": {"row": 236, "column": 26}}, {"id": 1018, "type": "-", "text": "-", "parent": 1017, "children": [], "start_point": {"row": 236, "column": 14}, "end_point": {"row": 236, "column": 15}}, {"id": 1019, "type": "identifier", "text": "ENOIOCTLCMD", "parent": 1017, "children": [], "start_point": {"row": 236, "column": 15}, "end_point": {"row": 236, "column": 26}}, {"id": 1020, "type": "break_statement", "text": "break;", "parent": 1006, "children": [1021], "start_point": {"row": 237, "column": 8}, "end_point": {"row": 237, "column": 14}}, {"id": 1021, "type": "break", "text": "break", "parent": 1020, "children": [], "start_point": {"row": 237, "column": 8}, "end_point": {"row": 237, "column": 13}}, {"id": 1022, "type": "return_statement", "text": "return err;", "parent": 249, "children": [1023], "start_point": {"row": 240, "column": 4}, "end_point": {"row": 240, "column": 15}}, {"id": 1023, "type": "identifier", "text": "err", "parent": 1022, "children": [], "start_point": {"row": 240, "column": 11}, "end_point": {"row": 240, "column": 14}}, {"id": 1024, "type": "declaration", "text": "static struct file_operations gyro_factory_fops = {\n .open = gyro_factory_open,\n .release = gyro_factory_release,\n .unlocked_ioctl = gyro_factory_unlocked_ioctl,\n};", "parent": null, "children": [1025, 1028], "start_point": {"row": 244, "column": 0}, "end_point": {"row": 248, "column": 2}}, {"id": 1025, "type": "struct_specifier", "text": "struct file_operations", "parent": 1024, "children": [1026, 1027], "start_point": {"row": 244, "column": 7}, "end_point": {"row": 244, "column": 29}}, {"id": 1026, "type": "struct", "text": "struct", "parent": 1025, "children": [], "start_point": {"row": 244, "column": 7}, "end_point": {"row": 244, "column": 13}}, {"id": 1027, "type": "type_identifier", "text": "file_operations", "parent": 1025, "children": [], "start_point": {"row": 244, "column": 14}, "end_point": {"row": 244, "column": 29}}, {"id": 1028, "type": "init_declarator", "text": "gyro_factory_fops = {\n .open = gyro_factory_open,\n .release = gyro_factory_release,\n .unlocked_ioctl = gyro_factory_unlocked_ioctl,\n}", "parent": 1024, "children": [1029, 1030, 1031], "start_point": {"row": 244, "column": 30}, "end_point": {"row": 248, "column": 1}}, {"id": 1029, "type": "identifier", "text": "gyro_factory_fops", "parent": 1028, "children": [], "start_point": {"row": 244, "column": 30}, "end_point": {"row": 244, "column": 47}}, {"id": 1030, "type": "=", "text": "=", "parent": 1028, "children": [], "start_point": {"row": 244, "column": 48}, "end_point": {"row": 244, "column": 49}}, {"id": 1031, "type": "initializer_list", "text": "{\n .open = gyro_factory_open,\n .release = gyro_factory_release,\n .unlocked_ioctl = gyro_factory_unlocked_ioctl,\n}", "parent": 1028, "children": [1032, 1037, 1042], "start_point": {"row": 244, "column": 50}, "end_point": {"row": 248, "column": 1}}, {"id": 1032, "type": "initializer_pair", "text": ".open = gyro_factory_open", "parent": 1031, "children": [1033, 1035, 1036], "start_point": {"row": 245, "column": 4}, "end_point": {"row": 245, "column": 29}}, {"id": 1033, "type": "field_designator", "text": ".open", "parent": 1032, "children": [1034], "start_point": {"row": 245, "column": 4}, "end_point": {"row": 245, "column": 9}}, {"id": 1034, "type": "field_identifier", "text": "open", "parent": 1033, "children": [], "start_point": {"row": 245, "column": 5}, "end_point": {"row": 245, "column": 9}}, {"id": 1035, "type": "=", "text": "=", "parent": 1032, "children": [], "start_point": {"row": 245, "column": 10}, "end_point": {"row": 245, "column": 11}}, {"id": 1036, "type": "identifier", "text": "gyro_factory_open", "parent": 1032, "children": [], "start_point": {"row": 245, "column": 12}, "end_point": {"row": 245, "column": 29}}, {"id": 1037, "type": "initializer_pair", "text": ".release = gyro_factory_release", "parent": 1031, "children": [1038, 1040, 1041], "start_point": {"row": 246, "column": 4}, "end_point": {"row": 246, "column": 35}}, {"id": 1038, "type": "field_designator", "text": ".release", "parent": 1037, "children": [1039], "start_point": {"row": 246, "column": 4}, "end_point": {"row": 246, "column": 12}}, {"id": 1039, "type": "field_identifier", "text": "release", "parent": 1038, "children": [], "start_point": {"row": 246, "column": 5}, "end_point": {"row": 246, "column": 12}}, {"id": 1040, "type": "=", "text": "=", "parent": 1037, "children": [], "start_point": {"row": 246, "column": 13}, "end_point": {"row": 246, "column": 14}}, {"id": 1041, "type": "identifier", "text": "gyro_factory_release", "parent": 1037, "children": [], "start_point": {"row": 246, "column": 15}, "end_point": {"row": 246, "column": 35}}, {"id": 1042, "type": "initializer_pair", "text": ".unlocked_ioctl = gyro_factory_unlocked_ioctl", "parent": 1031, "children": [1043, 1045, 1046], "start_point": {"row": 247, "column": 4}, "end_point": {"row": 247, "column": 49}}, {"id": 1043, "type": "field_designator", "text": ".unlocked_ioctl", "parent": 1042, "children": [1044], "start_point": {"row": 247, "column": 4}, "end_point": {"row": 247, "column": 19}}, {"id": 1044, "type": "field_identifier", "text": "unlocked_ioctl", "parent": 1043, "children": [], "start_point": {"row": 247, "column": 5}, "end_point": {"row": 247, "column": 19}}, {"id": 1045, "type": "=", "text": "=", "parent": 1042, "children": [], "start_point": {"row": 247, "column": 20}, "end_point": {"row": 247, "column": 21}}, {"id": 1046, "type": "identifier", "text": "gyro_factory_unlocked_ioctl", "parent": 1042, "children": [], "start_point": {"row": 247, "column": 22}, "end_point": {"row": 247, "column": 49}}, {"id": 1047, "type": "declaration", "text": "static struct miscdevice gyro_factory_device = {\n .minor = MISC_DYNAMIC_MINOR,\n .name = \"gyroscope\",\n .fops = &gyro_factory_fops,\n};", "parent": null, "children": [1048, 1051], "start_point": {"row": 250, "column": 0}, "end_point": {"row": 254, "column": 2}}, {"id": 1048, "type": "struct_specifier", "text": "struct miscdevice", "parent": 1047, "children": [1049, 1050], "start_point": {"row": 250, "column": 7}, "end_point": {"row": 250, "column": 24}}, {"id": 1049, "type": "struct", "text": "struct", "parent": 1048, "children": [], "start_point": {"row": 250, "column": 7}, "end_point": {"row": 250, "column": 13}}, {"id": 1050, "type": "type_identifier", "text": "miscdevice", "parent": 1048, "children": [], "start_point": {"row": 250, "column": 14}, "end_point": {"row": 250, "column": 24}}, {"id": 1051, "type": "init_declarator", "text": "gyro_factory_device = {\n .minor = MISC_DYNAMIC_MINOR,\n .name = \"gyroscope\",\n .fops = &gyro_factory_fops,\n}", "parent": 1047, "children": [1052, 1053, 1054], "start_point": {"row": 250, "column": 25}, "end_point": {"row": 254, "column": 1}}, {"id": 1052, "type": "identifier", "text": "gyro_factory_device", "parent": 1051, "children": [], "start_point": {"row": 250, "column": 25}, "end_point": {"row": 250, "column": 44}}, {"id": 1053, "type": "=", "text": "=", "parent": 1051, "children": [], "start_point": {"row": 250, "column": 45}, "end_point": {"row": 250, "column": 46}}, {"id": 1054, "type": "initializer_list", "text": "{\n .minor = MISC_DYNAMIC_MINOR,\n .name = \"gyroscope\",\n .fops = &gyro_factory_fops,\n}", "parent": 1051, "children": [1055, 1060, 1065], "start_point": {"row": 250, "column": 47}, "end_point": {"row": 254, "column": 1}}, {"id": 1055, "type": "initializer_pair", "text": ".minor = MISC_DYNAMIC_MINOR", "parent": 1054, "children": [1056, 1058, 1059], "start_point": {"row": 251, "column": 4}, "end_point": {"row": 251, "column": 31}}, {"id": 1056, "type": "field_designator", "text": ".minor", "parent": 1055, "children": [1057], "start_point": {"row": 251, "column": 4}, "end_point": {"row": 251, "column": 10}}, {"id": 1057, "type": "field_identifier", "text": "minor", "parent": 1056, "children": [], "start_point": {"row": 251, "column": 5}, "end_point": {"row": 251, "column": 10}}, {"id": 1058, "type": "=", "text": "=", "parent": 1055, "children": [], "start_point": {"row": 251, "column": 11}, "end_point": {"row": 251, "column": 12}}, {"id": 1059, "type": "identifier", "text": "MISC_DYNAMIC_MINOR", "parent": 1055, "children": [], "start_point": {"row": 251, "column": 13}, "end_point": {"row": 251, "column": 31}}, {"id": 1060, "type": "initializer_pair", "text": ".name = \"gyroscope\"", "parent": 1054, "children": [1061, 1063, 1064], "start_point": {"row": 252, "column": 4}, "end_point": {"row": 252, "column": 23}}, {"id": 1061, "type": "field_designator", "text": ".name", "parent": 1060, "children": [1062], "start_point": {"row": 252, "column": 4}, "end_point": {"row": 252, "column": 9}}, {"id": 1062, "type": "field_identifier", "text": "name", "parent": 1061, "children": [], "start_point": {"row": 252, "column": 5}, "end_point": {"row": 252, "column": 9}}, {"id": 1063, "type": "=", "text": "=", "parent": 1060, "children": [], "start_point": {"row": 252, "column": 10}, "end_point": {"row": 252, "column": 11}}, {"id": 1064, "type": "string_literal", "text": "\"gyroscope\"", "parent": 1060, "children": [], "start_point": {"row": 252, "column": 12}, "end_point": {"row": 252, "column": 23}}, {"id": 1065, "type": "initializer_pair", "text": ".fops = &gyro_factory_fops", "parent": 1054, "children": [1066, 1068, 1069], "start_point": {"row": 253, "column": 4}, "end_point": {"row": 253, "column": 30}}, {"id": 1066, "type": "field_designator", "text": ".fops", "parent": 1065, "children": [1067], "start_point": {"row": 253, "column": 4}, "end_point": {"row": 253, "column": 9}}, {"id": 1067, "type": "field_identifier", "text": "fops", "parent": 1066, "children": [], "start_point": {"row": 253, "column": 5}, "end_point": {"row": 253, "column": 9}}, {"id": 1068, "type": "=", "text": "=", "parent": 1065, "children": [], "start_point": {"row": 253, "column": 10}, "end_point": {"row": 253, "column": 11}}, {"id": 1069, "type": "pointer_expression", "text": "&gyro_factory_fops", "parent": 1065, "children": [1070], "start_point": {"row": 253, "column": 12}, "end_point": {"row": 253, "column": 30}}, {"id": 1070, "type": "identifier", "text": "gyro_factory_fops", "parent": 1069, "children": [], "start_point": {"row": 253, "column": 13}, "end_point": {"row": 253, "column": 30}}, {"id": 1071, "type": "function_definition", "text": "int gyro_factory_device_init()\n{\n\tint error = 0;\n\tstruct gyro_context *cxt = gyro_context_obj;\n\n\tif (!cxt->gyro_ctl.is_use_common_factory) {\n\t\tGYRO_LOG(\"Node of '/dev/gyroscope' has already existed!\\n\");\n\t\treturn -1;\n\t}\n if ((error = misc_register(&gyro_factory_device)))\n {\n GYRO_LOG(\"gyro_factory_device register failed\\n\");\n\t\terror = -1;\n }\t\n\treturn error;\n}", "parent": null, "children": [1072, 1073], "start_point": {"row": 256, "column": 0}, "end_point": {"row": 271, "column": 1}}, {"id": 1072, "type": "primitive_type", "text": "int", "parent": 1071, "children": [], "start_point": {"row": 256, "column": 0}, "end_point": {"row": 256, "column": 3}}, {"id": 1073, "type": "function_declarator", "text": "gyro_factory_device_init()", "parent": 1071, "children": [1074, 1075], "start_point": {"row": 256, "column": 4}, "end_point": {"row": 256, "column": 30}}, {"id": 1074, "type": "identifier", "text": "gyro_factory_device_init", "parent": 1073, "children": [], "start_point": {"row": 256, "column": 4}, "end_point": {"row": 256, "column": 28}}, {"id": 1075, "type": "parameter_list", "text": "()", "parent": 1073, "children": [], "start_point": {"row": 256, "column": 28}, "end_point": {"row": 256, "column": 30}}, {"id": 1076, "type": "declaration", "text": "int error = 0;", "parent": 1071, "children": [1077, 1078], "start_point": {"row": 258, "column": 1}, "end_point": {"row": 258, "column": 15}}, {"id": 1077, "type": "primitive_type", "text": "int", "parent": 1076, "children": [], "start_point": {"row": 258, "column": 1}, "end_point": {"row": 258, "column": 4}}, {"id": 1078, "type": "init_declarator", "text": "error = 0", "parent": 1076, "children": [1079, 1080, 1081], "start_point": {"row": 258, "column": 5}, "end_point": {"row": 258, "column": 14}}, {"id": 1079, "type": "identifier", "text": "error", "parent": 1078, "children": [], "start_point": {"row": 258, "column": 5}, "end_point": {"row": 258, "column": 10}}, {"id": 1080, "type": "=", "text": "=", "parent": 1078, "children": [], "start_point": {"row": 258, "column": 11}, "end_point": {"row": 258, "column": 12}}, {"id": 1081, "type": "number_literal", "text": "0", "parent": 1078, "children": [], "start_point": {"row": 258, "column": 13}, "end_point": {"row": 258, "column": 14}}, {"id": 1082, "type": "declaration", "text": "struct gyro_context *cxt = gyro_context_obj;", "parent": 1071, "children": [1083, 1086], "start_point": {"row": 259, "column": 1}, "end_point": {"row": 259, "column": 45}}, {"id": 1083, "type": "struct_specifier", "text": "struct gyro_context", "parent": 1082, "children": [1084, 1085], "start_point": {"row": 259, "column": 1}, "end_point": {"row": 259, "column": 20}}, {"id": 1084, "type": "struct", "text": "struct", "parent": 1083, "children": [], "start_point": {"row": 259, "column": 1}, "end_point": {"row": 259, "column": 7}}, {"id": 1085, "type": "type_identifier", "text": "gyro_context", "parent": 1083, "children": [], "start_point": {"row": 259, "column": 8}, "end_point": {"row": 259, "column": 20}}, {"id": 1086, "type": "init_declarator", "text": "*cxt = gyro_context_obj", "parent": 1082, "children": [1087, 1090, 1091], "start_point": {"row": 259, "column": 21}, "end_point": {"row": 259, "column": 44}}, {"id": 1087, "type": "pointer_declarator", "text": "*cxt", "parent": 1086, "children": [1088, 1089], "start_point": {"row": 259, "column": 21}, "end_point": {"row": 259, "column": 25}}, {"id": 1088, "type": "*", "text": "*", "parent": 1087, "children": [], "start_point": {"row": 259, "column": 21}, "end_point": {"row": 259, "column": 22}}, {"id": 1089, "type": "identifier", "text": "cxt", "parent": 1087, "children": [], "start_point": {"row": 259, "column": 22}, "end_point": {"row": 259, "column": 25}}, {"id": 1090, "type": "=", "text": "=", "parent": 1086, "children": [], "start_point": {"row": 259, "column": 26}, "end_point": {"row": 259, "column": 27}}, {"id": 1091, "type": "identifier", "text": "gyro_context_obj", "parent": 1086, "children": [], "start_point": {"row": 259, "column": 28}, "end_point": {"row": 259, "column": 44}}, {"id": 1092, "type": "if_statement", "text": "if (!cxt->gyro_ctl.is_use_common_factory) {\n\t\tGYRO_LOG(\"Node of '/dev/gyroscope' has already existed!\\n\");\n\t\treturn -1;\n\t}", "parent": 1071, "children": [1093], "start_point": {"row": 261, "column": 1}, "end_point": {"row": 264, "column": 2}}, {"id": 1093, "type": "parenthesized_expression", "text": "(!cxt->gyro_ctl.is_use_common_factory)", "parent": 1092, "children": [1094], "start_point": {"row": 261, "column": 4}, "end_point": {"row": 261, "column": 42}}, {"id": 1094, "type": "unary_expression", "text": "!cxt->gyro_ctl.is_use_common_factory", "parent": 1093, "children": [1095, 1096], "start_point": {"row": 261, "column": 5}, "end_point": {"row": 261, "column": 41}}, {"id": 1095, "type": "!", "text": "!", "parent": 1094, "children": [], "start_point": {"row": 261, "column": 5}, "end_point": {"row": 261, "column": 6}}, {"id": 1096, "type": "field_expression", "text": "cxt->gyro_ctl.is_use_common_factory", "parent": 1094, "children": [1097, 1100], "start_point": {"row": 261, "column": 6}, "end_point": {"row": 261, "column": 41}}, {"id": 1097, "type": "field_expression", "text": "cxt->gyro_ctl", "parent": 1096, "children": [1098, 1099], "start_point": {"row": 261, "column": 6}, "end_point": {"row": 261, "column": 19}}, {"id": 1098, "type": "identifier", "text": "cxt", "parent": 1097, "children": [], "start_point": {"row": 261, "column": 6}, "end_point": {"row": 261, "column": 9}}, {"id": 1099, "type": "field_identifier", "text": "gyro_ctl", "parent": 1097, "children": [], "start_point": {"row": 261, "column": 11}, "end_point": {"row": 261, "column": 19}}, {"id": 1100, "type": "field_identifier", "text": "is_use_common_factory", "parent": 1096, "children": [], "start_point": {"row": 261, "column": 20}, "end_point": {"row": 261, "column": 41}}, {"id": 1101, "type": "call_expression", "text": "GYRO_LOG(\"Node of '/dev/gyroscope' has already existed!\\n\")", "parent": 1092, "children": [1102, 1103], "start_point": {"row": 262, "column": 2}, "end_point": {"row": 262, "column": 61}}, {"id": 1102, "type": "identifier", "text": "GYRO_LOG", "parent": 1101, "children": [], "start_point": {"row": 262, "column": 2}, "end_point": {"row": 262, "column": 10}}, {"id": 1103, "type": "argument_list", "text": "(\"Node of '/dev/gyroscope' has already existed!\\n\")", "parent": 1101, "children": [1104], "start_point": {"row": 262, "column": 10}, "end_point": {"row": 262, "column": 61}}, {"id": 1104, "type": "string_literal", "text": "\"Node of '/dev/gyroscope' has already existed!\\n\"", "parent": 1103, "children": [1105], "start_point": {"row": 262, "column": 11}, "end_point": {"row": 262, "column": 60}}, {"id": 1105, "type": "escape_sequence", "text": "\\n", "parent": 1104, "children": [], "start_point": {"row": 262, "column": 57}, "end_point": {"row": 262, "column": 59}}, {"id": 1106, "type": "return_statement", "text": "return -1;", "parent": 1092, "children": [1107], "start_point": {"row": 263, "column": 2}, "end_point": {"row": 263, "column": 12}}, {"id": 1107, "type": "number_literal", "text": "-1", "parent": 1106, "children": [], "start_point": {"row": 263, "column": 9}, "end_point": {"row": 263, "column": 11}}, {"id": 1108, "type": "if_statement", "text": "if ((error = misc_register(&gyro_factory_device)))\n {\n GYRO_LOG(\"gyro_factory_device register failed\\n\");\n\t\terror = -1;\n }", "parent": 1071, "children": [1109], "start_point": {"row": 265, "column": 4}, "end_point": {"row": 269, "column": 5}}, {"id": 1109, "type": "parenthesized_expression", "text": "((error = misc_register(&gyro_factory_device)))", "parent": 1108, "children": [1110], "start_point": {"row": 265, "column": 7}, "end_point": {"row": 265, "column": 54}}, {"id": 1110, "type": "parenthesized_expression", "text": "(error = misc_register(&gyro_factory_device))", "parent": 1109, "children": [1111], "start_point": {"row": 265, "column": 8}, "end_point": {"row": 265, "column": 53}}, {"id": 1111, "type": "assignment_expression", "text": "error = misc_register(&gyro_factory_device)", "parent": 1110, "children": [1112, 1113, 1114], "start_point": {"row": 265, "column": 9}, "end_point": {"row": 265, "column": 52}}, {"id": 1112, "type": "identifier", "text": "error", "parent": 1111, "children": [], "start_point": {"row": 265, "column": 9}, "end_point": {"row": 265, "column": 14}}, {"id": 1113, "type": "=", "text": "=", "parent": 1111, "children": [], "start_point": {"row": 265, "column": 15}, "end_point": {"row": 265, "column": 16}}, {"id": 1114, "type": "call_expression", "text": "misc_register(&gyro_factory_device)", "parent": 1111, "children": [1115, 1116], "start_point": {"row": 265, "column": 17}, "end_point": {"row": 265, "column": 52}}, {"id": 1115, "type": "identifier", "text": "misc_register", "parent": 1114, "children": [], "start_point": {"row": 265, "column": 17}, "end_point": {"row": 265, "column": 30}}, {"id": 1116, "type": "argument_list", "text": "(&gyro_factory_device)", "parent": 1114, "children": [1117], "start_point": {"row": 265, "column": 30}, "end_point": {"row": 265, "column": 52}}, {"id": 1117, "type": "pointer_expression", "text": "&gyro_factory_device", "parent": 1116, "children": [1118], "start_point": {"row": 265, "column": 31}, "end_point": {"row": 265, "column": 51}}, {"id": 1118, "type": "identifier", "text": "gyro_factory_device", "parent": 1117, "children": [], "start_point": {"row": 265, "column": 32}, "end_point": {"row": 265, "column": 51}}, {"id": 1119, "type": "call_expression", "text": "GYRO_LOG(\"gyro_factory_device register failed\\n\")", "parent": 1108, "children": [1120, 1121], "start_point": {"row": 267, "column": 8}, "end_point": {"row": 267, "column": 57}}, {"id": 1120, "type": "identifier", "text": "GYRO_LOG", "parent": 1119, "children": [], "start_point": {"row": 267, "column": 8}, "end_point": {"row": 267, "column": 16}}, {"id": 1121, "type": "argument_list", "text": "(\"gyro_factory_device register failed\\n\")", "parent": 1119, "children": [1122], "start_point": {"row": 267, "column": 16}, "end_point": {"row": 267, "column": 57}}, {"id": 1122, "type": "string_literal", "text": "\"gyro_factory_device register failed\\n\"", "parent": 1121, "children": [1123], "start_point": {"row": 267, "column": 17}, "end_point": {"row": 267, "column": 56}}, {"id": 1123, "type": "escape_sequence", "text": "\\n", "parent": 1122, "children": [], "start_point": {"row": 267, "column": 53}, "end_point": {"row": 267, "column": 55}}, {"id": 1124, "type": "assignment_expression", "text": "error = -1", "parent": 1108, "children": [1125, 1126, 1127], "start_point": {"row": 268, "column": 2}, "end_point": {"row": 268, "column": 12}}, {"id": 1125, "type": "identifier", "text": "error", "parent": 1124, "children": [], "start_point": {"row": 268, "column": 2}, "end_point": {"row": 268, "column": 7}}, {"id": 1126, "type": "=", "text": "=", "parent": 1124, "children": [], "start_point": {"row": 268, "column": 8}, "end_point": {"row": 268, "column": 9}}, {"id": 1127, "type": "number_literal", "text": "-1", "parent": 1124, "children": [], "start_point": {"row": 268, "column": 10}, "end_point": {"row": 268, "column": 12}}, {"id": 1128, "type": "return_statement", "text": "return error;", "parent": 1071, "children": [1129], "start_point": {"row": 270, "column": 1}, "end_point": {"row": 270, "column": 14}}, {"id": 1129, "type": "identifier", "text": "error", "parent": 1128, "children": [], "start_point": {"row": 270, "column": 8}, "end_point": {"row": 270, "column": 13}}]}, "node_categories": {"declarations": {"functions": [3, 5, 52, 54, 80, 82, 186, 188, 249, 252, 1071, 1073], "variables": [8, 15, 57, 64, 85, 90, 191, 193, 255, 262, 267, 272, 279, 286, 296, 302, 307, 316, 323, 1024, 1047, 1076, 1082], "classes": [9, 10, 16, 17, 58, 59, 65, 66, 91, 92, 194, 195, 256, 257, 287, 288, 1025, 1026, 1048, 1049, 1083, 1084], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [23, 29, 30, 31, 37, 43, 47, 72, 100, 105, 108, 111, 114, 119, 120, 124, 125, 129, 130, 135, 136, 141, 145, 146, 151, 155, 156, 161, 164, 169, 170, 174, 175, 179, 180, 204, 205, 212, 213, 220, 221, 227, 232, 233, 237, 238, 242, 243, 327, 328, 329, 337, 339, 343, 351, 357, 358, 359, 367, 369, 373, 381, 386, 388, 394, 398, 403, 408, 414, 415, 416, 417, 427, 428, 429, 436, 437, 441, 448, 454, 466, 475, 476, 484, 496, 500, 502, 503, 506, 511, 514, 527, 536, 537, 545, 551, 552, 553, 554, 564, 565, 566, 571, 573, 575, 577, 580, 581, 585, 595, 596, 603, 604, 611, 612, 616, 624, 632, 639, 640, 645, 646, 655, 661, 673, 682, 683, 691, 697, 698, 699, 700, 710, 711, 712, 717, 719, 721, 724, 725, 729, 739, 740, 747, 748, 755, 756, 760, 768, 777, 778, 783, 784, 793, 799, 812, 821, 822, 830, 836, 837, 840, 843, 844, 849, 855, 859, 863, 867, 871, 875, 878, 883, 886, 889, 892, 901, 912, 921, 922, 930, 935, 940, 941, 945, 946, 950, 951, 956, 960, 961, 966, 970, 971, 976, 980, 981, 986, 987, 991, 993, 994, 999, 1008, 1017, 1069, 1093, 1094, 1096, 1097, 1101, 1109, 1110, 1114, 1117, 1119], "assignments": [22, 71, 134, 144, 154, 203, 211, 219, 334, 364, 424, 463, 481, 489, 493, 508, 524, 542, 561, 592, 600, 608, 652, 670, 688, 707, 736, 744, 752, 790, 809, 827, 846, 854, 862, 870, 909, 927, 955, 965, 975, 996, 1014, 1111, 1124], "loops": [], "conditionals": [6, 11, 14, 18, 21, 24, 25, 27, 28, 32, 33, 38, 45, 48, 50, 51, 55, 60, 63, 67, 70, 73, 74, 83, 88, 89, 93, 97, 99, 101, 106, 107, 109, 110, 112, 113, 115, 121, 122, 123, 126, 127, 128, 131, 132, 133, 137, 138, 139, 142, 143, 147, 148, 149, 152, 153, 157, 158, 159, 162, 163, 165, 171, 172, 173, 176, 177, 178, 181, 182, 183, 189, 196, 200, 202, 206, 207, 208, 214, 215, 216, 222, 223, 224, 228, 234, 235, 236, 239, 240, 241, 244, 245, 246, 250, 253, 258, 261, 263, 266, 268, 271, 275, 278, 280, 283, 289, 293, 295, 298, 299, 300, 301, 305, 311, 317, 319, 325, 326, 330, 332, 333, 335, 340, 342, 347, 350, 352, 354, 356, 360, 362, 363, 365, 370, 372, 377, 380, 382, 384, 385, 387, 389, 393, 395, 397, 399, 401, 405, 406, 407, 409, 410, 411, 412, 413, 418, 419, 420, 425, 430, 431, 432, 435, 438, 442, 449, 455, 460, 461, 462, 464, 470, 473, 474, 477, 482, 486, 490, 494, 497, 499, 501, 504, 505, 507, 509, 513, 515, 521, 522, 523, 525, 531, 534, 535, 538, 543, 547, 550, 555, 556, 557, 562, 567, 568, 569, 572, 574, 576, 578, 579, 582, 586, 593, 597, 598, 601, 605, 606, 609, 613, 614, 617, 619, 621, 622, 623, 625, 629, 630, 631, 633, 637, 638, 641, 643, 644, 647, 649, 653, 657, 662, 667, 668, 669, 671, 677, 680, 681, 684, 689, 693, 696, 701, 702, 703, 708, 713, 714, 715, 718, 720, 722, 723, 726, 730, 737, 741, 742, 745, 749, 750, 753, 757, 758, 761, 763, 765, 766, 767, 769, 773, 774, 775, 776, 779, 781, 782, 785, 787, 791, 795, 800, 806, 807, 808, 810, 816, 819, 820, 823, 828, 832, 835, 838, 841, 842, 845, 847, 851, 856, 860, 861, 864, 868, 869, 872, 876, 877, 879, 884, 887, 890, 893, 895, 898, 899, 900, 902, 906, 907, 908, 910, 916, 919, 920, 923, 928, 932, 936, 942, 943, 947, 948, 952, 953, 957, 958, 962, 963, 967, 968, 972, 973, 977, 978, 982, 983, 985, 988, 990, 992, 995, 997, 1001, 1006, 1009, 1013, 1015, 1019, 1023, 1027, 1029, 1034, 1036, 1039, 1041, 1044, 1046, 1050, 1052, 1057, 1059, 1062, 1067, 1070, 1074, 1079, 1085, 1089, 1091, 1092, 1098, 1099, 1100, 1102, 1108, 1112, 1115, 1118, 1120, 1125, 1129], "returns": [42, 46, 78, 184, 247, 402, 1022, 1106, 1128], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 40, 79, 103, 117, 167, 185, 210, 218, 226, 230, 248, 285, 306, 312, 315, 322, 391, 434, 440, 444, 451, 457, 492, 517, 584, 588, 599, 607, 615, 620, 627, 635, 651, 664, 728, 732, 743, 751, 759, 764, 771, 789, 802, 857, 865, 873, 881, 885, 888, 891, 938, 944, 949, 954, 964, 974, 984, 1011, 1064, 1081, 1104, 1107, 1122, 1127], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [1033, 1038, 1043, 1056, 1061, 1066]}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "gyro_factory_open", "text_snippet": "static int gyro_factory_open(struct inode *inode, struct file *file)\n{\n file->private_data = gyro"}, {"node_id": 5, "universal_type": "function", "name": "file", "text_snippet": "gyro_factory_open(struct inode *inode, struct file *file)"}, {"node_id": 52, "universal_type": "function", "name": "gyro_factory_release", "text_snippet": "static int gyro_factory_release(struct inode *inode, struct file *file)\n{\n file->private_data = N"}, {"node_id": 54, "universal_type": "function", "name": "file", "text_snippet": "gyro_factory_release(struct inode *inode, struct file *file)"}, {"node_id": 80, "universal_type": "function", "name": "gyro_set_cali", "text_snippet": "static int gyro_set_cali(int data[GYRO_AXES_NUM])\n{\n\tstruct gyro_context *cxt = gyro_context_obj;\n\tG"}, {"node_id": 82, "universal_type": "function", "name": "unknown", "text_snippet": "gyro_set_cali(int data[GYRO_AXES_NUM])"}, {"node_id": 186, "universal_type": "function", "name": "gyro_clear_cali", "text_snippet": "static int gyro_clear_cali(void)\n{\n\tstruct gyro_context *cxt = gyro_context_obj;\n\tcxt->cali_sw[GYRO_"}, {"node_id": 188, "universal_type": "function", "name": "unknown", "text_snippet": "gyro_clear_cali(void)"}, {"node_id": 249, "universal_type": "function", "name": "cmd,", "text_snippet": "static long gyro_factory_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)\n{\n "}, {"node_id": 252, "universal_type": "function", "name": "cmd,", "text_snippet": "gyro_factory_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)"}, {"node_id": 1071, "universal_type": "function", "name": "gyro_factory_device_init", "text_snippet": "int gyro_factory_device_init()\n{\n\tint error = 0;\n\tstruct gyro_context *cxt = gyro_context_obj;\n\n\tif "}, {"node_id": 1073, "universal_type": "function", "name": "unknown", "text_snippet": "gyro_factory_device_init()"}], "class_declarations": [{"node_id": 9, "universal_type": "class", "name": "inode", "text_snippet": "struct inode"}, {"node_id": 10, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 16, "universal_type": "class", "name": "file", "text_snippet": "struct file"}, {"node_id": 17, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 58, "universal_type": "class", "name": "inode", "text_snippet": "struct inode"}, {"node_id": 59, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 65, "universal_type": "class", "name": "file", "text_snippet": "struct file"}, {"node_id": 66, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 91, "universal_type": "class", "name": "gyro_context", "text_snippet": "struct gyro_context"}, {"node_id": 92, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 194, "universal_type": "class", "name": "gyro_context", "text_snippet": "struct gyro_context"}, {"node_id": 195, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 256, "universal_type": "class", "name": "file", "text_snippet": "struct file"}, {"node_id": 257, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 287, "universal_type": "class", "name": "gyro_context", "text_snippet": "struct gyro_context"}, {"node_id": 288, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 1025, "universal_type": "class", "name": "file_operations", "text_snippet": "struct file_operations"}, {"node_id": 1026, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 1048, "universal_type": "class", "name": "miscdevice", "text_snippet": "struct miscdevice"}, {"node_id": 1049, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 1083, "universal_type": "class", "name": "gyro_context", "text_snippet": "struct gyro_context"}, {"node_id": 1084, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include \"gyro_factory.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include \"gyro_factory.h\"\n\nstatic int gyro_factory_open(struct inode *inode, struct file *file)\n{\n file->private_data = gyro_context_obj;\n\n if (file->private_data == NULL)\n {\n GYRO_ERR(\"null pointer!!\\n\");\n return -EINVAL;\n }\n return nonseekable_open(inode, file);\n}\n\nstatic int gyro_factory_release(struct inode *inode, struct file *file)\n{\n file->private_data = NULL;\n return 0;\n}\n\nstatic int gyro_set_cali(int data[GYRO_AXES_NUM])\n{\n\tstruct gyro_context *cxt = gyro_context_obj;\n\tGYRO_LOG(\" factory gyro cali %d,%d,%d \\n\",data[GYRO_AXIS_X],data[GYRO_AXIS_Y],data[GYRO_AXIS_Z] );\n\tGYRO_LOG(\" original gyro cali %d,%d,%d \\n\",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]);\n\tcxt->cali_sw[GYRO_AXIS_X] += data[GYRO_AXIS_X];\n cxt->cali_sw[GYRO_AXIS_Y] += data[GYRO_AXIS_Y];\n cxt->cali_sw[GYRO_AXIS_Z] += data[GYRO_AXIS_Z];\n\tGYRO_LOG(\" GYRO new cali %d,%d,%d \\n\",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z]);\n\n\treturn 0;\n}\n\nstatic int gyro_clear_cali(void)\n{\n\tstruct gyro_context *cxt = gyro_context_obj;\n\tcxt->cali_sw[GYRO_AXIS_X] = 0;\n cxt->cali_sw[GYRO_AXIS_Y] = 0;\n cxt->cali_sw[GYRO_AXIS_Z] = 0;\n\tGYRO_LOG(\" GYRO after clear cali %d,%d,%d \\n\",cxt->cali_sw[GYRO_AXIS_X],cxt->cali_sw[GYRO_AXIS_Y],cxt->cali_sw[GYRO_AXIS_Z] );\n\treturn 0;\n}\n\nstatic long gyro_factory_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)\n{\n void __user *data;\n long err = 0;\n\tstruct gyro_context *cxt = gyro_context_obj;\n\tint x,y,z,status;\n\tchar strbuf[256];\n int cali[3] = {0};\n SENSOR_DATA sensor_data = {0};\n\tint smtRes;\n\t\n if (_IOC_DIR(cmd) & _IOC_READ)\n {\n err = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd));\n }\n else if (_IOC_DIR(cmd) & _IOC_WRITE)\n {\n err = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));\n }\n\n if (err)\n {\n GYRO_ERR(\"access error: %08X, (%2d, %2d)\\n\", cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd));\n return -EFAULT;\n }\n\n switch (cmd)\n {\n case GYROSCOPE_IOCTL_INIT:\n\t\tif(cxt->gyro_ctl.enable_nodata!= NULL){\n\t\t\terr = cxt->gyro_ctl.enable_nodata(1);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_INIT\\n\");\n\n\t\t}else{\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \");\n\t\t}\n\t break;\n case GYROSCOPE_IOCTL_SMT_DATA:\n\t\tdata = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\tsmtRes = 1;\n err = copy_to_user(data, &smtRes, sizeof(smtRes));\n if (err)\n {\n err = -EINVAL;\n GYRO_ERR(\"copy gyro data to user failed!\\n\");\n }\n\n break; \n case GYROSCOPE_IOCTL_READ_SENSORDATA:\n\t\tdata = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\tif(cxt->gyro_data.get_data != NULL){\n\t\t\terr = cxt->gyro_data.get_data(&x, &y, &z, &status);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx+=cxt->cali_sw[0];\n\t\t\ty+=cxt->cali_sw[1];\n\t\t\tz+=cxt->cali_sw[2];\n\t\t\tsprintf(strbuf, \"%x %x %x\", x, y, z);\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read data : (%d, %d, %d)!\\n\", x, y, z);\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA read strbuf : (%s)!\\n\", strbuf);\n\t\t\t\n\t if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n\t {\n\t err = -EFAULT;\n\t break; \n\t }\n\t\t}else{\n\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_READ_SENSORDATA \");\n\t\t}\n break;\n\t\t\n case GYROSCOPE_IOCTL_READ_SENSORDATA_RAW:\n\t\tdata = (void __user *) arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\tif(cxt->gyro_data.get_raw_data != NULL){\n\t\t\terr = cxt->gyro_data.get_raw_data(&x, &y, &z);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA read data fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tx+=cxt->cali_sw[0];\n\t\t\ty+=cxt->cali_sw[1];\n\t\t\tz+=cxt->cali_sw[2];\n\t\t\tsprintf(strbuf, \"%x %x %x\", x, y, z);\n\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA read data : (%d, %d, %d)!\\n\", x, y, z);\n\t if (copy_to_user(data, strbuf, strlen(strbuf)+1))\n\t {\n\t err = -EFAULT;\n\t break; \n\t }\n\t\t}else{\n\t\t\tGYRO_LOG(\"GSENSOR_IOCTL_READ_RAW_DATA FAIL!\\n \");\n\t\t}\n break; \n case GYROSCOPE_IOCTL_SET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n if (copy_from_user(&sensor_data, data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break; \n }\n cali[0] = sensor_data.x ;\n cali[1] = sensor_data.y ;\n cali[2] = sensor_data.z ;\n\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_SET_CALI data : (%d, %d, %d)!\\n\", cali[0], cali[1], cali[2]);\n gyro_set_cali(cali);\n/*\n\t\tif(cxt->gyro_ctl.gyro_calibration != NULL)\n\t\t{\n\t\t\terr = cxt->gyro_ctl.gyro_calibration(SETCALI, cali);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_SET_CALI fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} \n\t\t*/\n break;\n\n case GYROSCOPE_IOCTL_CLR_CALI:\n\t\t/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n\t\t{\n\t\t\terr = cxt->gyro_ctl.gyro_calibration(CLRCALI, cali);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_CLR_CALI fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} \n\t\t*/\n\t\tgyro_clear_cali();\n break;\n\n case GYROSCOPE_IOCTL_GET_CALI:\n data = (void __user*)arg;\n if (data == NULL)\n {\n err = -EINVAL;\n break; \n }\n\t\t/*\n if(cxt->gyro_ctl.gyro_calibration != NULL)\n\t\t{\n\t\t\terr = cxt->gyro_ctl.gyro_calibration(GETCALI, cali);\n\t\t\tif(err < 0)\n\t\t\t{\n\t\t\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_GET_CALI fail!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\tGYRO_LOG(\"GYROSCOPE_IOCTL_GET_CALI data : (%d, %d, %d)!\\n\", cxt->cali_sw[0] , cxt->cali_sw[1], cxt->cali_sw[2]);\n sensor_data.x = cxt->cali_sw[0]; ; \n sensor_data.y = cxt->cali_sw[1]; ;\n sensor_data.z = cxt->cali_sw[2]; ;\n if (copy_to_user(data, &sensor_data, sizeof(sensor_data)))\n {\n err = -EFAULT;\n break;\n }\n break;\n\t\t\n default:\n GYRO_LOG(\"unknown IOCTL: 0x%08x\\n\", cmd);\n err = -ENOIOCTLCMD;\n break;\n\n }\n return err;\n}\n\n\nstatic struct file_operations gyro_factory_fops = {\n .open = gyro_factory_open,\n .release = gyro_factory_release,\n .unlocked_ioctl = gyro_factory_unlocked_ioctl,\n};\n\nstatic struct miscdevice gyro_factory_device = {\n .minor = MISC_DYNAMIC_MINOR,\n .name = \"gyroscope\",\n .fops = &gyro_factory_fops,\n};\n\nint gyro_factory_device_init()\n{\n\tint error = 0;\n\tstruct gyro_context *cxt = gyro_context_obj;\n\n\tif (!cxt->gyro_ctl.is_use_common_factory) {\n\t\tGYRO_LOG(\"Node of '/dev/gyroscope' has already existed!\\n\");\n\t\treturn -1;\n\t}\n if ((error = misc_register(&gyro_factory_device)))\n {\n GYRO_LOG(\"gyro_factory_device register failed\\n\");\n\t\terror = -1;\n }\t\n\treturn error;\n}\n\n\n\n\n"}
13
c
#pragma once #include"DenseMapDrawer.h" #include <thread> // std::thread #include <mutex> // std::mutex, std::unique_lock class Plane { public: Plane(const std::vector<cv::Vec3f> &vMPs, const cv::Mat &Tcw); Plane(const float &nx, const float &ny, const float &nz, const float &ox, const float &oy, const float &oz); void Recompute(); //normal cv::Mat n; //origin cv::Mat o; //arbitrary orientation along normal float rang; //transformation from world to the plane cv::Mat Tpw; pangolin::OpenGlMatrix glTpw; //MapPoints that define the plane std::vector<cv::Vec3f> mvMPs; //camera pose when the plane was first observed (to compute normal direction) cv::Mat mTcw, XC; }; class DenseMapViewer { public: DenseMapViewer(DenseMapDrawer* drawer, std::string setting_file); void run(); void request_finish(); bool should_finish(); bool is_finished(); bool system_running_status() { return system_running; } protected: void set_finished(bool status); Plane* DetectPlane(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations); void DrawCube(const float &size, const float x = 0, const float y = 0, const float z = 0); void DrawPlane(int ndivs, float ndivsize); void DrawPlane(Plane* pPlane, int ndivs, float ndivsize); bool m_should_finish; bool m_is_finished; std::mutex m_mutex; DenseMapDrawer* m_map_drawer; float m_viewpoint_x; float m_viewpoint_y; float m_viewpoint_z; float m_viewpoint_f; bool system_running; };
28.77
53
(translation_unit) "#pragma once\n\n#include"DenseMapDrawer.h"\n#include <thread> // std::thread\n#include <mutex> // std::mutex, std::unique_lock\nclass Plane\n{\npublic:\n Plane(const std::vector<cv::Vec3f> &vMPs, const cv::Mat &Tcw);\n Plane(const float &nx, const float &ny, const float &nz, const float &ox, const float &oy, const float &oz);\n\n void Recompute();\n\n //normal\n cv::Mat n;\n //origin\n cv::Mat o;\n //arbitrary orientation along normal\n float rang;\n //transformation from world to the plane\n cv::Mat Tpw;\n pangolin::OpenGlMatrix glTpw;\n //MapPoints that define the plane\n std::vector<cv::Vec3f> mvMPs;\n //camera pose when the plane was first observed (to compute normal direction)\n cv::Mat mTcw, XC;\n};\n\nclass DenseMapViewer\n{\npublic:\n DenseMapViewer(DenseMapDrawer* drawer, std::string setting_file);\n void run();\n void request_finish();\n bool should_finish();\n bool is_finished();\n bool system_running_status()\n {\n return system_running;\n }\n\nprotected:\n void set_finished(bool status);\n \n Plane* DetectPlane(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations);\n void DrawCube(const float &size, const float x = 0, const float y = 0, const float z = 0);\n void DrawPlane(int ndivs, float ndivsize);\n void DrawPlane(Plane* pPlane, int ndivs, float ndivsize);\n bool m_should_finish;\n bool m_is_finished;\n std::mutex m_mutex;\n DenseMapDrawer* m_map_drawer;\n\n float m_viewpoint_x;\n float m_viewpoint_y;\n float m_viewpoint_z;\n float m_viewpoint_f;\n\n bool system_running;\n};\n\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include"DenseMapDrawer.h"\n" (#include) "#include" (string_literal) ""DenseMapDrawer.h"" (") """ (string_content) "DenseMapDrawer.h" (") """ (preproc_include) "#include <thread> // std::thread\n" (#include) "#include" (system_lib_string) "<thread>" (comment) "// std::thread" (preproc_include) "#include <mutex> // std::mutex, std::unique_lock\n" (#include) "#include" (system_lib_string) "<mutex>" (comment) "// std::mutex, std::unique_lock" (function_definition) "class Plane\n{\npublic:\n Plane(const std::vector<cv::Vec3f> &vMPs, const cv::Mat &Tcw);\n Plane(const float &nx, const float &ny, const float &nz, const float &ox, const float &oy, const float &oz);\n\n void Recompute();\n\n //normal\n cv::Mat n;\n //origin\n cv::Mat o;\n //arbitrary orientation along normal\n float rang;\n //transformation from world to the plane\n cv::Mat Tpw;\n pangolin::OpenGlMatrix glTpw;\n //MapPoints that define the plane\n std::vector<cv::Vec3f> mvMPs;\n //camera pose when the plane was first observed (to compute normal direction)\n cv::Mat mTcw, XC;\n}" (type_identifier) "class" (identifier) "Plane" (compound_statement) "{\npublic:\n Plane(const std::vector<cv::Vec3f> &vMPs, const cv::Mat &Tcw);\n Plane(const float &nx, const float &ny, const float &nz, const float &ox, const float &oy, const float &oz);\n\n void Recompute();\n\n //normal\n cv::Mat n;\n //origin\n cv::Mat o;\n //arbitrary orientation along normal\n float rang;\n //transformation from world to the plane\n cv::Mat Tpw;\n pangolin::OpenGlMatrix glTpw;\n //MapPoints that define the plane\n std::vector<cv::Vec3f> mvMPs;\n //camera pose when the plane was first observed (to compute normal direction)\n cv::Mat mTcw, XC;\n}" ({) "{" (labeled_statement) "public:\n Plane(const std::vector<cv::Vec3f> &vMPs, const" (statement_identifier) "public" (:) ":" (labeled_statement) "Plane(const std::vector<cv::Vec3f> &vMPs, const" (statement_identifier) "Plane" (ERROR) "(const std::vector<cv:" (() "(" (type_descriptor) "const std" (type_qualifier) "const" (const) "const" (type_identifier) "std" (:) ":" (:) ":" (binary_expression) "vector<cv" (identifier) "vector" (<) "<" (identifier) "cv" (:) ":" (:) ":" (expression_statement) "Vec3f> &vMPs, const" (comma_expression) "Vec3f> &vMPs, const" (binary_expression) "Vec3f> &vMPs" (identifier) "Vec3f" (>) ">" (pointer_expression) "&vMPs" (&) "&" (identifier) "vMPs" (,) "," (identifier) "const" (;) "" (labeled_statement) "cv::Mat &Tcw);" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "Mat &Tcw);" (binary_expression) "Mat &Tcw" (identifier) "Mat" (&) "&" (identifier) "Tcw" (ERROR) ")" ()) ")" (;) ";" (expression_statement) "Plane(const float &nx, const float &ny, const float &nz, const float &ox, const float &oy, const float &oz);" (comma_expression) "Plane(const float &nx, const float &ny, const float &nz, const float &ox, const float &oy, const float &oz" (binary_expression) "Plane(const float &nx" (identifier) "Plane" (ERROR) "(const float" (() "(" (type_descriptor) "const float" (type_qualifier) "const" (const) "const" (primitive_type) "float" (&) "&" (identifier) "nx" (,) "," (ERROR) "const" (identifier) "const" (comma_expression) "float &ny, const float &nz, const float &ox, const float &oy, const float &oz" (binary_expression) "float &ny" (identifier) "float" (&) "&" (identifier) "ny" (,) "," (ERROR) "const" (identifier) "const" (comma_expression) "float &nz, const float &ox, const float &oy, const float &oz" (binary_expression) "float &nz" (identifier) "float" (&) "&" (identifier) "nz" (,) "," (ERROR) "const" (identifier) "const" (comma_expression) "float &ox, const float &oy, const float &oz" (binary_expression) "float &ox" (identifier) "float" (&) "&" (identifier) "ox" (,) "," (ERROR) "const" (identifier) "const" (comma_expression) "float &oy, const float &oz" (binary_expression) "float &oy" (identifier) "float" (&) "&" (identifier) "oy" (,) "," (ERROR) "const" (identifier) "const" (binary_expression) "float &oz" (identifier) "float" (&) "&" (identifier) "oz" (ERROR) ")" ()) ")" (;) ";" (declaration) "void Recompute();" (primitive_type) "void" (function_declarator) "Recompute()" (identifier) "Recompute" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//normal" (labeled_statement) "cv::Mat n;" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (declaration) "Mat n;" (type_identifier) "Mat" (identifier) "n" (;) ";" (comment) "//origin" (labeled_statement) "cv::Mat o;" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (declaration) "Mat o;" (type_identifier) "Mat" (identifier) "o" (;) ";" (comment) "//arbitrary orientation along normal" (declaration) "float rang;" (primitive_type) "float" (identifier) "rang" (;) ";" (comment) "//transformation from world to the plane" (labeled_statement) "cv::Mat Tpw;" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (declaration) "Mat Tpw;" (type_identifier) "Mat" (identifier) "Tpw" (;) ";" (labeled_statement) "pangolin::OpenGlMatrix glTpw;" (statement_identifier) "pangolin" (:) ":" (ERROR) ":" (:) ":" (declaration) "OpenGlMatrix glTpw;" (type_identifier) "OpenGlMatrix" (identifier) "glTpw" (;) ";" (comment) "//MapPoints that define the plane" (labeled_statement) "std::vector<cv::Vec3f> mvMPs;" (statement_identifier) "std" (ERROR) "::vector<cv:" (:) ":" (:) ":" (binary_expression) "vector<cv" (identifier) "vector" (<) "<" (identifier) "cv" (:) ":" (:) ":" (expression_statement) "Vec3f> mvMPs;" (binary_expression) "Vec3f> mvMPs" (identifier) "Vec3f" (>) ">" (identifier) "mvMPs" (;) ";" (comment) "//camera pose when the plane was first observed (to compute normal direction)" (labeled_statement) "cv::Mat mTcw, XC;" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (declaration) "Mat mTcw, XC;" (type_identifier) "Mat" (identifier) "mTcw" (,) "," (identifier) "XC" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "class DenseMapViewer\n{\npublic:\n DenseMapViewer(DenseMapDrawer* drawer, std::string setting_file);\n void run();\n void request_finish();\n bool should_finish();\n bool is_finished();\n bool system_running_status()\n {\n return system_running;\n }\n\nprotected:\n void set_finished(bool status);\n \n Plane* DetectPlane(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations);\n void DrawCube(const float &size, const float x = 0, const float y = 0, const float z = 0);\n void DrawPlane(int ndivs, float ndivsize);\n void DrawPlane(Plane* pPlane, int ndivs, float ndivsize);\n bool m_should_finish;\n bool m_is_finished;\n std::mutex m_mutex;\n DenseMapDrawer* m_map_drawer;\n\n float m_viewpoint_x;\n float m_viewpoint_y;\n float m_viewpoint_z;\n float m_viewpoint_f;\n\n bool system_running;\n}" (type_identifier) "class" (identifier) "DenseMapViewer" (compound_statement) "{\npublic:\n DenseMapViewer(DenseMapDrawer* drawer, std::string setting_file);\n void run();\n void request_finish();\n bool should_finish();\n bool is_finished();\n bool system_running_status()\n {\n return system_running;\n }\n\nprotected:\n void set_finished(bool status);\n \n Plane* DetectPlane(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations);\n void DrawCube(const float &size, const float x = 0, const float y = 0, const float z = 0);\n void DrawPlane(int ndivs, float ndivsize);\n void DrawPlane(Plane* pPlane, int ndivs, float ndivsize);\n bool m_should_finish;\n bool m_is_finished;\n std::mutex m_mutex;\n DenseMapDrawer* m_map_drawer;\n\n float m_viewpoint_x;\n float m_viewpoint_y;\n float m_viewpoint_z;\n float m_viewpoint_f;\n\n bool system_running;\n}" ({) "{" (labeled_statement) "public:\n DenseMapViewer(DenseMapDrawer* drawer, std::string setting_file);" (statement_identifier) "public" (:) ":" (expression_statement) "DenseMapViewer(DenseMapDrawer* drawer, std::string setting_file);" (call_expression) "DenseMapViewer(DenseMapDrawer* drawer, std::string setting_file)" (identifier) "DenseMapViewer" (argument_list) "(DenseMapDrawer* drawer, std::string setting_file)" (() "(" (binary_expression) "DenseMapDrawer* drawer" (identifier) "DenseMapDrawer" (*) "*" (identifier) "drawer" (,) "," (ERROR) "std::string" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (identifier) "setting_file" ()) ")" (;) ";" (declaration) "void run();" (primitive_type) "void" (function_declarator) "run()" (identifier) "run" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void request_finish();" (primitive_type) "void" (function_declarator) "request_finish()" (identifier) "request_finish" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool should_finish();" (primitive_type) "bool" (function_declarator) "should_finish()" (identifier) "should_finish" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool is_finished();" (primitive_type) "bool" (function_declarator) "is_finished()" (identifier) "is_finished" (parameter_list) "()" (() "(" ()) ")" (;) ";" (function_definition) "bool system_running_status()\n {\n return system_running;\n }" (primitive_type) "bool" (function_declarator) "system_running_status()" (identifier) "system_running_status" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return system_running;\n }" ({) "{" (return_statement) "return system_running;" (return) "return" (identifier) "system_running" (;) ";" (}) "}" (labeled_statement) "protected:\n void set_finished(bool status);" (statement_identifier) "protected" (:) ":" (declaration) "void set_finished(bool status);" (primitive_type) "void" (function_declarator) "set_finished(bool status)" (identifier) "set_finished" (parameter_list) "(bool status)" (() "(" (parameter_declaration) "bool status" (primitive_type) "bool" (identifier) "status" ()) ")" (;) ";" (declaration) "Plane* DetectPlane(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations);" (type_identifier) "Plane" (pointer_declarator) "* DetectPlane(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations)" (*) "*" (function_declarator) "DetectPlane(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations)" (identifier) "DetectPlane" (parameter_list) "(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations)" (() "(" (parameter_declaration) "const cv::Mat Tcw" (type_qualifier) "const" (const) "const" (type_identifier) "cv" (ERROR) "::Mat" (:) ":" (:) ":" (identifier) "Mat" (identifier) "Tcw" (,) "," (parameter_declaration) "std::vector<cv::Vec3f> &vMPs" (type_identifier) "std" (ERROR) "::vector<cv::Vec3f> &" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "cv" (:) ":" (:) ":" (identifier) "Vec3f" (>) ">" (&) "&" (identifier) "vMPs" (,) "," (parameter_declaration) "const int iterations" (type_qualifier) "const" (const) "const" (primitive_type) "int" (identifier) "iterations" ()) ")" (;) ";" (declaration) "void DrawCube(const float &size, const float x = 0, const float y = 0, const float z = 0);" (primitive_type) "void" (init_declarator) "DrawCube(const float &size, const float x = 0" (function_declarator) "DrawCube(const float &size, const float x" (identifier) "DrawCube" (parameter_list) "(const float &size, const float x" (() "(" (parameter_declaration) "const float &size" (type_qualifier) "const" (const) "const" (primitive_type) "float" (ERROR) "&" (&) "&" (identifier) "size" (,) "," (parameter_declaration) "const float x" (type_qualifier) "const" (const) "const" (primitive_type) "float" (identifier) "x" ()) "" (=) "=" (number_literal) "0" (,) "," (init_declarator) "const float y = 0" (identifier) "const" (ERROR) "float y" (identifier) "float" (identifier) "y" (=) "=" (number_literal) "0" (,) "," (init_declarator) "const float z = 0" (identifier) "const" (ERROR) "float z" (identifier) "float" (identifier) "z" (=) "=" (number_literal) "0" (ERROR) ")" ()) ")" (;) ";" (declaration) "void DrawPlane(int ndivs, float ndivsize);" (primitive_type) "void" (function_declarator) "DrawPlane(int ndivs, float ndivsize)" (identifier) "DrawPlane" (parameter_list) "(int ndivs, float ndivsize)" (() "(" (parameter_declaration) "int ndivs" (primitive_type) "int" (identifier) "ndivs" (,) "," (parameter_declaration) "float ndivsize" (primitive_type) "float" (identifier) "ndivsize" ()) ")" (;) ";" (declaration) "void DrawPlane(Plane* pPlane, int ndivs, float ndivsize);" (primitive_type) "void" (function_declarator) "DrawPlane(Plane* pPlane, int ndivs, float ndivsize)" (identifier) "DrawPlane" (parameter_list) "(Plane* pPlane, int ndivs, float ndivsize)" (() "(" (parameter_declaration) "Plane* pPlane" (type_identifier) "Plane" (pointer_declarator) "* pPlane" (*) "*" (identifier) "pPlane" (,) "," (parameter_declaration) "int ndivs" (primitive_type) "int" (identifier) "ndivs" (,) "," (parameter_declaration) "float ndivsize" (primitive_type) "float" (identifier) "ndivsize" ()) ")" (;) ";" (declaration) "bool m_should_finish;" (primitive_type) "bool" (identifier) "m_should_finish" (;) ";" (declaration) "bool m_is_finished;" (primitive_type) "bool" (identifier) "m_is_finished" (;) ";" (labeled_statement) "std::mutex m_mutex;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "mutex m_mutex;" (type_identifier) "mutex" (identifier) "m_mutex" (;) ";" (declaration) "DenseMapDrawer* m_map_drawer;" (type_identifier) "DenseMapDrawer" (pointer_declarator) "* m_map_drawer" (*) "*" (identifier) "m_map_drawer" (;) ";" (declaration) "float m_viewpoint_x;" (primitive_type) "float" (identifier) "m_viewpoint_x" (;) ";" (declaration) "float m_viewpoint_y;" (primitive_type) "float" (identifier) "m_viewpoint_y" (;) ";" (declaration) "float m_viewpoint_z;" (primitive_type) "float" (identifier) "m_viewpoint_z" (;) ";" (declaration) "float m_viewpoint_f;" (primitive_type) "float" (identifier) "m_viewpoint_f" (;) ";" (declaration) "bool system_running;" (primitive_type) "bool" (identifier) "system_running" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
455
24
{"language": "c", "success": true, "metadata": {"lines": 53, "avg_line_length": 28.77, "nodes": 264, "errors": 0, "source_hash": "79ad0312d02ed6de38008a1ccef767c2336b076a83953dd093cfc8bc1b64b8dc", "categorized_nodes": 182}, "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\"DenseMapDrawer.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": "\"DenseMapDrawer.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 26}}, {"id": 6, "type": "preproc_include", "text": "#include <thread> // std::thread\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": "<thread>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <mutex> // std::mutex, std::unique_lock\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": "<mutex>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 16}}, {"id": 12, "type": "function_definition", "text": "class Plane\n{\npublic:\n Plane(const std::vector<cv::Vec3f> &vMPs, const cv::Mat &Tcw);\n Plane(const float &nx, const float &ny, const float &nz, const float &ox, const float &oy, const float &oz);\n\n void Recompute();\n\n //normal\n cv::Mat n;\n //origin\n cv::Mat o;\n //arbitrary orientation along normal\n float rang;\n //transformation from world to the plane\n cv::Mat Tpw;\n pangolin::OpenGlMatrix glTpw;\n //MapPoints that define the plane\n std::vector<cv::Vec3f> mvMPs;\n //camera pose when the plane was first observed (to compute normal direction)\n cv::Mat mTcw, XC;\n}", "parent": null, "children": [13], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 13, "type": "identifier", "text": "Plane", "parent": 12, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 11}}, {"id": 14, "type": "labeled_statement", "text": "public:\n Plane(const std::vector<cv::Vec3f> &vMPs, const", "parent": 12, "children": [15], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 51}}, {"id": 15, "type": "labeled_statement", "text": "Plane(const std::vector<cv::Vec3f> &vMPs, const", "parent": 14, "children": [16, 17], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 51}}, {"id": 16, "type": "statement_identifier", "text": "Plane", "parent": 15, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 9}}, {"id": 17, "type": "ERROR", "text": "(const std::vector<cv:", "parent": 15, "children": [18, 20], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 31}}, {"id": 18, "type": "type_descriptor", "text": "const std", "parent": 17, "children": [19], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 19}}, {"id": 19, "type": "type_identifier", "text": "std", "parent": 18, "children": [], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 19}}, {"id": 20, "type": "binary_expression", "text": "vector<cv", "parent": 17, "children": [21, 22, 23], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 30}}, {"id": 21, "type": "identifier", "text": "vector", "parent": 20, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 27}}, {"id": 22, "type": "<", "text": "<", "parent": 20, "children": [], "start_point": {"row": 8, "column": 27}, "end_point": {"row": 8, "column": 28}}, {"id": 23, "type": "identifier", "text": "cv", "parent": 20, "children": [], "start_point": {"row": 8, "column": 28}, "end_point": {"row": 8, "column": 30}}, {"id": 24, "type": "comma_expression", "text": "Vec3f> &vMPs, const", "parent": 15, "children": [25], "start_point": {"row": 8, "column": 32}, "end_point": {"row": 8, "column": 51}}, {"id": 25, "type": "binary_expression", "text": "Vec3f> &vMPs", "parent": 24, "children": [26, 27, 28], "start_point": {"row": 8, "column": 32}, "end_point": {"row": 8, "column": 44}}, {"id": 26, "type": "identifier", "text": "Vec3f", "parent": 25, "children": [], "start_point": {"row": 8, "column": 32}, "end_point": {"row": 8, "column": 37}}, {"id": 27, "type": ">", "text": ">", "parent": 25, "children": [], "start_point": {"row": 8, "column": 37}, "end_point": {"row": 8, "column": 38}}, {"id": 28, "type": "pointer_expression", "text": "&vMPs", "parent": 25, "children": [29], "start_point": {"row": 8, "column": 39}, "end_point": {"row": 8, "column": 44}}, {"id": 29, "type": "identifier", "text": "vMPs", "parent": 28, "children": [], "start_point": {"row": 8, "column": 40}, "end_point": {"row": 8, "column": 44}}, {"id": 30, "type": "labeled_statement", "text": "cv::Mat &Tcw);", "parent": 12, "children": [31], "start_point": {"row": 8, "column": 52}, "end_point": {"row": 8, "column": 66}}, {"id": 31, "type": "statement_identifier", "text": "cv", "parent": 30, "children": [], "start_point": {"row": 8, "column": 52}, "end_point": {"row": 8, "column": 54}}, {"id": 32, "type": "binary_expression", "text": "Mat &Tcw", "parent": 30, "children": [33, 34], "start_point": {"row": 8, "column": 56}, "end_point": {"row": 8, "column": 64}}, {"id": 33, "type": "identifier", "text": "Mat", "parent": 32, "children": [], "start_point": {"row": 8, "column": 56}, "end_point": {"row": 8, "column": 59}}, {"id": 34, "type": "identifier", "text": "Tcw", "parent": 32, "children": [], "start_point": {"row": 8, "column": 61}, "end_point": {"row": 8, "column": 64}}, {"id": 35, "type": "comma_expression", "text": "Plane(const float &nx, const float &ny, const float &nz, const float &ox, const float &oy, const float &oz", "parent": 12, "children": [36, 42], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 110}}, {"id": 36, "type": "binary_expression", "text": "Plane(const float &nx", "parent": 35, "children": [37, 38, 41], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 25}}, {"id": 37, "type": "identifier", "text": "Plane", "parent": 36, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 9}}, {"id": 38, "type": "ERROR", "text": "(const float", "parent": 36, "children": [39], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 21}}, {"id": 39, "type": "type_descriptor", "text": "const float", "parent": 38, "children": [40], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 21}}, {"id": 40, "type": "primitive_type", "text": "float", "parent": 39, "children": [], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 21}}, {"id": 41, "type": "identifier", "text": "nx", "parent": 36, "children": [], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 25}}, {"id": 42, "type": "comma_expression", "text": "float &ny, const float &nz, const float &ox, const float &oy, const float &oz", "parent": 35, "children": [43, 46], "start_point": {"row": 9, "column": 33}, "end_point": {"row": 9, "column": 110}}, {"id": 43, "type": "binary_expression", "text": "float &ny", "parent": 42, "children": [44, 45], "start_point": {"row": 9, "column": 33}, "end_point": {"row": 9, "column": 42}}, {"id": 44, "type": "identifier", "text": "float", "parent": 43, "children": [], "start_point": {"row": 9, "column": 33}, "end_point": {"row": 9, "column": 38}}, {"id": 45, "type": "identifier", "text": "ny", "parent": 43, "children": [], "start_point": {"row": 9, "column": 40}, "end_point": {"row": 9, "column": 42}}, {"id": 46, "type": "comma_expression", "text": "float &nz, const float &ox, const float &oy, const float &oz", "parent": 42, "children": [47, 50], "start_point": {"row": 9, "column": 50}, "end_point": {"row": 9, "column": 110}}, {"id": 47, "type": "binary_expression", "text": "float &nz", "parent": 46, "children": [48, 49], "start_point": {"row": 9, "column": 50}, "end_point": {"row": 9, "column": 59}}, {"id": 48, "type": "identifier", "text": "float", "parent": 47, "children": [], "start_point": {"row": 9, "column": 50}, "end_point": {"row": 9, "column": 55}}, {"id": 49, "type": "identifier", "text": "nz", "parent": 47, "children": [], "start_point": {"row": 9, "column": 57}, "end_point": {"row": 9, "column": 59}}, {"id": 50, "type": "comma_expression", "text": "float &ox, const float &oy, const float &oz", "parent": 46, "children": [51, 54], "start_point": {"row": 9, "column": 67}, "end_point": {"row": 9, "column": 110}}, {"id": 51, "type": "binary_expression", "text": "float &ox", "parent": 50, "children": [52, 53], "start_point": {"row": 9, "column": 67}, "end_point": {"row": 9, "column": 76}}, {"id": 52, "type": "identifier", "text": "float", "parent": 51, "children": [], "start_point": {"row": 9, "column": 67}, "end_point": {"row": 9, "column": 72}}, {"id": 53, "type": "identifier", "text": "ox", "parent": 51, "children": [], "start_point": {"row": 9, "column": 74}, "end_point": {"row": 9, "column": 76}}, {"id": 54, "type": "comma_expression", "text": "float &oy, const float &oz", "parent": 50, "children": [55, 58], "start_point": {"row": 9, "column": 84}, "end_point": {"row": 9, "column": 110}}, {"id": 55, "type": "binary_expression", "text": "float &oy", "parent": 54, "children": [56, 57], "start_point": {"row": 9, "column": 84}, "end_point": {"row": 9, "column": 93}}, {"id": 56, "type": "identifier", "text": "float", "parent": 55, "children": [], "start_point": {"row": 9, "column": 84}, "end_point": {"row": 9, "column": 89}}, {"id": 57, "type": "identifier", "text": "oy", "parent": 55, "children": [], "start_point": {"row": 9, "column": 91}, "end_point": {"row": 9, "column": 93}}, {"id": 58, "type": "binary_expression", "text": "float &oz", "parent": 54, "children": [59, 60], "start_point": {"row": 9, "column": 101}, "end_point": {"row": 9, "column": 110}}, {"id": 59, "type": "identifier", "text": "float", "parent": 58, "children": [], "start_point": {"row": 9, "column": 101}, "end_point": {"row": 9, "column": 106}}, {"id": 60, "type": "identifier", "text": "oz", "parent": 58, "children": [], "start_point": {"row": 9, "column": 108}, "end_point": {"row": 9, "column": 110}}, {"id": 61, "type": "declaration", "text": "void Recompute();", "parent": 12, "children": [62, 63], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 21}}, {"id": 62, "type": "primitive_type", "text": "void", "parent": 61, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 8}}, {"id": 63, "type": "function_declarator", "text": "Recompute()", "parent": 61, "children": [64, 65], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 20}}, {"id": 64, "type": "identifier", "text": "Recompute", "parent": 63, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 18}}, {"id": 65, "type": "parameter_list", "text": "()", "parent": 63, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 20}}, {"id": 66, "type": "labeled_statement", "text": "cv::Mat n;", "parent": 12, "children": [67, 68], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 14}}, {"id": 67, "type": "statement_identifier", "text": "cv", "parent": 66, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 6}}, {"id": 68, "type": "declaration", "text": "Mat n;", "parent": 66, "children": [69, 70], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 14}}, {"id": 69, "type": "type_identifier", "text": "Mat", "parent": 68, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 11}}, {"id": 70, "type": "identifier", "text": "n", "parent": 68, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 13}}, {"id": 71, "type": "labeled_statement", "text": "cv::Mat o;", "parent": 12, "children": [72, 73], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 14}}, {"id": 72, "type": "statement_identifier", "text": "cv", "parent": 71, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 6}}, {"id": 73, "type": "declaration", "text": "Mat o;", "parent": 71, "children": [74, 75], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 14}}, {"id": 74, "type": "type_identifier", "text": "Mat", "parent": 73, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 11}}, {"id": 75, "type": "identifier", "text": "o", "parent": 73, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 13}}, {"id": 76, "type": "declaration", "text": "float rang;", "parent": 12, "children": [77, 78], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 15}}, {"id": 77, "type": "primitive_type", "text": "float", "parent": 76, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 9}}, {"id": 78, "type": "identifier", "text": "rang", "parent": 76, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 14}}, {"id": 79, "type": "labeled_statement", "text": "cv::Mat Tpw;", "parent": 12, "children": [80, 81], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 16}}, {"id": 80, "type": "statement_identifier", "text": "cv", "parent": 79, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 6}}, {"id": 81, "type": "declaration", "text": "Mat Tpw;", "parent": 79, "children": [82, 83], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 16}}, {"id": 82, "type": "type_identifier", "text": "Mat", "parent": 81, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 11}}, {"id": 83, "type": "identifier", "text": "Tpw", "parent": 81, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 15}}, {"id": 84, "type": "labeled_statement", "text": "pangolin::OpenGlMatrix glTpw;", "parent": 12, "children": [85, 86], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 33}}, {"id": 85, "type": "statement_identifier", "text": "pangolin", "parent": 84, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 12}}, {"id": 86, "type": "declaration", "text": "OpenGlMatrix glTpw;", "parent": 84, "children": [87, 88], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 33}}, {"id": 87, "type": "type_identifier", "text": "OpenGlMatrix", "parent": 86, "children": [], "start_point": {"row": 21, "column": 14}, "end_point": {"row": 21, "column": 26}}, {"id": 88, "type": "identifier", "text": "glTpw", "parent": 86, "children": [], "start_point": {"row": 21, "column": 27}, "end_point": {"row": 21, "column": 32}}, {"id": 89, "type": "labeled_statement", "text": "std::vector<cv::Vec3f> mvMPs;", "parent": 12, "children": [90, 91], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 33}}, {"id": 90, "type": "statement_identifier", "text": "std", "parent": 89, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 7}}, {"id": 91, "type": "ERROR", "text": "::vector<cv:", "parent": 89, "children": [92], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 19}}, {"id": 92, "type": "binary_expression", "text": "vector<cv", "parent": 91, "children": [93, 94, 95], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 18}}, {"id": 93, "type": "identifier", "text": "vector", "parent": 92, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 15}}, {"id": 94, "type": "<", "text": "<", "parent": 92, "children": [], "start_point": {"row": 23, "column": 15}, "end_point": {"row": 23, "column": 16}}, {"id": 95, "type": "identifier", "text": "cv", "parent": 92, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 18}}, {"id": 96, "type": "binary_expression", "text": "Vec3f> mvMPs", "parent": 89, "children": [97, 98, 99], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 32}}, {"id": 97, "type": "identifier", "text": "Vec3f", "parent": 96, "children": [], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 25}}, {"id": 98, "type": ">", "text": ">", "parent": 96, "children": [], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 26}}, {"id": 99, "type": "identifier", "text": "mvMPs", "parent": 96, "children": [], "start_point": {"row": 23, "column": 27}, "end_point": {"row": 23, "column": 32}}, {"id": 100, "type": "labeled_statement", "text": "cv::Mat mTcw, XC;", "parent": 12, "children": [101, 102], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 21}}, {"id": 101, "type": "statement_identifier", "text": "cv", "parent": 100, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 6}}, {"id": 102, "type": "declaration", "text": "Mat mTcw, XC;", "parent": 100, "children": [103, 104, 105], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 21}}, {"id": 103, "type": "type_identifier", "text": "Mat", "parent": 102, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 11}}, {"id": 104, "type": "identifier", "text": "mTcw", "parent": 102, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 16}}, {"id": 105, "type": "identifier", "text": "XC", "parent": 102, "children": [], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 20}}, {"id": 106, "type": "function_definition", "text": "class DenseMapViewer\n{\npublic:\n\tDenseMapViewer(DenseMapDrawer* drawer, std::string setting_file);\n\tvoid run();\n\tvoid request_finish();\n\tbool should_finish();\n\tbool is_finished();\n bool system_running_status()\n {\n return system_running;\n }\n\nprotected:\n\tvoid set_finished(bool status);\n \n Plane* DetectPlane(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations);\n void DrawCube(const float &size, const float x = 0, const float y = 0, const float z = 0);\n void DrawPlane(int ndivs, float ndivsize);\n void DrawPlane(Plane* pPlane, int ndivs, float ndivsize);\n\tbool m_should_finish;\n\tbool m_is_finished;\n\tstd::mutex m_mutex;\n\tDenseMapDrawer* m_map_drawer;\n\n\tfloat m_viewpoint_x;\n\tfloat m_viewpoint_y;\n\tfloat m_viewpoint_z;\n\tfloat m_viewpoint_f;\n\n bool system_running;\n}", "parent": null, "children": [107], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 59, "column": 1}}, {"id": 107, "type": "identifier", "text": "DenseMapViewer", "parent": 106, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 20}}, {"id": 108, "type": "labeled_statement", "text": "public:\n\tDenseMapViewer(DenseMapDrawer* drawer, std::string setting_file);", "parent": 106, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 66}}, {"id": 109, "type": "call_expression", "text": "DenseMapViewer(DenseMapDrawer* drawer, std::string setting_file)", "parent": 108, "children": [110, 111], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 65}}, {"id": 110, "type": "identifier", "text": "DenseMapViewer", "parent": 109, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 15}}, {"id": 111, "type": "argument_list", "text": "(DenseMapDrawer* drawer, std::string setting_file)", "parent": 109, "children": [112, 116, 119], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 65}}, {"id": 112, "type": "binary_expression", "text": "DenseMapDrawer* drawer", "parent": 111, "children": [113, 114, 115], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 38}}, {"id": 113, "type": "identifier", "text": "DenseMapDrawer", "parent": 112, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 30}}, {"id": 114, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 31, "column": 30}, "end_point": {"row": 31, "column": 31}}, {"id": 115, "type": "identifier", "text": "drawer", "parent": 112, "children": [], "start_point": {"row": 31, "column": 32}, "end_point": {"row": 31, "column": 38}}, {"id": 116, "type": "ERROR", "text": "std::string", "parent": 111, "children": [117, 118], "start_point": {"row": 31, "column": 40}, "end_point": {"row": 31, "column": 51}}, {"id": 117, "type": "identifier", "text": "std", "parent": 116, "children": [], "start_point": {"row": 31, "column": 40}, "end_point": {"row": 31, "column": 43}}, {"id": 118, "type": "identifier", "text": "string", "parent": 116, "children": [], "start_point": {"row": 31, "column": 45}, "end_point": {"row": 31, "column": 51}}, {"id": 119, "type": "identifier", "text": "setting_file", "parent": 111, "children": [], "start_point": {"row": 31, "column": 52}, "end_point": {"row": 31, "column": 64}}, {"id": 120, "type": "declaration", "text": "void run();", "parent": 106, "children": [121, 122], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 12}}, {"id": 121, "type": "primitive_type", "text": "void", "parent": 120, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 5}}, {"id": 122, "type": "function_declarator", "text": "run()", "parent": 120, "children": [123, 124], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 11}}, {"id": 123, "type": "identifier", "text": "run", "parent": 122, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 9}}, {"id": 124, "type": "parameter_list", "text": "()", "parent": 122, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 11}}, {"id": 125, "type": "declaration", "text": "void request_finish();", "parent": 106, "children": [126, 127], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 23}}, {"id": 126, "type": "primitive_type", "text": "void", "parent": 125, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 5}}, {"id": 127, "type": "function_declarator", "text": "request_finish()", "parent": 125, "children": [128, 129], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 22}}, {"id": 128, "type": "identifier", "text": "request_finish", "parent": 127, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 20}}, {"id": 129, "type": "parameter_list", "text": "()", "parent": 127, "children": [], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 22}}, {"id": 130, "type": "declaration", "text": "bool should_finish();", "parent": 106, "children": [131, 132], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 22}}, {"id": 131, "type": "primitive_type", "text": "bool", "parent": 130, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 5}}, {"id": 132, "type": "function_declarator", "text": "should_finish()", "parent": 130, "children": [133, 134], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 21}}, {"id": 133, "type": "identifier", "text": "should_finish", "parent": 132, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 19}}, {"id": 134, "type": "parameter_list", "text": "()", "parent": 132, "children": [], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 21}}, {"id": 135, "type": "declaration", "text": "bool is_finished();", "parent": 106, "children": [136, 137], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 20}}, {"id": 136, "type": "primitive_type", "text": "bool", "parent": 135, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 5}}, {"id": 137, "type": "function_declarator", "text": "is_finished()", "parent": 135, "children": [138, 139], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 19}}, {"id": 138, "type": "identifier", "text": "is_finished", "parent": 137, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 17}}, {"id": 139, "type": "parameter_list", "text": "()", "parent": 137, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 19}}, {"id": 140, "type": "function_definition", "text": "bool system_running_status()\n {\n return system_running;\n }", "parent": 106, "children": [141, 142], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 39, "column": 5}}, {"id": 141, "type": "primitive_type", "text": "bool", "parent": 140, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 8}}, {"id": 142, "type": "function_declarator", "text": "system_running_status()", "parent": 140, "children": [143, 144], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 32}}, {"id": 143, "type": "identifier", "text": "system_running_status", "parent": 142, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 30}}, {"id": 144, "type": "parameter_list", "text": "()", "parent": 142, "children": [], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 32}}, {"id": 145, "type": "return_statement", "text": "return system_running;", "parent": 140, "children": [146], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 30}}, {"id": 146, "type": "identifier", "text": "system_running", "parent": 145, "children": [], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 29}}, {"id": 147, "type": "labeled_statement", "text": "protected:\n\tvoid set_finished(bool status);", "parent": 106, "children": [148], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 32}}, {"id": 148, "type": "declaration", "text": "void set_finished(bool status);", "parent": 147, "children": [149, 150], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 32}}, {"id": 149, "type": "primitive_type", "text": "void", "parent": 148, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 5}}, {"id": 150, "type": "function_declarator", "text": "set_finished(bool status)", "parent": 148, "children": [151, 152], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 31}}, {"id": 151, "type": "identifier", "text": "set_finished", "parent": 150, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 18}}, {"id": 152, "type": "parameter_list", "text": "(bool status)", "parent": 150, "children": [153], "start_point": {"row": 42, "column": 18}, "end_point": {"row": 42, "column": 31}}, {"id": 153, "type": "parameter_declaration", "text": "bool status", "parent": 152, "children": [154, 155], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 30}}, {"id": 154, "type": "primitive_type", "text": "bool", "parent": 153, "children": [], "start_point": {"row": 42, "column": 19}, "end_point": {"row": 42, "column": 23}}, {"id": 155, "type": "identifier", "text": "status", "parent": 153, "children": [], "start_point": {"row": 42, "column": 24}, "end_point": {"row": 42, "column": 30}}, {"id": 156, "type": "declaration", "text": "Plane* DetectPlane(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations);", "parent": 106, "children": [157, 158], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 94}}, {"id": 157, "type": "type_identifier", "text": "Plane", "parent": 156, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 9}}, {"id": 158, "type": "pointer_declarator", "text": "* DetectPlane(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations)", "parent": 156, "children": [159, 160], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 93}}, {"id": 159, "type": "*", "text": "*", "parent": 158, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 10}}, {"id": 160, "type": "function_declarator", "text": "DetectPlane(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations)", "parent": 158, "children": [161, 162], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 93}}, {"id": 161, "type": "identifier", "text": "DetectPlane", "parent": 160, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 22}}, {"id": 162, "type": "parameter_list", "text": "(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations)", "parent": 160, "children": [163, 168, 177], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 93}}, {"id": 163, "type": "parameter_declaration", "text": "const cv::Mat Tcw", "parent": 162, "children": [164, 165, 167], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 40}}, {"id": 164, "type": "type_identifier", "text": "cv", "parent": 163, "children": [], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 31}}, {"id": 165, "type": "ERROR", "text": "::Mat", "parent": 163, "children": [166], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 36}}, {"id": 166, "type": "identifier", "text": "Mat", "parent": 165, "children": [], "start_point": {"row": 44, "column": 33}, "end_point": {"row": 44, "column": 36}}, {"id": 167, "type": "identifier", "text": "Tcw", "parent": 163, "children": [], "start_point": {"row": 44, "column": 37}, "end_point": {"row": 44, "column": 40}}, {"id": 168, "type": "parameter_declaration", "text": "std::vector<cv::Vec3f> &vMPs", "parent": 162, "children": [169, 170, 176], "start_point": {"row": 44, "column": 42}, "end_point": {"row": 44, "column": 70}}, {"id": 169, "type": "type_identifier", "text": "std", "parent": 168, "children": [], "start_point": {"row": 44, "column": 42}, "end_point": {"row": 44, "column": 45}}, {"id": 170, "type": "ERROR", "text": "::vector<cv::Vec3f> &", "parent": 168, "children": [171, 172, 173, 174, 175], "start_point": {"row": 44, "column": 45}, "end_point": {"row": 44, "column": 66}}, {"id": 171, "type": "identifier", "text": "vector", "parent": 170, "children": [], "start_point": {"row": 44, "column": 47}, "end_point": {"row": 44, "column": 53}}, {"id": 172, "type": "<", "text": "<", "parent": 170, "children": [], "start_point": {"row": 44, "column": 53}, "end_point": {"row": 44, "column": 54}}, {"id": 173, "type": "identifier", "text": "cv", "parent": 170, "children": [], "start_point": {"row": 44, "column": 54}, "end_point": {"row": 44, "column": 56}}, {"id": 174, "type": "identifier", "text": "Vec3f", "parent": 170, "children": [], "start_point": {"row": 44, "column": 58}, "end_point": {"row": 44, "column": 63}}, {"id": 175, "type": ">", "text": ">", "parent": 170, "children": [], "start_point": {"row": 44, "column": 63}, "end_point": {"row": 44, "column": 64}}, {"id": 176, "type": "identifier", "text": "vMPs", "parent": 168, "children": [], "start_point": {"row": 44, "column": 66}, "end_point": {"row": 44, "column": 70}}, {"id": 177, "type": "parameter_declaration", "text": "const int iterations", "parent": 162, "children": [178, 179], "start_point": {"row": 44, "column": 72}, "end_point": {"row": 44, "column": 92}}, {"id": 178, "type": "primitive_type", "text": "int", "parent": 177, "children": [], "start_point": {"row": 44, "column": 78}, "end_point": {"row": 44, "column": 81}}, {"id": 179, "type": "identifier", "text": "iterations", "parent": 177, "children": [], "start_point": {"row": 44, "column": 82}, "end_point": {"row": 44, "column": 92}}, {"id": 180, "type": "declaration", "text": "void DrawCube(const float &size, const float x = 0, const float y = 0, const float z = 0);", "parent": 106, "children": [181, 182, 194, 200], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 94}}, {"id": 181, "type": "primitive_type", "text": "void", "parent": 180, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 8}}, {"id": 182, "type": "init_declarator", "text": "DrawCube(const float &size, const float x = 0", "parent": 180, "children": [183, 192, 193], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 54}}, {"id": 183, "type": "function_declarator", "text": "DrawCube(const float &size, const float x", "parent": 182, "children": [184, 185], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 50}}, {"id": 184, "type": "identifier", "text": "DrawCube", "parent": 183, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 17}}, {"id": 185, "type": "parameter_list", "text": "(const float &size, const float x", "parent": 183, "children": [186, 189], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 50}}, {"id": 186, "type": "parameter_declaration", "text": "const float &size", "parent": 185, "children": [187, 188], "start_point": {"row": 45, "column": 18}, "end_point": {"row": 45, "column": 35}}, {"id": 187, "type": "primitive_type", "text": "float", "parent": 186, "children": [], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 29}}, {"id": 188, "type": "identifier", "text": "size", "parent": 186, "children": [], "start_point": {"row": 45, "column": 31}, "end_point": {"row": 45, "column": 35}}, {"id": 189, "type": "parameter_declaration", "text": "const float x", "parent": 185, "children": [190, 191], "start_point": {"row": 45, "column": 37}, "end_point": {"row": 45, "column": 50}}, {"id": 190, "type": "primitive_type", "text": "float", "parent": 189, "children": [], "start_point": {"row": 45, "column": 43}, "end_point": {"row": 45, "column": 48}}, {"id": 191, "type": "identifier", "text": "x", "parent": 189, "children": [], "start_point": {"row": 45, "column": 49}, "end_point": {"row": 45, "column": 50}}, {"id": 192, "type": "=", "text": "=", "parent": 182, "children": [], "start_point": {"row": 45, "column": 51}, "end_point": {"row": 45, "column": 52}}, {"id": 193, "type": "number_literal", "text": "0", "parent": 182, "children": [], "start_point": {"row": 45, "column": 53}, "end_point": {"row": 45, "column": 54}}, {"id": 194, "type": "init_declarator", "text": "const float y = 0", "parent": 180, "children": [195, 198, 199], "start_point": {"row": 45, "column": 56}, "end_point": {"row": 45, "column": 73}}, {"id": 195, "type": "ERROR", "text": "float y", "parent": 194, "children": [196, 197], "start_point": {"row": 45, "column": 62}, "end_point": {"row": 45, "column": 69}}, {"id": 196, "type": "identifier", "text": "float", "parent": 195, "children": [], "start_point": {"row": 45, "column": 62}, "end_point": {"row": 45, "column": 67}}, {"id": 197, "type": "identifier", "text": "y", "parent": 195, "children": [], "start_point": {"row": 45, "column": 68}, "end_point": {"row": 45, "column": 69}}, {"id": 198, "type": "=", "text": "=", "parent": 194, "children": [], "start_point": {"row": 45, "column": 70}, "end_point": {"row": 45, "column": 71}}, {"id": 199, "type": "number_literal", "text": "0", "parent": 194, "children": [], "start_point": {"row": 45, "column": 72}, "end_point": {"row": 45, "column": 73}}, {"id": 200, "type": "init_declarator", "text": "const float z = 0", "parent": 180, "children": [201, 204, 205], "start_point": {"row": 45, "column": 75}, "end_point": {"row": 45, "column": 92}}, {"id": 201, "type": "ERROR", "text": "float z", "parent": 200, "children": [202, 203], "start_point": {"row": 45, "column": 81}, "end_point": {"row": 45, "column": 88}}, {"id": 202, "type": "identifier", "text": "float", "parent": 201, "children": [], "start_point": {"row": 45, "column": 81}, "end_point": {"row": 45, "column": 86}}, {"id": 203, "type": "identifier", "text": "z", "parent": 201, "children": [], "start_point": {"row": 45, "column": 87}, "end_point": {"row": 45, "column": 88}}, {"id": 204, "type": "=", "text": "=", "parent": 200, "children": [], "start_point": {"row": 45, "column": 89}, "end_point": {"row": 45, "column": 90}}, {"id": 205, "type": "number_literal", "text": "0", "parent": 200, "children": [], "start_point": {"row": 45, "column": 91}, "end_point": {"row": 45, "column": 92}}, {"id": 206, "type": "declaration", "text": "void DrawPlane(int ndivs, float ndivsize);", "parent": 106, "children": [207, 208], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 46}}, {"id": 207, "type": "primitive_type", "text": "void", "parent": 206, "children": [], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 46, "column": 8}}, {"id": 208, "type": "function_declarator", "text": "DrawPlane(int ndivs, float ndivsize)", "parent": 206, "children": [209, 210], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 45}}, {"id": 209, "type": "identifier", "text": "DrawPlane", "parent": 208, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 18}}, {"id": 210, "type": "parameter_list", "text": "(int ndivs, float ndivsize)", "parent": 208, "children": [211, 214], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 45}}, {"id": 211, "type": "parameter_declaration", "text": "int ndivs", "parent": 210, "children": [212, 213], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 28}}, {"id": 212, "type": "primitive_type", "text": "int", "parent": 211, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 22}}, {"id": 213, "type": "identifier", "text": "ndivs", "parent": 211, "children": [], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 28}}, {"id": 214, "type": "parameter_declaration", "text": "float ndivsize", "parent": 210, "children": [215, 216], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 44}}, {"id": 215, "type": "primitive_type", "text": "float", "parent": 214, "children": [], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 35}}, {"id": 216, "type": "identifier", "text": "ndivsize", "parent": 214, "children": [], "start_point": {"row": 46, "column": 36}, "end_point": {"row": 46, "column": 44}}, {"id": 217, "type": "declaration", "text": "void DrawPlane(Plane* pPlane, int ndivs, float ndivsize);", "parent": 106, "children": [218, 219], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 61}}, {"id": 218, "type": "primitive_type", "text": "void", "parent": 217, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 8}}, {"id": 219, "type": "function_declarator", "text": "DrawPlane(Plane* pPlane, int ndivs, float ndivsize)", "parent": 217, "children": [220, 221], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 60}}, {"id": 220, "type": "identifier", "text": "DrawPlane", "parent": 219, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 18}}, {"id": 221, "type": "parameter_list", "text": "(Plane* pPlane, int ndivs, float ndivsize)", "parent": 219, "children": [222, 227, 230], "start_point": {"row": 47, "column": 18}, "end_point": {"row": 47, "column": 60}}, {"id": 222, "type": "parameter_declaration", "text": "Plane* pPlane", "parent": 221, "children": [223, 224], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 32}}, {"id": 223, "type": "type_identifier", "text": "Plane", "parent": 222, "children": [], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 24}}, {"id": 224, "type": "pointer_declarator", "text": "* pPlane", "parent": 222, "children": [225, 226], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 32}}, {"id": 225, "type": "*", "text": "*", "parent": 224, "children": [], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 25}}, {"id": 226, "type": "identifier", "text": "pPlane", "parent": 224, "children": [], "start_point": {"row": 47, "column": 26}, "end_point": {"row": 47, "column": 32}}, {"id": 227, "type": "parameter_declaration", "text": "int ndivs", "parent": 221, "children": [228, 229], "start_point": {"row": 47, "column": 34}, "end_point": {"row": 47, "column": 43}}, {"id": 228, "type": "primitive_type", "text": "int", "parent": 227, "children": [], "start_point": {"row": 47, "column": 34}, "end_point": {"row": 47, "column": 37}}, {"id": 229, "type": "identifier", "text": "ndivs", "parent": 227, "children": [], "start_point": {"row": 47, "column": 38}, "end_point": {"row": 47, "column": 43}}, {"id": 230, "type": "parameter_declaration", "text": "float ndivsize", "parent": 221, "children": [231, 232], "start_point": {"row": 47, "column": 45}, "end_point": {"row": 47, "column": 59}}, {"id": 231, "type": "primitive_type", "text": "float", "parent": 230, "children": [], "start_point": {"row": 47, "column": 45}, "end_point": {"row": 47, "column": 50}}, {"id": 232, "type": "identifier", "text": "ndivsize", "parent": 230, "children": [], "start_point": {"row": 47, "column": 51}, "end_point": {"row": 47, "column": 59}}, {"id": 233, "type": "declaration", "text": "bool m_should_finish;", "parent": 106, "children": [234, 235], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 22}}, {"id": 234, "type": "primitive_type", "text": "bool", "parent": 233, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 5}}, {"id": 235, "type": "identifier", "text": "m_should_finish", "parent": 233, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 21}}, {"id": 236, "type": "declaration", "text": "bool m_is_finished;", "parent": 106, "children": [237, 238], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 20}}, {"id": 237, "type": "primitive_type", "text": "bool", "parent": 236, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 5}}, {"id": 238, "type": "identifier", "text": "m_is_finished", "parent": 236, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 19}}, {"id": 239, "type": "labeled_statement", "text": "std::mutex m_mutex;", "parent": 106, "children": [240, 241], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 20}}, {"id": 240, "type": "statement_identifier", "text": "std", "parent": 239, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 4}}, {"id": 241, "type": "declaration", "text": "mutex m_mutex;", "parent": 239, "children": [242, 243], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 20}}, {"id": 242, "type": "type_identifier", "text": "mutex", "parent": 241, "children": [], "start_point": {"row": 50, "column": 6}, "end_point": {"row": 50, "column": 11}}, {"id": 243, "type": "identifier", "text": "m_mutex", "parent": 241, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 19}}, {"id": 244, "type": "declaration", "text": "DenseMapDrawer* m_map_drawer;", "parent": 106, "children": [245, 246], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 30}}, {"id": 245, "type": "type_identifier", "text": "DenseMapDrawer", "parent": 244, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 15}}, {"id": 246, "type": "pointer_declarator", "text": "* m_map_drawer", "parent": 244, "children": [247, 248], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 29}}, {"id": 247, "type": "*", "text": "*", "parent": 246, "children": [], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 16}}, {"id": 248, "type": "identifier", "text": "m_map_drawer", "parent": 246, "children": [], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 29}}, {"id": 249, "type": "declaration", "text": "float m_viewpoint_x;", "parent": 106, "children": [250, 251], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 21}}, {"id": 250, "type": "primitive_type", "text": "float", "parent": 249, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 6}}, {"id": 251, "type": "identifier", "text": "m_viewpoint_x", "parent": 249, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 20}}, {"id": 252, "type": "declaration", "text": "float m_viewpoint_y;", "parent": 106, "children": [253, 254], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 21}}, {"id": 253, "type": "primitive_type", "text": "float", "parent": 252, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 6}}, {"id": 254, "type": "identifier", "text": "m_viewpoint_y", "parent": 252, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 20}}, {"id": 255, "type": "declaration", "text": "float m_viewpoint_z;", "parent": 106, "children": [256, 257], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 21}}, {"id": 256, "type": "primitive_type", "text": "float", "parent": 255, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 6}}, {"id": 257, "type": "identifier", "text": "m_viewpoint_z", "parent": 255, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 20}}, {"id": 258, "type": "declaration", "text": "float m_viewpoint_f;", "parent": 106, "children": [259, 260], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 21}}, {"id": 259, "type": "primitive_type", "text": "float", "parent": 258, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 6}}, {"id": 260, "type": "identifier", "text": "m_viewpoint_f", "parent": 258, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 20}}, {"id": 261, "type": "declaration", "text": "bool system_running;", "parent": 106, "children": [262, 263], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 24}}, {"id": 262, "type": "primitive_type", "text": "bool", "parent": 261, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 8}}, {"id": 263, "type": "identifier", "text": "system_running", "parent": 261, "children": [], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 23}}]}, "node_categories": {"declarations": {"functions": [12, 63, 106, 122, 127, 132, 137, 140, 142, 150, 160, 183, 208, 219], "variables": [61, 68, 73, 76, 81, 86, 102, 120, 125, 130, 135, 148, 153, 156, 163, 168, 177, 180, 186, 189, 206, 211, 214, 217, 222, 227, 230, 233, 236, 241, 244, 249, 252, 255, 258, 261], "classes": [], "imports": [3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [20, 24, 25, 28, 32, 35, 36, 42, 43, 46, 47, 50, 51, 54, 55, 58, 92, 96, 109, 112], "assignments": [], "loops": [], "conditionals": [13, 16, 19, 21, 23, 26, 29, 31, 33, 34, 37, 41, 44, 45, 48, 49, 52, 53, 56, 57, 59, 60, 64, 67, 69, 70, 72, 74, 75, 78, 80, 82, 83, 85, 87, 88, 90, 93, 95, 97, 99, 101, 103, 104, 105, 107, 110, 113, 115, 117, 118, 119, 123, 128, 133, 138, 143, 146, 151, 155, 157, 161, 164, 166, 167, 169, 171, 173, 174, 176, 179, 184, 188, 191, 196, 197, 202, 203, 209, 213, 216, 220, 223, 226, 229, 232, 235, 238, 240, 242, 243, 245, 248, 251, 254, 257, 260, 263], "returns": [145], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 193, 199, 205], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "Plane", "text_snippet": "class Plane\n{\npublic:\n Plane(const std::vector<cv::Vec3f> &vMPs, const cv::Mat &Tcw);\n Plane(c"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "Recompute()"}, {"node_id": 106, "universal_type": "function", "name": "DenseMapViewer", "text_snippet": "class DenseMapViewer\n{\npublic:\n\tDenseMapViewer(DenseMapDrawer* drawer, std::string setting_file);\n\tv"}, {"node_id": 122, "universal_type": "function", "name": "unknown", "text_snippet": "run()"}, {"node_id": 127, "universal_type": "function", "name": "unknown", "text_snippet": "request_finish()"}, {"node_id": 132, "universal_type": "function", "name": "unknown", "text_snippet": "should_finish()"}, {"node_id": 137, "universal_type": "function", "name": "unknown", "text_snippet": "is_finished()"}, {"node_id": 140, "universal_type": "function", "name": "system_running_status", "text_snippet": "bool system_running_status()\n {\n return system_running;\n }"}, {"node_id": 142, "universal_type": "function", "name": "unknown", "text_snippet": "system_running_status()"}, {"node_id": 150, "universal_type": "function", "name": "unknown", "text_snippet": "set_finished(bool status)"}, {"node_id": 160, "universal_type": "function", "name": "iterations)", "text_snippet": "DetectPlane(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations)"}, {"node_id": 183, "universal_type": "function", "name": "unknown", "text_snippet": "DrawCube(const float &size, const float x"}, {"node_id": 208, "universal_type": "function", "name": "unknown", "text_snippet": "DrawPlane(int ndivs, float ndivsize)"}, {"node_id": 219, "universal_type": "function", "name": "ndivs,", "text_snippet": "DrawPlane(Plane* pPlane, int ndivs, float ndivsize)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include\"DenseMapDrawer.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <thread> // std::thread\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <mutex> // std::mutex, std::unique_lock\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include\"DenseMapDrawer.h\"\n#include <thread> // std::thread\n#include <mutex> // std::mutex, std::unique_lock\nclass Plane\n{\npublic:\n Plane(const std::vector<cv::Vec3f> &vMPs, const cv::Mat &Tcw);\n Plane(const float &nx, const float &ny, const float &nz, const float &ox, const float &oy, const float &oz);\n\n void Recompute();\n\n //normal\n cv::Mat n;\n //origin\n cv::Mat o;\n //arbitrary orientation along normal\n float rang;\n //transformation from world to the plane\n cv::Mat Tpw;\n pangolin::OpenGlMatrix glTpw;\n //MapPoints that define the plane\n std::vector<cv::Vec3f> mvMPs;\n //camera pose when the plane was first observed (to compute normal direction)\n cv::Mat mTcw, XC;\n};\n\nclass DenseMapViewer\n{\npublic:\n\tDenseMapViewer(DenseMapDrawer* drawer, std::string setting_file);\n\tvoid run();\n\tvoid request_finish();\n\tbool should_finish();\n\tbool is_finished();\n bool system_running_status()\n {\n return system_running;\n }\n\nprotected:\n\tvoid set_finished(bool status);\n \n Plane* DetectPlane(const cv::Mat Tcw, std::vector<cv::Vec3f> &vMPs, const int iterations);\n void DrawCube(const float &size, const float x = 0, const float y = 0, const float z = 0);\n void DrawPlane(int ndivs, float ndivsize);\n void DrawPlane(Plane* pPlane, int ndivs, float ndivsize);\n\tbool m_should_finish;\n\tbool m_is_finished;\n\tstd::mutex m_mutex;\n\tDenseMapDrawer* m_map_drawer;\n\n\tfloat m_viewpoint_x;\n\tfloat m_viewpoint_y;\n\tfloat m_viewpoint_z;\n\tfloat m_viewpoint_f;\n\n bool system_running;\n};\n\n"}
14
c
/* * Original work: * htpasswd.c: simple program for manipulating password file for NCSA httpd. * <NAME> * Adapted for Apache CouchDB by <NAME> <<EMAIL>>. */ #include <sys/types.h> #include <stdio.h> #include <string.h> #include <sys/signal.h> #include <stdlib.h> #include <time.h> #include <unistd.h> #define LF 10 #define CR 13 #define MAX_STRING_LEN 256 char *tn; char *strd(char *s) { char *d; d=(char *)malloc(strlen(s) + 1); strcpy(d,s); return(d); } void getword(char *word, char *line, char stop) { int x = 0,y; for(x=0;((line[x]) && (line[x] != stop));x++) word[x] = line[x]; word[x] = '\0'; if(line[x]) ++x; y=0; while((line[y++] = line[x++])); } int getline(char *s, int n, FILE *f) { register int i=0; while(1) { s[i] = (char)fgetc(f); if(s[i] == CR) s[i] = fgetc(f); if((s[i] == 0x4) || (s[i] == LF) || (i == (n-1))) { s[i] = '\0'; return (feof(f) ? 1 : 0); } ++i; } } void putline(FILE *f,char *l) { int x; for(x=0;l[x];x++) fputc(l[x],f); fputc('\n',f); } /* From local_passwd.c (C) Regents of Univ. of California blah blah */ static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */ "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; void to64(s, v, n) register char *s; register long v; register int n; { while (--n >= 0) { *s++ = itoa64[v&0x3f]; v >>= 6; } } // char *crypt(char *pw, char *salt); /* why aren't these prototyped in include */ // char *getpass(char *prompt); void add_password(char *user, FILE *f) { char *pw, *cpw, salt[3]; pw = strd(getpass("New password:")); if(strcmp(pw,getpass("Re-type new password:"))) { fprintf(stderr,"They don't match, sorry.\n"); if(tn) unlink(tn); exit(1); } (void)srand((int)time((time_t *)NULL)); to64(&salt[0],rand(),2); cpw = crypt(pw,salt); free(pw); fprintf(f,"%s:%s\n",user,cpw); } void usage() { fprintf(stderr,"Usage: couchpw [-c] passwordfile username\n"); fprintf(stderr,"The -c flag creates a new file.\n"); exit(1); } void interrupted() { fprintf(stderr,"Interrupted.\n"); if(tn) unlink(tn); exit(1); } int main(int argc, char *argv[]) { FILE *tfp,*f; char user[MAX_STRING_LEN]; char line[MAX_STRING_LEN]; char l[MAX_STRING_LEN]; char w[MAX_STRING_LEN]; char command[MAX_STRING_LEN]; int found; tn = NULL; signal(SIGINT,(void (*)())interrupted); if(argc == 4) { if(strcmp(argv[1],"-c")) usage(); if(!(tfp = fopen(argv[2],"w"))) { fprintf(stderr,"Could not open passwd file %s for writing.\n", argv[2]); perror("fopen"); exit(1); } printf("Adding password for %s.\n",argv[3]); add_password(argv[3],tfp); fclose(tfp); exit(0); } else if(argc != 3) usage(); tn = tmpnam(NULL); if(!(tfp = fopen(tn,"w"))) { fprintf(stderr,"Could not open temp file.\n"); exit(1); } if(!(f = fopen(argv[1],"r"))) { fprintf(stderr, "Could not open passwd file %s for reading.\n",argv[1]); fprintf(stderr,"Use -c option to create new one.\n"); exit(1); } strcpy(user,argv[2]); found = 0; while(!(getline(line,MAX_STRING_LEN,f))) { if(found || (line[0] == '#') || (!line[0])) { putline(tfp,line); continue; } strcpy(l,line); getword(w,l,':'); if(strcmp(user,w)) { putline(tfp,line); continue; } else { printf("Changing password for user %s\n",user); add_password(user,tfp); found = 1; } } if(!found) { printf("Adding user %s\n",user); add_password(user,tfp); } fclose(f); fclose(tfp); sprintf(command,"cp %s %s",tn,argv[1]); system(command); unlink(tn); exit(0); }
25.19
156
(translation_unit) "/*\n * Original work:\n * htpasswd.c: simple program for manipulating password file for NCSA httpd.\n * <NAME>\n * Adapted for Apache CouchDB by <NAME> <<EMAIL>>. \n */\n\n#include <sys/types.h>\n#include <stdio.h>\n#include <string.h>\n#include <sys/signal.h>\n#include <stdlib.h>\n#include <time.h>\n#include <unistd.h>\n\n#define LF 10\n#define CR 13\n\n#define MAX_STRING_LEN 256\n\nchar *tn;\n\nchar *strd(char *s) {\n char *d;\n\n d=(char *)malloc(strlen(s) + 1);\n strcpy(d,s);\n return(d);\n}\n\nvoid getword(char *word, char *line, char stop) {\n int x = 0,y;\n\n for(x=0;((line[x]) && (line[x] != stop));x++)\n word[x] = line[x];\n\n word[x] = '\0';\n if(line[x]) ++x;\n y=0;\n\n while((line[y++] = line[x++]));\n}\n\nint getline(char *s, int n, FILE *f) {\n register int i=0;\n\n while(1) {\n s[i] = (char)fgetc(f);\n\n if(s[i] == CR)\n s[i] = fgetc(f);\n\n if((s[i] == 0x4) || (s[i] == LF) || (i == (n-1))) {\n s[i] = '\0';\n return (feof(f) ? 1 : 0);\n }\n ++i;\n }\n}\n\nvoid putline(FILE *f,char *l) {\n int x;\n\n for(x=0;l[x];x++) fputc(l[x],f);\n fputc('\n',f);\n}\n\n\n/* From local_passwd.c (C) Regents of Univ. of California blah blah */\nstatic unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */\n "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";\n\nvoid to64(s, v, n)\n register char *s;\n register long v;\n register int n;\n{\n while (--n >= 0) {\n *s++ = itoa64[v&0x3f];\n v >>= 6;\n }\n}\n\n// char *crypt(char *pw, char *salt); /* why aren't these prototyped in include */\n// char *getpass(char *prompt);\n\nvoid add_password(char *user, FILE *f) {\n char *pw, *cpw, salt[3];\n\n pw = strd(getpass("New password:"));\n if(strcmp(pw,getpass("Re-type new password:"))) {\n fprintf(stderr,"They don't match, sorry.\n");\n if(tn)\n unlink(tn);\n exit(1);\n }\n (void)srand((int)time((time_t *)NULL));\n to64(&salt[0],rand(),2);\n cpw = crypt(pw,salt);\n free(pw);\n fprintf(f,"%s:%s\n",user,cpw);\n}\n\nvoid usage() {\n fprintf(stderr,"Usage: couchpw [-c] passwordfile username\n");\n fprintf(stderr,"The -c flag creates a new file.\n");\n exit(1);\n}\n\nvoid interrupted() {\n fprintf(stderr,"Interrupted.\n");\n if(tn) unlink(tn);\n exit(1);\n}\n\nint main(int argc, char *argv[]) {\n FILE *tfp,*f;\n char user[MAX_STRING_LEN];\n char line[MAX_STRING_LEN];\n char l[MAX_STRING_LEN];\n char w[MAX_STRING_LEN];\n char command[MAX_STRING_LEN];\n int found;\n\n tn = NULL;\n signal(SIGINT,(void (*)())interrupted);\n if(argc == 4) {\n if(strcmp(argv[1],"-c"))\n usage();\n if(!(tfp = fopen(argv[2],"w"))) {\n fprintf(stderr,"Could not open passwd file %s for writing.\n",\n argv[2]);\n perror("fopen");\n exit(1);\n }\n printf("Adding password for %s.\n",argv[3]);\n add_password(argv[3],tfp);\n fclose(tfp);\n exit(0);\n } else if(argc != 3) usage();\n\n tn = tmpnam(NULL);\n if(!(tfp = fopen(tn,"w"))) {\n fprintf(stderr,"Could not open temp file.\n");\n exit(1);\n }\n\n if(!(f = fopen(argv[1],"r"))) {\n fprintf(stderr,\n "Could not open passwd file %s for reading.\n",argv[1]);\n fprintf(stderr,"Use -c option to create new one.\n");\n exit(1);\n }\n strcpy(user,argv[2]);\n\n found = 0;\n while(!(getline(line,MAX_STRING_LEN,f))) {\n if(found || (line[0] == '#') || (!line[0])) {\n putline(tfp,line);\n continue;\n }\n strcpy(l,line);\n getword(w,l,':');\n if(strcmp(user,w)) {\n putline(tfp,line);\n continue;\n }\n else {\n printf("Changing password for user %s\n",user);\n add_password(user,tfp);\n found = 1;\n }\n }\n if(!found) {\n printf("Adding user %s\n",user);\n add_password(user,tfp);\n }\n fclose(f);\n fclose(tfp);\n sprintf(command,"cp %s %s",tn,argv[1]);\n system(command);\n unlink(tn);\n exit(0);\n}\n" (comment) "/*\n * Original work:\n * htpasswd.c: simple program for manipulating password file for NCSA httpd.\n * <NAME>\n * Adapted for Apache CouchDB by <NAME> <<EMAIL>>. \n */" (preproc_include) "#include <sys/types.h>\n" (#include) "#include" (system_lib_string) "<sys/types.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>" (preproc_include) "#include <sys/signal.h>\n" (#include) "#include" (system_lib_string) "<sys/signal.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <time.h>\n" (#include) "#include" (system_lib_string) "<time.h>" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (preproc_def) "#define LF 10\n" (#define) "#define" (identifier) "LF" (preproc_arg) "10" (preproc_def) "#define CR 13\n" (#define) "#define" (identifier) "CR" (preproc_arg) "13" (preproc_def) "#define MAX_STRING_LEN 256\n" (#define) "#define" (identifier) "MAX_STRING_LEN" (preproc_arg) "256" (declaration) "char *tn;" (primitive_type) "char" (pointer_declarator) "*tn" (*) "*" (identifier) "tn" (;) ";" (function_definition) "char *strd(char *s) {\n char *d;\n\n d=(char *)malloc(strlen(s) + 1);\n strcpy(d,s);\n return(d);\n}" (primitive_type) "char" (pointer_declarator) "*strd(char *s)" (*) "*" (function_declarator) "strd(char *s)" (identifier) "strd" (parameter_list) "(char *s)" (() "(" (parameter_declaration) "char *s" (primitive_type) "char" (pointer_declarator) "*s" (*) "*" (identifier) "s" ()) ")" (compound_statement) "{\n char *d;\n\n d=(char *)malloc(strlen(s) + 1);\n strcpy(d,s);\n return(d);\n}" ({) "{" (declaration) "char *d;" (primitive_type) "char" (pointer_declarator) "*d" (*) "*" (identifier) "d" (;) ";" (expression_statement) "d=(char *)malloc(strlen(s) + 1);" (assignment_expression) "d=(char *)malloc(strlen(s) + 1)" (identifier) "d" (=) "=" (cast_expression) "(char *)malloc(strlen(s) + 1)" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(strlen(s) + 1)" (identifier) "malloc" (argument_list) "(strlen(s) + 1)" (() "(" (binary_expression) "strlen(s) + 1" (call_expression) "strlen(s)" (identifier) "strlen" (argument_list) "(s)" (() "(" (identifier) "s" ()) ")" (+) "+" (number_literal) "1" ()) ")" (;) ";" (expression_statement) "strcpy(d,s);" (call_expression) "strcpy(d,s)" (identifier) "strcpy" (argument_list) "(d,s)" (() "(" (identifier) "d" (,) "," (identifier) "s" ()) ")" (;) ";" (return_statement) "return(d);" (return) "return" (parenthesized_expression) "(d)" (() "(" (identifier) "d" ()) ")" (;) ";" (}) "}" (function_definition) "void getword(char *word, char *line, char stop) {\n int x = 0,y;\n\n for(x=0;((line[x]) && (line[x] != stop));x++)\n word[x] = line[x];\n\n word[x] = '\0';\n if(line[x]) ++x;\n y=0;\n\n while((line[y++] = line[x++]));\n}" (primitive_type) "void" (function_declarator) "getword(char *word, char *line, char stop)" (identifier) "getword" (parameter_list) "(char *word, char *line, char stop)" (() "(" (parameter_declaration) "char *word" (primitive_type) "char" (pointer_declarator) "*word" (*) "*" (identifier) "word" (,) "," (parameter_declaration) "char *line" (primitive_type) "char" (pointer_declarator) "*line" (*) "*" (identifier) "line" (,) "," (parameter_declaration) "char stop" (primitive_type) "char" (identifier) "stop" ()) ")" (compound_statement) "{\n int x = 0,y;\n\n for(x=0;((line[x]) && (line[x] != stop));x++)\n word[x] = line[x];\n\n word[x] = '\0';\n if(line[x]) ++x;\n y=0;\n\n while((line[y++] = line[x++]));\n}" ({) "{" (declaration) "int x = 0,y;" (primitive_type) "int" (init_declarator) "x = 0" (identifier) "x" (=) "=" (number_literal) "0" (,) "," (identifier) "y" (;) ";" (for_statement) "for(x=0;((line[x]) && (line[x] != stop));x++)\n word[x] = line[x];" (for) "for" (() "(" (assignment_expression) "x=0" (identifier) "x" (=) "=" (number_literal) "0" (;) ";" (parenthesized_expression) "((line[x]) && (line[x] != stop))" (() "(" (binary_expression) "(line[x]) && (line[x] != stop)" (parenthesized_expression) "(line[x])" (() "(" (subscript_expression) "line[x]" (identifier) "line" ([) "[" (identifier) "x" (]) "]" ()) ")" (&&) "&&" (parenthesized_expression) "(line[x] != stop)" (() "(" (binary_expression) "line[x] != stop" (subscript_expression) "line[x]" (identifier) "line" ([) "[" (identifier) "x" (]) "]" (!=) "!=" (identifier) "stop" ()) ")" ()) ")" (;) ";" (update_expression) "x++" (identifier) "x" (++) "++" ()) ")" (expression_statement) "word[x] = line[x];" (assignment_expression) "word[x] = line[x]" (subscript_expression) "word[x]" (identifier) "word" ([) "[" (identifier) "x" (]) "]" (=) "=" (subscript_expression) "line[x]" (identifier) "line" ([) "[" (identifier) "x" (]) "]" (;) ";" (expression_statement) "word[x] = '\0';" (assignment_expression) "word[x] = '\0'" (subscript_expression) "word[x]" (identifier) "word" ([) "[" (identifier) "x" (]) "]" (=) "=" (char_literal) "'\0'" (') "'" (escape_sequence) "\0" (') "'" (;) ";" (if_statement) "if(line[x]) ++x;" (if) "if" (parenthesized_expression) "(line[x])" (() "(" (subscript_expression) "line[x]" (identifier) "line" ([) "[" (identifier) "x" (]) "]" ()) ")" (expression_statement) "++x;" (update_expression) "++x" (++) "++" (identifier) "x" (;) ";" (expression_statement) "y=0;" (assignment_expression) "y=0" (identifier) "y" (=) "=" (number_literal) "0" (;) ";" (while_statement) "while((line[y++] = line[x++]));" (while) "while" (parenthesized_expression) "((line[y++] = line[x++]))" (() "(" (parenthesized_expression) "(line[y++] = line[x++])" (() "(" (assignment_expression) "line[y++] = line[x++]" (subscript_expression) "line[y++]" (identifier) "line" ([) "[" (update_expression) "y++" (identifier) "y" (++) "++" (]) "]" (=) "=" (subscript_expression) "line[x++]" (identifier) "line" ([) "[" (update_expression) "x++" (identifier) "x" (++) "++" (]) "]" ()) ")" ()) ")" (expression_statement) ";" (;) ";" (}) "}" (function_definition) "int getline(char *s, int n, FILE *f) {\n register int i=0;\n\n while(1) {\n s[i] = (char)fgetc(f);\n\n if(s[i] == CR)\n s[i] = fgetc(f);\n\n if((s[i] == 0x4) || (s[i] == LF) || (i == (n-1))) {\n s[i] = '\0';\n return (feof(f) ? 1 : 0);\n }\n ++i;\n }\n}" (primitive_type) "int" (function_declarator) "getline(char *s, int n, FILE *f)" (identifier) "getline" (parameter_list) "(char *s, int n, FILE *f)" (() "(" (parameter_declaration) "char *s" (primitive_type) "char" (pointer_declarator) "*s" (*) "*" (identifier) "s" (,) "," (parameter_declaration) "int n" (primitive_type) "int" (identifier) "n" (,) "," (parameter_declaration) "FILE *f" (type_identifier) "FILE" (pointer_declarator) "*f" (*) "*" (identifier) "f" ()) ")" (compound_statement) "{\n register int i=0;\n\n while(1) {\n s[i] = (char)fgetc(f);\n\n if(s[i] == CR)\n s[i] = fgetc(f);\n\n if((s[i] == 0x4) || (s[i] == LF) || (i == (n-1))) {\n s[i] = '\0';\n return (feof(f) ? 1 : 0);\n }\n ++i;\n }\n}" ({) "{" (declaration) "register int i=0;" (storage_class_specifier) "register" (register) "register" (primitive_type) "int" (init_declarator) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (while_statement) "while(1) {\n s[i] = (char)fgetc(f);\n\n if(s[i] == CR)\n s[i] = fgetc(f);\n\n if((s[i] == 0x4) || (s[i] == LF) || (i == (n-1))) {\n s[i] = '\0';\n return (feof(f) ? 1 : 0);\n }\n ++i;\n }" (while) "while" (parenthesized_expression) "(1)" (() "(" (number_literal) "1" ()) ")" (compound_statement) "{\n s[i] = (char)fgetc(f);\n\n if(s[i] == CR)\n s[i] = fgetc(f);\n\n if((s[i] == 0x4) || (s[i] == LF) || (i == (n-1))) {\n s[i] = '\0';\n return (feof(f) ? 1 : 0);\n }\n ++i;\n }" ({) "{" (expression_statement) "s[i] = (char)fgetc(f);" (assignment_expression) "s[i] = (char)fgetc(f)" (subscript_expression) "s[i]" (identifier) "s" ([) "[" (identifier) "i" (]) "]" (=) "=" (cast_expression) "(char)fgetc(f)" (() "(" (type_descriptor) "char" (primitive_type) "char" ()) ")" (call_expression) "fgetc(f)" (identifier) "fgetc" (argument_list) "(f)" (() "(" (identifier) "f" ()) ")" (;) ";" (if_statement) "if(s[i] == CR)\n s[i] = fgetc(f);" (if) "if" (parenthesized_expression) "(s[i] == CR)" (() "(" (binary_expression) "s[i] == CR" (subscript_expression) "s[i]" (identifier) "s" ([) "[" (identifier) "i" (]) "]" (==) "==" (identifier) "CR" ()) ")" (expression_statement) "s[i] = fgetc(f);" (assignment_expression) "s[i] = fgetc(f)" (subscript_expression) "s[i]" (identifier) "s" ([) "[" (identifier) "i" (]) "]" (=) "=" (call_expression) "fgetc(f)" (identifier) "fgetc" (argument_list) "(f)" (() "(" (identifier) "f" ()) ")" (;) ";" (if_statement) "if((s[i] == 0x4) || (s[i] == LF) || (i == (n-1))) {\n s[i] = '\0';\n return (feof(f) ? 1 : 0);\n }" (if) "if" (parenthesized_expression) "((s[i] == 0x4) || (s[i] == LF) || (i == (n-1)))" (() "(" (binary_expression) "(s[i] == 0x4) || (s[i] == LF) || (i == (n-1))" (binary_expression) "(s[i] == 0x4) || (s[i] == LF)" (parenthesized_expression) "(s[i] == 0x4)" (() "(" (binary_expression) "s[i] == 0x4" (subscript_expression) "s[i]" (identifier) "s" ([) "[" (identifier) "i" (]) "]" (==) "==" (number_literal) "0x4" ()) ")" (||) "||" (parenthesized_expression) "(s[i] == LF)" (() "(" (binary_expression) "s[i] == LF" (subscript_expression) "s[i]" (identifier) "s" ([) "[" (identifier) "i" (]) "]" (==) "==" (identifier) "LF" ()) ")" (||) "||" (parenthesized_expression) "(i == (n-1))" (() "(" (binary_expression) "i == (n-1)" (identifier) "i" (==) "==" (parenthesized_expression) "(n-1)" (() "(" (binary_expression) "n-1" (identifier) "n" (-) "-" (number_literal) "1" ()) ")" ()) ")" ()) ")" (compound_statement) "{\n s[i] = '\0';\n return (feof(f) ? 1 : 0);\n }" ({) "{" (expression_statement) "s[i] = '\0';" (assignment_expression) "s[i] = '\0'" (subscript_expression) "s[i]" (identifier) "s" ([) "[" (identifier) "i" (]) "]" (=) "=" (char_literal) "'\0'" (') "'" (escape_sequence) "\0" (') "'" (;) ";" (return_statement) "return (feof(f) ? 1 : 0);" (return) "return" (parenthesized_expression) "(feof(f) ? 1 : 0)" (() "(" (conditional_expression) "feof(f) ? 1 : 0" (call_expression) "feof(f)" (identifier) "feof" (argument_list) "(f)" (() "(" (identifier) "f" ()) ")" (?) "?" (number_literal) "1" (:) ":" (number_literal) "0" ()) ")" (;) ";" (}) "}" (expression_statement) "++i;" (update_expression) "++i" (++) "++" (identifier) "i" (;) ";" (}) "}" (}) "}" (function_definition) "void putline(FILE *f,char *l) {\n int x;\n\n for(x=0;l[x];x++) fputc(l[x],f);\n fputc('\n',f);\n}" (primitive_type) "void" (function_declarator) "putline(FILE *f,char *l)" (identifier) "putline" (parameter_list) "(FILE *f,char *l)" (() "(" (parameter_declaration) "FILE *f" (type_identifier) "FILE" (pointer_declarator) "*f" (*) "*" (identifier) "f" (,) "," (parameter_declaration) "char *l" (primitive_type) "char" (pointer_declarator) "*l" (*) "*" (identifier) "l" ()) ")" (compound_statement) "{\n int x;\n\n for(x=0;l[x];x++) fputc(l[x],f);\n fputc('\n',f);\n}" ({) "{" (declaration) "int x;" (primitive_type) "int" (identifier) "x" (;) ";" (for_statement) "for(x=0;l[x];x++) fputc(l[x],f);" (for) "for" (() "(" (assignment_expression) "x=0" (identifier) "x" (=) "=" (number_literal) "0" (;) ";" (subscript_expression) "l[x]" (identifier) "l" ([) "[" (identifier) "x" (]) "]" (;) ";" (update_expression) "x++" (identifier) "x" (++) "++" ()) ")" (expression_statement) "fputc(l[x],f);" (call_expression) "fputc(l[x],f)" (identifier) "fputc" (argument_list) "(l[x],f)" (() "(" (subscript_expression) "l[x]" (identifier) "l" ([) "[" (identifier) "x" (]) "]" (,) "," (identifier) "f" ()) ")" (;) ";" (expression_statement) "fputc('\n',f);" (call_expression) "fputc('\n',f)" (identifier) "fputc" (argument_list) "('\n',f)" (() "(" (char_literal) "'\n'" (') "'" (escape_sequence) "\n" (') "'" (,) "," (identifier) "f" ()) ")" (;) ";" (}) "}" (comment) "/* From local_passwd.c (C) Regents of Univ. of California blah blah */" (declaration) "static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */\n "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";" (storage_class_specifier) "static" (static) "static" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (init_declarator) "itoa64[] = /* 0 ... 63 => ascii - 64 */\n "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"" (array_declarator) "itoa64[]" (identifier) "itoa64" ([) "[" (]) "]" (=) "=" (comment) "/* 0 ... 63 => ascii - 64 */" (string_literal) ""./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"" (") """ (string_content) "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" (") """ (;) ";" (function_definition) "void to64(s, v, n)\n register char *s;\n register long v;\n register int n;\n{\n while (--n >= 0) {\n *s++ = itoa64[v&0x3f];\n v >>= 6;\n }\n}" (primitive_type) "void" (function_declarator) "to64(s, v, n)" (identifier) "to64" (parameter_list) "(s, v, n)" (() "(" (identifier) "s" (,) "," (identifier) "v" (,) "," (identifier) "n" ()) ")" (declaration) "register char *s;" (storage_class_specifier) "register" (register) "register" (primitive_type) "char" (pointer_declarator) "*s" (*) "*" (identifier) "s" (;) ";" (declaration) "register long v;" (storage_class_specifier) "register" (register) "register" (sized_type_specifier) "long" (long) "long" (identifier) "v" (;) ";" (declaration) "register int n;" (storage_class_specifier) "register" (register) "register" (primitive_type) "int" (identifier) "n" (;) ";" (compound_statement) "{\n while (--n >= 0) {\n *s++ = itoa64[v&0x3f];\n v >>= 6;\n }\n}" ({) "{" (while_statement) "while (--n >= 0) {\n *s++ = itoa64[v&0x3f];\n v >>= 6;\n }" (while) "while" (parenthesized_expression) "(--n >= 0)" (() "(" (binary_expression) "--n >= 0" (update_expression) "--n" (--) "--" (identifier) "n" (>=) ">=" (number_literal) "0" ()) ")" (compound_statement) "{\n *s++ = itoa64[v&0x3f];\n v >>= 6;\n }" ({) "{" (expression_statement) "*s++ = itoa64[v&0x3f];" (assignment_expression) "*s++ = itoa64[v&0x3f]" (pointer_expression) "*s++" (*) "*" (update_expression) "s++" (identifier) "s" (++) "++" (=) "=" (subscript_expression) "itoa64[v&0x3f]" (identifier) "itoa64" ([) "[" (binary_expression) "v&0x3f" (identifier) "v" (&) "&" (number_literal) "0x3f" (]) "]" (;) ";" (expression_statement) "v >>= 6;" (assignment_expression) "v >>= 6" (identifier) "v" (>>=) ">>=" (number_literal) "6" (;) ";" (}) "}" (}) "}" (comment) "// char *crypt(char *pw, char *salt); /* why aren't these prototyped in include */" (comment) "// char *getpass(char *prompt);" (function_definition) "void add_password(char *user, FILE *f) {\n char *pw, *cpw, salt[3];\n\n pw = strd(getpass("New password:"));\n if(strcmp(pw,getpass("Re-type new password:"))) {\n fprintf(stderr,"They don't match, sorry.\n");\n if(tn)\n unlink(tn);\n exit(1);\n }\n (void)srand((int)time((time_t *)NULL));\n to64(&salt[0],rand(),2);\n cpw = crypt(pw,salt);\n free(pw);\n fprintf(f,"%s:%s\n",user,cpw);\n}" (primitive_type) "void" (function_declarator) "add_password(char *user, FILE *f)" (identifier) "add_password" (parameter_list) "(char *user, FILE *f)" (() "(" (parameter_declaration) "char *user" (primitive_type) "char" (pointer_declarator) "*user" (*) "*" (identifier) "user" (,) "," (parameter_declaration) "FILE *f" (type_identifier) "FILE" (pointer_declarator) "*f" (*) "*" (identifier) "f" ()) ")" (compound_statement) "{\n char *pw, *cpw, salt[3];\n\n pw = strd(getpass("New password:"));\n if(strcmp(pw,getpass("Re-type new password:"))) {\n fprintf(stderr,"They don't match, sorry.\n");\n if(tn)\n unlink(tn);\n exit(1);\n }\n (void)srand((int)time((time_t *)NULL));\n to64(&salt[0],rand(),2);\n cpw = crypt(pw,salt);\n free(pw);\n fprintf(f,"%s:%s\n",user,cpw);\n}" ({) "{" (declaration) "char *pw, *cpw, salt[3];" (primitive_type) "char" (pointer_declarator) "*pw" (*) "*" (identifier) "pw" (,) "," (pointer_declarator) "*cpw" (*) "*" (identifier) "cpw" (,) "," (array_declarator) "salt[3]" (identifier) "salt" ([) "[" (number_literal) "3" (]) "]" (;) ";" (expression_statement) "pw = strd(getpass("New password:"));" (assignment_expression) "pw = strd(getpass("New password:"))" (identifier) "pw" (=) "=" (call_expression) "strd(getpass("New password:"))" (identifier) "strd" (argument_list) "(getpass("New password:"))" (() "(" (call_expression) "getpass("New password:")" (identifier) "getpass" (argument_list) "("New password:")" (() "(" (string_literal) ""New password:"" (") """ (string_content) "New password:" (") """ ()) ")" ()) ")" (;) ";" (if_statement) "if(strcmp(pw,getpass("Re-type new password:"))) {\n fprintf(stderr,"They don't match, sorry.\n");\n if(tn)\n unlink(tn);\n exit(1);\n }" (if) "if" (parenthesized_expression) "(strcmp(pw,getpass("Re-type new password:")))" (() "(" (call_expression) "strcmp(pw,getpass("Re-type new password:"))" (identifier) "strcmp" (argument_list) "(pw,getpass("Re-type new password:"))" (() "(" (identifier) "pw" (,) "," (call_expression) "getpass("Re-type new password:")" (identifier) "getpass" (argument_list) "("Re-type new password:")" (() "(" (string_literal) ""Re-type new password:"" (") """ (string_content) "Re-type new password:" (") """ ()) ")" ()) ")" ()) ")" (compound_statement) "{\n fprintf(stderr,"They don't match, sorry.\n");\n if(tn)\n unlink(tn);\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr,"They don't match, sorry.\n");" (call_expression) "fprintf(stderr,"They don't match, sorry.\n")" (identifier) "fprintf" (argument_list) "(stderr,"They don't match, sorry.\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""They don't match, sorry.\n"" (") """ (string_content) "They don't match, sorry." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (if_statement) "if(tn)\n unlink(tn);" (if) "if" (parenthesized_expression) "(tn)" (() "(" (identifier) "tn" ()) ")" (expression_statement) "unlink(tn);" (call_expression) "unlink(tn)" (identifier) "unlink" (argument_list) "(tn)" (() "(" (identifier) "tn" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "(void)srand((int)time((time_t *)NULL));" (cast_expression) "(void)srand((int)time((time_t *)NULL))" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (call_expression) "srand((int)time((time_t *)NULL))" (identifier) "srand" (argument_list) "((int)time((time_t *)NULL))" (() "(" (cast_expression) "(int)time((time_t *)NULL)" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (call_expression) "time((time_t *)NULL)" (identifier) "time" (argument_list) "((time_t *)NULL)" (() "(" (cast_expression) "(time_t *)NULL" (() "(" (type_descriptor) "time_t *" (type_identifier) "time_t" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (null) "NULL" (NULL) "NULL" ()) ")" ()) ")" (;) ";" (expression_statement) "to64(&salt[0],rand(),2);" (call_expression) "to64(&salt[0],rand(),2)" (identifier) "to64" (argument_list) "(&salt[0],rand(),2)" (() "(" (pointer_expression) "&salt[0]" (&) "&" (subscript_expression) "salt[0]" (identifier) "salt" ([) "[" (number_literal) "0" (]) "]" (,) "," (call_expression) "rand()" (identifier) "rand" (argument_list) "()" (() "(" ()) ")" (,) "," (number_literal) "2" ()) ")" (;) ";" (expression_statement) "cpw = crypt(pw,salt);" (assignment_expression) "cpw = crypt(pw,salt)" (identifier) "cpw" (=) "=" (call_expression) "crypt(pw,salt)" (identifier) "crypt" (argument_list) "(pw,salt)" (() "(" (identifier) "pw" (,) "," (identifier) "salt" ()) ")" (;) ";" (expression_statement) "free(pw);" (call_expression) "free(pw)" (identifier) "free" (argument_list) "(pw)" (() "(" (identifier) "pw" ()) ")" (;) ";" (expression_statement) "fprintf(f,"%s:%s\n",user,cpw);" (call_expression) "fprintf(f,"%s:%s\n",user,cpw)" (identifier) "fprintf" (argument_list) "(f,"%s:%s\n",user,cpw)" (() "(" (identifier) "f" (,) "," (string_literal) ""%s:%s\n"" (") """ (string_content) "%s:%s" (escape_sequence) "\n" (") """ (,) "," (identifier) "user" (,) "," (identifier) "cpw" ()) ")" (;) ";" (}) "}" (function_definition) "void usage() {\n fprintf(stderr,"Usage: couchpw [-c] passwordfile username\n");\n fprintf(stderr,"The -c flag creates a new file.\n");\n exit(1);\n}" (primitive_type) "void" (function_declarator) "usage()" (identifier) "usage" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n fprintf(stderr,"Usage: couchpw [-c] passwordfile username\n");\n fprintf(stderr,"The -c flag creates a new file.\n");\n exit(1);\n}" ({) "{" (expression_statement) "fprintf(stderr,"Usage: couchpw [-c] passwordfile username\n");" (call_expression) "fprintf(stderr,"Usage: couchpw [-c] passwordfile username\n")" (identifier) "fprintf" (argument_list) "(stderr,"Usage: couchpw [-c] passwordfile username\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""Usage: couchpw [-c] passwordfile username\n"" (") """ (string_content) "Usage: couchpw [-c] passwordfile username" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fprintf(stderr,"The -c flag creates a new file.\n");" (call_expression) "fprintf(stderr,"The -c flag creates a new file.\n")" (identifier) "fprintf" (argument_list) "(stderr,"The -c flag creates a new file.\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""The -c flag creates a new file.\n"" (") """ (string_content) "The -c flag creates a new file." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (function_definition) "void interrupted() {\n fprintf(stderr,"Interrupted.\n");\n if(tn) unlink(tn);\n exit(1);\n}" (primitive_type) "void" (function_declarator) "interrupted()" (identifier) "interrupted" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n fprintf(stderr,"Interrupted.\n");\n if(tn) unlink(tn);\n exit(1);\n}" ({) "{" (expression_statement) "fprintf(stderr,"Interrupted.\n");" (call_expression) "fprintf(stderr,"Interrupted.\n")" (identifier) "fprintf" (argument_list) "(stderr,"Interrupted.\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""Interrupted.\n"" (") """ (string_content) "Interrupted." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (if_statement) "if(tn) unlink(tn);" (if) "if" (parenthesized_expression) "(tn)" (() "(" (identifier) "tn" ()) ")" (expression_statement) "unlink(tn);" (call_expression) "unlink(tn)" (identifier) "unlink" (argument_list) "(tn)" (() "(" (identifier) "tn" ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (function_definition) "int main(int argc, char *argv[]) {\n FILE *tfp,*f;\n char user[MAX_STRING_LEN];\n char line[MAX_STRING_LEN];\n char l[MAX_STRING_LEN];\n char w[MAX_STRING_LEN];\n char command[MAX_STRING_LEN];\n int found;\n\n tn = NULL;\n signal(SIGINT,(void (*)())interrupted);\n if(argc == 4) {\n if(strcmp(argv[1],"-c"))\n usage();\n if(!(tfp = fopen(argv[2],"w"))) {\n fprintf(stderr,"Could not open passwd file %s for writing.\n",\n argv[2]);\n perror("fopen");\n exit(1);\n }\n printf("Adding password for %s.\n",argv[3]);\n add_password(argv[3],tfp);\n fclose(tfp);\n exit(0);\n } else if(argc != 3) usage();\n\n tn = tmpnam(NULL);\n if(!(tfp = fopen(tn,"w"))) {\n fprintf(stderr,"Could not open temp file.\n");\n exit(1);\n }\n\n if(!(f = fopen(argv[1],"r"))) {\n fprintf(stderr,\n "Could not open passwd file %s for reading.\n",argv[1]);\n fprintf(stderr,"Use -c option to create new one.\n");\n exit(1);\n }\n strcpy(user,argv[2]);\n\n found = 0;\n while(!(getline(line,MAX_STRING_LEN,f))) {\n if(found || (line[0] == '#') || (!line[0])) {\n putline(tfp,line);\n continue;\n }\n strcpy(l,line);\n getword(w,l,':');\n if(strcmp(user,w)) {\n putline(tfp,line);\n continue;\n }\n else {\n printf("Changing password for user %s\n",user);\n add_password(user,tfp);\n found = 1;\n }\n }\n if(!found) {\n printf("Adding user %s\n",user);\n add_password(user,tfp);\n }\n fclose(f);\n fclose(tfp);\n sprintf(command,"cp %s %s",tn,argv[1]);\n system(command);\n unlink(tn);\n exit(0);\n}" (primitive_type) "int" (function_declarator) "main(int argc, char *argv[])" (identifier) "main" (parameter_list) "(int argc, char *argv[])" (() "(" (parameter_declaration) "int argc" (primitive_type) "int" (identifier) "argc" (,) "," (parameter_declaration) "char *argv[]" (primitive_type) "char" (pointer_declarator) "*argv[]" (*) "*" (array_declarator) "argv[]" (identifier) "argv" ([) "[" (]) "]" ()) ")" (compound_statement) "{\n FILE *tfp,*f;\n char user[MAX_STRING_LEN];\n char line[MAX_STRING_LEN];\n char l[MAX_STRING_LEN];\n char w[MAX_STRING_LEN];\n char command[MAX_STRING_LEN];\n int found;\n\n tn = NULL;\n signal(SIGINT,(void (*)())interrupted);\n if(argc == 4) {\n if(strcmp(argv[1],"-c"))\n usage();\n if(!(tfp = fopen(argv[2],"w"))) {\n fprintf(stderr,"Could not open passwd file %s for writing.\n",\n argv[2]);\n perror("fopen");\n exit(1);\n }\n printf("Adding password for %s.\n",argv[3]);\n add_password(argv[3],tfp);\n fclose(tfp);\n exit(0);\n } else if(argc != 3) usage();\n\n tn = tmpnam(NULL);\n if(!(tfp = fopen(tn,"w"))) {\n fprintf(stderr,"Could not open temp file.\n");\n exit(1);\n }\n\n if(!(f = fopen(argv[1],"r"))) {\n fprintf(stderr,\n "Could not open passwd file %s for reading.\n",argv[1]);\n fprintf(stderr,"Use -c option to create new one.\n");\n exit(1);\n }\n strcpy(user,argv[2]);\n\n found = 0;\n while(!(getline(line,MAX_STRING_LEN,f))) {\n if(found || (line[0] == '#') || (!line[0])) {\n putline(tfp,line);\n continue;\n }\n strcpy(l,line);\n getword(w,l,':');\n if(strcmp(user,w)) {\n putline(tfp,line);\n continue;\n }\n else {\n printf("Changing password for user %s\n",user);\n add_password(user,tfp);\n found = 1;\n }\n }\n if(!found) {\n printf("Adding user %s\n",user);\n add_password(user,tfp);\n }\n fclose(f);\n fclose(tfp);\n sprintf(command,"cp %s %s",tn,argv[1]);\n system(command);\n unlink(tn);\n exit(0);\n}" ({) "{" (declaration) "FILE *tfp,*f;" (type_identifier) "FILE" (pointer_declarator) "*tfp" (*) "*" (identifier) "tfp" (,) "," (pointer_declarator) "*f" (*) "*" (identifier) "f" (;) ";" (declaration) "char user[MAX_STRING_LEN];" (primitive_type) "char" (array_declarator) "user[MAX_STRING_LEN]" (identifier) "user" ([) "[" (identifier) "MAX_STRING_LEN" (]) "]" (;) ";" (declaration) "char line[MAX_STRING_LEN];" (primitive_type) "char" (array_declarator) "line[MAX_STRING_LEN]" (identifier) "line" ([) "[" (identifier) "MAX_STRING_LEN" (]) "]" (;) ";" (declaration) "char l[MAX_STRING_LEN];" (primitive_type) "char" (array_declarator) "l[MAX_STRING_LEN]" (identifier) "l" ([) "[" (identifier) "MAX_STRING_LEN" (]) "]" (;) ";" (declaration) "char w[MAX_STRING_LEN];" (primitive_type) "char" (array_declarator) "w[MAX_STRING_LEN]" (identifier) "w" ([) "[" (identifier) "MAX_STRING_LEN" (]) "]" (;) ";" (declaration) "char command[MAX_STRING_LEN];" (primitive_type) "char" (array_declarator) "command[MAX_STRING_LEN]" (identifier) "command" ([) "[" (identifier) "MAX_STRING_LEN" (]) "]" (;) ";" (declaration) "int found;" (primitive_type) "int" (identifier) "found" (;) ";" (expression_statement) "tn = NULL;" (assignment_expression) "tn = NULL" (identifier) "tn" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "signal(SIGINT,(void (*)())interrupted);" (call_expression) "signal(SIGINT,(void (*)())interrupted)" (identifier) "signal" (argument_list) "(SIGINT,(void (*)())interrupted)" (() "(" (identifier) "SIGINT" (,) "," (cast_expression) "(void (*)())interrupted" (() "(" (type_descriptor) "void (*)()" (primitive_type) "void" (abstract_function_declarator) "(*)()" (abstract_parenthesized_declarator) "(*)" (() "(" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (parameter_list) "()" (() "(" ()) ")" ()) ")" (identifier) "interrupted" ()) ")" (;) ";" (if_statement) "if(argc == 4) {\n if(strcmp(argv[1],"-c"))\n usage();\n if(!(tfp = fopen(argv[2],"w"))) {\n fprintf(stderr,"Could not open passwd file %s for writing.\n",\n argv[2]);\n perror("fopen");\n exit(1);\n }\n printf("Adding password for %s.\n",argv[3]);\n add_password(argv[3],tfp);\n fclose(tfp);\n exit(0);\n } else if(argc != 3) usage();" (if) "if" (parenthesized_expression) "(argc == 4)" (() "(" (binary_expression) "argc == 4" (identifier) "argc" (==) "==" (number_literal) "4" ()) ")" (compound_statement) "{\n if(strcmp(argv[1],"-c"))\n usage();\n if(!(tfp = fopen(argv[2],"w"))) {\n fprintf(stderr,"Could not open passwd file %s for writing.\n",\n argv[2]);\n perror("fopen");\n exit(1);\n }\n printf("Adding password for %s.\n",argv[3]);\n add_password(argv[3],tfp);\n fclose(tfp);\n exit(0);\n }" ({) "{" (if_statement) "if(strcmp(argv[1],"-c"))\n usage();" (if) "if" (parenthesized_expression) "(strcmp(argv[1],"-c"))" (() "(" (call_expression) "strcmp(argv[1],"-c")" (identifier) "strcmp" (argument_list) "(argv[1],"-c")" (() "(" (subscript_expression) "argv[1]" (identifier) "argv" ([) "[" (number_literal) "1" (]) "]" (,) "," (string_literal) ""-c"" (") """ (string_content) "-c" (") """ ()) ")" ()) ")" (expression_statement) "usage();" (call_expression) "usage()" (identifier) "usage" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if(!(tfp = fopen(argv[2],"w"))) {\n fprintf(stderr,"Could not open passwd file %s for writing.\n",\n argv[2]);\n perror("fopen");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(!(tfp = fopen(argv[2],"w")))" (() "(" (unary_expression) "!(tfp = fopen(argv[2],"w"))" (!) "!" (parenthesized_expression) "(tfp = fopen(argv[2],"w"))" (() "(" (assignment_expression) "tfp = fopen(argv[2],"w")" (identifier) "tfp" (=) "=" (call_expression) "fopen(argv[2],"w")" (identifier) "fopen" (argument_list) "(argv[2],"w")" (() "(" (subscript_expression) "argv[2]" (identifier) "argv" ([) "[" (number_literal) "2" (]) "]" (,) "," (string_literal) ""w"" (") """ (string_content) "w" (") """ ()) ")" ()) ")" ()) ")" (compound_statement) "{\n fprintf(stderr,"Could not open passwd file %s for writing.\n",\n argv[2]);\n perror("fopen");\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr,"Could not open passwd file %s for writing.\n",\n argv[2]);" (call_expression) "fprintf(stderr,"Could not open passwd file %s for writing.\n",\n argv[2])" (identifier) "fprintf" (argument_list) "(stderr,"Could not open passwd file %s for writing.\n",\n argv[2])" (() "(" (identifier) "stderr" (,) "," (string_literal) ""Could not open passwd file %s for writing.\n"" (") """ (string_content) "Could not open passwd file %s for writing." (escape_sequence) "\n" (") """ (,) "," (subscript_expression) "argv[2]" (identifier) "argv" ([) "[" (number_literal) "2" (]) "]" ()) ")" (;) ";" (expression_statement) "perror("fopen");" (call_expression) "perror("fopen")" (identifier) "perror" (argument_list) "("fopen")" (() "(" (string_literal) ""fopen"" (") """ (string_content) "fopen" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "printf("Adding password for %s.\n",argv[3]);" (call_expression) "printf("Adding password for %s.\n",argv[3])" (identifier) "printf" (argument_list) "("Adding password for %s.\n",argv[3])" (() "(" (string_literal) ""Adding password for %s.\n"" (") """ (string_content) "Adding password for %s." (escape_sequence) "\n" (") """ (,) "," (subscript_expression) "argv[3]" (identifier) "argv" ([) "[" (number_literal) "3" (]) "]" ()) ")" (;) ";" (expression_statement) "add_password(argv[3],tfp);" (call_expression) "add_password(argv[3],tfp)" (identifier) "add_password" (argument_list) "(argv[3],tfp)" (() "(" (subscript_expression) "argv[3]" (identifier) "argv" ([) "[" (number_literal) "3" (]) "]" (,) "," (identifier) "tfp" ()) ")" (;) ";" (expression_statement) "fclose(tfp);" (call_expression) "fclose(tfp)" (identifier) "fclose" (argument_list) "(tfp)" (() "(" (identifier) "tfp" ()) ")" (;) ";" (expression_statement) "exit(0);" (call_expression) "exit(0)" (identifier) "exit" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (}) "}" (else_clause) "else if(argc != 3) usage();" (else) "else" (if_statement) "if(argc != 3) usage();" (if) "if" (parenthesized_expression) "(argc != 3)" (() "(" (binary_expression) "argc != 3" (identifier) "argc" (!=) "!=" (number_literal) "3" ()) ")" (expression_statement) "usage();" (call_expression) "usage()" (identifier) "usage" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "tn = tmpnam(NULL);" (assignment_expression) "tn = tmpnam(NULL)" (identifier) "tn" (=) "=" (call_expression) "tmpnam(NULL)" (identifier) "tmpnam" (argument_list) "(NULL)" (() "(" (null) "NULL" (NULL) "NULL" ()) ")" (;) ";" (if_statement) "if(!(tfp = fopen(tn,"w"))) {\n fprintf(stderr,"Could not open temp file.\n");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(!(tfp = fopen(tn,"w")))" (() "(" (unary_expression) "!(tfp = fopen(tn,"w"))" (!) "!" (parenthesized_expression) "(tfp = fopen(tn,"w"))" (() "(" (assignment_expression) "tfp = fopen(tn,"w")" (identifier) "tfp" (=) "=" (call_expression) "fopen(tn,"w")" (identifier) "fopen" (argument_list) "(tn,"w")" (() "(" (identifier) "tn" (,) "," (string_literal) ""w"" (") """ (string_content) "w" (") """ ()) ")" ()) ")" ()) ")" (compound_statement) "{\n fprintf(stderr,"Could not open temp file.\n");\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr,"Could not open temp file.\n");" (call_expression) "fprintf(stderr,"Could not open temp file.\n")" (identifier) "fprintf" (argument_list) "(stderr,"Could not open temp file.\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""Could not open temp file.\n"" (") """ (string_content) "Could not open temp file." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (if_statement) "if(!(f = fopen(argv[1],"r"))) {\n fprintf(stderr,\n "Could not open passwd file %s for reading.\n",argv[1]);\n fprintf(stderr,"Use -c option to create new one.\n");\n exit(1);\n }" (if) "if" (parenthesized_expression) "(!(f = fopen(argv[1],"r")))" (() "(" (unary_expression) "!(f = fopen(argv[1],"r"))" (!) "!" (parenthesized_expression) "(f = fopen(argv[1],"r"))" (() "(" (assignment_expression) "f = fopen(argv[1],"r")" (identifier) "f" (=) "=" (call_expression) "fopen(argv[1],"r")" (identifier) "fopen" (argument_list) "(argv[1],"r")" (() "(" (subscript_expression) "argv[1]" (identifier) "argv" ([) "[" (number_literal) "1" (]) "]" (,) "," (string_literal) ""r"" (") """ (string_content) "r" (") """ ()) ")" ()) ")" ()) ")" (compound_statement) "{\n fprintf(stderr,\n "Could not open passwd file %s for reading.\n",argv[1]);\n fprintf(stderr,"Use -c option to create new one.\n");\n exit(1);\n }" ({) "{" (expression_statement) "fprintf(stderr,\n "Could not open passwd file %s for reading.\n",argv[1]);" (call_expression) "fprintf(stderr,\n "Could not open passwd file %s for reading.\n",argv[1])" (identifier) "fprintf" (argument_list) "(stderr,\n "Could not open passwd file %s for reading.\n",argv[1])" (() "(" (identifier) "stderr" (,) "," (string_literal) ""Could not open passwd file %s for reading.\n"" (") """ (string_content) "Could not open passwd file %s for reading." (escape_sequence) "\n" (") """ (,) "," (subscript_expression) "argv[1]" (identifier) "argv" ([) "[" (number_literal) "1" (]) "]" ()) ")" (;) ";" (expression_statement) "fprintf(stderr,"Use -c option to create new one.\n");" (call_expression) "fprintf(stderr,"Use -c option to create new one.\n")" (identifier) "fprintf" (argument_list) "(stderr,"Use -c option to create new one.\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""Use -c option to create new one.\n"" (") """ (string_content) "Use -c option to create new one." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "exit(1);" (call_expression) "exit(1)" (identifier) "exit" (argument_list) "(1)" (() "(" (number_literal) "1" ()) ")" (;) ";" (}) "}" (expression_statement) "strcpy(user,argv[2]);" (call_expression) "strcpy(user,argv[2])" (identifier) "strcpy" (argument_list) "(user,argv[2])" (() "(" (identifier) "user" (,) "," (subscript_expression) "argv[2]" (identifier) "argv" ([) "[" (number_literal) "2" (]) "]" ()) ")" (;) ";" (expression_statement) "found = 0;" (assignment_expression) "found = 0" (identifier) "found" (=) "=" (number_literal) "0" (;) ";" (while_statement) "while(!(getline(line,MAX_STRING_LEN,f))) {\n if(found || (line[0] == '#') || (!line[0])) {\n putline(tfp,line);\n continue;\n }\n strcpy(l,line);\n getword(w,l,':');\n if(strcmp(user,w)) {\n putline(tfp,line);\n continue;\n }\n else {\n printf("Changing password for user %s\n",user);\n add_password(user,tfp);\n found = 1;\n }\n }" (while) "while" (parenthesized_expression) "(!(getline(line,MAX_STRING_LEN,f)))" (() "(" (unary_expression) "!(getline(line,MAX_STRING_LEN,f))" (!) "!" (parenthesized_expression) "(getline(line,MAX_STRING_LEN,f))" (() "(" (call_expression) "getline(line,MAX_STRING_LEN,f)" (identifier) "getline" (argument_list) "(line,MAX_STRING_LEN,f)" (() "(" (identifier) "line" (,) "," (identifier) "MAX_STRING_LEN" (,) "," (identifier) "f" ()) ")" ()) ")" ()) ")" (compound_statement) "{\n if(found || (line[0] == '#') || (!line[0])) {\n putline(tfp,line);\n continue;\n }\n strcpy(l,line);\n getword(w,l,':');\n if(strcmp(user,w)) {\n putline(tfp,line);\n continue;\n }\n else {\n printf("Changing password for user %s\n",user);\n add_password(user,tfp);\n found = 1;\n }\n }" ({) "{" (if_statement) "if(found || (line[0] == '#') || (!line[0])) {\n putline(tfp,line);\n continue;\n }" (if) "if" (parenthesized_expression) "(found || (line[0] == '#') || (!line[0]))" (() "(" (binary_expression) "found || (line[0] == '#') || (!line[0])" (binary_expression) "found || (line[0] == '#')" (identifier) "found" (||) "||" (parenthesized_expression) "(line[0] == '#')" (() "(" (binary_expression) "line[0] == '#'" (subscript_expression) "line[0]" (identifier) "line" ([) "[" (number_literal) "0" (]) "]" (==) "==" (char_literal) "'#'" (') "'" (character) "#" (') "'" ()) ")" (||) "||" (parenthesized_expression) "(!line[0])" (() "(" (unary_expression) "!line[0]" (!) "!" (subscript_expression) "line[0]" (identifier) "line" ([) "[" (number_literal) "0" (]) "]" ()) ")" ()) ")" (compound_statement) "{\n putline(tfp,line);\n continue;\n }" ({) "{" (expression_statement) "putline(tfp,line);" (call_expression) "putline(tfp,line)" (identifier) "putline" (argument_list) "(tfp,line)" (() "(" (identifier) "tfp" (,) "," (identifier) "line" ()) ")" (;) ";" (continue_statement) "continue;" (continue) "continue" (;) ";" (}) "}" (expression_statement) "strcpy(l,line);" (call_expression) "strcpy(l,line)" (identifier) "strcpy" (argument_list) "(l,line)" (() "(" (identifier) "l" (,) "," (identifier) "line" ()) ")" (;) ";" (expression_statement) "getword(w,l,':');" (call_expression) "getword(w,l,':')" (identifier) "getword" (argument_list) "(w,l,':')" (() "(" (identifier) "w" (,) "," (identifier) "l" (,) "," (char_literal) "':'" (') "'" (character) ":" (') "'" ()) ")" (;) ";" (if_statement) "if(strcmp(user,w)) {\n putline(tfp,line);\n continue;\n }\n else {\n printf("Changing password for user %s\n",user);\n add_password(user,tfp);\n found = 1;\n }" (if) "if" (parenthesized_expression) "(strcmp(user,w))" (() "(" (call_expression) "strcmp(user,w)" (identifier) "strcmp" (argument_list) "(user,w)" (() "(" (identifier) "user" (,) "," (identifier) "w" ()) ")" ()) ")" (compound_statement) "{\n putline(tfp,line);\n continue;\n }" ({) "{" (expression_statement) "putline(tfp,line);" (call_expression) "putline(tfp,line)" (identifier) "putline" (argument_list) "(tfp,line)" (() "(" (identifier) "tfp" (,) "," (identifier) "line" ()) ")" (;) ";" (continue_statement) "continue;" (continue) "continue" (;) ";" (}) "}" (else_clause) "else {\n printf("Changing password for user %s\n",user);\n add_password(user,tfp);\n found = 1;\n }" (else) "else" (compound_statement) "{\n printf("Changing password for user %s\n",user);\n add_password(user,tfp);\n found = 1;\n }" ({) "{" (expression_statement) "printf("Changing password for user %s\n",user);" (call_expression) "printf("Changing password for user %s\n",user)" (identifier) "printf" (argument_list) "("Changing password for user %s\n",user)" (() "(" (string_literal) ""Changing password for user %s\n"" (") """ (string_content) "Changing password for user %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "user" ()) ")" (;) ";" (expression_statement) "add_password(user,tfp);" (call_expression) "add_password(user,tfp)" (identifier) "add_password" (argument_list) "(user,tfp)" (() "(" (identifier) "user" (,) "," (identifier) "tfp" ()) ")" (;) ";" (expression_statement) "found = 1;" (assignment_expression) "found = 1" (identifier) "found" (=) "=" (number_literal) "1" (;) ";" (}) "}" (}) "}" (if_statement) "if(!found) {\n printf("Adding user %s\n",user);\n add_password(user,tfp);\n }" (if) "if" (parenthesized_expression) "(!found)" (() "(" (unary_expression) "!found" (!) "!" (identifier) "found" ()) ")" (compound_statement) "{\n printf("Adding user %s\n",user);\n add_password(user,tfp);\n }" ({) "{" (expression_statement) "printf("Adding user %s\n",user);" (call_expression) "printf("Adding user %s\n",user)" (identifier) "printf" (argument_list) "("Adding user %s\n",user)" (() "(" (string_literal) ""Adding user %s\n"" (") """ (string_content) "Adding user %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "user" ()) ")" (;) ";" (expression_statement) "add_password(user,tfp);" (call_expression) "add_password(user,tfp)" (identifier) "add_password" (argument_list) "(user,tfp)" (() "(" (identifier) "user" (,) "," (identifier) "tfp" ()) ")" (;) ";" (}) "}" (expression_statement) "fclose(f);" (call_expression) "fclose(f)" (identifier) "fclose" (argument_list) "(f)" (() "(" (identifier) "f" ()) ")" (;) ";" (expression_statement) "fclose(tfp);" (call_expression) "fclose(tfp)" (identifier) "fclose" (argument_list) "(tfp)" (() "(" (identifier) "tfp" ()) ")" (;) ";" (expression_statement) "sprintf(command,"cp %s %s",tn,argv[1]);" (call_expression) "sprintf(command,"cp %s %s",tn,argv[1])" (identifier) "sprintf" (argument_list) "(command,"cp %s %s",tn,argv[1])" (() "(" (identifier) "command" (,) "," (string_literal) ""cp %s %s"" (") """ (string_content) "cp %s %s" (") """ (,) "," (identifier) "tn" (,) "," (subscript_expression) "argv[1]" (identifier) "argv" ([) "[" (number_literal) "1" (]) "]" ()) ")" (;) ";" (expression_statement) "system(command);" (call_expression) "system(command)" (identifier) "system" (argument_list) "(command)" (() "(" (identifier) "command" ()) ")" (;) ";" (expression_statement) "unlink(tn);" (call_expression) "unlink(tn)" (identifier) "unlink" (argument_list) "(tn)" (() "(" (identifier) "tn" ()) ")" (;) ";" (expression_statement) "exit(0);" (call_expression) "exit(0)" (identifier) "exit" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (}) "}"
1,583
0
{"language": "c", "success": true, "metadata": {"lines": 156, "avg_line_length": 25.19, "nodes": 896, "errors": 0, "source_hash": "91cd330b28ff7fd06d140ac8a61315fe6420515d47b6c24b24d50deaf3a70b39", "categorized_nodes": 613}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <sys/types.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": "<sys/types.h>", "parent": 0, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 22}}, {"id": 3, "type": "preproc_include", "text": "#include <stdio.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": "<stdio.h>", "parent": 3, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <string.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": "<string.h>", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <sys/signal.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": "system_lib_string", "text": "<sys/signal.h>", "parent": 9, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 23}}, {"id": 12, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 12, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include <time.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<time.h>", "parent": 15, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 17}}, {"id": 18, "type": "preproc_include", "text": "#include <unistd.h>\n", "parent": null, "children": [19, 20], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<unistd.h>", "parent": 18, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 19}}, {"id": 21, "type": "preproc_def", "text": "#define LF 10\n", "parent": null, "children": [22, 23, 24], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 22, "type": "#define", "text": "#define", "parent": 21, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 23, "type": "identifier", "text": "LF", "parent": 21, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 10}}, {"id": 24, "type": "preproc_arg", "text": "10", "parent": 21, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 13}}, {"id": 25, "type": "preproc_def", "text": "#define CR 13\n", "parent": null, "children": [26, 27, 28], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 26, "type": "#define", "text": "#define", "parent": 25, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 27, "type": "identifier", "text": "CR", "parent": 25, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 10}}, {"id": 28, "type": "preproc_arg", "text": "13", "parent": 25, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 13}}, {"id": 29, "type": "preproc_def", "text": "#define MAX_STRING_LEN 256\n", "parent": null, "children": [30, 31, 32], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 30, "type": "#define", "text": "#define", "parent": 29, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 31, "type": "identifier", "text": "MAX_STRING_LEN", "parent": 29, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 22}}, {"id": 32, "type": "preproc_arg", "text": "256", "parent": 29, "children": [], "start_point": {"row": 18, "column": 23}, "end_point": {"row": 18, "column": 26}}, {"id": 33, "type": "declaration", "text": "char *tn;", "parent": null, "children": [34, 35], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 9}}, {"id": 34, "type": "primitive_type", "text": "char", "parent": 33, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 4}}, {"id": 35, "type": "pointer_declarator", "text": "*tn", "parent": 33, "children": [36, 37], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 8}}, {"id": 36, "type": "*", "text": "*", "parent": 35, "children": [], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 6}}, {"id": 37, "type": "identifier", "text": "tn", "parent": 35, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 8}}, {"id": 38, "type": "function_definition", "text": "char *strd(char *s) {\n char *d;\n\n d=(char *)malloc(strlen(s) + 1);\n strcpy(d,s);\n return(d);\n}", "parent": null, "children": [39, 40], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 39, "type": "primitive_type", "text": "char", "parent": 38, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 4}}, {"id": 40, "type": "pointer_declarator", "text": "*strd(char *s)", "parent": 38, "children": [41, 42], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 19}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 6}}, {"id": 42, "type": "function_declarator", "text": "strd(char *s)", "parent": 40, "children": [43, 44], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 19}}, {"id": 43, "type": "identifier", "text": "strd", "parent": 42, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 10}}, {"id": 44, "type": "parameter_list", "text": "(char *s)", "parent": 42, "children": [45], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 19}}, {"id": 45, "type": "parameter_declaration", "text": "char *s", "parent": 44, "children": [46, 47], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 18}}, {"id": 46, "type": "primitive_type", "text": "char", "parent": 45, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 15}}, {"id": 47, "type": "pointer_declarator", "text": "*s", "parent": 45, "children": [48, 49], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 18}}, {"id": 48, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 17}}, {"id": 49, "type": "identifier", "text": "s", "parent": 47, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 18}}, {"id": 50, "type": "declaration", "text": "char *d;", "parent": 38, "children": [51, 52], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 12}}, {"id": 51, "type": "primitive_type", "text": "char", "parent": 50, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 8}}, {"id": 52, "type": "pointer_declarator", "text": "*d", "parent": 50, "children": [53, 54], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 11}}, {"id": 53, "type": "*", "text": "*", "parent": 52, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 10}}, {"id": 54, "type": "identifier", "text": "d", "parent": 52, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 11}}, {"id": 55, "type": "assignment_expression", "text": "d=(char *)malloc(strlen(s) + 1)", "parent": 38, "children": [56, 57, 58], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 35}}, {"id": 56, "type": "identifier", "text": "d", "parent": 55, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 5}}, {"id": 57, "type": "=", "text": "=", "parent": 55, "children": [], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 6}}, {"id": 58, "type": "cast_expression", "text": "(char *)malloc(strlen(s) + 1)", "parent": 55, "children": [59, 63], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 35}}, {"id": 59, "type": "type_descriptor", "text": "char *", "parent": 58, "children": [60, 61], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 13}}, {"id": 60, "type": "primitive_type", "text": "char", "parent": 59, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 11}}, {"id": 61, "type": "abstract_pointer_declarator", "text": "*", "parent": 59, "children": [62], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 13}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 25, "column": 12}, "end_point": {"row": 25, "column": 13}}, {"id": 63, "type": "call_expression", "text": "malloc(strlen(s) + 1)", "parent": 58, "children": [64, 65], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 35}}, {"id": 64, "type": "identifier", "text": "malloc", "parent": 63, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 20}}, {"id": 65, "type": "argument_list", "text": "(strlen(s) + 1)", "parent": 63, "children": [66], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 35}}, {"id": 66, "type": "binary_expression", "text": "strlen(s) + 1", "parent": 65, "children": [67, 71, 72], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 34}}, {"id": 67, "type": "call_expression", "text": "strlen(s)", "parent": 66, "children": [68, 69], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 30}}, {"id": 68, "type": "identifier", "text": "strlen", "parent": 67, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 27}}, {"id": 69, "type": "argument_list", "text": "(s)", "parent": 67, "children": [70], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 30}}, {"id": 70, "type": "identifier", "text": "s", "parent": 69, "children": [], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 29}}, {"id": 71, "type": "+", "text": "+", "parent": 66, "children": [], "start_point": {"row": 25, "column": 31}, "end_point": {"row": 25, "column": 32}}, {"id": 72, "type": "number_literal", "text": "1", "parent": 66, "children": [], "start_point": {"row": 25, "column": 33}, "end_point": {"row": 25, "column": 34}}, {"id": 73, "type": "call_expression", "text": "strcpy(d,s)", "parent": 38, "children": [74, 75], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 15}}, {"id": 74, "type": "identifier", "text": "strcpy", "parent": 73, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 10}}, {"id": 75, "type": "argument_list", "text": "(d,s)", "parent": 73, "children": [76, 77], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 15}}, {"id": 76, "type": "identifier", "text": "d", "parent": 75, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 12}}, {"id": 77, "type": "identifier", "text": "s", "parent": 75, "children": [], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 14}}, {"id": 78, "type": "return_statement", "text": "return(d);", "parent": 38, "children": [79], "start_point": {"row": 27, "column": 4}, "end_point": {"row": 27, "column": 14}}, {"id": 79, "type": "parenthesized_expression", "text": "(d)", "parent": 78, "children": [80], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 13}}, {"id": 80, "type": "identifier", "text": "d", "parent": 79, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 12}}, {"id": 81, "type": "function_definition", "text": "void getword(char *word, char *line, char stop) {\n int x = 0,y;\n\n for(x=0;((line[x]) && (line[x] != stop));x++)\n word[x] = line[x];\n\n word[x] = '\\0';\n if(line[x]) ++x;\n y=0;\n\n while((line[y++] = line[x++]));\n}", "parent": null, "children": [82, 83], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 41, "column": 1}}, {"id": 82, "type": "primitive_type", "text": "void", "parent": 81, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 4}}, {"id": 83, "type": "function_declarator", "text": "getword(char *word, char *line, char stop)", "parent": 81, "children": [84, 85], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 47}}, {"id": 84, "type": "identifier", "text": "getword", "parent": 83, "children": [], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 12}}, {"id": 85, "type": "parameter_list", "text": "(char *word, char *line, char stop)", "parent": 83, "children": [86, 91, 96], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 47}}, {"id": 86, "type": "parameter_declaration", "text": "char *word", "parent": 85, "children": [87, 88], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 23}}, {"id": 87, "type": "primitive_type", "text": "char", "parent": 86, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 17}}, {"id": 88, "type": "pointer_declarator", "text": "*word", "parent": 86, "children": [89, 90], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 23}}, {"id": 89, "type": "*", "text": "*", "parent": 88, "children": [], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 19}}, {"id": 90, "type": "identifier", "text": "word", "parent": 88, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 23}}, {"id": 91, "type": "parameter_declaration", "text": "char *line", "parent": 85, "children": [92, 93], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 35}}, {"id": 92, "type": "primitive_type", "text": "char", "parent": 91, "children": [], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 29}}, {"id": 93, "type": "pointer_declarator", "text": "*line", "parent": 91, "children": [94, 95], "start_point": {"row": 30, "column": 30}, "end_point": {"row": 30, "column": 35}}, {"id": 94, "type": "*", "text": "*", "parent": 93, "children": [], "start_point": {"row": 30, "column": 30}, "end_point": {"row": 30, "column": 31}}, {"id": 95, "type": "identifier", "text": "line", "parent": 93, "children": [], "start_point": {"row": 30, "column": 31}, "end_point": {"row": 30, "column": 35}}, {"id": 96, "type": "parameter_declaration", "text": "char stop", "parent": 85, "children": [97, 98], "start_point": {"row": 30, "column": 37}, "end_point": {"row": 30, "column": 46}}, {"id": 97, "type": "primitive_type", "text": "char", "parent": 96, "children": [], "start_point": {"row": 30, "column": 37}, "end_point": {"row": 30, "column": 41}}, {"id": 98, "type": "identifier", "text": "stop", "parent": 96, "children": [], "start_point": {"row": 30, "column": 42}, "end_point": {"row": 30, "column": 46}}, {"id": 99, "type": "declaration", "text": "int x = 0,y;", "parent": 81, "children": [100, 101, 105], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 16}}, {"id": 100, "type": "primitive_type", "text": "int", "parent": 99, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 7}}, {"id": 101, "type": "init_declarator", "text": "x = 0", "parent": 99, "children": [102, 103, 104], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 13}}, {"id": 102, "type": "identifier", "text": "x", "parent": 101, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 9}}, {"id": 103, "type": "=", "text": "=", "parent": 101, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 11}}, {"id": 104, "type": "number_literal", "text": "0", "parent": 101, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 13}}, {"id": 105, "type": "identifier", "text": "y", "parent": 99, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 15}}, {"id": 106, "type": "for_statement", "text": "for(x=0;((line[x]) && (line[x] != stop));x++)\n word[x] = line[x];", "parent": 81, "children": [107, 111, 125], "start_point": {"row": 33, "column": 4}, "end_point": {"row": 34, "column": 26}}, {"id": 107, "type": "assignment_expression", "text": "x=0", "parent": 106, "children": [108, 109, 110], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 11}}, {"id": 108, "type": "identifier", "text": "x", "parent": 107, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 9}}, {"id": 109, "type": "=", "text": "=", "parent": 107, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 10}}, {"id": 110, "type": "number_literal", "text": "0", "parent": 107, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 11}}, {"id": 111, "type": "parenthesized_expression", "text": "((line[x]) && (line[x] != stop))", "parent": 106, "children": [112], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 44}}, {"id": 112, "type": "binary_expression", "text": "(line[x]) && (line[x] != stop)", "parent": 111, "children": [113, 117, 118], "start_point": {"row": 33, "column": 13}, "end_point": {"row": 33, "column": 43}}, {"id": 113, "type": "parenthesized_expression", "text": "(line[x])", "parent": 112, "children": [114], "start_point": {"row": 33, "column": 13}, "end_point": {"row": 33, "column": 22}}, {"id": 114, "type": "subscript_expression", "text": "line[x]", "parent": 113, "children": [115, 116], "start_point": {"row": 33, "column": 14}, "end_point": {"row": 33, "column": 21}}, {"id": 115, "type": "identifier", "text": "line", "parent": 114, "children": [], "start_point": {"row": 33, "column": 14}, "end_point": {"row": 33, "column": 18}}, {"id": 116, "type": "identifier", "text": "x", "parent": 114, "children": [], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 20}}, {"id": 117, "type": "&&", "text": "&&", "parent": 112, "children": [], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 25}}, {"id": 118, "type": "parenthesized_expression", "text": "(line[x] != stop)", "parent": 112, "children": [119], "start_point": {"row": 33, "column": 26}, "end_point": {"row": 33, "column": 43}}, {"id": 119, "type": "binary_expression", "text": "line[x] != stop", "parent": 118, "children": [120, 123, 124], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 42}}, {"id": 120, "type": "subscript_expression", "text": "line[x]", "parent": 119, "children": [121, 122], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 34}}, {"id": 121, "type": "identifier", "text": "line", "parent": 120, "children": [], "start_point": {"row": 33, "column": 27}, "end_point": {"row": 33, "column": 31}}, {"id": 122, "type": "identifier", "text": "x", "parent": 120, "children": [], "start_point": {"row": 33, "column": 32}, "end_point": {"row": 33, "column": 33}}, {"id": 123, "type": "!=", "text": "!=", "parent": 119, "children": [], "start_point": {"row": 33, "column": 35}, "end_point": {"row": 33, "column": 37}}, {"id": 124, "type": "identifier", "text": "stop", "parent": 119, "children": [], "start_point": {"row": 33, "column": 38}, "end_point": {"row": 33, "column": 42}}, {"id": 125, "type": "update_expression", "text": "x++", "parent": 106, "children": [126, 127], "start_point": {"row": 33, "column": 45}, "end_point": {"row": 33, "column": 48}}, {"id": 126, "type": "identifier", "text": "x", "parent": 125, "children": [], "start_point": {"row": 33, "column": 45}, "end_point": {"row": 33, "column": 46}}, {"id": 127, "type": "++", "text": "++", "parent": 125, "children": [], "start_point": {"row": 33, "column": 46}, "end_point": {"row": 33, "column": 48}}, {"id": 128, "type": "assignment_expression", "text": "word[x] = line[x]", "parent": 106, "children": [129, 132, 133], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 25}}, {"id": 129, "type": "subscript_expression", "text": "word[x]", "parent": 128, "children": [130, 131], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 15}}, {"id": 130, "type": "identifier", "text": "word", "parent": 129, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 12}}, {"id": 131, "type": "identifier", "text": "x", "parent": 129, "children": [], "start_point": {"row": 34, "column": 13}, "end_point": {"row": 34, "column": 14}}, {"id": 132, "type": "=", "text": "=", "parent": 128, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 17}}, {"id": 133, "type": "subscript_expression", "text": "line[x]", "parent": 128, "children": [134, 135], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 25}}, {"id": 134, "type": "identifier", "text": "line", "parent": 133, "children": [], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 22}}, {"id": 135, "type": "identifier", "text": "x", "parent": 133, "children": [], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 24}}, {"id": 136, "type": "assignment_expression", "text": "word[x] = '\\0'", "parent": 81, "children": [137, 140, 141], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 18}}, {"id": 137, "type": "subscript_expression", "text": "word[x]", "parent": 136, "children": [138, 139], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 11}}, {"id": 138, "type": "identifier", "text": "word", "parent": 137, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 8}}, {"id": 139, "type": "identifier", "text": "x", "parent": 137, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 10}}, {"id": 140, "type": "=", "text": "=", "parent": 136, "children": [], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 13}}, {"id": 141, "type": "char_literal", "text": "'\\0'", "parent": 136, "children": [142, 143, 144], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 18}}, {"id": 142, "type": "'", "text": "'", "parent": 141, "children": [], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 15}}, {"id": 143, "type": "escape_sequence", "text": "\\0", "parent": 141, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 17}}, {"id": 144, "type": "'", "text": "'", "parent": 141, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 18}}, {"id": 145, "type": "if_statement", "text": "if(line[x]) ++x;", "parent": 81, "children": [146], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 20}}, {"id": 146, "type": "parenthesized_expression", "text": "(line[x])", "parent": 145, "children": [147], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 15}}, {"id": 147, "type": "subscript_expression", "text": "line[x]", "parent": 146, "children": [148, 149], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 14}}, {"id": 148, "type": "identifier", "text": "line", "parent": 147, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 11}}, {"id": 149, "type": "identifier", "text": "x", "parent": 147, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 13}}, {"id": 150, "type": "update_expression", "text": "++x", "parent": 145, "children": [151, 152], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 19}}, {"id": 151, "type": "++", "text": "++", "parent": 150, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 18}}, {"id": 152, "type": "identifier", "text": "x", "parent": 150, "children": [], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 19}}, {"id": 153, "type": "assignment_expression", "text": "y=0", "parent": 81, "children": [154, 155, 156], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 7}}, {"id": 154, "type": "identifier", "text": "y", "parent": 153, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 5}}, {"id": 155, "type": "=", "text": "=", "parent": 153, "children": [], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 6}}, {"id": 156, "type": "number_literal", "text": "0", "parent": 153, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 7}}, {"id": 157, "type": "while_statement", "text": "while((line[y++] = line[x++]));", "parent": 81, "children": [158], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 35}}, {"id": 158, "type": "parenthesized_expression", "text": "((line[y++] = line[x++]))", "parent": 157, "children": [159], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 34}}, {"id": 159, "type": "parenthesized_expression", "text": "(line[y++] = line[x++])", "parent": 158, "children": [160], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 33}}, {"id": 160, "type": "assignment_expression", "text": "line[y++] = line[x++]", "parent": 159, "children": [161, 166, 167], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 32}}, {"id": 161, "type": "subscript_expression", "text": "line[y++]", "parent": 160, "children": [162, 163], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 20}}, {"id": 162, "type": "identifier", "text": "line", "parent": 161, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 15}}, {"id": 163, "type": "update_expression", "text": "y++", "parent": 161, "children": [164, 165], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 19}}, {"id": 164, "type": "identifier", "text": "y", "parent": 163, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 17}}, {"id": 165, "type": "++", "text": "++", "parent": 163, "children": [], "start_point": {"row": 40, "column": 17}, "end_point": {"row": 40, "column": 19}}, {"id": 166, "type": "=", "text": "=", "parent": 160, "children": [], "start_point": {"row": 40, "column": 21}, "end_point": {"row": 40, "column": 22}}, {"id": 167, "type": "subscript_expression", "text": "line[x++]", "parent": 160, "children": [168, 169], "start_point": {"row": 40, "column": 23}, "end_point": {"row": 40, "column": 32}}, {"id": 168, "type": "identifier", "text": "line", "parent": 167, "children": [], "start_point": {"row": 40, "column": 23}, "end_point": {"row": 40, "column": 27}}, {"id": 169, "type": "update_expression", "text": "x++", "parent": 167, "children": [170, 171], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 31}}, {"id": 170, "type": "identifier", "text": "x", "parent": 169, "children": [], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 29}}, {"id": 171, "type": "++", "text": "++", "parent": 169, "children": [], "start_point": {"row": 40, "column": 29}, "end_point": {"row": 40, "column": 31}}, {"id": 172, "type": "function_definition", "text": "int getline(char *s, int n, FILE *f) {\n register int i=0;\n\n while(1) {\n s[i] = (char)fgetc(f);\n\n if(s[i] == CR)\n s[i] = fgetc(f);\n\n if((s[i] == 0x4) || (s[i] == LF) || (i == (n-1))) {\n s[i] = '\\0';\n return (feof(f) ? 1 : 0);\n }\n ++i;\n }\n}", "parent": null, "children": [173, 174], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 58, "column": 1}}, {"id": 173, "type": "primitive_type", "text": "int", "parent": 172, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 3}}, {"id": 174, "type": "function_declarator", "text": "getline(char *s, int n, FILE *f)", "parent": 172, "children": [175, 176], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 36}}, {"id": 175, "type": "identifier", "text": "getline", "parent": 174, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 11}}, {"id": 176, "type": "parameter_list", "text": "(char *s, int n, FILE *f)", "parent": 174, "children": [177, 182, 185], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 36}}, {"id": 177, "type": "parameter_declaration", "text": "char *s", "parent": 176, "children": [178, 179], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 19}}, {"id": 178, "type": "primitive_type", "text": "char", "parent": 177, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 16}}, {"id": 179, "type": "pointer_declarator", "text": "*s", "parent": 177, "children": [180, 181], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 19}}, {"id": 180, "type": "*", "text": "*", "parent": 179, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 18}}, {"id": 181, "type": "identifier", "text": "s", "parent": 179, "children": [], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 19}}, {"id": 182, "type": "parameter_declaration", "text": "int n", "parent": 176, "children": [183, 184], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 26}}, {"id": 183, "type": "primitive_type", "text": "int", "parent": 182, "children": [], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 24}}, {"id": 184, "type": "identifier", "text": "n", "parent": 182, "children": [], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 43, "column": 26}}, {"id": 185, "type": "parameter_declaration", "text": "FILE *f", "parent": 176, "children": [186, 187], "start_point": {"row": 43, "column": 28}, "end_point": {"row": 43, "column": 35}}, {"id": 186, "type": "type_identifier", "text": "FILE", "parent": 185, "children": [], "start_point": {"row": 43, "column": 28}, "end_point": {"row": 43, "column": 32}}, {"id": 187, "type": "pointer_declarator", "text": "*f", "parent": 185, "children": [188, 189], "start_point": {"row": 43, "column": 33}, "end_point": {"row": 43, "column": 35}}, {"id": 188, "type": "*", "text": "*", "parent": 187, "children": [], "start_point": {"row": 43, "column": 33}, "end_point": {"row": 43, "column": 34}}, {"id": 189, "type": "identifier", "text": "f", "parent": 187, "children": [], "start_point": {"row": 43, "column": 34}, "end_point": {"row": 43, "column": 35}}, {"id": 190, "type": "declaration", "text": "register int i=0;", "parent": 172, "children": [191, 193, 194], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 21}}, {"id": 191, "type": "storage_class_specifier", "text": "register", "parent": 190, "children": [192], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 12}}, {"id": 192, "type": "register", "text": "register", "parent": 191, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 12}}, {"id": 193, "type": "primitive_type", "text": "int", "parent": 190, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 16}}, {"id": 194, "type": "init_declarator", "text": "i=0", "parent": 190, "children": [195, 196, 197], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 20}}, {"id": 195, "type": "identifier", "text": "i", "parent": 194, "children": [], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 18}}, {"id": 196, "type": "=", "text": "=", "parent": 194, "children": [], "start_point": {"row": 44, "column": 18}, "end_point": {"row": 44, "column": 19}}, {"id": 197, "type": "number_literal", "text": "0", "parent": 194, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 20}}, {"id": 198, "type": "while_statement", "text": "while(1) {\n s[i] = (char)fgetc(f);\n\n if(s[i] == CR)\n s[i] = fgetc(f);\n\n if((s[i] == 0x4) || (s[i] == LF) || (i == (n-1))) {\n s[i] = '\\0';\n return (feof(f) ? 1 : 0);\n }\n ++i;\n }", "parent": 172, "children": [199], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 57, "column": 5}}, {"id": 199, "type": "parenthesized_expression", "text": "(1)", "parent": 198, "children": [200], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 12}}, {"id": 200, "type": "number_literal", "text": "1", "parent": 199, "children": [], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 11}}, {"id": 201, "type": "assignment_expression", "text": "s[i] = (char)fgetc(f)", "parent": 198, "children": [202, 205, 206], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 29}}, {"id": 202, "type": "subscript_expression", "text": "s[i]", "parent": 201, "children": [203, 204], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 12}}, {"id": 203, "type": "identifier", "text": "s", "parent": 202, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 9}}, {"id": 204, "type": "identifier", "text": "i", "parent": 202, "children": [], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 11}}, {"id": 205, "type": "=", "text": "=", "parent": 201, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 14}}, {"id": 206, "type": "cast_expression", "text": "(char)fgetc(f)", "parent": 201, "children": [207, 209], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 29}}, {"id": 207, "type": "type_descriptor", "text": "char", "parent": 206, "children": [208], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 20}}, {"id": 208, "type": "primitive_type", "text": "char", "parent": 207, "children": [], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 20}}, {"id": 209, "type": "call_expression", "text": "fgetc(f)", "parent": 206, "children": [210, 211], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 29}}, {"id": 210, "type": "identifier", "text": "fgetc", "parent": 209, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 26}}, {"id": 211, "type": "argument_list", "text": "(f)", "parent": 209, "children": [212], "start_point": {"row": 47, "column": 26}, "end_point": {"row": 47, "column": 29}}, {"id": 212, "type": "identifier", "text": "f", "parent": 211, "children": [], "start_point": {"row": 47, "column": 27}, "end_point": {"row": 47, "column": 28}}, {"id": 213, "type": "if_statement", "text": "if(s[i] == CR)\n s[i] = fgetc(f);", "parent": 198, "children": [214], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 50, "column": 28}}, {"id": 214, "type": "parenthesized_expression", "text": "(s[i] == CR)", "parent": 213, "children": [215], "start_point": {"row": 49, "column": 10}, "end_point": {"row": 49, "column": 22}}, {"id": 215, "type": "binary_expression", "text": "s[i] == CR", "parent": 214, "children": [216, 219, 220], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 21}}, {"id": 216, "type": "subscript_expression", "text": "s[i]", "parent": 215, "children": [217, 218], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 15}}, {"id": 217, "type": "identifier", "text": "s", "parent": 216, "children": [], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 12}}, {"id": 218, "type": "identifier", "text": "i", "parent": 216, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 14}}, {"id": 219, "type": "==", "text": "==", "parent": 215, "children": [], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 18}}, {"id": 220, "type": "identifier", "text": "CR", "parent": 215, "children": [], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 21}}, {"id": 221, "type": "assignment_expression", "text": "s[i] = fgetc(f)", "parent": 213, "children": [222, 225, 226], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 27}}, {"id": 222, "type": "subscript_expression", "text": "s[i]", "parent": 221, "children": [223, 224], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 16}}, {"id": 223, "type": "identifier", "text": "s", "parent": 222, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 13}}, {"id": 224, "type": "identifier", "text": "i", "parent": 222, "children": [], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 15}}, {"id": 225, "type": "=", "text": "=", "parent": 221, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 18}}, {"id": 226, "type": "call_expression", "text": "fgetc(f)", "parent": 221, "children": [227, 228], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 27}}, {"id": 227, "type": "identifier", "text": "fgetc", "parent": 226, "children": [], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 24}}, {"id": 228, "type": "argument_list", "text": "(f)", "parent": 226, "children": [229], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 27}}, {"id": 229, "type": "identifier", "text": "f", "parent": 228, "children": [], "start_point": {"row": 50, "column": 25}, "end_point": {"row": 50, "column": 26}}, {"id": 230, "type": "if_statement", "text": "if((s[i] == 0x4) || (s[i] == LF) || (i == (n-1))) {\n s[i] = '\\0';\n return (feof(f) ? 1 : 0);\n }", "parent": 198, "children": [231], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 55, "column": 9}}, {"id": 231, "type": "parenthesized_expression", "text": "((s[i] == 0x4) || (s[i] == LF) || (i == (n-1)))", "parent": 230, "children": [232], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 57}}, {"id": 232, "type": "binary_expression", "text": "(s[i] == 0x4) || (s[i] == LF) || (i == (n-1))", "parent": 231, "children": [233, 249, 250], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 56}}, {"id": 233, "type": "binary_expression", "text": "(s[i] == 0x4) || (s[i] == LF)", "parent": 232, "children": [234, 241, 242], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 40}}, {"id": 234, "type": "parenthesized_expression", "text": "(s[i] == 0x4)", "parent": 233, "children": [235], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 24}}, {"id": 235, "type": "binary_expression", "text": "s[i] == 0x4", "parent": 234, "children": [236, 239, 240], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 23}}, {"id": 236, "type": "subscript_expression", "text": "s[i]", "parent": 235, "children": [237, 238], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 16}}, {"id": 237, "type": "identifier", "text": "s", "parent": 236, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 13}}, {"id": 238, "type": "identifier", "text": "i", "parent": 236, "children": [], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 15}}, {"id": 239, "type": "==", "text": "==", "parent": 235, "children": [], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 19}}, {"id": 240, "type": "number_literal", "text": "0x4", "parent": 235, "children": [], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 23}}, {"id": 241, "type": "||", "text": "||", "parent": 233, "children": [], "start_point": {"row": 52, "column": 25}, "end_point": {"row": 52, "column": 27}}, {"id": 242, "type": "parenthesized_expression", "text": "(s[i] == LF)", "parent": 233, "children": [243], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 40}}, {"id": 243, "type": "binary_expression", "text": "s[i] == LF", "parent": 242, "children": [244, 247, 248], "start_point": {"row": 52, "column": 29}, "end_point": {"row": 52, "column": 39}}, {"id": 244, "type": "subscript_expression", "text": "s[i]", "parent": 243, "children": [245, 246], "start_point": {"row": 52, "column": 29}, "end_point": {"row": 52, "column": 33}}, {"id": 245, "type": "identifier", "text": "s", "parent": 244, "children": [], "start_point": {"row": 52, "column": 29}, "end_point": {"row": 52, "column": 30}}, {"id": 246, "type": "identifier", "text": "i", "parent": 244, "children": [], "start_point": {"row": 52, "column": 31}, "end_point": {"row": 52, "column": 32}}, {"id": 247, "type": "==", "text": "==", "parent": 243, "children": [], "start_point": {"row": 52, "column": 34}, "end_point": {"row": 52, "column": 36}}, {"id": 248, "type": "identifier", "text": "LF", "parent": 243, "children": [], "start_point": {"row": 52, "column": 37}, "end_point": {"row": 52, "column": 39}}, {"id": 249, "type": "||", "text": "||", "parent": 232, "children": [], "start_point": {"row": 52, "column": 41}, "end_point": {"row": 52, "column": 43}}, {"id": 250, "type": "parenthesized_expression", "text": "(i == (n-1))", "parent": 232, "children": [251], "start_point": {"row": 52, "column": 44}, "end_point": {"row": 52, "column": 56}}, {"id": 251, "type": "binary_expression", "text": "i == (n-1)", "parent": 250, "children": [252, 253, 254], "start_point": {"row": 52, "column": 45}, "end_point": {"row": 52, "column": 55}}, {"id": 252, "type": "identifier", "text": "i", "parent": 251, "children": [], "start_point": {"row": 52, "column": 45}, "end_point": {"row": 52, "column": 46}}, {"id": 253, "type": "==", "text": "==", "parent": 251, "children": [], "start_point": {"row": 52, "column": 47}, "end_point": {"row": 52, "column": 49}}, {"id": 254, "type": "parenthesized_expression", "text": "(n-1)", "parent": 251, "children": [255], "start_point": {"row": 52, "column": 50}, "end_point": {"row": 52, "column": 55}}, {"id": 255, "type": "binary_expression", "text": "n-1", "parent": 254, "children": [256, 257, 258], "start_point": {"row": 52, "column": 51}, "end_point": {"row": 52, "column": 54}}, {"id": 256, "type": "identifier", "text": "n", "parent": 255, "children": [], "start_point": {"row": 52, "column": 51}, "end_point": {"row": 52, "column": 52}}, {"id": 257, "type": "-", "text": "-", "parent": 255, "children": [], "start_point": {"row": 52, "column": 52}, "end_point": {"row": 52, "column": 53}}, {"id": 258, "type": "number_literal", "text": "1", "parent": 255, "children": [], "start_point": {"row": 52, "column": 53}, "end_point": {"row": 52, "column": 54}}, {"id": 259, "type": "assignment_expression", "text": "s[i] = '\\0'", "parent": 230, "children": [260, 263, 264], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 23}}, {"id": 260, "type": "subscript_expression", "text": "s[i]", "parent": 259, "children": [261, 262], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 16}}, {"id": 261, "type": "identifier", "text": "s", "parent": 260, "children": [], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 13}}, {"id": 262, "type": "identifier", "text": "i", "parent": 260, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 15}}, {"id": 263, "type": "=", "text": "=", "parent": 259, "children": [], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 18}}, {"id": 264, "type": "char_literal", "text": "'\\0'", "parent": 259, "children": [265, 266, 267], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 23}}, {"id": 265, "type": "'", "text": "'", "parent": 264, "children": [], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 20}}, {"id": 266, "type": "escape_sequence", "text": "\\0", "parent": 264, "children": [], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 22}}, {"id": 267, "type": "'", "text": "'", "parent": 264, "children": [], "start_point": {"row": 53, "column": 22}, "end_point": {"row": 53, "column": 23}}, {"id": 268, "type": "return_statement", "text": "return (feof(f) ? 1 : 0);", "parent": 230, "children": [269], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 37}}, {"id": 269, "type": "parenthesized_expression", "text": "(feof(f) ? 1 : 0)", "parent": 268, "children": [270], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 36}}, {"id": 270, "type": "conditional_expression", "text": "feof(f) ? 1 : 0", "parent": 269, "children": [271, 275, 276, 277], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 35}}, {"id": 271, "type": "call_expression", "text": "feof(f)", "parent": 270, "children": [272, 273], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 27}}, {"id": 272, "type": "identifier", "text": "feof", "parent": 271, "children": [], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 24}}, {"id": 273, "type": "argument_list", "text": "(f)", "parent": 271, "children": [274], "start_point": {"row": 54, "column": 24}, "end_point": {"row": 54, "column": 27}}, {"id": 274, "type": "identifier", "text": "f", "parent": 273, "children": [], "start_point": {"row": 54, "column": 25}, "end_point": {"row": 54, "column": 26}}, {"id": 275, "type": "?", "text": "?", "parent": 270, "children": [], "start_point": {"row": 54, "column": 28}, "end_point": {"row": 54, "column": 29}}, {"id": 276, "type": "number_literal", "text": "1", "parent": 270, "children": [], "start_point": {"row": 54, "column": 30}, "end_point": {"row": 54, "column": 31}}, {"id": 277, "type": "number_literal", "text": "0", "parent": 270, "children": [], "start_point": {"row": 54, "column": 34}, "end_point": {"row": 54, "column": 35}}, {"id": 278, "type": "update_expression", "text": "++i", "parent": 198, "children": [279, 280], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 11}}, {"id": 279, "type": "++", "text": "++", "parent": 278, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 10}}, {"id": 280, "type": "identifier", "text": "i", "parent": 278, "children": [], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 11}}, {"id": 281, "type": "function_definition", "text": "void putline(FILE *f,char *l) {\n int x;\n\n for(x=0;l[x];x++) fputc(l[x],f);\n fputc('\\n',f);\n}", "parent": null, "children": [282, 283], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 282, "type": "primitive_type", "text": "void", "parent": 281, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 4}}, {"id": 283, "type": "function_declarator", "text": "putline(FILE *f,char *l)", "parent": 281, "children": [284, 285], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 29}}, {"id": 284, "type": "identifier", "text": "putline", "parent": 283, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 12}}, {"id": 285, "type": "parameter_list", "text": "(FILE *f,char *l)", "parent": 283, "children": [286, 291], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 29}}, {"id": 286, "type": "parameter_declaration", "text": "FILE *f", "parent": 285, "children": [287, 288], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 20}}, {"id": 287, "type": "type_identifier", "text": "FILE", "parent": 286, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 17}}, {"id": 288, "type": "pointer_declarator", "text": "*f", "parent": 286, "children": [289, 290], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 20}}, {"id": 289, "type": "*", "text": "*", "parent": 288, "children": [], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 19}}, {"id": 290, "type": "identifier", "text": "f", "parent": 288, "children": [], "start_point": {"row": 60, "column": 19}, "end_point": {"row": 60, "column": 20}}, {"id": 291, "type": "parameter_declaration", "text": "char *l", "parent": 285, "children": [292, 293], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 28}}, {"id": 292, "type": "primitive_type", "text": "char", "parent": 291, "children": [], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 25}}, {"id": 293, "type": "pointer_declarator", "text": "*l", "parent": 291, "children": [294, 295], "start_point": {"row": 60, "column": 26}, "end_point": {"row": 60, "column": 28}}, {"id": 294, "type": "*", "text": "*", "parent": 293, "children": [], "start_point": {"row": 60, "column": 26}, "end_point": {"row": 60, "column": 27}}, {"id": 295, "type": "identifier", "text": "l", "parent": 293, "children": [], "start_point": {"row": 60, "column": 27}, "end_point": {"row": 60, "column": 28}}, {"id": 296, "type": "declaration", "text": "int x;", "parent": 281, "children": [297, 298], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 10}}, {"id": 297, "type": "primitive_type", "text": "int", "parent": 296, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 7}}, {"id": 298, "type": "identifier", "text": "x", "parent": 296, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 9}}, {"id": 299, "type": "for_statement", "text": "for(x=0;l[x];x++) fputc(l[x],f);", "parent": 281, "children": [300, 304, 307], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 36}}, {"id": 300, "type": "assignment_expression", "text": "x=0", "parent": 299, "children": [301, 302, 303], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 11}}, {"id": 301, "type": "identifier", "text": "x", "parent": 300, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 9}}, {"id": 302, "type": "=", "text": "=", "parent": 300, "children": [], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 10}}, {"id": 303, "type": "number_literal", "text": "0", "parent": 300, "children": [], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 11}}, {"id": 304, "type": "subscript_expression", "text": "l[x]", "parent": 299, "children": [305, 306], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 16}}, {"id": 305, "type": "identifier", "text": "l", "parent": 304, "children": [], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 13}}, {"id": 306, "type": "identifier", "text": "x", "parent": 304, "children": [], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 15}}, {"id": 307, "type": "update_expression", "text": "x++", "parent": 299, "children": [308, 309], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 20}}, {"id": 308, "type": "identifier", "text": "x", "parent": 307, "children": [], "start_point": {"row": 63, "column": 17}, "end_point": {"row": 63, "column": 18}}, {"id": 309, "type": "++", "text": "++", "parent": 307, "children": [], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 20}}, {"id": 310, "type": "call_expression", "text": "fputc(l[x],f)", "parent": 299, "children": [311, 312], "start_point": {"row": 63, "column": 22}, "end_point": {"row": 63, "column": 35}}, {"id": 311, "type": "identifier", "text": "fputc", "parent": 310, "children": [], "start_point": {"row": 63, "column": 22}, "end_point": {"row": 63, "column": 27}}, {"id": 312, "type": "argument_list", "text": "(l[x],f)", "parent": 310, "children": [313, 316], "start_point": {"row": 63, "column": 27}, "end_point": {"row": 63, "column": 35}}, {"id": 313, "type": "subscript_expression", "text": "l[x]", "parent": 312, "children": [314, 315], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 32}}, {"id": 314, "type": "identifier", "text": "l", "parent": 313, "children": [], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 29}}, {"id": 315, "type": "identifier", "text": "x", "parent": 313, "children": [], "start_point": {"row": 63, "column": 30}, "end_point": {"row": 63, "column": 31}}, {"id": 316, "type": "identifier", "text": "f", "parent": 312, "children": [], "start_point": {"row": 63, "column": 33}, "end_point": {"row": 63, "column": 34}}, {"id": 317, "type": "call_expression", "text": "fputc('\\n',f)", "parent": 281, "children": [318, 319], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 17}}, {"id": 318, "type": "identifier", "text": "fputc", "parent": 317, "children": [], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 9}}, {"id": 319, "type": "argument_list", "text": "('\\n',f)", "parent": 317, "children": [320, 324], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 17}}, {"id": 320, "type": "char_literal", "text": "'\\n'", "parent": 319, "children": [321, 322, 323], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 14}}, {"id": 321, "type": "'", "text": "'", "parent": 320, "children": [], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 11}}, {"id": 322, "type": "escape_sequence", "text": "\\n", "parent": 320, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 13}}, {"id": 323, "type": "'", "text": "'", "parent": 320, "children": [], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 14}}, {"id": 324, "type": "identifier", "text": "f", "parent": 319, "children": [], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 16}}, {"id": 325, "type": "declaration", "text": "static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */\n \"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";", "parent": null, "children": [326, 329], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 70, "column": 75}}, {"id": 326, "type": "sized_type_specifier", "text": "unsigned char", "parent": 325, "children": [327, 328], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 20}}, {"id": 327, "type": "unsigned", "text": "unsigned", "parent": 326, "children": [], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 15}}, {"id": 328, "type": "primitive_type", "text": "char", "parent": 326, "children": [], "start_point": {"row": 69, "column": 16}, "end_point": {"row": 69, "column": 20}}, {"id": 329, "type": "init_declarator", "text": "itoa64[] = /* 0 ... 63 => ascii - 64 */\n \"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\"", "parent": 325, "children": [330, 332, 333], "start_point": {"row": 69, "column": 21}, "end_point": {"row": 70, "column": 74}}, {"id": 330, "type": "array_declarator", "text": "itoa64[]", "parent": 329, "children": [331], "start_point": {"row": 69, "column": 21}, "end_point": {"row": 69, "column": 29}}, {"id": 331, "type": "identifier", "text": "itoa64", "parent": 330, "children": [], "start_point": {"row": 69, "column": 21}, "end_point": {"row": 69, "column": 27}}, {"id": 332, "type": "=", "text": "=", "parent": 329, "children": [], "start_point": {"row": 69, "column": 30}, "end_point": {"row": 69, "column": 31}}, {"id": 333, "type": "string_literal", "text": "\"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\"", "parent": 329, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 74}}, {"id": 334, "type": "function_definition", "text": "void to64(s, v, n)\n register char *s;\n register long v;\n register int n;\n{\n while (--n >= 0) {\n *s++ = itoa64[v&0x3f];\n v >>= 6;\n }\n}", "parent": null, "children": [335, 336, 342, 349, 355], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 81, "column": 1}}, {"id": 335, "type": "primitive_type", "text": "void", "parent": 334, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 4}}, {"id": 336, "type": "function_declarator", "text": "to64(s, v, n)", "parent": 334, "children": [337, 338], "start_point": {"row": 72, "column": 5}, "end_point": {"row": 72, "column": 18}}, {"id": 337, "type": "identifier", "text": "to64", "parent": 336, "children": [], "start_point": {"row": 72, "column": 5}, "end_point": {"row": 72, "column": 9}}, {"id": 338, "type": "parameter_list", "text": "(s, v, n)", "parent": 336, "children": [339, 340, 341], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 18}}, {"id": 339, "type": "identifier", "text": "s", "parent": 338, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 11}}, {"id": 340, "type": "identifier", "text": "v", "parent": 338, "children": [], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 14}}, {"id": 341, "type": "identifier", "text": "n", "parent": 338, "children": [], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 17}}, {"id": 342, "type": "declaration", "text": "register char *s;", "parent": 334, "children": [343, 345, 346], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 19}}, {"id": 343, "type": "storage_class_specifier", "text": "register", "parent": 342, "children": [344], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 10}}, {"id": 344, "type": "register", "text": "register", "parent": 343, "children": [], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 10}}, {"id": 345, "type": "primitive_type", "text": "char", "parent": 342, "children": [], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 15}}, {"id": 346, "type": "pointer_declarator", "text": "*s", "parent": 342, "children": [347, 348], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 18}}, {"id": 347, "type": "*", "text": "*", "parent": 346, "children": [], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 17}}, {"id": 348, "type": "identifier", "text": "s", "parent": 346, "children": [], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 18}}, {"id": 349, "type": "declaration", "text": "register long v;", "parent": 334, "children": [350, 352, 354], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 18}}, {"id": 350, "type": "storage_class_specifier", "text": "register", "parent": 349, "children": [351], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 10}}, {"id": 351, "type": "register", "text": "register", "parent": 350, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 10}}, {"id": 352, "type": "sized_type_specifier", "text": "long", "parent": 349, "children": [353], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 15}}, {"id": 353, "type": "long", "text": "long", "parent": 352, "children": [], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 15}}, {"id": 354, "type": "identifier", "text": "v", "parent": 349, "children": [], "start_point": {"row": 74, "column": 16}, "end_point": {"row": 74, "column": 17}}, {"id": 355, "type": "declaration", "text": "register int n;", "parent": 334, "children": [356, 358, 359], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 17}}, {"id": 356, "type": "storage_class_specifier", "text": "register", "parent": 355, "children": [357], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 10}}, {"id": 357, "type": "register", "text": "register", "parent": 356, "children": [], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 10}}, {"id": 358, "type": "primitive_type", "text": "int", "parent": 355, "children": [], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 14}}, {"id": 359, "type": "identifier", "text": "n", "parent": 355, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 16}}, {"id": 360, "type": "while_statement", "text": "while (--n >= 0) {\n *s++ = itoa64[v&0x3f];\n v >>= 6;\n }", "parent": 334, "children": [361], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 80, "column": 5}}, {"id": 361, "type": "parenthesized_expression", "text": "(--n >= 0)", "parent": 360, "children": [362], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 20}}, {"id": 362, "type": "binary_expression", "text": "--n >= 0", "parent": 361, "children": [363, 366, 367], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 19}}, {"id": 363, "type": "update_expression", "text": "--n", "parent": 362, "children": [364, 365], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 14}}, {"id": 364, "type": "--", "text": "--", "parent": 363, "children": [], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 13}}, {"id": 365, "type": "identifier", "text": "n", "parent": 363, "children": [], "start_point": {"row": 77, "column": 13}, "end_point": {"row": 77, "column": 14}}, {"id": 366, "type": ">=", "text": ">=", "parent": 362, "children": [], "start_point": {"row": 77, "column": 15}, "end_point": {"row": 77, "column": 17}}, {"id": 367, "type": "number_literal", "text": "0", "parent": 362, "children": [], "start_point": {"row": 77, "column": 18}, "end_point": {"row": 77, "column": 19}}, {"id": 368, "type": "assignment_expression", "text": "*s++ = itoa64[v&0x3f]", "parent": 360, "children": [369, 374, 375], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 29}}, {"id": 369, "type": "pointer_expression", "text": "*s++", "parent": 368, "children": [370, 371], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 12}}, {"id": 370, "type": "*", "text": "*", "parent": 369, "children": [], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 9}}, {"id": 371, "type": "update_expression", "text": "s++", "parent": 369, "children": [372, 373], "start_point": {"row": 78, "column": 9}, "end_point": {"row": 78, "column": 12}}, {"id": 372, "type": "identifier", "text": "s", "parent": 371, "children": [], "start_point": {"row": 78, "column": 9}, "end_point": {"row": 78, "column": 10}}, {"id": 373, "type": "++", "text": "++", "parent": 371, "children": [], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 12}}, {"id": 374, "type": "=", "text": "=", "parent": 368, "children": [], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 14}}, {"id": 375, "type": "subscript_expression", "text": "itoa64[v&0x3f]", "parent": 368, "children": [376, 377], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 29}}, {"id": 376, "type": "identifier", "text": "itoa64", "parent": 375, "children": [], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 21}}, {"id": 377, "type": "binary_expression", "text": "v&0x3f", "parent": 375, "children": [378, 379], "start_point": {"row": 78, "column": 22}, "end_point": {"row": 78, "column": 28}}, {"id": 378, "type": "identifier", "text": "v", "parent": 377, "children": [], "start_point": {"row": 78, "column": 22}, "end_point": {"row": 78, "column": 23}}, {"id": 379, "type": "number_literal", "text": "0x3f", "parent": 377, "children": [], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 28}}, {"id": 380, "type": "assignment_expression", "text": "v >>= 6", "parent": 360, "children": [381, 382, 383], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 15}}, {"id": 381, "type": "identifier", "text": "v", "parent": 380, "children": [], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 9}}, {"id": 382, "type": ">>=", "text": ">>=", "parent": 380, "children": [], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 13}}, {"id": 383, "type": "number_literal", "text": "6", "parent": 380, "children": [], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 15}}, {"id": 384, "type": "function_definition", "text": "void add_password(char *user, FILE *f) {\n char *pw, *cpw, salt[3];\n\n pw = strd(getpass(\"New password:\"));\n if(strcmp(pw,getpass(\"Re-type new password:\"))) {\n fprintf(stderr,\"They don't match, sorry.\\n\");\n if(tn)\n unlink(tn);\n exit(1);\n }\n (void)srand((int)time((time_t *)NULL));\n to64(&salt[0],rand(),2);\n cpw = crypt(pw,salt);\n free(pw);\n fprintf(f,\"%s:%s\\n\",user,cpw);\n}", "parent": null, "children": [385, 386], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 101, "column": 1}}, {"id": 385, "type": "primitive_type", "text": "void", "parent": 384, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 4}}, {"id": 386, "type": "function_declarator", "text": "add_password(char *user, FILE *f)", "parent": 384, "children": [387, 388], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 38}}, {"id": 387, "type": "identifier", "text": "add_password", "parent": 386, "children": [], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 17}}, {"id": 388, "type": "parameter_list", "text": "(char *user, FILE *f)", "parent": 386, "children": [389, 394], "start_point": {"row": 86, "column": 17}, "end_point": {"row": 86, "column": 38}}, {"id": 389, "type": "parameter_declaration", "text": "char *user", "parent": 388, "children": [390, 391], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 28}}, {"id": 390, "type": "primitive_type", "text": "char", "parent": 389, "children": [], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 22}}, {"id": 391, "type": "pointer_declarator", "text": "*user", "parent": 389, "children": [392, 393], "start_point": {"row": 86, "column": 23}, "end_point": {"row": 86, "column": 28}}, {"id": 392, "type": "*", "text": "*", "parent": 391, "children": [], "start_point": {"row": 86, "column": 23}, "end_point": {"row": 86, "column": 24}}, {"id": 393, "type": "identifier", "text": "user", "parent": 391, "children": [], "start_point": {"row": 86, "column": 24}, "end_point": {"row": 86, "column": 28}}, {"id": 394, "type": "parameter_declaration", "text": "FILE *f", "parent": 388, "children": [395, 396], "start_point": {"row": 86, "column": 30}, "end_point": {"row": 86, "column": 37}}, {"id": 395, "type": "type_identifier", "text": "FILE", "parent": 394, "children": [], "start_point": {"row": 86, "column": 30}, "end_point": {"row": 86, "column": 34}}, {"id": 396, "type": "pointer_declarator", "text": "*f", "parent": 394, "children": [397, 398], "start_point": {"row": 86, "column": 35}, "end_point": {"row": 86, "column": 37}}, {"id": 397, "type": "*", "text": "*", "parent": 396, "children": [], "start_point": {"row": 86, "column": 35}, "end_point": {"row": 86, "column": 36}}, {"id": 398, "type": "identifier", "text": "f", "parent": 396, "children": [], "start_point": {"row": 86, "column": 36}, "end_point": {"row": 86, "column": 37}}, {"id": 399, "type": "declaration", "text": "char *pw, *cpw, salt[3];", "parent": 384, "children": [400, 401, 404, 407], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 28}}, {"id": 400, "type": "primitive_type", "text": "char", "parent": 399, "children": [], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 8}}, {"id": 401, "type": "pointer_declarator", "text": "*pw", "parent": 399, "children": [402, 403], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 12}}, {"id": 402, "type": "*", "text": "*", "parent": 401, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 10}}, {"id": 403, "type": "identifier", "text": "pw", "parent": 401, "children": [], "start_point": {"row": 87, "column": 10}, "end_point": {"row": 87, "column": 12}}, {"id": 404, "type": "pointer_declarator", "text": "*cpw", "parent": 399, "children": [405, 406], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 18}}, {"id": 405, "type": "*", "text": "*", "parent": 404, "children": [], "start_point": {"row": 87, "column": 14}, "end_point": {"row": 87, "column": 15}}, {"id": 406, "type": "identifier", "text": "cpw", "parent": 404, "children": [], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 18}}, {"id": 407, "type": "array_declarator", "text": "salt[3]", "parent": 399, "children": [408, 409], "start_point": {"row": 87, "column": 20}, "end_point": {"row": 87, "column": 27}}, {"id": 408, "type": "identifier", "text": "salt", "parent": 407, "children": [], "start_point": {"row": 87, "column": 20}, "end_point": {"row": 87, "column": 24}}, {"id": 409, "type": "number_literal", "text": "3", "parent": 407, "children": [], "start_point": {"row": 87, "column": 25}, "end_point": {"row": 87, "column": 26}}, {"id": 410, "type": "assignment_expression", "text": "pw = strd(getpass(\"New password:\"))", "parent": 384, "children": [411, 412, 413], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 39}}, {"id": 411, "type": "identifier", "text": "pw", "parent": 410, "children": [], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 6}}, {"id": 412, "type": "=", "text": "=", "parent": 410, "children": [], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 8}}, {"id": 413, "type": "call_expression", "text": "strd(getpass(\"New password:\"))", "parent": 410, "children": [414, 415], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 39}}, {"id": 414, "type": "identifier", "text": "strd", "parent": 413, "children": [], "start_point": {"row": 89, "column": 9}, "end_point": {"row": 89, "column": 13}}, {"id": 415, "type": "argument_list", "text": "(getpass(\"New password:\"))", "parent": 413, "children": [416], "start_point": {"row": 89, "column": 13}, "end_point": {"row": 89, "column": 39}}, {"id": 416, "type": "call_expression", "text": "getpass(\"New password:\")", "parent": 415, "children": [417, 418], "start_point": {"row": 89, "column": 14}, "end_point": {"row": 89, "column": 38}}, {"id": 417, "type": "identifier", "text": "getpass", "parent": 416, "children": [], "start_point": {"row": 89, "column": 14}, "end_point": {"row": 89, "column": 21}}, {"id": 418, "type": "argument_list", "text": "(\"New password:\")", "parent": 416, "children": [419], "start_point": {"row": 89, "column": 21}, "end_point": {"row": 89, "column": 38}}, {"id": 419, "type": "string_literal", "text": "\"New password:\"", "parent": 418, "children": [], "start_point": {"row": 89, "column": 22}, "end_point": {"row": 89, "column": 37}}, {"id": 420, "type": "if_statement", "text": "if(strcmp(pw,getpass(\"Re-type new password:\"))) {\n fprintf(stderr,\"They don't match, sorry.\\n\");\n if(tn)\n unlink(tn);\n exit(1);\n }", "parent": 384, "children": [421], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 95, "column": 5}}, {"id": 421, "type": "parenthesized_expression", "text": "(strcmp(pw,getpass(\"Re-type new password:\")))", "parent": 420, "children": [422], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 51}}, {"id": 422, "type": "call_expression", "text": "strcmp(pw,getpass(\"Re-type new password:\"))", "parent": 421, "children": [423, 424], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 50}}, {"id": 423, "type": "identifier", "text": "strcmp", "parent": 422, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 13}}, {"id": 424, "type": "argument_list", "text": "(pw,getpass(\"Re-type new password:\"))", "parent": 422, "children": [425, 426], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 50}}, {"id": 425, "type": "identifier", "text": "pw", "parent": 424, "children": [], "start_point": {"row": 90, "column": 14}, "end_point": {"row": 90, "column": 16}}, {"id": 426, "type": "call_expression", "text": "getpass(\"Re-type new password:\")", "parent": 424, "children": [427, 428], "start_point": {"row": 90, "column": 17}, "end_point": {"row": 90, "column": 49}}, {"id": 427, "type": "identifier", "text": "getpass", "parent": 426, "children": [], "start_point": {"row": 90, "column": 17}, "end_point": {"row": 90, "column": 24}}, {"id": 428, "type": "argument_list", "text": "(\"Re-type new password:\")", "parent": 426, "children": [429], "start_point": {"row": 90, "column": 24}, "end_point": {"row": 90, "column": 49}}, {"id": 429, "type": "string_literal", "text": "\"Re-type new password:\"", "parent": 428, "children": [], "start_point": {"row": 90, "column": 25}, "end_point": {"row": 90, "column": 48}}, {"id": 430, "type": "call_expression", "text": "fprintf(stderr,\"They don't match, sorry.\\n\")", "parent": 420, "children": [431, 432], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 52}}, {"id": 431, "type": "identifier", "text": "fprintf", "parent": 430, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 15}}, {"id": 432, "type": "argument_list", "text": "(stderr,\"They don't match, sorry.\\n\")", "parent": 430, "children": [433, 434], "start_point": {"row": 91, "column": 15}, "end_point": {"row": 91, "column": 52}}, {"id": 433, "type": "identifier", "text": "stderr", "parent": 432, "children": [], "start_point": {"row": 91, "column": 16}, "end_point": {"row": 91, "column": 22}}, {"id": 434, "type": "string_literal", "text": "\"They don't match, sorry.\\n\"", "parent": 432, "children": [435], "start_point": {"row": 91, "column": 23}, "end_point": {"row": 91, "column": 51}}, {"id": 435, "type": "escape_sequence", "text": "\\n", "parent": 434, "children": [], "start_point": {"row": 91, "column": 48}, "end_point": {"row": 91, "column": 50}}, {"id": 436, "type": "if_statement", "text": "if(tn)\n unlink(tn);", "parent": 420, "children": [437], "start_point": {"row": 92, "column": 8}, "end_point": {"row": 93, "column": 23}}, {"id": 437, "type": "parenthesized_expression", "text": "(tn)", "parent": 436, "children": [438], "start_point": {"row": 92, "column": 10}, "end_point": {"row": 92, "column": 14}}, {"id": 438, "type": "identifier", "text": "tn", "parent": 437, "children": [], "start_point": {"row": 92, "column": 11}, "end_point": {"row": 92, "column": 13}}, {"id": 439, "type": "call_expression", "text": "unlink(tn)", "parent": 436, "children": [440, 441], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 93, "column": 22}}, {"id": 440, "type": "identifier", "text": "unlink", "parent": 439, "children": [], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 93, "column": 18}}, {"id": 441, "type": "argument_list", "text": "(tn)", "parent": 439, "children": [442], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 22}}, {"id": 442, "type": "identifier", "text": "tn", "parent": 441, "children": [], "start_point": {"row": 93, "column": 19}, "end_point": {"row": 93, "column": 21}}, {"id": 443, "type": "call_expression", "text": "exit(1)", "parent": 420, "children": [444, 445], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 15}}, {"id": 444, "type": "identifier", "text": "exit", "parent": 443, "children": [], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 12}}, {"id": 445, "type": "argument_list", "text": "(1)", "parent": 443, "children": [446], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 15}}, {"id": 446, "type": "number_literal", "text": "1", "parent": 445, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 14}}, {"id": 447, "type": "cast_expression", "text": "(void)srand((int)time((time_t *)NULL))", "parent": 384, "children": [448, 450], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 42}}, {"id": 448, "type": "type_descriptor", "text": "void", "parent": 447, "children": [449], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 9}}, {"id": 449, "type": "primitive_type", "text": "void", "parent": 448, "children": [], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 9}}, {"id": 450, "type": "call_expression", "text": "srand((int)time((time_t *)NULL))", "parent": 447, "children": [451, 452], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 42}}, {"id": 451, "type": "identifier", "text": "srand", "parent": 450, "children": [], "start_point": {"row": 96, "column": 10}, "end_point": {"row": 96, "column": 15}}, {"id": 452, "type": "argument_list", "text": "((int)time((time_t *)NULL))", "parent": 450, "children": [453], "start_point": {"row": 96, "column": 15}, "end_point": {"row": 96, "column": 42}}, {"id": 453, "type": "cast_expression", "text": "(int)time((time_t *)NULL)", "parent": 452, "children": [454, 456], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 41}}, {"id": 454, "type": "type_descriptor", "text": "int", "parent": 453, "children": [455], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 20}}, {"id": 455, "type": "primitive_type", "text": "int", "parent": 454, "children": [], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 20}}, {"id": 456, "type": "call_expression", "text": "time((time_t *)NULL)", "parent": 453, "children": [457, 458], "start_point": {"row": 96, "column": 21}, "end_point": {"row": 96, "column": 41}}, {"id": 457, "type": "identifier", "text": "time", "parent": 456, "children": [], "start_point": {"row": 96, "column": 21}, "end_point": {"row": 96, "column": 25}}, {"id": 458, "type": "argument_list", "text": "((time_t *)NULL)", "parent": 456, "children": [459], "start_point": {"row": 96, "column": 25}, "end_point": {"row": 96, "column": 41}}, {"id": 459, "type": "cast_expression", "text": "(time_t *)NULL", "parent": 458, "children": [460, 464], "start_point": {"row": 96, "column": 26}, "end_point": {"row": 96, "column": 40}}, {"id": 460, "type": "type_descriptor", "text": "time_t *", "parent": 459, "children": [461, 462], "start_point": {"row": 96, "column": 27}, "end_point": {"row": 96, "column": 35}}, {"id": 461, "type": "type_identifier", "text": "time_t", "parent": 460, "children": [], "start_point": {"row": 96, "column": 27}, "end_point": {"row": 96, "column": 33}}, {"id": 462, "type": "abstract_pointer_declarator", "text": "*", "parent": 460, "children": [463], "start_point": {"row": 96, "column": 34}, "end_point": {"row": 96, "column": 35}}, {"id": 463, "type": "*", "text": "*", "parent": 462, "children": [], "start_point": {"row": 96, "column": 34}, "end_point": {"row": 96, "column": 35}}, {"id": 464, "type": "null", "text": "NULL", "parent": 459, "children": [465], "start_point": {"row": 96, "column": 36}, "end_point": {"row": 96, "column": 40}}, {"id": 465, "type": "NULL", "text": "NULL", "parent": 464, "children": [], "start_point": {"row": 96, "column": 36}, "end_point": {"row": 96, "column": 40}}, {"id": 466, "type": "call_expression", "text": "to64(&salt[0],rand(),2)", "parent": 384, "children": [467, 468], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 27}}, {"id": 467, "type": "identifier", "text": "to64", "parent": 466, "children": [], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 97, "column": 8}}, {"id": 468, "type": "argument_list", "text": "(&salt[0],rand(),2)", "parent": 466, "children": [469, 473, 476], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 27}}, {"id": 469, "type": "pointer_expression", "text": "&salt[0]", "parent": 468, "children": [470], "start_point": {"row": 97, "column": 9}, "end_point": {"row": 97, "column": 17}}, {"id": 470, "type": "subscript_expression", "text": "salt[0]", "parent": 469, "children": [471, 472], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 17}}, {"id": 471, "type": "identifier", "text": "salt", "parent": 470, "children": [], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 14}}, {"id": 472, "type": "number_literal", "text": "0", "parent": 470, "children": [], "start_point": {"row": 97, "column": 15}, "end_point": {"row": 97, "column": 16}}, {"id": 473, "type": "call_expression", "text": "rand()", "parent": 468, "children": [474, 475], "start_point": {"row": 97, "column": 18}, "end_point": {"row": 97, "column": 24}}, {"id": 474, "type": "identifier", "text": "rand", "parent": 473, "children": [], "start_point": {"row": 97, "column": 18}, "end_point": {"row": 97, "column": 22}}, {"id": 475, "type": "argument_list", "text": "()", "parent": 473, "children": [], "start_point": {"row": 97, "column": 22}, "end_point": {"row": 97, "column": 24}}, {"id": 476, "type": "number_literal", "text": "2", "parent": 468, "children": [], "start_point": {"row": 97, "column": 25}, "end_point": {"row": 97, "column": 26}}, {"id": 477, "type": "assignment_expression", "text": "cpw = crypt(pw,salt)", "parent": 384, "children": [478, 479, 480], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 24}}, {"id": 478, "type": "identifier", "text": "cpw", "parent": 477, "children": [], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 7}}, {"id": 479, "type": "=", "text": "=", "parent": 477, "children": [], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 9}}, {"id": 480, "type": "call_expression", "text": "crypt(pw,salt)", "parent": 477, "children": [481, 482], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 24}}, {"id": 481, "type": "identifier", "text": "crypt", "parent": 480, "children": [], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 15}}, {"id": 482, "type": "argument_list", "text": "(pw,salt)", "parent": 480, "children": [483, 484], "start_point": {"row": 98, "column": 15}, "end_point": {"row": 98, "column": 24}}, {"id": 483, "type": "identifier", "text": "pw", "parent": 482, "children": [], "start_point": {"row": 98, "column": 16}, "end_point": {"row": 98, "column": 18}}, {"id": 484, "type": "identifier", "text": "salt", "parent": 482, "children": [], "start_point": {"row": 98, "column": 19}, "end_point": {"row": 98, "column": 23}}, {"id": 485, "type": "call_expression", "text": "free(pw)", "parent": 384, "children": [486, 487], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 12}}, {"id": 486, "type": "identifier", "text": "free", "parent": 485, "children": [], "start_point": {"row": 99, "column": 4}, "end_point": {"row": 99, "column": 8}}, {"id": 487, "type": "argument_list", "text": "(pw)", "parent": 485, "children": [488], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 12}}, {"id": 488, "type": "identifier", "text": "pw", "parent": 487, "children": [], "start_point": {"row": 99, "column": 9}, "end_point": {"row": 99, "column": 11}}, {"id": 489, "type": "call_expression", "text": "fprintf(f,\"%s:%s\\n\",user,cpw)", "parent": 384, "children": [490, 491], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 33}}, {"id": 490, "type": "identifier", "text": "fprintf", "parent": 489, "children": [], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 11}}, {"id": 491, "type": "argument_list", "text": "(f,\"%s:%s\\n\",user,cpw)", "parent": 489, "children": [492, 493, 495, 496], "start_point": {"row": 100, "column": 11}, "end_point": {"row": 100, "column": 33}}, {"id": 492, "type": "identifier", "text": "f", "parent": 491, "children": [], "start_point": {"row": 100, "column": 12}, "end_point": {"row": 100, "column": 13}}, {"id": 493, "type": "string_literal", "text": "\"%s:%s\\n\"", "parent": 491, "children": [494], "start_point": {"row": 100, "column": 14}, "end_point": {"row": 100, "column": 23}}, {"id": 494, "type": "escape_sequence", "text": "\\n", "parent": 493, "children": [], "start_point": {"row": 100, "column": 20}, "end_point": {"row": 100, "column": 22}}, {"id": 495, "type": "identifier", "text": "user", "parent": 491, "children": [], "start_point": {"row": 100, "column": 24}, "end_point": {"row": 100, "column": 28}}, {"id": 496, "type": "identifier", "text": "cpw", "parent": 491, "children": [], "start_point": {"row": 100, "column": 29}, "end_point": {"row": 100, "column": 32}}, {"id": 497, "type": "function_definition", "text": "void usage() {\n fprintf(stderr,\"Usage: couchpw [-c] passwordfile username\\n\");\n fprintf(stderr,\"The -c flag creates a new file.\\n\");\n exit(1);\n}", "parent": null, "children": [498, 499], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 107, "column": 1}}, {"id": 498, "type": "primitive_type", "text": "void", "parent": 497, "children": [], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 4}}, {"id": 499, "type": "function_declarator", "text": "usage()", "parent": 497, "children": [500, 501], "start_point": {"row": 103, "column": 5}, "end_point": {"row": 103, "column": 12}}, {"id": 500, "type": "identifier", "text": "usage", "parent": 499, "children": [], "start_point": {"row": 103, "column": 5}, "end_point": {"row": 103, "column": 10}}, {"id": 501, "type": "parameter_list", "text": "()", "parent": 499, "children": [], "start_point": {"row": 103, "column": 10}, "end_point": {"row": 103, "column": 12}}, {"id": 502, "type": "call_expression", "text": "fprintf(stderr,\"Usage: couchpw [-c] passwordfile username\\n\")", "parent": 497, "children": [503, 504], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 65}}, {"id": 503, "type": "identifier", "text": "fprintf", "parent": 502, "children": [], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 11}}, {"id": 504, "type": "argument_list", "text": "(stderr,\"Usage: couchpw [-c] passwordfile username\\n\")", "parent": 502, "children": [505, 506], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 65}}, {"id": 505, "type": "identifier", "text": "stderr", "parent": 504, "children": [], "start_point": {"row": 104, "column": 12}, "end_point": {"row": 104, "column": 18}}, {"id": 506, "type": "string_literal", "text": "\"Usage: couchpw [-c] passwordfile username\\n\"", "parent": 504, "children": [507], "start_point": {"row": 104, "column": 19}, "end_point": {"row": 104, "column": 64}}, {"id": 507, "type": "escape_sequence", "text": "\\n", "parent": 506, "children": [], "start_point": {"row": 104, "column": 61}, "end_point": {"row": 104, "column": 63}}, {"id": 508, "type": "call_expression", "text": "fprintf(stderr,\"The -c flag creates a new file.\\n\")", "parent": 497, "children": [509, 510], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 55}}, {"id": 509, "type": "identifier", "text": "fprintf", "parent": 508, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 11}}, {"id": 510, "type": "argument_list", "text": "(stderr,\"The -c flag creates a new file.\\n\")", "parent": 508, "children": [511, 512], "start_point": {"row": 105, "column": 11}, "end_point": {"row": 105, "column": 55}}, {"id": 511, "type": "identifier", "text": "stderr", "parent": 510, "children": [], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 18}}, {"id": 512, "type": "string_literal", "text": "\"The -c flag creates a new file.\\n\"", "parent": 510, "children": [513], "start_point": {"row": 105, "column": 19}, "end_point": {"row": 105, "column": 54}}, {"id": 513, "type": "escape_sequence", "text": "\\n", "parent": 512, "children": [], "start_point": {"row": 105, "column": 51}, "end_point": {"row": 105, "column": 53}}, {"id": 514, "type": "call_expression", "text": "exit(1)", "parent": 497, "children": [515, 516], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 11}}, {"id": 515, "type": "identifier", "text": "exit", "parent": 514, "children": [], "start_point": {"row": 106, "column": 4}, "end_point": {"row": 106, "column": 8}}, {"id": 516, "type": "argument_list", "text": "(1)", "parent": 514, "children": [517], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 11}}, {"id": 517, "type": "number_literal", "text": "1", "parent": 516, "children": [], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 10}}, {"id": 518, "type": "function_definition", "text": "void interrupted() {\n fprintf(stderr,\"Interrupted.\\n\");\n if(tn) unlink(tn);\n exit(1);\n}", "parent": null, "children": [519, 520], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 113, "column": 1}}, {"id": 519, "type": "primitive_type", "text": "void", "parent": 518, "children": [], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 4}}, {"id": 520, "type": "function_declarator", "text": "interrupted()", "parent": 518, "children": [521, 522], "start_point": {"row": 109, "column": 5}, "end_point": {"row": 109, "column": 18}}, {"id": 521, "type": "identifier", "text": "interrupted", "parent": 520, "children": [], "start_point": {"row": 109, "column": 5}, "end_point": {"row": 109, "column": 16}}, {"id": 522, "type": "parameter_list", "text": "()", "parent": 520, "children": [], "start_point": {"row": 109, "column": 16}, "end_point": {"row": 109, "column": 18}}, {"id": 523, "type": "call_expression", "text": "fprintf(stderr,\"Interrupted.\\n\")", "parent": 518, "children": [524, 525], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 36}}, {"id": 524, "type": "identifier", "text": "fprintf", "parent": 523, "children": [], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 11}}, {"id": 525, "type": "argument_list", "text": "(stderr,\"Interrupted.\\n\")", "parent": 523, "children": [526, 527], "start_point": {"row": 110, "column": 11}, "end_point": {"row": 110, "column": 36}}, {"id": 526, "type": "identifier", "text": "stderr", "parent": 525, "children": [], "start_point": {"row": 110, "column": 12}, "end_point": {"row": 110, "column": 18}}, {"id": 527, "type": "string_literal", "text": "\"Interrupted.\\n\"", "parent": 525, "children": [528], "start_point": {"row": 110, "column": 19}, "end_point": {"row": 110, "column": 35}}, {"id": 528, "type": "escape_sequence", "text": "\\n", "parent": 527, "children": [], "start_point": {"row": 110, "column": 32}, "end_point": {"row": 110, "column": 34}}, {"id": 529, "type": "if_statement", "text": "if(tn) unlink(tn);", "parent": 518, "children": [530], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 22}}, {"id": 530, "type": "parenthesized_expression", "text": "(tn)", "parent": 529, "children": [531], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 10}}, {"id": 531, "type": "identifier", "text": "tn", "parent": 530, "children": [], "start_point": {"row": 111, "column": 7}, "end_point": {"row": 111, "column": 9}}, {"id": 532, "type": "call_expression", "text": "unlink(tn)", "parent": 529, "children": [533, 534], "start_point": {"row": 111, "column": 11}, "end_point": {"row": 111, "column": 21}}, {"id": 533, "type": "identifier", "text": "unlink", "parent": 532, "children": [], "start_point": {"row": 111, "column": 11}, "end_point": {"row": 111, "column": 17}}, {"id": 534, "type": "argument_list", "text": "(tn)", "parent": 532, "children": [535], "start_point": {"row": 111, "column": 17}, "end_point": {"row": 111, "column": 21}}, {"id": 535, "type": "identifier", "text": "tn", "parent": 534, "children": [], "start_point": {"row": 111, "column": 18}, "end_point": {"row": 111, "column": 20}}, {"id": 536, "type": "call_expression", "text": "exit(1)", "parent": 518, "children": [537, 538], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 11}}, {"id": 537, "type": "identifier", "text": "exit", "parent": 536, "children": [], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 8}}, {"id": 538, "type": "argument_list", "text": "(1)", "parent": 536, "children": [539], "start_point": {"row": 112, "column": 8}, "end_point": {"row": 112, "column": 11}}, {"id": 539, "type": "number_literal", "text": "1", "parent": 538, "children": [], "start_point": {"row": 112, "column": 9}, "end_point": {"row": 112, "column": 10}}, {"id": 540, "type": "function_definition", "text": "int main(int argc, char *argv[]) {\n FILE *tfp,*f;\n char user[MAX_STRING_LEN];\n char line[MAX_STRING_LEN];\n char l[MAX_STRING_LEN];\n char w[MAX_STRING_LEN];\n char command[MAX_STRING_LEN];\n int found;\n\n tn = NULL;\n signal(SIGINT,(void (*)())interrupted);\n if(argc == 4) {\n if(strcmp(argv[1],\"-c\"))\n usage();\n if(!(tfp = fopen(argv[2],\"w\"))) {\n fprintf(stderr,\"Could not open passwd file %s for writing.\\n\",\n argv[2]);\n perror(\"fopen\");\n exit(1);\n }\n printf(\"Adding password for %s.\\n\",argv[3]);\n add_password(argv[3],tfp);\n fclose(tfp);\n exit(0);\n } else if(argc != 3) usage();\n\n tn = tmpnam(NULL);\n if(!(tfp = fopen(tn,\"w\"))) {\n fprintf(stderr,\"Could not open temp file.\\n\");\n exit(1);\n }\n\n if(!(f = fopen(argv[1],\"r\"))) {\n fprintf(stderr,\n \"Could not open passwd file %s for reading.\\n\",argv[1]);\n fprintf(stderr,\"Use -c option to create new one.\\n\");\n exit(1);\n }\n strcpy(user,argv[2]);\n\n found = 0;\n while(!(getline(line,MAX_STRING_LEN,f))) {\n if(found || (line[0] == '#') || (!line[0])) {\n putline(tfp,line);\n continue;\n }\n strcpy(l,line);\n getword(w,l,':');\n if(strcmp(user,w)) {\n putline(tfp,line);\n continue;\n }\n else {\n printf(\"Changing password for user %s\\n\",user);\n add_password(user,tfp);\n found = 1;\n }\n }\n if(!found) {\n printf(\"Adding user %s\\n\",user);\n add_password(user,tfp);\n }\n fclose(f);\n fclose(tfp);\n sprintf(command,\"cp %s %s\",tn,argv[1]);\n system(command);\n unlink(tn);\n\texit(0);\n}", "parent": null, "children": [541, 542], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 183, "column": 1}}, {"id": 541, "type": "primitive_type", "text": "int", "parent": 540, "children": [], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 115, "column": 3}}, {"id": 542, "type": "function_declarator", "text": "main(int argc, char *argv[])", "parent": 540, "children": [543, 544], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 32}}, {"id": 543, "type": "identifier", "text": "main", "parent": 542, "children": [], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 8}}, {"id": 544, "type": "parameter_list", "text": "(int argc, char *argv[])", "parent": 542, "children": [545, 548], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 32}}, {"id": 545, "type": "parameter_declaration", "text": "int argc", "parent": 544, "children": [546, 547], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 17}}, {"id": 546, "type": "primitive_type", "text": "int", "parent": 545, "children": [], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 12}}, {"id": 547, "type": "identifier", "text": "argc", "parent": 545, "children": [], "start_point": {"row": 115, "column": 13}, "end_point": {"row": 115, "column": 17}}, {"id": 548, "type": "parameter_declaration", "text": "char *argv[]", "parent": 544, "children": [549, 550], "start_point": {"row": 115, "column": 19}, "end_point": {"row": 115, "column": 31}}, {"id": 549, "type": "primitive_type", "text": "char", "parent": 548, "children": [], "start_point": {"row": 115, "column": 19}, "end_point": {"row": 115, "column": 23}}, {"id": 550, "type": "pointer_declarator", "text": "*argv[]", "parent": 548, "children": [551, 552], "start_point": {"row": 115, "column": 24}, "end_point": {"row": 115, "column": 31}}, {"id": 551, "type": "*", "text": "*", "parent": 550, "children": [], "start_point": {"row": 115, "column": 24}, "end_point": {"row": 115, "column": 25}}, {"id": 552, "type": "array_declarator", "text": "argv[]", "parent": 550, "children": [553], "start_point": {"row": 115, "column": 25}, "end_point": {"row": 115, "column": 31}}, {"id": 553, "type": "identifier", "text": "argv", "parent": 552, "children": [], "start_point": {"row": 115, "column": 25}, "end_point": {"row": 115, "column": 29}}, {"id": 554, "type": "declaration", "text": "FILE *tfp,*f;", "parent": 540, "children": [555, 556, 559], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 17}}, {"id": 555, "type": "type_identifier", "text": "FILE", "parent": 554, "children": [], "start_point": {"row": 116, "column": 4}, "end_point": {"row": 116, "column": 8}}, {"id": 556, "type": "pointer_declarator", "text": "*tfp", "parent": 554, "children": [557, 558], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 13}}, {"id": 557, "type": "*", "text": "*", "parent": 556, "children": [], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 10}}, {"id": 558, "type": "identifier", "text": "tfp", "parent": 556, "children": [], "start_point": {"row": 116, "column": 10}, "end_point": {"row": 116, "column": 13}}, {"id": 559, "type": "pointer_declarator", "text": "*f", "parent": 554, "children": [560, 561], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 16}}, {"id": 560, "type": "*", "text": "*", "parent": 559, "children": [], "start_point": {"row": 116, "column": 14}, "end_point": {"row": 116, "column": 15}}, {"id": 561, "type": "identifier", "text": "f", "parent": 559, "children": [], "start_point": {"row": 116, "column": 15}, "end_point": {"row": 116, "column": 16}}, {"id": 562, "type": "declaration", "text": "char user[MAX_STRING_LEN];", "parent": 540, "children": [563, 564], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 30}}, {"id": 563, "type": "primitive_type", "text": "char", "parent": 562, "children": [], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 117, "column": 8}}, {"id": 564, "type": "array_declarator", "text": "user[MAX_STRING_LEN]", "parent": 562, "children": [565, 566], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 29}}, {"id": 565, "type": "identifier", "text": "user", "parent": 564, "children": [], "start_point": {"row": 117, "column": 9}, "end_point": {"row": 117, "column": 13}}, {"id": 566, "type": "identifier", "text": "MAX_STRING_LEN", "parent": 564, "children": [], "start_point": {"row": 117, "column": 14}, "end_point": {"row": 117, "column": 28}}, {"id": 567, "type": "declaration", "text": "char line[MAX_STRING_LEN];", "parent": 540, "children": [568, 569], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 30}}, {"id": 568, "type": "primitive_type", "text": "char", "parent": 567, "children": [], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 8}}, {"id": 569, "type": "array_declarator", "text": "line[MAX_STRING_LEN]", "parent": 567, "children": [570, 571], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 29}}, {"id": 570, "type": "identifier", "text": "line", "parent": 569, "children": [], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 13}}, {"id": 571, "type": "identifier", "text": "MAX_STRING_LEN", "parent": 569, "children": [], "start_point": {"row": 118, "column": 14}, "end_point": {"row": 118, "column": 28}}, {"id": 572, "type": "declaration", "text": "char l[MAX_STRING_LEN];", "parent": 540, "children": [573, 574], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 119, "column": 27}}, {"id": 573, "type": "primitive_type", "text": "char", "parent": 572, "children": [], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 119, "column": 8}}, {"id": 574, "type": "array_declarator", "text": "l[MAX_STRING_LEN]", "parent": 572, "children": [575, 576], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 26}}, {"id": 575, "type": "identifier", "text": "l", "parent": 574, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 10}}, {"id": 576, "type": "identifier", "text": "MAX_STRING_LEN", "parent": 574, "children": [], "start_point": {"row": 119, "column": 11}, "end_point": {"row": 119, "column": 25}}, {"id": 577, "type": "declaration", "text": "char w[MAX_STRING_LEN];", "parent": 540, "children": [578, 579], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 27}}, {"id": 578, "type": "primitive_type", "text": "char", "parent": 577, "children": [], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 8}}, {"id": 579, "type": "array_declarator", "text": "w[MAX_STRING_LEN]", "parent": 577, "children": [580, 581], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 26}}, {"id": 580, "type": "identifier", "text": "w", "parent": 579, "children": [], "start_point": {"row": 120, "column": 9}, "end_point": {"row": 120, "column": 10}}, {"id": 581, "type": "identifier", "text": "MAX_STRING_LEN", "parent": 579, "children": [], "start_point": {"row": 120, "column": 11}, "end_point": {"row": 120, "column": 25}}, {"id": 582, "type": "declaration", "text": "char command[MAX_STRING_LEN];", "parent": 540, "children": [583, 584], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 33}}, {"id": 583, "type": "primitive_type", "text": "char", "parent": 582, "children": [], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 121, "column": 8}}, {"id": 584, "type": "array_declarator", "text": "command[MAX_STRING_LEN]", "parent": 582, "children": [585, 586], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 32}}, {"id": 585, "type": "identifier", "text": "command", "parent": 584, "children": [], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 16}}, {"id": 586, "type": "identifier", "text": "MAX_STRING_LEN", "parent": 584, "children": [], "start_point": {"row": 121, "column": 17}, "end_point": {"row": 121, "column": 31}}, {"id": 587, "type": "declaration", "text": "int found;", "parent": 540, "children": [588, 589], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 14}}, {"id": 588, "type": "primitive_type", "text": "int", "parent": 587, "children": [], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 7}}, {"id": 589, "type": "identifier", "text": "found", "parent": 587, "children": [], "start_point": {"row": 122, "column": 8}, "end_point": {"row": 122, "column": 13}}, {"id": 590, "type": "assignment_expression", "text": "tn = NULL", "parent": 540, "children": [591, 592, 593], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 124, "column": 13}}, {"id": 591, "type": "identifier", "text": "tn", "parent": 590, "children": [], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 124, "column": 6}}, {"id": 592, "type": "=", "text": "=", "parent": 590, "children": [], "start_point": {"row": 124, "column": 7}, "end_point": {"row": 124, "column": 8}}, {"id": 593, "type": "null", "text": "NULL", "parent": 590, "children": [594], "start_point": {"row": 124, "column": 9}, "end_point": {"row": 124, "column": 13}}, {"id": 594, "type": "NULL", "text": "NULL", "parent": 593, "children": [], "start_point": {"row": 124, "column": 9}, "end_point": {"row": 124, "column": 13}}, {"id": 595, "type": "call_expression", "text": "signal(SIGINT,(void (*)())interrupted)", "parent": 540, "children": [596, 597], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 42}}, {"id": 596, "type": "identifier", "text": "signal", "parent": 595, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 10}}, {"id": 597, "type": "argument_list", "text": "(SIGINT,(void (*)())interrupted)", "parent": 595, "children": [598, 599], "start_point": {"row": 125, "column": 10}, "end_point": {"row": 125, "column": 42}}, {"id": 598, "type": "identifier", "text": "SIGINT", "parent": 597, "children": [], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 125, "column": 17}}, {"id": 599, "type": "cast_expression", "text": "(void (*)())interrupted", "parent": 597, "children": [600, 607], "start_point": {"row": 125, "column": 18}, "end_point": {"row": 125, "column": 41}}, {"id": 600, "type": "type_descriptor", "text": "void (*)()", "parent": 599, "children": [601, 602], "start_point": {"row": 125, "column": 19}, "end_point": {"row": 125, "column": 29}}, {"id": 601, "type": "primitive_type", "text": "void", "parent": 600, "children": [], "start_point": {"row": 125, "column": 19}, "end_point": {"row": 125, "column": 23}}, {"id": 602, "type": "abstract_function_declarator", "text": "(*)()", "parent": 600, "children": [603, 606], "start_point": {"row": 125, "column": 24}, "end_point": {"row": 125, "column": 29}}, {"id": 603, "type": "abstract_parenthesized_declarator", "text": "(*)", "parent": 602, "children": [604], "start_point": {"row": 125, "column": 24}, "end_point": {"row": 125, "column": 27}}, {"id": 604, "type": "abstract_pointer_declarator", "text": "*", "parent": 603, "children": [605], "start_point": {"row": 125, "column": 25}, "end_point": {"row": 125, "column": 26}}, {"id": 605, "type": "*", "text": "*", "parent": 604, "children": [], "start_point": {"row": 125, "column": 25}, "end_point": {"row": 125, "column": 26}}, {"id": 606, "type": "parameter_list", "text": "()", "parent": 602, "children": [], "start_point": {"row": 125, "column": 27}, "end_point": {"row": 125, "column": 29}}, {"id": 607, "type": "identifier", "text": "interrupted", "parent": 599, "children": [], "start_point": {"row": 125, "column": 30}, "end_point": {"row": 125, "column": 41}}, {"id": 608, "type": "if_statement", "text": "if(argc == 4) {\n if(strcmp(argv[1],\"-c\"))\n usage();\n if(!(tfp = fopen(argv[2],\"w\"))) {\n fprintf(stderr,\"Could not open passwd file %s for writing.\\n\",\n argv[2]);\n perror(\"fopen\");\n exit(1);\n }\n printf(\"Adding password for %s.\\n\",argv[3]);\n add_password(argv[3],tfp);\n fclose(tfp);\n exit(0);\n } else if(argc != 3) usage();", "parent": 540, "children": [609, 681], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 139, "column": 33}}, {"id": 609, "type": "parenthesized_expression", "text": "(argc == 4)", "parent": 608, "children": [610], "start_point": {"row": 126, "column": 6}, "end_point": {"row": 126, "column": 17}}, {"id": 610, "type": "binary_expression", "text": "argc == 4", "parent": 609, "children": [611, 612, 613], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 16}}, {"id": 611, "type": "identifier", "text": "argc", "parent": 610, "children": [], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 11}}, {"id": 612, "type": "==", "text": "==", "parent": 610, "children": [], "start_point": {"row": 126, "column": 12}, "end_point": {"row": 126, "column": 14}}, {"id": 613, "type": "number_literal", "text": "4", "parent": 610, "children": [], "start_point": {"row": 126, "column": 15}, "end_point": {"row": 126, "column": 16}}, {"id": 614, "type": "if_statement", "text": "if(strcmp(argv[1],\"-c\"))\n usage();", "parent": 608, "children": [615], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 128, "column": 20}}, {"id": 615, "type": "parenthesized_expression", "text": "(strcmp(argv[1],\"-c\"))", "parent": 614, "children": [616], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 32}}, {"id": 616, "type": "call_expression", "text": "strcmp(argv[1],\"-c\")", "parent": 615, "children": [617, 618], "start_point": {"row": 127, "column": 11}, "end_point": {"row": 127, "column": 31}}, {"id": 617, "type": "identifier", "text": "strcmp", "parent": 616, "children": [], "start_point": {"row": 127, "column": 11}, "end_point": {"row": 127, "column": 17}}, {"id": 618, "type": "argument_list", "text": "(argv[1],\"-c\")", "parent": 616, "children": [619, 622], "start_point": {"row": 127, "column": 17}, "end_point": {"row": 127, "column": 31}}, {"id": 619, "type": "subscript_expression", "text": "argv[1]", "parent": 618, "children": [620, 621], "start_point": {"row": 127, "column": 18}, "end_point": {"row": 127, "column": 25}}, {"id": 620, "type": "identifier", "text": "argv", "parent": 619, "children": [], "start_point": {"row": 127, "column": 18}, "end_point": {"row": 127, "column": 22}}, {"id": 621, "type": "number_literal", "text": "1", "parent": 619, "children": [], "start_point": {"row": 127, "column": 23}, "end_point": {"row": 127, "column": 24}}, {"id": 622, "type": "string_literal", "text": "\"-c\"", "parent": 618, "children": [], "start_point": {"row": 127, "column": 26}, "end_point": {"row": 127, "column": 30}}, {"id": 623, "type": "call_expression", "text": "usage()", "parent": 614, "children": [624, 625], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 128, "column": 19}}, {"id": 624, "type": "identifier", "text": "usage", "parent": 623, "children": [], "start_point": {"row": 128, "column": 12}, "end_point": {"row": 128, "column": 17}}, {"id": 625, "type": "argument_list", "text": "()", "parent": 623, "children": [], "start_point": {"row": 128, "column": 17}, "end_point": {"row": 128, "column": 19}}, {"id": 626, "type": "if_statement", "text": "if(!(tfp = fopen(argv[2],\"w\"))) {\n fprintf(stderr,\"Could not open passwd file %s for writing.\\n\",\n argv[2]);\n perror(\"fopen\");\n exit(1);\n }", "parent": 608, "children": [627], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 134, "column": 9}}, {"id": 627, "type": "parenthesized_expression", "text": "(!(tfp = fopen(argv[2],\"w\")))", "parent": 626, "children": [628], "start_point": {"row": 129, "column": 10}, "end_point": {"row": 129, "column": 39}}, {"id": 628, "type": "unary_expression", "text": "!(tfp = fopen(argv[2],\"w\"))", "parent": 627, "children": [629, 630], "start_point": {"row": 129, "column": 11}, "end_point": {"row": 129, "column": 38}}, {"id": 629, "type": "!", "text": "!", "parent": 628, "children": [], "start_point": {"row": 129, "column": 11}, "end_point": {"row": 129, "column": 12}}, {"id": 630, "type": "parenthesized_expression", "text": "(tfp = fopen(argv[2],\"w\"))", "parent": 628, "children": [631], "start_point": {"row": 129, "column": 12}, "end_point": {"row": 129, "column": 38}}, {"id": 631, "type": "assignment_expression", "text": "tfp = fopen(argv[2],\"w\")", "parent": 630, "children": [632, 633, 634], "start_point": {"row": 129, "column": 13}, "end_point": {"row": 129, "column": 37}}, {"id": 632, "type": "identifier", "text": "tfp", "parent": 631, "children": [], "start_point": {"row": 129, "column": 13}, "end_point": {"row": 129, "column": 16}}, {"id": 633, "type": "=", "text": "=", "parent": 631, "children": [], "start_point": {"row": 129, "column": 17}, "end_point": {"row": 129, "column": 18}}, {"id": 634, "type": "call_expression", "text": "fopen(argv[2],\"w\")", "parent": 631, "children": [635, 636], "start_point": {"row": 129, "column": 19}, "end_point": {"row": 129, "column": 37}}, {"id": 635, "type": "identifier", "text": "fopen", "parent": 634, "children": [], "start_point": {"row": 129, "column": 19}, "end_point": {"row": 129, "column": 24}}, {"id": 636, "type": "argument_list", "text": "(argv[2],\"w\")", "parent": 634, "children": [637, 640], "start_point": {"row": 129, "column": 24}, "end_point": {"row": 129, "column": 37}}, {"id": 637, "type": "subscript_expression", "text": "argv[2]", "parent": 636, "children": [638, 639], "start_point": {"row": 129, "column": 25}, "end_point": {"row": 129, "column": 32}}, {"id": 638, "type": "identifier", "text": "argv", "parent": 637, "children": [], "start_point": {"row": 129, "column": 25}, "end_point": {"row": 129, "column": 29}}, {"id": 639, "type": "number_literal", "text": "2", "parent": 637, "children": [], "start_point": {"row": 129, "column": 30}, "end_point": {"row": 129, "column": 31}}, {"id": 640, "type": "string_literal", "text": "\"w\"", "parent": 636, "children": [], "start_point": {"row": 129, "column": 33}, "end_point": {"row": 129, "column": 36}}, {"id": 641, "type": "call_expression", "text": "fprintf(stderr,\"Could not open passwd file %s for writing.\\n\",\n argv[2])", "parent": 626, "children": [642, 643], "start_point": {"row": 130, "column": 12}, "end_point": {"row": 131, "column": 28}}, {"id": 642, "type": "identifier", "text": "fprintf", "parent": 641, "children": [], "start_point": {"row": 130, "column": 12}, "end_point": {"row": 130, "column": 19}}, {"id": 643, "type": "argument_list", "text": "(stderr,\"Could not open passwd file %s for writing.\\n\",\n argv[2])", "parent": 641, "children": [644, 645, 647], "start_point": {"row": 130, "column": 19}, "end_point": {"row": 131, "column": 28}}, {"id": 644, "type": "identifier", "text": "stderr", "parent": 643, "children": [], "start_point": {"row": 130, "column": 20}, "end_point": {"row": 130, "column": 26}}, {"id": 645, "type": "string_literal", "text": "\"Could not open passwd file %s for writing.\\n\"", "parent": 643, "children": [646], "start_point": {"row": 130, "column": 27}, "end_point": {"row": 130, "column": 73}}, {"id": 646, "type": "escape_sequence", "text": "\\n", "parent": 645, "children": [], "start_point": {"row": 130, "column": 70}, "end_point": {"row": 130, "column": 72}}, {"id": 647, "type": "subscript_expression", "text": "argv[2]", "parent": 643, "children": [648, 649], "start_point": {"row": 131, "column": 20}, "end_point": {"row": 131, "column": 27}}, {"id": 648, "type": "identifier", "text": "argv", "parent": 647, "children": [], "start_point": {"row": 131, "column": 20}, "end_point": {"row": 131, "column": 24}}, {"id": 649, "type": "number_literal", "text": "2", "parent": 647, "children": [], "start_point": {"row": 131, "column": 25}, "end_point": {"row": 131, "column": 26}}, {"id": 650, "type": "call_expression", "text": "perror(\"fopen\")", "parent": 626, "children": [651, 652], "start_point": {"row": 132, "column": 12}, "end_point": {"row": 132, "column": 27}}, {"id": 651, "type": "identifier", "text": "perror", "parent": 650, "children": [], "start_point": {"row": 132, "column": 12}, "end_point": {"row": 132, "column": 18}}, {"id": 652, "type": "argument_list", "text": "(\"fopen\")", "parent": 650, "children": [653], "start_point": {"row": 132, "column": 18}, "end_point": {"row": 132, "column": 27}}, {"id": 653, "type": "string_literal", "text": "\"fopen\"", "parent": 652, "children": [], "start_point": {"row": 132, "column": 19}, "end_point": {"row": 132, "column": 26}}, {"id": 654, "type": "call_expression", "text": "exit(1)", "parent": 626, "children": [655, 656], "start_point": {"row": 133, "column": 12}, "end_point": {"row": 133, "column": 19}}, {"id": 655, "type": "identifier", "text": "exit", "parent": 654, "children": [], "start_point": {"row": 133, "column": 12}, "end_point": {"row": 133, "column": 16}}, {"id": 656, "type": "argument_list", "text": "(1)", "parent": 654, "children": [657], "start_point": {"row": 133, "column": 16}, "end_point": {"row": 133, "column": 19}}, {"id": 657, "type": "number_literal", "text": "1", "parent": 656, "children": [], "start_point": {"row": 133, "column": 17}, "end_point": {"row": 133, "column": 18}}, {"id": 658, "type": "call_expression", "text": "printf(\"Adding password for %s.\\n\",argv[3])", "parent": 608, "children": [659, 660], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 51}}, {"id": 659, "type": "identifier", "text": "printf", "parent": 658, "children": [], "start_point": {"row": 135, "column": 8}, "end_point": {"row": 135, "column": 14}}, {"id": 660, "type": "argument_list", "text": "(\"Adding password for %s.\\n\",argv[3])", "parent": 658, "children": [661, 663], "start_point": {"row": 135, "column": 14}, "end_point": {"row": 135, "column": 51}}, {"id": 661, "type": "string_literal", "text": "\"Adding password for %s.\\n\"", "parent": 660, "children": [662], "start_point": {"row": 135, "column": 15}, "end_point": {"row": 135, "column": 42}}, {"id": 662, "type": "escape_sequence", "text": "\\n", "parent": 661, "children": [], "start_point": {"row": 135, "column": 39}, "end_point": {"row": 135, "column": 41}}, {"id": 663, "type": "subscript_expression", "text": "argv[3]", "parent": 660, "children": [664, 665], "start_point": {"row": 135, "column": 43}, "end_point": {"row": 135, "column": 50}}, {"id": 664, "type": "identifier", "text": "argv", "parent": 663, "children": [], "start_point": {"row": 135, "column": 43}, "end_point": {"row": 135, "column": 47}}, {"id": 665, "type": "number_literal", "text": "3", "parent": 663, "children": [], "start_point": {"row": 135, "column": 48}, "end_point": {"row": 135, "column": 49}}, {"id": 666, "type": "call_expression", "text": "add_password(argv[3],tfp)", "parent": 608, "children": [667, 668], "start_point": {"row": 136, "column": 8}, "end_point": {"row": 136, "column": 33}}, {"id": 667, "type": "identifier", "text": "add_password", "parent": 666, "children": [], "start_point": {"row": 136, "column": 8}, "end_point": {"row": 136, "column": 20}}, {"id": 668, "type": "argument_list", "text": "(argv[3],tfp)", "parent": 666, "children": [669, 672], "start_point": {"row": 136, "column": 20}, "end_point": {"row": 136, "column": 33}}, {"id": 669, "type": "subscript_expression", "text": "argv[3]", "parent": 668, "children": [670, 671], "start_point": {"row": 136, "column": 21}, "end_point": {"row": 136, "column": 28}}, {"id": 670, "type": "identifier", "text": "argv", "parent": 669, "children": [], "start_point": {"row": 136, "column": 21}, "end_point": {"row": 136, "column": 25}}, {"id": 671, "type": "number_literal", "text": "3", "parent": 669, "children": [], "start_point": {"row": 136, "column": 26}, "end_point": {"row": 136, "column": 27}}, {"id": 672, "type": "identifier", "text": "tfp", "parent": 668, "children": [], "start_point": {"row": 136, "column": 29}, "end_point": {"row": 136, "column": 32}}, {"id": 673, "type": "call_expression", "text": "fclose(tfp)", "parent": 608, "children": [674, 675], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 19}}, {"id": 674, "type": "identifier", "text": "fclose", "parent": 673, "children": [], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 14}}, {"id": 675, "type": "argument_list", "text": "(tfp)", "parent": 673, "children": [676], "start_point": {"row": 137, "column": 14}, "end_point": {"row": 137, "column": 19}}, {"id": 676, "type": "identifier", "text": "tfp", "parent": 675, "children": [], "start_point": {"row": 137, "column": 15}, "end_point": {"row": 137, "column": 18}}, {"id": 677, "type": "call_expression", "text": "exit(0)", "parent": 608, "children": [678, 679], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 15}}, {"id": 678, "type": "identifier", "text": "exit", "parent": 677, "children": [], "start_point": {"row": 138, "column": 8}, "end_point": {"row": 138, "column": 12}}, {"id": 679, "type": "argument_list", "text": "(0)", "parent": 677, "children": [680], "start_point": {"row": 138, "column": 12}, "end_point": {"row": 138, "column": 15}}, {"id": 680, "type": "number_literal", "text": "0", "parent": 679, "children": [], "start_point": {"row": 138, "column": 13}, "end_point": {"row": 138, "column": 14}}, {"id": 681, "type": "else_clause", "text": "else if(argc != 3) usage();", "parent": 608, "children": [682], "start_point": {"row": 139, "column": 6}, "end_point": {"row": 139, "column": 33}}, {"id": 682, "type": "if_statement", "text": "if(argc != 3) usage();", "parent": 681, "children": [683], "start_point": {"row": 139, "column": 11}, "end_point": {"row": 139, "column": 33}}, {"id": 683, "type": "parenthesized_expression", "text": "(argc != 3)", "parent": 682, "children": [684], "start_point": {"row": 139, "column": 13}, "end_point": {"row": 139, "column": 24}}, {"id": 684, "type": "binary_expression", "text": "argc != 3", "parent": 683, "children": [685, 686, 687], "start_point": {"row": 139, "column": 14}, "end_point": {"row": 139, "column": 23}}, {"id": 685, "type": "identifier", "text": "argc", "parent": 684, "children": [], "start_point": {"row": 139, "column": 14}, "end_point": {"row": 139, "column": 18}}, {"id": 686, "type": "!=", "text": "!=", "parent": 684, "children": [], "start_point": {"row": 139, "column": 19}, "end_point": {"row": 139, "column": 21}}, {"id": 687, "type": "number_literal", "text": "3", "parent": 684, "children": [], "start_point": {"row": 139, "column": 22}, "end_point": {"row": 139, "column": 23}}, {"id": 688, "type": "call_expression", "text": "usage()", "parent": 682, "children": [689, 690], "start_point": {"row": 139, "column": 25}, "end_point": {"row": 139, "column": 32}}, {"id": 689, "type": "identifier", "text": "usage", "parent": 688, "children": [], "start_point": {"row": 139, "column": 25}, "end_point": {"row": 139, "column": 30}}, {"id": 690, "type": "argument_list", "text": "()", "parent": 688, "children": [], "start_point": {"row": 139, "column": 30}, "end_point": {"row": 139, "column": 32}}, {"id": 691, "type": "assignment_expression", "text": "tn = tmpnam(NULL)", "parent": 540, "children": [692, 693, 694], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 21}}, {"id": 692, "type": "identifier", "text": "tn", "parent": 691, "children": [], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 6}}, {"id": 693, "type": "=", "text": "=", "parent": 691, "children": [], "start_point": {"row": 141, "column": 7}, "end_point": {"row": 141, "column": 8}}, {"id": 694, "type": "call_expression", "text": "tmpnam(NULL)", "parent": 691, "children": [695, 696], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 21}}, {"id": 695, "type": "identifier", "text": "tmpnam", "parent": 694, "children": [], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 15}}, {"id": 696, "type": "argument_list", "text": "(NULL)", "parent": 694, "children": [697], "start_point": {"row": 141, "column": 15}, "end_point": {"row": 141, "column": 21}}, {"id": 697, "type": "null", "text": "NULL", "parent": 696, "children": [698], "start_point": {"row": 141, "column": 16}, "end_point": {"row": 141, "column": 20}}, {"id": 698, "type": "NULL", "text": "NULL", "parent": 697, "children": [], "start_point": {"row": 141, "column": 16}, "end_point": {"row": 141, "column": 20}}, {"id": 699, "type": "if_statement", "text": "if(!(tfp = fopen(tn,\"w\"))) {\n fprintf(stderr,\"Could not open temp file.\\n\");\n exit(1);\n }", "parent": 540, "children": [700], "start_point": {"row": 142, "column": 4}, "end_point": {"row": 145, "column": 5}}, {"id": 700, "type": "parenthesized_expression", "text": "(!(tfp = fopen(tn,\"w\")))", "parent": 699, "children": [701], "start_point": {"row": 142, "column": 6}, "end_point": {"row": 142, "column": 30}}, {"id": 701, "type": "unary_expression", "text": "!(tfp = fopen(tn,\"w\"))", "parent": 700, "children": [702, 703], "start_point": {"row": 142, "column": 7}, "end_point": {"row": 142, "column": 29}}, {"id": 702, "type": "!", "text": "!", "parent": 701, "children": [], "start_point": {"row": 142, "column": 7}, "end_point": {"row": 142, "column": 8}}, {"id": 703, "type": "parenthesized_expression", "text": "(tfp = fopen(tn,\"w\"))", "parent": 701, "children": [704], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 29}}, {"id": 704, "type": "assignment_expression", "text": "tfp = fopen(tn,\"w\")", "parent": 703, "children": [705, 706, 707], "start_point": {"row": 142, "column": 9}, "end_point": {"row": 142, "column": 28}}, {"id": 705, "type": "identifier", "text": "tfp", "parent": 704, "children": [], "start_point": {"row": 142, "column": 9}, "end_point": {"row": 142, "column": 12}}, {"id": 706, "type": "=", "text": "=", "parent": 704, "children": [], "start_point": {"row": 142, "column": 13}, "end_point": {"row": 142, "column": 14}}, {"id": 707, "type": "call_expression", "text": "fopen(tn,\"w\")", "parent": 704, "children": [708, 709], "start_point": {"row": 142, "column": 15}, "end_point": {"row": 142, "column": 28}}, {"id": 708, "type": "identifier", "text": "fopen", "parent": 707, "children": [], "start_point": {"row": 142, "column": 15}, "end_point": {"row": 142, "column": 20}}, {"id": 709, "type": "argument_list", "text": "(tn,\"w\")", "parent": 707, "children": [710, 711], "start_point": {"row": 142, "column": 20}, "end_point": {"row": 142, "column": 28}}, {"id": 710, "type": "identifier", "text": "tn", "parent": 709, "children": [], "start_point": {"row": 142, "column": 21}, "end_point": {"row": 142, "column": 23}}, {"id": 711, "type": "string_literal", "text": "\"w\"", "parent": 709, "children": [], "start_point": {"row": 142, "column": 24}, "end_point": {"row": 142, "column": 27}}, {"id": 712, "type": "call_expression", "text": "fprintf(stderr,\"Could not open temp file.\\n\")", "parent": 699, "children": [713, 714], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 53}}, {"id": 713, "type": "identifier", "text": "fprintf", "parent": 712, "children": [], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 15}}, {"id": 714, "type": "argument_list", "text": "(stderr,\"Could not open temp file.\\n\")", "parent": 712, "children": [715, 716], "start_point": {"row": 143, "column": 15}, "end_point": {"row": 143, "column": 53}}, {"id": 715, "type": "identifier", "text": "stderr", "parent": 714, "children": [], "start_point": {"row": 143, "column": 16}, "end_point": {"row": 143, "column": 22}}, {"id": 716, "type": "string_literal", "text": "\"Could not open temp file.\\n\"", "parent": 714, "children": [717], "start_point": {"row": 143, "column": 23}, "end_point": {"row": 143, "column": 52}}, {"id": 717, "type": "escape_sequence", "text": "\\n", "parent": 716, "children": [], "start_point": {"row": 143, "column": 49}, "end_point": {"row": 143, "column": 51}}, {"id": 718, "type": "call_expression", "text": "exit(1)", "parent": 699, "children": [719, 720], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 15}}, {"id": 719, "type": "identifier", "text": "exit", "parent": 718, "children": [], "start_point": {"row": 144, "column": 8}, "end_point": {"row": 144, "column": 12}}, {"id": 720, "type": "argument_list", "text": "(1)", "parent": 718, "children": [721], "start_point": {"row": 144, "column": 12}, "end_point": {"row": 144, "column": 15}}, {"id": 721, "type": "number_literal", "text": "1", "parent": 720, "children": [], "start_point": {"row": 144, "column": 13}, "end_point": {"row": 144, "column": 14}}, {"id": 722, "type": "if_statement", "text": "if(!(f = fopen(argv[1],\"r\"))) {\n fprintf(stderr,\n \"Could not open passwd file %s for reading.\\n\",argv[1]);\n fprintf(stderr,\"Use -c option to create new one.\\n\");\n exit(1);\n }", "parent": 540, "children": [723], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 152, "column": 5}}, {"id": 723, "type": "parenthesized_expression", "text": "(!(f = fopen(argv[1],\"r\")))", "parent": 722, "children": [724], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 33}}, {"id": 724, "type": "unary_expression", "text": "!(f = fopen(argv[1],\"r\"))", "parent": 723, "children": [725, 726], "start_point": {"row": 147, "column": 7}, "end_point": {"row": 147, "column": 32}}, {"id": 725, "type": "!", "text": "!", "parent": 724, "children": [], "start_point": {"row": 147, "column": 7}, "end_point": {"row": 147, "column": 8}}, {"id": 726, "type": "parenthesized_expression", "text": "(f = fopen(argv[1],\"r\"))", "parent": 724, "children": [727], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 32}}, {"id": 727, "type": "assignment_expression", "text": "f = fopen(argv[1],\"r\")", "parent": 726, "children": [728, 729, 730], "start_point": {"row": 147, "column": 9}, "end_point": {"row": 147, "column": 31}}, {"id": 728, "type": "identifier", "text": "f", "parent": 727, "children": [], "start_point": {"row": 147, "column": 9}, "end_point": {"row": 147, "column": 10}}, {"id": 729, "type": "=", "text": "=", "parent": 727, "children": [], "start_point": {"row": 147, "column": 11}, "end_point": {"row": 147, "column": 12}}, {"id": 730, "type": "call_expression", "text": "fopen(argv[1],\"r\")", "parent": 727, "children": [731, 732], "start_point": {"row": 147, "column": 13}, "end_point": {"row": 147, "column": 31}}, {"id": 731, "type": "identifier", "text": "fopen", "parent": 730, "children": [], "start_point": {"row": 147, "column": 13}, "end_point": {"row": 147, "column": 18}}, {"id": 732, "type": "argument_list", "text": "(argv[1],\"r\")", "parent": 730, "children": [733, 736], "start_point": {"row": 147, "column": 18}, "end_point": {"row": 147, "column": 31}}, {"id": 733, "type": "subscript_expression", "text": "argv[1]", "parent": 732, "children": [734, 735], "start_point": {"row": 147, "column": 19}, "end_point": {"row": 147, "column": 26}}, {"id": 734, "type": "identifier", "text": "argv", "parent": 733, "children": [], "start_point": {"row": 147, "column": 19}, "end_point": {"row": 147, "column": 23}}, {"id": 735, "type": "number_literal", "text": "1", "parent": 733, "children": [], "start_point": {"row": 147, "column": 24}, "end_point": {"row": 147, "column": 25}}, {"id": 736, "type": "string_literal", "text": "\"r\"", "parent": 732, "children": [], "start_point": {"row": 147, "column": 27}, "end_point": {"row": 147, "column": 30}}, {"id": 737, "type": "call_expression", "text": "fprintf(stderr,\n \"Could not open passwd file %s for reading.\\n\",argv[1])", "parent": 722, "children": [738, 739], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 149, "column": 71}}, {"id": 738, "type": "identifier", "text": "fprintf", "parent": 737, "children": [], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 15}}, {"id": 739, "type": "argument_list", "text": "(stderr,\n \"Could not open passwd file %s for reading.\\n\",argv[1])", "parent": 737, "children": [740, 741, 743], "start_point": {"row": 148, "column": 15}, "end_point": {"row": 149, "column": 71}}, {"id": 740, "type": "identifier", "text": "stderr", "parent": 739, "children": [], "start_point": {"row": 148, "column": 16}, "end_point": {"row": 148, "column": 22}}, {"id": 741, "type": "string_literal", "text": "\"Could not open passwd file %s for reading.\\n\"", "parent": 739, "children": [742], "start_point": {"row": 149, "column": 16}, "end_point": {"row": 149, "column": 62}}, {"id": 742, "type": "escape_sequence", "text": "\\n", "parent": 741, "children": [], "start_point": {"row": 149, "column": 59}, "end_point": {"row": 149, "column": 61}}, {"id": 743, "type": "subscript_expression", "text": "argv[1]", "parent": 739, "children": [744, 745], "start_point": {"row": 149, "column": 63}, "end_point": {"row": 149, "column": 70}}, {"id": 744, "type": "identifier", "text": "argv", "parent": 743, "children": [], "start_point": {"row": 149, "column": 63}, "end_point": {"row": 149, "column": 67}}, {"id": 745, "type": "number_literal", "text": "1", "parent": 743, "children": [], "start_point": {"row": 149, "column": 68}, "end_point": {"row": 149, "column": 69}}, {"id": 746, "type": "call_expression", "text": "fprintf(stderr,\"Use -c option to create new one.\\n\")", "parent": 722, "children": [747, 748], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 60}}, {"id": 747, "type": "identifier", "text": "fprintf", "parent": 746, "children": [], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 15}}, {"id": 748, "type": "argument_list", "text": "(stderr,\"Use -c option to create new one.\\n\")", "parent": 746, "children": [749, 750], "start_point": {"row": 150, "column": 15}, "end_point": {"row": 150, "column": 60}}, {"id": 749, "type": "identifier", "text": "stderr", "parent": 748, "children": [], "start_point": {"row": 150, "column": 16}, "end_point": {"row": 150, "column": 22}}, {"id": 750, "type": "string_literal", "text": "\"Use -c option to create new one.\\n\"", "parent": 748, "children": [751], "start_point": {"row": 150, "column": 23}, "end_point": {"row": 150, "column": 59}}, {"id": 751, "type": "escape_sequence", "text": "\\n", "parent": 750, "children": [], "start_point": {"row": 150, "column": 56}, "end_point": {"row": 150, "column": 58}}, {"id": 752, "type": "call_expression", "text": "exit(1)", "parent": 722, "children": [753, 754], "start_point": {"row": 151, "column": 8}, "end_point": {"row": 151, "column": 15}}, {"id": 753, "type": "identifier", "text": "exit", "parent": 752, "children": [], "start_point": {"row": 151, "column": 8}, "end_point": {"row": 151, "column": 12}}, {"id": 754, "type": "argument_list", "text": "(1)", "parent": 752, "children": [755], "start_point": {"row": 151, "column": 12}, "end_point": {"row": 151, "column": 15}}, {"id": 755, "type": "number_literal", "text": "1", "parent": 754, "children": [], "start_point": {"row": 151, "column": 13}, "end_point": {"row": 151, "column": 14}}, {"id": 756, "type": "call_expression", "text": "strcpy(user,argv[2])", "parent": 540, "children": [757, 758], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 153, "column": 24}}, {"id": 757, "type": "identifier", "text": "strcpy", "parent": 756, "children": [], "start_point": {"row": 153, "column": 4}, "end_point": {"row": 153, "column": 10}}, {"id": 758, "type": "argument_list", "text": "(user,argv[2])", "parent": 756, "children": [759, 760], "start_point": {"row": 153, "column": 10}, "end_point": {"row": 153, "column": 24}}, {"id": 759, "type": "identifier", "text": "user", "parent": 758, "children": [], "start_point": {"row": 153, "column": 11}, "end_point": {"row": 153, "column": 15}}, {"id": 760, "type": "subscript_expression", "text": "argv[2]", "parent": 758, "children": [761, 762], "start_point": {"row": 153, "column": 16}, "end_point": {"row": 153, "column": 23}}, {"id": 761, "type": "identifier", "text": "argv", "parent": 760, "children": [], "start_point": {"row": 153, "column": 16}, "end_point": {"row": 153, "column": 20}}, {"id": 762, "type": "number_literal", "text": "2", "parent": 760, "children": [], "start_point": {"row": 153, "column": 21}, "end_point": {"row": 153, "column": 22}}, {"id": 763, "type": "assignment_expression", "text": "found = 0", "parent": 540, "children": [764, 765, 766], "start_point": {"row": 155, "column": 4}, "end_point": {"row": 155, "column": 13}}, {"id": 764, "type": "identifier", "text": "found", "parent": 763, "children": [], "start_point": {"row": 155, "column": 4}, "end_point": {"row": 155, "column": 9}}, {"id": 765, "type": "=", "text": "=", "parent": 763, "children": [], "start_point": {"row": 155, "column": 10}, "end_point": {"row": 155, "column": 11}}, {"id": 766, "type": "number_literal", "text": "0", "parent": 763, "children": [], "start_point": {"row": 155, "column": 12}, "end_point": {"row": 155, "column": 13}}, {"id": 767, "type": "while_statement", "text": "while(!(getline(line,MAX_STRING_LEN,f))) {\n if(found || (line[0] == '#') || (!line[0])) {\n putline(tfp,line);\n continue;\n }\n strcpy(l,line);\n getword(w,l,':');\n if(strcmp(user,w)) {\n putline(tfp,line);\n continue;\n }\n else {\n printf(\"Changing password for user %s\\n\",user);\n add_password(user,tfp);\n found = 1;\n }\n }", "parent": 540, "children": [768], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 172, "column": 5}}, {"id": 768, "type": "parenthesized_expression", "text": "(!(getline(line,MAX_STRING_LEN,f)))", "parent": 767, "children": [769], "start_point": {"row": 156, "column": 9}, "end_point": {"row": 156, "column": 44}}, {"id": 769, "type": "unary_expression", "text": "!(getline(line,MAX_STRING_LEN,f))", "parent": 768, "children": [770, 771], "start_point": {"row": 156, "column": 10}, "end_point": {"row": 156, "column": 43}}, {"id": 770, "type": "!", "text": "!", "parent": 769, "children": [], "start_point": {"row": 156, "column": 10}, "end_point": {"row": 156, "column": 11}}, {"id": 771, "type": "parenthesized_expression", "text": "(getline(line,MAX_STRING_LEN,f))", "parent": 769, "children": [772], "start_point": {"row": 156, "column": 11}, "end_point": {"row": 156, "column": 43}}, {"id": 772, "type": "call_expression", "text": "getline(line,MAX_STRING_LEN,f)", "parent": 771, "children": [773, 774], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 156, "column": 42}}, {"id": 773, "type": "identifier", "text": "getline", "parent": 772, "children": [], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 156, "column": 19}}, {"id": 774, "type": "argument_list", "text": "(line,MAX_STRING_LEN,f)", "parent": 772, "children": [775, 776, 777], "start_point": {"row": 156, "column": 19}, "end_point": {"row": 156, "column": 42}}, {"id": 775, "type": "identifier", "text": "line", "parent": 774, "children": [], "start_point": {"row": 156, "column": 20}, "end_point": {"row": 156, "column": 24}}, {"id": 776, "type": "identifier", "text": "MAX_STRING_LEN", "parent": 774, "children": [], "start_point": {"row": 156, "column": 25}, "end_point": {"row": 156, "column": 39}}, {"id": 777, "type": "identifier", "text": "f", "parent": 774, "children": [], "start_point": {"row": 156, "column": 40}, "end_point": {"row": 156, "column": 41}}, {"id": 778, "type": "if_statement", "text": "if(found || (line[0] == '#') || (!line[0])) {\n putline(tfp,line);\n continue;\n }", "parent": 767, "children": [779], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 160, "column": 9}}, {"id": 779, "type": "parenthesized_expression", "text": "(found || (line[0] == '#') || (!line[0]))", "parent": 778, "children": [780], "start_point": {"row": 157, "column": 10}, "end_point": {"row": 157, "column": 51}}, {"id": 780, "type": "binary_expression", "text": "found || (line[0] == '#') || (!line[0])", "parent": 779, "children": [781, 794, 795], "start_point": {"row": 157, "column": 11}, "end_point": {"row": 157, "column": 50}}, {"id": 781, "type": "binary_expression", "text": "found || (line[0] == '#')", "parent": 780, "children": [782, 783, 784], "start_point": {"row": 157, "column": 11}, "end_point": {"row": 157, "column": 36}}, {"id": 782, "type": "identifier", "text": "found", "parent": 781, "children": [], "start_point": {"row": 157, "column": 11}, "end_point": {"row": 157, "column": 16}}, {"id": 783, "type": "||", "text": "||", "parent": 781, "children": [], "start_point": {"row": 157, "column": 17}, "end_point": {"row": 157, "column": 19}}, {"id": 784, "type": "parenthesized_expression", "text": "(line[0] == '#')", "parent": 781, "children": [785], "start_point": {"row": 157, "column": 20}, "end_point": {"row": 157, "column": 36}}, {"id": 785, "type": "binary_expression", "text": "line[0] == '#'", "parent": 784, "children": [786, 789, 790], "start_point": {"row": 157, "column": 21}, "end_point": {"row": 157, "column": 35}}, {"id": 786, "type": "subscript_expression", "text": "line[0]", "parent": 785, "children": [787, 788], "start_point": {"row": 157, "column": 21}, "end_point": {"row": 157, "column": 28}}, {"id": 787, "type": "identifier", "text": "line", "parent": 786, "children": [], "start_point": {"row": 157, "column": 21}, "end_point": {"row": 157, "column": 25}}, {"id": 788, "type": "number_literal", "text": "0", "parent": 786, "children": [], "start_point": {"row": 157, "column": 26}, "end_point": {"row": 157, "column": 27}}, {"id": 789, "type": "==", "text": "==", "parent": 785, "children": [], "start_point": {"row": 157, "column": 29}, "end_point": {"row": 157, "column": 31}}, {"id": 790, "type": "char_literal", "text": "'#'", "parent": 785, "children": [791, 792, 793], "start_point": {"row": 157, "column": 32}, "end_point": {"row": 157, "column": 35}}, {"id": 791, "type": "'", "text": "'", "parent": 790, "children": [], "start_point": {"row": 157, "column": 32}, "end_point": {"row": 157, "column": 33}}, {"id": 792, "type": "character", "text": "#", "parent": 790, "children": [], "start_point": {"row": 157, "column": 33}, "end_point": {"row": 157, "column": 34}}, {"id": 793, "type": "'", "text": "'", "parent": 790, "children": [], "start_point": {"row": 157, "column": 34}, "end_point": {"row": 157, "column": 35}}, {"id": 794, "type": "||", "text": "||", "parent": 780, "children": [], "start_point": {"row": 157, "column": 37}, "end_point": {"row": 157, "column": 39}}, {"id": 795, "type": "parenthesized_expression", "text": "(!line[0])", "parent": 780, "children": [796], "start_point": {"row": 157, "column": 40}, "end_point": {"row": 157, "column": 50}}, {"id": 796, "type": "unary_expression", "text": "!line[0]", "parent": 795, "children": [797, 798], "start_point": {"row": 157, "column": 41}, "end_point": {"row": 157, "column": 49}}, {"id": 797, "type": "!", "text": "!", "parent": 796, "children": [], "start_point": {"row": 157, "column": 41}, "end_point": {"row": 157, "column": 42}}, {"id": 798, "type": "subscript_expression", "text": "line[0]", "parent": 796, "children": [799, 800], "start_point": {"row": 157, "column": 42}, "end_point": {"row": 157, "column": 49}}, {"id": 799, "type": "identifier", "text": "line", "parent": 798, "children": [], "start_point": {"row": 157, "column": 42}, "end_point": {"row": 157, "column": 46}}, {"id": 800, "type": "number_literal", "text": "0", "parent": 798, "children": [], "start_point": {"row": 157, "column": 47}, "end_point": {"row": 157, "column": 48}}, {"id": 801, "type": "call_expression", "text": "putline(tfp,line)", "parent": 778, "children": [802, 803], "start_point": {"row": 158, "column": 12}, "end_point": {"row": 158, "column": 29}}, {"id": 802, "type": "identifier", "text": "putline", "parent": 801, "children": [], "start_point": {"row": 158, "column": 12}, "end_point": {"row": 158, "column": 19}}, {"id": 803, "type": "argument_list", "text": "(tfp,line)", "parent": 801, "children": [804, 805], "start_point": {"row": 158, "column": 19}, "end_point": {"row": 158, "column": 29}}, {"id": 804, "type": "identifier", "text": "tfp", "parent": 803, "children": [], "start_point": {"row": 158, "column": 20}, "end_point": {"row": 158, "column": 23}}, {"id": 805, "type": "identifier", "text": "line", "parent": 803, "children": [], "start_point": {"row": 158, "column": 24}, "end_point": {"row": 158, "column": 28}}, {"id": 806, "type": "continue_statement", "text": "continue;", "parent": 778, "children": [807], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 21}}, {"id": 807, "type": "continue", "text": "continue", "parent": 806, "children": [], "start_point": {"row": 159, "column": 12}, "end_point": {"row": 159, "column": 20}}, {"id": 808, "type": "call_expression", "text": "strcpy(l,line)", "parent": 767, "children": [809, 810], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 161, "column": 22}}, {"id": 809, "type": "identifier", "text": "strcpy", "parent": 808, "children": [], "start_point": {"row": 161, "column": 8}, "end_point": {"row": 161, "column": 14}}, {"id": 810, "type": "argument_list", "text": "(l,line)", "parent": 808, "children": [811, 812], "start_point": {"row": 161, "column": 14}, "end_point": {"row": 161, "column": 22}}, {"id": 811, "type": "identifier", "text": "l", "parent": 810, "children": [], "start_point": {"row": 161, "column": 15}, "end_point": {"row": 161, "column": 16}}, {"id": 812, "type": "identifier", "text": "line", "parent": 810, "children": [], "start_point": {"row": 161, "column": 17}, "end_point": {"row": 161, "column": 21}}, {"id": 813, "type": "call_expression", "text": "getword(w,l,':')", "parent": 767, "children": [814, 815], "start_point": {"row": 162, "column": 8}, "end_point": {"row": 162, "column": 24}}, {"id": 814, "type": "identifier", "text": "getword", "parent": 813, "children": [], "start_point": {"row": 162, "column": 8}, "end_point": {"row": 162, "column": 15}}, {"id": 815, "type": "argument_list", "text": "(w,l,':')", "parent": 813, "children": [816, 817, 818], "start_point": {"row": 162, "column": 15}, "end_point": {"row": 162, "column": 24}}, {"id": 816, "type": "identifier", "text": "w", "parent": 815, "children": [], "start_point": {"row": 162, "column": 16}, "end_point": {"row": 162, "column": 17}}, {"id": 817, "type": "identifier", "text": "l", "parent": 815, "children": [], "start_point": {"row": 162, "column": 18}, "end_point": {"row": 162, "column": 19}}, {"id": 818, "type": "char_literal", "text": "':'", "parent": 815, "children": [819, 820], "start_point": {"row": 162, "column": 20}, "end_point": {"row": 162, "column": 23}}, {"id": 819, "type": "'", "text": "'", "parent": 818, "children": [], "start_point": {"row": 162, "column": 20}, "end_point": {"row": 162, "column": 21}}, {"id": 820, "type": "'", "text": "'", "parent": 818, "children": [], "start_point": {"row": 162, "column": 22}, "end_point": {"row": 162, "column": 23}}, {"id": 821, "type": "if_statement", "text": "if(strcmp(user,w)) {\n putline(tfp,line);\n continue;\n }\n else {\n printf(\"Changing password for user %s\\n\",user);\n add_password(user,tfp);\n found = 1;\n }", "parent": 767, "children": [822, 835], "start_point": {"row": 163, "column": 8}, "end_point": {"row": 171, "column": 9}}, {"id": 822, "type": "parenthesized_expression", "text": "(strcmp(user,w))", "parent": 821, "children": [823], "start_point": {"row": 163, "column": 10}, "end_point": {"row": 163, "column": 26}}, {"id": 823, "type": "call_expression", "text": "strcmp(user,w)", "parent": 822, "children": [824, 825], "start_point": {"row": 163, "column": 11}, "end_point": {"row": 163, "column": 25}}, {"id": 824, "type": "identifier", "text": "strcmp", "parent": 823, "children": [], "start_point": {"row": 163, "column": 11}, "end_point": {"row": 163, "column": 17}}, {"id": 825, "type": "argument_list", "text": "(user,w)", "parent": 823, "children": [826, 827], "start_point": {"row": 163, "column": 17}, "end_point": {"row": 163, "column": 25}}, {"id": 826, "type": "identifier", "text": "user", "parent": 825, "children": [], "start_point": {"row": 163, "column": 18}, "end_point": {"row": 163, "column": 22}}, {"id": 827, "type": "identifier", "text": "w", "parent": 825, "children": [], "start_point": {"row": 163, "column": 23}, "end_point": {"row": 163, "column": 24}}, {"id": 828, "type": "call_expression", "text": "putline(tfp,line)", "parent": 821, "children": [829, 830], "start_point": {"row": 164, "column": 12}, "end_point": {"row": 164, "column": 29}}, {"id": 829, "type": "identifier", "text": "putline", "parent": 828, "children": [], "start_point": {"row": 164, "column": 12}, "end_point": {"row": 164, "column": 19}}, {"id": 830, "type": "argument_list", "text": "(tfp,line)", "parent": 828, "children": [831, 832], "start_point": {"row": 164, "column": 19}, "end_point": {"row": 164, "column": 29}}, {"id": 831, "type": "identifier", "text": "tfp", "parent": 830, "children": [], "start_point": {"row": 164, "column": 20}, "end_point": {"row": 164, "column": 23}}, {"id": 832, "type": "identifier", "text": "line", "parent": 830, "children": [], "start_point": {"row": 164, "column": 24}, "end_point": {"row": 164, "column": 28}}, {"id": 833, "type": "continue_statement", "text": "continue;", "parent": 821, "children": [834], "start_point": {"row": 165, "column": 12}, "end_point": {"row": 165, "column": 21}}, {"id": 834, "type": "continue", "text": "continue", "parent": 833, "children": [], "start_point": {"row": 165, "column": 12}, "end_point": {"row": 165, "column": 20}}, {"id": 835, "type": "else_clause", "text": "else {\n printf(\"Changing password for user %s\\n\",user);\n add_password(user,tfp);\n found = 1;\n }", "parent": 821, "children": [], "start_point": {"row": 167, "column": 8}, "end_point": {"row": 171, "column": 9}}, {"id": 836, "type": "call_expression", "text": "printf(\"Changing password for user %s\\n\",user)", "parent": 835, "children": [837, 838], "start_point": {"row": 168, "column": 12}, "end_point": {"row": 168, "column": 58}}, {"id": 837, "type": "identifier", "text": "printf", "parent": 836, "children": [], "start_point": {"row": 168, "column": 12}, "end_point": {"row": 168, "column": 18}}, {"id": 838, "type": "argument_list", "text": "(\"Changing password for user %s\\n\",user)", "parent": 836, "children": [839, 841], "start_point": {"row": 168, "column": 18}, "end_point": {"row": 168, "column": 58}}, {"id": 839, "type": "string_literal", "text": "\"Changing password for user %s\\n\"", "parent": 838, "children": [840], "start_point": {"row": 168, "column": 19}, "end_point": {"row": 168, "column": 52}}, {"id": 840, "type": "escape_sequence", "text": "\\n", "parent": 839, "children": [], "start_point": {"row": 168, "column": 49}, "end_point": {"row": 168, "column": 51}}, {"id": 841, "type": "identifier", "text": "user", "parent": 838, "children": [], "start_point": {"row": 168, "column": 53}, "end_point": {"row": 168, "column": 57}}, {"id": 842, "type": "call_expression", "text": "add_password(user,tfp)", "parent": 835, "children": [843, 844], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 34}}, {"id": 843, "type": "identifier", "text": "add_password", "parent": 842, "children": [], "start_point": {"row": 169, "column": 12}, "end_point": {"row": 169, "column": 24}}, {"id": 844, "type": "argument_list", "text": "(user,tfp)", "parent": 842, "children": [845, 846], "start_point": {"row": 169, "column": 24}, "end_point": {"row": 169, "column": 34}}, {"id": 845, "type": "identifier", "text": "user", "parent": 844, "children": [], "start_point": {"row": 169, "column": 25}, "end_point": {"row": 169, "column": 29}}, {"id": 846, "type": "identifier", "text": "tfp", "parent": 844, "children": [], "start_point": {"row": 169, "column": 30}, "end_point": {"row": 169, "column": 33}}, {"id": 847, "type": "assignment_expression", "text": "found = 1", "parent": 835, "children": [848, 849, 850], "start_point": {"row": 170, "column": 12}, "end_point": {"row": 170, "column": 21}}, {"id": 848, "type": "identifier", "text": "found", "parent": 847, "children": [], "start_point": {"row": 170, "column": 12}, "end_point": {"row": 170, "column": 17}}, {"id": 849, "type": "=", "text": "=", "parent": 847, "children": [], "start_point": {"row": 170, "column": 18}, "end_point": {"row": 170, "column": 19}}, {"id": 850, "type": "number_literal", "text": "1", "parent": 847, "children": [], "start_point": {"row": 170, "column": 20}, "end_point": {"row": 170, "column": 21}}, {"id": 851, "type": "if_statement", "text": "if(!found) {\n printf(\"Adding user %s\\n\",user);\n add_password(user,tfp);\n }", "parent": 540, "children": [852], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 176, "column": 5}}, {"id": 852, "type": "parenthesized_expression", "text": "(!found)", "parent": 851, "children": [853], "start_point": {"row": 173, "column": 6}, "end_point": {"row": 173, "column": 14}}, {"id": 853, "type": "unary_expression", "text": "!found", "parent": 852, "children": [854, 855], "start_point": {"row": 173, "column": 7}, "end_point": {"row": 173, "column": 13}}, {"id": 854, "type": "!", "text": "!", "parent": 853, "children": [], "start_point": {"row": 173, "column": 7}, "end_point": {"row": 173, "column": 8}}, {"id": 855, "type": "identifier", "text": "found", "parent": 853, "children": [], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 13}}, {"id": 856, "type": "call_expression", "text": "printf(\"Adding user %s\\n\",user)", "parent": 851, "children": [857, 858], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 39}}, {"id": 857, "type": "identifier", "text": "printf", "parent": 856, "children": [], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 14}}, {"id": 858, "type": "argument_list", "text": "(\"Adding user %s\\n\",user)", "parent": 856, "children": [859, 861], "start_point": {"row": 174, "column": 14}, "end_point": {"row": 174, "column": 39}}, {"id": 859, "type": "string_literal", "text": "\"Adding user %s\\n\"", "parent": 858, "children": [860], "start_point": {"row": 174, "column": 15}, "end_point": {"row": 174, "column": 33}}, {"id": 860, "type": "escape_sequence", "text": "\\n", "parent": 859, "children": [], "start_point": {"row": 174, "column": 30}, "end_point": {"row": 174, "column": 32}}, {"id": 861, "type": "identifier", "text": "user", "parent": 858, "children": [], "start_point": {"row": 174, "column": 34}, "end_point": {"row": 174, "column": 38}}, {"id": 862, "type": "call_expression", "text": "add_password(user,tfp)", "parent": 851, "children": [863, 864], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 30}}, {"id": 863, "type": "identifier", "text": "add_password", "parent": 862, "children": [], "start_point": {"row": 175, "column": 8}, "end_point": {"row": 175, "column": 20}}, {"id": 864, "type": "argument_list", "text": "(user,tfp)", "parent": 862, "children": [865, 866], "start_point": {"row": 175, "column": 20}, "end_point": {"row": 175, "column": 30}}, {"id": 865, "type": "identifier", "text": "user", "parent": 864, "children": [], "start_point": {"row": 175, "column": 21}, "end_point": {"row": 175, "column": 25}}, {"id": 866, "type": "identifier", "text": "tfp", "parent": 864, "children": [], "start_point": {"row": 175, "column": 26}, "end_point": {"row": 175, "column": 29}}, {"id": 867, "type": "call_expression", "text": "fclose(f)", "parent": 540, "children": [868, 869], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 13}}, {"id": 868, "type": "identifier", "text": "fclose", "parent": 867, "children": [], "start_point": {"row": 177, "column": 4}, "end_point": {"row": 177, "column": 10}}, {"id": 869, "type": "argument_list", "text": "(f)", "parent": 867, "children": [870], "start_point": {"row": 177, "column": 10}, "end_point": {"row": 177, "column": 13}}, {"id": 870, "type": "identifier", "text": "f", "parent": 869, "children": [], "start_point": {"row": 177, "column": 11}, "end_point": {"row": 177, "column": 12}}, {"id": 871, "type": "call_expression", "text": "fclose(tfp)", "parent": 540, "children": [872, 873], "start_point": {"row": 178, "column": 4}, "end_point": {"row": 178, "column": 15}}, {"id": 872, "type": "identifier", "text": "fclose", "parent": 871, "children": [], "start_point": {"row": 178, "column": 4}, "end_point": {"row": 178, "column": 10}}, {"id": 873, "type": "argument_list", "text": "(tfp)", "parent": 871, "children": [874], "start_point": {"row": 178, "column": 10}, "end_point": {"row": 178, "column": 15}}, {"id": 874, "type": "identifier", "text": "tfp", "parent": 873, "children": [], "start_point": {"row": 178, "column": 11}, "end_point": {"row": 178, "column": 14}}, {"id": 875, "type": "call_expression", "text": "sprintf(command,\"cp %s %s\",tn,argv[1])", "parent": 540, "children": [876, 877], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 42}}, {"id": 876, "type": "identifier", "text": "sprintf", "parent": 875, "children": [], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 11}}, {"id": 877, "type": "argument_list", "text": "(command,\"cp %s %s\",tn,argv[1])", "parent": 875, "children": [878, 879, 880, 881], "start_point": {"row": 179, "column": 11}, "end_point": {"row": 179, "column": 42}}, {"id": 878, "type": "identifier", "text": "command", "parent": 877, "children": [], "start_point": {"row": 179, "column": 12}, "end_point": {"row": 179, "column": 19}}, {"id": 879, "type": "string_literal", "text": "\"cp %s %s\"", "parent": 877, "children": [], "start_point": {"row": 179, "column": 20}, "end_point": {"row": 179, "column": 30}}, {"id": 880, "type": "identifier", "text": "tn", "parent": 877, "children": [], "start_point": {"row": 179, "column": 31}, "end_point": {"row": 179, "column": 33}}, {"id": 881, "type": "subscript_expression", "text": "argv[1]", "parent": 877, "children": [882, 883], "start_point": {"row": 179, "column": 34}, "end_point": {"row": 179, "column": 41}}, {"id": 882, "type": "identifier", "text": "argv", "parent": 881, "children": [], "start_point": {"row": 179, "column": 34}, "end_point": {"row": 179, "column": 38}}, {"id": 883, "type": "number_literal", "text": "1", "parent": 881, "children": [], "start_point": {"row": 179, "column": 39}, "end_point": {"row": 179, "column": 40}}, {"id": 884, "type": "call_expression", "text": "system(command)", "parent": 540, "children": [885, 886], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 180, "column": 19}}, {"id": 885, "type": "identifier", "text": "system", "parent": 884, "children": [], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 180, "column": 10}}, {"id": 886, "type": "argument_list", "text": "(command)", "parent": 884, "children": [887], "start_point": {"row": 180, "column": 10}, "end_point": {"row": 180, "column": 19}}, {"id": 887, "type": "identifier", "text": "command", "parent": 886, "children": [], "start_point": {"row": 180, "column": 11}, "end_point": {"row": 180, "column": 18}}, {"id": 888, "type": "call_expression", "text": "unlink(tn)", "parent": 540, "children": [889, 890], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 14}}, {"id": 889, "type": "identifier", "text": "unlink", "parent": 888, "children": [], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 10}}, {"id": 890, "type": "argument_list", "text": "(tn)", "parent": 888, "children": [891], "start_point": {"row": 181, "column": 10}, "end_point": {"row": 181, "column": 14}}, {"id": 891, "type": "identifier", "text": "tn", "parent": 890, "children": [], "start_point": {"row": 181, "column": 11}, "end_point": {"row": 181, "column": 13}}, {"id": 892, "type": "call_expression", "text": "exit(0)", "parent": 540, "children": [893, 894], "start_point": {"row": 182, "column": 1}, "end_point": {"row": 182, "column": 8}}, {"id": 893, "type": "identifier", "text": "exit", "parent": 892, "children": [], "start_point": {"row": 182, "column": 1}, "end_point": {"row": 182, "column": 5}}, {"id": 894, "type": "argument_list", "text": "(0)", "parent": 892, "children": [895], "start_point": {"row": 182, "column": 5}, "end_point": {"row": 182, "column": 8}}, {"id": 895, "type": "number_literal", "text": "0", "parent": 894, "children": [], "start_point": {"row": 182, "column": 6}, "end_point": {"row": 182, "column": 7}}]}, "node_categories": {"declarations": {"functions": [38, 42, 81, 83, 172, 174, 281, 283, 334, 336, 384, 386, 497, 499, 518, 520, 540, 542, 602], "variables": [33, 45, 50, 86, 91, 96, 99, 177, 182, 185, 190, 286, 291, 296, 325, 342, 349, 355, 389, 394, 399, 545, 548, 554, 562, 567, 572, 577, 582, 587], "classes": [191, 343, 350, 356], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [58, 63, 66, 67, 73, 79, 111, 112, 113, 114, 118, 119, 120, 125, 129, 133, 137, 146, 147, 150, 158, 159, 161, 163, 167, 169, 199, 202, 206, 209, 214, 215, 216, 222, 226, 231, 232, 233, 234, 235, 236, 242, 243, 244, 250, 251, 254, 255, 260, 269, 271, 278, 304, 307, 310, 313, 317, 361, 362, 363, 369, 371, 375, 377, 413, 416, 421, 422, 426, 430, 437, 439, 443, 447, 450, 453, 456, 459, 466, 469, 470, 473, 480, 485, 489, 502, 508, 514, 523, 530, 532, 536, 595, 599, 609, 610, 615, 616, 619, 623, 627, 628, 630, 634, 637, 641, 647, 650, 654, 658, 663, 666, 669, 673, 677, 683, 684, 688, 694, 700, 701, 703, 707, 712, 718, 723, 724, 726, 730, 733, 737, 743, 746, 752, 756, 760, 768, 769, 771, 772, 779, 780, 781, 784, 785, 786, 795, 796, 798, 801, 808, 813, 822, 823, 828, 836, 842, 852, 853, 856, 862, 867, 871, 875, 881, 884, 888, 892], "assignments": [55, 107, 128, 136, 153, 160, 201, 221, 259, 300, 368, 380, 410, 477, 590, 631, 691, 704, 727, 763, 847], "loops": [106, 157, 198, 299, 360, 767], "conditionals": [23, 27, 31, 37, 43, 49, 54, 56, 64, 68, 70, 74, 76, 77, 80, 84, 90, 95, 98, 102, 105, 108, 115, 116, 121, 122, 124, 126, 130, 131, 134, 135, 138, 139, 145, 148, 149, 152, 154, 162, 164, 168, 170, 175, 181, 184, 186, 189, 195, 203, 204, 210, 212, 213, 217, 218, 220, 223, 224, 227, 229, 230, 237, 238, 245, 246, 248, 252, 256, 261, 262, 270, 272, 274, 280, 284, 287, 290, 295, 298, 301, 305, 306, 308, 311, 314, 315, 316, 318, 324, 326, 331, 337, 339, 340, 341, 348, 352, 354, 359, 365, 372, 376, 378, 381, 387, 393, 395, 398, 403, 406, 408, 411, 414, 417, 420, 423, 425, 427, 431, 433, 436, 438, 440, 442, 444, 451, 457, 461, 467, 471, 474, 478, 481, 483, 484, 486, 488, 490, 492, 495, 496, 500, 503, 505, 509, 511, 515, 521, 524, 526, 529, 531, 533, 535, 537, 543, 547, 553, 555, 558, 561, 565, 566, 570, 571, 575, 576, 580, 581, 585, 586, 589, 591, 596, 598, 607, 608, 611, 614, 617, 620, 624, 626, 632, 635, 638, 642, 644, 648, 651, 655, 659, 664, 667, 670, 672, 674, 676, 678, 682, 685, 689, 692, 695, 699, 705, 708, 710, 713, 715, 719, 722, 728, 731, 734, 738, 740, 744, 747, 749, 753, 757, 759, 761, 764, 773, 775, 776, 777, 778, 782, 787, 799, 802, 804, 805, 809, 811, 812, 814, 816, 817, 821, 824, 826, 827, 829, 831, 832, 837, 841, 843, 845, 846, 848, 851, 855, 857, 861, 863, 865, 866, 868, 870, 872, 874, 876, 878, 880, 882, 885, 887, 889, 891, 893], "returns": [78, 268], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 72, 104, 110, 141, 156, 197, 200, 240, 258, 264, 276, 277, 303, 320, 333, 367, 379, 383, 409, 419, 429, 434, 446, 472, 476, 493, 506, 512, 517, 527, 539, 613, 621, 622, 639, 640, 645, 649, 653, 657, 661, 665, 671, 680, 687, 711, 716, 721, 735, 736, 741, 745, 750, 755, 762, 766, 788, 790, 800, 818, 839, 850, 859, 879, 883, 895], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 38, "universal_type": "function", "name": "unknown", "text_snippet": "char *strd(char *s) {\n char *d;\n\n d=(char *)malloc(strlen(s) + 1);\n strcpy(d,s);\n return"}, {"node_id": 42, "universal_type": "function", "name": "unknown", "text_snippet": "strd(char *s)"}, {"node_id": 81, "universal_type": "function", "name": "getword", "text_snippet": "void getword(char *word, char *line, char stop) {\n int x = 0,y;\n\n for(x=0;((line[x]) && (line["}, {"node_id": 83, "universal_type": "function", "name": "unknown", "text_snippet": "getword(char *word, char *line, char stop)"}, {"node_id": 172, "universal_type": "function", "name": "getline", "text_snippet": "int getline(char *s, int n, FILE *f) {\n register int i=0;\n\n while(1) {\n s[i] = (char)fg"}, {"node_id": 174, "universal_type": "function", "name": "n,", "text_snippet": "getline(char *s, int n, FILE *f)"}, {"node_id": 281, "universal_type": "function", "name": "putline", "text_snippet": "void putline(FILE *f,char *l) {\n int x;\n\n for(x=0;l[x];x++) fputc(l[x],f);\n fputc('\\n',f);\n"}, {"node_id": 283, "universal_type": "function", "name": "unknown", "text_snippet": "putline(FILE *f,char *l)"}, {"node_id": 334, "universal_type": "function", "name": "to64", "text_snippet": "void to64(s, v, n)\n register char *s;\n register long v;\n register int n;\n{\n while (--n >= 0) {"}, {"node_id": 336, "universal_type": "function", "name": "unknown", "text_snippet": "to64(s, v, n)"}, {"node_id": 384, "universal_type": "function", "name": "add_password", "text_snippet": "void add_password(char *user, FILE *f) {\n char *pw, *cpw, salt[3];\n\n pw = strd(getpass(\"New pa"}, {"node_id": 386, "universal_type": "function", "name": "unknown", "text_snippet": "add_password(char *user, FILE *f)"}, {"node_id": 497, "universal_type": "function", "name": "usage", "text_snippet": "void usage() {\n fprintf(stderr,\"Usage: couchpw [-c] passwordfile username\\n\");\n fprintf(stderr"}, {"node_id": 499, "universal_type": "function", "name": "unknown", "text_snippet": "usage()"}, {"node_id": 518, "universal_type": "function", "name": "interrupted", "text_snippet": "void interrupted() {\n fprintf(stderr,\"Interrupted.\\n\");\n if(tn) unlink(tn);\n exit(1);\n}"}, {"node_id": 520, "universal_type": "function", "name": "unknown", "text_snippet": "interrupted()"}, {"node_id": 540, "universal_type": "function", "name": "main", "text_snippet": "int main(int argc, char *argv[]) {\n FILE *tfp,*f;\n char user[MAX_STRING_LEN];\n char line[MA"}, {"node_id": 542, "universal_type": "function", "name": "unknown", "text_snippet": "main(int argc, char *argv[])"}, {"node_id": 602, "universal_type": "function", "name": "unknown", "text_snippet": "(*)()"}], "class_declarations": [{"node_id": 191, "universal_type": "class", "name": "unknown", "text_snippet": "register"}, {"node_id": 343, "universal_type": "class", "name": "unknown", "text_snippet": "register"}, {"node_id": 350, "universal_type": "class", "name": "unknown", "text_snippet": "register"}, {"node_id": 356, "universal_type": "class", "name": "unknown", "text_snippet": "register"}], "import_statements": [{"node_id": 0, "text": "#include <sys/types.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"}, {"node_id": 9, "text": "#include <sys/signal.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 <time.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <unistd.h>\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "/*\n * Original work:\n * htpasswd.c: simple program for manipulating password file for NCSA httpd.\n * <NAME>\n * Adapted for Apache CouchDB by <NAME> <<EMAIL>>. \n */\n\n#include <sys/types.h>\n#include <stdio.h>\n#include <string.h>\n#include <sys/signal.h>\n#include <stdlib.h>\n#include <time.h>\n#include <unistd.h>\n\n#define LF 10\n#define CR 13\n\n#define MAX_STRING_LEN 256\n\nchar *tn;\n\nchar *strd(char *s) {\n char *d;\n\n d=(char *)malloc(strlen(s) + 1);\n strcpy(d,s);\n return(d);\n}\n\nvoid getword(char *word, char *line, char stop) {\n int x = 0,y;\n\n for(x=0;((line[x]) && (line[x] != stop));x++)\n word[x] = line[x];\n\n word[x] = '\\0';\n if(line[x]) ++x;\n y=0;\n\n while((line[y++] = line[x++]));\n}\n\nint getline(char *s, int n, FILE *f) {\n register int i=0;\n\n while(1) {\n s[i] = (char)fgetc(f);\n\n if(s[i] == CR)\n s[i] = fgetc(f);\n\n if((s[i] == 0x4) || (s[i] == LF) || (i == (n-1))) {\n s[i] = '\\0';\n return (feof(f) ? 1 : 0);\n }\n ++i;\n }\n}\n\nvoid putline(FILE *f,char *l) {\n int x;\n\n for(x=0;l[x];x++) fputc(l[x],f);\n fputc('\\n',f);\n}\n\n\n/* From local_passwd.c (C) Regents of Univ. of California blah blah */\nstatic unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */\n \"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n\nvoid to64(s, v, n)\n register char *s;\n register long v;\n register int n;\n{\n while (--n >= 0) {\n *s++ = itoa64[v&0x3f];\n v >>= 6;\n }\n}\n\n// char *crypt(char *pw, char *salt); /* why aren't these prototyped in include */\n// char *getpass(char *prompt);\n\nvoid add_password(char *user, FILE *f) {\n char *pw, *cpw, salt[3];\n\n pw = strd(getpass(\"New password:\"));\n if(strcmp(pw,getpass(\"Re-type new password:\"))) {\n fprintf(stderr,\"They don't match, sorry.\\n\");\n if(tn)\n unlink(tn);\n exit(1);\n }\n (void)srand((int)time((time_t *)NULL));\n to64(&salt[0],rand(),2);\n cpw = crypt(pw,salt);\n free(pw);\n fprintf(f,\"%s:%s\\n\",user,cpw);\n}\n\nvoid usage() {\n fprintf(stderr,\"Usage: couchpw [-c] passwordfile username\\n\");\n fprintf(stderr,\"The -c flag creates a new file.\\n\");\n exit(1);\n}\n\nvoid interrupted() {\n fprintf(stderr,\"Interrupted.\\n\");\n if(tn) unlink(tn);\n exit(1);\n}\n\nint main(int argc, char *argv[]) {\n FILE *tfp,*f;\n char user[MAX_STRING_LEN];\n char line[MAX_STRING_LEN];\n char l[MAX_STRING_LEN];\n char w[MAX_STRING_LEN];\n char command[MAX_STRING_LEN];\n int found;\n\n tn = NULL;\n signal(SIGINT,(void (*)())interrupted);\n if(argc == 4) {\n if(strcmp(argv[1],\"-c\"))\n usage();\n if(!(tfp = fopen(argv[2],\"w\"))) {\n fprintf(stderr,\"Could not open passwd file %s for writing.\\n\",\n argv[2]);\n perror(\"fopen\");\n exit(1);\n }\n printf(\"Adding password for %s.\\n\",argv[3]);\n add_password(argv[3],tfp);\n fclose(tfp);\n exit(0);\n } else if(argc != 3) usage();\n\n tn = tmpnam(NULL);\n if(!(tfp = fopen(tn,\"w\"))) {\n fprintf(stderr,\"Could not open temp file.\\n\");\n exit(1);\n }\n\n if(!(f = fopen(argv[1],\"r\"))) {\n fprintf(stderr,\n \"Could not open passwd file %s for reading.\\n\",argv[1]);\n fprintf(stderr,\"Use -c option to create new one.\\n\");\n exit(1);\n }\n strcpy(user,argv[2]);\n\n found = 0;\n while(!(getline(line,MAX_STRING_LEN,f))) {\n if(found || (line[0] == '#') || (!line[0])) {\n putline(tfp,line);\n continue;\n }\n strcpy(l,line);\n getword(w,l,':');\n if(strcmp(user,w)) {\n putline(tfp,line);\n continue;\n }\n else {\n printf(\"Changing password for user %s\\n\",user);\n add_password(user,tfp);\n found = 1;\n }\n }\n if(!found) {\n printf(\"Adding user %s\\n\",user);\n add_password(user,tfp);\n }\n fclose(f);\n fclose(tfp);\n sprintf(command,\"cp %s %s\",tn,argv[1]);\n system(command);\n unlink(tn);\n\texit(0);\n}\n"}
15
c
/* Contains structures required for reading and writing data for this program */ /* Simple data definitions */ typedef unsigned char BYTE; typedef unsigned short WORD; /* N.B.: To get 32-bit on both 32-bit and 64-bit compiles, use `int' instead of `long'. */ typedef unsigned int DWORD; typedef long LONG; /* ? */ /* #pragma ms-struct(push) */ #pragma pack(push,1) /* Icon structures */ typedef struct tagICOINFOHEDAER { WORD reserved; /* Should be 0 */ WORD type; /* 1 for icon, 2 for cursor */ WORD count; /* image count */ } ICOINFOHEADER; typedef struct tagICODIRECTORY { BYTE width; BYTE height; BYTE colorCount; /* Number of colors if less than 256 */ BYTE reserved; WORD colorPlanes; /* should be 0 or 1 or X hotspot */ WORD bpp; /* or Y hotspot */ DWORD imgSize; DWORD imgOffset; } ICODIRECTORY; /* Bitmap structures, copied from Windows Platform SDK */ /* See the Windows Platform SDK for more details */ /* Bitmap files begin with: */ typedef struct tagBITMAPFILEHEADER { WORD bfType; /* should equal "BM" */ DWORD bfSize; /* total file size */ WORD bfReserved1; WORD bfReserved2; DWORD bfOffBits; /* offset to bitmap bits */ } BITMAPFILEHEADER, *PBITMAPFILEHEADER; /* Next comes: */ typedef struct tagBITMAPINFOHEADER { DWORD biSize; LONG biWidth; LONG biHeight; WORD biPlanes; WORD biBitCount; DWORD biCompression; DWORD biSizeImage; LONG biXPelsPerMeter; /* Pixels per Meter */ LONG biYPelsPerMeter; DWORD biClrUsed; DWORD biClrImportant; } BITMAPINFOHEADER, *PBITMAPINFOHEADER; /* Constants for the biCompression field */ #define BI_RGB 0 #define BI_RLE8 1 #define BI_RLE4 2 #define BI_BITFIELDS 3 #define BI_JPEG 4 #define BI_PNG 5 /* Then comes the color palette or bitmasks (if there is/are one/any). It/those is/are an array of: */ typedef struct tagRGBQUAD { BYTE rgbBlue; BYTE rgbGreen; BYTE rgbRed; BYTE rgbReserved; } RGBQUAD; /* Bitmasks specify which bits are occupied by what colors in 16 and 32 bit bitmaps. Three RBGQUADs specify the red, green, and blue bitmasks respectively. */ /* Last would come the bitmap bits (palette indices or literal RGB values). */ #pragma pack(pop) /* #pragma ms-struct(pop) */
28.1
77
(translation_unit) "/* Contains structures required for reading and writing data for this\n program */\n\n/* Simple data definitions */\ntypedef unsigned char BYTE;\ntypedef unsigned short WORD;\n/* N.B.: To get 32-bit on both 32-bit and 64-bit compiles, use `int'\n instead of `long'. */\ntypedef unsigned int DWORD;\ntypedef long LONG; /* ? */\n\n/* #pragma ms-struct(push) */\n#pragma pack(push,1)\n\n/* Icon structures */\ntypedef struct tagICOINFOHEDAER\n{\n WORD reserved; /* Should be 0 */\n WORD type; /* 1 for icon, 2 for cursor */\n WORD count; /* image count */\n} ICOINFOHEADER;\n\ntypedef struct tagICODIRECTORY\n{\n BYTE width;\n BYTE height;\n BYTE colorCount; /* Number of colors if less than 256 */\n BYTE reserved;\n WORD colorPlanes; /* should be 0 or 1 or X hotspot */\n WORD bpp; /* or Y hotspot */\n DWORD imgSize;\n DWORD imgOffset;\n} ICODIRECTORY;\n\n/* Bitmap structures, copied from Windows Platform SDK */\n/* See the Windows Platform SDK for more details */\n\n/* Bitmap files begin with: */\ntypedef struct tagBITMAPFILEHEADER\n{\n WORD bfType; /* should equal "BM" */\n DWORD bfSize; /* total file size */\n WORD bfReserved1;\n WORD bfReserved2;\n DWORD bfOffBits; /* offset to bitmap bits */\n} BITMAPFILEHEADER, *PBITMAPFILEHEADER;\n\n/* Next comes: */\ntypedef struct tagBITMAPINFOHEADER\n{\n DWORD biSize;\n LONG biWidth;\n LONG biHeight;\n WORD biPlanes;\n WORD biBitCount;\n DWORD biCompression;\n DWORD biSizeImage;\n LONG biXPelsPerMeter; /* Pixels per Meter */\n LONG biYPelsPerMeter;\n DWORD biClrUsed;\n DWORD biClrImportant;\n} BITMAPINFOHEADER, *PBITMAPINFOHEADER;\n\n/* Constants for the biCompression field */\n#define BI_RGB 0\n#define BI_RLE8 1\n#define BI_RLE4 2\n#define BI_BITFIELDS 3\n#define BI_JPEG 4\n#define BI_PNG 5\n\n/* Then comes the color palette or bitmasks (if there is/are one/any).\n It/those is/are an array of: */\ntypedef struct tagRGBQUAD {\n BYTE rgbBlue;\n BYTE rgbGreen;\n BYTE rgbRed;\n BYTE rgbReserved;\n} RGBQUAD;\n/* Bitmasks specify which bits are occupied by what colors\n in 16 and 32 bit bitmaps. Three RBGQUADs specify the red, green, and\n blue bitmasks respectively. */\n\n/* Last would come the bitmap bits (palette indices or literal RGB\n values). */\n\n#pragma pack(pop)\n/* #pragma ms-struct(pop) */\n" (comment) "/* Contains structures required for reading and writing data for this\n program */" (comment) "/* Simple data definitions */" (type_definition) "typedef unsigned char BYTE;" (typedef) "typedef" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (type_identifier) "BYTE" (;) ";" (type_definition) "typedef unsigned short WORD;" (typedef) "typedef" (sized_type_specifier) "unsigned short" (unsigned) "unsigned" (short) "short" (type_identifier) "WORD" (;) ";" (comment) "/* N.B.: To get 32-bit on both 32-bit and 64-bit compiles, use `int'\n instead of `long'. */" (type_definition) "typedef unsigned int DWORD;" (typedef) "typedef" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (type_identifier) "DWORD" (;) ";" (type_definition) "typedef long LONG;" (typedef) "typedef" (sized_type_specifier) "long" (long) "long" (type_identifier) "LONG" (;) ";" (comment) "/* ? */" (comment) "/* #pragma ms-struct(push) */" (preproc_call) "#pragma pack(push,1)\n" (preproc_directive) "#pragma" (preproc_arg) "pack(push,1)" (comment) "/* Icon structures */" (type_definition) "typedef struct tagICOINFOHEDAER\n{\n WORD reserved; /* Should be 0 */\n WORD type; /* 1 for icon, 2 for cursor */\n WORD count; /* image count */\n} ICOINFOHEADER;" (typedef) "typedef" (struct_specifier) "struct tagICOINFOHEDAER\n{\n WORD reserved; /* Should be 0 */\n WORD type; /* 1 for icon, 2 for cursor */\n WORD count; /* image count */\n}" (struct) "struct" (type_identifier) "tagICOINFOHEDAER" (field_declaration_list) "{\n WORD reserved; /* Should be 0 */\n WORD type; /* 1 for icon, 2 for cursor */\n WORD count; /* image count */\n}" ({) "{" (field_declaration) "WORD reserved;" (type_identifier) "WORD" (field_identifier) "reserved" (;) ";" (comment) "/* Should be 0 */" (field_declaration) "WORD type;" (type_identifier) "WORD" (field_identifier) "type" (;) ";" (comment) "/* 1 for icon, 2 for cursor */" (field_declaration) "WORD count;" (type_identifier) "WORD" (field_identifier) "count" (;) ";" (comment) "/* image count */" (}) "}" (type_identifier) "ICOINFOHEADER" (;) ";" (type_definition) "typedef struct tagICODIRECTORY\n{\n BYTE width;\n BYTE height;\n BYTE colorCount; /* Number of colors if less than 256 */\n BYTE reserved;\n WORD colorPlanes; /* should be 0 or 1 or X hotspot */\n WORD bpp; /* or Y hotspot */\n DWORD imgSize;\n DWORD imgOffset;\n} ICODIRECTORY;" (typedef) "typedef" (struct_specifier) "struct tagICODIRECTORY\n{\n BYTE width;\n BYTE height;\n BYTE colorCount; /* Number of colors if less than 256 */\n BYTE reserved;\n WORD colorPlanes; /* should be 0 or 1 or X hotspot */\n WORD bpp; /* or Y hotspot */\n DWORD imgSize;\n DWORD imgOffset;\n}" (struct) "struct" (type_identifier) "tagICODIRECTORY" (field_declaration_list) "{\n BYTE width;\n BYTE height;\n BYTE colorCount; /* Number of colors if less than 256 */\n BYTE reserved;\n WORD colorPlanes; /* should be 0 or 1 or X hotspot */\n WORD bpp; /* or Y hotspot */\n DWORD imgSize;\n DWORD imgOffset;\n}" ({) "{" (field_declaration) "BYTE width;" (type_identifier) "BYTE" (field_identifier) "width" (;) ";" (field_declaration) "BYTE height;" (type_identifier) "BYTE" (field_identifier) "height" (;) ";" (field_declaration) "BYTE colorCount;" (type_identifier) "BYTE" (field_identifier) "colorCount" (;) ";" (comment) "/* Number of colors if less than 256 */" (field_declaration) "BYTE reserved;" (type_identifier) "BYTE" (field_identifier) "reserved" (;) ";" (field_declaration) "WORD colorPlanes;" (type_identifier) "WORD" (field_identifier) "colorPlanes" (;) ";" (comment) "/* should be 0 or 1 or X hotspot */" (field_declaration) "WORD bpp;" (type_identifier) "WORD" (field_identifier) "bpp" (;) ";" (comment) "/* or Y hotspot */" (field_declaration) "DWORD imgSize;" (type_identifier) "DWORD" (field_identifier) "imgSize" (;) ";" (field_declaration) "DWORD imgOffset;" (type_identifier) "DWORD" (field_identifier) "imgOffset" (;) ";" (}) "}" (type_identifier) "ICODIRECTORY" (;) ";" (comment) "/* Bitmap structures, copied from Windows Platform SDK */" (comment) "/* See the Windows Platform SDK for more details */" (comment) "/* Bitmap files begin with: */" (type_definition) "typedef struct tagBITMAPFILEHEADER\n{\n WORD bfType; /* should equal "BM" */\n DWORD bfSize; /* total file size */\n WORD bfReserved1;\n WORD bfReserved2;\n DWORD bfOffBits; /* offset to bitmap bits */\n} BITMAPFILEHEADER, *PBITMAPFILEHEADER;" (typedef) "typedef" (struct_specifier) "struct tagBITMAPFILEHEADER\n{\n WORD bfType; /* should equal "BM" */\n DWORD bfSize; /* total file size */\n WORD bfReserved1;\n WORD bfReserved2;\n DWORD bfOffBits; /* offset to bitmap bits */\n}" (struct) "struct" (type_identifier) "tagBITMAPFILEHEADER" (field_declaration_list) "{\n WORD bfType; /* should equal "BM" */\n DWORD bfSize; /* total file size */\n WORD bfReserved1;\n WORD bfReserved2;\n DWORD bfOffBits; /* offset to bitmap bits */\n}" ({) "{" (field_declaration) "WORD bfType;" (type_identifier) "WORD" (field_identifier) "bfType" (;) ";" (comment) "/* should equal "BM" */" (field_declaration) "DWORD bfSize;" (type_identifier) "DWORD" (field_identifier) "bfSize" (;) ";" (comment) "/* total file size */" (field_declaration) "WORD bfReserved1;" (type_identifier) "WORD" (field_identifier) "bfReserved1" (;) ";" (field_declaration) "WORD bfReserved2;" (type_identifier) "WORD" (field_identifier) "bfReserved2" (;) ";" (field_declaration) "DWORD bfOffBits;" (type_identifier) "DWORD" (field_identifier) "bfOffBits" (;) ";" (comment) "/* offset to bitmap bits */" (}) "}" (type_identifier) "BITMAPFILEHEADER" (,) "," (pointer_declarator) "*PBITMAPFILEHEADER" (*) "*" (type_identifier) "PBITMAPFILEHEADER" (;) ";" (comment) "/* Next comes: */" (type_definition) "typedef struct tagBITMAPINFOHEADER\n{\n DWORD biSize;\n LONG biWidth;\n LONG biHeight;\n WORD biPlanes;\n WORD biBitCount;\n DWORD biCompression;\n DWORD biSizeImage;\n LONG biXPelsPerMeter; /* Pixels per Meter */\n LONG biYPelsPerMeter;\n DWORD biClrUsed;\n DWORD biClrImportant;\n} BITMAPINFOHEADER, *PBITMAPINFOHEADER;" (typedef) "typedef" (struct_specifier) "struct tagBITMAPINFOHEADER\n{\n DWORD biSize;\n LONG biWidth;\n LONG biHeight;\n WORD biPlanes;\n WORD biBitCount;\n DWORD biCompression;\n DWORD biSizeImage;\n LONG biXPelsPerMeter; /* Pixels per Meter */\n LONG biYPelsPerMeter;\n DWORD biClrUsed;\n DWORD biClrImportant;\n}" (struct) "struct" (type_identifier) "tagBITMAPINFOHEADER" (field_declaration_list) "{\n DWORD biSize;\n LONG biWidth;\n LONG biHeight;\n WORD biPlanes;\n WORD biBitCount;\n DWORD biCompression;\n DWORD biSizeImage;\n LONG biXPelsPerMeter; /* Pixels per Meter */\n LONG biYPelsPerMeter;\n DWORD biClrUsed;\n DWORD biClrImportant;\n}" ({) "{" (field_declaration) "DWORD biSize;" (type_identifier) "DWORD" (field_identifier) "biSize" (;) ";" (field_declaration) "LONG biWidth;" (type_identifier) "LONG" (field_identifier) "biWidth" (;) ";" (field_declaration) "LONG biHeight;" (type_identifier) "LONG" (field_identifier) "biHeight" (;) ";" (field_declaration) "WORD biPlanes;" (type_identifier) "WORD" (field_identifier) "biPlanes" (;) ";" (field_declaration) "WORD biBitCount;" (type_identifier) "WORD" (field_identifier) "biBitCount" (;) ";" (field_declaration) "DWORD biCompression;" (type_identifier) "DWORD" (field_identifier) "biCompression" (;) ";" (field_declaration) "DWORD biSizeImage;" (type_identifier) "DWORD" (field_identifier) "biSizeImage" (;) ";" (field_declaration) "LONG biXPelsPerMeter;" (type_identifier) "LONG" (field_identifier) "biXPelsPerMeter" (;) ";" (comment) "/* Pixels per Meter */" (field_declaration) "LONG biYPelsPerMeter;" (type_identifier) "LONG" (field_identifier) "biYPelsPerMeter" (;) ";" (field_declaration) "DWORD biClrUsed;" (type_identifier) "DWORD" (field_identifier) "biClrUsed" (;) ";" (field_declaration) "DWORD biClrImportant;" (type_identifier) "DWORD" (field_identifier) "biClrImportant" (;) ";" (}) "}" (type_identifier) "BITMAPINFOHEADER" (,) "," (pointer_declarator) "*PBITMAPINFOHEADER" (*) "*" (type_identifier) "PBITMAPINFOHEADER" (;) ";" (comment) "/* Constants for the biCompression field */" (preproc_def) "#define BI_RGB 0\n" (#define) "#define" (identifier) "BI_RGB" (preproc_arg) "0" (preproc_def) "#define BI_RLE8 1\n" (#define) "#define" (identifier) "BI_RLE8" (preproc_arg) "1" (preproc_def) "#define BI_RLE4 2\n" (#define) "#define" (identifier) "BI_RLE4" (preproc_arg) "2" (preproc_def) "#define BI_BITFIELDS 3\n" (#define) "#define" (identifier) "BI_BITFIELDS" (preproc_arg) "3" (preproc_def) "#define BI_JPEG 4\n" (#define) "#define" (identifier) "BI_JPEG" (preproc_arg) "4" (preproc_def) "#define BI_PNG 5\n" (#define) "#define" (identifier) "BI_PNG" (preproc_arg) "5" (comment) "/* Then comes the color palette or bitmasks (if there is/are one/any).\n It/those is/are an array of: */" (type_definition) "typedef struct tagRGBQUAD {\n BYTE rgbBlue;\n BYTE rgbGreen;\n BYTE rgbRed;\n BYTE rgbReserved;\n} RGBQUAD;" (typedef) "typedef" (struct_specifier) "struct tagRGBQUAD {\n BYTE rgbBlue;\n BYTE rgbGreen;\n BYTE rgbRed;\n BYTE rgbReserved;\n}" (struct) "struct" (type_identifier) "tagRGBQUAD" (field_declaration_list) "{\n BYTE rgbBlue;\n BYTE rgbGreen;\n BYTE rgbRed;\n BYTE rgbReserved;\n}" ({) "{" (field_declaration) "BYTE rgbBlue;" (type_identifier) "BYTE" (field_identifier) "rgbBlue" (;) ";" (field_declaration) "BYTE rgbGreen;" (type_identifier) "BYTE" (field_identifier) "rgbGreen" (;) ";" (field_declaration) "BYTE rgbRed;" (type_identifier) "BYTE" (field_identifier) "rgbRed" (;) ";" (field_declaration) "BYTE rgbReserved;" (type_identifier) "BYTE" (field_identifier) "rgbReserved" (;) ";" (}) "}" (type_identifier) "RGBQUAD" (;) ";" (comment) "/* Bitmasks specify which bits are occupied by what colors\n in 16 and 32 bit bitmaps. Three RBGQUADs specify the red, green, and\n blue bitmasks respectively. */" (comment) "/* Last would come the bitmap bits (palette indices or literal RGB\n values). */" (preproc_call) "#pragma pack(pop)\n" (preproc_directive) "#pragma" (preproc_arg) "pack(pop)" (comment) "/* #pragma ms-struct(pop) */"
265
0
{"language": "c", "success": true, "metadata": {"lines": 77, "avg_line_length": 28.1, "nodes": 182, "errors": 0, "source_hash": "f36831bd4de292f2ce9c94b3e6ba2742fa93b65d8188e7b8a030b876370f9570", "categorized_nodes": 140}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "type_definition", "text": "typedef unsigned char BYTE;", "parent": null, "children": [1, 2, 5], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 27}}, {"id": 1, "type": "typedef", "text": "typedef", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "sized_type_specifier", "text": "unsigned char", "parent": 0, "children": [3, 4], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 21}}, {"id": 3, "type": "unsigned", "text": "unsigned", "parent": 2, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 16}}, {"id": 4, "type": "primitive_type", "text": "char", "parent": 2, "children": [], "start_point": {"row": 4, "column": 17}, "end_point": {"row": 4, "column": 21}}, {"id": 5, "type": "type_identifier", "text": "BYTE", "parent": 0, "children": [], "start_point": {"row": 4, "column": 22}, "end_point": {"row": 4, "column": 26}}, {"id": 6, "type": "type_definition", "text": "typedef unsigned short WORD;", "parent": null, "children": [7, 8, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 28}}, {"id": 7, "type": "typedef", "text": "typedef", "parent": 6, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 8, "type": "sized_type_specifier", "text": "unsigned short", "parent": 6, "children": [9, 10], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 22}}, {"id": 9, "type": "unsigned", "text": "unsigned", "parent": 8, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 16}}, {"id": 10, "type": "short", "text": "short", "parent": 8, "children": [], "start_point": {"row": 5, "column": 17}, "end_point": {"row": 5, "column": 22}}, {"id": 11, "type": "type_identifier", "text": "WORD", "parent": 6, "children": [], "start_point": {"row": 5, "column": 23}, "end_point": {"row": 5, "column": 27}}, {"id": 12, "type": "type_definition", "text": "typedef unsigned int DWORD;", "parent": null, "children": [13, 14, 17], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 27}}, {"id": 13, "type": "typedef", "text": "typedef", "parent": 12, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 14, "type": "sized_type_specifier", "text": "unsigned int", "parent": 12, "children": [15, 16], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 20}}, {"id": 15, "type": "unsigned", "text": "unsigned", "parent": 14, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 16}}, {"id": 16, "type": "primitive_type", "text": "int", "parent": 14, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 20}}, {"id": 17, "type": "type_identifier", "text": "DWORD", "parent": 12, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 26}}, {"id": 18, "type": "type_definition", "text": "typedef long LONG;", "parent": null, "children": [19, 20, 22], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 18}}, {"id": 19, "type": "typedef", "text": "typedef", "parent": 18, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 20, "type": "sized_type_specifier", "text": "long", "parent": 18, "children": [21], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 12}}, {"id": 21, "type": "long", "text": "long", "parent": 20, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 12}}, {"id": 22, "type": "type_identifier", "text": "LONG", "parent": 18, "children": [], "start_point": {"row": 9, "column": 13}, "end_point": {"row": 9, "column": 17}}, {"id": 23, "type": "preproc_call", "text": "#pragma pack(push,1)\n", "parent": null, "children": [24, 25], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 24, "type": "preproc_directive", "text": "#pragma", "parent": 23, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 25, "type": "preproc_arg", "text": "pack(push,1)", "parent": 23, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 20}}, {"id": 26, "type": "type_definition", "text": "typedef struct tagICOINFOHEDAER\n{\n\tWORD\treserved;\t/* Should be 0 */\n\tWORD\ttype;\t\t/* 1 for icon, 2 for cursor */\n\tWORD\tcount;\t\t/* image count */\n} ICOINFOHEADER;", "parent": null, "children": [27, 28, 40], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 20, "column": 16}}, {"id": 27, "type": "typedef", "text": "typedef", "parent": 26, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 28, "type": "struct_specifier", "text": "struct tagICOINFOHEDAER\n{\n\tWORD\treserved;\t/* Should be 0 */\n\tWORD\ttype;\t\t/* 1 for icon, 2 for cursor */\n\tWORD\tcount;\t\t/* image count */\n}", "parent": 26, "children": [29, 30], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 20, "column": 1}}, {"id": 29, "type": "struct", "text": "struct", "parent": 28, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 14}}, {"id": 30, "type": "type_identifier", "text": "tagICOINFOHEDAER", "parent": 28, "children": [], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 31}}, {"id": 31, "type": "field_declaration", "text": "WORD\treserved;", "parent": 28, "children": [32, 33], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 15}}, {"id": 32, "type": "type_identifier", "text": "WORD", "parent": 31, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 5}}, {"id": 33, "type": "field_identifier", "text": "reserved", "parent": 31, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 14}}, {"id": 34, "type": "field_declaration", "text": "WORD\ttype;", "parent": 28, "children": [35, 36], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 11}}, {"id": 35, "type": "type_identifier", "text": "WORD", "parent": 34, "children": [], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 18, "column": 5}}, {"id": 36, "type": "field_identifier", "text": "type", "parent": 34, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 10}}, {"id": 37, "type": "field_declaration", "text": "WORD\tcount;", "parent": 28, "children": [38, 39], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 12}}, {"id": 38, "type": "type_identifier", "text": "WORD", "parent": 37, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 5}}, {"id": 39, "type": "field_identifier", "text": "count", "parent": 37, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 11}}, {"id": 40, "type": "type_identifier", "text": "ICOINFOHEADER", "parent": 26, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 15}}, {"id": 41, "type": "type_definition", "text": "typedef struct tagICODIRECTORY\n{\n\tBYTE\twidth;\n\tBYTE\theight;\n\tBYTE\tcolorCount;\t\t/* Number of colors if less than 256 */\n\tBYTE\treserved;\n\tWORD\tcolorPlanes;\t/* should be 0 or 1 or X hotspot */\n\tWORD\tbpp;\t\t\t/* or Y hotspot */\n\tDWORD\timgSize;\n\tDWORD\timgOffset;\n} ICODIRECTORY;", "parent": null, "children": [42, 43, 70], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 32, "column": 15}}, {"id": 42, "type": "typedef", "text": "typedef", "parent": 41, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 43, "type": "struct_specifier", "text": "struct tagICODIRECTORY\n{\n\tBYTE\twidth;\n\tBYTE\theight;\n\tBYTE\tcolorCount;\t\t/* Number of colors if less than 256 */\n\tBYTE\treserved;\n\tWORD\tcolorPlanes;\t/* should be 0 or 1 or X hotspot */\n\tWORD\tbpp;\t\t\t/* or Y hotspot */\n\tDWORD\timgSize;\n\tDWORD\timgOffset;\n}", "parent": 41, "children": [44, 45], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 32, "column": 1}}, {"id": 44, "type": "struct", "text": "struct", "parent": 43, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 14}}, {"id": 45, "type": "type_identifier", "text": "tagICODIRECTORY", "parent": 43, "children": [], "start_point": {"row": 22, "column": 15}, "end_point": {"row": 22, "column": 30}}, {"id": 46, "type": "field_declaration", "text": "BYTE\twidth;", "parent": 43, "children": [47, 48], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 12}}, {"id": 47, "type": "type_identifier", "text": "BYTE", "parent": 46, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 5}}, {"id": 48, "type": "field_identifier", "text": "width", "parent": 46, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 11}}, {"id": 49, "type": "field_declaration", "text": "BYTE\theight;", "parent": 43, "children": [50, 51], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 13}}, {"id": 50, "type": "type_identifier", "text": "BYTE", "parent": 49, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 5}}, {"id": 51, "type": "field_identifier", "text": "height", "parent": 49, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 12}}, {"id": 52, "type": "field_declaration", "text": "BYTE\tcolorCount;", "parent": 43, "children": [53, 54], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 17}}, {"id": 53, "type": "type_identifier", "text": "BYTE", "parent": 52, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 5}}, {"id": 54, "type": "field_identifier", "text": "colorCount", "parent": 52, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 16}}, {"id": 55, "type": "field_declaration", "text": "BYTE\treserved;", "parent": 43, "children": [56, 57], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 15}}, {"id": 56, "type": "type_identifier", "text": "BYTE", "parent": 55, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 5}}, {"id": 57, "type": "field_identifier", "text": "reserved", "parent": 55, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 14}}, {"id": 58, "type": "field_declaration", "text": "WORD\tcolorPlanes;", "parent": 43, "children": [59, 60], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 18}}, {"id": 59, "type": "type_identifier", "text": "WORD", "parent": 58, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 5}}, {"id": 60, "type": "field_identifier", "text": "colorPlanes", "parent": 58, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 17}}, {"id": 61, "type": "field_declaration", "text": "WORD\tbpp;", "parent": 43, "children": [62, 63], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 10}}, {"id": 62, "type": "type_identifier", "text": "WORD", "parent": 61, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 5}}, {"id": 63, "type": "field_identifier", "text": "bpp", "parent": 61, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 9}}, {"id": 64, "type": "field_declaration", "text": "DWORD\timgSize;", "parent": 43, "children": [65, 66], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 15}}, {"id": 65, "type": "type_identifier", "text": "DWORD", "parent": 64, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 6}}, {"id": 66, "type": "field_identifier", "text": "imgSize", "parent": 64, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 14}}, {"id": 67, "type": "field_declaration", "text": "DWORD\timgOffset;", "parent": 43, "children": [68, 69], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 17}}, {"id": 68, "type": "type_identifier", "text": "DWORD", "parent": 67, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 6}}, {"id": 69, "type": "field_identifier", "text": "imgOffset", "parent": 67, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 16}}, {"id": 70, "type": "type_identifier", "text": "ICODIRECTORY", "parent": 41, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 14}}, {"id": 71, "type": "type_definition", "text": "typedef struct tagBITMAPFILEHEADER\n{\n\tWORD\tbfType; /* should equal \"BM\" */\n\tDWORD\tbfSize; /* total file size */\n\tWORD\tbfReserved1;\n\tWORD\tbfReserved2;\n\tDWORD\tbfOffBits; /* offset to bitmap bits */\n} BITMAPFILEHEADER, *PBITMAPFILEHEADER;", "parent": null, "children": [72, 73, 91, 92], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 45, "column": 39}}, {"id": 72, "type": "typedef", "text": "typedef", "parent": 71, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 73, "type": "struct_specifier", "text": "struct tagBITMAPFILEHEADER\n{\n\tWORD\tbfType; /* should equal \"BM\" */\n\tDWORD\tbfSize; /* total file size */\n\tWORD\tbfReserved1;\n\tWORD\tbfReserved2;\n\tDWORD\tbfOffBits; /* offset to bitmap bits */\n}", "parent": 71, "children": [74, 75], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 45, "column": 1}}, {"id": 74, "type": "struct", "text": "struct", "parent": 73, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 14}}, {"id": 75, "type": "type_identifier", "text": "tagBITMAPFILEHEADER", "parent": 73, "children": [], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 34}}, {"id": 76, "type": "field_declaration", "text": "WORD\tbfType;", "parent": 73, "children": [77, 78], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 13}}, {"id": 77, "type": "type_identifier", "text": "WORD", "parent": 76, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 5}}, {"id": 78, "type": "field_identifier", "text": "bfType", "parent": 76, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 12}}, {"id": 79, "type": "field_declaration", "text": "DWORD\tbfSize;", "parent": 73, "children": [80, 81], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 14}}, {"id": 80, "type": "type_identifier", "text": "DWORD", "parent": 79, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 6}}, {"id": 81, "type": "field_identifier", "text": "bfSize", "parent": 79, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 13}}, {"id": 82, "type": "field_declaration", "text": "WORD\tbfReserved1;", "parent": 73, "children": [83, 84], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 18}}, {"id": 83, "type": "type_identifier", "text": "WORD", "parent": 82, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 5}}, {"id": 84, "type": "field_identifier", "text": "bfReserved1", "parent": 82, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 17}}, {"id": 85, "type": "field_declaration", "text": "WORD\tbfReserved2;", "parent": 73, "children": [86, 87], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 18}}, {"id": 86, "type": "type_identifier", "text": "WORD", "parent": 85, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 5}}, {"id": 87, "type": "field_identifier", "text": "bfReserved2", "parent": 85, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 17}}, {"id": 88, "type": "field_declaration", "text": "DWORD\tbfOffBits;", "parent": 73, "children": [89, 90], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 17}}, {"id": 89, "type": "type_identifier", "text": "DWORD", "parent": 88, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 6}}, {"id": 90, "type": "field_identifier", "text": "bfOffBits", "parent": 88, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 16}}, {"id": 91, "type": "type_identifier", "text": "BITMAPFILEHEADER", "parent": 71, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 18}}, {"id": 92, "type": "pointer_declarator", "text": "*PBITMAPFILEHEADER", "parent": 71, "children": [93, 94], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 38}}, {"id": 93, "type": "*", "text": "*", "parent": 92, "children": [], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 21}}, {"id": 94, "type": "type_identifier", "text": "PBITMAPFILEHEADER", "parent": 92, "children": [], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 38}}, {"id": 95, "type": "type_definition", "text": "typedef struct tagBITMAPINFOHEADER\n{\n\tDWORD\tbiSize;\n\tLONG\tbiWidth;\n\tLONG\tbiHeight;\n\tWORD\tbiPlanes;\n\tWORD\tbiBitCount;\n\tDWORD\tbiCompression;\n\tDWORD\tbiSizeImage;\n\tLONG\tbiXPelsPerMeter; /* Pixels per Meter */\n\tLONG\tbiYPelsPerMeter;\n\tDWORD\tbiClrUsed;\n\tDWORD\tbiClrImportant;\n} BITMAPINFOHEADER, *PBITMAPINFOHEADER;", "parent": null, "children": [96, 97, 133, 134], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 61, "column": 39}}, {"id": 96, "type": "typedef", "text": "typedef", "parent": 95, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 7}}, {"id": 97, "type": "struct_specifier", "text": "struct tagBITMAPINFOHEADER\n{\n\tDWORD\tbiSize;\n\tLONG\tbiWidth;\n\tLONG\tbiHeight;\n\tWORD\tbiPlanes;\n\tWORD\tbiBitCount;\n\tDWORD\tbiCompression;\n\tDWORD\tbiSizeImage;\n\tLONG\tbiXPelsPerMeter; /* Pixels per Meter */\n\tLONG\tbiYPelsPerMeter;\n\tDWORD\tbiClrUsed;\n\tDWORD\tbiClrImportant;\n}", "parent": 95, "children": [98, 99], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 61, "column": 1}}, {"id": 98, "type": "struct", "text": "struct", "parent": 97, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 14}}, {"id": 99, "type": "type_identifier", "text": "tagBITMAPINFOHEADER", "parent": 97, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 34}}, {"id": 100, "type": "field_declaration", "text": "DWORD\tbiSize;", "parent": 97, "children": [101, 102], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 14}}, {"id": 101, "type": "type_identifier", "text": "DWORD", "parent": 100, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 6}}, {"id": 102, "type": "field_identifier", "text": "biSize", "parent": 100, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 13}}, {"id": 103, "type": "field_declaration", "text": "LONG\tbiWidth;", "parent": 97, "children": [104, 105], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 14}}, {"id": 104, "type": "type_identifier", "text": "LONG", "parent": 103, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 5}}, {"id": 105, "type": "field_identifier", "text": "biWidth", "parent": 103, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 13}}, {"id": 106, "type": "field_declaration", "text": "LONG\tbiHeight;", "parent": 97, "children": [107, 108], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 15}}, {"id": 107, "type": "type_identifier", "text": "LONG", "parent": 106, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 5}}, {"id": 108, "type": "field_identifier", "text": "biHeight", "parent": 106, "children": [], "start_point": {"row": 52, "column": 6}, "end_point": {"row": 52, "column": 14}}, {"id": 109, "type": "field_declaration", "text": "WORD\tbiPlanes;", "parent": 97, "children": [110, 111], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 15}}, {"id": 110, "type": "type_identifier", "text": "WORD", "parent": 109, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 5}}, {"id": 111, "type": "field_identifier", "text": "biPlanes", "parent": 109, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 14}}, {"id": 112, "type": "field_declaration", "text": "WORD\tbiBitCount;", "parent": 97, "children": [113, 114], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 17}}, {"id": 113, "type": "type_identifier", "text": "WORD", "parent": 112, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 5}}, {"id": 114, "type": "field_identifier", "text": "biBitCount", "parent": 112, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 16}}, {"id": 115, "type": "field_declaration", "text": "DWORD\tbiCompression;", "parent": 97, "children": [116, 117], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 21}}, {"id": 116, "type": "type_identifier", "text": "DWORD", "parent": 115, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 6}}, {"id": 117, "type": "field_identifier", "text": "biCompression", "parent": 115, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 20}}, {"id": 118, "type": "field_declaration", "text": "DWORD\tbiSizeImage;", "parent": 97, "children": [119, 120], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 19}}, {"id": 119, "type": "type_identifier", "text": "DWORD", "parent": 118, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 6}}, {"id": 120, "type": "field_identifier", "text": "biSizeImage", "parent": 118, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 18}}, {"id": 121, "type": "field_declaration", "text": "LONG\tbiXPelsPerMeter;", "parent": 97, "children": [122, 123], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 22}}, {"id": 122, "type": "type_identifier", "text": "LONG", "parent": 121, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 5}}, {"id": 123, "type": "field_identifier", "text": "biXPelsPerMeter", "parent": 121, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 21}}, {"id": 124, "type": "field_declaration", "text": "LONG\tbiYPelsPerMeter;", "parent": 97, "children": [125, 126], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 22}}, {"id": 125, "type": "type_identifier", "text": "LONG", "parent": 124, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 5}}, {"id": 126, "type": "field_identifier", "text": "biYPelsPerMeter", "parent": 124, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 21}}, {"id": 127, "type": "field_declaration", "text": "DWORD\tbiClrUsed;", "parent": 97, "children": [128, 129], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 17}}, {"id": 128, "type": "type_identifier", "text": "DWORD", "parent": 127, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 6}}, {"id": 129, "type": "field_identifier", "text": "biClrUsed", "parent": 127, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 16}}, {"id": 130, "type": "field_declaration", "text": "DWORD\tbiClrImportant;", "parent": 97, "children": [131, 132], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 22}}, {"id": 131, "type": "type_identifier", "text": "DWORD", "parent": 130, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 6}}, {"id": 132, "type": "field_identifier", "text": "biClrImportant", "parent": 130, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 21}}, {"id": 133, "type": "type_identifier", "text": "BITMAPINFOHEADER", "parent": 95, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 18}}, {"id": 134, "type": "pointer_declarator", "text": "*PBITMAPINFOHEADER", "parent": 95, "children": [135, 136], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 38}}, {"id": 135, "type": "*", "text": "*", "parent": 134, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 21}}, {"id": 136, "type": "type_identifier", "text": "PBITMAPINFOHEADER", "parent": 134, "children": [], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 38}}, {"id": 137, "type": "preproc_def", "text": "#define BI_RGB 0\n", "parent": null, "children": [138, 139, 140], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 65, "column": 0}}, {"id": 138, "type": "#define", "text": "#define", "parent": 137, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 7}}, {"id": 139, "type": "identifier", "text": "BI_RGB", "parent": 137, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 14}}, {"id": 140, "type": "preproc_arg", "text": "0", "parent": 137, "children": [], "start_point": {"row": 64, "column": 22}, "end_point": {"row": 64, "column": 23}}, {"id": 141, "type": "preproc_def", "text": "#define BI_RLE8 1\n", "parent": null, "children": [142, 143, 144], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 66, "column": 0}}, {"id": 142, "type": "#define", "text": "#define", "parent": 141, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 7}}, {"id": 143, "type": "identifier", "text": "BI_RLE8", "parent": 141, "children": [], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 15}}, {"id": 144, "type": "preproc_arg", "text": "1", "parent": 141, "children": [], "start_point": {"row": 65, "column": 22}, "end_point": {"row": 65, "column": 23}}, {"id": 145, "type": "preproc_def", "text": "#define BI_RLE4 2\n", "parent": null, "children": [146, 147, 148], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 67, "column": 0}}, {"id": 146, "type": "#define", "text": "#define", "parent": 145, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 7}}, {"id": 147, "type": "identifier", "text": "BI_RLE4", "parent": 145, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 15}}, {"id": 148, "type": "preproc_arg", "text": "2", "parent": 145, "children": [], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 23}}, {"id": 149, "type": "preproc_def", "text": "#define BI_BITFIELDS 3\n", "parent": null, "children": [150, 151, 152], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 68, "column": 0}}, {"id": 150, "type": "#define", "text": "#define", "parent": 149, "children": [], "start_point": {"row": 67, "column": 0}, "end_point": {"row": 67, "column": 7}}, {"id": 151, "type": "identifier", "text": "BI_BITFIELDS", "parent": 149, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 20}}, {"id": 152, "type": "preproc_arg", "text": "3", "parent": 149, "children": [], "start_point": {"row": 67, "column": 22}, "end_point": {"row": 67, "column": 23}}, {"id": 153, "type": "preproc_def", "text": "#define BI_JPEG 4\n", "parent": null, "children": [154, 155, 156], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 69, "column": 0}}, {"id": 154, "type": "#define", "text": "#define", "parent": 153, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 7}}, {"id": 155, "type": "identifier", "text": "BI_JPEG", "parent": 153, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 15}}, {"id": 156, "type": "preproc_arg", "text": "4", "parent": 153, "children": [], "start_point": {"row": 68, "column": 22}, "end_point": {"row": 68, "column": 23}}, {"id": 157, "type": "preproc_def", "text": "#define BI_PNG 5\n", "parent": null, "children": [158, 159, 160], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 70, "column": 0}}, {"id": 158, "type": "#define", "text": "#define", "parent": 157, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 7}}, {"id": 159, "type": "identifier", "text": "BI_PNG", "parent": 157, "children": [], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 14}}, {"id": 160, "type": "preproc_arg", "text": "5", "parent": 157, "children": [], "start_point": {"row": 69, "column": 22}, "end_point": {"row": 69, "column": 23}}, {"id": 161, "type": "type_definition", "text": "typedef struct tagRGBQUAD {\n BYTE rgbBlue;\n BYTE rgbGreen;\n BYTE rgbRed;\n BYTE rgbReserved;\n} RGBQUAD;", "parent": null, "children": [162, 163, 178], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 78, "column": 10}}, {"id": 162, "type": "typedef", "text": "typedef", "parent": 161, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 7}}, {"id": 163, "type": "struct_specifier", "text": "struct tagRGBQUAD {\n BYTE rgbBlue;\n BYTE rgbGreen;\n BYTE rgbRed;\n BYTE rgbReserved;\n}", "parent": 161, "children": [164, 165], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 78, "column": 1}}, {"id": 164, "type": "struct", "text": "struct", "parent": 163, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 14}}, {"id": 165, "type": "type_identifier", "text": "tagRGBQUAD", "parent": 163, "children": [], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 25}}, {"id": 166, "type": "field_declaration", "text": "BYTE rgbBlue;", "parent": 163, "children": [167, 168], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 18}}, {"id": 167, "type": "type_identifier", "text": "BYTE", "parent": 166, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 6}}, {"id": 168, "type": "field_identifier", "text": "rgbBlue", "parent": 166, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 17}}, {"id": 169, "type": "field_declaration", "text": "BYTE rgbGreen;", "parent": 163, "children": [170, 171], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 19}}, {"id": 170, "type": "type_identifier", "text": "BYTE", "parent": 169, "children": [], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 6}}, {"id": 171, "type": "field_identifier", "text": "rgbGreen", "parent": 169, "children": [], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 75, "column": 18}}, {"id": 172, "type": "field_declaration", "text": "BYTE rgbRed;", "parent": 163, "children": [173, 174], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 17}}, {"id": 173, "type": "type_identifier", "text": "BYTE", "parent": 172, "children": [], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 6}}, {"id": 174, "type": "field_identifier", "text": "rgbRed", "parent": 172, "children": [], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 16}}, {"id": 175, "type": "field_declaration", "text": "BYTE rgbReserved;", "parent": 163, "children": [176, 177], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 22}}, {"id": 176, "type": "type_identifier", "text": "BYTE", "parent": 175, "children": [], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 6}}, {"id": 177, "type": "field_identifier", "text": "rgbReserved", "parent": 175, "children": [], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 21}}, {"id": 178, "type": "type_identifier", "text": "RGBQUAD", "parent": 161, "children": [], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 9}}, {"id": 179, "type": "preproc_call", "text": "#pragma pack(pop)\n", "parent": null, "children": [180, 181], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 87, "column": 0}}, {"id": 180, "type": "preproc_directive", "text": "#pragma", "parent": 179, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 7}}, {"id": 181, "type": "preproc_arg", "text": "pack(pop)", "parent": 179, "children": [], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 17}}]}, "node_categories": {"declarations": {"functions": [], "variables": [0, 6, 12, 18, 26, 31, 34, 37, 41, 46, 49, 52, 55, 58, 61, 64, 67, 71, 76, 79, 82, 85, 88, 95, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, 161, 166, 169, 172, 175], "classes": [28, 29, 43, 44, 73, 74, 97, 98, 163, 164], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [2, 5, 8, 11, 14, 17, 20, 22, 30, 32, 33, 35, 36, 38, 39, 40, 45, 47, 48, 50, 51, 53, 54, 56, 57, 59, 60, 62, 63, 65, 66, 68, 69, 70, 75, 77, 78, 80, 81, 83, 84, 86, 87, 89, 90, 91, 94, 99, 101, 102, 104, 105, 107, 108, 110, 111, 113, 114, 116, 117, 119, 120, 122, 123, 125, 126, 128, 129, 131, 132, 133, 136, 139, 143, 147, 151, 155, 159, 165, 167, 168, 170, 171, 173, 174, 176, 177, 178], "returns": [], "exceptions": []}, "expressions": {"calls": [23, 179], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 28, "universal_type": "class", "name": "tagICOINFOHEDAER", "text_snippet": "struct tagICOINFOHEDAER\n{\n\tWORD\treserved;\t/* Should be 0 */\n\tWORD\ttype;\t\t/* 1 for icon, 2 for cursor"}, {"node_id": 29, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 43, "universal_type": "class", "name": "tagICODIRECTORY", "text_snippet": "struct tagICODIRECTORY\n{\n\tBYTE\twidth;\n\tBYTE\theight;\n\tBYTE\tcolorCount;\t\t/* Number of colors if less t"}, {"node_id": 44, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 73, "universal_type": "class", "name": "tagBITMAPFILEHEADER", "text_snippet": "struct tagBITMAPFILEHEADER\n{\n\tWORD\tbfType; /* should equal \"BM\" */\n\tDWORD\tbfSize; /* total file size"}, {"node_id": 74, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 97, "universal_type": "class", "name": "tagBITMAPINFOHEADER", "text_snippet": "struct tagBITMAPINFOHEADER\n{\n\tDWORD\tbiSize;\n\tLONG\tbiWidth;\n\tLONG\tbiHeight;\n\tWORD\tbiPlanes;\n\tWORD\tbiB"}, {"node_id": 98, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 163, "universal_type": "class", "name": "tagRGBQUAD", "text_snippet": "struct tagRGBQUAD {\n BYTE rgbBlue;\n BYTE rgbGreen;\n BYTE rgbRed;\n BYTE rgbReserved;\n"}, {"node_id": 164, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": []}, "original_source_code": "/* Contains structures required for reading and writing data for this\n program */\n\n/* Simple data definitions */\ntypedef unsigned char BYTE;\ntypedef unsigned short WORD;\n/* N.B.: To get 32-bit on both 32-bit and 64-bit compiles, use `int'\n instead of `long'. */\ntypedef unsigned int DWORD;\ntypedef long LONG; /* ? */\n\n/* #pragma ms-struct(push) */\n#pragma pack(push,1)\n\n/* Icon structures */\ntypedef struct tagICOINFOHEDAER\n{\n\tWORD\treserved;\t/* Should be 0 */\n\tWORD\ttype;\t\t/* 1 for icon, 2 for cursor */\n\tWORD\tcount;\t\t/* image count */\n} ICOINFOHEADER;\n\ntypedef struct tagICODIRECTORY\n{\n\tBYTE\twidth;\n\tBYTE\theight;\n\tBYTE\tcolorCount;\t\t/* Number of colors if less than 256 */\n\tBYTE\treserved;\n\tWORD\tcolorPlanes;\t/* should be 0 or 1 or X hotspot */\n\tWORD\tbpp;\t\t\t/* or Y hotspot */\n\tDWORD\timgSize;\n\tDWORD\timgOffset;\n} ICODIRECTORY;\n\n/* Bitmap structures, copied from Windows Platform SDK */\n/* See the Windows Platform SDK for more details */\n\n/* Bitmap files begin with: */\ntypedef struct tagBITMAPFILEHEADER\n{\n\tWORD\tbfType; /* should equal \"BM\" */\n\tDWORD\tbfSize; /* total file size */\n\tWORD\tbfReserved1;\n\tWORD\tbfReserved2;\n\tDWORD\tbfOffBits; /* offset to bitmap bits */\n} BITMAPFILEHEADER, *PBITMAPFILEHEADER;\n\n/* Next comes: */\ntypedef struct tagBITMAPINFOHEADER\n{\n\tDWORD\tbiSize;\n\tLONG\tbiWidth;\n\tLONG\tbiHeight;\n\tWORD\tbiPlanes;\n\tWORD\tbiBitCount;\n\tDWORD\tbiCompression;\n\tDWORD\tbiSizeImage;\n\tLONG\tbiXPelsPerMeter; /* Pixels per Meter */\n\tLONG\tbiYPelsPerMeter;\n\tDWORD\tbiClrUsed;\n\tDWORD\tbiClrImportant;\n} BITMAPINFOHEADER, *PBITMAPINFOHEADER;\n\n/* Constants for the biCompression field */\n#define BI_RGB 0\n#define BI_RLE8 1\n#define BI_RLE4 2\n#define BI_BITFIELDS 3\n#define BI_JPEG 4\n#define BI_PNG 5\n\n/* Then comes the color palette or bitmasks (if there is/are one/any).\n It/those is/are an array of: */\ntypedef struct tagRGBQUAD {\n BYTE rgbBlue;\n BYTE rgbGreen;\n BYTE rgbRed;\n BYTE rgbReserved;\n} RGBQUAD;\n/* Bitmasks specify which bits are occupied by what colors\n in 16 and 32 bit bitmaps. Three RBGQUADs specify the red, green, and\n blue bitmasks respectively. */\n\n/* Last would come the bitmap bits (palette indices or literal RGB\n values). */\n\n#pragma pack(pop)\n/* #pragma ms-struct(pop) */\n"}
16
c
/** * error.h * * Copyright (C) 2017 <NAME> <<EMAIL>> */ #ifndef GIT_STASHD_ERROR_H #define GIT_STASHD_ERROR_H #include "common.h" int is_error(int); #endif /* GIT_STASHD_ERROR_H */
17.6
10
(translation_unit) "/**\n * error.h\n *\n * Copyright (C) 2017 <NAME> <<EMAIL>>\n */\n\n#ifndef GIT_STASHD_ERROR_H\n#define GIT_STASHD_ERROR_H\n\n#include "common.h"\n\nint is_error(int);\n\n#endif /* GIT_STASHD_ERROR_H */\n" (comment) "/**\n * error.h\n *\n * Copyright (C) 2017 <NAME> <<EMAIL>>\n */" (preproc_ifdef) "#ifndef GIT_STASHD_ERROR_H\n#define GIT_STASHD_ERROR_H\n\n#include "common.h"\n\nint is_error(int);\n\n#endif" (#ifndef) "#ifndef" (identifier) "GIT_STASHD_ERROR_H" (preproc_def) "#define GIT_STASHD_ERROR_H\n" (#define) "#define" (identifier) "GIT_STASHD_ERROR_H" (preproc_include) "#include "common.h"\n" (#include) "#include" (string_literal) ""common.h"" (") """ (string_content) "common.h" (") """ (declaration) "int is_error(int);" (primitive_type) "int" (function_declarator) "is_error(int)" (identifier) "is_error" (parameter_list) "(int)" (() "(" (parameter_declaration) "int" (primitive_type) "int" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* GIT_STASHD_ERROR_H */"
26
0
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 17.6, "nodes": 17, "errors": 0, "source_hash": "56ca4bd05496dd88cd6bdeee4a104fe141a38cc83c95f5327fdadcee1842dd43", "categorized_nodes": 12}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef GIT_STASHD_ERROR_H\n#define GIT_STASHD_ERROR_H\n\n#include \"common.h\"\n\nint is_error(int);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 16], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 13, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 2, "type": "identifier", "text": "GIT_STASHD_ERROR_H", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 26}}, {"id": 3, "type": "preproc_def", "text": "#define GIT_STASHD_ERROR_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 5, "type": "identifier", "text": "GIT_STASHD_ERROR_H", "parent": 3, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 26}}, {"id": 6, "type": "preproc_include", "text": "#include \"common.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"common.h\"", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 19}}, {"id": 9, "type": "declaration", "text": "int is_error(int);", "parent": 0, "children": [10, 11], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 18}}, {"id": 10, "type": "primitive_type", "text": "int", "parent": 9, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 3}}, {"id": 11, "type": "function_declarator", "text": "is_error(int)", "parent": 9, "children": [12, 13], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 17}}, {"id": 12, "type": "identifier", "text": "is_error", "parent": 11, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 12}}, {"id": 13, "type": "parameter_list", "text": "(int)", "parent": 11, "children": [14], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 17}}, {"id": 14, "type": "parameter_declaration", "text": "int", "parent": 13, "children": [15], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 16}}, {"id": 15, "type": "primitive_type", "text": "int", "parent": 14, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 16}}, {"id": 16, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 6}}]}, "node_categories": {"declarations": {"functions": [11], "variables": [9, 14], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 12, 16], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "is_error(int)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"common.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/**\n * error.h\n *\n * Copyright (C) 2017 <NAME> <<EMAIL>>\n */\n\n#ifndef GIT_STASHD_ERROR_H\n#define GIT_STASHD_ERROR_H\n\n#include \"common.h\"\n\nint is_error(int);\n\n#endif /* GIT_STASHD_ERROR_H */\n"}
17
c
#ifdef __OBJC__ #import <UIKit/UIKit.h> #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif FOUNDATION_EXPORT double BindableVersionNumber; FOUNDATION_EXPORT const unsigned char BindableVersionString[];
20.86
14
(translation_unit) "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern "C"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif\n\n\nFOUNDATION_EXPORT double BindableVersionNumber;\nFOUNDATION_EXPORT const unsigned char BindableVersionString[];\n\n" (preproc_ifdef) "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern "C"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif" (#ifdef) "#ifdef" (identifier) "__OBJC__" (preproc_call) "#import <UIKit/UIKit.h>\n" (preproc_directive) "#import" (preproc_arg) "<UIKit/UIKit.h>" (preproc_else) "#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern "C"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif" (#else) "#else" (preproc_ifdef) "#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern "C"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif" (#ifndef) "#ifndef" (identifier) "FOUNDATION_EXPORT" (preproc_if) "#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern "C"\n#else\n#define FOUNDATION_EXPORT extern\n#endif" (#if) "#if" (preproc_defined) "defined(__cplusplus)" (defined) "defined" (() "(" (identifier) "__cplusplus" ()) ")" ( ) "\n" (preproc_def) "#define FOUNDATION_EXPORT extern "C"\n" (#define) "#define" (identifier) "FOUNDATION_EXPORT" (preproc_arg) "extern "C"" (preproc_else) "#else\n#define FOUNDATION_EXPORT extern\n" (#else) "#else" (preproc_def) "#define FOUNDATION_EXPORT extern\n" (#define) "#define" (identifier) "FOUNDATION_EXPORT" (preproc_arg) "extern" (#endif) "#endif" (#endif) "#endif" (#endif) "#endif" (declaration) "FOUNDATION_EXPORT double BindableVersionNumber;" (type_identifier) "FOUNDATION_EXPORT" (ERROR) "double" (identifier) "double" (identifier) "BindableVersionNumber" (;) ";" (declaration) "FOUNDATION_EXPORT const unsigned" (type_identifier) "FOUNDATION_EXPORT" (type_qualifier) "const" (const) "const" (identifier) "unsigned" (;) "" (declaration) "char BindableVersionString[];" (primitive_type) "char" (array_declarator) "BindableVersionString[]" (identifier) "BindableVersionString" ([) "[" (]) "]" (;) ";"
52
1
{"language": "c", "success": true, "metadata": {"lines": 14, "avg_line_length": 20.86, "nodes": 42, "errors": 0, "source_hash": "761ba40ae2b5c1a9a1c4cc3467e5600660c570e5d4bc01abab69fcc0f1e1eaa9", "categorized_nodes": 24}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif", "parent": null, "children": [1, 2, 3, 6, 29], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 1, "type": "#ifdef", "text": "#ifdef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 6}}, {"id": 2, "type": "identifier", "text": "__OBJC__", "parent": 0, "children": [], "start_point": {"row": 0, "column": 7}, "end_point": {"row": 0, "column": 15}}, {"id": 3, "type": "preproc_call", "text": "#import <UIKit/UIKit.h>\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "preproc_directive", "text": "#import", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "preproc_arg", "text": "<UIKit/UIKit.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 23}}, {"id": 6, "type": "preproc_else", "text": "#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif", "parent": 0, "children": [7, 8], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 7, "type": "#else", "text": "#else", "parent": 6, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 5}}, {"id": 8, "type": "preproc_ifdef", "text": "#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif", "parent": 6, "children": [9, 10, 11, 28], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 9, "type": "#ifndef", "text": "#ifndef", "parent": 8, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 10, "type": "identifier", "text": "FOUNDATION_EXPORT", "parent": 8, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 25}}, {"id": 11, "type": "preproc_if", "text": "#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif", "parent": 8, "children": [12, 13, 16, 17, 21, 27], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 12, "type": "#if", "text": "#if", "parent": 11, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 3}}, {"id": 13, "type": "preproc_defined", "text": "defined(__cplusplus)", "parent": 11, "children": [14, 15], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 24}}, {"id": 14, "type": "defined", "text": "defined", "parent": 13, "children": [], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 11}}, {"id": 15, "type": "identifier", "text": "__cplusplus", "parent": 13, "children": [], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 23}}, {"id": 16, "type": "\n", "text": "\n", "parent": 11, "children": [], "start_point": {"row": 4, "column": 24}, "end_point": {"row": 5, "column": 0}}, {"id": 17, "type": "preproc_def", "text": "#define FOUNDATION_EXPORT extern \"C\"\n", "parent": 11, "children": [18, 19, 20], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 18, "type": "#define", "text": "#define", "parent": 17, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 19, "type": "identifier", "text": "FOUNDATION_EXPORT", "parent": 17, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 25}}, {"id": 20, "type": "preproc_arg", "text": "extern \"C\"", "parent": 17, "children": [], "start_point": {"row": 5, "column": 26}, "end_point": {"row": 5, "column": 36}}, {"id": 21, "type": "preproc_else", "text": "#else\n#define FOUNDATION_EXPORT extern\n", "parent": 11, "children": [22, 23], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 22, "type": "#else", "text": "#else", "parent": 21, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 5}}, {"id": 23, "type": "preproc_def", "text": "#define FOUNDATION_EXPORT extern\n", "parent": 21, "children": [24, 25, 26], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 24, "type": "#define", "text": "#define", "parent": 23, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 25, "type": "identifier", "text": "FOUNDATION_EXPORT", "parent": 23, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 25}}, {"id": 26, "type": "preproc_arg", "text": "extern", "parent": 23, "children": [], "start_point": {"row": 7, "column": 26}, "end_point": {"row": 7, "column": 32}}, {"id": 27, "type": "#endif", "text": "#endif", "parent": 11, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 28, "type": "#endif", "text": "#endif", "parent": 8, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 29, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 30, "type": "declaration", "text": "FOUNDATION_EXPORT double BindableVersionNumber;", "parent": null, "children": [31, 32, 34], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 47}}, {"id": 31, "type": "type_identifier", "text": "FOUNDATION_EXPORT", "parent": 30, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 17}}, {"id": 32, "type": "ERROR", "text": "double", "parent": 30, "children": [33], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 24}}, {"id": 33, "type": "identifier", "text": "double", "parent": 32, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 24}}, {"id": 34, "type": "identifier", "text": "BindableVersionNumber", "parent": 30, "children": [], "start_point": {"row": 13, "column": 25}, "end_point": {"row": 13, "column": 46}}, {"id": 35, "type": "declaration", "text": "FOUNDATION_EXPORT const unsigned", "parent": null, "children": [36, 37], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 32}}, {"id": 36, "type": "type_identifier", "text": "FOUNDATION_EXPORT", "parent": 35, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 17}}, {"id": 37, "type": "identifier", "text": "unsigned", "parent": 35, "children": [], "start_point": {"row": 14, "column": 24}, "end_point": {"row": 14, "column": 32}}, {"id": 38, "type": "declaration", "text": "char BindableVersionString[];", "parent": null, "children": [39, 40], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 62}}, {"id": 39, "type": "primitive_type", "text": "char", "parent": 38, "children": [], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 37}}, {"id": 40, "type": "array_declarator", "text": "BindableVersionString[]", "parent": 38, "children": [41], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 61}}, {"id": 41, "type": "identifier", "text": "BindableVersionString", "parent": 40, "children": [], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 59}}]}, "node_categories": {"declarations": {"functions": [], "variables": [30, 35, 38], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 8, 9, 10, 11, 12, 15, 19, 25, 27, 28, 29, 31, 33, 34, 36, 37, 41], "returns": [], "exceptions": []}, "expressions": {"calls": [3], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif\n\n\nFOUNDATION_EXPORT double BindableVersionNumber;\nFOUNDATION_EXPORT const unsigned char BindableVersionString[];\n\n"}
18
c
#include <stdlib.h> #include <csolve.h> void f (int *y) { int x = *y; csolve_assert(0); } void main () { int *z; z = (int *)malloc(sizeof(int)); f(z); }
14.73
11
(translation_unit) "#include <stdlib.h>\n#include <csolve.h>\n\nvoid f (int *y) {\n int x = *y;\n\n csolve_assert(0);\n}\n\nvoid main () {\n int *z;\n\n z = (int *)malloc(sizeof(int));\n f(z);\n}\n" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <csolve.h>\n" (#include) "#include" (system_lib_string) "<csolve.h>" (function_definition) "void f (int *y) {\n int x = *y;\n\n csolve_assert(0);\n}" (primitive_type) "void" (function_declarator) "f (int *y)" (identifier) "f" (parameter_list) "(int *y)" (() "(" (parameter_declaration) "int *y" (primitive_type) "int" (pointer_declarator) "*y" (*) "*" (identifier) "y" ()) ")" (compound_statement) "{\n int x = *y;\n\n csolve_assert(0);\n}" ({) "{" (declaration) "int x = *y;" (primitive_type) "int" (init_declarator) "x = *y" (identifier) "x" (=) "=" (pointer_expression) "*y" (*) "*" (identifier) "y" (;) ";" (expression_statement) "csolve_assert(0);" (call_expression) "csolve_assert(0)" (identifier) "csolve_assert" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (}) "}" (function_definition) "void main () {\n int *z;\n\n z = (int *)malloc(sizeof(int));\n f(z);\n}" (primitive_type) "void" (function_declarator) "main ()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n int *z;\n\n z = (int *)malloc(sizeof(int));\n f(z);\n}" ({) "{" (declaration) "int *z;" (primitive_type) "int" (pointer_declarator) "*z" (*) "*" (identifier) "z" (;) ";" (expression_statement) "z = (int *)malloc(sizeof(int));" (assignment_expression) "z = (int *)malloc(sizeof(int))" (identifier) "z" (=) "=" (cast_expression) "(int *)malloc(sizeof(int))" (() "(" (type_descriptor) "int *" (primitive_type) "int" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(sizeof(int))" (identifier) "malloc" (argument_list) "(sizeof(int))" (() "(" (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" ()) ")" (;) ";" (expression_statement) "f(z);" (call_expression) "f(z)" (identifier) "f" (argument_list) "(z)" (() "(" (identifier) "z" ()) ")" (;) ";" (}) "}"
86
0
{"language": "c", "success": true, "metadata": {"lines": 11, "avg_line_length": 14.73, "nodes": 56, "errors": 0, "source_hash": "5399bd6f082d488cf0d74b555161cc65a9ba1c7b6528ef3797b62dc2f573a402", "categorized_nodes": 32}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include <csolve.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": "<csolve.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "function_definition", "text": "void f (int *y) {\n int x = *y;\n\n csolve_assert(0);\n}", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 7, "column": 1}}, {"id": 7, "type": "primitive_type", "text": "void", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 4}}, {"id": 8, "type": "function_declarator", "text": "f (int *y)", "parent": 6, "children": [9, 10], "start_point": {"row": 3, "column": 5}, "end_point": {"row": 3, "column": 15}}, {"id": 9, "type": "identifier", "text": "f", "parent": 8, "children": [], "start_point": {"row": 3, "column": 5}, "end_point": {"row": 3, "column": 6}}, {"id": 10, "type": "parameter_list", "text": "(int *y)", "parent": 8, "children": [11], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 15}}, {"id": 11, "type": "parameter_declaration", "text": "int *y", "parent": 10, "children": [12, 13], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 14}}, {"id": 12, "type": "primitive_type", "text": "int", "parent": 11, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 11}}, {"id": 13, "type": "pointer_declarator", "text": "*y", "parent": 11, "children": [14, 15], "start_point": {"row": 3, "column": 12}, "end_point": {"row": 3, "column": 14}}, {"id": 14, "type": "*", "text": "*", "parent": 13, "children": [], "start_point": {"row": 3, "column": 12}, "end_point": {"row": 3, "column": 13}}, {"id": 15, "type": "identifier", "text": "y", "parent": 13, "children": [], "start_point": {"row": 3, "column": 13}, "end_point": {"row": 3, "column": 14}}, {"id": 16, "type": "declaration", "text": "int x = *y;", "parent": 6, "children": [17, 18], "start_point": {"row": 4, "column": 4}, "end_point": {"row": 4, "column": 15}}, {"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": "x = *y", "parent": 16, "children": [19, 20, 21], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 14}}, {"id": 19, "type": "identifier", "text": "x", "parent": 18, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 9}}, {"id": 20, "type": "=", "text": "=", "parent": 18, "children": [], "start_point": {"row": 4, "column": 10}, "end_point": {"row": 4, "column": 11}}, {"id": 21, "type": "pointer_expression", "text": "*y", "parent": 18, "children": [22, 23], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 14}}, {"id": 22, "type": "*", "text": "*", "parent": 21, "children": [], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 13}}, {"id": 23, "type": "identifier", "text": "y", "parent": 21, "children": [], "start_point": {"row": 4, "column": 13}, "end_point": {"row": 4, "column": 14}}, {"id": 24, "type": "call_expression", "text": "csolve_assert(0)", "parent": 6, "children": [25, 26], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 20}}, {"id": 25, "type": "identifier", "text": "csolve_assert", "parent": 24, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 17}}, {"id": 26, "type": "argument_list", "text": "(0)", "parent": 24, "children": [27], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 20}}, {"id": 27, "type": "number_literal", "text": "0", "parent": 26, "children": [], "start_point": {"row": 6, "column": 18}, "end_point": {"row": 6, "column": 19}}, {"id": 28, "type": "function_definition", "text": "void main () {\n int *z;\n\n z = (int *)malloc(sizeof(int));\n f(z);\n}", "parent": null, "children": [29, 30], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 29, "type": "primitive_type", "text": "void", "parent": 28, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 4}}, {"id": 30, "type": "function_declarator", "text": "main ()", "parent": 28, "children": [31, 32], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 12}}, {"id": 31, "type": "identifier", "text": "main", "parent": 30, "children": [], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 9}}, {"id": 32, "type": "parameter_list", "text": "()", "parent": 30, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 12}}, {"id": 33, "type": "declaration", "text": "int *z;", "parent": 28, "children": [34, 35], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 11}}, {"id": 34, "type": "primitive_type", "text": "int", "parent": 33, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 7}}, {"id": 35, "type": "pointer_declarator", "text": "*z", "parent": 33, "children": [36, 37], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 10}}, {"id": 36, "type": "*", "text": "*", "parent": 35, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 9}}, {"id": 37, "type": "identifier", "text": "z", "parent": 35, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 10}}, {"id": 38, "type": "assignment_expression", "text": "z = (int *)malloc(sizeof(int))", "parent": 28, "children": [39, 40, 41], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 34}}, {"id": 39, "type": "identifier", "text": "z", "parent": 38, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 5}}, {"id": 40, "type": "=", "text": "=", "parent": 38, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 7}}, {"id": 41, "type": "cast_expression", "text": "(int *)malloc(sizeof(int))", "parent": 38, "children": [42, 46], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 34}}, {"id": 42, "type": "type_descriptor", "text": "int *", "parent": 41, "children": [43, 44], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 14}}, {"id": 43, "type": "primitive_type", "text": "int", "parent": 42, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 12}}, {"id": 44, "type": "abstract_pointer_declarator", "text": "*", "parent": 42, "children": [45], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 14}}, {"id": 45, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 14}}, {"id": 46, "type": "call_expression", "text": "malloc(sizeof(int))", "parent": 41, "children": [47, 48], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 34}}, {"id": 47, "type": "identifier", "text": "malloc", "parent": 46, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 21}}, {"id": 48, "type": "argument_list", "text": "(sizeof(int))", "parent": 46, "children": [49], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 34}}, {"id": 49, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 48, "children": [50], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 33}}, {"id": 50, "type": "type_descriptor", "text": "int", "parent": 49, "children": [51], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 32}}, {"id": 51, "type": "primitive_type", "text": "int", "parent": 50, "children": [], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 32}}, {"id": 52, "type": "call_expression", "text": "f(z)", "parent": 28, "children": [53, 54], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 8}}, {"id": 53, "type": "identifier", "text": "f", "parent": 52, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 5}}, {"id": 54, "type": "argument_list", "text": "(z)", "parent": 52, "children": [55], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 8}}, {"id": 55, "type": "identifier", "text": "z", "parent": 54, "children": [], "start_point": {"row": 13, "column": 6}, "end_point": {"row": 13, "column": 7}}]}, "node_categories": {"declarations": {"functions": [6, 8, 28, 30], "variables": [11, 16, 33], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [21, 24, 41, 46, 49, 52], "assignments": [38], "loops": [], "conditionals": [9, 15, 19, 23, 25, 31, 37, 39, 47, 53, 55], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 27], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "f", "text_snippet": "void f (int *y) {\n int x = *y;\n\n csolve_assert(0);\n}"}, {"node_id": 8, "universal_type": "function", "name": "unknown", "text_snippet": "f (int *y)"}, {"node_id": 28, "universal_type": "function", "name": "main", "text_snippet": "void main () {\n int *z;\n\n z = (int *)malloc(sizeof(int));\n f(z);\n}"}, {"node_id": 30, "universal_type": "function", "name": "unknown", "text_snippet": "main ()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdlib.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <csolve.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include <stdlib.h>\n#include <csolve.h>\n\nvoid f (int *y) {\n int x = *y;\n\n csolve_assert(0);\n}\n\nvoid main () {\n int *z;\n\n z = (int *)malloc(sizeof(int));\n f(z);\n}\n"}
19
c
#pragma once #include "sys/types.h" struct thread; void timer_add_sleep(struct thread *thr); void timer_remove_sleep(struct thread *thr); void amd64_timer_init(void);
26.83
6
(translation_unit) "#pragma once\n#include "sys/types.h"\n\nstruct thread;\n\nvoid timer_add_sleep(struct thread *thr);\nvoid timer_remove_sleep(struct thread *thr);\nvoid amd64_timer_init(void);\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "sys/types.h"\n" (#include) "#include" (string_literal) ""sys/types.h"" (") """ (string_content) "sys/types.h" (") """ (struct_specifier) "struct thread" (struct) "struct" (type_identifier) "thread" (;) ";" (declaration) "void timer_add_sleep(struct thread *thr);" (primitive_type) "void" (function_declarator) "timer_add_sleep(struct thread *thr)" (identifier) "timer_add_sleep" (parameter_list) "(struct thread *thr)" (() "(" (parameter_declaration) "struct thread *thr" (struct_specifier) "struct thread" (struct) "struct" (type_identifier) "thread" (pointer_declarator) "*thr" (*) "*" (identifier) "thr" ()) ")" (;) ";" (declaration) "void timer_remove_sleep(struct thread *thr);" (primitive_type) "void" (function_declarator) "timer_remove_sleep(struct thread *thr)" (identifier) "timer_remove_sleep" (parameter_list) "(struct thread *thr)" (() "(" (parameter_declaration) "struct thread *thr" (struct_specifier) "struct thread" (struct) "struct" (type_identifier) "thread" (pointer_declarator) "*thr" (*) "*" (identifier) "thr" ()) ")" (;) ";" (declaration) "void amd64_timer_init(void);" (primitive_type) "void" (function_declarator) "amd64_timer_init(void)" (identifier) "amd64_timer_init" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";"
54
0
{"language": "c", "success": true, "metadata": {"lines": 6, "avg_line_length": 26.83, "nodes": 40, "errors": 0, "source_hash": "8139071470a6b7aab54b20a2d9c7140f3a91f0567d4176cc5d17d7f7c8c65142", "categorized_nodes": 27}, "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 \"sys/types.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": "\"sys/types.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 22}}, {"id": 6, "type": "struct_specifier", "text": "struct thread", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 13}}, {"id": 7, "type": "struct", "text": "struct", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 6}}, {"id": 8, "type": "type_identifier", "text": "thread", "parent": 6, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 13}}, {"id": 9, "type": "declaration", "text": "void timer_add_sleep(struct thread *thr);", "parent": null, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 41}}, {"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": "timer_add_sleep(struct thread *thr)", "parent": 9, "children": [12, 13], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 40}}, {"id": 12, "type": "identifier", "text": "timer_add_sleep", "parent": 11, "children": [], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 20}}, {"id": 13, "type": "parameter_list", "text": "(struct thread *thr)", "parent": 11, "children": [14], "start_point": {"row": 5, "column": 20}, "end_point": {"row": 5, "column": 40}}, {"id": 14, "type": "parameter_declaration", "text": "struct thread *thr", "parent": 13, "children": [15, 18], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 39}}, {"id": 15, "type": "struct_specifier", "text": "struct thread", "parent": 14, "children": [16, 17], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 34}}, {"id": 16, "type": "struct", "text": "struct", "parent": 15, "children": [], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 27}}, {"id": 17, "type": "type_identifier", "text": "thread", "parent": 15, "children": [], "start_point": {"row": 5, "column": 28}, "end_point": {"row": 5, "column": 34}}, {"id": 18, "type": "pointer_declarator", "text": "*thr", "parent": 14, "children": [19, 20], "start_point": {"row": 5, "column": 35}, "end_point": {"row": 5, "column": 39}}, {"id": 19, "type": "*", "text": "*", "parent": 18, "children": [], "start_point": {"row": 5, "column": 35}, "end_point": {"row": 5, "column": 36}}, {"id": 20, "type": "identifier", "text": "thr", "parent": 18, "children": [], "start_point": {"row": 5, "column": 36}, "end_point": {"row": 5, "column": 39}}, {"id": 21, "type": "declaration", "text": "void timer_remove_sleep(struct thread *thr);", "parent": null, "children": [22, 23], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 44}}, {"id": 22, "type": "primitive_type", "text": "void", "parent": 21, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 4}}, {"id": 23, "type": "function_declarator", "text": "timer_remove_sleep(struct thread *thr)", "parent": 21, "children": [24, 25], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 43}}, {"id": 24, "type": "identifier", "text": "timer_remove_sleep", "parent": 23, "children": [], "start_point": {"row": 6, "column": 5}, "end_point": {"row": 6, "column": 23}}, {"id": 25, "type": "parameter_list", "text": "(struct thread *thr)", "parent": 23, "children": [26], "start_point": {"row": 6, "column": 23}, "end_point": {"row": 6, "column": 43}}, {"id": 26, "type": "parameter_declaration", "text": "struct thread *thr", "parent": 25, "children": [27, 30], "start_point": {"row": 6, "column": 24}, "end_point": {"row": 6, "column": 42}}, {"id": 27, "type": "struct_specifier", "text": "struct thread", "parent": 26, "children": [28, 29], "start_point": {"row": 6, "column": 24}, "end_point": {"row": 6, "column": 37}}, {"id": 28, "type": "struct", "text": "struct", "parent": 27, "children": [], "start_point": {"row": 6, "column": 24}, "end_point": {"row": 6, "column": 30}}, {"id": 29, "type": "type_identifier", "text": "thread", "parent": 27, "children": [], "start_point": {"row": 6, "column": 31}, "end_point": {"row": 6, "column": 37}}, {"id": 30, "type": "pointer_declarator", "text": "*thr", "parent": 26, "children": [31, 32], "start_point": {"row": 6, "column": 38}, "end_point": {"row": 6, "column": 42}}, {"id": 31, "type": "*", "text": "*", "parent": 30, "children": [], "start_point": {"row": 6, "column": 38}, "end_point": {"row": 6, "column": 39}}, {"id": 32, "type": "identifier", "text": "thr", "parent": 30, "children": [], "start_point": {"row": 6, "column": 39}, "end_point": {"row": 6, "column": 42}}, {"id": 33, "type": "declaration", "text": "void amd64_timer_init(void);", "parent": null, "children": [34, 35], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 28}}, {"id": 34, "type": "primitive_type", "text": "void", "parent": 33, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 4}}, {"id": 35, "type": "function_declarator", "text": "amd64_timer_init(void)", "parent": 33, "children": [36, 37], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 27}}, {"id": 36, "type": "identifier", "text": "amd64_timer_init", "parent": 35, "children": [], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 21}}, {"id": 37, "type": "parameter_list", "text": "(void)", "parent": 35, "children": [38], "start_point": {"row": 7, "column": 21}, "end_point": {"row": 7, "column": 27}}, {"id": 38, "type": "parameter_declaration", "text": "void", "parent": 37, "children": [39], "start_point": {"row": 7, "column": 22}, "end_point": {"row": 7, "column": 26}}, {"id": 39, "type": "primitive_type", "text": "void", "parent": 38, "children": [], "start_point": {"row": 7, "column": 22}, "end_point": {"row": 7, "column": 26}}]}, "node_categories": {"declarations": {"functions": [11, 23, 35], "variables": [9, 14, 21, 26, 33, 38], "classes": [6, 7, 15, 16, 27, 28], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [8, 12, 17, 20, 24, 29, 32, 36], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "timer_add_sleep(struct thread *thr)"}, {"node_id": 23, "universal_type": "function", "name": "unknown", "text_snippet": "timer_remove_sleep(struct thread *thr)"}, {"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "amd64_timer_init(void)"}], "class_declarations": [{"node_id": 6, "universal_type": "class", "name": "thread", "text_snippet": "struct thread"}, {"node_id": 7, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 15, "universal_type": "class", "name": "thread", "text_snippet": "struct thread"}, {"node_id": 16, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 27, "universal_type": "class", "name": "thread", "text_snippet": "struct thread"}, {"node_id": 28, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include \"sys/types.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\n#include \"sys/types.h\"\n\nstruct thread;\n\nvoid timer_add_sleep(struct thread *thr);\nvoid timer_remove_sleep(struct thread *thr);\nvoid amd64_timer_init(void);\n"}
20
c
// // LocationViewController.h // Pro_Motion_App // // Created by <NAME> on 16/12/15. // Copyright © 2015 Mindscrub Technologies. All rights reserved. // #import <UIKit/UIKit.h> //#import "APLGraphView.h" //#import "Pro_Motion_App-Swift.h" #import "DataSimulator.h" #import "CorePlot-CocoaTouch.h" @import Charts; @interface LocationViewController : UIViewController <DataSimulatorDelegate, CPTPlotDataSource> @property(nonatomic, retain) IBOutlet UIView *walkingRunningMan_view; @property(nonatomic, retain) IBOutlet UIView *walkingDirection_view; @property(nonatomic, retain) IBOutlet UIView *walkingPath_view; @property (weak, nonatomic) IBOutlet CPTGraphHostingView *hostView; @property(nonatomic, retain) IBOutlet UIButton *clear_btn; @property (weak, nonatomic) IBOutlet UIImageView *img_RunningMan; @property (weak, nonatomic) IBOutlet LineChartView *chartWalking; @property(nonatomic, retain) IBOutlet UILabel *steps_lbl; @property(nonatomic, retain) IBOutlet UILabel *cadense_lbl; @property(nonatomic, retain) IBOutlet UILabel *headingAngle_lbl; @property (weak, nonatomic) IBOutlet UIButton *btnStartStopLog; - (IBAction)start_stop_logging:(id)sender; @property (weak, nonatomic) IBOutlet UIImageView *imgCompass; - (IBAction)onClear:(UIButton *)sender; @end
40.13
31
(translation_unit) "//\n// LocationViewController.h\n// Pro_Motion_App\n//\n// Created by <NAME> on 16/12/15.\n// Copyright © 2015 Mindscrub Technologies. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n//#import "APLGraphView.h"\n//#import "Pro_Motion_App-Swift.h"\n#import "DataSimulator.h"\n#import "CorePlot-CocoaTouch.h"\n\n@import Charts;\n\n\n\n\n@interface LocationViewController : UIViewController <DataSimulatorDelegate, CPTPlotDataSource>\n\n@property(nonatomic, retain) IBOutlet UIView *walkingRunningMan_view;\n@property(nonatomic, retain) IBOutlet UIView *walkingDirection_view;\n@property(nonatomic, retain) IBOutlet UIView *walkingPath_view;\n@property (weak, nonatomic) IBOutlet CPTGraphHostingView *hostView;\n\n@property(nonatomic, retain) IBOutlet UIButton *clear_btn;\n@property (weak, nonatomic) IBOutlet UIImageView *img_RunningMan;\n@property (weak, nonatomic) IBOutlet LineChartView *chartWalking;\n\n@property(nonatomic, retain) IBOutlet UILabel *steps_lbl;\n@property(nonatomic, retain) IBOutlet UILabel *cadense_lbl;\n@property(nonatomic, retain) IBOutlet UILabel *headingAngle_lbl;\n@property (weak, nonatomic) IBOutlet UIButton *btnStartStopLog;\n- (IBAction)start_stop_logging:(id)sender;\n\n@property (weak, nonatomic) IBOutlet UIImageView *imgCompass;\n- (IBAction)onClear:(UIButton *)sender;\n\n@end\n" (comment) "//" (comment) "// LocationViewController.h" (comment) "// Pro_Motion_App" (comment) "//" (comment) "// Created by <NAME> on 16/12/15." (comment) "// Copyright © 2015 Mindscrub Technologies. All rights reserved.\n" (comment) "/\n" (preproc_call) "import <UIKit/UIKit.h>\n/" (preproc_directive) "import " (preproc_arg) "UIKit/UIKit.h>\n" (comment) "/#import "APLGraphView.h"\n" (comment) "/#import "Pro_Motion_App-Swift.h"\n" (preproc_call) "import "DataSimulator.h"\n#" (preproc_directive) "import " (preproc_arg) "DataSimulator.h"\n" (preproc_call) "import "CorePlot-CocoaTouch.h"\n\n" (preproc_directive) "import " (preproc_arg) "CorePlot-CocoaTouch.h"\n" (ERROR) "i" (ERROR) "i" (declaration) "mport Charts;\n" (type_identifier) "mport " (identifier) "harts;" (;) "\n" (ERROR) "i" (ERROR) "i" (declaration) "nterface LocationViewController : UIViewController <DataSimulatorDelegate, CPTPlotDataSource>\n\n@property(nonatomic, retain) IBOutlet UIView *walkingRunningMan_view;\n" (type_identifier) "nterface " (identifier) "ocationViewController " (ERROR) " UIViewController <DataSimulatorDelegate," (:) " " (identifier) "IViewController " (<) "D" (identifier) "ataSimulatorDelegate," (,) " " (ERROR) "PTPlotDataSource>\n\n@property(nonatomic, retain) IBOutlet UIView " (identifier) "PTPlotDataSource>" (>) "\n" (ERROR) "p" (function_declarator) "roperty(nonatomic, retain) IBOutlet UIView " (identifier) "roperty(" (parameter_list) "nonatomic, retain) " (() "n" (parameter_declaration) "onatomic," (type_identifier) "onatomic," (,) " " (parameter_declaration) "etain)" (type_identifier) "etain)" ()) " " (identifier) "BOutlet " (identifier) "IView " (pointer_declarator) "walkingRunningMan_view;" (*) "w" (identifier) "alkingRunningMan_view;" (;) "\n" (ERROR) "property(nonatomic, retain) IBOutlet " (ERROR) "p" (call_expression) "roperty(nonatomic, retain) " (identifier) "roperty(" (argument_list) "nonatomic, retain) " (() "n" (identifier) "onatomic," (,) " " (identifier) "etain)" ()) " " (identifier) "BOutlet " (declaration) "IView *walkingDirection_view;\n" (type_identifier) "IView " (pointer_declarator) "walkingDirection_view;" (*) "w" (identifier) "alkingDirection_view;" (;) "\n" (ERROR) "property(nonatomic, retain) IBOutlet " (ERROR) "p" (call_expression) "roperty(nonatomic, retain) " (identifier) "roperty(" (argument_list) "nonatomic, retain) " (() "n" (identifier) "onatomic," (,) " " (identifier) "etain)" ()) " " (identifier) "BOutlet " (declaration) "IView *walkingPath_view;\n" (type_identifier) "IView " (pointer_declarator) "walkingPath_view;" (*) "w" (identifier) "alkingPath_view;" (;) "\n" (ERROR) "property (weak, nonatomic) IBOutlet " (ERROR) "p" (call_expression) "roperty (weak, nonatomic) " (identifier) "roperty " (argument_list) "weak, nonatomic) " (() "w" (identifier) "eak," (,) " " (identifier) "onatomic)" ()) " " (identifier) "BOutlet " (declaration) "PTGraphHostingView *hostView;\n" (type_identifier) "PTGraphHostingView " (pointer_declarator) "hostView;" (*) "h" (identifier) "ostView;" (;) "\n" (ERROR) "property(nonatomic, retain) IBOutlet " (ERROR) "p" (call_expression) "roperty(nonatomic, retain) " (identifier) "roperty(" (argument_list) "nonatomic, retain) " (() "n" (identifier) "onatomic," (,) " " (identifier) "etain)" ()) " " (identifier) "BOutlet " (declaration) "IButton *clear_btn;\n" (type_identifier) "IButton " (pointer_declarator) "clear_btn;" (*) "c" (identifier) "lear_btn;" (;) "\n" (ERROR) "property (weak, nonatomic) IBOutlet " (ERROR) "p" (call_expression) "roperty (weak, nonatomic) " (identifier) "roperty " (argument_list) "weak, nonatomic) " (() "w" (identifier) "eak," (,) " " (identifier) "onatomic)" ()) " " (identifier) "BOutlet " (declaration) "IImageView *img_RunningMan;\n" (type_identifier) "IImageView " (pointer_declarator) "img_RunningMan;" (*) "i" (identifier) "mg_RunningMan;" (;) "\n" (ERROR) "property (weak, nonatomic) IBOutlet " (ERROR) "p" (call_expression) "roperty (weak, nonatomic) " (identifier) "roperty " (argument_list) "weak, nonatomic) " (() "w" (identifier) "eak," (,) " " (identifier) "onatomic)" ()) " " (identifier) "BOutlet " (declaration) "ineChartView *chartWalking;\n" (type_identifier) "ineChartView " (pointer_declarator) "chartWalking;" (*) "c" (identifier) "hartWalking;" (;) "\n" (ERROR) "property(nonatomic, retain) IBOutlet " (ERROR) "p" (call_expression) "roperty(nonatomic, retain) " (identifier) "roperty(" (argument_list) "nonatomic, retain) " (() "n" (identifier) "onatomic," (,) " " (identifier) "etain)" ()) " " (identifier) "BOutlet " (declaration) "ILabel *steps_lbl;\n" (type_identifier) "ILabel " (pointer_declarator) "steps_lbl;" (*) "s" (identifier) "teps_lbl;" (;) "\n" (ERROR) "property(nonatomic, retain) IBOutlet " (ERROR) "p" (call_expression) "roperty(nonatomic, retain) " (identifier) "roperty(" (argument_list) "nonatomic, retain) " (() "n" (identifier) "onatomic," (,) " " (identifier) "etain)" ()) " " (identifier) "BOutlet " (declaration) "ILabel *cadense_lbl;\n" (type_identifier) "ILabel " (pointer_declarator) "cadense_lbl;" (*) "c" (identifier) "adense_lbl;" (;) "\n" (ERROR) "property(nonatomic, retain) IBOutlet " (ERROR) "p" (call_expression) "roperty(nonatomic, retain) " (identifier) "roperty(" (argument_list) "nonatomic, retain) " (() "n" (identifier) "onatomic," (,) " " (identifier) "etain)" ()) " " (identifier) "BOutlet " (declaration) "ILabel *headingAngle_lbl;\n" (type_identifier) "ILabel " (pointer_declarator) "headingAngle_lbl;" (*) "h" (identifier) "eadingAngle_lbl;" (;) "\n" (ERROR) "property (weak, nonatomic) IBOutlet " (ERROR) "p" (call_expression) "roperty (weak, nonatomic) " (identifier) "roperty " (argument_list) "weak, nonatomic) " (() "w" (identifier) "eak," (,) " " (identifier) "onatomic)" ()) " " (identifier) "BOutlet " (declaration) "IButton *btnStartStopLog;\n" (type_identifier) "IButton " (pointer_declarator) "btnStartStopLog;" (*) "b" (identifier) "tnStartStopLog;" (;) "\n" (expression_statement) " (IBAction)start_stop_logging:(id)sender;\n" (unary_expression) " (IBAction)start_stop_logging:" (-) " " (cast_expression) "IBAction)start_stop_logging:" (() "I" (type_descriptor) "BAction)" (type_identifier) "BAction)" ()) "s" (identifier) "tart_stop_logging:" (ERROR) "(id)sender;" (:) "(" (() "i" (identifier) "d)" ()) "s" (identifier) "ender;" (;) "\n" (ERROR) "property (weak, nonatomic) IBOutlet " (ERROR) "p" (call_expression) "roperty (weak, nonatomic) " (identifier) "roperty " (argument_list) "weak, nonatomic) " (() "w" (identifier) "eak," (,) " " (identifier) "onatomic)" ()) " " (identifier) "BOutlet " (declaration) "IImageView *imgCompass;\n" (type_identifier) "IImageView " (pointer_declarator) "imgCompass;" (*) "i" (identifier) "mgCompass;" (;) "\n" (ERROR) " (IBAction)onClear:(UIButton *)sender;\n\n@end\n" (binary_expression) " (IBAction)onClear:(UIButton *)sender;" (unary_expression) " (IBAction)onClear:" (-) " " (cast_expression) "IBAction)onClear:" (() "I" (type_descriptor) "BAction)" (type_identifier) "BAction)" ()) "o" (identifier) "nClear:" (ERROR) "(UIButton " (:) "(" (() "U" (identifier) "IButton " (*) ")" (ERROR) "s" ()) "s" (identifier) "ender;" (;) "\n" (ERROR) "e" (identifier) "nd\n"
280
34
{"language": "c", "success": true, "metadata": {"lines": 31, "avg_line_length": 40.13, "nodes": 202, "errors": 0, "source_hash": "3ffd1ed0f52c836657a9301f851666584790c96e55f79f7eb7822ff46a929e96", "categorized_nodes": 123}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "import <UIKit/UIKit.h>\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": "preproc_call", "text": "import \"DataSimulator.h\"\n#", "parent": null, "children": [3], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 3, "type": "preproc_arg", "text": "DataSimulator.h\"\n", "parent": 2, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 25}}, {"id": 4, "type": "preproc_call", "text": "import \"CorePlot-CocoaTouch.h\"\n\n", "parent": null, "children": [5], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 5, "type": "preproc_arg", "text": "CorePlot-CocoaTouch.h\"\n", "parent": 4, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 31}}, {"id": 6, "type": "ERROR", "text": "i", "parent": null, "children": [7], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 7, "type": "ERROR", "text": "i", "parent": 6, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 8, "type": "declaration", "text": "mport Charts;\n", "parent": null, "children": [9, 10], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 15}}, {"id": 9, "type": "type_identifier", "text": "mport ", "parent": 8, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 7}}, {"id": 10, "type": "identifier", "text": "harts;", "parent": 8, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 14}}, {"id": 11, "type": "ERROR", "text": "i", "parent": null, "children": [12], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 12, "type": "ERROR", "text": "i", "parent": 11, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 13, "type": "declaration", "text": "nterface LocationViewController : UIViewController <DataSimulatorDelegate, CPTPlotDataSource>\n\n@property(nonatomic, retain) IBOutlet UIView *walkingRunningMan_view;\n", "parent": null, "children": [14, 15, 16, 20, 33], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 21, "column": 69}}, {"id": 14, "type": "type_identifier", "text": "nterface ", "parent": 13, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 10}}, {"id": 15, "type": "identifier", "text": "ocationViewController ", "parent": 13, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 33}}, {"id": 16, "type": "ERROR", "text": " UIViewController <DataSimulatorDelegate,", "parent": 13, "children": [17, 18, 19], "start_point": {"row": 19, "column": 34}, "end_point": {"row": 19, "column": 75}}, {"id": 17, "type": "identifier", "text": "IViewController ", "parent": 16, "children": [], "start_point": {"row": 19, "column": 36}, "end_point": {"row": 19, "column": 52}}, {"id": 18, "type": "<", "text": "D", "parent": 16, "children": [], "start_point": {"row": 19, "column": 53}, "end_point": {"row": 19, "column": 54}}, {"id": 19, "type": "identifier", "text": "ataSimulatorDelegate,", "parent": 16, "children": [], "start_point": {"row": 19, "column": 54}, "end_point": {"row": 19, "column": 75}}, {"id": 20, "type": "ERROR", "text": "PTPlotDataSource>\n\n@property(nonatomic, retain) IBOutlet UIView ", "parent": 13, "children": [21, 22, 23, 24], "start_point": {"row": 19, "column": 77}, "end_point": {"row": 21, "column": 44}}, {"id": 21, "type": "identifier", "text": "PTPlotDataSource>", "parent": 20, "children": [], "start_point": {"row": 19, "column": 77}, "end_point": {"row": 19, "column": 94}}, {"id": 22, "type": ">", "text": "\n", "parent": 20, "children": [], "start_point": {"row": 19, "column": 94}, "end_point": {"row": 19, "column": 95}}, {"id": 23, "type": "ERROR", "text": "p", "parent": 20, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 24, "type": "function_declarator", "text": "roperty(nonatomic, retain) IBOutlet UIView ", "parent": 20, "children": [25, 26, 31, 32], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 44}}, {"id": 25, "type": "identifier", "text": "roperty(", "parent": 24, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 9}}, {"id": 26, "type": "parameter_list", "text": "nonatomic, retain) ", "parent": 24, "children": [27, 29], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 28}}, {"id": 27, "type": "parameter_declaration", "text": "onatomic,", "parent": 26, "children": [28], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 19}}, {"id": 28, "type": "type_identifier", "text": "onatomic,", "parent": 27, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 19}}, {"id": 29, "type": "parameter_declaration", "text": "etain)", "parent": 26, "children": [30], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 27}}, {"id": 30, "type": "type_identifier", "text": "etain)", "parent": 29, "children": [], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 27}}, {"id": 31, "type": "identifier", "text": "BOutlet ", "parent": 24, "children": [], "start_point": {"row": 21, "column": 29}, "end_point": {"row": 21, "column": 37}}, {"id": 32, "type": "identifier", "text": "IView ", "parent": 24, "children": [], "start_point": {"row": 21, "column": 38}, "end_point": {"row": 21, "column": 44}}, {"id": 33, "type": "pointer_declarator", "text": "walkingRunningMan_view;", "parent": 13, "children": [34, 35], "start_point": {"row": 21, "column": 45}, "end_point": {"row": 21, "column": 68}}, {"id": 34, "type": "*", "text": "w", "parent": 33, "children": [], "start_point": {"row": 21, "column": 45}, "end_point": {"row": 21, "column": 46}}, {"id": 35, "type": "identifier", "text": "alkingRunningMan_view;", "parent": 33, "children": [], "start_point": {"row": 21, "column": 46}, "end_point": {"row": 21, "column": 68}}, {"id": 36, "type": "ERROR", "text": "property(nonatomic, retain) IBOutlet ", "parent": null, "children": [37, 38, 43], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 37}}, {"id": 37, "type": "ERROR", "text": "p", "parent": 36, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 38, "type": "call_expression", "text": "roperty(nonatomic, retain) ", "parent": 36, "children": [39, 40], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 28}}, {"id": 39, "type": "identifier", "text": "roperty(", "parent": 38, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 9}}, {"id": 40, "type": "argument_list", "text": "nonatomic, retain) ", "parent": 38, "children": [41, 42], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 28}}, {"id": 41, "type": "identifier", "text": "onatomic,", "parent": 40, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 19}}, {"id": 42, "type": "identifier", "text": "etain)", "parent": 40, "children": [], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 27}}, {"id": 43, "type": "identifier", "text": "BOutlet ", "parent": 36, "children": [], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 22, "column": 37}}, {"id": 44, "type": "declaration", "text": "IView *walkingDirection_view;\n", "parent": null, "children": [45, 46], "start_point": {"row": 22, "column": 38}, "end_point": {"row": 22, "column": 68}}, {"id": 45, "type": "type_identifier", "text": "IView ", "parent": 44, "children": [], "start_point": {"row": 22, "column": 38}, "end_point": {"row": 22, "column": 44}}, {"id": 46, "type": "pointer_declarator", "text": "walkingDirection_view;", "parent": 44, "children": [47, 48], "start_point": {"row": 22, "column": 45}, "end_point": {"row": 22, "column": 67}}, {"id": 47, "type": "*", "text": "w", "parent": 46, "children": [], "start_point": {"row": 22, "column": 45}, "end_point": {"row": 22, "column": 46}}, {"id": 48, "type": "identifier", "text": "alkingDirection_view;", "parent": 46, "children": [], "start_point": {"row": 22, "column": 46}, "end_point": {"row": 22, "column": 67}}, {"id": 49, "type": "ERROR", "text": "property(nonatomic, retain) IBOutlet ", "parent": null, "children": [50, 51, 56], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 37}}, {"id": 50, "type": "ERROR", "text": "p", "parent": 49, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 51, "type": "call_expression", "text": "roperty(nonatomic, retain) ", "parent": 49, "children": [52, 53], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 28}}, {"id": 52, "type": "identifier", "text": "roperty(", "parent": 51, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 9}}, {"id": 53, "type": "argument_list", "text": "nonatomic, retain) ", "parent": 51, "children": [54, 55], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 28}}, {"id": 54, "type": "identifier", "text": "onatomic,", "parent": 53, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 19}}, {"id": 55, "type": "identifier", "text": "etain)", "parent": 53, "children": [], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 27}}, {"id": 56, "type": "identifier", "text": "BOutlet ", "parent": 49, "children": [], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 37}}, {"id": 57, "type": "declaration", "text": "IView *walkingPath_view;\n", "parent": null, "children": [58, 59], "start_point": {"row": 23, "column": 38}, "end_point": {"row": 23, "column": 63}}, {"id": 58, "type": "type_identifier", "text": "IView ", "parent": 57, "children": [], "start_point": {"row": 23, "column": 38}, "end_point": {"row": 23, "column": 44}}, {"id": 59, "type": "pointer_declarator", "text": "walkingPath_view;", "parent": 57, "children": [60, 61], "start_point": {"row": 23, "column": 45}, "end_point": {"row": 23, "column": 62}}, {"id": 60, "type": "*", "text": "w", "parent": 59, "children": [], "start_point": {"row": 23, "column": 45}, "end_point": {"row": 23, "column": 46}}, {"id": 61, "type": "identifier", "text": "alkingPath_view;", "parent": 59, "children": [], "start_point": {"row": 23, "column": 46}, "end_point": {"row": 23, "column": 62}}, {"id": 62, "type": "ERROR", "text": "property (weak, nonatomic) IBOutlet ", "parent": null, "children": [63, 64, 69], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 36}}, {"id": 63, "type": "ERROR", "text": "p", "parent": 62, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 64, "type": "call_expression", "text": "roperty (weak, nonatomic) ", "parent": 62, "children": [65, 66], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 27}}, {"id": 65, "type": "identifier", "text": "roperty ", "parent": 64, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 9}}, {"id": 66, "type": "argument_list", "text": "weak, nonatomic) ", "parent": 64, "children": [67, 68], "start_point": {"row": 24, "column": 10}, "end_point": {"row": 24, "column": 27}}, {"id": 67, "type": "identifier", "text": "eak,", "parent": 66, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 15}}, {"id": 68, "type": "identifier", "text": "onatomic)", "parent": 66, "children": [], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 26}}, {"id": 69, "type": "identifier", "text": "BOutlet ", "parent": 62, "children": [], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 36}}, {"id": 70, "type": "declaration", "text": "PTGraphHostingView *hostView;\n", "parent": null, "children": [71, 72], "start_point": {"row": 24, "column": 37}, "end_point": {"row": 24, "column": 67}}, {"id": 71, "type": "type_identifier", "text": "PTGraphHostingView ", "parent": 70, "children": [], "start_point": {"row": 24, "column": 37}, "end_point": {"row": 24, "column": 56}}, {"id": 72, "type": "pointer_declarator", "text": "hostView;", "parent": 70, "children": [73, 74], "start_point": {"row": 24, "column": 57}, "end_point": {"row": 24, "column": 66}}, {"id": 73, "type": "*", "text": "h", "parent": 72, "children": [], "start_point": {"row": 24, "column": 57}, "end_point": {"row": 24, "column": 58}}, {"id": 74, "type": "identifier", "text": "ostView;", "parent": 72, "children": [], "start_point": {"row": 24, "column": 58}, "end_point": {"row": 24, "column": 66}}, {"id": 75, "type": "ERROR", "text": "property(nonatomic, retain) IBOutlet ", "parent": null, "children": [76, 77, 82], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 37}}, {"id": 76, "type": "ERROR", "text": "p", "parent": 75, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 77, "type": "call_expression", "text": "roperty(nonatomic, retain) ", "parent": 75, "children": [78, 79], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 28}}, {"id": 78, "type": "identifier", "text": "roperty(", "parent": 77, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 9}}, {"id": 79, "type": "argument_list", "text": "nonatomic, retain) ", "parent": 77, "children": [80, 81], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 28}}, {"id": 80, "type": "identifier", "text": "onatomic,", "parent": 79, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 19}}, {"id": 81, "type": "identifier", "text": "etain)", "parent": 79, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 27}}, {"id": 82, "type": "identifier", "text": "BOutlet ", "parent": 75, "children": [], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 37}}, {"id": 83, "type": "declaration", "text": "IButton *clear_btn;\n", "parent": null, "children": [84, 85], "start_point": {"row": 26, "column": 38}, "end_point": {"row": 26, "column": 58}}, {"id": 84, "type": "type_identifier", "text": "IButton ", "parent": 83, "children": [], "start_point": {"row": 26, "column": 38}, "end_point": {"row": 26, "column": 46}}, {"id": 85, "type": "pointer_declarator", "text": "clear_btn;", "parent": 83, "children": [86, 87], "start_point": {"row": 26, "column": 47}, "end_point": {"row": 26, "column": 57}}, {"id": 86, "type": "*", "text": "c", "parent": 85, "children": [], "start_point": {"row": 26, "column": 47}, "end_point": {"row": 26, "column": 48}}, {"id": 87, "type": "identifier", "text": "lear_btn;", "parent": 85, "children": [], "start_point": {"row": 26, "column": 48}, "end_point": {"row": 26, "column": 57}}, {"id": 88, "type": "ERROR", "text": "property (weak, nonatomic) IBOutlet ", "parent": null, "children": [89, 90, 95], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 36}}, {"id": 89, "type": "ERROR", "text": "p", "parent": 88, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 90, "type": "call_expression", "text": "roperty (weak, nonatomic) ", "parent": 88, "children": [91, 92], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 27}}, {"id": 91, "type": "identifier", "text": "roperty ", "parent": 90, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 9}}, {"id": 92, "type": "argument_list", "text": "weak, nonatomic) ", "parent": 90, "children": [93, 94], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 27}}, {"id": 93, "type": "identifier", "text": "eak,", "parent": 92, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 15}}, {"id": 94, "type": "identifier", "text": "onatomic)", "parent": 92, "children": [], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 26}}, {"id": 95, "type": "identifier", "text": "BOutlet ", "parent": 88, "children": [], "start_point": {"row": 27, "column": 28}, "end_point": {"row": 27, "column": 36}}, {"id": 96, "type": "declaration", "text": "IImageView *img_RunningMan;\n", "parent": null, "children": [97, 98], "start_point": {"row": 27, "column": 37}, "end_point": {"row": 27, "column": 65}}, {"id": 97, "type": "type_identifier", "text": "IImageView ", "parent": 96, "children": [], "start_point": {"row": 27, "column": 37}, "end_point": {"row": 27, "column": 48}}, {"id": 98, "type": "pointer_declarator", "text": "img_RunningMan;", "parent": 96, "children": [99, 100], "start_point": {"row": 27, "column": 49}, "end_point": {"row": 27, "column": 64}}, {"id": 99, "type": "*", "text": "i", "parent": 98, "children": [], "start_point": {"row": 27, "column": 49}, "end_point": {"row": 27, "column": 50}}, {"id": 100, "type": "identifier", "text": "mg_RunningMan;", "parent": 98, "children": [], "start_point": {"row": 27, "column": 50}, "end_point": {"row": 27, "column": 64}}, {"id": 101, "type": "ERROR", "text": "property (weak, nonatomic) IBOutlet ", "parent": null, "children": [102, 103, 108], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 36}}, {"id": 102, "type": "ERROR", "text": "p", "parent": 101, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 103, "type": "call_expression", "text": "roperty (weak, nonatomic) ", "parent": 101, "children": [104, 105], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 27}}, {"id": 104, "type": "identifier", "text": "roperty ", "parent": 103, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 9}}, {"id": 105, "type": "argument_list", "text": "weak, nonatomic) ", "parent": 103, "children": [106, 107], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 27}}, {"id": 106, "type": "identifier", "text": "eak,", "parent": 105, "children": [], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 15}}, {"id": 107, "type": "identifier", "text": "onatomic)", "parent": 105, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 26}}, {"id": 108, "type": "identifier", "text": "BOutlet ", "parent": 101, "children": [], "start_point": {"row": 28, "column": 28}, "end_point": {"row": 28, "column": 36}}, {"id": 109, "type": "declaration", "text": "ineChartView *chartWalking;\n", "parent": null, "children": [110, 111], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 65}}, {"id": 110, "type": "type_identifier", "text": "ineChartView ", "parent": 109, "children": [], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 50}}, {"id": 111, "type": "pointer_declarator", "text": "chartWalking;", "parent": 109, "children": [112, 113], "start_point": {"row": 28, "column": 51}, "end_point": {"row": 28, "column": 64}}, {"id": 112, "type": "*", "text": "c", "parent": 111, "children": [], "start_point": {"row": 28, "column": 51}, "end_point": {"row": 28, "column": 52}}, {"id": 113, "type": "identifier", "text": "hartWalking;", "parent": 111, "children": [], "start_point": {"row": 28, "column": 52}, "end_point": {"row": 28, "column": 64}}, {"id": 114, "type": "ERROR", "text": "property(nonatomic, retain) IBOutlet ", "parent": null, "children": [115, 116, 121], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 37}}, {"id": 115, "type": "ERROR", "text": "p", "parent": 114, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 116, "type": "call_expression", "text": "roperty(nonatomic, retain) ", "parent": 114, "children": [117, 118], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 28}}, {"id": 117, "type": "identifier", "text": "roperty(", "parent": 116, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 9}}, {"id": 118, "type": "argument_list", "text": "nonatomic, retain) ", "parent": 116, "children": [119, 120], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 28}}, {"id": 119, "type": "identifier", "text": "onatomic,", "parent": 118, "children": [], "start_point": {"row": 30, "column": 10}, "end_point": {"row": 30, "column": 19}}, {"id": 120, "type": "identifier", "text": "etain)", "parent": 118, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 27}}, {"id": 121, "type": "identifier", "text": "BOutlet ", "parent": 114, "children": [], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 37}}, {"id": 122, "type": "declaration", "text": "ILabel *steps_lbl;\n", "parent": null, "children": [123, 124], "start_point": {"row": 30, "column": 38}, "end_point": {"row": 30, "column": 57}}, {"id": 123, "type": "type_identifier", "text": "ILabel ", "parent": 122, "children": [], "start_point": {"row": 30, "column": 38}, "end_point": {"row": 30, "column": 45}}, {"id": 124, "type": "pointer_declarator", "text": "steps_lbl;", "parent": 122, "children": [125, 126], "start_point": {"row": 30, "column": 46}, "end_point": {"row": 30, "column": 56}}, {"id": 125, "type": "*", "text": "s", "parent": 124, "children": [], "start_point": {"row": 30, "column": 46}, "end_point": {"row": 30, "column": 47}}, {"id": 126, "type": "identifier", "text": "teps_lbl;", "parent": 124, "children": [], "start_point": {"row": 30, "column": 47}, "end_point": {"row": 30, "column": 56}}, {"id": 127, "type": "ERROR", "text": "property(nonatomic, retain) IBOutlet ", "parent": null, "children": [128, 129, 134], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 37}}, {"id": 128, "type": "ERROR", "text": "p", "parent": 127, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 129, "type": "call_expression", "text": "roperty(nonatomic, retain) ", "parent": 127, "children": [130, 131], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 28}}, {"id": 130, "type": "identifier", "text": "roperty(", "parent": 129, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 9}}, {"id": 131, "type": "argument_list", "text": "nonatomic, retain) ", "parent": 129, "children": [132, 133], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 28}}, {"id": 132, "type": "identifier", "text": "onatomic,", "parent": 131, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 19}}, {"id": 133, "type": "identifier", "text": "etain)", "parent": 131, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 27}}, {"id": 134, "type": "identifier", "text": "BOutlet ", "parent": 127, "children": [], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 31, "column": 37}}, {"id": 135, "type": "declaration", "text": "ILabel *cadense_lbl;\n", "parent": null, "children": [136, 137], "start_point": {"row": 31, "column": 38}, "end_point": {"row": 31, "column": 59}}, {"id": 136, "type": "type_identifier", "text": "ILabel ", "parent": 135, "children": [], "start_point": {"row": 31, "column": 38}, "end_point": {"row": 31, "column": 45}}, {"id": 137, "type": "pointer_declarator", "text": "cadense_lbl;", "parent": 135, "children": [138, 139], "start_point": {"row": 31, "column": 46}, "end_point": {"row": 31, "column": 58}}, {"id": 138, "type": "*", "text": "c", "parent": 137, "children": [], "start_point": {"row": 31, "column": 46}, "end_point": {"row": 31, "column": 47}}, {"id": 139, "type": "identifier", "text": "adense_lbl;", "parent": 137, "children": [], "start_point": {"row": 31, "column": 47}, "end_point": {"row": 31, "column": 58}}, {"id": 140, "type": "ERROR", "text": "property(nonatomic, retain) IBOutlet ", "parent": null, "children": [141, 142, 147], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 37}}, {"id": 141, "type": "ERROR", "text": "p", "parent": 140, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 1}}, {"id": 142, "type": "call_expression", "text": "roperty(nonatomic, retain) ", "parent": 140, "children": [143, 144], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 28}}, {"id": 143, "type": "identifier", "text": "roperty(", "parent": 142, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 9}}, {"id": 144, "type": "argument_list", "text": "nonatomic, retain) ", "parent": 142, "children": [145, 146], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 28}}, {"id": 145, "type": "identifier", "text": "onatomic,", "parent": 144, "children": [], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 19}}, {"id": 146, "type": "identifier", "text": "etain)", "parent": 144, "children": [], "start_point": {"row": 32, "column": 21}, "end_point": {"row": 32, "column": 27}}, {"id": 147, "type": "identifier", "text": "BOutlet ", "parent": 140, "children": [], "start_point": {"row": 32, "column": 29}, "end_point": {"row": 32, "column": 37}}, {"id": 148, "type": "declaration", "text": "ILabel *headingAngle_lbl;\n", "parent": null, "children": [149, 150], "start_point": {"row": 32, "column": 38}, "end_point": {"row": 32, "column": 64}}, {"id": 149, "type": "type_identifier", "text": "ILabel ", "parent": 148, "children": [], "start_point": {"row": 32, "column": 38}, "end_point": {"row": 32, "column": 45}}, {"id": 150, "type": "pointer_declarator", "text": "headingAngle_lbl;", "parent": 148, "children": [151, 152], "start_point": {"row": 32, "column": 46}, "end_point": {"row": 32, "column": 63}}, {"id": 151, "type": "*", "text": "h", "parent": 150, "children": [], "start_point": {"row": 32, "column": 46}, "end_point": {"row": 32, "column": 47}}, {"id": 152, "type": "identifier", "text": "eadingAngle_lbl;", "parent": 150, "children": [], "start_point": {"row": 32, "column": 47}, "end_point": {"row": 32, "column": 63}}, {"id": 153, "type": "ERROR", "text": "property (weak, nonatomic) IBOutlet ", "parent": null, "children": [154, 155, 160], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 36}}, {"id": 154, "type": "ERROR", "text": "p", "parent": 153, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 155, "type": "call_expression", "text": "roperty (weak, nonatomic) ", "parent": 153, "children": [156, 157], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 27}}, {"id": 156, "type": "identifier", "text": "roperty ", "parent": 155, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 9}}, {"id": 157, "type": "argument_list", "text": "weak, nonatomic) ", "parent": 155, "children": [158, 159], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 27}}, {"id": 158, "type": "identifier", "text": "eak,", "parent": 157, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 15}}, {"id": 159, "type": "identifier", "text": "onatomic)", "parent": 157, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 26}}, {"id": 160, "type": "identifier", "text": "BOutlet ", "parent": 153, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 36}}, {"id": 161, "type": "declaration", "text": "IButton *btnStartStopLog;\n", "parent": null, "children": [162, 163], "start_point": {"row": 33, "column": 37}, "end_point": {"row": 33, "column": 63}}, {"id": 162, "type": "type_identifier", "text": "IButton ", "parent": 161, "children": [], "start_point": {"row": 33, "column": 37}, "end_point": {"row": 33, "column": 45}}, {"id": 163, "type": "pointer_declarator", "text": "btnStartStopLog;", "parent": 161, "children": [164, 165], "start_point": {"row": 33, "column": 46}, "end_point": {"row": 33, "column": 62}}, {"id": 164, "type": "*", "text": "b", "parent": 163, "children": [], "start_point": {"row": 33, "column": 46}, "end_point": {"row": 33, "column": 47}}, {"id": 165, "type": "identifier", "text": "tnStartStopLog;", "parent": 163, "children": [], "start_point": {"row": 33, "column": 47}, "end_point": {"row": 33, "column": 62}}, {"id": 166, "type": "unary_expression", "text": " (IBAction)start_stop_logging:", "parent": null, "children": [167, 168], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 30}}, {"id": 167, "type": "-", "text": " ", "parent": 166, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 168, "type": "cast_expression", "text": "IBAction)start_stop_logging:", "parent": 166, "children": [169, 171], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 30}}, {"id": 169, "type": "type_descriptor", "text": "BAction)", "parent": 168, "children": [170], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 11}}, {"id": 170, "type": "type_identifier", "text": "BAction)", "parent": 169, "children": [], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 11}}, {"id": 171, "type": "identifier", "text": "tart_stop_logging:", "parent": 168, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 30}}, {"id": 172, "type": "ERROR", "text": "(id)sender;", "parent": null, "children": [173, 174], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 41}}, {"id": 173, "type": "identifier", "text": "d)", "parent": 172, "children": [], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 34}}, {"id": 174, "type": "identifier", "text": "ender;", "parent": 172, "children": [], "start_point": {"row": 34, "column": 35}, "end_point": {"row": 34, "column": 41}}, {"id": 175, "type": "ERROR", "text": "property (weak, nonatomic) IBOutlet ", "parent": null, "children": [176, 177, 182], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 36}}, {"id": 176, "type": "ERROR", "text": "p", "parent": 175, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 177, "type": "call_expression", "text": "roperty (weak, nonatomic) ", "parent": 175, "children": [178, 179], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 27}}, {"id": 178, "type": "identifier", "text": "roperty ", "parent": 177, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 9}}, {"id": 179, "type": "argument_list", "text": "weak, nonatomic) ", "parent": 177, "children": [180, 181], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 27}}, {"id": 180, "type": "identifier", "text": "eak,", "parent": 179, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 15}}, {"id": 181, "type": "identifier", "text": "onatomic)", "parent": 179, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 26}}, {"id": 182, "type": "identifier", "text": "BOutlet ", "parent": 175, "children": [], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 36}}, {"id": 183, "type": "declaration", "text": "IImageView *imgCompass;\n", "parent": null, "children": [184, 185], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 61}}, {"id": 184, "type": "type_identifier", "text": "IImageView ", "parent": 183, "children": [], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 48}}, {"id": 185, "type": "pointer_declarator", "text": "imgCompass;", "parent": 183, "children": [186, 187], "start_point": {"row": 36, "column": 49}, "end_point": {"row": 36, "column": 60}}, {"id": 186, "type": "*", "text": "i", "parent": 185, "children": [], "start_point": {"row": 36, "column": 49}, "end_point": {"row": 36, "column": 50}}, {"id": 187, "type": "identifier", "text": "mgCompass;", "parent": 185, "children": [], "start_point": {"row": 36, "column": 50}, "end_point": {"row": 36, "column": 60}}, {"id": 188, "type": "ERROR", "text": " (IBAction)onClear:(UIButton *)sender;\n\n@end\n", "parent": null, "children": [189, 200, 201], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 39, "column": 4}}, {"id": 189, "type": "binary_expression", "text": " (IBAction)onClear:(UIButton *)sender;", "parent": 188, "children": [190, 196, 198, 199], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 38}}, {"id": 190, "type": "unary_expression", "text": " (IBAction)onClear:", "parent": 189, "children": [191, 192], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 19}}, {"id": 191, "type": "-", "text": " ", "parent": 190, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 192, "type": "cast_expression", "text": "IBAction)onClear:", "parent": 190, "children": [193, 195], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 19}}, {"id": 193, "type": "type_descriptor", "text": "BAction)", "parent": 192, "children": [194], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 11}}, {"id": 194, "type": "type_identifier", "text": "BAction)", "parent": 193, "children": [], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 11}}, {"id": 195, "type": "identifier", "text": "nClear:", "parent": 192, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 19}}, {"id": 196, "type": "ERROR", "text": "(UIButton ", "parent": 189, "children": [197], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 29}}, {"id": 197, "type": "identifier", "text": "IButton ", "parent": 196, "children": [], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 29}}, {"id": 198, "type": "ERROR", "text": "s", "parent": 189, "children": [], "start_point": {"row": 37, "column": 31}, "end_point": {"row": 37, "column": 32}}, {"id": 199, "type": "identifier", "text": "ender;", "parent": 189, "children": [], "start_point": {"row": 37, "column": 32}, "end_point": {"row": 37, "column": 38}}, {"id": 200, "type": "ERROR", "text": "e", "parent": 188, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 201, "type": "identifier", "text": "nd\n", "parent": 188, "children": [], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 4}}]}, "node_categories": {"declarations": {"functions": [24], "variables": [8, 13, 27, 29, 44, 57, 70, 83, 96, 109, 122, 135, 148, 161, 183], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [38, 51, 64, 77, 90, 103, 116, 129, 142, 155, 166, 168, 177, 189, 190, 192], "assignments": [], "loops": [], "conditionals": [9, 10, 14, 15, 17, 19, 21, 25, 28, 30, 31, 32, 35, 39, 41, 42, 43, 45, 48, 52, 54, 55, 56, 58, 61, 65, 67, 68, 69, 71, 74, 78, 80, 81, 82, 84, 87, 91, 93, 94, 95, 97, 100, 104, 106, 107, 108, 110, 113, 117, 119, 120, 121, 123, 126, 130, 132, 133, 134, 136, 139, 143, 145, 146, 147, 149, 152, 156, 158, 159, 160, 162, 165, 170, 171, 173, 174, 178, 180, 181, 182, 184, 187, 194, 195, 197, 199, 201], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 2, 4], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 24, "universal_type": "function", "name": "unknown", "text_snippet": "roperty(nonatomic, retain) IBOutlet UIView "}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// LocationViewController.h\n// Pro_Motion_App\n//\n// Created by <NAME> on 16/12/15.\n// Copyright \u00a9 2015 Mindscrub Technologies. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n//#import \"APLGraphView.h\"\n//#import \"Pro_Motion_App-Swift.h\"\n#import \"DataSimulator.h\"\n#import \"CorePlot-CocoaTouch.h\"\n\n@import Charts;\n\n\n\n\n@interface LocationViewController : UIViewController <DataSimulatorDelegate, CPTPlotDataSource>\n\n@property(nonatomic, retain) IBOutlet UIView *walkingRunningMan_view;\n@property(nonatomic, retain) IBOutlet UIView *walkingDirection_view;\n@property(nonatomic, retain) IBOutlet UIView *walkingPath_view;\n@property (weak, nonatomic) IBOutlet CPTGraphHostingView *hostView;\n\n@property(nonatomic, retain) IBOutlet UIButton *clear_btn;\n@property (weak, nonatomic) IBOutlet UIImageView *img_RunningMan;\n@property (weak, nonatomic) IBOutlet LineChartView *chartWalking;\n\n@property(nonatomic, retain) IBOutlet UILabel *steps_lbl;\n@property(nonatomic, retain) IBOutlet UILabel *cadense_lbl;\n@property(nonatomic, retain) IBOutlet UILabel *headingAngle_lbl;\n@property (weak, nonatomic) IBOutlet UIButton *btnStartStopLog;\n- (IBAction)start_stop_logging:(id)sender;\n\n@property (weak, nonatomic) IBOutlet UIImageView *imgCompass;\n- (IBAction)onClear:(UIButton *)sender;\n\n@end\n"}
21
c
/* * MIT License * * Copyright (c) 2021 ETJump team <<EMAIL>> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #pragma once #include "cg_local.h" #ifdef min #undef min #endif #ifdef max #undef max #endif #include "etj_irenderable.h" #include <vector> namespace ETJump { class KeySetDrawer : public IRenderable { public: enum class KeyNames { Empty, Forward, Backward, Right, Left, Jump, Crouch, Sprint, Prone, LeanRight, LeanLeft, Walk, Talk, Activate, Attack, Attack2, Reload, Zoom }; struct KeyShader { KeyNames key; qhandle_t press; qhandle_t release; }; KeySetDrawer(const std::vector<KeyShader> &keyShaders); virtual ~KeySetDrawer() {}; void render() const override; void beforeRender() override {}; static std::string keyNameToString(KeyNames keyName); protected: struct Point2d { float x; float y; }; struct KeyAttrs { vec4_t color; vec4_t shadowColor; float size; Point2d origin; bool shouldDrawShadow; }; KeyAttrs attrs; const std::vector<KeyShader> keyShaders; void initListeners(); void initAttrs(); void updateKeysColor(const char *str); void updateKeysSize(float size); void updateKeysOrigin(float x, float y); void updateKeysShadow(bool shouldDrawShadow); void updateKeysShadowColor(const vec4_t shadowColor); virtual void drawShader(qhandle_t shader, int position) const; virtual void drawPressShader(qhandle_t shader, int position) const; virtual void drawReleaseShader(qhandle_t shader, int position) const; static int isKeyPressed(KeyNames key); template <int Cols> static Point2d calcGridPosition(float cellSize, int cellIndex) { return{ cellSize * (cellIndex % Cols), cellSize * static_cast<int>(cellIndex / Cols) }; } }; }
25.65
107
(translation_unit) "/*\n * MIT License\n * \n * Copyright (c) 2021 ETJump team <<EMAIL>>\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the "Software"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n#pragma once\n#include "cg_local.h"\n\n#ifdef min\n#undef min\n#endif\n#ifdef max\n#undef max\n#endif\n\n#include "etj_irenderable.h"\n#include <vector>\n\nnamespace ETJump\n{\n class KeySetDrawer : public IRenderable\n {\n public:\n enum class KeyNames\n {\n Empty,\n Forward,\n Backward,\n Right,\n Left,\n Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom\n };\n\n struct KeyShader\n {\n KeyNames key;\n qhandle_t press;\n qhandle_t release;\n };\n\n KeySetDrawer(const std::vector<KeyShader> &keyShaders);\n virtual ~KeySetDrawer() {};\n void render() const override;\n void beforeRender() override {};\n static std::string keyNameToString(KeyNames keyName);\n protected:\n struct Point2d\n {\n float x;\n float y;\n };\n\n struct KeyAttrs\n {\n vec4_t color;\n vec4_t shadowColor;\n float size;\n Point2d origin;\n bool shouldDrawShadow;\n };\n\n KeyAttrs attrs;\n const std::vector<KeyShader> keyShaders;\n\n void initListeners();\n void initAttrs();\n void updateKeysColor(const char *str);\n void updateKeysSize(float size);\n void updateKeysOrigin(float x, float y);\n void updateKeysShadow(bool shouldDrawShadow);\n void updateKeysShadowColor(const vec4_t shadowColor);\n virtual void drawShader(qhandle_t shader, int position) const;\n virtual void drawPressShader(qhandle_t shader, int position) const;\n virtual void drawReleaseShader(qhandle_t shader, int position) const;\n\n static int isKeyPressed(KeyNames key);\n\n template <int Cols>\n static Point2d calcGridPosition(float cellSize, int cellIndex)\n {\n return{\n cellSize * (cellIndex % Cols),\n cellSize * static_cast<int>(cellIndex / Cols)\n };\n }\n };\n}\n" (comment) "/*\n * MIT License\n * \n * Copyright (c) 2021 ETJump team <<EMAIL>>\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the "Software"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "cg_local.h"\n" (#include) "#include" (string_literal) ""cg_local.h"" (") """ (string_content) "cg_local.h" (") """ (preproc_ifdef) "#ifdef min\n#undef min\n#endif" (#ifdef) "#ifdef" (identifier) "min" (preproc_call) "#undef min\n" (preproc_directive) "#undef" (preproc_arg) "min" (#endif) "#endif" (preproc_ifdef) "#ifdef max\n#undef max\n#endif" (#ifdef) "#ifdef" (identifier) "max" (preproc_call) "#undef max\n" (preproc_directive) "#undef" (preproc_arg) "max" (#endif) "#endif" (preproc_include) "#include "etj_irenderable.h"\n" (#include) "#include" (string_literal) ""etj_irenderable.h"" (") """ (string_content) "etj_irenderable.h" (") """ (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (function_definition) "namespace ETJump\n{\n class KeySetDrawer : public IRenderable\n {\n public:\n enum class KeyNames\n {\n Empty,\n Forward,\n Backward,\n Right,\n Left,\n Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom\n };\n\n struct KeyShader\n {\n KeyNames key;\n qhandle_t press;\n qhandle_t release;\n };\n\n KeySetDrawer(const std::vector<KeyShader> &keyShaders);\n virtual ~KeySetDrawer() {};\n void render() const override;\n void beforeRender() override {};\n static std::string keyNameToString(KeyNames keyName);\n protected:\n struct Point2d\n {\n float x;\n float y;\n };\n\n struct KeyAttrs\n {\n vec4_t color;\n vec4_t shadowColor;\n float size;\n Point2d origin;\n bool shouldDrawShadow;\n };\n\n KeyAttrs attrs;\n const std::vector<KeyShader> keyShaders;\n\n void initListeners();\n void initAttrs();\n void updateKeysColor(const char *str);\n void updateKeysSize(float size);\n void updateKeysOrigin(float x, float y);\n void updateKeysShadow(bool shouldDrawShadow);\n void updateKeysShadowColor(const vec4_t shadowColor);\n virtual void drawShader(qhandle_t shader, int position) const;\n virtual void drawPressShader(qhandle_t shader, int position) const;\n virtual void drawReleaseShader(qhandle_t shader, int position) const;\n\n static int isKeyPressed(KeyNames key);\n\n template <int Cols>\n static Point2d calcGridPosition(float cellSize, int cellIndex)\n {\n return{\n cellSize * (cellIndex % Cols),\n cellSize * static_cast<int>(cellIndex / Cols)\n };\n }\n };\n}" (type_identifier) "namespace" (identifier) "ETJump" (compound_statement) "{\n class KeySetDrawer : public IRenderable\n {\n public:\n enum class KeyNames\n {\n Empty,\n Forward,\n Backward,\n Right,\n Left,\n Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom\n };\n\n struct KeyShader\n {\n KeyNames key;\n qhandle_t press;\n qhandle_t release;\n };\n\n KeySetDrawer(const std::vector<KeyShader> &keyShaders);\n virtual ~KeySetDrawer() {};\n void render() const override;\n void beforeRender() override {};\n static std::string keyNameToString(KeyNames keyName);\n protected:\n struct Point2d\n {\n float x;\n float y;\n };\n\n struct KeyAttrs\n {\n vec4_t color;\n vec4_t shadowColor;\n float size;\n Point2d origin;\n bool shouldDrawShadow;\n };\n\n KeyAttrs attrs;\n const std::vector<KeyShader> keyShaders;\n\n void initListeners();\n void initAttrs();\n void updateKeysColor(const char *str);\n void updateKeysSize(float size);\n void updateKeysOrigin(float x, float y);\n void updateKeysShadow(bool shouldDrawShadow);\n void updateKeysShadowColor(const vec4_t shadowColor);\n virtual void drawShader(qhandle_t shader, int position) const;\n virtual void drawPressShader(qhandle_t shader, int position) const;\n virtual void drawReleaseShader(qhandle_t shader, int position) const;\n\n static int isKeyPressed(KeyNames key);\n\n template <int Cols>\n static Point2d calcGridPosition(float cellSize, int cellIndex)\n {\n return{\n cellSize * (cellIndex % Cols),\n cellSize * static_cast<int>(cellIndex / Cols)\n };\n }\n };\n}" ({) "{" (function_definition) "class KeySetDrawer : public IRenderable\n {\n public:\n enum class KeyNames\n {\n Empty,\n Forward,\n Backward,\n Right,\n Left,\n Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom\n };\n\n struct KeyShader\n {\n KeyNames key;\n qhandle_t press;\n qhandle_t release;\n };\n\n KeySetDrawer(const std::vector<KeyShader> &keyShaders);\n virtual ~KeySetDrawer() {};\n void render() const override;\n void beforeRender() override {};\n static std::string keyNameToString(KeyNames keyName);\n protected:\n struct Point2d\n {\n float x;\n float y;\n };\n\n struct KeyAttrs\n {\n vec4_t color;\n vec4_t shadowColor;\n float size;\n Point2d origin;\n bool shouldDrawShadow;\n };\n\n KeyAttrs attrs;\n const std::vector<KeyShader> keyShaders;\n\n void initListeners();\n void initAttrs();\n void updateKeysColor(const char *str);\n void updateKeysSize(float size);\n void updateKeysOrigin(float x, float y);\n void updateKeysShadow(bool shouldDrawShadow);\n void updateKeysShadowColor(const vec4_t shadowColor);\n virtual void drawShader(qhandle_t shader, int position) const;\n virtual void drawPressShader(qhandle_t shader, int position) const;\n virtual void drawReleaseShader(qhandle_t shader, int position) const;\n\n static int isKeyPressed(KeyNames key);\n\n template <int Cols>\n static Point2d calcGridPosition(float cellSize, int cellIndex)\n {\n return{\n cellSize * (cellIndex % Cols),\n cellSize * static_cast<int>(cellIndex / Cols)\n };\n }\n }" (type_identifier) "class" (identifier) "KeySetDrawer" (ERROR) ": public IRenderable" (:) ":" (identifier) "public" (identifier) "IRenderable" (compound_statement) "{\n public:\n enum class KeyNames\n {\n Empty,\n Forward,\n Backward,\n Right,\n Left,\n Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom\n };\n\n struct KeyShader\n {\n KeyNames key;\n qhandle_t press;\n qhandle_t release;\n };\n\n KeySetDrawer(const std::vector<KeyShader> &keyShaders);\n virtual ~KeySetDrawer() {};\n void render() const override;\n void beforeRender() override {};\n static std::string keyNameToString(KeyNames keyName);\n protected:\n struct Point2d\n {\n float x;\n float y;\n };\n\n struct KeyAttrs\n {\n vec4_t color;\n vec4_t shadowColor;\n float size;\n Point2d origin;\n bool shouldDrawShadow;\n };\n\n KeyAttrs attrs;\n const std::vector<KeyShader> keyShaders;\n\n void initListeners();\n void initAttrs();\n void updateKeysColor(const char *str);\n void updateKeysSize(float size);\n void updateKeysOrigin(float x, float y);\n void updateKeysShadow(bool shouldDrawShadow);\n void updateKeysShadowColor(const vec4_t shadowColor);\n virtual void drawShader(qhandle_t shader, int position) const;\n virtual void drawPressShader(qhandle_t shader, int position) const;\n virtual void drawReleaseShader(qhandle_t shader, int position) const;\n\n static int isKeyPressed(KeyNames key);\n\n template <int Cols>\n static Point2d calcGridPosition(float cellSize, int cellIndex)\n {\n return{\n cellSize * (cellIndex % Cols),\n cellSize * static_cast<int>(cellIndex / Cols)\n };\n }\n }" ({) "{" (labeled_statement) "public:\n enum class KeyNames\n {\n Empty,\n Forward,\n Backward,\n Right,\n Left,\n Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom\n };\n\n struct KeyShader\n {\n KeyNames key;\n qhandle_t press;\n qhandle_t release;\n };\n\n KeySetDrawer(const std::vector<KeyShader> &keyShaders);\n virtual ~KeySetDrawer() {};\n void render() const override;\n void beforeRender() override {};\n static std::string keyNameToString(KeyNames keyName);\n protected:\n struct Point2d\n {\n float x;\n float y;\n };\n\n struct KeyAttrs\n {\n vec4_t color;\n vec4_t shadowColor;\n float size;\n Point2d origin;\n bool shouldDrawShadow;\n };\n\n KeyAttrs attrs;\n const std::vector<KeyShader> keyShaders;\n\n void initListeners();\n void initAttrs();\n void updateKeysColor(const char *str);\n void updateKeysSize(float size);\n void updateKeysOrigin(float x, float y);\n void updateKeysShadow(bool shouldDrawShadow);\n void updateKeysShadowColor(const vec4_t shadowColor);\n virtual void drawShader(qhandle_t shader, int position) const;\n virtual void drawPressShader(qhandle_t shader, int position) const;\n virtual void drawReleaseShader(qhandle_t shader, int position) const;\n\n static int isKeyPressed(KeyNames key);\n\n template <int Cols>\n static Point2d calcGridPosition(float cellSize, int cellIndex)\n {\n return{\n cellSize * (cellIndex % Cols),\n cellSize * static_cast<int>(cellIndex / Cols)\n };\n }" (statement_identifier) "public" (:) ":" (ERROR) "enum class KeyNames" (enum_specifier) "enum class" (enum) "enum" (type_identifier) "class" (identifier) "KeyNames" (compound_statement) "{\n Empty,\n Forward,\n Backward,\n Right,\n Left,\n Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom\n };\n\n struct KeyShader\n {\n KeyNames key;\n qhandle_t press;\n qhandle_t release;\n };\n\n KeySetDrawer(const std::vector<KeyShader> &keyShaders);\n virtual ~KeySetDrawer() {};\n void render() const override;\n void beforeRender() override {};\n static std::string keyNameToString(KeyNames keyName);\n protected:\n struct Point2d\n {\n float x;\n float y;\n };\n\n struct KeyAttrs\n {\n vec4_t color;\n vec4_t shadowColor;\n float size;\n Point2d origin;\n bool shouldDrawShadow;\n };\n\n KeyAttrs attrs;\n const std::vector<KeyShader> keyShaders;\n\n void initListeners();\n void initAttrs();\n void updateKeysColor(const char *str);\n void updateKeysSize(float size);\n void updateKeysOrigin(float x, float y);\n void updateKeysShadow(bool shouldDrawShadow);\n void updateKeysShadowColor(const vec4_t shadowColor);\n virtual void drawShader(qhandle_t shader, int position) const;\n virtual void drawPressShader(qhandle_t shader, int position) const;\n virtual void drawReleaseShader(qhandle_t shader, int position) const;\n\n static int isKeyPressed(KeyNames key);\n\n template <int Cols>\n static Point2d calcGridPosition(float cellSize, int cellIndex)\n {\n return{\n cellSize * (cellIndex % Cols),\n cellSize * static_cast<int>(cellIndex / Cols)\n };\n }" ({) "{" (expression_statement) "Empty,\n Forward,\n Backward,\n Right,\n Left,\n Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom\n };" (comma_expression) "Empty,\n Forward,\n Backward,\n Right,\n Left,\n Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "Empty" (,) "," (comma_expression) "Forward,\n Backward,\n Right,\n Left,\n Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "Forward" (,) "," (comma_expression) "Backward,\n Right,\n Left,\n Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "Backward" (,) "," (comma_expression) "Right,\n Left,\n Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "Right" (,) "," (comma_expression) "Left,\n Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "Left" (,) "," (comma_expression) "Jump,\n Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "Jump" (,) "," (comma_expression) "Crouch,\n Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "Crouch" (,) "," (comma_expression) "Sprint,\n Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "Sprint" (,) "," (comma_expression) "Prone,\n LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "Prone" (,) "," (comma_expression) "LeanRight,\n LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "LeanRight" (,) "," (comma_expression) "LeanLeft,\n Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "LeanLeft" (,) "," (comma_expression) "Walk,\n Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "Walk" (,) "," (comma_expression) "Talk,\n Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "Talk" (,) "," (comma_expression) "Activate,\n Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "Activate" (,) "," (comma_expression) "Attack,\n Attack2,\n Reload,\n Zoom" (identifier) "Attack" (,) "," (comma_expression) "Attack2,\n Reload,\n Zoom" (identifier) "Attack2" (,) "," (comma_expression) "Reload,\n Zoom" (identifier) "Reload" (,) "," (identifier) "Zoom" (ERROR) "}" (}) "}" (;) ";" (struct_specifier) "struct KeyShader\n {\n KeyNames key;\n qhandle_t press;\n qhandle_t release;\n }" (struct) "struct" (type_identifier) "KeyShader" (field_declaration_list) "{\n KeyNames key;\n qhandle_t press;\n qhandle_t release;\n }" ({) "{" (field_declaration) "KeyNames key;" (type_identifier) "KeyNames" (field_identifier) "key" (;) ";" (field_declaration) "qhandle_t press;" (type_identifier) "qhandle_t" (field_identifier) "press" (;) ";" (field_declaration) "qhandle_t release;" (type_identifier) "qhandle_t" (field_identifier) "release" (;) ";" (}) "}" (;) ";" (labeled_statement) "KeySetDrawer(const std::vector<KeyShader> &keyShaders);" (statement_identifier) "KeySetDrawer" (ERROR) "(const std:" (() "(" (type_descriptor) "const std" (type_qualifier) "const" (const) "const" (type_identifier) "std" (:) ":" (:) ":" (expression_statement) "vector<KeyShader> &keyShaders);" (binary_expression) "vector<KeyShader> &keyShaders" (binary_expression) "vector<KeyShader" (identifier) "vector" (<) "<" (identifier) "KeyShader" (>) ">" (pointer_expression) "&keyShaders" (&) "&" (identifier) "keyShaders" (ERROR) ")" ()) ")" (;) ";" (function_definition) "virtual ~KeySetDrawer() {}" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "KeySetDrawer()" (identifier) "KeySetDrawer" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "void render() const override;\n void beforeRender() override {}" (primitive_type) "void" (function_declarator) "render()" (identifier) "render" (parameter_list) "()" (() "(" ()) ")" (declaration) "const override;" (type_qualifier) "const" (const) "const" (type_identifier) "override" (identifier) "" (;) ";" (ERROR) "void beforeRender() override" (primitive_type) "void" (function_declarator) "beforeRender() override" (identifier) "beforeRender" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (declaration) "static std::string keyNameToString(KeyNames keyName);" (storage_class_specifier) "static" (static) "static" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (function_declarator) "keyNameToString(KeyNames keyName)" (identifier) "keyNameToString" (parameter_list) "(KeyNames keyName)" (() "(" (parameter_declaration) "KeyNames keyName" (type_identifier) "KeyNames" (identifier) "keyName" ()) ")" (;) ";" (labeled_statement) "protected:\n struct Point2d\n {\n float x;\n float y;\n };" (statement_identifier) "protected" (:) ":" (declaration) "struct Point2d\n {\n float x;\n float y;\n };" (struct_specifier) "struct Point2d\n {\n float x;\n float y;\n }" (struct) "struct" (type_identifier) "Point2d" (field_declaration_list) "{\n float x;\n float y;\n }" ({) "{" (field_declaration) "float x;" (primitive_type) "float" (field_identifier) "x" (;) ";" (field_declaration) "float y;" (primitive_type) "float" (field_identifier) "y" (;) ";" (}) "}" (identifier) "" (;) ";" (struct_specifier) "struct KeyAttrs\n {\n vec4_t color;\n vec4_t shadowColor;\n float size;\n Point2d origin;\n bool shouldDrawShadow;\n }" (struct) "struct" (type_identifier) "KeyAttrs" (field_declaration_list) "{\n vec4_t color;\n vec4_t shadowColor;\n float size;\n Point2d origin;\n bool shouldDrawShadow;\n }" ({) "{" (field_declaration) "vec4_t color;" (type_identifier) "vec4_t" (field_identifier) "color" (;) ";" (field_declaration) "vec4_t shadowColor;" (type_identifier) "vec4_t" (field_identifier) "shadowColor" (;) ";" (field_declaration) "float size;" (primitive_type) "float" (field_identifier) "size" (;) ";" (field_declaration) "Point2d origin;" (type_identifier) "Point2d" (field_identifier) "origin" (;) ";" (field_declaration) "bool shouldDrawShadow;" (primitive_type) "bool" (field_identifier) "shouldDrawShadow" (;) ";" (}) "}" (;) ";" (declaration) "KeyAttrs attrs;" (type_identifier) "KeyAttrs" (identifier) "attrs" (;) ";" (declaration) "const std::vector<KeyShader> keyShaders;" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::vector<KeyShader>" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "KeyShader" (>) ">" (identifier) "keyShaders" (;) ";" (declaration) "void initListeners();" (primitive_type) "void" (function_declarator) "initListeners()" (identifier) "initListeners" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void initAttrs();" (primitive_type) "void" (function_declarator) "initAttrs()" (identifier) "initAttrs" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void updateKeysColor(const char *str);" (primitive_type) "void" (function_declarator) "updateKeysColor(const char *str)" (identifier) "updateKeysColor" (parameter_list) "(const char *str)" (() "(" (parameter_declaration) "const char *str" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*str" (*) "*" (identifier) "str" ()) ")" (;) ";" (declaration) "void updateKeysSize(float size);" (primitive_type) "void" (function_declarator) "updateKeysSize(float size)" (identifier) "updateKeysSize" (parameter_list) "(float size)" (() "(" (parameter_declaration) "float size" (primitive_type) "float" (identifier) "size" ()) ")" (;) ";" (declaration) "void updateKeysOrigin(float x, float y);" (primitive_type) "void" (function_declarator) "updateKeysOrigin(float x, float y)" (identifier) "updateKeysOrigin" (parameter_list) "(float x, float y)" (() "(" (parameter_declaration) "float x" (primitive_type) "float" (identifier) "x" (,) "," (parameter_declaration) "float y" (primitive_type) "float" (identifier) "y" ()) ")" (;) ";" (declaration) "void updateKeysShadow(bool shouldDrawShadow);" (primitive_type) "void" (function_declarator) "updateKeysShadow(bool shouldDrawShadow)" (identifier) "updateKeysShadow" (parameter_list) "(bool shouldDrawShadow)" (() "(" (parameter_declaration) "bool shouldDrawShadow" (primitive_type) "bool" (identifier) "shouldDrawShadow" ()) ")" (;) ";" (declaration) "void updateKeysShadowColor(const vec4_t shadowColor);" (primitive_type) "void" (function_declarator) "updateKeysShadowColor(const vec4_t shadowColor)" (identifier) "updateKeysShadowColor" (parameter_list) "(const vec4_t shadowColor)" (() "(" (parameter_declaration) "const vec4_t shadowColor" (type_qualifier) "const" (const) "const" (type_identifier) "vec4_t" (identifier) "shadowColor" ()) ")" (;) ";" (ERROR) "virtual void drawShader(qhandle_t shader, int position) const" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "drawShader(qhandle_t shader, int position) const" (identifier) "drawShader" (parameter_list) "(qhandle_t shader, int position)" (() "(" (parameter_declaration) "qhandle_t shader" (type_identifier) "qhandle_t" (identifier) "shader" (,) "," (parameter_declaration) "int position" (primitive_type) "int" (identifier) "position" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "virtual void drawPressShader(qhandle_t shader, int position) const" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "drawPressShader(qhandle_t shader, int position) const" (identifier) "drawPressShader" (parameter_list) "(qhandle_t shader, int position)" (() "(" (parameter_declaration) "qhandle_t shader" (type_identifier) "qhandle_t" (identifier) "shader" (,) "," (parameter_declaration) "int position" (primitive_type) "int" (identifier) "position" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "virtual void drawReleaseShader(qhandle_t shader, int position) const" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "drawReleaseShader(qhandle_t shader, int position) const" (identifier) "drawReleaseShader" (parameter_list) "(qhandle_t shader, int position)" (() "(" (parameter_declaration) "qhandle_t shader" (type_identifier) "qhandle_t" (identifier) "shader" (,) "," (parameter_declaration) "int position" (primitive_type) "int" (identifier) "position" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (declaration) "static int isKeyPressed(KeyNames key);" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "isKeyPressed(KeyNames key)" (identifier) "isKeyPressed" (parameter_list) "(KeyNames key)" (() "(" (parameter_declaration) "KeyNames key" (type_identifier) "KeyNames" (identifier) "key" ()) ")" (;) ";" (expression_statement) "template <int Cols>\n static" (binary_expression) "template <int Cols>\n static" (binary_expression) "template <int Cols" (identifier) "template" (<) "<" (ERROR) "int" (identifier) "int" (identifier) "Cols" (>) ">" (identifier) "static" (;) "" (function_definition) "Point2d calcGridPosition(float cellSize, int cellIndex)\n {\n return{\n cellSize * (cellIndex % Cols),\n cellSize * static_cast<int>(cellIndex / Cols)\n }" (type_identifier) "Point2d" (function_declarator) "calcGridPosition(float cellSize, int cellIndex)" (identifier) "calcGridPosition" (parameter_list) "(float cellSize, int cellIndex)" (() "(" (parameter_declaration) "float cellSize" (primitive_type) "float" (identifier) "cellSize" (,) "," (parameter_declaration) "int cellIndex" (primitive_type) "int" (identifier) "cellIndex" ()) ")" (compound_statement) "{\n return{\n cellSize * (cellIndex % Cols),\n cellSize * static_cast<int>(cellIndex / Cols)\n }" ({) "{" (return_statement) "return{\n cellSize * (cellIndex % Cols),\n cellSize * static_cast<int>(cellIndex / Cols)" (return) "return" (ERROR) "{" ({) "{" (comma_expression) "cellSize * (cellIndex % Cols),\n cellSize * static_cast<int>(cellIndex / Cols)" (binary_expression) "cellSize * (cellIndex % Cols)" (identifier) "cellSize" (*) "*" (parenthesized_expression) "(cellIndex % Cols)" (() "(" (binary_expression) "cellIndex % Cols" (identifier) "cellIndex" (%) "%" (identifier) "Cols" ()) ")" (,) "," (binary_expression) "cellSize * static_cast<int>(cellIndex / Cols)" (binary_expression) "cellSize * static_cast<int" (binary_expression) "cellSize * static_cast" (identifier) "cellSize" (*) "*" (identifier) "static_cast" (<) "<" (identifier) "int" (>) ">" (parenthesized_expression) "(cellIndex / Cols)" (() "(" (binary_expression) "cellIndex / Cols" (identifier) "cellIndex" (/) "/" (identifier) "Cols" ()) ")" (;) "" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (}) "}"
496
17
{"language": "c", "success": true, "metadata": {"lines": 107, "avg_line_length": 25.65, "nodes": 315, "errors": 0, "source_hash": "fd4e4a234e27940ae5923ad385052435a8d4bea939ac6c05bf533ee89bbe5d35", "categorized_nodes": 236}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"cg_local.h\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"cg_local.h\"", "parent": 3, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 21}}, {"id": 6, "type": "preproc_ifdef", "text": "#ifdef min\n#undef min\n#endif", "parent": null, "children": [7, 8, 9, 12], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 7, "type": "#ifdef", "text": "#ifdef", "parent": 6, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 8, "type": "identifier", "text": "min", "parent": 6, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 10}}, {"id": 9, "type": "preproc_call", "text": "#undef min\n", "parent": 6, "children": [10, 11], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 10, "type": "preproc_directive", "text": "#undef", "parent": 9, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 11, "type": "preproc_arg", "text": "min", "parent": 9, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 10}}, {"id": 12, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 13, "type": "preproc_ifdef", "text": "#ifdef max\n#undef max\n#endif", "parent": null, "children": [14, 15, 16, 19], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 32, "column": 6}}, {"id": 14, "type": "#ifdef", "text": "#ifdef", "parent": 13, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 6}}, {"id": 15, "type": "identifier", "text": "max", "parent": 13, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 10}}, {"id": 16, "type": "preproc_call", "text": "#undef max\n", "parent": 13, "children": [17, 18], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 17, "type": "preproc_directive", "text": "#undef", "parent": 16, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 6}}, {"id": 18, "type": "preproc_arg", "text": "max", "parent": 16, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 10}}, {"id": 19, "type": "#endif", "text": "#endif", "parent": 13, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 6}}, {"id": 20, "type": "preproc_include", "text": "#include \"etj_irenderable.h\"\n", "parent": null, "children": [21, 22], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 21, "type": "#include", "text": "#include", "parent": 20, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 22, "type": "string_literal", "text": "\"etj_irenderable.h\"", "parent": 20, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 28}}, {"id": 23, "type": "preproc_include", "text": "#include <vector>\n", "parent": null, "children": [24, 25], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 24, "type": "#include", "text": "#include", "parent": 23, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 25, "type": "system_lib_string", "text": "<vector>", "parent": 23, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 17}}, {"id": 26, "type": "function_definition", "text": "namespace ETJump\n{\n\tclass KeySetDrawer : public IRenderable\n\t{\n\tpublic:\n\t\tenum class KeyNames\n\t\t{\n\t\t\tEmpty,\n\t\t\tForward,\n\t\t\tBackward,\n\t\t\tRight,\n\t\t\tLeft,\n\t\t\tJump,\n\t\t\tCrouch,\n\t\t\tSprint,\n\t\t\tProne,\n\t\t\tLeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom\n\t\t};\n\n\t\tstruct KeyShader\n\t\t{\n\t\t\tKeyNames key;\n\t\t\tqhandle_t press;\n\t\t\tqhandle_t release;\n\t\t};\n\n\t\tKeySetDrawer(const std::vector<KeyShader> &keyShaders);\n\t\tvirtual ~KeySetDrawer() {};\n\t\tvoid render() const override;\n\t\tvoid beforeRender() override {};\n\t\tstatic std::string keyNameToString(KeyNames keyName);\n\tprotected:\n\t\tstruct Point2d\n\t\t{\n\t\t\tfloat x;\n\t\t\tfloat y;\n\t\t};\n\n\t\tstruct KeyAttrs\n\t\t{\n\t\t\tvec4_t color;\n\t\t\tvec4_t shadowColor;\n\t\t\tfloat size;\n\t\t\tPoint2d origin;\n\t\t\tbool shouldDrawShadow;\n\t\t};\n\n\t\tKeyAttrs attrs;\n\t\tconst std::vector<KeyShader> keyShaders;\n\n\t\tvoid initListeners();\n\t\tvoid initAttrs();\n\t\tvoid updateKeysColor(const char *str);\n\t\tvoid updateKeysSize(float size);\n\t\tvoid updateKeysOrigin(float x, float y);\n\t\tvoid updateKeysShadow(bool shouldDrawShadow);\n\t\tvoid updateKeysShadowColor(const vec4_t shadowColor);\n\t\tvirtual void drawShader(qhandle_t shader, int position) const;\n\t\tvirtual void drawPressShader(qhandle_t shader, int position) const;\n\t\tvirtual void drawReleaseShader(qhandle_t shader, int position) const;\n\n\t\tstatic int isKeyPressed(KeyNames key);\n\n\t\ttemplate <int Cols>\n\t\tstatic Point2d calcGridPosition(float cellSize, int cellIndex)\n\t\t{\n\t\t\treturn{\n\t\t\t\tcellSize * (cellIndex % Cols),\n\t\t\t\tcellSize * static_cast<int>(cellIndex / Cols)\n\t\t\t};\n\t\t}\n\t};\n}", "parent": null, "children": [27, 28], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 117, "column": 1}}, {"id": 27, "type": "type_identifier", "text": "namespace", "parent": 26, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 9}}, {"id": 28, "type": "identifier", "text": "ETJump", "parent": 26, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 16}}, {"id": 29, "type": "function_definition", "text": "class KeySetDrawer : public IRenderable\n\t{\n\tpublic:\n\t\tenum class KeyNames\n\t\t{\n\t\t\tEmpty,\n\t\t\tForward,\n\t\t\tBackward,\n\t\t\tRight,\n\t\t\tLeft,\n\t\t\tJump,\n\t\t\tCrouch,\n\t\t\tSprint,\n\t\t\tProne,\n\t\t\tLeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom\n\t\t};\n\n\t\tstruct KeyShader\n\t\t{\n\t\t\tKeyNames key;\n\t\t\tqhandle_t press;\n\t\t\tqhandle_t release;\n\t\t};\n\n\t\tKeySetDrawer(const std::vector<KeyShader> &keyShaders);\n\t\tvirtual ~KeySetDrawer() {};\n\t\tvoid render() const override;\n\t\tvoid beforeRender() override {};\n\t\tstatic std::string keyNameToString(KeyNames keyName);\n\tprotected:\n\t\tstruct Point2d\n\t\t{\n\t\t\tfloat x;\n\t\t\tfloat y;\n\t\t};\n\n\t\tstruct KeyAttrs\n\t\t{\n\t\t\tvec4_t color;\n\t\t\tvec4_t shadowColor;\n\t\t\tfloat size;\n\t\t\tPoint2d origin;\n\t\t\tbool shouldDrawShadow;\n\t\t};\n\n\t\tKeyAttrs attrs;\n\t\tconst std::vector<KeyShader> keyShaders;\n\n\t\tvoid initListeners();\n\t\tvoid initAttrs();\n\t\tvoid updateKeysColor(const char *str);\n\t\tvoid updateKeysSize(float size);\n\t\tvoid updateKeysOrigin(float x, float y);\n\t\tvoid updateKeysShadow(bool shouldDrawShadow);\n\t\tvoid updateKeysShadowColor(const vec4_t shadowColor);\n\t\tvirtual void drawShader(qhandle_t shader, int position) const;\n\t\tvirtual void drawPressShader(qhandle_t shader, int position) const;\n\t\tvirtual void drawReleaseShader(qhandle_t shader, int position) const;\n\n\t\tstatic int isKeyPressed(KeyNames key);\n\n\t\ttemplate <int Cols>\n\t\tstatic Point2d calcGridPosition(float cellSize, int cellIndex)\n\t\t{\n\t\t\treturn{\n\t\t\t\tcellSize * (cellIndex % Cols),\n\t\t\t\tcellSize * static_cast<int>(cellIndex / Cols)\n\t\t\t};\n\t\t}\n\t}", "parent": 26, "children": [30, 31], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 116, "column": 2}}, {"id": 30, "type": "identifier", "text": "KeySetDrawer", "parent": 29, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 19}}, {"id": 31, "type": "ERROR", "text": ": public IRenderable", "parent": 29, "children": [32], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 40}}, {"id": 32, "type": "identifier", "text": "IRenderable", "parent": 31, "children": [], "start_point": {"row": 39, "column": 29}, "end_point": {"row": 39, "column": 40}}, {"id": 33, "type": "labeled_statement", "text": "public:\n\t\tenum class KeyNames\n\t\t{\n\t\t\tEmpty,\n\t\t\tForward,\n\t\t\tBackward,\n\t\t\tRight,\n\t\t\tLeft,\n\t\t\tJump,\n\t\t\tCrouch,\n\t\t\tSprint,\n\t\t\tProne,\n\t\t\tLeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom\n\t\t};\n\n\t\tstruct KeyShader\n\t\t{\n\t\t\tKeyNames key;\n\t\t\tqhandle_t press;\n\t\t\tqhandle_t release;\n\t\t};\n\n\t\tKeySetDrawer(const std::vector<KeyShader> &keyShaders);\n\t\tvirtual ~KeySetDrawer() {};\n\t\tvoid render() const override;\n\t\tvoid beforeRender() override {};\n\t\tstatic std::string keyNameToString(KeyNames keyName);\n\tprotected:\n\t\tstruct Point2d\n\t\t{\n\t\t\tfloat x;\n\t\t\tfloat y;\n\t\t};\n\n\t\tstruct KeyAttrs\n\t\t{\n\t\t\tvec4_t color;\n\t\t\tvec4_t shadowColor;\n\t\t\tfloat size;\n\t\t\tPoint2d origin;\n\t\t\tbool shouldDrawShadow;\n\t\t};\n\n\t\tKeyAttrs attrs;\n\t\tconst std::vector<KeyShader> keyShaders;\n\n\t\tvoid initListeners();\n\t\tvoid initAttrs();\n\t\tvoid updateKeysColor(const char *str);\n\t\tvoid updateKeysSize(float size);\n\t\tvoid updateKeysOrigin(float x, float y);\n\t\tvoid updateKeysShadow(bool shouldDrawShadow);\n\t\tvoid updateKeysShadowColor(const vec4_t shadowColor);\n\t\tvirtual void drawShader(qhandle_t shader, int position) const;\n\t\tvirtual void drawPressShader(qhandle_t shader, int position) const;\n\t\tvirtual void drawReleaseShader(qhandle_t shader, int position) const;\n\n\t\tstatic int isKeyPressed(KeyNames key);\n\n\t\ttemplate <int Cols>\n\t\tstatic Point2d calcGridPosition(float cellSize, int cellIndex)\n\t\t{\n\t\t\treturn{\n\t\t\t\tcellSize * (cellIndex % Cols),\n\t\t\t\tcellSize * static_cast<int>(cellIndex / Cols)\n\t\t\t};\n\t\t}", "parent": 29, "children": [34], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 115, "column": 3}}, {"id": 34, "type": "ERROR", "text": "enum class KeyNames", "parent": 33, "children": [35, 37], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 21}}, {"id": 35, "type": "enum_specifier", "text": "enum class", "parent": 34, "children": [36], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 12}}, {"id": 36, "type": "enum", "text": "enum", "parent": 35, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 6}}, {"id": 37, "type": "identifier", "text": "KeyNames", "parent": 34, "children": [], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 21}}, {"id": 38, "type": "comma_expression", "text": "Empty,\n\t\t\tForward,\n\t\t\tBackward,\n\t\t\tRight,\n\t\t\tLeft,\n\t\t\tJump,\n\t\t\tCrouch,\n\t\t\tSprint,\n\t\t\tProne,\n\t\t\tLeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 33, "children": [39, 40], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 39, "type": "identifier", "text": "Empty", "parent": 38, "children": [], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 8}}, {"id": 40, "type": "comma_expression", "text": "Forward,\n\t\t\tBackward,\n\t\t\tRight,\n\t\t\tLeft,\n\t\t\tJump,\n\t\t\tCrouch,\n\t\t\tSprint,\n\t\t\tProne,\n\t\t\tLeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 38, "children": [41, 42], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 41, "type": "identifier", "text": "Forward", "parent": 40, "children": [], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 10}}, {"id": 42, "type": "comma_expression", "text": "Backward,\n\t\t\tRight,\n\t\t\tLeft,\n\t\t\tJump,\n\t\t\tCrouch,\n\t\t\tSprint,\n\t\t\tProne,\n\t\t\tLeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 40, "children": [43, 44], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 43, "type": "identifier", "text": "Backward", "parent": 42, "children": [], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 46, "column": 11}}, {"id": 44, "type": "comma_expression", "text": "Right,\n\t\t\tLeft,\n\t\t\tJump,\n\t\t\tCrouch,\n\t\t\tSprint,\n\t\t\tProne,\n\t\t\tLeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 42, "children": [45, 46], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 45, "type": "identifier", "text": "Right", "parent": 44, "children": [], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 8}}, {"id": 46, "type": "comma_expression", "text": "Left,\n\t\t\tJump,\n\t\t\tCrouch,\n\t\t\tSprint,\n\t\t\tProne,\n\t\t\tLeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 44, "children": [47, 48], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 47, "type": "identifier", "text": "Left", "parent": 46, "children": [], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 48, "column": 7}}, {"id": 48, "type": "comma_expression", "text": "Jump,\n\t\t\tCrouch,\n\t\t\tSprint,\n\t\t\tProne,\n\t\t\tLeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 46, "children": [49, 50], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 49, "type": "identifier", "text": "Jump", "parent": 48, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 7}}, {"id": 50, "type": "comma_expression", "text": "Crouch,\n\t\t\tSprint,\n\t\t\tProne,\n\t\t\tLeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 48, "children": [51, 52], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 51, "type": "identifier", "text": "Crouch", "parent": 50, "children": [], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 9}}, {"id": 52, "type": "comma_expression", "text": "Sprint,\n\t\t\tProne,\n\t\t\tLeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 50, "children": [53, 54], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 53, "type": "identifier", "text": "Sprint", "parent": 52, "children": [], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 9}}, {"id": 54, "type": "comma_expression", "text": "Prone,\n\t\t\tLeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 52, "children": [55, 56], "start_point": {"row": 52, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 55, "type": "identifier", "text": "Prone", "parent": 54, "children": [], "start_point": {"row": 52, "column": 3}, "end_point": {"row": 52, "column": 8}}, {"id": 56, "type": "comma_expression", "text": "LeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 54, "children": [57, 58], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 57, "type": "identifier", "text": "LeanRight", "parent": 56, "children": [], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 12}}, {"id": 58, "type": "comma_expression", "text": "LeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 56, "children": [59, 60], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 59, "type": "identifier", "text": "LeanLeft", "parent": 58, "children": [], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 54, "column": 11}}, {"id": 60, "type": "comma_expression", "text": "Walk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 58, "children": [61, 62], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 61, "type": "identifier", "text": "Walk", "parent": 60, "children": [], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 7}}, {"id": 62, "type": "comma_expression", "text": "Talk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 60, "children": [63, 64], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 63, "type": "identifier", "text": "Talk", "parent": 62, "children": [], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 56, "column": 7}}, {"id": 64, "type": "comma_expression", "text": "Activate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 62, "children": [65, 66], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 65, "type": "identifier", "text": "Activate", "parent": 64, "children": [], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 11}}, {"id": 66, "type": "comma_expression", "text": "Attack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 64, "children": [67, 68], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 67, "type": "identifier", "text": "Attack", "parent": 66, "children": [], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 9}}, {"id": 68, "type": "comma_expression", "text": "Attack2,\n\t\t\tReload,\n\t\t\tZoom", "parent": 66, "children": [69, 70], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 69, "type": "identifier", "text": "Attack2", "parent": 68, "children": [], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 10}}, {"id": 70, "type": "comma_expression", "text": "Reload,\n\t\t\tZoom", "parent": 68, "children": [71, 72], "start_point": {"row": 60, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 71, "type": "identifier", "text": "Reload", "parent": 70, "children": [], "start_point": {"row": 60, "column": 3}, "end_point": {"row": 60, "column": 9}}, {"id": 72, "type": "identifier", "text": "Zoom", "parent": 70, "children": [], "start_point": {"row": 61, "column": 3}, "end_point": {"row": 61, "column": 7}}, {"id": 73, "type": "struct_specifier", "text": "struct KeyShader\n\t\t{\n\t\t\tKeyNames key;\n\t\t\tqhandle_t press;\n\t\t\tqhandle_t release;\n\t\t}", "parent": 33, "children": [74, 75], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 69, "column": 3}}, {"id": 74, "type": "struct", "text": "struct", "parent": 73, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 8}}, {"id": 75, "type": "type_identifier", "text": "KeyShader", "parent": 73, "children": [], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 18}}, {"id": 76, "type": "field_declaration", "text": "KeyNames key;", "parent": 73, "children": [77, 78], "start_point": {"row": 66, "column": 3}, "end_point": {"row": 66, "column": 16}}, {"id": 77, "type": "type_identifier", "text": "KeyNames", "parent": 76, "children": [], "start_point": {"row": 66, "column": 3}, "end_point": {"row": 66, "column": 11}}, {"id": 78, "type": "field_identifier", "text": "key", "parent": 76, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 15}}, {"id": 79, "type": "field_declaration", "text": "qhandle_t press;", "parent": 73, "children": [80, 81], "start_point": {"row": 67, "column": 3}, "end_point": {"row": 67, "column": 19}}, {"id": 80, "type": "type_identifier", "text": "qhandle_t", "parent": 79, "children": [], "start_point": {"row": 67, "column": 3}, "end_point": {"row": 67, "column": 12}}, {"id": 81, "type": "field_identifier", "text": "press", "parent": 79, "children": [], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 18}}, {"id": 82, "type": "field_declaration", "text": "qhandle_t release;", "parent": 73, "children": [83, 84], "start_point": {"row": 68, "column": 3}, "end_point": {"row": 68, "column": 21}}, {"id": 83, "type": "type_identifier", "text": "qhandle_t", "parent": 82, "children": [], "start_point": {"row": 68, "column": 3}, "end_point": {"row": 68, "column": 12}}, {"id": 84, "type": "field_identifier", "text": "release", "parent": 82, "children": [], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 20}}, {"id": 85, "type": "labeled_statement", "text": "KeySetDrawer(const std::vector<KeyShader> &keyShaders);", "parent": 33, "children": [86, 87], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 57}}, {"id": 86, "type": "statement_identifier", "text": "KeySetDrawer", "parent": 85, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 14}}, {"id": 87, "type": "ERROR", "text": "(const std:", "parent": 85, "children": [88], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 25}}, {"id": 88, "type": "type_descriptor", "text": "const std", "parent": 87, "children": [89], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 24}}, {"id": 89, "type": "type_identifier", "text": "std", "parent": 88, "children": [], "start_point": {"row": 71, "column": 21}, "end_point": {"row": 71, "column": 24}}, {"id": 90, "type": "binary_expression", "text": "vector<KeyShader> &keyShaders", "parent": 85, "children": [91, 95, 96], "start_point": {"row": 71, "column": 26}, "end_point": {"row": 71, "column": 55}}, {"id": 91, "type": "binary_expression", "text": "vector<KeyShader", "parent": 90, "children": [92, 93, 94], "start_point": {"row": 71, "column": 26}, "end_point": {"row": 71, "column": 42}}, {"id": 92, "type": "identifier", "text": "vector", "parent": 91, "children": [], "start_point": {"row": 71, "column": 26}, "end_point": {"row": 71, "column": 32}}, {"id": 93, "type": "<", "text": "<", "parent": 91, "children": [], "start_point": {"row": 71, "column": 32}, "end_point": {"row": 71, "column": 33}}, {"id": 94, "type": "identifier", "text": "KeyShader", "parent": 91, "children": [], "start_point": {"row": 71, "column": 33}, "end_point": {"row": 71, "column": 42}}, {"id": 95, "type": ">", "text": ">", "parent": 90, "children": [], "start_point": {"row": 71, "column": 42}, "end_point": {"row": 71, "column": 43}}, {"id": 96, "type": "pointer_expression", "text": "&keyShaders", "parent": 90, "children": [97], "start_point": {"row": 71, "column": 44}, "end_point": {"row": 71, "column": 55}}, {"id": 97, "type": "identifier", "text": "keyShaders", "parent": 96, "children": [], "start_point": {"row": 71, "column": 45}, "end_point": {"row": 71, "column": 55}}, {"id": 98, "type": "function_definition", "text": "virtual ~KeySetDrawer() {}", "parent": 33, "children": [99, 100, 102], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 28}}, {"id": 99, "type": "type_identifier", "text": "virtual", "parent": 98, "children": [], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 9}}, {"id": 100, "type": "ERROR", "text": "~", "parent": 98, "children": [101], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 11}}, {"id": 101, "type": "~", "text": "~", "parent": 100, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 11}}, {"id": 102, "type": "function_declarator", "text": "KeySetDrawer()", "parent": 98, "children": [103, 104], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 25}}, {"id": 103, "type": "identifier", "text": "KeySetDrawer", "parent": 102, "children": [], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 23}}, {"id": 104, "type": "parameter_list", "text": "()", "parent": 102, "children": [], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 25}}, {"id": 105, "type": "function_definition", "text": "void render() const override;\n\t\tvoid beforeRender() override {}", "parent": 33, "children": [106, 107, 110, 113], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 74, "column": 33}}, {"id": 106, "type": "primitive_type", "text": "void", "parent": 105, "children": [], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 6}}, {"id": 107, "type": "function_declarator", "text": "render()", "parent": 105, "children": [108, 109], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 15}}, {"id": 108, "type": "identifier", "text": "render", "parent": 107, "children": [], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 13}}, {"id": 109, "type": "parameter_list", "text": "()", "parent": 107, "children": [], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 15}}, {"id": 110, "type": "declaration", "text": "const override;", "parent": 105, "children": [111, 112], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 31}}, {"id": 111, "type": "type_identifier", "text": "override", "parent": 110, "children": [], "start_point": {"row": 73, "column": 22}, "end_point": {"row": 73, "column": 30}}, {"id": 112, "type": "identifier", "text": "", "parent": 110, "children": [], "start_point": {"row": 73, "column": 30}, "end_point": {"row": 73, "column": 30}}, {"id": 113, "type": "ERROR", "text": "void beforeRender() override", "parent": 105, "children": [114, 115], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 30}}, {"id": 114, "type": "primitive_type", "text": "void", "parent": 113, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 6}}, {"id": 115, "type": "function_declarator", "text": "beforeRender() override", "parent": 113, "children": [116, 117, 118], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 30}}, {"id": 116, "type": "identifier", "text": "beforeRender", "parent": 115, "children": [], "start_point": {"row": 74, "column": 7}, "end_point": {"row": 74, "column": 19}}, {"id": 117, "type": "parameter_list", "text": "()", "parent": 115, "children": [], "start_point": {"row": 74, "column": 19}, "end_point": {"row": 74, "column": 21}}, {"id": 118, "type": "identifier", "text": "override", "parent": 115, "children": [], "start_point": {"row": 74, "column": 22}, "end_point": {"row": 74, "column": 30}}, {"id": 119, "type": "declaration", "text": "static std::string keyNameToString(KeyNames keyName);", "parent": 33, "children": [120, 121, 123], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 55}}, {"id": 120, "type": "type_identifier", "text": "std", "parent": 119, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 12}}, {"id": 121, "type": "ERROR", "text": "::string", "parent": 119, "children": [122], "start_point": {"row": 75, "column": 12}, "end_point": {"row": 75, "column": 20}}, {"id": 122, "type": "identifier", "text": "string", "parent": 121, "children": [], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 20}}, {"id": 123, "type": "function_declarator", "text": "keyNameToString(KeyNames keyName)", "parent": 119, "children": [124, 125], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 54}}, {"id": 124, "type": "identifier", "text": "keyNameToString", "parent": 123, "children": [], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 36}}, {"id": 125, "type": "parameter_list", "text": "(KeyNames keyName)", "parent": 123, "children": [126], "start_point": {"row": 75, "column": 36}, "end_point": {"row": 75, "column": 54}}, {"id": 126, "type": "parameter_declaration", "text": "KeyNames keyName", "parent": 125, "children": [127, 128], "start_point": {"row": 75, "column": 37}, "end_point": {"row": 75, "column": 53}}, {"id": 127, "type": "type_identifier", "text": "KeyNames", "parent": 126, "children": [], "start_point": {"row": 75, "column": 37}, "end_point": {"row": 75, "column": 45}}, {"id": 128, "type": "identifier", "text": "keyName", "parent": 126, "children": [], "start_point": {"row": 75, "column": 46}, "end_point": {"row": 75, "column": 53}}, {"id": 129, "type": "labeled_statement", "text": "protected:\n\t\tstruct Point2d\n\t\t{\n\t\t\tfloat x;\n\t\t\tfloat y;\n\t\t};", "parent": 33, "children": [130], "start_point": {"row": 76, "column": 1}, "end_point": {"row": 81, "column": 4}}, {"id": 130, "type": "declaration", "text": "struct Point2d\n\t\t{\n\t\t\tfloat x;\n\t\t\tfloat y;\n\t\t};", "parent": 129, "children": [131, 140], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 81, "column": 4}}, {"id": 131, "type": "struct_specifier", "text": "struct Point2d\n\t\t{\n\t\t\tfloat x;\n\t\t\tfloat y;\n\t\t}", "parent": 130, "children": [132, 133], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 81, "column": 3}}, {"id": 132, "type": "struct", "text": "struct", "parent": 131, "children": [], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 8}}, {"id": 133, "type": "type_identifier", "text": "Point2d", "parent": 131, "children": [], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 16}}, {"id": 134, "type": "field_declaration", "text": "float x;", "parent": 131, "children": [135, 136], "start_point": {"row": 79, "column": 3}, "end_point": {"row": 79, "column": 11}}, {"id": 135, "type": "primitive_type", "text": "float", "parent": 134, "children": [], "start_point": {"row": 79, "column": 3}, "end_point": {"row": 79, "column": 8}}, {"id": 136, "type": "field_identifier", "text": "x", "parent": 134, "children": [], "start_point": {"row": 79, "column": 9}, "end_point": {"row": 79, "column": 10}}, {"id": 137, "type": "field_declaration", "text": "float y;", "parent": 131, "children": [138, 139], "start_point": {"row": 80, "column": 3}, "end_point": {"row": 80, "column": 11}}, {"id": 138, "type": "primitive_type", "text": "float", "parent": 137, "children": [], "start_point": {"row": 80, "column": 3}, "end_point": {"row": 80, "column": 8}}, {"id": 139, "type": "field_identifier", "text": "y", "parent": 137, "children": [], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 10}}, {"id": 140, "type": "identifier", "text": "", "parent": 130, "children": [], "start_point": {"row": 81, "column": 3}, "end_point": {"row": 81, "column": 3}}, {"id": 141, "type": "struct_specifier", "text": "struct KeyAttrs\n\t\t{\n\t\t\tvec4_t color;\n\t\t\tvec4_t shadowColor;\n\t\t\tfloat size;\n\t\t\tPoint2d origin;\n\t\t\tbool shouldDrawShadow;\n\t\t}", "parent": 33, "children": [142, 143], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 90, "column": 3}}, {"id": 142, "type": "struct", "text": "struct", "parent": 141, "children": [], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 8}}, {"id": 143, "type": "type_identifier", "text": "KeyAttrs", "parent": 141, "children": [], "start_point": {"row": 83, "column": 9}, "end_point": {"row": 83, "column": 17}}, {"id": 144, "type": "field_declaration", "text": "vec4_t color;", "parent": 141, "children": [145, 146], "start_point": {"row": 85, "column": 3}, "end_point": {"row": 85, "column": 16}}, {"id": 145, "type": "type_identifier", "text": "vec4_t", "parent": 144, "children": [], "start_point": {"row": 85, "column": 3}, "end_point": {"row": 85, "column": 9}}, {"id": 146, "type": "field_identifier", "text": "color", "parent": 144, "children": [], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 15}}, {"id": 147, "type": "field_declaration", "text": "vec4_t shadowColor;", "parent": 141, "children": [148, 149], "start_point": {"row": 86, "column": 3}, "end_point": {"row": 86, "column": 22}}, {"id": 148, "type": "type_identifier", "text": "vec4_t", "parent": 147, "children": [], "start_point": {"row": 86, "column": 3}, "end_point": {"row": 86, "column": 9}}, {"id": 149, "type": "field_identifier", "text": "shadowColor", "parent": 147, "children": [], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 86, "column": 21}}, {"id": 150, "type": "field_declaration", "text": "float size;", "parent": 141, "children": [151, 152], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 87, "column": 14}}, {"id": 151, "type": "primitive_type", "text": "float", "parent": 150, "children": [], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 87, "column": 8}}, {"id": 152, "type": "field_identifier", "text": "size", "parent": 150, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 13}}, {"id": 153, "type": "field_declaration", "text": "Point2d origin;", "parent": 141, "children": [154, 155], "start_point": {"row": 88, "column": 3}, "end_point": {"row": 88, "column": 18}}, {"id": 154, "type": "type_identifier", "text": "Point2d", "parent": 153, "children": [], "start_point": {"row": 88, "column": 3}, "end_point": {"row": 88, "column": 10}}, {"id": 155, "type": "field_identifier", "text": "origin", "parent": 153, "children": [], "start_point": {"row": 88, "column": 11}, "end_point": {"row": 88, "column": 17}}, {"id": 156, "type": "field_declaration", "text": "bool shouldDrawShadow;", "parent": 141, "children": [157, 158], "start_point": {"row": 89, "column": 3}, "end_point": {"row": 89, "column": 25}}, {"id": 157, "type": "primitive_type", "text": "bool", "parent": 156, "children": [], "start_point": {"row": 89, "column": 3}, "end_point": {"row": 89, "column": 7}}, {"id": 158, "type": "field_identifier", "text": "shouldDrawShadow", "parent": 156, "children": [], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 24}}, {"id": 159, "type": "declaration", "text": "KeyAttrs attrs;", "parent": 33, "children": [160, 161], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 17}}, {"id": 160, "type": "type_identifier", "text": "KeyAttrs", "parent": 159, "children": [], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 10}}, {"id": 161, "type": "identifier", "text": "attrs", "parent": 159, "children": [], "start_point": {"row": 92, "column": 11}, "end_point": {"row": 92, "column": 16}}, {"id": 162, "type": "declaration", "text": "const std::vector<KeyShader> keyShaders;", "parent": 33, "children": [163, 164, 169], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 42}}, {"id": 163, "type": "type_identifier", "text": "std", "parent": 162, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 11}}, {"id": 164, "type": "ERROR", "text": "::vector<KeyShader>", "parent": 162, "children": [165, 166, 167, 168], "start_point": {"row": 93, "column": 11}, "end_point": {"row": 93, "column": 30}}, {"id": 165, "type": "identifier", "text": "vector", "parent": 164, "children": [], "start_point": {"row": 93, "column": 13}, "end_point": {"row": 93, "column": 19}}, {"id": 166, "type": "<", "text": "<", "parent": 164, "children": [], "start_point": {"row": 93, "column": 19}, "end_point": {"row": 93, "column": 20}}, {"id": 167, "type": "identifier", "text": "KeyShader", "parent": 164, "children": [], "start_point": {"row": 93, "column": 20}, "end_point": {"row": 93, "column": 29}}, {"id": 168, "type": ">", "text": ">", "parent": 164, "children": [], "start_point": {"row": 93, "column": 29}, "end_point": {"row": 93, "column": 30}}, {"id": 169, "type": "identifier", "text": "keyShaders", "parent": 162, "children": [], "start_point": {"row": 93, "column": 31}, "end_point": {"row": 93, "column": 41}}, {"id": 170, "type": "declaration", "text": "void initListeners();", "parent": 33, "children": [171, 172], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 23}}, {"id": 171, "type": "primitive_type", "text": "void", "parent": 170, "children": [], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 6}}, {"id": 172, "type": "function_declarator", "text": "initListeners()", "parent": 170, "children": [173, 174], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 22}}, {"id": 173, "type": "identifier", "text": "initListeners", "parent": 172, "children": [], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 20}}, {"id": 174, "type": "parameter_list", "text": "()", "parent": 172, "children": [], "start_point": {"row": 95, "column": 20}, "end_point": {"row": 95, "column": 22}}, {"id": 175, "type": "declaration", "text": "void initAttrs();", "parent": 33, "children": [176, 177], "start_point": {"row": 96, "column": 2}, "end_point": {"row": 96, "column": 19}}, {"id": 176, "type": "primitive_type", "text": "void", "parent": 175, "children": [], "start_point": {"row": 96, "column": 2}, "end_point": {"row": 96, "column": 6}}, {"id": 177, "type": "function_declarator", "text": "initAttrs()", "parent": 175, "children": [178, 179], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 18}}, {"id": 178, "type": "identifier", "text": "initAttrs", "parent": 177, "children": [], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 16}}, {"id": 179, "type": "parameter_list", "text": "()", "parent": 177, "children": [], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 18}}, {"id": 180, "type": "declaration", "text": "void updateKeysColor(const char *str);", "parent": 33, "children": [181, 182], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 40}}, {"id": 181, "type": "primitive_type", "text": "void", "parent": 180, "children": [], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 6}}, {"id": 182, "type": "function_declarator", "text": "updateKeysColor(const char *str)", "parent": 180, "children": [183, 184], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 39}}, {"id": 183, "type": "identifier", "text": "updateKeysColor", "parent": 182, "children": [], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 22}}, {"id": 184, "type": "parameter_list", "text": "(const char *str)", "parent": 182, "children": [185], "start_point": {"row": 97, "column": 22}, "end_point": {"row": 97, "column": 39}}, {"id": 185, "type": "parameter_declaration", "text": "const char *str", "parent": 184, "children": [186, 187], "start_point": {"row": 97, "column": 23}, "end_point": {"row": 97, "column": 38}}, {"id": 186, "type": "primitive_type", "text": "char", "parent": 185, "children": [], "start_point": {"row": 97, "column": 29}, "end_point": {"row": 97, "column": 33}}, {"id": 187, "type": "pointer_declarator", "text": "*str", "parent": 185, "children": [188, 189], "start_point": {"row": 97, "column": 34}, "end_point": {"row": 97, "column": 38}}, {"id": 188, "type": "*", "text": "*", "parent": 187, "children": [], "start_point": {"row": 97, "column": 34}, "end_point": {"row": 97, "column": 35}}, {"id": 189, "type": "identifier", "text": "str", "parent": 187, "children": [], "start_point": {"row": 97, "column": 35}, "end_point": {"row": 97, "column": 38}}, {"id": 190, "type": "declaration", "text": "void updateKeysSize(float size);", "parent": 33, "children": [191, 192], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 34}}, {"id": 191, "type": "primitive_type", "text": "void", "parent": 190, "children": [], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 6}}, {"id": 192, "type": "function_declarator", "text": "updateKeysSize(float size)", "parent": 190, "children": [193, 194], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 33}}, {"id": 193, "type": "identifier", "text": "updateKeysSize", "parent": 192, "children": [], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 21}}, {"id": 194, "type": "parameter_list", "text": "(float size)", "parent": 192, "children": [195], "start_point": {"row": 98, "column": 21}, "end_point": {"row": 98, "column": 33}}, {"id": 195, "type": "parameter_declaration", "text": "float size", "parent": 194, "children": [196, 197], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 32}}, {"id": 196, "type": "primitive_type", "text": "float", "parent": 195, "children": [], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 27}}, {"id": 197, "type": "identifier", "text": "size", "parent": 195, "children": [], "start_point": {"row": 98, "column": 28}, "end_point": {"row": 98, "column": 32}}, {"id": 198, "type": "declaration", "text": "void updateKeysOrigin(float x, float y);", "parent": 33, "children": [199, 200], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 42}}, {"id": 199, "type": "primitive_type", "text": "void", "parent": 198, "children": [], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 6}}, {"id": 200, "type": "function_declarator", "text": "updateKeysOrigin(float x, float y)", "parent": 198, "children": [201, 202], "start_point": {"row": 99, "column": 7}, "end_point": {"row": 99, "column": 41}}, {"id": 201, "type": "identifier", "text": "updateKeysOrigin", "parent": 200, "children": [], "start_point": {"row": 99, "column": 7}, "end_point": {"row": 99, "column": 23}}, {"id": 202, "type": "parameter_list", "text": "(float x, float y)", "parent": 200, "children": [203, 206], "start_point": {"row": 99, "column": 23}, "end_point": {"row": 99, "column": 41}}, {"id": 203, "type": "parameter_declaration", "text": "float x", "parent": 202, "children": [204, 205], "start_point": {"row": 99, "column": 24}, "end_point": {"row": 99, "column": 31}}, {"id": 204, "type": "primitive_type", "text": "float", "parent": 203, "children": [], "start_point": {"row": 99, "column": 24}, "end_point": {"row": 99, "column": 29}}, {"id": 205, "type": "identifier", "text": "x", "parent": 203, "children": [], "start_point": {"row": 99, "column": 30}, "end_point": {"row": 99, "column": 31}}, {"id": 206, "type": "parameter_declaration", "text": "float y", "parent": 202, "children": [207, 208], "start_point": {"row": 99, "column": 33}, "end_point": {"row": 99, "column": 40}}, {"id": 207, "type": "primitive_type", "text": "float", "parent": 206, "children": [], "start_point": {"row": 99, "column": 33}, "end_point": {"row": 99, "column": 38}}, {"id": 208, "type": "identifier", "text": "y", "parent": 206, "children": [], "start_point": {"row": 99, "column": 39}, "end_point": {"row": 99, "column": 40}}, {"id": 209, "type": "declaration", "text": "void updateKeysShadow(bool shouldDrawShadow);", "parent": 33, "children": [210, 211], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 47}}, {"id": 210, "type": "primitive_type", "text": "void", "parent": 209, "children": [], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 6}}, {"id": 211, "type": "function_declarator", "text": "updateKeysShadow(bool shouldDrawShadow)", "parent": 209, "children": [212, 213], "start_point": {"row": 100, "column": 7}, "end_point": {"row": 100, "column": 46}}, {"id": 212, "type": "identifier", "text": "updateKeysShadow", "parent": 211, "children": [], "start_point": {"row": 100, "column": 7}, "end_point": {"row": 100, "column": 23}}, {"id": 213, "type": "parameter_list", "text": "(bool shouldDrawShadow)", "parent": 211, "children": [214], "start_point": {"row": 100, "column": 23}, "end_point": {"row": 100, "column": 46}}, {"id": 214, "type": "parameter_declaration", "text": "bool shouldDrawShadow", "parent": 213, "children": [215, 216], "start_point": {"row": 100, "column": 24}, "end_point": {"row": 100, "column": 45}}, {"id": 215, "type": "primitive_type", "text": "bool", "parent": 214, "children": [], "start_point": {"row": 100, "column": 24}, "end_point": {"row": 100, "column": 28}}, {"id": 216, "type": "identifier", "text": "shouldDrawShadow", "parent": 214, "children": [], "start_point": {"row": 100, "column": 29}, "end_point": {"row": 100, "column": 45}}, {"id": 217, "type": "declaration", "text": "void updateKeysShadowColor(const vec4_t shadowColor);", "parent": 33, "children": [218, 219], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 55}}, {"id": 218, "type": "primitive_type", "text": "void", "parent": 217, "children": [], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 6}}, {"id": 219, "type": "function_declarator", "text": "updateKeysShadowColor(const vec4_t shadowColor)", "parent": 217, "children": [220, 221], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 54}}, {"id": 220, "type": "identifier", "text": "updateKeysShadowColor", "parent": 219, "children": [], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 28}}, {"id": 221, "type": "parameter_list", "text": "(const vec4_t shadowColor)", "parent": 219, "children": [222], "start_point": {"row": 101, "column": 28}, "end_point": {"row": 101, "column": 54}}, {"id": 222, "type": "parameter_declaration", "text": "const vec4_t shadowColor", "parent": 221, "children": [223, 224], "start_point": {"row": 101, "column": 29}, "end_point": {"row": 101, "column": 53}}, {"id": 223, "type": "type_identifier", "text": "vec4_t", "parent": 222, "children": [], "start_point": {"row": 101, "column": 35}, "end_point": {"row": 101, "column": 41}}, {"id": 224, "type": "identifier", "text": "shadowColor", "parent": 222, "children": [], "start_point": {"row": 101, "column": 42}, "end_point": {"row": 101, "column": 53}}, {"id": 225, "type": "ERROR", "text": "virtual void drawShader(qhandle_t shader, int position) const", "parent": 33, "children": [226, 227, 229], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 63}}, {"id": 226, "type": "type_identifier", "text": "virtual", "parent": 225, "children": [], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 9}}, {"id": 227, "type": "ERROR", "text": "void", "parent": 225, "children": [228], "start_point": {"row": 102, "column": 10}, "end_point": {"row": 102, "column": 14}}, {"id": 228, "type": "identifier", "text": "void", "parent": 227, "children": [], "start_point": {"row": 102, "column": 10}, "end_point": {"row": 102, "column": 14}}, {"id": 229, "type": "function_declarator", "text": "drawShader(qhandle_t shader, int position) const", "parent": 225, "children": [230, 231], "start_point": {"row": 102, "column": 15}, "end_point": {"row": 102, "column": 63}}, {"id": 230, "type": "identifier", "text": "drawShader", "parent": 229, "children": [], "start_point": {"row": 102, "column": 15}, "end_point": {"row": 102, "column": 25}}, {"id": 231, "type": "parameter_list", "text": "(qhandle_t shader, int position)", "parent": 229, "children": [232, 235], "start_point": {"row": 102, "column": 25}, "end_point": {"row": 102, "column": 57}}, {"id": 232, "type": "parameter_declaration", "text": "qhandle_t shader", "parent": 231, "children": [233, 234], "start_point": {"row": 102, "column": 26}, "end_point": {"row": 102, "column": 42}}, {"id": 233, "type": "type_identifier", "text": "qhandle_t", "parent": 232, "children": [], "start_point": {"row": 102, "column": 26}, "end_point": {"row": 102, "column": 35}}, {"id": 234, "type": "identifier", "text": "shader", "parent": 232, "children": [], "start_point": {"row": 102, "column": 36}, "end_point": {"row": 102, "column": 42}}, {"id": 235, "type": "parameter_declaration", "text": "int position", "parent": 231, "children": [236, 237], "start_point": {"row": 102, "column": 44}, "end_point": {"row": 102, "column": 56}}, {"id": 236, "type": "primitive_type", "text": "int", "parent": 235, "children": [], "start_point": {"row": 102, "column": 44}, "end_point": {"row": 102, "column": 47}}, {"id": 237, "type": "identifier", "text": "position", "parent": 235, "children": [], "start_point": {"row": 102, "column": 48}, "end_point": {"row": 102, "column": 56}}, {"id": 238, "type": "ERROR", "text": "virtual void drawPressShader(qhandle_t shader, int position) const", "parent": 33, "children": [239, 240, 242], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 68}}, {"id": 239, "type": "type_identifier", "text": "virtual", "parent": 238, "children": [], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 9}}, {"id": 240, "type": "ERROR", "text": "void", "parent": 238, "children": [241], "start_point": {"row": 103, "column": 10}, "end_point": {"row": 103, "column": 14}}, {"id": 241, "type": "identifier", "text": "void", "parent": 240, "children": [], "start_point": {"row": 103, "column": 10}, "end_point": {"row": 103, "column": 14}}, {"id": 242, "type": "function_declarator", "text": "drawPressShader(qhandle_t shader, int position) const", "parent": 238, "children": [243, 244], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 68}}, {"id": 243, "type": "identifier", "text": "drawPressShader", "parent": 242, "children": [], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 30}}, {"id": 244, "type": "parameter_list", "text": "(qhandle_t shader, int position)", "parent": 242, "children": [245, 248], "start_point": {"row": 103, "column": 30}, "end_point": {"row": 103, "column": 62}}, {"id": 245, "type": "parameter_declaration", "text": "qhandle_t shader", "parent": 244, "children": [246, 247], "start_point": {"row": 103, "column": 31}, "end_point": {"row": 103, "column": 47}}, {"id": 246, "type": "type_identifier", "text": "qhandle_t", "parent": 245, "children": [], "start_point": {"row": 103, "column": 31}, "end_point": {"row": 103, "column": 40}}, {"id": 247, "type": "identifier", "text": "shader", "parent": 245, "children": [], "start_point": {"row": 103, "column": 41}, "end_point": {"row": 103, "column": 47}}, {"id": 248, "type": "parameter_declaration", "text": "int position", "parent": 244, "children": [249, 250], "start_point": {"row": 103, "column": 49}, "end_point": {"row": 103, "column": 61}}, {"id": 249, "type": "primitive_type", "text": "int", "parent": 248, "children": [], "start_point": {"row": 103, "column": 49}, "end_point": {"row": 103, "column": 52}}, {"id": 250, "type": "identifier", "text": "position", "parent": 248, "children": [], "start_point": {"row": 103, "column": 53}, "end_point": {"row": 103, "column": 61}}, {"id": 251, "type": "ERROR", "text": "virtual void drawReleaseShader(qhandle_t shader, int position) const", "parent": 33, "children": [252, 253, 255], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 70}}, {"id": 252, "type": "type_identifier", "text": "virtual", "parent": 251, "children": [], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 9}}, {"id": 253, "type": "ERROR", "text": "void", "parent": 251, "children": [254], "start_point": {"row": 104, "column": 10}, "end_point": {"row": 104, "column": 14}}, {"id": 254, "type": "identifier", "text": "void", "parent": 253, "children": [], "start_point": {"row": 104, "column": 10}, "end_point": {"row": 104, "column": 14}}, {"id": 255, "type": "function_declarator", "text": "drawReleaseShader(qhandle_t shader, int position) const", "parent": 251, "children": [256, 257], "start_point": {"row": 104, "column": 15}, "end_point": {"row": 104, "column": 70}}, {"id": 256, "type": "identifier", "text": "drawReleaseShader", "parent": 255, "children": [], "start_point": {"row": 104, "column": 15}, "end_point": {"row": 104, "column": 32}}, {"id": 257, "type": "parameter_list", "text": "(qhandle_t shader, int position)", "parent": 255, "children": [258, 261], "start_point": {"row": 104, "column": 32}, "end_point": {"row": 104, "column": 64}}, {"id": 258, "type": "parameter_declaration", "text": "qhandle_t shader", "parent": 257, "children": [259, 260], "start_point": {"row": 104, "column": 33}, "end_point": {"row": 104, "column": 49}}, {"id": 259, "type": "type_identifier", "text": "qhandle_t", "parent": 258, "children": [], "start_point": {"row": 104, "column": 33}, "end_point": {"row": 104, "column": 42}}, {"id": 260, "type": "identifier", "text": "shader", "parent": 258, "children": [], "start_point": {"row": 104, "column": 43}, "end_point": {"row": 104, "column": 49}}, {"id": 261, "type": "parameter_declaration", "text": "int position", "parent": 257, "children": [262, 263], "start_point": {"row": 104, "column": 51}, "end_point": {"row": 104, "column": 63}}, {"id": 262, "type": "primitive_type", "text": "int", "parent": 261, "children": [], "start_point": {"row": 104, "column": 51}, "end_point": {"row": 104, "column": 54}}, {"id": 263, "type": "identifier", "text": "position", "parent": 261, "children": [], "start_point": {"row": 104, "column": 55}, "end_point": {"row": 104, "column": 63}}, {"id": 264, "type": "declaration", "text": "static int isKeyPressed(KeyNames key);", "parent": 33, "children": [265, 266], "start_point": {"row": 106, "column": 2}, "end_point": {"row": 106, "column": 40}}, {"id": 265, "type": "primitive_type", "text": "int", "parent": 264, "children": [], "start_point": {"row": 106, "column": 9}, "end_point": {"row": 106, "column": 12}}, {"id": 266, "type": "function_declarator", "text": "isKeyPressed(KeyNames key)", "parent": 264, "children": [267, 268], "start_point": {"row": 106, "column": 13}, "end_point": {"row": 106, "column": 39}}, {"id": 267, "type": "identifier", "text": "isKeyPressed", "parent": 266, "children": [], "start_point": {"row": 106, "column": 13}, "end_point": {"row": 106, "column": 25}}, {"id": 268, "type": "parameter_list", "text": "(KeyNames key)", "parent": 266, "children": [269], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 39}}, {"id": 269, "type": "parameter_declaration", "text": "KeyNames key", "parent": 268, "children": [270, 271], "start_point": {"row": 106, "column": 26}, "end_point": {"row": 106, "column": 38}}, {"id": 270, "type": "type_identifier", "text": "KeyNames", "parent": 269, "children": [], "start_point": {"row": 106, "column": 26}, "end_point": {"row": 106, "column": 34}}, {"id": 271, "type": "identifier", "text": "key", "parent": 269, "children": [], "start_point": {"row": 106, "column": 35}, "end_point": {"row": 106, "column": 38}}, {"id": 272, "type": "binary_expression", "text": "template <int Cols>\n\t\tstatic", "parent": 33, "children": [273, 279], "start_point": {"row": 108, "column": 2}, "end_point": {"row": 109, "column": 8}}, {"id": 273, "type": "binary_expression", "text": "template <int Cols", "parent": 272, "children": [274, 275, 276, 278], "start_point": {"row": 108, "column": 2}, "end_point": {"row": 108, "column": 20}}, {"id": 274, "type": "identifier", "text": "template", "parent": 273, "children": [], "start_point": {"row": 108, "column": 2}, "end_point": {"row": 108, "column": 10}}, {"id": 275, "type": "<", "text": "<", "parent": 273, "children": [], "start_point": {"row": 108, "column": 11}, "end_point": {"row": 108, "column": 12}}, {"id": 276, "type": "ERROR", "text": "int", "parent": 273, "children": [277], "start_point": {"row": 108, "column": 12}, "end_point": {"row": 108, "column": 15}}, {"id": 277, "type": "identifier", "text": "int", "parent": 276, "children": [], "start_point": {"row": 108, "column": 12}, "end_point": {"row": 108, "column": 15}}, {"id": 278, "type": "identifier", "text": "Cols", "parent": 273, "children": [], "start_point": {"row": 108, "column": 16}, "end_point": {"row": 108, "column": 20}}, {"id": 279, "type": ">", "text": ">", "parent": 272, "children": [], "start_point": {"row": 108, "column": 20}, "end_point": {"row": 108, "column": 21}}, {"id": 280, "type": "function_definition", "text": "Point2d calcGridPosition(float cellSize, int cellIndex)\n\t\t{\n\t\t\treturn{\n\t\t\t\tcellSize * (cellIndex % Cols),\n\t\t\t\tcellSize * static_cast<int>(cellIndex / Cols)\n\t\t\t}", "parent": 33, "children": [281, 282], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 114, "column": 4}}, {"id": 281, "type": "type_identifier", "text": "Point2d", "parent": 280, "children": [], "start_point": {"row": 109, "column": 9}, "end_point": {"row": 109, "column": 16}}, {"id": 282, "type": "function_declarator", "text": "calcGridPosition(float cellSize, int cellIndex)", "parent": 280, "children": [283, 284], "start_point": {"row": 109, "column": 17}, "end_point": {"row": 109, "column": 64}}, {"id": 283, "type": "identifier", "text": "calcGridPosition", "parent": 282, "children": [], "start_point": {"row": 109, "column": 17}, "end_point": {"row": 109, "column": 33}}, {"id": 284, "type": "parameter_list", "text": "(float cellSize, int cellIndex)", "parent": 282, "children": [285, 288], "start_point": {"row": 109, "column": 33}, "end_point": {"row": 109, "column": 64}}, {"id": 285, "type": "parameter_declaration", "text": "float cellSize", "parent": 284, "children": [286, 287], "start_point": {"row": 109, "column": 34}, "end_point": {"row": 109, "column": 48}}, {"id": 286, "type": "primitive_type", "text": "float", "parent": 285, "children": [], "start_point": {"row": 109, "column": 34}, "end_point": {"row": 109, "column": 39}}, {"id": 287, "type": "identifier", "text": "cellSize", "parent": 285, "children": [], "start_point": {"row": 109, "column": 40}, "end_point": {"row": 109, "column": 48}}, {"id": 288, "type": "parameter_declaration", "text": "int cellIndex", "parent": 284, "children": [289, 290], "start_point": {"row": 109, "column": 50}, "end_point": {"row": 109, "column": 63}}, {"id": 289, "type": "primitive_type", "text": "int", "parent": 288, "children": [], "start_point": {"row": 109, "column": 50}, "end_point": {"row": 109, "column": 53}}, {"id": 290, "type": "identifier", "text": "cellIndex", "parent": 288, "children": [], "start_point": {"row": 109, "column": 54}, "end_point": {"row": 109, "column": 63}}, {"id": 291, "type": "return_statement", "text": "return{\n\t\t\t\tcellSize * (cellIndex % Cols),\n\t\t\t\tcellSize * static_cast<int>(cellIndex / Cols)", "parent": 280, "children": [292], "start_point": {"row": 111, "column": 3}, "end_point": {"row": 113, "column": 49}}, {"id": 292, "type": "comma_expression", "text": "cellSize * (cellIndex % Cols),\n\t\t\t\tcellSize * static_cast<int>(cellIndex / Cols)", "parent": 291, "children": [293, 301], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 113, "column": 49}}, {"id": 293, "type": "binary_expression", "text": "cellSize * (cellIndex % Cols)", "parent": 292, "children": [294, 295, 296], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 33}}, {"id": 294, "type": "identifier", "text": "cellSize", "parent": 293, "children": [], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 12}}, {"id": 295, "type": "*", "text": "*", "parent": 293, "children": [], "start_point": {"row": 112, "column": 13}, "end_point": {"row": 112, "column": 14}}, {"id": 296, "type": "parenthesized_expression", "text": "(cellIndex % Cols)", "parent": 293, "children": [297], "start_point": {"row": 112, "column": 15}, "end_point": {"row": 112, "column": 33}}, {"id": 297, "type": "binary_expression", "text": "cellIndex % Cols", "parent": 296, "children": [298, 299, 300], "start_point": {"row": 112, "column": 16}, "end_point": {"row": 112, "column": 32}}, {"id": 298, "type": "identifier", "text": "cellIndex", "parent": 297, "children": [], "start_point": {"row": 112, "column": 16}, "end_point": {"row": 112, "column": 25}}, {"id": 299, "type": "%", "text": "%", "parent": 297, "children": [], "start_point": {"row": 112, "column": 26}, "end_point": {"row": 112, "column": 27}}, {"id": 300, "type": "identifier", "text": "Cols", "parent": 297, "children": [], "start_point": {"row": 112, "column": 28}, "end_point": {"row": 112, "column": 32}}, {"id": 301, "type": "binary_expression", "text": "cellSize * static_cast<int>(cellIndex / Cols)", "parent": 292, "children": [302, 309, 310], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 49}}, {"id": 302, "type": "binary_expression", "text": "cellSize * static_cast<int", "parent": 301, "children": [303, 307, 308], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 30}}, {"id": 303, "type": "binary_expression", "text": "cellSize * static_cast", "parent": 302, "children": [304, 305, 306], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 26}}, {"id": 304, "type": "identifier", "text": "cellSize", "parent": 303, "children": [], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 12}}, {"id": 305, "type": "*", "text": "*", "parent": 303, "children": [], "start_point": {"row": 113, "column": 13}, "end_point": {"row": 113, "column": 14}}, {"id": 306, "type": "identifier", "text": "static_cast", "parent": 303, "children": [], "start_point": {"row": 113, "column": 15}, "end_point": {"row": 113, "column": 26}}, {"id": 307, "type": "<", "text": "<", "parent": 302, "children": [], "start_point": {"row": 113, "column": 26}, "end_point": {"row": 113, "column": 27}}, {"id": 308, "type": "identifier", "text": "int", "parent": 302, "children": [], "start_point": {"row": 113, "column": 27}, "end_point": {"row": 113, "column": 30}}, {"id": 309, "type": ">", "text": ">", "parent": 301, "children": [], "start_point": {"row": 113, "column": 30}, "end_point": {"row": 113, "column": 31}}, {"id": 310, "type": "parenthesized_expression", "text": "(cellIndex / Cols)", "parent": 301, "children": [311], "start_point": {"row": 113, "column": 31}, "end_point": {"row": 113, "column": 49}}, {"id": 311, "type": "binary_expression", "text": "cellIndex / Cols", "parent": 310, "children": [312, 313, 314], "start_point": {"row": 113, "column": 32}, "end_point": {"row": 113, "column": 48}}, {"id": 312, "type": "identifier", "text": "cellIndex", "parent": 311, "children": [], "start_point": {"row": 113, "column": 32}, "end_point": {"row": 113, "column": 41}}, {"id": 313, "type": "/", "text": "/", "parent": 311, "children": [], "start_point": {"row": 113, "column": 42}, "end_point": {"row": 113, "column": 43}}, {"id": 314, "type": "identifier", "text": "Cols", "parent": 311, "children": [], "start_point": {"row": 113, "column": 44}, "end_point": {"row": 113, "column": 48}}]}, "node_categories": {"declarations": {"functions": [26, 29, 98, 102, 105, 107, 115, 123, 172, 177, 182, 192, 200, 211, 219, 229, 242, 255, 266, 280, 282], "variables": [76, 79, 82, 110, 119, 126, 130, 134, 137, 144, 147, 150, 153, 156, 159, 162, 170, 175, 180, 185, 190, 195, 198, 203, 206, 209, 214, 217, 222, 232, 235, 245, 248, 258, 261, 264, 269, 285, 288], "classes": [73, 74, 131, 132, 141, 142], "imports": [3, 4, 20, 21, 23, 24], "modules": [], "enums": [35, 36]}, "statements": {"expressions": [38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 90, 91, 96, 272, 273, 292, 293, 296, 297, 301, 302, 303, 310, 311], "assignments": [], "loops": [], "conditionals": [6, 7, 8, 12, 13, 14, 15, 19, 27, 28, 30, 32, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 72, 75, 77, 78, 80, 81, 83, 84, 86, 89, 92, 94, 97, 99, 103, 108, 111, 112, 116, 118, 120, 122, 124, 127, 128, 133, 136, 139, 140, 143, 145, 146, 148, 149, 152, 154, 155, 158, 160, 161, 163, 165, 167, 169, 173, 178, 183, 189, 193, 197, 201, 205, 208, 212, 216, 220, 223, 224, 226, 228, 230, 233, 234, 237, 239, 241, 243, 246, 247, 250, 252, 254, 256, 259, 260, 263, 267, 270, 271, 274, 277, 278, 281, 283, 287, 290, 294, 298, 300, 304, 306, 308, 312, 314], "returns": [291], "exceptions": []}, "expressions": {"calls": [0, 9, 16], "literals": [5, 22, 25], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 26, "universal_type": "function", "name": "KeySetDrawer", "text_snippet": "namespace ETJump\n{\n\tclass KeySetDrawer : public IRenderable\n\t{\n\tpublic:\n\t\tenum class KeyNames\n\t\t{\n\t\t"}, {"node_id": 29, "universal_type": "function", "name": "KeySetDrawer", "text_snippet": "class KeySetDrawer : public IRenderable\n\t{\n\tpublic:\n\t\tenum class KeyNames\n\t\t{\n\t\t\tEmpty,\n\t\t\tForward,\n"}, {"node_id": 98, "universal_type": "function", "name": "unknown", "text_snippet": "virtual ~KeySetDrawer() {}"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "KeySetDrawer()"}, {"node_id": 105, "universal_type": "function", "name": "render", "text_snippet": "void render() const override;\n\t\tvoid beforeRender() override {}"}, {"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "render()"}, {"node_id": 115, "universal_type": "function", "name": "unknown", "text_snippet": "beforeRender() override"}, {"node_id": 123, "universal_type": "function", "name": "unknown", "text_snippet": "keyNameToString(KeyNames keyName)"}, {"node_id": 172, "universal_type": "function", "name": "unknown", "text_snippet": "initListeners()"}, {"node_id": 177, "universal_type": "function", "name": "unknown", "text_snippet": "initAttrs()"}, {"node_id": 182, "universal_type": "function", "name": "unknown", "text_snippet": "updateKeysColor(const char *str)"}, {"node_id": 192, "universal_type": "function", "name": "unknown", "text_snippet": "updateKeysSize(float size)"}, {"node_id": 200, "universal_type": "function", "name": "unknown", "text_snippet": "updateKeysOrigin(float x, float y)"}, {"node_id": 211, "universal_type": "function", "name": "unknown", "text_snippet": "updateKeysShadow(bool shouldDrawShadow)"}, {"node_id": 219, "universal_type": "function", "name": "unknown", "text_snippet": "updateKeysShadowColor(const vec4_t shadowColor)"}, {"node_id": 229, "universal_type": "function", "name": "position)", "text_snippet": "drawShader(qhandle_t shader, int position) const"}, {"node_id": 242, "universal_type": "function", "name": "position)", "text_snippet": "drawPressShader(qhandle_t shader, int position) const"}, {"node_id": 255, "universal_type": "function", "name": "position)", "text_snippet": "drawReleaseShader(qhandle_t shader, int position) const"}, {"node_id": 266, "universal_type": "function", "name": "unknown", "text_snippet": "isKeyPressed(KeyNames key)"}, {"node_id": 280, "universal_type": "function", "name": "cellIndex)", "text_snippet": "Point2d calcGridPosition(float cellSize, int cellIndex)\n\t\t{\n\t\t\treturn{\n\t\t\t\tcellSize * (cellIndex % C"}, {"node_id": 282, "universal_type": "function", "name": "cellIndex)", "text_snippet": "calcGridPosition(float cellSize, int cellIndex)"}], "class_declarations": [{"node_id": 73, "universal_type": "class", "name": "KeyShader", "text_snippet": "struct KeyShader\n\t\t{\n\t\t\tKeyNames key;\n\t\t\tqhandle_t press;\n\t\t\tqhandle_t release;\n\t\t}"}, {"node_id": 74, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 131, "universal_type": "class", "name": "Point2d", "text_snippet": "struct Point2d\n\t\t{\n\t\t\tfloat x;\n\t\t\tfloat y;\n\t\t}"}, {"node_id": 132, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 141, "universal_type": "class", "name": "KeyAttrs", "text_snippet": "struct KeyAttrs\n\t\t{\n\t\t\tvec4_t color;\n\t\t\tvec4_t shadowColor;\n\t\t\tfloat size;\n\t\t\tPoint2d origin;\n\t\t\tboo"}, {"node_id": 142, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include \"cg_local.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 20, "text": "#include \"etj_irenderable.h\"\n"}, {"node_id": 21, "text": "#include"}, {"node_id": 23, "text": "#include <vector>\n"}, {"node_id": 24, "text": "#include"}]}, "original_source_code": "/*\n * MIT License\n * \n * Copyright (c) 2021 ETJump team <<EMAIL>>\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n#pragma once\n#include \"cg_local.h\"\n\n#ifdef min\n#undef min\n#endif\n#ifdef max\n#undef max\n#endif\n\n#include \"etj_irenderable.h\"\n#include <vector>\n\nnamespace ETJump\n{\n\tclass KeySetDrawer : public IRenderable\n\t{\n\tpublic:\n\t\tenum class KeyNames\n\t\t{\n\t\t\tEmpty,\n\t\t\tForward,\n\t\t\tBackward,\n\t\t\tRight,\n\t\t\tLeft,\n\t\t\tJump,\n\t\t\tCrouch,\n\t\t\tSprint,\n\t\t\tProne,\n\t\t\tLeanRight,\n\t\t\tLeanLeft,\n\t\t\tWalk,\n\t\t\tTalk,\n\t\t\tActivate,\n\t\t\tAttack,\n\t\t\tAttack2,\n\t\t\tReload,\n\t\t\tZoom\n\t\t};\n\n\t\tstruct KeyShader\n\t\t{\n\t\t\tKeyNames key;\n\t\t\tqhandle_t press;\n\t\t\tqhandle_t release;\n\t\t};\n\n\t\tKeySetDrawer(const std::vector<KeyShader> &keyShaders);\n\t\tvirtual ~KeySetDrawer() {};\n\t\tvoid render() const override;\n\t\tvoid beforeRender() override {};\n\t\tstatic std::string keyNameToString(KeyNames keyName);\n\tprotected:\n\t\tstruct Point2d\n\t\t{\n\t\t\tfloat x;\n\t\t\tfloat y;\n\t\t};\n\n\t\tstruct KeyAttrs\n\t\t{\n\t\t\tvec4_t color;\n\t\t\tvec4_t shadowColor;\n\t\t\tfloat size;\n\t\t\tPoint2d origin;\n\t\t\tbool shouldDrawShadow;\n\t\t};\n\n\t\tKeyAttrs attrs;\n\t\tconst std::vector<KeyShader> keyShaders;\n\n\t\tvoid initListeners();\n\t\tvoid initAttrs();\n\t\tvoid updateKeysColor(const char *str);\n\t\tvoid updateKeysSize(float size);\n\t\tvoid updateKeysOrigin(float x, float y);\n\t\tvoid updateKeysShadow(bool shouldDrawShadow);\n\t\tvoid updateKeysShadowColor(const vec4_t shadowColor);\n\t\tvirtual void drawShader(qhandle_t shader, int position) const;\n\t\tvirtual void drawPressShader(qhandle_t shader, int position) const;\n\t\tvirtual void drawReleaseShader(qhandle_t shader, int position) const;\n\n\t\tstatic int isKeyPressed(KeyNames key);\n\n\t\ttemplate <int Cols>\n\t\tstatic Point2d calcGridPosition(float cellSize, int cellIndex)\n\t\t{\n\t\t\treturn{\n\t\t\t\tcellSize * (cellIndex % Cols),\n\t\t\t\tcellSize * static_cast<int>(cellIndex / Cols)\n\t\t\t};\n\t\t}\n\t};\n}\n"}
22
c
/* * KikiTools.h * kiki */ #ifndef __KikiTools #define __KikiTools #include <KVector.h> // -------------------------------------------------------------------------------------------------------- KVector kRayPlaneIntersection ( const KVector & rayPos, const KVector & rayDirection, const KVector & planePos, const KVector & planeNormal ); KVector kPointMappedToPlane ( const KVector & point, const KVector & planePos, const KVector & planeNormal ); float kRayPlaneIntersectionFactor ( const KVector & rayPos, const KVector & rayDirection, const KVector & planePos, const KVector & planeNormal ); // -------------------------------------------------------------------------------------------------------- #endif
50.62
16
(translation_unit) "/*\n * KikiTools.h\n * kiki\n */\n\n#ifndef __KikiTools\n#define __KikiTools\n\n#include <KVector.h>\n\n// --------------------------------------------------------------------------------------------------------\n\nKVector kRayPlaneIntersection ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal );\n\nKVector kPointMappedToPlane ( const KVector & point, \n const KVector & planePos, const KVector & planeNormal );\n\nfloat kRayPlaneIntersectionFactor ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal );\n\n// --------------------------------------------------------------------------------------------------------\n#endif\n\n\n" (comment) "/*\n * KikiTools.h\n * kiki\n */" (preproc_ifdef) "#ifndef __KikiTools\n#define __KikiTools\n\n#include <KVector.h>\n\n// --------------------------------------------------------------------------------------------------------\n\nKVector kRayPlaneIntersection ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal );\n\nKVector kPointMappedToPlane ( const KVector & point, \n const KVector & planePos, const KVector & planeNormal );\n\nfloat kRayPlaneIntersectionFactor ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal );\n\n// --------------------------------------------------------------------------------------------------------\n#endif" (#ifndef) "#ifndef" (identifier) "__KikiTools" (preproc_def) "#define __KikiTools\n" (#define) "#define" (identifier) "__KikiTools" (preproc_include) "#include <KVector.h>\n" (#include) "#include" (system_lib_string) "<KVector.h>" (comment) "// --------------------------------------------------------------------------------------------------------" (declaration) "KVector kRayPlaneIntersection ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal );" (type_identifier) "KVector" (function_declarator) "kRayPlaneIntersection ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal )" (identifier) "kRayPlaneIntersection" (parameter_list) "( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal )" (() "(" (parameter_declaration) "const KVector & rayPos" (type_qualifier) "const" (const) "const" (type_identifier) "KVector" (ERROR) "&" (&) "&" (identifier) "rayPos" (,) "," (parameter_declaration) "const KVector & rayDirection" (type_qualifier) "const" (const) "const" (type_identifier) "KVector" (ERROR) "&" (&) "&" (identifier) "rayDirection" (,) "," (parameter_declaration) "const KVector & planePos" (type_qualifier) "const" (const) "const" (type_identifier) "KVector" (ERROR) "&" (&) "&" (identifier) "planePos" (,) "," (parameter_declaration) "const KVector & planeNormal" (type_qualifier) "const" (const) "const" (type_identifier) "KVector" (ERROR) "&" (&) "&" (identifier) "planeNormal" ()) ")" (;) ";" (declaration) "KVector kPointMappedToPlane ( const KVector & point, \n const KVector & planePos, const KVector & planeNormal );" (type_identifier) "KVector" (function_declarator) "kPointMappedToPlane ( const KVector & point, \n const KVector & planePos, const KVector & planeNormal )" (identifier) "kPointMappedToPlane" (parameter_list) "( const KVector & point, \n const KVector & planePos, const KVector & planeNormal )" (() "(" (parameter_declaration) "const KVector & point" (type_qualifier) "const" (const) "const" (type_identifier) "KVector" (ERROR) "&" (&) "&" (identifier) "point" (,) "," (parameter_declaration) "const KVector & planePos" (type_qualifier) "const" (const) "const" (type_identifier) "KVector" (ERROR) "&" (&) "&" (identifier) "planePos" (,) "," (parameter_declaration) "const KVector & planeNormal" (type_qualifier) "const" (const) "const" (type_identifier) "KVector" (ERROR) "&" (&) "&" (identifier) "planeNormal" ()) ")" (;) ";" (declaration) "float kRayPlaneIntersectionFactor ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal );" (primitive_type) "float" (function_declarator) "kRayPlaneIntersectionFactor ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal )" (identifier) "kRayPlaneIntersectionFactor" (parameter_list) "( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal )" (() "(" (parameter_declaration) "const KVector & rayPos" (type_qualifier) "const" (const) "const" (type_identifier) "KVector" (ERROR) "&" (&) "&" (identifier) "rayPos" (,) "," (parameter_declaration) "const KVector & rayDirection" (type_qualifier) "const" (const) "const" (type_identifier) "KVector" (ERROR) "&" (&) "&" (identifier) "rayDirection" (,) "," (parameter_declaration) "const KVector & planePos" (type_qualifier) "const" (const) "const" (type_identifier) "KVector" (ERROR) "&" (&) "&" (identifier) "planePos" (,) "," (parameter_declaration) "const KVector & planeNormal" (type_qualifier) "const" (const) "const" (type_identifier) "KVector" (ERROR) "&" (&) "&" (identifier) "planeNormal" ()) ")" (;) ";" (comment) "// --------------------------------------------------------------------------------------------------------" (#endif) "#endif"
123
11
{"language": "c", "success": true, "metadata": {"lines": 16, "avg_line_length": 50.62, "nodes": 58, "errors": 0, "source_hash": "582c4c36bf5f21ecfac8cb69a7e05ef797954f601e5f7975284cc88a4d7a8b1b", "categorized_nodes": 52}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __KikiTools\n#define __KikiTools\n\n#include <KVector.h>\n\n// --------------------------------------------------------------------------------------------------------\n\nKVector kRayPlaneIntersection ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal );\n\nKVector kPointMappedToPlane ( const KVector & point, \n const KVector & planePos, const KVector & planeNormal );\n\nfloat kRayPlaneIntersectionFactor ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal );\n\n// --------------------------------------------------------------------------------------------------------\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 26, 40, 57], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 22, "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": "__KikiTools", "parent": 0, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 19}}, {"id": 3, "type": "preproc_def", "text": "#define __KikiTools\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": "__KikiTools", "parent": 3, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <KVector.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<KVector.h>", "parent": 6, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 20}}, {"id": 9, "type": "declaration", "text": "KVector kRayPlaneIntersection ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal );", "parent": 0, "children": [10, 11], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 88}}, {"id": 10, "type": "type_identifier", "text": "KVector", "parent": 9, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 11, "type": "function_declarator", "text": "kRayPlaneIntersection ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal )", "parent": 9, "children": [12, 13], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 13, "column": 87}}, {"id": 12, "type": "identifier", "text": "kRayPlaneIntersection", "parent": 11, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 29}}, {"id": 13, "type": "parameter_list", "text": "( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal )", "parent": 11, "children": [14, 17, 20, 23], "start_point": {"row": 12, "column": 30}, "end_point": {"row": 13, "column": 87}}, {"id": 14, "type": "parameter_declaration", "text": "const KVector & rayPos", "parent": 13, "children": [15, 16], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 54}}, {"id": 15, "type": "type_identifier", "text": "KVector", "parent": 14, "children": [], "start_point": {"row": 12, "column": 38}, "end_point": {"row": 12, "column": 45}}, {"id": 16, "type": "identifier", "text": "rayPos", "parent": 14, "children": [], "start_point": {"row": 12, "column": 48}, "end_point": {"row": 12, "column": 54}}, {"id": 17, "type": "parameter_declaration", "text": "const KVector & rayDirection", "parent": 13, "children": [18, 19], "start_point": {"row": 12, "column": 56}, "end_point": {"row": 12, "column": 84}}, {"id": 18, "type": "type_identifier", "text": "KVector", "parent": 17, "children": [], "start_point": {"row": 12, "column": 62}, "end_point": {"row": 12, "column": 69}}, {"id": 19, "type": "identifier", "text": "rayDirection", "parent": 17, "children": [], "start_point": {"row": 12, "column": 72}, "end_point": {"row": 12, "column": 84}}, {"id": 20, "type": "parameter_declaration", "text": "const KVector & planePos", "parent": 13, "children": [21, 22], "start_point": {"row": 13, "column": 32}, "end_point": {"row": 13, "column": 56}}, {"id": 21, "type": "type_identifier", "text": "KVector", "parent": 20, "children": [], "start_point": {"row": 13, "column": 38}, "end_point": {"row": 13, "column": 45}}, {"id": 22, "type": "identifier", "text": "planePos", "parent": 20, "children": [], "start_point": {"row": 13, "column": 48}, "end_point": {"row": 13, "column": 56}}, {"id": 23, "type": "parameter_declaration", "text": "const KVector & planeNormal", "parent": 13, "children": [24, 25], "start_point": {"row": 13, "column": 58}, "end_point": {"row": 13, "column": 85}}, {"id": 24, "type": "type_identifier", "text": "KVector", "parent": 23, "children": [], "start_point": {"row": 13, "column": 64}, "end_point": {"row": 13, "column": 71}}, {"id": 25, "type": "identifier", "text": "planeNormal", "parent": 23, "children": [], "start_point": {"row": 13, "column": 74}, "end_point": {"row": 13, "column": 85}}, {"id": 26, "type": "declaration", "text": "KVector kPointMappedToPlane ( const KVector & point, \n const KVector & planePos, const KVector & planeNormal );", "parent": 0, "children": [27, 28], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 88}}, {"id": 27, "type": "type_identifier", "text": "KVector", "parent": 26, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 28, "type": "function_declarator", "text": "kPointMappedToPlane ( const KVector & point, \n const KVector & planePos, const KVector & planeNormal )", "parent": 26, "children": [29, 30], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 16, "column": 87}}, {"id": 29, "type": "identifier", "text": "kPointMappedToPlane", "parent": 28, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 27}}, {"id": 30, "type": "parameter_list", "text": "( const KVector & point, \n const KVector & planePos, const KVector & planeNormal )", "parent": 28, "children": [31, 34, 37], "start_point": {"row": 15, "column": 30}, "end_point": {"row": 16, "column": 87}}, {"id": 31, "type": "parameter_declaration", "text": "const KVector & point", "parent": 30, "children": [32, 33], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 53}}, {"id": 32, "type": "type_identifier", "text": "KVector", "parent": 31, "children": [], "start_point": {"row": 15, "column": 38}, "end_point": {"row": 15, "column": 45}}, {"id": 33, "type": "identifier", "text": "point", "parent": 31, "children": [], "start_point": {"row": 15, "column": 48}, "end_point": {"row": 15, "column": 53}}, {"id": 34, "type": "parameter_declaration", "text": "const KVector & planePos", "parent": 30, "children": [35, 36], "start_point": {"row": 16, "column": 32}, "end_point": {"row": 16, "column": 56}}, {"id": 35, "type": "type_identifier", "text": "KVector", "parent": 34, "children": [], "start_point": {"row": 16, "column": 38}, "end_point": {"row": 16, "column": 45}}, {"id": 36, "type": "identifier", "text": "planePos", "parent": 34, "children": [], "start_point": {"row": 16, "column": 48}, "end_point": {"row": 16, "column": 56}}, {"id": 37, "type": "parameter_declaration", "text": "const KVector & planeNormal", "parent": 30, "children": [38, 39], "start_point": {"row": 16, "column": 58}, "end_point": {"row": 16, "column": 85}}, {"id": 38, "type": "type_identifier", "text": "KVector", "parent": 37, "children": [], "start_point": {"row": 16, "column": 64}, "end_point": {"row": 16, "column": 71}}, {"id": 39, "type": "identifier", "text": "planeNormal", "parent": 37, "children": [], "start_point": {"row": 16, "column": 74}, "end_point": {"row": 16, "column": 85}}, {"id": 40, "type": "declaration", "text": "float kRayPlaneIntersectionFactor ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal );", "parent": 0, "children": [41, 42], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 94}}, {"id": 41, "type": "primitive_type", "text": "float", "parent": 40, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 5}}, {"id": 42, "type": "function_declarator", "text": "kRayPlaneIntersectionFactor ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal )", "parent": 40, "children": [43, 44], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 19, "column": 93}}, {"id": 43, "type": "identifier", "text": "kRayPlaneIntersectionFactor", "parent": 42, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 35}}, {"id": 44, "type": "parameter_list", "text": "( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal )", "parent": 42, "children": [45, 48, 51, 54], "start_point": {"row": 18, "column": 36}, "end_point": {"row": 19, "column": 93}}, {"id": 45, "type": "parameter_declaration", "text": "const KVector & rayPos", "parent": 44, "children": [46, 47], "start_point": {"row": 18, "column": 38}, "end_point": {"row": 18, "column": 60}}, {"id": 46, "type": "type_identifier", "text": "KVector", "parent": 45, "children": [], "start_point": {"row": 18, "column": 44}, "end_point": {"row": 18, "column": 51}}, {"id": 47, "type": "identifier", "text": "rayPos", "parent": 45, "children": [], "start_point": {"row": 18, "column": 54}, "end_point": {"row": 18, "column": 60}}, {"id": 48, "type": "parameter_declaration", "text": "const KVector & rayDirection", "parent": 44, "children": [49, 50], "start_point": {"row": 18, "column": 62}, "end_point": {"row": 18, "column": 90}}, {"id": 49, "type": "type_identifier", "text": "KVector", "parent": 48, "children": [], "start_point": {"row": 18, "column": 68}, "end_point": {"row": 18, "column": 75}}, {"id": 50, "type": "identifier", "text": "rayDirection", "parent": 48, "children": [], "start_point": {"row": 18, "column": 78}, "end_point": {"row": 18, "column": 90}}, {"id": 51, "type": "parameter_declaration", "text": "const KVector & planePos", "parent": 44, "children": [52, 53], "start_point": {"row": 19, "column": 38}, "end_point": {"row": 19, "column": 62}}, {"id": 52, "type": "type_identifier", "text": "KVector", "parent": 51, "children": [], "start_point": {"row": 19, "column": 44}, "end_point": {"row": 19, "column": 51}}, {"id": 53, "type": "identifier", "text": "planePos", "parent": 51, "children": [], "start_point": {"row": 19, "column": 54}, "end_point": {"row": 19, "column": 62}}, {"id": 54, "type": "parameter_declaration", "text": "const KVector & planeNormal", "parent": 44, "children": [55, 56], "start_point": {"row": 19, "column": 64}, "end_point": {"row": 19, "column": 91}}, {"id": 55, "type": "type_identifier", "text": "KVector", "parent": 54, "children": [], "start_point": {"row": 19, "column": 70}, "end_point": {"row": 19, "column": 77}}, {"id": 56, "type": "identifier", "text": "planeNormal", "parent": 54, "children": [], "start_point": {"row": 19, "column": 80}, "end_point": {"row": 19, "column": 91}}, {"id": 57, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 6}}]}, "node_categories": {"declarations": {"functions": [11, 28, 42], "variables": [9, 14, 17, 20, 23, 26, 31, 34, 37, 40, 45, 48, 51, 54], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 12, 15, 16, 18, 19, 21, 22, 24, 25, 27, 29, 32, 33, 35, 36, 38, 39, 43, 46, 47, 49, 50, 52, 53, 55, 56, 57], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 11, "universal_type": "function", "name": "unknown", "text_snippet": "kRayPlaneIntersection ( const KVector & rayPos, const KVector & rayDirection, \n "}, {"node_id": 28, "universal_type": "function", "name": "unknown", "text_snippet": "kPointMappedToPlane ( const KVector & point, \n const KVector & pla"}, {"node_id": 42, "universal_type": "function", "name": "unknown", "text_snippet": "kRayPlaneIntersectionFactor ( const KVector & rayPos, const KVector & rayDirection, \n "}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <KVector.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/*\n * KikiTools.h\n * kiki\n */\n\n#ifndef __KikiTools\n#define __KikiTools\n\n#include <KVector.h>\n\n// --------------------------------------------------------------------------------------------------------\n\nKVector kRayPlaneIntersection ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal );\n\nKVector kPointMappedToPlane ( const KVector & point, \n const KVector & planePos, const KVector & planeNormal );\n\nfloat kRayPlaneIntersectionFactor ( const KVector & rayPos, const KVector & rayDirection, \n const KVector & planePos, const KVector & planeNormal );\n\n// --------------------------------------------------------------------------------------------------------\n#endif\n\n\n"}
23
c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* vectors.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: odale-dr <<EMAIL>> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/06/04 20:23:19 by jblack-b #+# #+# */ /* Updated: 2019/09/25 19:29:34 by odale-dr ### ########.fr */ /* */ /* ************************************************************************** */ #include "rtv1.h" t_vec3 ft_vec3_neg(t_vec3 v) { return (ft_vec3_scalar_multiply(v, -1)); } double ft_vec3_angle(t_vec3 a, t_vec3 b) { t_vec3 v1; t_vec3 v2; v1 = ft_vec3_normalize(a); v2 = ft_vec3_normalize(b); return (acos(ft_vec3_dot_multiply(v1, v2))); } double ft_vec3_length(t_vec3 v1) { return (sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z)); } t_vec3 ft_vec3_sum_poin3(t_vec3 a, t_point3 b) { t_vec3 new; new.x = (a.x + b.x); new.y = (a.y + b.y); new.z = (a.z + b.z); return (new); } t_vec3 ft_vec3_multiply_matrix(t_vec3 v, t_mat4 m) { t_vec3 res; res.x = v.x * m.matrix[0][0] + v.y * m.matrix[0][1] + v.z * m.matrix[0][2] + v.w * m.matrix[0][3]; res.y = v.x * m.matrix[1][0] + v.y * m.matrix[1][1] + v.z * m.matrix[1][2] + v.w * m.matrix[1][3]; res.z = v.x * m.matrix[2][0] + v.y * m.matrix[2][1] + v.z * m.matrix[2][2] + v.w * m.matrix[2][3]; res.w = v.x * m.matrix[3][0] + v.y * m.matrix[3][1] + v.z * m.matrix[3][2] + v.w * m.matrix[3][3]; return (res); }
32.54
57
(translation_unit) "/* ************************************************************************** */\n/* */\n/* ::: :::::::: */\n/* vectors.c :+: :+: :+: */\n/* +:+ +:+ +:+ */\n/* By: odale-dr <<EMAIL>> +#+ +:+ +#+ */\n/* +#+#+#+#+#+ +#+ */\n/* Created: 2019/06/04 20:23:19 by jblack-b #+# #+# */\n/* Updated: 2019/09/25 19:29:34 by odale-dr ### ########.fr */\n/* */\n/* ************************************************************************** */\n\n#include "rtv1.h"\n\nt_vec3 ft_vec3_neg(t_vec3 v)\n{\n return (ft_vec3_scalar_multiply(v, -1));\n}\n\ndouble ft_vec3_angle(t_vec3 a, t_vec3 b)\n{\n t_vec3 v1;\n t_vec3 v2;\n\n v1 = ft_vec3_normalize(a);\n v2 = ft_vec3_normalize(b);\n return (acos(ft_vec3_dot_multiply(v1, v2)));\n}\n\ndouble ft_vec3_length(t_vec3 v1)\n{\n return (sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z));\n}\n\nt_vec3 ft_vec3_sum_poin3(t_vec3 a, t_point3 b)\n{\n t_vec3 new;\n\n new.x = (a.x + b.x);\n new.y = (a.y + b.y);\n new.z = (a.z + b.z);\n return (new);\n}\n\nt_vec3 ft_vec3_multiply_matrix(t_vec3 v, t_mat4 m)\n{\n t_vec3 res;\n\n res.x = v.x * m.matrix[0][0] +\n v.y * m.matrix[0][1] +\n v.z * m.matrix[0][2] +\n v.w * m.matrix[0][3];\n res.y = v.x * m.matrix[1][0] +\n v.y * m.matrix[1][1] +\n v.z * m.matrix[1][2] +\n v.w * m.matrix[1][3];\n res.z = v.x * m.matrix[2][0] +\n v.y * m.matrix[2][1] +\n v.z * m.matrix[2][2] +\n v.w * m.matrix[2][3];\n res.w = v.x * m.matrix[3][0] +\n v.y * m.matrix[3][1] +\n v.z * m.matrix[3][2] +\n v.w * m.matrix[3][3];\n return (res);\n}\n" (comment) "/* ************************************************************************** */" (comment) "/* */" (comment) "/* ::: :::::::: */" (comment) "/* vectors.c :+: :+: :+: */" (comment) "/* +:+ +:+ +:+ */" (comment) "/* By: odale-dr <<EMAIL>> +#+ +:+ +#+ */" (comment) "/* +#+#+#+#+#+ +#+ */" (comment) "/* Created: 2019/06/04 20:23:19 by jblack-b #+# #+# */" (comment) "/* Updated: 2019/09/25 19:29:34 by odale-dr ### ########.fr */" (comment) "/* */" (comment) "/* ************************************************************************** */" (preproc_include) "#include "rtv1.h"\n" (#include) "#include" (string_literal) ""rtv1.h"" (") """ (string_content) "rtv1.h" (") """ (function_definition) "t_vec3 ft_vec3_neg(t_vec3 v)\n{\n return (ft_vec3_scalar_multiply(v, -1));\n}" (type_identifier) "t_vec3" (function_declarator) "ft_vec3_neg(t_vec3 v)" (identifier) "ft_vec3_neg" (parameter_list) "(t_vec3 v)" (() "(" (parameter_declaration) "t_vec3 v" (type_identifier) "t_vec3" (identifier) "v" ()) ")" (compound_statement) "{\n return (ft_vec3_scalar_multiply(v, -1));\n}" ({) "{" (return_statement) "return (ft_vec3_scalar_multiply(v, -1));" (return) "return" (parenthesized_expression) "(ft_vec3_scalar_multiply(v, -1))" (() "(" (call_expression) "ft_vec3_scalar_multiply(v, -1)" (identifier) "ft_vec3_scalar_multiply" (argument_list) "(v, -1)" (() "(" (identifier) "v" (,) "," (number_literal) "-1" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "double ft_vec3_angle(t_vec3 a, t_vec3 b)\n{\n t_vec3 v1;\n t_vec3 v2;\n\n v1 = ft_vec3_normalize(a);\n v2 = ft_vec3_normalize(b);\n return (acos(ft_vec3_dot_multiply(v1, v2)));\n}" (primitive_type) "double" (function_declarator) "ft_vec3_angle(t_vec3 a, t_vec3 b)" (identifier) "ft_vec3_angle" (parameter_list) "(t_vec3 a, t_vec3 b)" (() "(" (parameter_declaration) "t_vec3 a" (type_identifier) "t_vec3" (identifier) "a" (,) "," (parameter_declaration) "t_vec3 b" (type_identifier) "t_vec3" (identifier) "b" ()) ")" (compound_statement) "{\n t_vec3 v1;\n t_vec3 v2;\n\n v1 = ft_vec3_normalize(a);\n v2 = ft_vec3_normalize(b);\n return (acos(ft_vec3_dot_multiply(v1, v2)));\n}" ({) "{" (declaration) "t_vec3 v1;" (type_identifier) "t_vec3" (identifier) "v1" (;) ";" (declaration) "t_vec3 v2;" (type_identifier) "t_vec3" (identifier) "v2" (;) ";" (expression_statement) "v1 = ft_vec3_normalize(a);" (assignment_expression) "v1 = ft_vec3_normalize(a)" (identifier) "v1" (=) "=" (call_expression) "ft_vec3_normalize(a)" (identifier) "ft_vec3_normalize" (argument_list) "(a)" (() "(" (identifier) "a" ()) ")" (;) ";" (expression_statement) "v2 = ft_vec3_normalize(b);" (assignment_expression) "v2 = ft_vec3_normalize(b)" (identifier) "v2" (=) "=" (call_expression) "ft_vec3_normalize(b)" (identifier) "ft_vec3_normalize" (argument_list) "(b)" (() "(" (identifier) "b" ()) ")" (;) ";" (return_statement) "return (acos(ft_vec3_dot_multiply(v1, v2)));" (return) "return" (parenthesized_expression) "(acos(ft_vec3_dot_multiply(v1, v2)))" (() "(" (call_expression) "acos(ft_vec3_dot_multiply(v1, v2))" (identifier) "acos" (argument_list) "(ft_vec3_dot_multiply(v1, v2))" (() "(" (call_expression) "ft_vec3_dot_multiply(v1, v2)" (identifier) "ft_vec3_dot_multiply" (argument_list) "(v1, v2)" (() "(" (identifier) "v1" (,) "," (identifier) "v2" ()) ")" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "double ft_vec3_length(t_vec3 v1)\n{\n return (sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z));\n}" (primitive_type) "double" (function_declarator) "ft_vec3_length(t_vec3 v1)" (identifier) "ft_vec3_length" (parameter_list) "(t_vec3 v1)" (() "(" (parameter_declaration) "t_vec3 v1" (type_identifier) "t_vec3" (identifier) "v1" ()) ")" (compound_statement) "{\n return (sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z));\n}" ({) "{" (return_statement) "return (sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z));" (return) "return" (parenthesized_expression) "(sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z))" (() "(" (call_expression) "sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z)" (identifier) "sqrt" (argument_list) "(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z)" (() "(" (binary_expression) "v1.x * v1.x + v1.y * v1.y + v1.z * v1.z" (binary_expression) "v1.x * v1.x + v1.y * v1.y" (binary_expression) "v1.x * v1.x" (field_expression) "v1.x" (identifier) "v1" (.) "." (field_identifier) "x" (*) "*" (field_expression) "v1.x" (identifier) "v1" (.) "." (field_identifier) "x" (+) "+" (binary_expression) "v1.y * v1.y" (field_expression) "v1.y" (identifier) "v1" (.) "." (field_identifier) "y" (*) "*" (field_expression) "v1.y" (identifier) "v1" (.) "." (field_identifier) "y" (+) "+" (binary_expression) "v1.z * v1.z" (field_expression) "v1.z" (identifier) "v1" (.) "." (field_identifier) "z" (*) "*" (field_expression) "v1.z" (identifier) "v1" (.) "." (field_identifier) "z" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "t_vec3 ft_vec3_sum_poin3(t_vec3 a, t_point3 b)\n{\n t_vec3 new;\n\n new.x = (a.x + b.x);\n new.y = (a.y + b.y);\n new.z = (a.z + b.z);\n return (new);\n}" (type_identifier) "t_vec3" (function_declarator) "ft_vec3_sum_poin3(t_vec3 a, t_point3 b)" (identifier) "ft_vec3_sum_poin3" (parameter_list) "(t_vec3 a, t_point3 b)" (() "(" (parameter_declaration) "t_vec3 a" (type_identifier) "t_vec3" (identifier) "a" (,) "," (parameter_declaration) "t_point3 b" (type_identifier) "t_point3" (identifier) "b" ()) ")" (compound_statement) "{\n t_vec3 new;\n\n new.x = (a.x + b.x);\n new.y = (a.y + b.y);\n new.z = (a.z + b.z);\n return (new);\n}" ({) "{" (declaration) "t_vec3 new;" (type_identifier) "t_vec3" (identifier) "new" (;) ";" (expression_statement) "new.x = (a.x + b.x);" (assignment_expression) "new.x = (a.x + b.x)" (field_expression) "new.x" (identifier) "new" (.) "." (field_identifier) "x" (=) "=" (parenthesized_expression) "(a.x + b.x)" (() "(" (binary_expression) "a.x + b.x" (field_expression) "a.x" (identifier) "a" (.) "." (field_identifier) "x" (+) "+" (field_expression) "b.x" (identifier) "b" (.) "." (field_identifier) "x" ()) ")" (;) ";" (expression_statement) "new.y = (a.y + b.y);" (assignment_expression) "new.y = (a.y + b.y)" (field_expression) "new.y" (identifier) "new" (.) "." (field_identifier) "y" (=) "=" (parenthesized_expression) "(a.y + b.y)" (() "(" (binary_expression) "a.y + b.y" (field_expression) "a.y" (identifier) "a" (.) "." (field_identifier) "y" (+) "+" (field_expression) "b.y" (identifier) "b" (.) "." (field_identifier) "y" ()) ")" (;) ";" (expression_statement) "new.z = (a.z + b.z);" (assignment_expression) "new.z = (a.z + b.z)" (field_expression) "new.z" (identifier) "new" (.) "." (field_identifier) "z" (=) "=" (parenthesized_expression) "(a.z + b.z)" (() "(" (binary_expression) "a.z + b.z" (field_expression) "a.z" (identifier) "a" (.) "." (field_identifier) "z" (+) "+" (field_expression) "b.z" (identifier) "b" (.) "." (field_identifier) "z" ()) ")" (;) ";" (return_statement) "return (new);" (return) "return" (parenthesized_expression) "(new)" (() "(" (identifier) "new" ()) ")" (;) ";" (}) "}" (function_definition) "t_vec3 ft_vec3_multiply_matrix(t_vec3 v, t_mat4 m)\n{\n t_vec3 res;\n\n res.x = v.x * m.matrix[0][0] +\n v.y * m.matrix[0][1] +\n v.z * m.matrix[0][2] +\n v.w * m.matrix[0][3];\n res.y = v.x * m.matrix[1][0] +\n v.y * m.matrix[1][1] +\n v.z * m.matrix[1][2] +\n v.w * m.matrix[1][3];\n res.z = v.x * m.matrix[2][0] +\n v.y * m.matrix[2][1] +\n v.z * m.matrix[2][2] +\n v.w * m.matrix[2][3];\n res.w = v.x * m.matrix[3][0] +\n v.y * m.matrix[3][1] +\n v.z * m.matrix[3][2] +\n v.w * m.matrix[3][3];\n return (res);\n}" (type_identifier) "t_vec3" (function_declarator) "ft_vec3_multiply_matrix(t_vec3 v, t_mat4 m)" (identifier) "ft_vec3_multiply_matrix" (parameter_list) "(t_vec3 v, t_mat4 m)" (() "(" (parameter_declaration) "t_vec3 v" (type_identifier) "t_vec3" (identifier) "v" (,) "," (parameter_declaration) "t_mat4 m" (type_identifier) "t_mat4" (identifier) "m" ()) ")" (compound_statement) "{\n t_vec3 res;\n\n res.x = v.x * m.matrix[0][0] +\n v.y * m.matrix[0][1] +\n v.z * m.matrix[0][2] +\n v.w * m.matrix[0][3];\n res.y = v.x * m.matrix[1][0] +\n v.y * m.matrix[1][1] +\n v.z * m.matrix[1][2] +\n v.w * m.matrix[1][3];\n res.z = v.x * m.matrix[2][0] +\n v.y * m.matrix[2][1] +\n v.z * m.matrix[2][2] +\n v.w * m.matrix[2][3];\n res.w = v.x * m.matrix[3][0] +\n v.y * m.matrix[3][1] +\n v.z * m.matrix[3][2] +\n v.w * m.matrix[3][3];\n return (res);\n}" ({) "{" (declaration) "t_vec3 res;" (type_identifier) "t_vec3" (identifier) "res" (;) ";" (expression_statement) "res.x = v.x * m.matrix[0][0] +\n v.y * m.matrix[0][1] +\n v.z * m.matrix[0][2] +\n v.w * m.matrix[0][3];" (assignment_expression) "res.x = v.x * m.matrix[0][0] +\n v.y * m.matrix[0][1] +\n v.z * m.matrix[0][2] +\n v.w * m.matrix[0][3]" (field_expression) "res.x" (identifier) "res" (.) "." (field_identifier) "x" (=) "=" (binary_expression) "v.x * m.matrix[0][0] +\n v.y * m.matrix[0][1] +\n v.z * m.matrix[0][2] +\n v.w * m.matrix[0][3]" (binary_expression) "v.x * m.matrix[0][0] +\n v.y * m.matrix[0][1] +\n v.z * m.matrix[0][2]" (binary_expression) "v.x * m.matrix[0][0] +\n v.y * m.matrix[0][1]" (binary_expression) "v.x * m.matrix[0][0]" (field_expression) "v.x" (identifier) "v" (.) "." (field_identifier) "x" (*) "*" (subscript_expression) "m.matrix[0][0]" (subscript_expression) "m.matrix[0]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "0" (]) "]" (+) "+" (binary_expression) "v.y * m.matrix[0][1]" (field_expression) "v.y" (identifier) "v" (.) "." (field_identifier) "y" (*) "*" (subscript_expression) "m.matrix[0][1]" (subscript_expression) "m.matrix[0]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "1" (]) "]" (+) "+" (binary_expression) "v.z * m.matrix[0][2]" (field_expression) "v.z" (identifier) "v" (.) "." (field_identifier) "z" (*) "*" (subscript_expression) "m.matrix[0][2]" (subscript_expression) "m.matrix[0]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "2" (]) "]" (+) "+" (binary_expression) "v.w * m.matrix[0][3]" (field_expression) "v.w" (identifier) "v" (.) "." (field_identifier) "w" (*) "*" (subscript_expression) "m.matrix[0][3]" (subscript_expression) "m.matrix[0]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "0" (]) "]" ([) "[" (number_literal) "3" (]) "]" (;) ";" (expression_statement) "res.y = v.x * m.matrix[1][0] +\n v.y * m.matrix[1][1] +\n v.z * m.matrix[1][2] +\n v.w * m.matrix[1][3];" (assignment_expression) "res.y = v.x * m.matrix[1][0] +\n v.y * m.matrix[1][1] +\n v.z * m.matrix[1][2] +\n v.w * m.matrix[1][3]" (field_expression) "res.y" (identifier) "res" (.) "." (field_identifier) "y" (=) "=" (binary_expression) "v.x * m.matrix[1][0] +\n v.y * m.matrix[1][1] +\n v.z * m.matrix[1][2] +\n v.w * m.matrix[1][3]" (binary_expression) "v.x * m.matrix[1][0] +\n v.y * m.matrix[1][1] +\n v.z * m.matrix[1][2]" (binary_expression) "v.x * m.matrix[1][0] +\n v.y * m.matrix[1][1]" (binary_expression) "v.x * m.matrix[1][0]" (field_expression) "v.x" (identifier) "v" (.) "." (field_identifier) "x" (*) "*" (subscript_expression) "m.matrix[1][0]" (subscript_expression) "m.matrix[1]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "1" (]) "]" ([) "[" (number_literal) "0" (]) "]" (+) "+" (binary_expression) "v.y * m.matrix[1][1]" (field_expression) "v.y" (identifier) "v" (.) "." (field_identifier) "y" (*) "*" (subscript_expression) "m.matrix[1][1]" (subscript_expression) "m.matrix[1]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "1" (]) "]" ([) "[" (number_literal) "1" (]) "]" (+) "+" (binary_expression) "v.z * m.matrix[1][2]" (field_expression) "v.z" (identifier) "v" (.) "." (field_identifier) "z" (*) "*" (subscript_expression) "m.matrix[1][2]" (subscript_expression) "m.matrix[1]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "1" (]) "]" ([) "[" (number_literal) "2" (]) "]" (+) "+" (binary_expression) "v.w * m.matrix[1][3]" (field_expression) "v.w" (identifier) "v" (.) "." (field_identifier) "w" (*) "*" (subscript_expression) "m.matrix[1][3]" (subscript_expression) "m.matrix[1]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "1" (]) "]" ([) "[" (number_literal) "3" (]) "]" (;) ";" (expression_statement) "res.z = v.x * m.matrix[2][0] +\n v.y * m.matrix[2][1] +\n v.z * m.matrix[2][2] +\n v.w * m.matrix[2][3];" (assignment_expression) "res.z = v.x * m.matrix[2][0] +\n v.y * m.matrix[2][1] +\n v.z * m.matrix[2][2] +\n v.w * m.matrix[2][3]" (field_expression) "res.z" (identifier) "res" (.) "." (field_identifier) "z" (=) "=" (binary_expression) "v.x * m.matrix[2][0] +\n v.y * m.matrix[2][1] +\n v.z * m.matrix[2][2] +\n v.w * m.matrix[2][3]" (binary_expression) "v.x * m.matrix[2][0] +\n v.y * m.matrix[2][1] +\n v.z * m.matrix[2][2]" (binary_expression) "v.x * m.matrix[2][0] +\n v.y * m.matrix[2][1]" (binary_expression) "v.x * m.matrix[2][0]" (field_expression) "v.x" (identifier) "v" (.) "." (field_identifier) "x" (*) "*" (subscript_expression) "m.matrix[2][0]" (subscript_expression) "m.matrix[2]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "2" (]) "]" ([) "[" (number_literal) "0" (]) "]" (+) "+" (binary_expression) "v.y * m.matrix[2][1]" (field_expression) "v.y" (identifier) "v" (.) "." (field_identifier) "y" (*) "*" (subscript_expression) "m.matrix[2][1]" (subscript_expression) "m.matrix[2]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "2" (]) "]" ([) "[" (number_literal) "1" (]) "]" (+) "+" (binary_expression) "v.z * m.matrix[2][2]" (field_expression) "v.z" (identifier) "v" (.) "." (field_identifier) "z" (*) "*" (subscript_expression) "m.matrix[2][2]" (subscript_expression) "m.matrix[2]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "2" (]) "]" ([) "[" (number_literal) "2" (]) "]" (+) "+" (binary_expression) "v.w * m.matrix[2][3]" (field_expression) "v.w" (identifier) "v" (.) "." (field_identifier) "w" (*) "*" (subscript_expression) "m.matrix[2][3]" (subscript_expression) "m.matrix[2]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "2" (]) "]" ([) "[" (number_literal) "3" (]) "]" (;) ";" (expression_statement) "res.w = v.x * m.matrix[3][0] +\n v.y * m.matrix[3][1] +\n v.z * m.matrix[3][2] +\n v.w * m.matrix[3][3];" (assignment_expression) "res.w = v.x * m.matrix[3][0] +\n v.y * m.matrix[3][1] +\n v.z * m.matrix[3][2] +\n v.w * m.matrix[3][3]" (field_expression) "res.w" (identifier) "res" (.) "." (field_identifier) "w" (=) "=" (binary_expression) "v.x * m.matrix[3][0] +\n v.y * m.matrix[3][1] +\n v.z * m.matrix[3][2] +\n v.w * m.matrix[3][3]" (binary_expression) "v.x * m.matrix[3][0] +\n v.y * m.matrix[3][1] +\n v.z * m.matrix[3][2]" (binary_expression) "v.x * m.matrix[3][0] +\n v.y * m.matrix[3][1]" (binary_expression) "v.x * m.matrix[3][0]" (field_expression) "v.x" (identifier) "v" (.) "." (field_identifier) "x" (*) "*" (subscript_expression) "m.matrix[3][0]" (subscript_expression) "m.matrix[3]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "3" (]) "]" ([) "[" (number_literal) "0" (]) "]" (+) "+" (binary_expression) "v.y * m.matrix[3][1]" (field_expression) "v.y" (identifier) "v" (.) "." (field_identifier) "y" (*) "*" (subscript_expression) "m.matrix[3][1]" (subscript_expression) "m.matrix[3]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "3" (]) "]" ([) "[" (number_literal) "1" (]) "]" (+) "+" (binary_expression) "v.z * m.matrix[3][2]" (field_expression) "v.z" (identifier) "v" (.) "." (field_identifier) "z" (*) "*" (subscript_expression) "m.matrix[3][2]" (subscript_expression) "m.matrix[3]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "3" (]) "]" ([) "[" (number_literal) "2" (]) "]" (+) "+" (binary_expression) "v.w * m.matrix[3][3]" (field_expression) "v.w" (identifier) "v" (.) "." (field_identifier) "w" (*) "*" (subscript_expression) "m.matrix[3][3]" (subscript_expression) "m.matrix[3]" (field_expression) "m.matrix" (identifier) "m" (.) "." (field_identifier) "matrix" ([) "[" (number_literal) "3" (]) "]" ([) "[" (number_literal) "3" (]) "]" (;) ";" (return_statement) "return (res);" (return) "return" (parenthesized_expression) "(res)" (() "(" (identifier) "res" ()) ")" (;) ";" (}) "}"
632
0
{"language": "c", "success": true, "metadata": {"lines": 57, "avg_line_length": 32.54, "nodes": 407, "errors": 0, "source_hash": "281e1d8a2a17aecdf54947d51e6c135b9213cdac3b0cfacd808f735c85612e90", "categorized_nodes": 349}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"rtv1.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"rtv1.h\"", "parent": 0, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 17}}, {"id": 3, "type": "function_definition", "text": "t_vec3\t\t\tft_vec3_neg(t_vec3 v)\n{\n\treturn (ft_vec3_scalar_multiply(v, -1));\n}", "parent": null, "children": [4, 5], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 4, "type": "type_identifier", "text": "t_vec3", "parent": 3, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 6}}, {"id": 5, "type": "function_declarator", "text": "ft_vec3_neg(t_vec3 v)", "parent": 3, "children": [6, 7], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 30}}, {"id": 6, "type": "identifier", "text": "ft_vec3_neg", "parent": 5, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 20}}, {"id": 7, "type": "parameter_list", "text": "(t_vec3 v)", "parent": 5, "children": [8], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 30}}, {"id": 8, "type": "parameter_declaration", "text": "t_vec3 v", "parent": 7, "children": [9, 10], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 29}}, {"id": 9, "type": "type_identifier", "text": "t_vec3", "parent": 8, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 27}}, {"id": 10, "type": "identifier", "text": "v", "parent": 8, "children": [], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 29}}, {"id": 11, "type": "return_statement", "text": "return (ft_vec3_scalar_multiply(v, -1));", "parent": 3, "children": [12], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 41}}, {"id": 12, "type": "parenthesized_expression", "text": "(ft_vec3_scalar_multiply(v, -1))", "parent": 11, "children": [13], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 40}}, {"id": 13, "type": "call_expression", "text": "ft_vec3_scalar_multiply(v, -1)", "parent": 12, "children": [14, 15], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 39}}, {"id": 14, "type": "identifier", "text": "ft_vec3_scalar_multiply", "parent": 13, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 32}}, {"id": 15, "type": "argument_list", "text": "(v, -1)", "parent": 13, "children": [16, 17], "start_point": {"row": 16, "column": 32}, "end_point": {"row": 16, "column": 39}}, {"id": 16, "type": "identifier", "text": "v", "parent": 15, "children": [], "start_point": {"row": 16, "column": 33}, "end_point": {"row": 16, "column": 34}}, {"id": 17, "type": "number_literal", "text": "-1", "parent": 15, "children": [], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 38}}, {"id": 18, "type": "function_definition", "text": "double\t\t\tft_vec3_angle(t_vec3 a, t_vec3 b)\n{\n\tt_vec3\t\tv1;\n\tt_vec3\t\tv2;\n\n\tv1 = ft_vec3_normalize(a);\n\tv2 = ft_vec3_normalize(b);\n\treturn (acos(ft_vec3_dot_multiply(v1, v2)));\n}", "parent": null, "children": [19, 20], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 19, "type": "primitive_type", "text": "double", "parent": 18, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 20, "type": "function_declarator", "text": "ft_vec3_angle(t_vec3 a, t_vec3 b)", "parent": 18, "children": [21, 22], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 42}}, {"id": 21, "type": "identifier", "text": "ft_vec3_angle", "parent": 20, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 22}}, {"id": 22, "type": "parameter_list", "text": "(t_vec3 a, t_vec3 b)", "parent": 20, "children": [23, 26], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 42}}, {"id": 23, "type": "parameter_declaration", "text": "t_vec3 a", "parent": 22, "children": [24, 25], "start_point": {"row": 19, "column": 23}, "end_point": {"row": 19, "column": 31}}, {"id": 24, "type": "type_identifier", "text": "t_vec3", "parent": 23, "children": [], "start_point": {"row": 19, "column": 23}, "end_point": {"row": 19, "column": 29}}, {"id": 25, "type": "identifier", "text": "a", "parent": 23, "children": [], "start_point": {"row": 19, "column": 30}, "end_point": {"row": 19, "column": 31}}, {"id": 26, "type": "parameter_declaration", "text": "t_vec3 b", "parent": 22, "children": [27, 28], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 41}}, {"id": 27, "type": "type_identifier", "text": "t_vec3", "parent": 26, "children": [], "start_point": {"row": 19, "column": 33}, "end_point": {"row": 19, "column": 39}}, {"id": 28, "type": "identifier", "text": "b", "parent": 26, "children": [], "start_point": {"row": 19, "column": 40}, "end_point": {"row": 19, "column": 41}}, {"id": 29, "type": "declaration", "text": "t_vec3\t\tv1;", "parent": 18, "children": [30, 31], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 12}}, {"id": 30, "type": "type_identifier", "text": "t_vec3", "parent": 29, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 7}}, {"id": 31, "type": "identifier", "text": "v1", "parent": 29, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 11}}, {"id": 32, "type": "declaration", "text": "t_vec3\t\tv2;", "parent": 18, "children": [33, 34], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 12}}, {"id": 33, "type": "type_identifier", "text": "t_vec3", "parent": 32, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 7}}, {"id": 34, "type": "identifier", "text": "v2", "parent": 32, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 11}}, {"id": 35, "type": "assignment_expression", "text": "v1 = ft_vec3_normalize(a)", "parent": 18, "children": [36, 37, 38], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 26}}, {"id": 36, "type": "identifier", "text": "v1", "parent": 35, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 3}}, {"id": 37, "type": "=", "text": "=", "parent": 35, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 5}}, {"id": 38, "type": "call_expression", "text": "ft_vec3_normalize(a)", "parent": 35, "children": [39, 40], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 26}}, {"id": 39, "type": "identifier", "text": "ft_vec3_normalize", "parent": 38, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 23}}, {"id": 40, "type": "argument_list", "text": "(a)", "parent": 38, "children": [41], "start_point": {"row": 24, "column": 23}, "end_point": {"row": 24, "column": 26}}, {"id": 41, "type": "identifier", "text": "a", "parent": 40, "children": [], "start_point": {"row": 24, "column": 24}, "end_point": {"row": 24, "column": 25}}, {"id": 42, "type": "assignment_expression", "text": "v2 = ft_vec3_normalize(b)", "parent": 18, "children": [43, 44, 45], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 26}}, {"id": 43, "type": "identifier", "text": "v2", "parent": 42, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 3}}, {"id": 44, "type": "=", "text": "=", "parent": 42, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 5}}, {"id": 45, "type": "call_expression", "text": "ft_vec3_normalize(b)", "parent": 42, "children": [46, 47], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 26}}, {"id": 46, "type": "identifier", "text": "ft_vec3_normalize", "parent": 45, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 23}}, {"id": 47, "type": "argument_list", "text": "(b)", "parent": 45, "children": [48], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 26}}, {"id": 48, "type": "identifier", "text": "b", "parent": 47, "children": [], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 25}}, {"id": 49, "type": "return_statement", "text": "return (acos(ft_vec3_dot_multiply(v1, v2)));", "parent": 18, "children": [50], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 45}}, {"id": 50, "type": "parenthesized_expression", "text": "(acos(ft_vec3_dot_multiply(v1, v2)))", "parent": 49, "children": [51], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 44}}, {"id": 51, "type": "call_expression", "text": "acos(ft_vec3_dot_multiply(v1, v2))", "parent": 50, "children": [52, 53], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 43}}, {"id": 52, "type": "identifier", "text": "acos", "parent": 51, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 13}}, {"id": 53, "type": "argument_list", "text": "(ft_vec3_dot_multiply(v1, v2))", "parent": 51, "children": [54], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 43}}, {"id": 54, "type": "call_expression", "text": "ft_vec3_dot_multiply(v1, v2)", "parent": 53, "children": [55, 56], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 42}}, {"id": 55, "type": "identifier", "text": "ft_vec3_dot_multiply", "parent": 54, "children": [], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 34}}, {"id": 56, "type": "argument_list", "text": "(v1, v2)", "parent": 54, "children": [57, 58], "start_point": {"row": 26, "column": 34}, "end_point": {"row": 26, "column": 42}}, {"id": 57, "type": "identifier", "text": "v1", "parent": 56, "children": [], "start_point": {"row": 26, "column": 35}, "end_point": {"row": 26, "column": 37}}, {"id": 58, "type": "identifier", "text": "v2", "parent": 56, "children": [], "start_point": {"row": 26, "column": 39}, "end_point": {"row": 26, "column": 41}}, {"id": 59, "type": "function_definition", "text": "double\t\t\tft_vec3_length(t_vec3 v1)\n{\n\treturn (sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z));\n}", "parent": null, "children": [60, 61], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 32, "column": 1}}, {"id": 60, "type": "primitive_type", "text": "double", "parent": 59, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 61, "type": "function_declarator", "text": "ft_vec3_length(t_vec3 v1)", "parent": 59, "children": [62, 63], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 34}}, {"id": 62, "type": "identifier", "text": "ft_vec3_length", "parent": 61, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 23}}, {"id": 63, "type": "parameter_list", "text": "(t_vec3 v1)", "parent": 61, "children": [64], "start_point": {"row": 29, "column": 23}, "end_point": {"row": 29, "column": 34}}, {"id": 64, "type": "parameter_declaration", "text": "t_vec3 v1", "parent": 63, "children": [65, 66], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 33}}, {"id": 65, "type": "type_identifier", "text": "t_vec3", "parent": 64, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 30}}, {"id": 66, "type": "identifier", "text": "v1", "parent": 64, "children": [], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 33}}, {"id": 67, "type": "return_statement", "text": "return (sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z));", "parent": 59, "children": [68], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 56}}, {"id": 68, "type": "parenthesized_expression", "text": "(sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z))", "parent": 67, "children": [69], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 55}}, {"id": 69, "type": "call_expression", "text": "sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z)", "parent": 68, "children": [70, 71], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 54}}, {"id": 70, "type": "identifier", "text": "sqrt", "parent": 69, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 13}}, {"id": 71, "type": "argument_list", "text": "(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z)", "parent": 69, "children": [72], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 54}}, {"id": 72, "type": "binary_expression", "text": "v1.x * v1.x + v1.y * v1.y + v1.z * v1.z", "parent": 71, "children": [73, 91, 92], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 53}}, {"id": 73, "type": "binary_expression", "text": "v1.x * v1.x + v1.y * v1.y", "parent": 72, "children": [74, 82, 83], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 39}}, {"id": 74, "type": "binary_expression", "text": "v1.x * v1.x", "parent": 73, "children": [75, 78, 79], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 25}}, {"id": 75, "type": "field_expression", "text": "v1.x", "parent": 74, "children": [76, 77], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 18}}, {"id": 76, "type": "identifier", "text": "v1", "parent": 75, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 16}}, {"id": 77, "type": "field_identifier", "text": "x", "parent": 75, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 18}}, {"id": 78, "type": "*", "text": "*", "parent": 74, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 20}}, {"id": 79, "type": "field_expression", "text": "v1.x", "parent": 74, "children": [80, 81], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 25}}, {"id": 80, "type": "identifier", "text": "v1", "parent": 79, "children": [], "start_point": {"row": 31, "column": 21}, "end_point": {"row": 31, "column": 23}}, {"id": 81, "type": "field_identifier", "text": "x", "parent": 79, "children": [], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 25}}, {"id": 82, "type": "+", "text": "+", "parent": 73, "children": [], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 27}}, {"id": 83, "type": "binary_expression", "text": "v1.y * v1.y", "parent": 73, "children": [84, 87, 88], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 39}}, {"id": 84, "type": "field_expression", "text": "v1.y", "parent": 83, "children": [85, 86], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 32}}, {"id": 85, "type": "identifier", "text": "v1", "parent": 84, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 30}}, {"id": 86, "type": "field_identifier", "text": "y", "parent": 84, "children": [], "start_point": {"row": 31, "column": 31}, "end_point": {"row": 31, "column": 32}}, {"id": 87, "type": "*", "text": "*", "parent": 83, "children": [], "start_point": {"row": 31, "column": 33}, "end_point": {"row": 31, "column": 34}}, {"id": 88, "type": "field_expression", "text": "v1.y", "parent": 83, "children": [89, 90], "start_point": {"row": 31, "column": 35}, "end_point": {"row": 31, "column": 39}}, {"id": 89, "type": "identifier", "text": "v1", "parent": 88, "children": [], "start_point": {"row": 31, "column": 35}, "end_point": {"row": 31, "column": 37}}, {"id": 90, "type": "field_identifier", "text": "y", "parent": 88, "children": [], "start_point": {"row": 31, "column": 38}, "end_point": {"row": 31, "column": 39}}, {"id": 91, "type": "+", "text": "+", "parent": 72, "children": [], "start_point": {"row": 31, "column": 40}, "end_point": {"row": 31, "column": 41}}, {"id": 92, "type": "binary_expression", "text": "v1.z * v1.z", "parent": 72, "children": [93, 96, 97], "start_point": {"row": 31, "column": 42}, "end_point": {"row": 31, "column": 53}}, {"id": 93, "type": "field_expression", "text": "v1.z", "parent": 92, "children": [94, 95], "start_point": {"row": 31, "column": 42}, "end_point": {"row": 31, "column": 46}}, {"id": 94, "type": "identifier", "text": "v1", "parent": 93, "children": [], "start_point": {"row": 31, "column": 42}, "end_point": {"row": 31, "column": 44}}, {"id": 95, "type": "field_identifier", "text": "z", "parent": 93, "children": [], "start_point": {"row": 31, "column": 45}, "end_point": {"row": 31, "column": 46}}, {"id": 96, "type": "*", "text": "*", "parent": 92, "children": [], "start_point": {"row": 31, "column": 47}, "end_point": {"row": 31, "column": 48}}, {"id": 97, "type": "field_expression", "text": "v1.z", "parent": 92, "children": [98, 99], "start_point": {"row": 31, "column": 49}, "end_point": {"row": 31, "column": 53}}, {"id": 98, "type": "identifier", "text": "v1", "parent": 97, "children": [], "start_point": {"row": 31, "column": 49}, "end_point": {"row": 31, "column": 51}}, {"id": 99, "type": "field_identifier", "text": "z", "parent": 97, "children": [], "start_point": {"row": 31, "column": 52}, "end_point": {"row": 31, "column": 53}}, {"id": 100, "type": "function_definition", "text": "t_vec3\t\t\tft_vec3_sum_poin3(t_vec3 a, t_point3 b)\n{\n\tt_vec3\t\tnew;\n\n\tnew.x = (a.x + b.x);\n\tnew.y = (a.y + b.y);\n\tnew.z = (a.z + b.z);\n\treturn (new);\n}", "parent": null, "children": [101, 102], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 42, "column": 1}}, {"id": 101, "type": "type_identifier", "text": "t_vec3", "parent": 100, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 6}}, {"id": 102, "type": "function_declarator", "text": "ft_vec3_sum_poin3(t_vec3 a, t_point3 b)", "parent": 100, "children": [103, 104], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 48}}, {"id": 103, "type": "identifier", "text": "ft_vec3_sum_poin3", "parent": 102, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 26}}, {"id": 104, "type": "parameter_list", "text": "(t_vec3 a, t_point3 b)", "parent": 102, "children": [105, 108], "start_point": {"row": 34, "column": 26}, "end_point": {"row": 34, "column": 48}}, {"id": 105, "type": "parameter_declaration", "text": "t_vec3 a", "parent": 104, "children": [106, 107], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 35}}, {"id": 106, "type": "type_identifier", "text": "t_vec3", "parent": 105, "children": [], "start_point": {"row": 34, "column": 27}, "end_point": {"row": 34, "column": 33}}, {"id": 107, "type": "identifier", "text": "a", "parent": 105, "children": [], "start_point": {"row": 34, "column": 34}, "end_point": {"row": 34, "column": 35}}, {"id": 108, "type": "parameter_declaration", "text": "t_point3 b", "parent": 104, "children": [109, 110], "start_point": {"row": 34, "column": 37}, "end_point": {"row": 34, "column": 47}}, {"id": 109, "type": "type_identifier", "text": "t_point3", "parent": 108, "children": [], "start_point": {"row": 34, "column": 37}, "end_point": {"row": 34, "column": 45}}, {"id": 110, "type": "identifier", "text": "b", "parent": 108, "children": [], "start_point": {"row": 34, "column": 46}, "end_point": {"row": 34, "column": 47}}, {"id": 111, "type": "declaration", "text": "t_vec3\t\tnew;", "parent": 100, "children": [112], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 13}}, {"id": 112, "type": "type_identifier", "text": "t_vec3", "parent": 111, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 7}}, {"id": 113, "type": "assignment_expression", "text": "new.x = (a.x + b.x)", "parent": 100, "children": [114, 116, 117], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 20}}, {"id": 114, "type": "field_expression", "text": "new.x", "parent": 113, "children": [115], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 6}}, {"id": 115, "type": "field_identifier", "text": "x", "parent": 114, "children": [], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 6}}, {"id": 116, "type": "=", "text": "=", "parent": 113, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 8}}, {"id": 117, "type": "parenthesized_expression", "text": "(a.x + b.x)", "parent": 113, "children": [118], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 20}}, {"id": 118, "type": "binary_expression", "text": "a.x + b.x", "parent": 117, "children": [119, 122, 123], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 19}}, {"id": 119, "type": "field_expression", "text": "a.x", "parent": 118, "children": [120, 121], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 13}}, {"id": 120, "type": "identifier", "text": "a", "parent": 119, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 11}}, {"id": 121, "type": "field_identifier", "text": "x", "parent": 119, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 13}}, {"id": 122, "type": "+", "text": "+", "parent": 118, "children": [], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 15}}, {"id": 123, "type": "field_expression", "text": "b.x", "parent": 118, "children": [124, 125], "start_point": {"row": 38, "column": 16}, "end_point": {"row": 38, "column": 19}}, {"id": 124, "type": "identifier", "text": "b", "parent": 123, "children": [], "start_point": {"row": 38, "column": 16}, "end_point": {"row": 38, "column": 17}}, {"id": 125, "type": "field_identifier", "text": "x", "parent": 123, "children": [], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 19}}, {"id": 126, "type": "assignment_expression", "text": "new.y = (a.y + b.y)", "parent": 100, "children": [127, 129, 130], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 20}}, {"id": 127, "type": "field_expression", "text": "new.y", "parent": 126, "children": [128], "start_point": {"row": 39, "column": 1}, "end_point": {"row": 39, "column": 6}}, {"id": 128, "type": "field_identifier", "text": "y", "parent": 127, "children": [], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 6}}, {"id": 129, "type": "=", "text": "=", "parent": 126, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 8}}, {"id": 130, "type": "parenthesized_expression", "text": "(a.y + b.y)", "parent": 126, "children": [131], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 20}}, {"id": 131, "type": "binary_expression", "text": "a.y + b.y", "parent": 130, "children": [132, 135, 136], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 19}}, {"id": 132, "type": "field_expression", "text": "a.y", "parent": 131, "children": [133, 134], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 13}}, {"id": 133, "type": "identifier", "text": "a", "parent": 132, "children": [], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 11}}, {"id": 134, "type": "field_identifier", "text": "y", "parent": 132, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 13}}, {"id": 135, "type": "+", "text": "+", "parent": 131, "children": [], "start_point": {"row": 39, "column": 14}, "end_point": {"row": 39, "column": 15}}, {"id": 136, "type": "field_expression", "text": "b.y", "parent": 131, "children": [137, 138], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 19}}, {"id": 137, "type": "identifier", "text": "b", "parent": 136, "children": [], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 17}}, {"id": 138, "type": "field_identifier", "text": "y", "parent": 136, "children": [], "start_point": {"row": 39, "column": 18}, "end_point": {"row": 39, "column": 19}}, {"id": 139, "type": "assignment_expression", "text": "new.z = (a.z + b.z)", "parent": 100, "children": [140, 142, 143], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 20}}, {"id": 140, "type": "field_expression", "text": "new.z", "parent": 139, "children": [141], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 6}}, {"id": 141, "type": "field_identifier", "text": "z", "parent": 140, "children": [], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 6}}, {"id": 142, "type": "=", "text": "=", "parent": 139, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 8}}, {"id": 143, "type": "parenthesized_expression", "text": "(a.z + b.z)", "parent": 139, "children": [144], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 20}}, {"id": 144, "type": "binary_expression", "text": "a.z + b.z", "parent": 143, "children": [145, 148, 149], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 19}}, {"id": 145, "type": "field_expression", "text": "a.z", "parent": 144, "children": [146, 147], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 13}}, {"id": 146, "type": "identifier", "text": "a", "parent": 145, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 11}}, {"id": 147, "type": "field_identifier", "text": "z", "parent": 145, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 13}}, {"id": 148, "type": "+", "text": "+", "parent": 144, "children": [], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 15}}, {"id": 149, "type": "field_expression", "text": "b.z", "parent": 144, "children": [150, 151], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 19}}, {"id": 150, "type": "identifier", "text": "b", "parent": 149, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 17}}, {"id": 151, "type": "field_identifier", "text": "z", "parent": 149, "children": [], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 19}}, {"id": 152, "type": "return_statement", "text": "return (new);", "parent": 100, "children": [153], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 14}}, {"id": 153, "type": "parenthesized_expression", "text": "(new)", "parent": 152, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 13}}, {"id": 154, "type": "function_definition", "text": "t_vec3\t\t\tft_vec3_multiply_matrix(t_vec3 v, t_mat4 m)\n{\n\tt_vec3\t\tres;\n\n\tres.x = v.x * m.matrix[0][0] +\n\t\t\tv.y * m.matrix[0][1] +\n\t\t\tv.z * m.matrix[0][2] +\n\t\t\tv.w * m.matrix[0][3];\n\tres.y = v.x * m.matrix[1][0] +\n\t\t\tv.y * m.matrix[1][1] +\n\t\t\tv.z * m.matrix[1][2] +\n\t\t\tv.w * m.matrix[1][3];\n\tres.z = v.x * m.matrix[2][0] +\n\t\t\tv.y * m.matrix[2][1] +\n\t\t\tv.z * m.matrix[2][2] +\n\t\t\tv.w * m.matrix[2][3];\n\tres.w = v.x * m.matrix[3][0] +\n\t\t\tv.y * m.matrix[3][1] +\n\t\t\tv.z * m.matrix[3][2] +\n\t\t\tv.w * m.matrix[3][3];\n\treturn (res);\n}", "parent": null, "children": [155, 156], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 65, "column": 1}}, {"id": 155, "type": "type_identifier", "text": "t_vec3", "parent": 154, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 6}}, {"id": 156, "type": "function_declarator", "text": "ft_vec3_multiply_matrix(t_vec3 v, t_mat4 m)", "parent": 154, "children": [157, 158], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 52}}, {"id": 157, "type": "identifier", "text": "ft_vec3_multiply_matrix", "parent": 156, "children": [], "start_point": {"row": 44, "column": 9}, "end_point": {"row": 44, "column": 32}}, {"id": 158, "type": "parameter_list", "text": "(t_vec3 v, t_mat4 m)", "parent": 156, "children": [159, 162], "start_point": {"row": 44, "column": 32}, "end_point": {"row": 44, "column": 52}}, {"id": 159, "type": "parameter_declaration", "text": "t_vec3 v", "parent": 158, "children": [160, 161], "start_point": {"row": 44, "column": 33}, "end_point": {"row": 44, "column": 41}}, {"id": 160, "type": "type_identifier", "text": "t_vec3", "parent": 159, "children": [], "start_point": {"row": 44, "column": 33}, "end_point": {"row": 44, "column": 39}}, {"id": 161, "type": "identifier", "text": "v", "parent": 159, "children": [], "start_point": {"row": 44, "column": 40}, "end_point": {"row": 44, "column": 41}}, {"id": 162, "type": "parameter_declaration", "text": "t_mat4 m", "parent": 158, "children": [163, 164], "start_point": {"row": 44, "column": 43}, "end_point": {"row": 44, "column": 51}}, {"id": 163, "type": "type_identifier", "text": "t_mat4", "parent": 162, "children": [], "start_point": {"row": 44, "column": 43}, "end_point": {"row": 44, "column": 49}}, {"id": 164, "type": "identifier", "text": "m", "parent": 162, "children": [], "start_point": {"row": 44, "column": 50}, "end_point": {"row": 44, "column": 51}}, {"id": 165, "type": "declaration", "text": "t_vec3\t\tres;", "parent": 154, "children": [166, 167], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 13}}, {"id": 166, "type": "type_identifier", "text": "t_vec3", "parent": 165, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 7}}, {"id": 167, "type": "identifier", "text": "res", "parent": 165, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 12}}, {"id": 168, "type": "assignment_expression", "text": "res.x = v.x * m.matrix[0][0] +\n\t\t\tv.y * m.matrix[0][1] +\n\t\t\tv.z * m.matrix[0][2] +\n\t\t\tv.w * m.matrix[0][3]", "parent": 154, "children": [169, 172, 173], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 51, "column": 23}}, {"id": 169, "type": "field_expression", "text": "res.x", "parent": 168, "children": [170, 171], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 6}}, {"id": 170, "type": "identifier", "text": "res", "parent": 169, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 4}}, {"id": 171, "type": "field_identifier", "text": "x", "parent": 169, "children": [], "start_point": {"row": 48, "column": 5}, "end_point": {"row": 48, "column": 6}}, {"id": 172, "type": "=", "text": "=", "parent": 168, "children": [], "start_point": {"row": 48, "column": 7}, "end_point": {"row": 48, "column": 8}}, {"id": 173, "type": "binary_expression", "text": "v.x * m.matrix[0][0] +\n\t\t\tv.y * m.matrix[0][1] +\n\t\t\tv.z * m.matrix[0][2] +\n\t\t\tv.w * m.matrix[0][3]", "parent": 168, "children": [174, 214, 215], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 51, "column": 23}}, {"id": 174, "type": "binary_expression", "text": "v.x * m.matrix[0][0] +\n\t\t\tv.y * m.matrix[0][1] +\n\t\t\tv.z * m.matrix[0][2]", "parent": 173, "children": [175, 201, 202], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 50, "column": 23}}, {"id": 175, "type": "binary_expression", "text": "v.x * m.matrix[0][0] +\n\t\t\tv.y * m.matrix[0][1]", "parent": 174, "children": [176, 188, 189], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 49, "column": 23}}, {"id": 176, "type": "binary_expression", "text": "v.x * m.matrix[0][0]", "parent": 175, "children": [177, 180, 181], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 29}}, {"id": 177, "type": "field_expression", "text": "v.x", "parent": 176, "children": [178, 179], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 12}}, {"id": 178, "type": "identifier", "text": "v", "parent": 177, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 10}}, {"id": 179, "type": "field_identifier", "text": "x", "parent": 177, "children": [], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 12}}, {"id": 180, "type": "*", "text": "*", "parent": 176, "children": [], "start_point": {"row": 48, "column": 13}, "end_point": {"row": 48, "column": 14}}, {"id": 181, "type": "subscript_expression", "text": "m.matrix[0][0]", "parent": 176, "children": [182, 187], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 29}}, {"id": 182, "type": "subscript_expression", "text": "m.matrix[0]", "parent": 181, "children": [183, 186], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 26}}, {"id": 183, "type": "field_expression", "text": "m.matrix", "parent": 182, "children": [184, 185], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 23}}, {"id": 184, "type": "identifier", "text": "m", "parent": 183, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 16}}, {"id": 185, "type": "field_identifier", "text": "matrix", "parent": 183, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 23}}, {"id": 186, "type": "number_literal", "text": "0", "parent": 182, "children": [], "start_point": {"row": 48, "column": 24}, "end_point": {"row": 48, "column": 25}}, {"id": 187, "type": "number_literal", "text": "0", "parent": 181, "children": [], "start_point": {"row": 48, "column": 27}, "end_point": {"row": 48, "column": 28}}, {"id": 188, "type": "+", "text": "+", "parent": 175, "children": [], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 31}}, {"id": 189, "type": "binary_expression", "text": "v.y * m.matrix[0][1]", "parent": 175, "children": [190, 193, 194], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 23}}, {"id": 190, "type": "field_expression", "text": "v.y", "parent": 189, "children": [191, 192], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 6}}, {"id": 191, "type": "identifier", "text": "v", "parent": 190, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 4}}, {"id": 192, "type": "field_identifier", "text": "y", "parent": 190, "children": [], "start_point": {"row": 49, "column": 5}, "end_point": {"row": 49, "column": 6}}, {"id": 193, "type": "*", "text": "*", "parent": 189, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 8}}, {"id": 194, "type": "subscript_expression", "text": "m.matrix[0][1]", "parent": 189, "children": [195, 200], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 23}}, {"id": 195, "type": "subscript_expression", "text": "m.matrix[0]", "parent": 194, "children": [196, 199], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 20}}, {"id": 196, "type": "field_expression", "text": "m.matrix", "parent": 195, "children": [197, 198], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 17}}, {"id": 197, "type": "identifier", "text": "m", "parent": 196, "children": [], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 10}}, {"id": 198, "type": "field_identifier", "text": "matrix", "parent": 196, "children": [], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 17}}, {"id": 199, "type": "number_literal", "text": "0", "parent": 195, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 19}}, {"id": 200, "type": "number_literal", "text": "1", "parent": 194, "children": [], "start_point": {"row": 49, "column": 21}, "end_point": {"row": 49, "column": 22}}, {"id": 201, "type": "+", "text": "+", "parent": 174, "children": [], "start_point": {"row": 49, "column": 24}, "end_point": {"row": 49, "column": 25}}, {"id": 202, "type": "binary_expression", "text": "v.z * m.matrix[0][2]", "parent": 174, "children": [203, 206, 207], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 23}}, {"id": 203, "type": "field_expression", "text": "v.z", "parent": 202, "children": [204, 205], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 6}}, {"id": 204, "type": "identifier", "text": "v", "parent": 203, "children": [], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 4}}, {"id": 205, "type": "field_identifier", "text": "z", "parent": 203, "children": [], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 6}}, {"id": 206, "type": "*", "text": "*", "parent": 202, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 8}}, {"id": 207, "type": "subscript_expression", "text": "m.matrix[0][2]", "parent": 202, "children": [208, 213], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 23}}, {"id": 208, "type": "subscript_expression", "text": "m.matrix[0]", "parent": 207, "children": [209, 212], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 20}}, {"id": 209, "type": "field_expression", "text": "m.matrix", "parent": 208, "children": [210, 211], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 17}}, {"id": 210, "type": "identifier", "text": "m", "parent": 209, "children": [], "start_point": {"row": 50, "column": 9}, "end_point": {"row": 50, "column": 10}}, {"id": 211, "type": "field_identifier", "text": "matrix", "parent": 209, "children": [], "start_point": {"row": 50, "column": 11}, "end_point": {"row": 50, "column": 17}}, {"id": 212, "type": "number_literal", "text": "0", "parent": 208, "children": [], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 19}}, {"id": 213, "type": "number_literal", "text": "2", "parent": 207, "children": [], "start_point": {"row": 50, "column": 21}, "end_point": {"row": 50, "column": 22}}, {"id": 214, "type": "+", "text": "+", "parent": 173, "children": [], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 25}}, {"id": 215, "type": "binary_expression", "text": "v.w * m.matrix[0][3]", "parent": 173, "children": [216, 219, 220], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 23}}, {"id": 216, "type": "field_expression", "text": "v.w", "parent": 215, "children": [217, 218], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 6}}, {"id": 217, "type": "identifier", "text": "v", "parent": 216, "children": [], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 51, "column": 4}}, {"id": 218, "type": "field_identifier", "text": "w", "parent": 216, "children": [], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 6}}, {"id": 219, "type": "*", "text": "*", "parent": 215, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 8}}, {"id": 220, "type": "subscript_expression", "text": "m.matrix[0][3]", "parent": 215, "children": [221, 226], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 23}}, {"id": 221, "type": "subscript_expression", "text": "m.matrix[0]", "parent": 220, "children": [222, 225], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 20}}, {"id": 222, "type": "field_expression", "text": "m.matrix", "parent": 221, "children": [223, 224], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 17}}, {"id": 223, "type": "identifier", "text": "m", "parent": 222, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 10}}, {"id": 224, "type": "field_identifier", "text": "matrix", "parent": 222, "children": [], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 17}}, {"id": 225, "type": "number_literal", "text": "0", "parent": 221, "children": [], "start_point": {"row": 51, "column": 18}, "end_point": {"row": 51, "column": 19}}, {"id": 226, "type": "number_literal", "text": "3", "parent": 220, "children": [], "start_point": {"row": 51, "column": 21}, "end_point": {"row": 51, "column": 22}}, {"id": 227, "type": "assignment_expression", "text": "res.y = v.x * m.matrix[1][0] +\n\t\t\tv.y * m.matrix[1][1] +\n\t\t\tv.z * m.matrix[1][2] +\n\t\t\tv.w * m.matrix[1][3]", "parent": 154, "children": [228, 231, 232], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 55, "column": 23}}, {"id": 228, "type": "field_expression", "text": "res.y", "parent": 227, "children": [229, 230], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 6}}, {"id": 229, "type": "identifier", "text": "res", "parent": 228, "children": [], "start_point": {"row": 52, "column": 1}, "end_point": {"row": 52, "column": 4}}, {"id": 230, "type": "field_identifier", "text": "y", "parent": 228, "children": [], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 6}}, {"id": 231, "type": "=", "text": "=", "parent": 227, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 8}}, {"id": 232, "type": "binary_expression", "text": "v.x * m.matrix[1][0] +\n\t\t\tv.y * m.matrix[1][1] +\n\t\t\tv.z * m.matrix[1][2] +\n\t\t\tv.w * m.matrix[1][3]", "parent": 227, "children": [233, 273, 274], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 55, "column": 23}}, {"id": 233, "type": "binary_expression", "text": "v.x * m.matrix[1][0] +\n\t\t\tv.y * m.matrix[1][1] +\n\t\t\tv.z * m.matrix[1][2]", "parent": 232, "children": [234, 260, 261], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 54, "column": 23}}, {"id": 234, "type": "binary_expression", "text": "v.x * m.matrix[1][0] +\n\t\t\tv.y * m.matrix[1][1]", "parent": 233, "children": [235, 247, 248], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 53, "column": 23}}, {"id": 235, "type": "binary_expression", "text": "v.x * m.matrix[1][0]", "parent": 234, "children": [236, 239, 240], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 29}}, {"id": 236, "type": "field_expression", "text": "v.x", "parent": 235, "children": [237, 238], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 12}}, {"id": 237, "type": "identifier", "text": "v", "parent": 236, "children": [], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 10}}, {"id": 238, "type": "field_identifier", "text": "x", "parent": 236, "children": [], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 12}}, {"id": 239, "type": "*", "text": "*", "parent": 235, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 14}}, {"id": 240, "type": "subscript_expression", "text": "m.matrix[1][0]", "parent": 235, "children": [241, 246], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 29}}, {"id": 241, "type": "subscript_expression", "text": "m.matrix[1]", "parent": 240, "children": [242, 245], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 26}}, {"id": 242, "type": "field_expression", "text": "m.matrix", "parent": 241, "children": [243, 244], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 23}}, {"id": 243, "type": "identifier", "text": "m", "parent": 242, "children": [], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 16}}, {"id": 244, "type": "field_identifier", "text": "matrix", "parent": 242, "children": [], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 23}}, {"id": 245, "type": "number_literal", "text": "1", "parent": 241, "children": [], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 25}}, {"id": 246, "type": "number_literal", "text": "0", "parent": 240, "children": [], "start_point": {"row": 52, "column": 27}, "end_point": {"row": 52, "column": 28}}, {"id": 247, "type": "+", "text": "+", "parent": 234, "children": [], "start_point": {"row": 52, "column": 30}, "end_point": {"row": 52, "column": 31}}, {"id": 248, "type": "binary_expression", "text": "v.y * m.matrix[1][1]", "parent": 234, "children": [249, 252, 253], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 23}}, {"id": 249, "type": "field_expression", "text": "v.y", "parent": 248, "children": [250, 251], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 6}}, {"id": 250, "type": "identifier", "text": "v", "parent": 249, "children": [], "start_point": {"row": 53, "column": 3}, "end_point": {"row": 53, "column": 4}}, {"id": 251, "type": "field_identifier", "text": "y", "parent": 249, "children": [], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 6}}, {"id": 252, "type": "*", "text": "*", "parent": 248, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 8}}, {"id": 253, "type": "subscript_expression", "text": "m.matrix[1][1]", "parent": 248, "children": [254, 259], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 23}}, {"id": 254, "type": "subscript_expression", "text": "m.matrix[1]", "parent": 253, "children": [255, 258], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 20}}, {"id": 255, "type": "field_expression", "text": "m.matrix", "parent": 254, "children": [256, 257], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 17}}, {"id": 256, "type": "identifier", "text": "m", "parent": 255, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 10}}, {"id": 257, "type": "field_identifier", "text": "matrix", "parent": 255, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 17}}, {"id": 258, "type": "number_literal", "text": "1", "parent": 254, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 19}}, {"id": 259, "type": "number_literal", "text": "1", "parent": 253, "children": [], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 22}}, {"id": 260, "type": "+", "text": "+", "parent": 233, "children": [], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 25}}, {"id": 261, "type": "binary_expression", "text": "v.z * m.matrix[1][2]", "parent": 233, "children": [262, 265, 266], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 54, "column": 23}}, {"id": 262, "type": "field_expression", "text": "v.z", "parent": 261, "children": [263, 264], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 54, "column": 6}}, {"id": 263, "type": "identifier", "text": "v", "parent": 262, "children": [], "start_point": {"row": 54, "column": 3}, "end_point": {"row": 54, "column": 4}}, {"id": 264, "type": "field_identifier", "text": "z", "parent": 262, "children": [], "start_point": {"row": 54, "column": 5}, "end_point": {"row": 54, "column": 6}}, {"id": 265, "type": "*", "text": "*", "parent": 261, "children": [], "start_point": {"row": 54, "column": 7}, "end_point": {"row": 54, "column": 8}}, {"id": 266, "type": "subscript_expression", "text": "m.matrix[1][2]", "parent": 261, "children": [267, 272], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 23}}, {"id": 267, "type": "subscript_expression", "text": "m.matrix[1]", "parent": 266, "children": [268, 271], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 20}}, {"id": 268, "type": "field_expression", "text": "m.matrix", "parent": 267, "children": [269, 270], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 17}}, {"id": 269, "type": "identifier", "text": "m", "parent": 268, "children": [], "start_point": {"row": 54, "column": 9}, "end_point": {"row": 54, "column": 10}}, {"id": 270, "type": "field_identifier", "text": "matrix", "parent": 268, "children": [], "start_point": {"row": 54, "column": 11}, "end_point": {"row": 54, "column": 17}}, {"id": 271, "type": "number_literal", "text": "1", "parent": 267, "children": [], "start_point": {"row": 54, "column": 18}, "end_point": {"row": 54, "column": 19}}, {"id": 272, "type": "number_literal", "text": "2", "parent": 266, "children": [], "start_point": {"row": 54, "column": 21}, "end_point": {"row": 54, "column": 22}}, {"id": 273, "type": "+", "text": "+", "parent": 232, "children": [], "start_point": {"row": 54, "column": 24}, "end_point": {"row": 54, "column": 25}}, {"id": 274, "type": "binary_expression", "text": "v.w * m.matrix[1][3]", "parent": 232, "children": [275, 278, 279], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 23}}, {"id": 275, "type": "field_expression", "text": "v.w", "parent": 274, "children": [276, 277], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 6}}, {"id": 276, "type": "identifier", "text": "v", "parent": 275, "children": [], "start_point": {"row": 55, "column": 3}, "end_point": {"row": 55, "column": 4}}, {"id": 277, "type": "field_identifier", "text": "w", "parent": 275, "children": [], "start_point": {"row": 55, "column": 5}, "end_point": {"row": 55, "column": 6}}, {"id": 278, "type": "*", "text": "*", "parent": 274, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 8}}, {"id": 279, "type": "subscript_expression", "text": "m.matrix[1][3]", "parent": 274, "children": [280, 285], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 23}}, {"id": 280, "type": "subscript_expression", "text": "m.matrix[1]", "parent": 279, "children": [281, 284], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 20}}, {"id": 281, "type": "field_expression", "text": "m.matrix", "parent": 280, "children": [282, 283], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 17}}, {"id": 282, "type": "identifier", "text": "m", "parent": 281, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 10}}, {"id": 283, "type": "field_identifier", "text": "matrix", "parent": 281, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 17}}, {"id": 284, "type": "number_literal", "text": "1", "parent": 280, "children": [], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 19}}, {"id": 285, "type": "number_literal", "text": "3", "parent": 279, "children": [], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 22}}, {"id": 286, "type": "assignment_expression", "text": "res.z = v.x * m.matrix[2][0] +\n\t\t\tv.y * m.matrix[2][1] +\n\t\t\tv.z * m.matrix[2][2] +\n\t\t\tv.w * m.matrix[2][3]", "parent": 154, "children": [287, 290, 291], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 59, "column": 23}}, {"id": 287, "type": "field_expression", "text": "res.z", "parent": 286, "children": [288, 289], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 6}}, {"id": 288, "type": "identifier", "text": "res", "parent": 287, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 4}}, {"id": 289, "type": "field_identifier", "text": "z", "parent": 287, "children": [], "start_point": {"row": 56, "column": 5}, "end_point": {"row": 56, "column": 6}}, {"id": 290, "type": "=", "text": "=", "parent": 286, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 8}}, {"id": 291, "type": "binary_expression", "text": "v.x * m.matrix[2][0] +\n\t\t\tv.y * m.matrix[2][1] +\n\t\t\tv.z * m.matrix[2][2] +\n\t\t\tv.w * m.matrix[2][3]", "parent": 286, "children": [292, 332, 333], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 59, "column": 23}}, {"id": 292, "type": "binary_expression", "text": "v.x * m.matrix[2][0] +\n\t\t\tv.y * m.matrix[2][1] +\n\t\t\tv.z * m.matrix[2][2]", "parent": 291, "children": [293, 319, 320], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 58, "column": 23}}, {"id": 293, "type": "binary_expression", "text": "v.x * m.matrix[2][0] +\n\t\t\tv.y * m.matrix[2][1]", "parent": 292, "children": [294, 306, 307], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 57, "column": 23}}, {"id": 294, "type": "binary_expression", "text": "v.x * m.matrix[2][0]", "parent": 293, "children": [295, 298, 299], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 29}}, {"id": 295, "type": "field_expression", "text": "v.x", "parent": 294, "children": [296, 297], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 12}}, {"id": 296, "type": "identifier", "text": "v", "parent": 295, "children": [], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 10}}, {"id": 297, "type": "field_identifier", "text": "x", "parent": 295, "children": [], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 12}}, {"id": 298, "type": "*", "text": "*", "parent": 294, "children": [], "start_point": {"row": 56, "column": 13}, "end_point": {"row": 56, "column": 14}}, {"id": 299, "type": "subscript_expression", "text": "m.matrix[2][0]", "parent": 294, "children": [300, 305], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 29}}, {"id": 300, "type": "subscript_expression", "text": "m.matrix[2]", "parent": 299, "children": [301, 304], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 26}}, {"id": 301, "type": "field_expression", "text": "m.matrix", "parent": 300, "children": [302, 303], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 23}}, {"id": 302, "type": "identifier", "text": "m", "parent": 301, "children": [], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 16}}, {"id": 303, "type": "field_identifier", "text": "matrix", "parent": 301, "children": [], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 23}}, {"id": 304, "type": "number_literal", "text": "2", "parent": 300, "children": [], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 25}}, {"id": 305, "type": "number_literal", "text": "0", "parent": 299, "children": [], "start_point": {"row": 56, "column": 27}, "end_point": {"row": 56, "column": 28}}, {"id": 306, "type": "+", "text": "+", "parent": 293, "children": [], "start_point": {"row": 56, "column": 30}, "end_point": {"row": 56, "column": 31}}, {"id": 307, "type": "binary_expression", "text": "v.y * m.matrix[2][1]", "parent": 293, "children": [308, 311, 312], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 23}}, {"id": 308, "type": "field_expression", "text": "v.y", "parent": 307, "children": [309, 310], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 6}}, {"id": 309, "type": "identifier", "text": "v", "parent": 308, "children": [], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 4}}, {"id": 310, "type": "field_identifier", "text": "y", "parent": 308, "children": [], "start_point": {"row": 57, "column": 5}, "end_point": {"row": 57, "column": 6}}, {"id": 311, "type": "*", "text": "*", "parent": 307, "children": [], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 8}}, {"id": 312, "type": "subscript_expression", "text": "m.matrix[2][1]", "parent": 307, "children": [313, 318], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 23}}, {"id": 313, "type": "subscript_expression", "text": "m.matrix[2]", "parent": 312, "children": [314, 317], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 20}}, {"id": 314, "type": "field_expression", "text": "m.matrix", "parent": 313, "children": [315, 316], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 17}}, {"id": 315, "type": "identifier", "text": "m", "parent": 314, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 10}}, {"id": 316, "type": "field_identifier", "text": "matrix", "parent": 314, "children": [], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 17}}, {"id": 317, "type": "number_literal", "text": "2", "parent": 313, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 19}}, {"id": 318, "type": "number_literal", "text": "1", "parent": 312, "children": [], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 57, "column": 22}}, {"id": 319, "type": "+", "text": "+", "parent": 292, "children": [], "start_point": {"row": 57, "column": 24}, "end_point": {"row": 57, "column": 25}}, {"id": 320, "type": "binary_expression", "text": "v.z * m.matrix[2][2]", "parent": 292, "children": [321, 324, 325], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 23}}, {"id": 321, "type": "field_expression", "text": "v.z", "parent": 320, "children": [322, 323], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 6}}, {"id": 322, "type": "identifier", "text": "v", "parent": 321, "children": [], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 4}}, {"id": 323, "type": "field_identifier", "text": "z", "parent": 321, "children": [], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 6}}, {"id": 324, "type": "*", "text": "*", "parent": 320, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 8}}, {"id": 325, "type": "subscript_expression", "text": "m.matrix[2][2]", "parent": 320, "children": [326, 331], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 23}}, {"id": 326, "type": "subscript_expression", "text": "m.matrix[2]", "parent": 325, "children": [327, 330], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 20}}, {"id": 327, "type": "field_expression", "text": "m.matrix", "parent": 326, "children": [328, 329], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 17}}, {"id": 328, "type": "identifier", "text": "m", "parent": 327, "children": [], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 10}}, {"id": 329, "type": "field_identifier", "text": "matrix", "parent": 327, "children": [], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 17}}, {"id": 330, "type": "number_literal", "text": "2", "parent": 326, "children": [], "start_point": {"row": 58, "column": 18}, "end_point": {"row": 58, "column": 19}}, {"id": 331, "type": "number_literal", "text": "2", "parent": 325, "children": [], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 22}}, {"id": 332, "type": "+", "text": "+", "parent": 291, "children": [], "start_point": {"row": 58, "column": 24}, "end_point": {"row": 58, "column": 25}}, {"id": 333, "type": "binary_expression", "text": "v.w * m.matrix[2][3]", "parent": 291, "children": [334, 337, 338], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 23}}, {"id": 334, "type": "field_expression", "text": "v.w", "parent": 333, "children": [335, 336], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 6}}, {"id": 335, "type": "identifier", "text": "v", "parent": 334, "children": [], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 4}}, {"id": 336, "type": "field_identifier", "text": "w", "parent": 334, "children": [], "start_point": {"row": 59, "column": 5}, "end_point": {"row": 59, "column": 6}}, {"id": 337, "type": "*", "text": "*", "parent": 333, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 8}}, {"id": 338, "type": "subscript_expression", "text": "m.matrix[2][3]", "parent": 333, "children": [339, 344], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 23}}, {"id": 339, "type": "subscript_expression", "text": "m.matrix[2]", "parent": 338, "children": [340, 343], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 20}}, {"id": 340, "type": "field_expression", "text": "m.matrix", "parent": 339, "children": [341, 342], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 17}}, {"id": 341, "type": "identifier", "text": "m", "parent": 340, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 10}}, {"id": 342, "type": "field_identifier", "text": "matrix", "parent": 340, "children": [], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 17}}, {"id": 343, "type": "number_literal", "text": "2", "parent": 339, "children": [], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 19}}, {"id": 344, "type": "number_literal", "text": "3", "parent": 338, "children": [], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 22}}, {"id": 345, "type": "assignment_expression", "text": "res.w = v.x * m.matrix[3][0] +\n\t\t\tv.y * m.matrix[3][1] +\n\t\t\tv.z * m.matrix[3][2] +\n\t\t\tv.w * m.matrix[3][3]", "parent": 154, "children": [346, 349, 350], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 63, "column": 23}}, {"id": 346, "type": "field_expression", "text": "res.w", "parent": 345, "children": [347, 348], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 6}}, {"id": 347, "type": "identifier", "text": "res", "parent": 346, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 4}}, {"id": 348, "type": "field_identifier", "text": "w", "parent": 346, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 6}}, {"id": 349, "type": "=", "text": "=", "parent": 345, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 8}}, {"id": 350, "type": "binary_expression", "text": "v.x * m.matrix[3][0] +\n\t\t\tv.y * m.matrix[3][1] +\n\t\t\tv.z * m.matrix[3][2] +\n\t\t\tv.w * m.matrix[3][3]", "parent": 345, "children": [351, 391, 392], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 63, "column": 23}}, {"id": 351, "type": "binary_expression", "text": "v.x * m.matrix[3][0] +\n\t\t\tv.y * m.matrix[3][1] +\n\t\t\tv.z * m.matrix[3][2]", "parent": 350, "children": [352, 378, 379], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 62, "column": 23}}, {"id": 352, "type": "binary_expression", "text": "v.x * m.matrix[3][0] +\n\t\t\tv.y * m.matrix[3][1]", "parent": 351, "children": [353, 365, 366], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 61, "column": 23}}, {"id": 353, "type": "binary_expression", "text": "v.x * m.matrix[3][0]", "parent": 352, "children": [354, 357, 358], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 29}}, {"id": 354, "type": "field_expression", "text": "v.x", "parent": 353, "children": [355, 356], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 12}}, {"id": 355, "type": "identifier", "text": "v", "parent": 354, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 10}}, {"id": 356, "type": "field_identifier", "text": "x", "parent": 354, "children": [], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 12}}, {"id": 357, "type": "*", "text": "*", "parent": 353, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 14}}, {"id": 358, "type": "subscript_expression", "text": "m.matrix[3][0]", "parent": 353, "children": [359, 364], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 29}}, {"id": 359, "type": "subscript_expression", "text": "m.matrix[3]", "parent": 358, "children": [360, 363], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 26}}, {"id": 360, "type": "field_expression", "text": "m.matrix", "parent": 359, "children": [361, 362], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 23}}, {"id": 361, "type": "identifier", "text": "m", "parent": 360, "children": [], "start_point": {"row": 60, "column": 15}, "end_point": {"row": 60, "column": 16}}, {"id": 362, "type": "field_identifier", "text": "matrix", "parent": 360, "children": [], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 23}}, {"id": 363, "type": "number_literal", "text": "3", "parent": 359, "children": [], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 25}}, {"id": 364, "type": "number_literal", "text": "0", "parent": 358, "children": [], "start_point": {"row": 60, "column": 27}, "end_point": {"row": 60, "column": 28}}, {"id": 365, "type": "+", "text": "+", "parent": 352, "children": [], "start_point": {"row": 60, "column": 30}, "end_point": {"row": 60, "column": 31}}, {"id": 366, "type": "binary_expression", "text": "v.y * m.matrix[3][1]", "parent": 352, "children": [367, 370, 371], "start_point": {"row": 61, "column": 3}, "end_point": {"row": 61, "column": 23}}, {"id": 367, "type": "field_expression", "text": "v.y", "parent": 366, "children": [368, 369], "start_point": {"row": 61, "column": 3}, "end_point": {"row": 61, "column": 6}}, {"id": 368, "type": "identifier", "text": "v", "parent": 367, "children": [], "start_point": {"row": 61, "column": 3}, "end_point": {"row": 61, "column": 4}}, {"id": 369, "type": "field_identifier", "text": "y", "parent": 367, "children": [], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 6}}, {"id": 370, "type": "*", "text": "*", "parent": 366, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 8}}, {"id": 371, "type": "subscript_expression", "text": "m.matrix[3][1]", "parent": 366, "children": [372, 377], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 23}}, {"id": 372, "type": "subscript_expression", "text": "m.matrix[3]", "parent": 371, "children": [373, 376], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 20}}, {"id": 373, "type": "field_expression", "text": "m.matrix", "parent": 372, "children": [374, 375], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 17}}, {"id": 374, "type": "identifier", "text": "m", "parent": 373, "children": [], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 10}}, {"id": 375, "type": "field_identifier", "text": "matrix", "parent": 373, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 17}}, {"id": 376, "type": "number_literal", "text": "3", "parent": 372, "children": [], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 19}}, {"id": 377, "type": "number_literal", "text": "1", "parent": 371, "children": [], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 22}}, {"id": 378, "type": "+", "text": "+", "parent": 351, "children": [], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 25}}, {"id": 379, "type": "binary_expression", "text": "v.z * m.matrix[3][2]", "parent": 351, "children": [380, 383, 384], "start_point": {"row": 62, "column": 3}, "end_point": {"row": 62, "column": 23}}, {"id": 380, "type": "field_expression", "text": "v.z", "parent": 379, "children": [381, 382], "start_point": {"row": 62, "column": 3}, "end_point": {"row": 62, "column": 6}}, {"id": 381, "type": "identifier", "text": "v", "parent": 380, "children": [], "start_point": {"row": 62, "column": 3}, "end_point": {"row": 62, "column": 4}}, {"id": 382, "type": "field_identifier", "text": "z", "parent": 380, "children": [], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 6}}, {"id": 383, "type": "*", "text": "*", "parent": 379, "children": [], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 8}}, {"id": 384, "type": "subscript_expression", "text": "m.matrix[3][2]", "parent": 379, "children": [385, 390], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 23}}, {"id": 385, "type": "subscript_expression", "text": "m.matrix[3]", "parent": 384, "children": [386, 389], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 20}}, {"id": 386, "type": "field_expression", "text": "m.matrix", "parent": 385, "children": [387, 388], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 17}}, {"id": 387, "type": "identifier", "text": "m", "parent": 386, "children": [], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 10}}, {"id": 388, "type": "field_identifier", "text": "matrix", "parent": 386, "children": [], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 17}}, {"id": 389, "type": "number_literal", "text": "3", "parent": 385, "children": [], "start_point": {"row": 62, "column": 18}, "end_point": {"row": 62, "column": 19}}, {"id": 390, "type": "number_literal", "text": "2", "parent": 384, "children": [], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 22}}, {"id": 391, "type": "+", "text": "+", "parent": 350, "children": [], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 25}}, {"id": 392, "type": "binary_expression", "text": "v.w * m.matrix[3][3]", "parent": 350, "children": [393, 396, 397], "start_point": {"row": 63, "column": 3}, "end_point": {"row": 63, "column": 23}}, {"id": 393, "type": "field_expression", "text": "v.w", "parent": 392, "children": [394, 395], "start_point": {"row": 63, "column": 3}, "end_point": {"row": 63, "column": 6}}, {"id": 394, "type": "identifier", "text": "v", "parent": 393, "children": [], "start_point": {"row": 63, "column": 3}, "end_point": {"row": 63, "column": 4}}, {"id": 395, "type": "field_identifier", "text": "w", "parent": 393, "children": [], "start_point": {"row": 63, "column": 5}, "end_point": {"row": 63, "column": 6}}, {"id": 396, "type": "*", "text": "*", "parent": 392, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 8}}, {"id": 397, "type": "subscript_expression", "text": "m.matrix[3][3]", "parent": 392, "children": [398, 403], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 23}}, {"id": 398, "type": "subscript_expression", "text": "m.matrix[3]", "parent": 397, "children": [399, 402], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 20}}, {"id": 399, "type": "field_expression", "text": "m.matrix", "parent": 398, "children": [400, 401], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 17}}, {"id": 400, "type": "identifier", "text": "m", "parent": 399, "children": [], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 10}}, {"id": 401, "type": "field_identifier", "text": "matrix", "parent": 399, "children": [], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 17}}, {"id": 402, "type": "number_literal", "text": "3", "parent": 398, "children": [], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 19}}, {"id": 403, "type": "number_literal", "text": "3", "parent": 397, "children": [], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 22}}, {"id": 404, "type": "return_statement", "text": "return (res);", "parent": 154, "children": [405], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 14}}, {"id": 405, "type": "parenthesized_expression", "text": "(res)", "parent": 404, "children": [406], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 13}}, {"id": 406, "type": "identifier", "text": "res", "parent": 405, "children": [], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 12}}]}, "node_categories": {"declarations": {"functions": [3, 5, 18, 20, 59, 61, 100, 102, 154, 156], "variables": [8, 23, 26, 29, 32, 64, 105, 108, 111, 159, 162, 165], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [12, 13, 38, 45, 50, 51, 54, 68, 69, 72, 73, 74, 75, 79, 83, 84, 88, 92, 93, 97, 114, 117, 118, 119, 123, 127, 130, 131, 132, 136, 140, 143, 144, 145, 149, 153, 169, 173, 174, 175, 176, 177, 181, 182, 183, 189, 190, 194, 195, 196, 202, 203, 207, 208, 209, 215, 216, 220, 221, 222, 228, 232, 233, 234, 235, 236, 240, 241, 242, 248, 249, 253, 254, 255, 261, 262, 266, 267, 268, 274, 275, 279, 280, 281, 287, 291, 292, 293, 294, 295, 299, 300, 301, 307, 308, 312, 313, 314, 320, 321, 325, 326, 327, 333, 334, 338, 339, 340, 346, 350, 351, 352, 353, 354, 358, 359, 360, 366, 367, 371, 372, 373, 379, 380, 384, 385, 386, 392, 393, 397, 398, 399, 405], "assignments": [35, 42, 113, 126, 139, 168, 227, 286, 345], "loops": [], "conditionals": [4, 6, 9, 10, 14, 16, 21, 24, 25, 27, 28, 30, 31, 33, 34, 36, 39, 41, 43, 46, 48, 52, 55, 57, 58, 62, 65, 66, 70, 76, 77, 80, 81, 85, 86, 89, 90, 94, 95, 98, 99, 101, 103, 106, 107, 109, 110, 112, 115, 120, 121, 124, 125, 128, 133, 134, 137, 138, 141, 146, 147, 150, 151, 155, 157, 160, 161, 163, 164, 166, 167, 170, 171, 178, 179, 184, 185, 191, 192, 197, 198, 204, 205, 210, 211, 217, 218, 223, 224, 229, 230, 237, 238, 243, 244, 250, 251, 256, 257, 263, 264, 269, 270, 276, 277, 282, 283, 288, 289, 296, 297, 302, 303, 309, 310, 315, 316, 322, 323, 328, 329, 335, 336, 341, 342, 347, 348, 355, 356, 361, 362, 368, 369, 374, 375, 381, 382, 387, 388, 394, 395, 400, 401, 406], "returns": [11, 49, 67, 152, 404], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 17, 186, 187, 199, 200, 212, 213, 225, 226, 245, 246, 258, 259, 271, 272, 284, 285, 304, 305, 317, 318, 330, 331, 343, 344, 363, 364, 376, 377, 389, 390, 402, 403], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "unknown", "text_snippet": "t_vec3\t\t\tft_vec3_neg(t_vec3 v)\n{\n\treturn (ft_vec3_scalar_multiply(v, -1));\n}"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "ft_vec3_neg(t_vec3 v)"}, {"node_id": 18, "universal_type": "function", "name": "unknown", "text_snippet": "double\t\t\tft_vec3_angle(t_vec3 a, t_vec3 b)\n{\n\tt_vec3\t\tv1;\n\tt_vec3\t\tv2;\n\n\tv1 = ft_vec3_normalize(a);\n"}, {"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "ft_vec3_angle(t_vec3 a, t_vec3 b)"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "double\t\t\tft_vec3_length(t_vec3 v1)\n{\n\treturn (sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z));\n}"}, {"node_id": 61, "universal_type": "function", "name": "unknown", "text_snippet": "ft_vec3_length(t_vec3 v1)"}, {"node_id": 100, "universal_type": "function", "name": "unknown", "text_snippet": "t_vec3\t\t\tft_vec3_sum_poin3(t_vec3 a, t_point3 b)\n{\n\tt_vec3\t\tnew;\n\n\tnew.x = (a.x + b.x);\n\tnew.y = (a."}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "ft_vec3_sum_poin3(t_vec3 a, t_point3 b)"}, {"node_id": 154, "universal_type": "function", "name": "unknown", "text_snippet": "t_vec3\t\t\tft_vec3_multiply_matrix(t_vec3 v, t_mat4 m)\n{\n\tt_vec3\t\tres;\n\n\tres.x = v.x * m.matrix[0][0] "}, {"node_id": 156, "universal_type": "function", "name": "unknown", "text_snippet": "ft_vec3_multiply_matrix(t_vec3 v, t_mat4 m)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"rtv1.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/* ************************************************************************** */\n/* */\n/* ::: :::::::: */\n/* vectors.c :+: :+: :+: */\n/* +:+ +:+ +:+ */\n/* By: odale-dr <<EMAIL>> +#+ +:+ +#+ */\n/* +#+#+#+#+#+ +#+ */\n/* Created: 2019/06/04 20:23:19 by jblack-b #+# #+# */\n/* Updated: 2019/09/25 19:29:34 by odale-dr ### ########.fr */\n/* */\n/* ************************************************************************** */\n\n#include \"rtv1.h\"\n\nt_vec3\t\t\tft_vec3_neg(t_vec3 v)\n{\n\treturn (ft_vec3_scalar_multiply(v, -1));\n}\n\ndouble\t\t\tft_vec3_angle(t_vec3 a, t_vec3 b)\n{\n\tt_vec3\t\tv1;\n\tt_vec3\t\tv2;\n\n\tv1 = ft_vec3_normalize(a);\n\tv2 = ft_vec3_normalize(b);\n\treturn (acos(ft_vec3_dot_multiply(v1, v2)));\n}\n\ndouble\t\t\tft_vec3_length(t_vec3 v1)\n{\n\treturn (sqrt(v1.x * v1.x + v1.y * v1.y + v1.z * v1.z));\n}\n\nt_vec3\t\t\tft_vec3_sum_poin3(t_vec3 a, t_point3 b)\n{\n\tt_vec3\t\tnew;\n\n\tnew.x = (a.x + b.x);\n\tnew.y = (a.y + b.y);\n\tnew.z = (a.z + b.z);\n\treturn (new);\n}\n\nt_vec3\t\t\tft_vec3_multiply_matrix(t_vec3 v, t_mat4 m)\n{\n\tt_vec3\t\tres;\n\n\tres.x = v.x * m.matrix[0][0] +\n\t\t\tv.y * m.matrix[0][1] +\n\t\t\tv.z * m.matrix[0][2] +\n\t\t\tv.w * m.matrix[0][3];\n\tres.y = v.x * m.matrix[1][0] +\n\t\t\tv.y * m.matrix[1][1] +\n\t\t\tv.z * m.matrix[1][2] +\n\t\t\tv.w * m.matrix[1][3];\n\tres.z = v.x * m.matrix[2][0] +\n\t\t\tv.y * m.matrix[2][1] +\n\t\t\tv.z * m.matrix[2][2] +\n\t\t\tv.w * m.matrix[2][3];\n\tres.w = v.x * m.matrix[3][0] +\n\t\t\tv.y * m.matrix[3][1] +\n\t\t\tv.z * m.matrix[3][2] +\n\t\t\tv.w * m.matrix[3][3];\n\treturn (res);\n}\n"}
24
c
// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See License.txt in the repo root for license information. // ------------------------------------------------------------ #pragma once namespace Reliability { namespace FailoverManagerComponent { namespace UpgradeDomainSortPolicy { enum Enum { Lexicographical = 0, DigitsAsNumbers = 1, LastValidEnum = DigitsAsNumbers }; void WriteToTextWriter(Common::TextWriter & w, Enum const& value); DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy); }; } }
33.64
22
(translation_unit) "// ------------------------------------------------------------\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.\n// ------------------------------------------------------------\n\n#pragma once\n\nnamespace Reliability\n{\n namespace FailoverManagerComponent\n {\n namespace UpgradeDomainSortPolicy\n {\n enum Enum\n {\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n };\n\n void WriteToTextWriter(Common::TextWriter & w, Enum const& value);\n\n DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy);\n };\n }\n}\n" (comment) "// ------------------------------------------------------------" (comment) "// Copyright (c) Microsoft Corporation. All rights reserved." (comment) "// Licensed under the MIT License (MIT). See License.txt in the repo root for license information." (comment) "// ------------------------------------------------------------" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (function_definition) "namespace Reliability\n{\n namespace FailoverManagerComponent\n {\n namespace UpgradeDomainSortPolicy\n {\n enum Enum\n {\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n };\n\n void WriteToTextWriter(Common::TextWriter & w, Enum const& value);\n\n DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy);\n };\n }\n}" (type_identifier) "namespace" (identifier) "Reliability" (compound_statement) "{\n namespace FailoverManagerComponent\n {\n namespace UpgradeDomainSortPolicy\n {\n enum Enum\n {\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n };\n\n void WriteToTextWriter(Common::TextWriter & w, Enum const& value);\n\n DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy);\n };\n }\n}" ({) "{" (function_definition) "namespace FailoverManagerComponent\n {\n namespace UpgradeDomainSortPolicy\n {\n enum Enum\n {\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n };\n\n void WriteToTextWriter(Common::TextWriter & w, Enum const& value);\n\n DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy);\n };\n }" (type_identifier) "namespace" (identifier) "FailoverManagerComponent" (compound_statement) "{\n namespace UpgradeDomainSortPolicy\n {\n enum Enum\n {\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n };\n\n void WriteToTextWriter(Common::TextWriter & w, Enum const& value);\n\n DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy);\n };\n }" ({) "{" (function_definition) "namespace UpgradeDomainSortPolicy\n {\n enum Enum\n {\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n };\n\n void WriteToTextWriter(Common::TextWriter & w, Enum const& value);\n\n DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy);\n }" (type_identifier) "namespace" (identifier) "UpgradeDomainSortPolicy" (compound_statement) "{\n enum Enum\n {\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n };\n\n void WriteToTextWriter(Common::TextWriter & w, Enum const& value);\n\n DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy);\n }" ({) "{" (enum_specifier) "enum Enum\n {\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n }" (enum) "enum" (type_identifier) "Enum" (enumerator_list) "{\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n }" ({) "{" (enumerator) "Lexicographical = 0" (identifier) "Lexicographical" (=) "=" (number_literal) "0" (,) "," (enumerator) "DigitsAsNumbers = 1" (identifier) "DigitsAsNumbers" (=) "=" (number_literal) "1" (,) "," (enumerator) "LastValidEnum = DigitsAsNumbers" (identifier) "LastValidEnum" (=) "=" (identifier) "DigitsAsNumbers" (}) "}" (;) ";" (declaration) "void WriteToTextWriter(Common::TextWriter & w, Enum const& value);" (primitive_type) "void" (function_declarator) "WriteToTextWriter(Common::TextWriter & w, Enum const& value)" (identifier) "WriteToTextWriter" (parameter_list) "(Common::TextWriter & w, Enum const& value)" (() "(" (parameter_declaration) "Common::TextWriter & w" (type_identifier) "Common" (ERROR) "::TextWriter &" (:) ":" (:) ":" (identifier) "TextWriter" (&) "&" (identifier) "w" (,) "," (parameter_declaration) "Enum const& value" (type_identifier) "Enum" (type_qualifier) "const" (const) "const" (ERROR) "&" (&) "&" (identifier) "value" ()) ")" (;) ";" (expression_statement) "DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy);" (call_expression) "DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy)" (identifier) "DECLARE_ENUM_STRUCTURED_TRACE" (argument_list) "(UpgradeDomainSortPolicy)" (() "(" (identifier) "UpgradeDomainSortPolicy" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (}) "}"
81
2
{"language": "c", "success": true, "metadata": {"lines": 22, "avg_line_length": 33.64, "nodes": 45, "errors": 0, "source_hash": "513aa33d9301a1657c8fa760ef476177f07a37432c31c15917a69fafc2aa0ae3", "categorized_nodes": 36}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 12}}, {"id": 3, "type": "function_definition", "text": "namespace Reliability\n{\n namespace FailoverManagerComponent\n {\n namespace UpgradeDomainSortPolicy\n {\n enum Enum\n {\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n };\n\n void WriteToTextWriter(Common::TextWriter & w, Enum const& value);\n\n DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy);\n };\n }\n}", "parent": null, "children": [4, 5], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 4, "type": "type_identifier", "text": "namespace", "parent": 3, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 9}}, {"id": 5, "type": "identifier", "text": "Reliability", "parent": 3, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 21}}, {"id": 6, "type": "function_definition", "text": "namespace FailoverManagerComponent\n {\n namespace UpgradeDomainSortPolicy\n {\n enum Enum\n {\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n };\n\n void WriteToTextWriter(Common::TextWriter & w, Enum const& value);\n\n DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy);\n };\n }", "parent": 3, "children": [7, 8], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 24, "column": 5}}, {"id": 7, "type": "type_identifier", "text": "namespace", "parent": 6, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 13}}, {"id": 8, "type": "identifier", "text": "FailoverManagerComponent", "parent": 6, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 38}}, {"id": 9, "type": "function_definition", "text": "namespace UpgradeDomainSortPolicy\n {\n enum Enum\n {\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n };\n\n void WriteToTextWriter(Common::TextWriter & w, Enum const& value);\n\n DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy);\n }", "parent": 6, "children": [10, 11], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 23, "column": 9}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 17}}, {"id": 11, "type": "identifier", "text": "UpgradeDomainSortPolicy", "parent": 9, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 41}}, {"id": 12, "type": "enum_specifier", "text": "enum Enum\n {\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n }", "parent": 9, "children": [13, 14, 15], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 18, "column": 13}}, {"id": 13, "type": "enum", "text": "enum", "parent": 12, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 16}}, {"id": 14, "type": "type_identifier", "text": "Enum", "parent": 12, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 21}}, {"id": 15, "type": "enumerator_list", "text": "{\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n }", "parent": 12, "children": [16, 20, 24], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 18, "column": 13}}, {"id": 16, "type": "enumerator", "text": "Lexicographical = 0", "parent": 15, "children": [17, 18, 19], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 35}}, {"id": 17, "type": "identifier", "text": "Lexicographical", "parent": 16, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 31}}, {"id": 18, "type": "=", "text": "=", "parent": 16, "children": [], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 33}}, {"id": 19, "type": "number_literal", "text": "0", "parent": 16, "children": [], "start_point": {"row": 15, "column": 34}, "end_point": {"row": 15, "column": 35}}, {"id": 20, "type": "enumerator", "text": "DigitsAsNumbers = 1", "parent": 15, "children": [21, 22, 23], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 35}}, {"id": 21, "type": "identifier", "text": "DigitsAsNumbers", "parent": 20, "children": [], "start_point": {"row": 16, "column": 16}, "end_point": {"row": 16, "column": 31}}, {"id": 22, "type": "=", "text": "=", "parent": 20, "children": [], "start_point": {"row": 16, "column": 32}, "end_point": {"row": 16, "column": 33}}, {"id": 23, "type": "number_literal", "text": "1", "parent": 20, "children": [], "start_point": {"row": 16, "column": 34}, "end_point": {"row": 16, "column": 35}}, {"id": 24, "type": "enumerator", "text": "LastValidEnum = DigitsAsNumbers", "parent": 15, "children": [25, 26, 27], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 47}}, {"id": 25, "type": "identifier", "text": "LastValidEnum", "parent": 24, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 29}}, {"id": 26, "type": "=", "text": "=", "parent": 24, "children": [], "start_point": {"row": 17, "column": 30}, "end_point": {"row": 17, "column": 31}}, {"id": 27, "type": "identifier", "text": "DigitsAsNumbers", "parent": 24, "children": [], "start_point": {"row": 17, "column": 32}, "end_point": {"row": 17, "column": 47}}, {"id": 28, "type": "declaration", "text": "void WriteToTextWriter(Common::TextWriter & w, Enum const& value);", "parent": 9, "children": [29, 30], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 78}}, {"id": 29, "type": "primitive_type", "text": "void", "parent": 28, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 16}}, {"id": 30, "type": "function_declarator", "text": "WriteToTextWriter(Common::TextWriter & w, Enum const& value)", "parent": 28, "children": [31, 32], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 77}}, {"id": 31, "type": "identifier", "text": "WriteToTextWriter", "parent": 30, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 34}}, {"id": 32, "type": "parameter_list", "text": "(Common::TextWriter & w, Enum const& value)", "parent": 30, "children": [33, 38], "start_point": {"row": 20, "column": 34}, "end_point": {"row": 20, "column": 77}}, {"id": 33, "type": "parameter_declaration", "text": "Common::TextWriter & w", "parent": 32, "children": [34, 35, 37], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 57}}, {"id": 34, "type": "type_identifier", "text": "Common", "parent": 33, "children": [], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 41}}, {"id": 35, "type": "ERROR", "text": "::TextWriter &", "parent": 33, "children": [36], "start_point": {"row": 20, "column": 41}, "end_point": {"row": 20, "column": 55}}, {"id": 36, "type": "identifier", "text": "TextWriter", "parent": 35, "children": [], "start_point": {"row": 20, "column": 43}, "end_point": {"row": 20, "column": 53}}, {"id": 37, "type": "identifier", "text": "w", "parent": 33, "children": [], "start_point": {"row": 20, "column": 56}, "end_point": {"row": 20, "column": 57}}, {"id": 38, "type": "parameter_declaration", "text": "Enum const& value", "parent": 32, "children": [39, 40], "start_point": {"row": 20, "column": 59}, "end_point": {"row": 20, "column": 76}}, {"id": 39, "type": "type_identifier", "text": "Enum", "parent": 38, "children": [], "start_point": {"row": 20, "column": 59}, "end_point": {"row": 20, "column": 63}}, {"id": 40, "type": "identifier", "text": "value", "parent": 38, "children": [], "start_point": {"row": 20, "column": 71}, "end_point": {"row": 20, "column": 76}}, {"id": 41, "type": "call_expression", "text": "DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy)", "parent": 9, "children": [42, 43], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 66}}, {"id": 42, "type": "identifier", "text": "DECLARE_ENUM_STRUCTURED_TRACE", "parent": 41, "children": [], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 41}}, {"id": 43, "type": "argument_list", "text": "(UpgradeDomainSortPolicy)", "parent": 41, "children": [44], "start_point": {"row": 22, "column": 41}, "end_point": {"row": 22, "column": 66}}, {"id": 44, "type": "identifier", "text": "UpgradeDomainSortPolicy", "parent": 43, "children": [], "start_point": {"row": 22, "column": 42}, "end_point": {"row": 22, "column": 65}}]}, "node_categories": {"declarations": {"functions": [3, 6, 9, 30], "variables": [28, 33, 38], "classes": [], "imports": [], "modules": [], "enums": [12, 13, 15, 16, 20, 24]}, "statements": {"expressions": [41], "assignments": [], "loops": [], "conditionals": [4, 5, 7, 8, 10, 11, 14, 17, 21, 25, 27, 31, 34, 36, 37, 39, 40, 42, 44], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [19, 23], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 3, "universal_type": "function", "name": "WriteToTextWriter", "text_snippet": "namespace Reliability\n{\n namespace FailoverManagerComponent\n {\n namespace UpgradeDomain"}, {"node_id": 6, "universal_type": "function", "name": "WriteToTextWriter", "text_snippet": "namespace FailoverManagerComponent\n {\n namespace UpgradeDomainSortPolicy\n {\n "}, {"node_id": 9, "universal_type": "function", "name": "WriteToTextWriter", "text_snippet": "namespace UpgradeDomainSortPolicy\n {\n enum Enum\n {\n Lexi"}, {"node_id": 30, "universal_type": "function", "name": "unknown", "text_snippet": "WriteToTextWriter(Common::TextWriter & w, Enum const& value)"}], "class_declarations": [], "import_statements": []}, "original_source_code": "// ------------------------------------------------------------\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.\n// ------------------------------------------------------------\n\n#pragma once\n\nnamespace Reliability\n{\n namespace FailoverManagerComponent\n {\n namespace UpgradeDomainSortPolicy\n {\n enum Enum\n {\n Lexicographical = 0,\n DigitsAsNumbers = 1,\n LastValidEnum = DigitsAsNumbers\n };\n\n void WriteToTextWriter(Common::TextWriter & w, Enum const& value);\n\n DECLARE_ENUM_STRUCTURED_TRACE(UpgradeDomainSortPolicy);\n };\n }\n}\n"}
25
c
#include <stdio.h> #include <stdlib.h> int main(int argc, char ** argv) { double mul = 1; for (int i = 0; i < argc - 1; ++i) { mul *= atof(argv[i + 1]); } printf("%.15g\n", mul); return 0; }
18.8
10
(translation_unit) "#include <stdio.h>\n#include <stdlib.h>\n\nint main(int argc, char ** argv) {\n double mul = 1;\n for (int i = 0; i < argc - 1; ++i) {\n mul *= atof(argv[i + 1]);\n }\n\n printf("%.15g\n", mul);\n\n return 0;\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>" (function_definition) "int main(int argc, char ** argv) {\n double mul = 1;\n for (int i = 0; i < argc - 1; ++i) {\n mul *= atof(argv[i + 1]);\n }\n\n printf("%.15g\n", mul);\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "main(int argc, char ** argv)" (identifier) "main" (parameter_list) "(int argc, char ** argv)" (() "(" (parameter_declaration) "int argc" (primitive_type) "int" (identifier) "argc" (,) "," (parameter_declaration) "char ** argv" (primitive_type) "char" (pointer_declarator) "** argv" (*) "*" (pointer_declarator) "* argv" (*) "*" (identifier) "argv" ()) ")" (compound_statement) "{\n double mul = 1;\n for (int i = 0; i < argc - 1; ++i) {\n mul *= atof(argv[i + 1]);\n }\n\n printf("%.15g\n", mul);\n\n return 0;\n}" ({) "{" (declaration) "double mul = 1;" (primitive_type) "double" (init_declarator) "mul = 1" (identifier) "mul" (=) "=" (number_literal) "1" (;) ";" (for_statement) "for (int i = 0; i < argc - 1; ++i) {\n mul *= atof(argv[i + 1]);\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < argc - 1" (identifier) "i" (<) "<" (binary_expression) "argc - 1" (identifier) "argc" (-) "-" (number_literal) "1" (;) ";" (update_expression) "++i" (++) "++" (identifier) "i" ()) ")" (compound_statement) "{\n mul *= atof(argv[i + 1]);\n }" ({) "{" (expression_statement) "mul *= atof(argv[i + 1]);" (assignment_expression) "mul *= atof(argv[i + 1])" (identifier) "mul" (*=) "*=" (call_expression) "atof(argv[i + 1])" (identifier) "atof" (argument_list) "(argv[i + 1])" (() "(" (subscript_expression) "argv[i + 1]" (identifier) "argv" ([) "[" (binary_expression) "i + 1" (identifier) "i" (+) "+" (number_literal) "1" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "printf("%.15g\n", mul);" (call_expression) "printf("%.15g\n", mul)" (identifier) "printf" (argument_list) "("%.15g\n", mul)" (() "(" (string_literal) ""%.15g\n"" (") """ (string_content) "%.15g" (escape_sequence) "\n" (") """ (,) "," (identifier) "mul" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
96
0
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 18.8, "nodes": 64, "errors": 0, "source_hash": "7d59115429c9f80c5214f31ec562088c6165b7c36cd66e910434cc135b442888", "categorized_nodes": 42}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "function_definition", "text": "int main(int argc, char ** argv) {\n\tdouble mul = 1;\n\tfor (int i = 0; i < argc - 1; ++i) {\n\t\tmul *= atof(argv[i + 1]);\n\t}\n\n\tprintf(\"%.15g\\n\", mul);\n\n\treturn 0;\n}", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 7, "type": "primitive_type", "text": "int", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 3}}, {"id": 8, "type": "function_declarator", "text": "main(int argc, char ** argv)", "parent": 6, "children": [9, 10], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 32}}, {"id": 9, "type": "identifier", "text": "main", "parent": 8, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 8}}, {"id": 10, "type": "parameter_list", "text": "(int argc, char ** argv)", "parent": 8, "children": [11, 14], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 32}}, {"id": 11, "type": "parameter_declaration", "text": "int argc", "parent": 10, "children": [12, 13], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 17}}, {"id": 12, "type": "primitive_type", "text": "int", "parent": 11, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 12}}, {"id": 13, "type": "identifier", "text": "argc", "parent": 11, "children": [], "start_point": {"row": 3, "column": 13}, "end_point": {"row": 3, "column": 17}}, {"id": 14, "type": "parameter_declaration", "text": "char ** argv", "parent": 10, "children": [15, 16], "start_point": {"row": 3, "column": 19}, "end_point": {"row": 3, "column": 31}}, {"id": 15, "type": "primitive_type", "text": "char", "parent": 14, "children": [], "start_point": {"row": 3, "column": 19}, "end_point": {"row": 3, "column": 23}}, {"id": 16, "type": "pointer_declarator", "text": "** argv", "parent": 14, "children": [17, 18], "start_point": {"row": 3, "column": 24}, "end_point": {"row": 3, "column": 31}}, {"id": 17, "type": "*", "text": "*", "parent": 16, "children": [], "start_point": {"row": 3, "column": 24}, "end_point": {"row": 3, "column": 25}}, {"id": 18, "type": "pointer_declarator", "text": "* argv", "parent": 16, "children": [19, 20], "start_point": {"row": 3, "column": 25}, "end_point": {"row": 3, "column": 31}}, {"id": 19, "type": "*", "text": "*", "parent": 18, "children": [], "start_point": {"row": 3, "column": 25}, "end_point": {"row": 3, "column": 26}}, {"id": 20, "type": "identifier", "text": "argv", "parent": 18, "children": [], "start_point": {"row": 3, "column": 27}, "end_point": {"row": 3, "column": 31}}, {"id": 21, "type": "declaration", "text": "double mul = 1;", "parent": 6, "children": [22, 23], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 16}}, {"id": 22, "type": "primitive_type", "text": "double", "parent": 21, "children": [], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 7}}, {"id": 23, "type": "init_declarator", "text": "mul = 1", "parent": 21, "children": [24, 25, 26], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 15}}, {"id": 24, "type": "identifier", "text": "mul", "parent": 23, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 11}}, {"id": 25, "type": "=", "text": "=", "parent": 23, "children": [], "start_point": {"row": 4, "column": 12}, "end_point": {"row": 4, "column": 13}}, {"id": 26, "type": "number_literal", "text": "1", "parent": 23, "children": [], "start_point": {"row": 4, "column": 14}, "end_point": {"row": 4, "column": 15}}, {"id": 27, "type": "for_statement", "text": "for (int i = 0; i < argc - 1; ++i) {\n\t\tmul *= atof(argv[i + 1]);\n\t}", "parent": 6, "children": [28, 34, 41], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 7, "column": 2}}, {"id": 28, "type": "declaration", "text": "int i = 0;", "parent": 27, "children": [29, 30], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 16}}, {"id": 29, "type": "primitive_type", "text": "int", "parent": 28, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 9}}, {"id": 30, "type": "init_declarator", "text": "i = 0", "parent": 28, "children": [31, 32, 33], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 15}}, {"id": 31, "type": "identifier", "text": "i", "parent": 30, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 11}}, {"id": 32, "type": "=", "text": "=", "parent": 30, "children": [], "start_point": {"row": 5, "column": 12}, "end_point": {"row": 5, "column": 13}}, {"id": 33, "type": "number_literal", "text": "0", "parent": 30, "children": [], "start_point": {"row": 5, "column": 14}, "end_point": {"row": 5, "column": 15}}, {"id": 34, "type": "binary_expression", "text": "i < argc - 1", "parent": 27, "children": [35, 36, 37], "start_point": {"row": 5, "column": 17}, "end_point": {"row": 5, "column": 29}}, {"id": 35, "type": "identifier", "text": "i", "parent": 34, "children": [], "start_point": {"row": 5, "column": 17}, "end_point": {"row": 5, "column": 18}}, {"id": 36, "type": "<", "text": "<", "parent": 34, "children": [], "start_point": {"row": 5, "column": 19}, "end_point": {"row": 5, "column": 20}}, {"id": 37, "type": "binary_expression", "text": "argc - 1", "parent": 34, "children": [38, 39, 40], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 29}}, {"id": 38, "type": "identifier", "text": "argc", "parent": 37, "children": [], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 25}}, {"id": 39, "type": "-", "text": "-", "parent": 37, "children": [], "start_point": {"row": 5, "column": 26}, "end_point": {"row": 5, "column": 27}}, {"id": 40, "type": "number_literal", "text": "1", "parent": 37, "children": [], "start_point": {"row": 5, "column": 28}, "end_point": {"row": 5, "column": 29}}, {"id": 41, "type": "update_expression", "text": "++i", "parent": 27, "children": [42, 43], "start_point": {"row": 5, "column": 31}, "end_point": {"row": 5, "column": 34}}, {"id": 42, "type": "++", "text": "++", "parent": 41, "children": [], "start_point": {"row": 5, "column": 31}, "end_point": {"row": 5, "column": 33}}, {"id": 43, "type": "identifier", "text": "i", "parent": 41, "children": [], "start_point": {"row": 5, "column": 33}, "end_point": {"row": 5, "column": 34}}, {"id": 44, "type": "assignment_expression", "text": "mul *= atof(argv[i + 1])", "parent": 27, "children": [45, 46, 47], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 26}}, {"id": 45, "type": "identifier", "text": "mul", "parent": 44, "children": [], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 5}}, {"id": 46, "type": "*=", "text": "*=", "parent": 44, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 8}}, {"id": 47, "type": "call_expression", "text": "atof(argv[i + 1])", "parent": 44, "children": [48, 49], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 26}}, {"id": 48, "type": "identifier", "text": "atof", "parent": 47, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 13}}, {"id": 49, "type": "argument_list", "text": "(argv[i + 1])", "parent": 47, "children": [50], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 26}}, {"id": 50, "type": "subscript_expression", "text": "argv[i + 1]", "parent": 49, "children": [51, 52], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 25}}, {"id": 51, "type": "identifier", "text": "argv", "parent": 50, "children": [], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 18}}, {"id": 52, "type": "binary_expression", "text": "i + 1", "parent": 50, "children": [53, 54, 55], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 24}}, {"id": 53, "type": "identifier", "text": "i", "parent": 52, "children": [], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 20}}, {"id": 54, "type": "+", "text": "+", "parent": 52, "children": [], "start_point": {"row": 6, "column": 21}, "end_point": {"row": 6, "column": 22}}, {"id": 55, "type": "number_literal", "text": "1", "parent": 52, "children": [], "start_point": {"row": 6, "column": 23}, "end_point": {"row": 6, "column": 24}}, {"id": 56, "type": "call_expression", "text": "printf(\"%.15g\\n\", mul)", "parent": 6, "children": [57, 58], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 23}}, {"id": 57, "type": "identifier", "text": "printf", "parent": 56, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 7}}, {"id": 58, "type": "argument_list", "text": "(\"%.15g\\n\", mul)", "parent": 56, "children": [59, 61], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 23}}, {"id": 59, "type": "string_literal", "text": "\"%.15g\\n\"", "parent": 58, "children": [60], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 17}}, {"id": 60, "type": "escape_sequence", "text": "\\n", "parent": 59, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 16}}, {"id": 61, "type": "identifier", "text": "mul", "parent": 58, "children": [], "start_point": {"row": 9, "column": 19}, "end_point": {"row": 9, "column": 22}}, {"id": 62, "type": "return_statement", "text": "return 0;", "parent": 6, "children": [63], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 10}}, {"id": 63, "type": "number_literal", "text": "0", "parent": 62, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 9}}]}, "node_categories": {"declarations": {"functions": [6, 8], "variables": [11, 14, 21, 28], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [34, 37, 41, 47, 50, 52, 56], "assignments": [44], "loops": [27], "conditionals": [9, 13, 20, 24, 31, 35, 38, 43, 45, 48, 51, 53, 57, 61], "returns": [62], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 26, 33, 40, 55, 59, 63], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "main", "text_snippet": "int main(int argc, char ** argv) {\n\tdouble mul = 1;\n\tfor (int i = 0; i < argc - 1; ++i) {\n\t\tmul *= a"}, {"node_id": 8, "universal_type": "function", "name": "unknown", "text_snippet": "main(int argc, char ** argv)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdlib.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n#include <stdlib.h>\n\nint main(int argc, char ** argv) {\n\tdouble mul = 1;\n\tfor (int i = 0; i < argc - 1; ++i) {\n\t\tmul *= atof(argv[i + 1]);\n\t}\n\n\tprintf(\"%.15g\\n\", mul);\n\n\treturn 0;\n}\n"}
26
c
#ifndef OBJECT_H_4CRNBTM9 #define OBJECT_H_4CRNBTM9 #include <stdarg.h> #include <stdio.h> #include <stdlib.h> typedef struct Class_t { size_t size; void* (*Constructor)(void* self, va_list* valist); void* (*Destructor)(void* self); void* (*Clone)(const void* self); int (*Differ)(const void* self, const void* b); } Class; #endif /* end of include guard: OBJECT_H_4CRNBTM9 */
29.54
13
(translation_unit) "#ifndef OBJECT_H_4CRNBTM9\n#define OBJECT_H_4CRNBTM9\n\n#include <stdarg.h>\n#include <stdio.h>\n#include <stdlib.h>\n\ntypedef struct Class_t {\n size_t size;\n\n void* (*Constructor)(void* self, va_list* valist);\n void* (*Destructor)(void* self);\n void* (*Clone)(const void* self);\n int (*Differ)(const void* self, const void* b);\n} Class;\n\n#endif /* end of include guard: OBJECT_H_4CRNBTM9 */\n" (preproc_ifdef) "#ifndef OBJECT_H_4CRNBTM9\n#define OBJECT_H_4CRNBTM9\n\n#include <stdarg.h>\n#include <stdio.h>\n#include <stdlib.h>\n\ntypedef struct Class_t {\n size_t size;\n\n void* (*Constructor)(void* self, va_list* valist);\n void* (*Destructor)(void* self);\n void* (*Clone)(const void* self);\n int (*Differ)(const void* self, const void* b);\n} Class;\n\n#endif" (#ifndef) "#ifndef" (identifier) "OBJECT_H_4CRNBTM9" (preproc_def) "#define OBJECT_H_4CRNBTM9\n" (#define) "#define" (identifier) "OBJECT_H_4CRNBTM9" (preproc_include) "#include <stdarg.h>\n" (#include) "#include" (system_lib_string) "<stdarg.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>" (type_definition) "typedef struct Class_t {\n size_t size;\n\n void* (*Constructor)(void* self, va_list* valist);\n void* (*Destructor)(void* self);\n void* (*Clone)(const void* self);\n int (*Differ)(const void* self, const void* b);\n} Class;" (typedef) "typedef" (struct_specifier) "struct Class_t {\n size_t size;\n\n void* (*Constructor)(void* self, va_list* valist);\n void* (*Destructor)(void* self);\n void* (*Clone)(const void* self);\n int (*Differ)(const void* self, const void* b);\n}" (struct) "struct" (type_identifier) "Class_t" (field_declaration_list) "{\n size_t size;\n\n void* (*Constructor)(void* self, va_list* valist);\n void* (*Destructor)(void* self);\n void* (*Clone)(const void* self);\n int (*Differ)(const void* self, const void* b);\n}" ({) "{" (field_declaration) "size_t size;" (primitive_type) "size_t" (field_identifier) "size" (;) ";" (field_declaration) "void* (*Constructor)(void* self, va_list* valist);" (primitive_type) "void" (pointer_declarator) "* (*Constructor)(void* self, va_list* valist)" (*) "*" (function_declarator) "(*Constructor)(void* self, va_list* valist)" (parenthesized_declarator) "(*Constructor)" (() "(" (pointer_declarator) "*Constructor" (*) "*" (field_identifier) "Constructor" ()) ")" (parameter_list) "(void* self, va_list* valist)" (() "(" (parameter_declaration) "void* self" (primitive_type) "void" (pointer_declarator) "* self" (*) "*" (identifier) "self" (,) "," (parameter_declaration) "va_list* valist" (type_identifier) "va_list" (pointer_declarator) "* valist" (*) "*" (identifier) "valist" ()) ")" (;) ";" (field_declaration) "void* (*Destructor)(void* self);" (primitive_type) "void" (pointer_declarator) "* (*Destructor)(void* self)" (*) "*" (function_declarator) "(*Destructor)(void* self)" (parenthesized_declarator) "(*Destructor)" (() "(" (pointer_declarator) "*Destructor" (*) "*" (field_identifier) "Destructor" ()) ")" (parameter_list) "(void* self)" (() "(" (parameter_declaration) "void* self" (primitive_type) "void" (pointer_declarator) "* self" (*) "*" (identifier) "self" ()) ")" (;) ";" (field_declaration) "void* (*Clone)(const void* self);" (primitive_type) "void" (pointer_declarator) "* (*Clone)(const void* self)" (*) "*" (function_declarator) "(*Clone)(const void* self)" (parenthesized_declarator) "(*Clone)" (() "(" (pointer_declarator) "*Clone" (*) "*" (field_identifier) "Clone" ()) ")" (parameter_list) "(const void* self)" (() "(" (parameter_declaration) "const void* self" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "* self" (*) "*" (identifier) "self" ()) ")" (;) ";" (field_declaration) "int (*Differ)(const void* self, const void* b);" (primitive_type) "int" (function_declarator) "(*Differ)(const void* self, const void* b)" (parenthesized_declarator) "(*Differ)" (() "(" (pointer_declarator) "*Differ" (*) "*" (field_identifier) "Differ" ()) ")" (parameter_list) "(const void* self, const void* b)" (() "(" (parameter_declaration) "const void* self" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "* self" (*) "*" (identifier) "self" (,) "," (parameter_declaration) "const void* b" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "* b" (*) "*" (identifier) "b" ()) ")" (;) ";" (}) "}" (type_identifier) "Class" (;) ";" (#endif) "#endif" (comment) "/* end of include guard: OBJECT_H_4CRNBTM9 */"
128
0
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 29.54, "nodes": 93, "errors": 0, "source_hash": "e42cb117a7d0d95042faa4fd647e5756cb492f6deb24303832e1318955c8a307", "categorized_nodes": 46}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef OBJECT_H_4CRNBTM9\n#define OBJECT_H_4CRNBTM9\n\n#include <stdarg.h>\n#include <stdio.h>\n#include <stdlib.h>\n\ntypedef struct Class_t {\n size_t size;\n\n void* (*Constructor)(void* self, va_list* valist);\n void* (*Destructor)(void* self);\n void* (*Clone)(const void* self);\n int (*Differ)(const void* self, const void* b);\n} Class;\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 92], "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": "OBJECT_H_4CRNBTM9", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 25}}, {"id": 3, "type": "preproc_def", "text": "#define OBJECT_H_4CRNBTM9\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": "OBJECT_H_4CRNBTM9", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include <stdarg.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": "<stdarg.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include <stdio.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": "<stdio.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include <stdlib.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": "<stdlib.h>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 19}}, {"id": 15, "type": "type_definition", "text": "typedef struct Class_t {\n size_t size;\n\n void* (*Constructor)(void* self, va_list* valist);\n void* (*Destructor)(void* self);\n void* (*Clone)(const void* self);\n int (*Differ)(const void* self, const void* b);\n} Class;", "parent": 0, "children": [16, 17, 91], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 16, "type": "typedef", "text": "typedef", "parent": 15, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 17, "type": "struct_specifier", "text": "struct Class_t {\n size_t size;\n\n void* (*Constructor)(void* self, va_list* valist);\n void* (*Destructor)(void* self);\n void* (*Clone)(const void* self);\n int (*Differ)(const void* self, const void* b);\n}", "parent": 15, "children": [18, 19], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 14, "column": 1}}, {"id": 18, "type": "struct", "text": "struct", "parent": 17, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 14}}, {"id": 19, "type": "type_identifier", "text": "Class_t", "parent": 17, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 22}}, {"id": 20, "type": "field_declaration", "text": "size_t size;", "parent": 17, "children": [21, 22], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 16}}, {"id": 21, "type": "primitive_type", "text": "size_t", "parent": 20, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 10}}, {"id": 22, "type": "field_identifier", "text": "size", "parent": 20, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 15}}, {"id": 23, "type": "field_declaration", "text": "void* (*Constructor)(void* self, va_list* valist);", "parent": 17, "children": [24, 25], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 54}}, {"id": 24, "type": "primitive_type", "text": "void", "parent": 23, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 8}}, {"id": 25, "type": "pointer_declarator", "text": "* (*Constructor)(void* self, va_list* valist)", "parent": 23, "children": [26, 27], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 53}}, {"id": 26, "type": "*", "text": "*", "parent": 25, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 9}}, {"id": 27, "type": "function_declarator", "text": "(*Constructor)(void* self, va_list* valist)", "parent": 25, "children": [28, 32], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 53}}, {"id": 28, "type": "parenthesized_declarator", "text": "(*Constructor)", "parent": 27, "children": [29], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 24}}, {"id": 29, "type": "pointer_declarator", "text": "*Constructor", "parent": 28, "children": [30, 31], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 23}}, {"id": 30, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 12}}, {"id": 31, "type": "field_identifier", "text": "Constructor", "parent": 29, "children": [], "start_point": {"row": 10, "column": 12}, "end_point": {"row": 10, "column": 23}}, {"id": 32, "type": "parameter_list", "text": "(void* self, va_list* valist)", "parent": 27, "children": [33, 38], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 53}}, {"id": 33, "type": "parameter_declaration", "text": "void* self", "parent": 32, "children": [34, 35], "start_point": {"row": 10, "column": 25}, "end_point": {"row": 10, "column": 35}}, {"id": 34, "type": "primitive_type", "text": "void", "parent": 33, "children": [], "start_point": {"row": 10, "column": 25}, "end_point": {"row": 10, "column": 29}}, {"id": 35, "type": "pointer_declarator", "text": "* self", "parent": 33, "children": [36, 37], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 35}}, {"id": 36, "type": "*", "text": "*", "parent": 35, "children": [], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 30}}, {"id": 37, "type": "identifier", "text": "self", "parent": 35, "children": [], "start_point": {"row": 10, "column": 31}, "end_point": {"row": 10, "column": 35}}, {"id": 38, "type": "parameter_declaration", "text": "va_list* valist", "parent": 32, "children": [39, 40], "start_point": {"row": 10, "column": 37}, "end_point": {"row": 10, "column": 52}}, {"id": 39, "type": "type_identifier", "text": "va_list", "parent": 38, "children": [], "start_point": {"row": 10, "column": 37}, "end_point": {"row": 10, "column": 44}}, {"id": 40, "type": "pointer_declarator", "text": "* valist", "parent": 38, "children": [41, 42], "start_point": {"row": 10, "column": 44}, "end_point": {"row": 10, "column": 52}}, {"id": 41, "type": "*", "text": "*", "parent": 40, "children": [], "start_point": {"row": 10, "column": 44}, "end_point": {"row": 10, "column": 45}}, {"id": 42, "type": "identifier", "text": "valist", "parent": 40, "children": [], "start_point": {"row": 10, "column": 46}, "end_point": {"row": 10, "column": 52}}, {"id": 43, "type": "field_declaration", "text": "void* (*Destructor)(void* self);", "parent": 17, "children": [44, 45], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 36}}, {"id": 44, "type": "primitive_type", "text": "void", "parent": 43, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 8}}, {"id": 45, "type": "pointer_declarator", "text": "* (*Destructor)(void* self)", "parent": 43, "children": [46, 47], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 35}}, {"id": 46, "type": "*", "text": "*", "parent": 45, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 9}}, {"id": 47, "type": "function_declarator", "text": "(*Destructor)(void* self)", "parent": 45, "children": [48, 52], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 35}}, {"id": 48, "type": "parenthesized_declarator", "text": "(*Destructor)", "parent": 47, "children": [49], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 23}}, {"id": 49, "type": "pointer_declarator", "text": "*Destructor", "parent": 48, "children": [50, 51], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 22}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 12}}, {"id": 51, "type": "field_identifier", "text": "Destructor", "parent": 49, "children": [], "start_point": {"row": 11, "column": 12}, "end_point": {"row": 11, "column": 22}}, {"id": 52, "type": "parameter_list", "text": "(void* self)", "parent": 47, "children": [53], "start_point": {"row": 11, "column": 23}, "end_point": {"row": 11, "column": 35}}, {"id": 53, "type": "parameter_declaration", "text": "void* self", "parent": 52, "children": [54, 55], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 34}}, {"id": 54, "type": "primitive_type", "text": "void", "parent": 53, "children": [], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 28}}, {"id": 55, "type": "pointer_declarator", "text": "* self", "parent": 53, "children": [56, 57], "start_point": {"row": 11, "column": 28}, "end_point": {"row": 11, "column": 34}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 11, "column": 28}, "end_point": {"row": 11, "column": 29}}, {"id": 57, "type": "identifier", "text": "self", "parent": 55, "children": [], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 34}}, {"id": 58, "type": "field_declaration", "text": "void* (*Clone)(const void* self);", "parent": 17, "children": [59, 60], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 37}}, {"id": 59, "type": "primitive_type", "text": "void", "parent": 58, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 8}}, {"id": 60, "type": "pointer_declarator", "text": "* (*Clone)(const void* self)", "parent": 58, "children": [61, 62], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 36}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 9}}, {"id": 62, "type": "function_declarator", "text": "(*Clone)(const void* self)", "parent": 60, "children": [63, 67], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 36}}, {"id": 63, "type": "parenthesized_declarator", "text": "(*Clone)", "parent": 62, "children": [64], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 18}}, {"id": 64, "type": "pointer_declarator", "text": "*Clone", "parent": 63, "children": [65, 66], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 17}}, {"id": 65, "type": "*", "text": "*", "parent": 64, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 12}}, {"id": 66, "type": "field_identifier", "text": "Clone", "parent": 64, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 17}}, {"id": 67, "type": "parameter_list", "text": "(const void* self)", "parent": 62, "children": [68], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 36}}, {"id": 68, "type": "parameter_declaration", "text": "const void* self", "parent": 67, "children": [69, 70], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 35}}, {"id": 69, "type": "primitive_type", "text": "void", "parent": 68, "children": [], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 29}}, {"id": 70, "type": "pointer_declarator", "text": "* self", "parent": 68, "children": [71, 72], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 35}}, {"id": 71, "type": "*", "text": "*", "parent": 70, "children": [], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 30}}, {"id": 72, "type": "identifier", "text": "self", "parent": 70, "children": [], "start_point": {"row": 12, "column": 31}, "end_point": {"row": 12, "column": 35}}, {"id": 73, "type": "field_declaration", "text": "int (*Differ)(const void* self, const void* b);", "parent": 17, "children": [74, 75], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 51}}, {"id": 74, "type": "primitive_type", "text": "int", "parent": 73, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 7}}, {"id": 75, "type": "function_declarator", "text": "(*Differ)(const void* self, const void* b)", "parent": 73, "children": [76, 80], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 50}}, {"id": 76, "type": "parenthesized_declarator", "text": "(*Differ)", "parent": 75, "children": [77], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 17}}, {"id": 77, "type": "pointer_declarator", "text": "*Differ", "parent": 76, "children": [78, 79], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 16}}, {"id": 78, "type": "*", "text": "*", "parent": 77, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 10}}, {"id": 79, "type": "field_identifier", "text": "Differ", "parent": 77, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 16}}, {"id": 80, "type": "parameter_list", "text": "(const void* self, const void* b)", "parent": 75, "children": [81, 86], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 50}}, {"id": 81, "type": "parameter_declaration", "text": "const void* self", "parent": 80, "children": [82, 83], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 34}}, {"id": 82, "type": "primitive_type", "text": "void", "parent": 81, "children": [], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 28}}, {"id": 83, "type": "pointer_declarator", "text": "* self", "parent": 81, "children": [84, 85], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 34}}, {"id": 84, "type": "*", "text": "*", "parent": 83, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 29}}, {"id": 85, "type": "identifier", "text": "self", "parent": 83, "children": [], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 34}}, {"id": 86, "type": "parameter_declaration", "text": "const void* b", "parent": 80, "children": [87, 88], "start_point": {"row": 13, "column": 36}, "end_point": {"row": 13, "column": 49}}, {"id": 87, "type": "primitive_type", "text": "void", "parent": 86, "children": [], "start_point": {"row": 13, "column": 42}, "end_point": {"row": 13, "column": 46}}, {"id": 88, "type": "pointer_declarator", "text": "* b", "parent": 86, "children": [89, 90], "start_point": {"row": 13, "column": 46}, "end_point": {"row": 13, "column": 49}}, {"id": 89, "type": "*", "text": "*", "parent": 88, "children": [], "start_point": {"row": 13, "column": 46}, "end_point": {"row": 13, "column": 47}}, {"id": 90, "type": "identifier", "text": "b", "parent": 88, "children": [], "start_point": {"row": 13, "column": 48}, "end_point": {"row": 13, "column": 49}}, {"id": 91, "type": "type_identifier", "text": "Class", "parent": 15, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 7}}, {"id": 92, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}]}, "node_categories": {"declarations": {"functions": [27, 47, 62, 75], "variables": [15, 20, 23, 33, 38, 43, 53, 58, 68, 73, 81, 86], "classes": [17, 18], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 19, 22, 31, 37, 39, 42, 51, 57, 66, 72, 79, 85, 90, 91, 92], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 27, "universal_type": "function", "name": "unknown", "text_snippet": "(*Constructor)(void* self, va_list* valist)"}, {"node_id": 47, "universal_type": "function", "name": "unknown", "text_snippet": "(*Destructor)(void* self)"}, {"node_id": 62, "universal_type": "function", "name": "unknown", "text_snippet": "(*Clone)(const void* self)"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "(*Differ)(const void* self, const void* b)"}], "class_declarations": [{"node_id": 17, "universal_type": "class", "name": "Class_t", "text_snippet": "struct Class_t {\n size_t size;\n\n void* (*Constructor)(void* self, va_list* valist);\n void* "}, {"node_id": 18, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <stdarg.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 <stdlib.h>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#ifndef OBJECT_H_4CRNBTM9\n#define OBJECT_H_4CRNBTM9\n\n#include <stdarg.h>\n#include <stdio.h>\n#include <stdlib.h>\n\ntypedef struct Class_t {\n size_t size;\n\n void* (*Constructor)(void* self, va_list* valist);\n void* (*Destructor)(void* self);\n void* (*Clone)(const void* self);\n int (*Differ)(const void* self, const void* b);\n} Class;\n\n#endif /* end of include guard: OBJECT_H_4CRNBTM9 */\n"}
27
c
// // DS.h // Differential // // Created by <NAME> on 22/04/2017. // Copyright © 2017 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface DS : NSObject +(NSDictionary *)diffShadowAndClient:(NSArray *)client shadow:(NSArray *)shadow; +(NSDictionary *)diffWins:(NSArray *)wins andLoses:(NSArray *)loses; +(NSArray *)mergeInto:(NSArray *)into applyDiff:(NSDictionary *)diff; @end
30.23
13
(ERROR) "//\n// DS.h\n// Differential\n//\n// Created by <NAME> on 22/04/2017.\n// Copyright © 2017 <NAME>. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface DS : NSObject\n\n+(NSDictionary *)diffShadowAndClient:(NSArray *)client shadow:(NSArray *)shadow;\n+(NSDictionary *)diffWins:(NSArray *)wins andLoses:(NSArray *)loses;\n+(NSArray *)mergeInto:(NSArray *)into applyDiff:(NSDictionary *)diff;\n\n@end\n" (comment) "//" (comment) "// DS.h" (comment) "// Differential" (comment) "//" (comment) "// Created by <NAME> on 22/04/2017." (comment) "// Copyright © 2017 <NAME>. All rights reserved.\n" (comment) "/\n" (preproc_call) "import <Foundation/Foundation.h>\n\n" (preproc_directive) "import " (preproc_arg) "Foundation/Foundation.h>\n" (ERROR) "i" (ERROR) "i" (declaration) "nterface DS : NSObject\n" (type_identifier) "nterface " (ERROR) "S : " (identifier) "S " (:) " " (identifier) "SObject\n" (;) "" (binary_expression) "(NSDictionary *)diffShadowAndClient:(NSArray *)client " (unary_expression) "(NSDictionary *)diffShadowAndClient:" (+) "(" (cast_expression) "NSDictionary *)diffShadowAndClient:" (() "N" (type_descriptor) "SDictionary *)" (type_identifier) "SDictionary " (abstract_pointer_declarator) ")" (*) ")" ()) "d" (identifier) "iffShadowAndClient:" (ERROR) "(NSArray " (:) "(" (() "N" (identifier) "SArray " (*) ")" (ERROR) "c" ()) "c" (identifier) "lient " (identifier) "hadow:" (:) "(" (() "N" (identifier) "SArray " (*) ")" ()) "s" (identifier) "hadow;" (;) "\n" (+) "(" (() "N" (identifier) "SDictionary " (*) ")" ()) "d" (identifier) "iffWins:" (:) "(" (() "N" (identifier) "SArray " (*) ")" ()) "w" (identifier) "ins " (identifier) "ndLoses:" (:) "(" (() "N" (identifier) "SArray " (*) ")" ()) "l" (identifier) "oses;" (;) "\n" (+) "(" (() "N" (identifier) "SArray " (*) ")" ()) "m" (identifier) "ergeInto:" (:) "(" (() "N" (identifier) "SArray " (*) ")" ()) "i" (identifier) "nto " (identifier) "pplyDiff:" (:) "(" (() "N" (identifier) "SDictionary " (*) ")" ()) "d" (identifier) "iff;" (;) "\n" (ERROR) "e" (identifier) "nd\n"
89
7
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 30.23, "nodes": 39, "errors": 0, "source_hash": "aaeffba9a0f6211f440240251fda652b0f45bdbaaa906c8db407b67dcf145197", "categorized_nodes": 30}, "ast": {"root": "ERROR", "nodes": [{"id": 0, "type": "ERROR", "text": "//\n// DS.h\n// Differential\n//\n// Created by <NAME> on 22/04/2017.\n// Copyright \u00a9 2017 <NAME>. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface DS : NSObject\n\n+(NSDictionary *)diffShadowAndClient:(NSArray *)client shadow:(NSArray *)shadow;\n+(NSDictionary *)diffWins:(NSArray *)wins andLoses:(NSArray *)loses;\n+(NSArray *)mergeInto:(NSArray *)into applyDiff:(NSDictionary *)diff;\n\n@end\n", "parent": null, "children": [1, 3, 5, 10, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 1, "type": "preproc_call", "text": "import <Foundation/Foundation.h>\n\n", "parent": 0, "children": [2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 2, "type": "preproc_arg", "text": "Foundation/Foundation.h>\n", "parent": 1, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "ERROR", "text": "i", "parent": 0, "children": [4], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 4, "type": "ERROR", "text": "i", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "declaration", "text": "nterface DS : NSObject\n", "parent": 0, "children": [6, 7, 9], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 24}}, {"id": 6, "type": "type_identifier", "text": "nterface ", "parent": 5, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 7, "type": "ERROR", "text": "S : ", "parent": 5, "children": [8], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 15}}, {"id": 8, "type": "identifier", "text": "S ", "parent": 7, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 13}}, {"id": 9, "type": "identifier", "text": "SObject\n", "parent": 5, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 24}}, {"id": 10, "type": "binary_expression", "text": "(NSDictionary *)diffShadowAndClient:(NSArray *)client ", "parent": 0, "children": [11, 16, 18, 19], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 54}}, {"id": 11, "type": "unary_expression", "text": "(NSDictionary *)diffShadowAndClient:", "parent": 10, "children": [12], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 36}}, {"id": 12, "type": "cast_expression", "text": "NSDictionary *)diffShadowAndClient:", "parent": 11, "children": [13, 15], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 36}}, {"id": 13, "type": "type_descriptor", "text": "SDictionary *)", "parent": 12, "children": [14], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 16}}, {"id": 14, "type": "type_identifier", "text": "SDictionary ", "parent": 13, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 14}}, {"id": 15, "type": "identifier", "text": "iffShadowAndClient:", "parent": 12, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 36}}, {"id": 16, "type": "ERROR", "text": "(NSArray ", "parent": 10, "children": [17], "start_point": {"row": 12, "column": 36}, "end_point": {"row": 12, "column": 45}}, {"id": 17, "type": "identifier", "text": "SArray ", "parent": 16, "children": [], "start_point": {"row": 12, "column": 38}, "end_point": {"row": 12, "column": 45}}, {"id": 18, "type": "ERROR", "text": "c", "parent": 10, "children": [], "start_point": {"row": 12, "column": 47}, "end_point": {"row": 12, "column": 48}}, {"id": 19, "type": "identifier", "text": "lient ", "parent": 10, "children": [], "start_point": {"row": 12, "column": 48}, "end_point": {"row": 12, "column": 54}}, {"id": 20, "type": "identifier", "text": "hadow:", "parent": 0, "children": [], "start_point": {"row": 12, "column": 55}, "end_point": {"row": 12, "column": 61}}, {"id": 21, "type": "identifier", "text": "SArray ", "parent": 0, "children": [], "start_point": {"row": 12, "column": 63}, "end_point": {"row": 12, "column": 70}}, {"id": 22, "type": "identifier", "text": "hadow;", "parent": 0, "children": [], "start_point": {"row": 12, "column": 73}, "end_point": {"row": 12, "column": 79}}, {"id": 23, "type": "identifier", "text": "SDictionary ", "parent": 0, "children": [], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 14}}, {"id": 24, "type": "identifier", "text": "iffWins:", "parent": 0, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 25}}, {"id": 25, "type": "identifier", "text": "SArray ", "parent": 0, "children": [], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 34}}, {"id": 26, "type": "identifier", "text": "ins ", "parent": 0, "children": [], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 41}}, {"id": 27, "type": "identifier", "text": "ndLoses:", "parent": 0, "children": [], "start_point": {"row": 13, "column": 42}, "end_point": {"row": 13, "column": 50}}, {"id": 28, "type": "identifier", "text": "SArray ", "parent": 0, "children": [], "start_point": {"row": 13, "column": 52}, "end_point": {"row": 13, "column": 59}}, {"id": 29, "type": "identifier", "text": "oses;", "parent": 0, "children": [], "start_point": {"row": 13, "column": 62}, "end_point": {"row": 13, "column": 67}}, {"id": 30, "type": "identifier", "text": "SArray ", "parent": 0, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 9}}, {"id": 31, "type": "identifier", "text": "ergeInto:", "parent": 0, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 21}}, {"id": 32, "type": "identifier", "text": "SArray ", "parent": 0, "children": [], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 14, "column": 30}}, {"id": 33, "type": "identifier", "text": "nto ", "parent": 0, "children": [], "start_point": {"row": 14, "column": 33}, "end_point": {"row": 14, "column": 37}}, {"id": 34, "type": "identifier", "text": "pplyDiff:", "parent": 0, "children": [], "start_point": {"row": 14, "column": 38}, "end_point": {"row": 14, "column": 47}}, {"id": 35, "type": "identifier", "text": "SDictionary ", "parent": 0, "children": [], "start_point": {"row": 14, "column": 49}, "end_point": {"row": 14, "column": 61}}, {"id": 36, "type": "identifier", "text": "iff;", "parent": 0, "children": [], "start_point": {"row": 14, "column": 64}, "end_point": {"row": 14, "column": 68}}, {"id": 37, "type": "ERROR", "text": "e", "parent": 0, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 38, "type": "identifier", "text": "nd\n", "parent": 0, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [5], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [10, 11, 12], "assignments": [], "loops": [], "conditionals": [6, 8, 9, 14, 15, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38], "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// DS.h\n// Differential\n//\n// Created by <NAME> on 22/04/2017.\n// Copyright \u00a9 2017 <NAME>. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface DS : NSObject\n\n+(NSDictionary *)diffShadowAndClient:(NSArray *)client shadow:(NSArray *)shadow;\n+(NSDictionary *)diffWins:(NSArray *)wins andLoses:(NSArray *)loses;\n+(NSArray *)mergeInto:(NSArray *)into applyDiff:(NSDictionary *)diff;\n\n@end\n"}
28
c
/* utilities are used internally by ofxCv, and make it easier to write code that can work with OpenCv and openFrameworks data. useful functions from this file: - imitate and copy - toCv and toOf */ #pragma once #include "opencv2/opencv.hpp" #include "ofRectangle.h" #include "ofTexture.h" #include "ofPixels.h" #include "ofBaseTypes.h" #include "ofVideoPlayer.h" #include "ofVideoGrabber.h" #include "ofPolyline.h" #include "ofVectorMath.h" #include "ofMesh.h" namespace ofxCv { // these functions are for accessing Mat, ofPixels and ofImage consistently. // they're very important for imitate(). // width, height template <class T> inline int getWidth(const T& src) {return src.getWidth();} template <class T> inline int getHeight(const T& src) {return src.getHeight();} inline int getWidth(const cv::Mat& src) {return src.cols;} inline int getHeight(const cv::Mat& src) {return src.rows;} template <class T> inline bool getAllocated(const T& src) { return getWidth(src) > 0 && getHeight(src) > 0; } // depth inline int getDepth(int cvImageType) { return CV_MAT_DEPTH(cvImageType); } inline int getDepth(const cv::Mat& mat) { return mat.depth(); } inline int getDepth(const ofTexture& tex) { // avoid "texture not allocated" warning if(!tex.isAllocated()) { return CV_8U; } int type = tex.getTextureData().glInternalFormat; switch(type) { case GL_RGBA: case GL_RGB: case GL_LUMINANCE_ALPHA: case GL_LUMINANCE: return CV_8U; #ifndef TARGET_OPENGLES case GL_RGBA8: case GL_RGB8: case GL_LUMINANCE8: case GL_LUMINANCE8_ALPHA8: return CV_8U; case GL_RGBA32F_ARB: case GL_RGB32F_ARB: case GL_LUMINANCE32F_ARB: return CV_32F; #endif default: return 0; } } template <class T> inline int getDepth(const ofPixels_<T>& pixels) { switch(pixels.getBytesPerChannel()) { case 4: return CV_32F; case 2: return CV_16U; case 1: default: return CV_8U; } } template <> inline int getDepth(const ofPixels_<signed short>& pixels) { return CV_16S; } template <> inline int getDepth(const ofPixels_<signed char>& pixels) { return CV_8S; } template <class T> inline int getDepth(const ofBaseHasPixels_<T>& img) { return getDepth(img.getPixels()); } // channels inline int getChannels(int cvImageType) { return CV_MAT_CN(cvImageType); } inline int getChannels(ofImageType imageType) { switch(imageType) { case OF_IMAGE_COLOR_ALPHA: return 4; case OF_IMAGE_COLOR: return 3; case OF_IMAGE_GRAYSCALE: default: return 1; } } inline int getChannels(const cv::Mat& mat) { return mat.channels(); } inline int getChannels(const ofTexture& tex) { // avoid "texture not allocated" warning if(!tex.isAllocated()) { return GL_RGB; } int type = tex.getTextureData().glInternalFormat; switch(type) { case GL_RGBA: return 4; case GL_RGB: return 3; case GL_LUMINANCE_ALPHA: return 2; case GL_LUMINANCE: return 1; #ifndef TARGET_OPENGLES case GL_RGBA8: return 4; case GL_RGB8: return 3; case GL_LUMINANCE8: return 1; case GL_LUMINANCE8_ALPHA8: return 2; case GL_RGBA32F_ARB: return 4; case GL_RGB32F_ARB: return 3; case GL_LUMINANCE32F_ARB: return 1; #endif default: return 0; } } template <class T> inline int getChannels(const ofPixels_<T>& pixels) { return pixels.getNumChannels(); } template <class T> inline int getChannels(const ofBaseHasPixels_<T>& img) { return getChannels(img.getPixels()); } // image type inline int getCvImageType(int channels, int cvDepth = CV_8U) { return CV_MAKETYPE(cvDepth, channels); } inline int getCvImageType(ofImageType imageType, int cvDepth = CV_8U) { return CV_MAKETYPE(cvDepth, getChannels(imageType)); } template <class T> inline int getCvImageType(const T& img) { return CV_MAKETYPE(getDepth(img), getChannels(img)); } inline ofImageType getOfImageType(int cvImageType) { switch(getChannels(cvImageType)) { case 4: return OF_IMAGE_COLOR_ALPHA; case 3: return OF_IMAGE_COLOR; case 1: default: return OF_IMAGE_GRAYSCALE; } } inline int getGlImageType(int cvImageType) { int channels = getChannels(cvImageType); int depth = getDepth(cvImageType); switch(depth) { case CV_8U: switch(channels) { case 1: return GL_LUMINANCE; case 3: return GL_RGB; case 4: return GL_RGBA; } #ifndef TARGET_OPENGLES case CV_32F: switch(channels) { case 1: return GL_LUMINANCE32F_ARB; case 3: return GL_RGB32F; case 4: return GL_RGBA32F; } #endif } return 0; } // allocation // only happens when necessary template <class T> inline void allocate(T& img, int width, int height, int cvType) { if (!img.isAllocated() || getWidth(img) != width || getHeight(img) != height || getCvImageType(img) != cvType) { img.allocate(width, height, getOfImageType(cvType)); } } inline void allocate(ofTexture& img, int width, int height, int cvType) { if (!img.isAllocated() || getWidth(img) != width || getHeight(img) != height || getCvImageType(img) != cvType) { img.allocate(width, height, getGlImageType(cvType)); } } inline void allocate(cv::Mat& img, int width, int height, int cvType) { if (getWidth(img) != width || getHeight(img) != height || getCvImageType(img) != cvType) { img.create(height, width, cvType); } } // ofVideoPlayer/Grabber can't be allocated, so we assume we don't need to do anything inline void allocate(ofBaseVideoDraws & img, int width, int height, int cvType) {} inline void allocate(ofVideoPlayer & img, int width, int height, int cvType) {} inline void allocate(ofVideoGrabber & img, int width, int height, int cvType) {} inline void allocate(const ofBaseVideoDraws & img, int width, int height, int cvType) {} inline void allocate(const ofVideoPlayer & img, int width, int height, int cvType) {} inline void allocate(const ofVideoGrabber & img, int width, int height, int cvType) {} // imitate() is good for preparing buffers // it's like allocate(), but uses the size and type of the original as a reference // like allocate(), the image being allocated is the first argument // this version copies size, but manually specifies mirror's image type template <class M, class O> void imitate(M& mirror, const O& original, int mirrorCvImageType) { int ow = getWidth(original), oh = getHeight(original); allocate(mirror, ow, oh, mirrorCvImageType); } // this version copies size and image type template <class M, class O> void imitate(M& mirror, const O& original) { imitate(mirror, original, getCvImageType(original)); } // maximum possible values for that depth or matrix float getMaxVal(int cvDepth); float getMaxVal(const cv::Mat& mat); int getTargetChannelsFromCode(int conversionCode); // toCv functions // for conversion functions, the signature reveals the behavior: // 1 Type& argument // creates a shallow copy of the data // 2 const Type& argument // creates a deep copy of the data // 3 Type argument // creates a deep copy of the data // style 1 is used when possible (for Mat conversion). style 2 is used when // dealing with a lot of data that can't/shouldn't be shallow copied. style 3 // is used for small objects where the compiler can optimize the copying if // necessary. the reference is avoided to make inline toCv/toOf use easier. cv::Mat toCv(cv::Mat& mat); cv::Mat toCv(const cv::Mat& mat); template <class T> inline cv::Mat toCv(ofPixels_<T>& pix) { return cv::Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), pix.getData(), 0); } template <class T> inline cv::Mat toCv(const ofPixels_<T>& pix) { return cv::Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0).clone(); } template <class T> inline cv::Mat toCv(ofBaseHasPixels_<T>& img) { return toCv(img.getPixels()); } template <class T> inline cv::Mat toCv(const ofBaseHasPixels_<T>& img) { return toCv(img.getPixels()); } cv::Mat toCv(ofMesh& mesh); cv::Point2f toCv(glm::vec2 vec); cv::Point3f toCv(glm::vec3 vec); cv::Rect toCv(ofRectangle rect); std::vector<cv::Point2f> toCv(const ofPolyline& polyline); std::vector<cv::Point2f> toCv(const std::vector<glm::vec2>& points); std::vector<cv::Point3f> toCv(const std::vector<glm::vec3>& points); cv::Scalar toCv(ofColor color); // cross-toolkit, cross-bitdepth copying template <class S, class D> void copy(S& src, D& dst, int dstDepth) { imitate(dst, src, getCvImageType(getChannels(src), dstDepth)); cv::Mat srcMat = toCv(src); cv::Mat dstMat = toCv(dst); if(srcMat.type() == dstMat.type()) { srcMat.copyTo(dstMat); } else { double alpha = getMaxVal(dstMat) / getMaxVal(srcMat); srcMat.convertTo(dstMat, dstMat.depth(), alpha); } } template <class S, class D> void copy(const S& src, D& dst, int dstDepth) { imitate(dst, src, getCvImageType(getChannels(src), dstDepth)); cv::Mat srcMat = toCv(src); cv::Mat dstMat = toCv(dst); if(srcMat.type() == dstMat.type()) { srcMat.copyTo(dstMat); } else { double alpha = getMaxVal(dstMat) / getMaxVal(srcMat); srcMat.convertTo(dstMat, dstMat.depth(), alpha); } } // most of the time you want the destination to be the same as the source. but // sometimes your destination is a different depth, and copy() will notice and // do the conversion for you. template <class S, class D> void copy(S& src, D& dst) { int dstDepth = 0; if(getAllocated(dst)) { dstDepth = getDepth(dst); } else { dstDepth = getDepth(src); } copy(src, dst, dstDepth); } template <class S, class D> void copy(const S& src, D& dst) { int dstDepth = 0; if(getAllocated(dst)) { dstDepth = getDepth(dst); } else { dstDepth = getDepth(src); } copy(src, dst, dstDepth); } // toOf functions glm::vec2 toOf(cv::Point2f point); glm::vec3 toOf(cv::Point3f point); ofRectangle toOf(cv::Rect rect); ofPolyline toOf(cv::RotatedRect rect); template <class T> inline ofPolyline toOf(const std::vector<cv::Point_<T>>& contour) { ofPolyline polyline; polyline.resize(contour.size()); for(std::size_t i = 0; i < contour.size(); i++) { polyline[i].x = contour[i].x; polyline[i].y = contour[i].y; } polyline.close(); return polyline; } template <class T> void toOf(cv::Mat mat, ofPixels_<T>& pixels) { pixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels()); } template <class T> void toOf(cv::Mat mat, ofImage_<T>& img) { imitate(img, mat); toOf(mat, img.getPixels()); } }
34.32
325
(translation_unit) "/*\n utilities are used internally by ofxCv, and make it easier to write code that\n can work with OpenCv and openFrameworks data.\n \n useful functions from this file:\n - imitate and copy\n - toCv and toOf\n */\n\n#pragma once\n\n#include "opencv2/opencv.hpp"\n#include "ofRectangle.h"\n#include "ofTexture.h"\n#include "ofPixels.h"\n#include "ofBaseTypes.h"\n#include "ofVideoPlayer.h"\n#include "ofVideoGrabber.h"\n#include "ofPolyline.h"\n#include "ofVectorMath.h"\n#include "ofMesh.h"\n\nnamespace ofxCv {\n // these functions are for accessing Mat, ofPixels and ofImage consistently.\n // they're very important for imitate().\n \n // width, height\n template <class T> inline int getWidth(const T& src) {return src.getWidth();}\n template <class T> inline int getHeight(const T& src) {return src.getHeight();}\n inline int getWidth(const cv::Mat& src) {return src.cols;}\n inline int getHeight(const cv::Mat& src) {return src.rows;}\n template <class T> inline bool getAllocated(const T& src) {\n return getWidth(src) > 0 && getHeight(src) > 0;\n }\n \n // depth\n inline int getDepth(int cvImageType) {\n return CV_MAT_DEPTH(cvImageType);\n }\n\n inline int getDepth(const cv::Mat& mat) {\n return mat.depth();\n }\n\n inline int getDepth(const ofTexture& tex) {\n // avoid "texture not allocated" warning\n if(!tex.isAllocated()) {\n return CV_8U;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA:\n case GL_RGB:\n case GL_LUMINANCE_ALPHA:\n case GL_LUMINANCE:\n return CV_8U;\n\n#ifndef TARGET_OPENGLES\n case GL_RGBA8:\n case GL_RGB8:\n case GL_LUMINANCE8:\n case GL_LUMINANCE8_ALPHA8:\n return CV_8U;\n\n case GL_RGBA32F_ARB:\n case GL_RGB32F_ARB:\n case GL_LUMINANCE32F_ARB:\n return CV_32F;\n#endif\n default: return 0;\n }\n }\n template <class T> inline int getDepth(const ofPixels_<T>& pixels) {\n switch(pixels.getBytesPerChannel()) {\n case 4: return CV_32F;\n case 2: return CV_16U;\n case 1: default: return CV_8U;\n }\n }\n template <> inline int getDepth(const ofPixels_<signed short>& pixels) {\n return CV_16S;\n }\n template <> inline int getDepth(const ofPixels_<signed char>& pixels) {\n return CV_8S;\n }\n template <class T> inline int getDepth(const ofBaseHasPixels_<T>& img) {\n return getDepth(img.getPixels());\n }\n \n // channels\n inline int getChannels(int cvImageType) {\n return CV_MAT_CN(cvImageType);\n }\n inline int getChannels(ofImageType imageType) {\n switch(imageType) {\n case OF_IMAGE_COLOR_ALPHA: return 4;\n case OF_IMAGE_COLOR: return 3;\n case OF_IMAGE_GRAYSCALE: default: return 1;\n }\n }\n inline int getChannels(const cv::Mat& mat) {\n return mat.channels();\n }\n inline int getChannels(const ofTexture& tex) {\n // avoid "texture not allocated" warning\n if(!tex.isAllocated()) {\n return GL_RGB;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA: return 4;\n case GL_RGB: return 3;\n case GL_LUMINANCE_ALPHA: return 2;\n case GL_LUMINANCE: return 1;\n \n#ifndef TARGET_OPENGLES\n case GL_RGBA8: return 4;\n case GL_RGB8: return 3;\n case GL_LUMINANCE8: return 1;\n case GL_LUMINANCE8_ALPHA8: return 2;\n \n case GL_RGBA32F_ARB: return 4;\n case GL_RGB32F_ARB: return 3;\n case GL_LUMINANCE32F_ARB: return 1;\n#endif\n default: return 0;\n }\n }\n template <class T> inline int getChannels(const ofPixels_<T>& pixels) {\n return pixels.getNumChannels();\n }\n template <class T> inline int getChannels(const ofBaseHasPixels_<T>& img) {\n return getChannels(img.getPixels());\n }\n \n // image type\n inline int getCvImageType(int channels, int cvDepth = CV_8U) {\n return CV_MAKETYPE(cvDepth, channels);\n }\n inline int getCvImageType(ofImageType imageType, int cvDepth = CV_8U) {\n return CV_MAKETYPE(cvDepth, getChannels(imageType));\n }\n template <class T> inline int getCvImageType(const T& img) {\n return CV_MAKETYPE(getDepth(img), getChannels(img));\n }\n inline ofImageType getOfImageType(int cvImageType) {\n switch(getChannels(cvImageType)) {\n case 4: return OF_IMAGE_COLOR_ALPHA;\n case 3: return OF_IMAGE_COLOR;\n case 1: default: return OF_IMAGE_GRAYSCALE;\n }\n }\n inline int getGlImageType(int cvImageType) {\n int channels = getChannels(cvImageType);\n int depth = getDepth(cvImageType);\n switch(depth) {\n case CV_8U:\n switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }\n#ifndef TARGET_OPENGLES\n case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }\n#endif\n }\n return 0;\n }\n \n // allocation\n // only happens when necessary\n template <class T> inline void allocate(T& img, int width, int height, int cvType) {\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getOfImageType(cvType));\n }\n }\n inline void allocate(ofTexture& img, int width, int height, int cvType) {\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getGlImageType(cvType));\n }\n }\n inline void allocate(cv::Mat& img, int width, int height, int cvType) {\n if (getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType) {\n img.create(height, width, cvType);\n }\n }\n // ofVideoPlayer/Grabber can't be allocated, so we assume we don't need to do anything\n inline void allocate(ofBaseVideoDraws & img, int width, int height, int cvType) {}\n inline void allocate(ofVideoPlayer & img, int width, int height, int cvType) {}\n inline void allocate(ofVideoGrabber & img, int width, int height, int cvType) {}\n\n inline void allocate(const ofBaseVideoDraws & img, int width, int height, int cvType) {}\n inline void allocate(const ofVideoPlayer & img, int width, int height, int cvType) {}\n inline void allocate(const ofVideoGrabber & img, int width, int height, int cvType) {}\n\n // imitate() is good for preparing buffers\n // it's like allocate(), but uses the size and type of the original as a reference\n // like allocate(), the image being allocated is the first argument \n \n // this version copies size, but manually specifies mirror's image type\n template <class M, class O> void imitate(M& mirror, const O& original, int mirrorCvImageType) {\n int ow = getWidth(original), oh = getHeight(original);\n allocate(mirror, ow, oh, mirrorCvImageType);\n }\n\n // this version copies size and image type\n template <class M, class O> void imitate(M& mirror, const O& original) {\n imitate(mirror, original, getCvImageType(original));\n }\n\n // maximum possible values for that depth or matrix\n float getMaxVal(int cvDepth);\n float getMaxVal(const cv::Mat& mat);\n int getTargetChannelsFromCode(int conversionCode);\n \n // toCv functions\n // for conversion functions, the signature reveals the behavior:\n // 1 Type& argument // creates a shallow copy of the data\n // 2 const Type& argument // creates a deep copy of the data\n // 3 Type argument // creates a deep copy of the data\n // style 1 is used when possible (for Mat conversion). style 2 is used when\n // dealing with a lot of data that can't/shouldn't be shallow copied. style 3\n // is used for small objects where the compiler can optimize the copying if\n // necessary. the reference is avoided to make inline toCv/toOf use easier.\n \n cv::Mat toCv(cv::Mat& mat);\n cv::Mat toCv(const cv::Mat& mat);\n\n template <class T> inline cv::Mat toCv(ofPixels_<T>& pix) {\n return cv::Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), pix.getData(), 0);\n }\n\n template <class T> inline cv::Mat toCv(const ofPixels_<T>& pix) {\n return cv::Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0).clone();\n }\n\n template <class T> inline cv::Mat toCv(ofBaseHasPixels_<T>& img) {\n return toCv(img.getPixels());\n }\n\n template <class T> inline cv::Mat toCv(const ofBaseHasPixels_<T>& img) {\n return toCv(img.getPixels());\n }\n\n cv::Mat toCv(ofMesh& mesh);\n cv::Point2f toCv(glm::vec2 vec);\n cv::Point3f toCv(glm::vec3 vec);\n cv::Rect toCv(ofRectangle rect);\n std::vector<cv::Point2f> toCv(const ofPolyline& polyline);\n std::vector<cv::Point2f> toCv(const std::vector<glm::vec2>& points);\n std::vector<cv::Point3f> toCv(const std::vector<glm::vec3>& points);\n cv::Scalar toCv(ofColor color);\n \n // cross-toolkit, cross-bitdepth copying\n template <class S, class D>\n void copy(S& src, D& dst, int dstDepth) {\n imitate(dst, src, getCvImageType(getChannels(src), dstDepth));\n cv::Mat srcMat = toCv(src);\n cv::Mat dstMat = toCv(dst);\n if(srcMat.type() == dstMat.type()) {\n srcMat.copyTo(dstMat);\n } else {\n double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n srcMat.convertTo(dstMat, dstMat.depth(), alpha);\n }\n }\n\n template <class S, class D>\n void copy(const S& src, D& dst, int dstDepth) {\n imitate(dst, src, getCvImageType(getChannels(src), dstDepth));\n cv::Mat srcMat = toCv(src);\n cv::Mat dstMat = toCv(dst);\n if(srcMat.type() == dstMat.type()) {\n srcMat.copyTo(dstMat);\n } else {\n double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n srcMat.convertTo(dstMat, dstMat.depth(), alpha);\n }\n }\n\n // most of the time you want the destination to be the same as the source. but\n // sometimes your destination is a different depth, and copy() will notice and\n // do the conversion for you.\n template <class S, class D>\n void copy(S& src, D& dst) {\n int dstDepth = 0;\n if(getAllocated(dst)) {\n dstDepth = getDepth(dst);\n } else {\n dstDepth = getDepth(src);\n }\n copy(src, dst, dstDepth);\n }\n\n template <class S, class D>\n void copy(const S& src, D& dst) {\n int dstDepth = 0;\n if(getAllocated(dst)) {\n dstDepth = getDepth(dst);\n } else {\n dstDepth = getDepth(src);\n }\n copy(src, dst, dstDepth);\n }\n\n // toOf functions\n glm::vec2 toOf(cv::Point2f point);\n glm::vec3 toOf(cv::Point3f point);\n ofRectangle toOf(cv::Rect rect);\n ofPolyline toOf(cv::RotatedRect rect);\n template <class T> inline ofPolyline toOf(const std::vector<cv::Point_<T>>& contour) {\n ofPolyline polyline;\n polyline.resize(contour.size());\n for(std::size_t i = 0; i < contour.size(); i++) {\n polyline[i].x = contour[i].x;\n polyline[i].y = contour[i].y;\n }\n polyline.close();\n return polyline;\n }\n template <class T>\n void toOf(cv::Mat mat, ofPixels_<T>& pixels) {\n pixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels());\n }\n template <class T>\n void toOf(cv::Mat mat, ofImage_<T>& img) {\n imitate(img, mat);\n toOf(mat, img.getPixels());\n }\n}\n" (comment) "/*\n utilities are used internally by ofxCv, and make it easier to write code that\n can work with OpenCv and openFrameworks data.\n \n useful functions from this file:\n - imitate and copy\n - toCv and toOf\n */" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "opencv2/opencv.hpp"\n" (#include) "#include" (string_literal) ""opencv2/opencv.hpp"" (") """ (string_content) "opencv2/opencv.hpp" (") """ (preproc_include) "#include "ofRectangle.h"\n" (#include) "#include" (string_literal) ""ofRectangle.h"" (") """ (string_content) "ofRectangle.h" (") """ (preproc_include) "#include "ofTexture.h"\n" (#include) "#include" (string_literal) ""ofTexture.h"" (") """ (string_content) "ofTexture.h" (") """ (preproc_include) "#include "ofPixels.h"\n" (#include) "#include" (string_literal) ""ofPixels.h"" (") """ (string_content) "ofPixels.h" (") """ (preproc_include) "#include "ofBaseTypes.h"\n" (#include) "#include" (string_literal) ""ofBaseTypes.h"" (") """ (string_content) "ofBaseTypes.h" (") """ (preproc_include) "#include "ofVideoPlayer.h"\n" (#include) "#include" (string_literal) ""ofVideoPlayer.h"" (") """ (string_content) "ofVideoPlayer.h" (") """ (preproc_include) "#include "ofVideoGrabber.h"\n" (#include) "#include" (string_literal) ""ofVideoGrabber.h"" (") """ (string_content) "ofVideoGrabber.h" (") """ (preproc_include) "#include "ofPolyline.h"\n" (#include) "#include" (string_literal) ""ofPolyline.h"" (") """ (string_content) "ofPolyline.h" (") """ (preproc_include) "#include "ofVectorMath.h"\n" (#include) "#include" (string_literal) ""ofVectorMath.h"" (") """ (string_content) "ofVectorMath.h" (") """ (preproc_include) "#include "ofMesh.h"\n" (#include) "#include" (string_literal) ""ofMesh.h"" (") """ (string_content) "ofMesh.h" (") """ (function_definition) "namespace ofxCv {\n // these functions are for accessing Mat, ofPixels and ofImage consistently.\n // they're very important for imitate().\n \n // width, height\n template <class T> inline int getWidth(const T& src) {return src.getWidth();}\n template <class T> inline int getHeight(const T& src) {return src.getHeight();}\n inline int getWidth(const cv::Mat& src) {return src.cols;}\n inline int getHeight(const cv::Mat& src) {return src.rows;}\n template <class T> inline bool getAllocated(const T& src) {\n return getWidth(src) > 0 && getHeight(src) > 0;\n }\n \n // depth\n inline int getDepth(int cvImageType) {\n return CV_MAT_DEPTH(cvImageType);\n }\n\n inline int getDepth(const cv::Mat& mat) {\n return mat.depth();\n }\n\n inline int getDepth(const ofTexture& tex) {\n // avoid "texture not allocated" warning\n if(!tex.isAllocated()) {\n return CV_8U;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA:\n case GL_RGB:\n case GL_LUMINANCE_ALPHA:\n case GL_LUMINANCE:\n return CV_8U;\n\n#ifndef TARGET_OPENGLES\n case GL_RGBA8:\n case GL_RGB8:\n case GL_LUMINANCE8:\n case GL_LUMINANCE8_ALPHA8:\n return CV_8U;\n\n case GL_RGBA32F_ARB:\n case GL_RGB32F_ARB:\n case GL_LUMINANCE32F_ARB:\n return CV_32F;\n#endif\n default: return 0;\n }\n }\n template <class T> inline int getDepth(const ofPixels_<T>& pixels) {\n switch(pixels.getBytesPerChannel()) {\n case 4: return CV_32F;\n case 2: return CV_16U;\n case 1: default: return CV_8U;\n }\n }\n template <> inline int getDepth(const ofPixels_<signed short>& pixels) {\n return CV_16S;\n }\n template <> inline int getDepth(const ofPixels_<signed char>& pixels) {\n return CV_8S;\n }\n template <class T> inline int getDepth(const ofBaseHasPixels_<T>& img) {\n return getDepth(img.getPixels());\n }\n \n // channels\n inline int getChannels(int cvImageType) {\n return CV_MAT_CN(cvImageType);\n }\n inline int getChannels(ofImageType imageType) {\n switch(imageType) {\n case OF_IMAGE_COLOR_ALPHA: return 4;\n case OF_IMAGE_COLOR: return 3;\n case OF_IMAGE_GRAYSCALE: default: return 1;\n }\n }\n inline int getChannels(const cv::Mat& mat) {\n return mat.channels();\n }\n inline int getChannels(const ofTexture& tex) {\n // avoid "texture not allocated" warning\n if(!tex.isAllocated()) {\n return GL_RGB;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA: return 4;\n case GL_RGB: return 3;\n case GL_LUMINANCE_ALPHA: return 2;\n case GL_LUMINANCE: return 1;\n \n#ifndef TARGET_OPENGLES\n case GL_RGBA8: return 4;\n case GL_RGB8: return 3;\n case GL_LUMINANCE8: return 1;\n case GL_LUMINANCE8_ALPHA8: return 2;\n \n case GL_RGBA32F_ARB: return 4;\n case GL_RGB32F_ARB: return 3;\n case GL_LUMINANCE32F_ARB: return 1;\n#endif\n default: return 0;\n }\n }\n template <class T> inline int getChannels(const ofPixels_<T>& pixels) {\n return pixels.getNumChannels();\n }\n template <class T> inline int getChannels(const ofBaseHasPixels_<T>& img) {\n return getChannels(img.getPixels());\n }\n \n // image type\n inline int getCvImageType(int channels, int cvDepth = CV_8U) {\n return CV_MAKETYPE(cvDepth, channels);\n }\n inline int getCvImageType(ofImageType imageType, int cvDepth = CV_8U) {\n return CV_MAKETYPE(cvDepth, getChannels(imageType));\n }\n template <class T> inline int getCvImageType(const T& img) {\n return CV_MAKETYPE(getDepth(img), getChannels(img));\n }\n inline ofImageType getOfImageType(int cvImageType) {\n switch(getChannels(cvImageType)) {\n case 4: return OF_IMAGE_COLOR_ALPHA;\n case 3: return OF_IMAGE_COLOR;\n case 1: default: return OF_IMAGE_GRAYSCALE;\n }\n }\n inline int getGlImageType(int cvImageType) {\n int channels = getChannels(cvImageType);\n int depth = getDepth(cvImageType);\n switch(depth) {\n case CV_8U:\n switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }\n#ifndef TARGET_OPENGLES\n case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }\n#endif\n }\n return 0;\n }\n \n // allocation\n // only happens when necessary\n template <class T> inline void allocate(T& img, int width, int height, int cvType) {\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getOfImageType(cvType));\n }\n }\n inline void allocate(ofTexture& img, int width, int height, int cvType) {\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getGlImageType(cvType));\n }\n }\n inline void allocate(cv::Mat& img, int width, int height, int cvType) {\n if (getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType) {\n img.create(height, width, cvType);\n }\n }\n // ofVideoPlayer/Grabber can't be allocated, so we assume we don't need to do anything\n inline void allocate(ofBaseVideoDraws & img, int width, int height, int cvType) {}\n inline void allocate(ofVideoPlayer & img, int width, int height, int cvType) {}\n inline void allocate(ofVideoGrabber & img, int width, int height, int cvType) {}\n\n inline void allocate(const ofBaseVideoDraws & img, int width, int height, int cvType) {}\n inline void allocate(const ofVideoPlayer & img, int width, int height, int cvType) {}\n inline void allocate(const ofVideoGrabber & img, int width, int height, int cvType) {}\n\n // imitate() is good for preparing buffers\n // it's like allocate(), but uses the size and type of the original as a reference\n // like allocate(), the image being allocated is the first argument \n \n // this version copies size, but manually specifies mirror's image type\n template <class M, class O> void imitate(M& mirror, const O& original, int mirrorCvImageType) {\n int ow = getWidth(original), oh = getHeight(original);\n allocate(mirror, ow, oh, mirrorCvImageType);\n }\n\n // this version copies size and image type\n template <class M, class O> void imitate(M& mirror, const O& original) {\n imitate(mirror, original, getCvImageType(original));\n }" (type_identifier) "namespace" (identifier) "ofxCv" (compound_statement) "{\n // these functions are for accessing Mat, ofPixels and ofImage consistently.\n // they're very important for imitate().\n \n // width, height\n template <class T> inline int getWidth(const T& src) {return src.getWidth();}\n template <class T> inline int getHeight(const T& src) {return src.getHeight();}\n inline int getWidth(const cv::Mat& src) {return src.cols;}\n inline int getHeight(const cv::Mat& src) {return src.rows;}\n template <class T> inline bool getAllocated(const T& src) {\n return getWidth(src) > 0 && getHeight(src) > 0;\n }\n \n // depth\n inline int getDepth(int cvImageType) {\n return CV_MAT_DEPTH(cvImageType);\n }\n\n inline int getDepth(const cv::Mat& mat) {\n return mat.depth();\n }\n\n inline int getDepth(const ofTexture& tex) {\n // avoid "texture not allocated" warning\n if(!tex.isAllocated()) {\n return CV_8U;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA:\n case GL_RGB:\n case GL_LUMINANCE_ALPHA:\n case GL_LUMINANCE:\n return CV_8U;\n\n#ifndef TARGET_OPENGLES\n case GL_RGBA8:\n case GL_RGB8:\n case GL_LUMINANCE8:\n case GL_LUMINANCE8_ALPHA8:\n return CV_8U;\n\n case GL_RGBA32F_ARB:\n case GL_RGB32F_ARB:\n case GL_LUMINANCE32F_ARB:\n return CV_32F;\n#endif\n default: return 0;\n }\n }\n template <class T> inline int getDepth(const ofPixels_<T>& pixels) {\n switch(pixels.getBytesPerChannel()) {\n case 4: return CV_32F;\n case 2: return CV_16U;\n case 1: default: return CV_8U;\n }\n }\n template <> inline int getDepth(const ofPixels_<signed short>& pixels) {\n return CV_16S;\n }\n template <> inline int getDepth(const ofPixels_<signed char>& pixels) {\n return CV_8S;\n }\n template <class T> inline int getDepth(const ofBaseHasPixels_<T>& img) {\n return getDepth(img.getPixels());\n }\n \n // channels\n inline int getChannels(int cvImageType) {\n return CV_MAT_CN(cvImageType);\n }\n inline int getChannels(ofImageType imageType) {\n switch(imageType) {\n case OF_IMAGE_COLOR_ALPHA: return 4;\n case OF_IMAGE_COLOR: return 3;\n case OF_IMAGE_GRAYSCALE: default: return 1;\n }\n }\n inline int getChannels(const cv::Mat& mat) {\n return mat.channels();\n }\n inline int getChannels(const ofTexture& tex) {\n // avoid "texture not allocated" warning\n if(!tex.isAllocated()) {\n return GL_RGB;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA: return 4;\n case GL_RGB: return 3;\n case GL_LUMINANCE_ALPHA: return 2;\n case GL_LUMINANCE: return 1;\n \n#ifndef TARGET_OPENGLES\n case GL_RGBA8: return 4;\n case GL_RGB8: return 3;\n case GL_LUMINANCE8: return 1;\n case GL_LUMINANCE8_ALPHA8: return 2;\n \n case GL_RGBA32F_ARB: return 4;\n case GL_RGB32F_ARB: return 3;\n case GL_LUMINANCE32F_ARB: return 1;\n#endif\n default: return 0;\n }\n }\n template <class T> inline int getChannels(const ofPixels_<T>& pixels) {\n return pixels.getNumChannels();\n }\n template <class T> inline int getChannels(const ofBaseHasPixels_<T>& img) {\n return getChannels(img.getPixels());\n }\n \n // image type\n inline int getCvImageType(int channels, int cvDepth = CV_8U) {\n return CV_MAKETYPE(cvDepth, channels);\n }\n inline int getCvImageType(ofImageType imageType, int cvDepth = CV_8U) {\n return CV_MAKETYPE(cvDepth, getChannels(imageType));\n }\n template <class T> inline int getCvImageType(const T& img) {\n return CV_MAKETYPE(getDepth(img), getChannels(img));\n }\n inline ofImageType getOfImageType(int cvImageType) {\n switch(getChannels(cvImageType)) {\n case 4: return OF_IMAGE_COLOR_ALPHA;\n case 3: return OF_IMAGE_COLOR;\n case 1: default: return OF_IMAGE_GRAYSCALE;\n }\n }\n inline int getGlImageType(int cvImageType) {\n int channels = getChannels(cvImageType);\n int depth = getDepth(cvImageType);\n switch(depth) {\n case CV_8U:\n switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }\n#ifndef TARGET_OPENGLES\n case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }\n#endif\n }\n return 0;\n }\n \n // allocation\n // only happens when necessary\n template <class T> inline void allocate(T& img, int width, int height, int cvType) {\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getOfImageType(cvType));\n }\n }\n inline void allocate(ofTexture& img, int width, int height, int cvType) {\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getGlImageType(cvType));\n }\n }\n inline void allocate(cv::Mat& img, int width, int height, int cvType) {\n if (getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType) {\n img.create(height, width, cvType);\n }\n }\n // ofVideoPlayer/Grabber can't be allocated, so we assume we don't need to do anything\n inline void allocate(ofBaseVideoDraws & img, int width, int height, int cvType) {}\n inline void allocate(ofVideoPlayer & img, int width, int height, int cvType) {}\n inline void allocate(ofVideoGrabber & img, int width, int height, int cvType) {}\n\n inline void allocate(const ofBaseVideoDraws & img, int width, int height, int cvType) {}\n inline void allocate(const ofVideoPlayer & img, int width, int height, int cvType) {}\n inline void allocate(const ofVideoGrabber & img, int width, int height, int cvType) {}\n\n // imitate() is good for preparing buffers\n // it's like allocate(), but uses the size and type of the original as a reference\n // like allocate(), the image being allocated is the first argument \n \n // this version copies size, but manually specifies mirror's image type\n template <class M, class O> void imitate(M& mirror, const O& original, int mirrorCvImageType) {\n int ow = getWidth(original), oh = getHeight(original);\n allocate(mirror, ow, oh, mirrorCvImageType);\n }\n\n // this version copies size and image type\n template <class M, class O> void imitate(M& mirror, const O& original) {\n imitate(mirror, original, getCvImageType(original));\n }" ({) "{" (comment) "// these functions are for accessing Mat, ofPixels and ofImage consistently." (comment) "// they're very important for imitate()." (comment) "// width, height" (expression_statement) "template <class T> inline" (binary_expression) "template <class T> inline" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "inline" (;) "" (function_definition) "int getWidth(const T& src) {return src.getWidth();}" (primitive_type) "int" (function_declarator) "getWidth(const T& src)" (identifier) "getWidth" (parameter_list) "(const T& src)" (() "(" (parameter_declaration) "const T& src" (type_qualifier) "const" (const) "const" (type_identifier) "T" (ERROR) "&" (&) "&" (identifier) "src" ()) ")" (compound_statement) "{return src.getWidth();}" ({) "{" (return_statement) "return src.getWidth();" (return) "return" (call_expression) "src.getWidth()" (field_expression) "src.getWidth" (identifier) "src" (.) "." (field_identifier) "getWidth" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) "template <class T> inline" (binary_expression) "template <class T> inline" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "inline" (;) "" (function_definition) "int getHeight(const T& src) {return src.getHeight();}" (primitive_type) "int" (function_declarator) "getHeight(const T& src)" (identifier) "getHeight" (parameter_list) "(const T& src)" (() "(" (parameter_declaration) "const T& src" (type_qualifier) "const" (const) "const" (type_identifier) "T" (ERROR) "&" (&) "&" (identifier) "src" ()) ")" (compound_statement) "{return src.getHeight();}" ({) "{" (return_statement) "return src.getHeight();" (return) "return" (call_expression) "src.getHeight()" (field_expression) "src.getHeight" (identifier) "src" (.) "." (field_identifier) "getHeight" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "inline int getWidth(const cv::Mat& src) {return src.cols;}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getWidth(const cv::Mat& src)" (identifier) "getWidth" (parameter_list) "(const cv::Mat& src)" (() "(" (parameter_declaration) "const cv::Mat& src" (type_qualifier) "const" (const) "const" (type_identifier) "cv" (ERROR) "::Mat&" (:) ":" (:) ":" (identifier) "Mat" (&) "&" (identifier) "src" ()) ")" (compound_statement) "{return src.cols;}" ({) "{" (return_statement) "return src.cols;" (return) "return" (field_expression) "src.cols" (identifier) "src" (.) "." (field_identifier) "cols" (;) ";" (}) "}" (function_definition) "inline int getHeight(const cv::Mat& src) {return src.rows;}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getHeight(const cv::Mat& src)" (identifier) "getHeight" (parameter_list) "(const cv::Mat& src)" (() "(" (parameter_declaration) "const cv::Mat& src" (type_qualifier) "const" (const) "const" (type_identifier) "cv" (ERROR) "::Mat&" (:) ":" (:) ":" (identifier) "Mat" (&) "&" (identifier) "src" ()) ")" (compound_statement) "{return src.rows;}" ({) "{" (return_statement) "return src.rows;" (return) "return" (field_expression) "src.rows" (identifier) "src" (.) "." (field_identifier) "rows" (;) ";" (}) "}" (expression_statement) "template <class T> inline" (binary_expression) "template <class T> inline" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "inline" (;) "" (function_definition) "bool getAllocated(const T& src) {\n return getWidth(src) > 0 && getHeight(src) > 0;\n }" (primitive_type) "bool" (function_declarator) "getAllocated(const T& src)" (identifier) "getAllocated" (parameter_list) "(const T& src)" (() "(" (parameter_declaration) "const T& src" (type_qualifier) "const" (const) "const" (type_identifier) "T" (ERROR) "&" (&) "&" (identifier) "src" ()) ")" (compound_statement) "{\n return getWidth(src) > 0 && getHeight(src) > 0;\n }" ({) "{" (return_statement) "return getWidth(src) > 0 && getHeight(src) > 0;" (return) "return" (binary_expression) "getWidth(src) > 0 && getHeight(src) > 0" (binary_expression) "getWidth(src) > 0" (call_expression) "getWidth(src)" (identifier) "getWidth" (argument_list) "(src)" (() "(" (identifier) "src" ()) ")" (>) ">" (number_literal) "0" (&&) "&&" (binary_expression) "getHeight(src) > 0" (call_expression) "getHeight(src)" (identifier) "getHeight" (argument_list) "(src)" (() "(" (identifier) "src" ()) ")" (>) ">" (number_literal) "0" (;) ";" (}) "}" (comment) "// depth" (function_definition) "inline int getDepth(int cvImageType) {\n return CV_MAT_DEPTH(cvImageType);\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getDepth(int cvImageType)" (identifier) "getDepth" (parameter_list) "(int cvImageType)" (() "(" (parameter_declaration) "int cvImageType" (primitive_type) "int" (identifier) "cvImageType" ()) ")" (compound_statement) "{\n return CV_MAT_DEPTH(cvImageType);\n }" ({) "{" (return_statement) "return CV_MAT_DEPTH(cvImageType);" (return) "return" (call_expression) "CV_MAT_DEPTH(cvImageType)" (identifier) "CV_MAT_DEPTH" (argument_list) "(cvImageType)" (() "(" (identifier) "cvImageType" ()) ")" (;) ";" (}) "}" (function_definition) "inline int getDepth(const cv::Mat& mat) {\n return mat.depth();\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getDepth(const cv::Mat& mat)" (identifier) "getDepth" (parameter_list) "(const cv::Mat& mat)" (() "(" (parameter_declaration) "const cv::Mat& mat" (type_qualifier) "const" (const) "const" (type_identifier) "cv" (ERROR) "::Mat&" (:) ":" (:) ":" (identifier) "Mat" (&) "&" (identifier) "mat" ()) ")" (compound_statement) "{\n return mat.depth();\n }" ({) "{" (return_statement) "return mat.depth();" (return) "return" (call_expression) "mat.depth()" (field_expression) "mat.depth" (identifier) "mat" (.) "." (field_identifier) "depth" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "inline int getDepth(const ofTexture& tex) {\n // avoid "texture not allocated" warning\n if(!tex.isAllocated()) {\n return CV_8U;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA:\n case GL_RGB:\n case GL_LUMINANCE_ALPHA:\n case GL_LUMINANCE:\n return CV_8U;\n\n#ifndef TARGET_OPENGLES\n case GL_RGBA8:\n case GL_RGB8:\n case GL_LUMINANCE8:\n case GL_LUMINANCE8_ALPHA8:\n return CV_8U;\n\n case GL_RGBA32F_ARB:\n case GL_RGB32F_ARB:\n case GL_LUMINANCE32F_ARB:\n return CV_32F;\n#endif\n default: return 0;\n }\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getDepth(const ofTexture& tex)" (identifier) "getDepth" (parameter_list) "(const ofTexture& tex)" (() "(" (parameter_declaration) "const ofTexture& tex" (type_qualifier) "const" (const) "const" (type_identifier) "ofTexture" (ERROR) "&" (&) "&" (identifier) "tex" ()) ")" (compound_statement) "{\n // avoid "texture not allocated" warning\n if(!tex.isAllocated()) {\n return CV_8U;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA:\n case GL_RGB:\n case GL_LUMINANCE_ALPHA:\n case GL_LUMINANCE:\n return CV_8U;\n\n#ifndef TARGET_OPENGLES\n case GL_RGBA8:\n case GL_RGB8:\n case GL_LUMINANCE8:\n case GL_LUMINANCE8_ALPHA8:\n return CV_8U;\n\n case GL_RGBA32F_ARB:\n case GL_RGB32F_ARB:\n case GL_LUMINANCE32F_ARB:\n return CV_32F;\n#endif\n default: return 0;\n }\n }" ({) "{" (comment) "// avoid "texture not allocated" warning" (if_statement) "if(!tex.isAllocated()) {\n return CV_8U;\n }" (if) "if" (parenthesized_expression) "(!tex.isAllocated())" (() "(" (unary_expression) "!tex.isAllocated()" (!) "!" (call_expression) "tex.isAllocated()" (field_expression) "tex.isAllocated" (identifier) "tex" (.) "." (field_identifier) "isAllocated" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n return CV_8U;\n }" ({) "{" (return_statement) "return CV_8U;" (return) "return" (identifier) "CV_8U" (;) ";" (}) "}" (declaration) "int type = tex.getTextureData().glInternalFormat;" (primitive_type) "int" (init_declarator) "type = tex.getTextureData().glInternalFormat" (identifier) "type" (=) "=" (field_expression) "tex.getTextureData().glInternalFormat" (call_expression) "tex.getTextureData()" (field_expression) "tex.getTextureData" (identifier) "tex" (.) "." (field_identifier) "getTextureData" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "glInternalFormat" (;) ";" (switch_statement) "switch(type) {\n case GL_RGBA:\n case GL_RGB:\n case GL_LUMINANCE_ALPHA:\n case GL_LUMINANCE:\n return CV_8U;\n\n#ifndef TARGET_OPENGLES\n case GL_RGBA8:\n case GL_RGB8:\n case GL_LUMINANCE8:\n case GL_LUMINANCE8_ALPHA8:\n return CV_8U;\n\n case GL_RGBA32F_ARB:\n case GL_RGB32F_ARB:\n case GL_LUMINANCE32F_ARB:\n return CV_32F;\n#endif\n default: return 0;\n }" (switch) "switch" (parenthesized_expression) "(type)" (() "(" (identifier) "type" ()) ")" (compound_statement) "{\n case GL_RGBA:\n case GL_RGB:\n case GL_LUMINANCE_ALPHA:\n case GL_LUMINANCE:\n return CV_8U;\n\n#ifndef TARGET_OPENGLES\n case GL_RGBA8:\n case GL_RGB8:\n case GL_LUMINANCE8:\n case GL_LUMINANCE8_ALPHA8:\n return CV_8U;\n\n case GL_RGBA32F_ARB:\n case GL_RGB32F_ARB:\n case GL_LUMINANCE32F_ARB:\n return CV_32F;\n#endif\n default: return 0;\n }" ({) "{" (case_statement) "case GL_RGBA:" (case) "case" (identifier) "GL_RGBA" (:) ":" (case_statement) "case GL_RGB:" (case) "case" (identifier) "GL_RGB" (:) ":" (case_statement) "case GL_LUMINANCE_ALPHA:" (case) "case" (identifier) "GL_LUMINANCE_ALPHA" (:) ":" (case_statement) "case GL_LUMINANCE:\n return CV_8U;" (case) "case" (identifier) "GL_LUMINANCE" (:) ":" (return_statement) "return CV_8U;" (return) "return" (identifier) "CV_8U" (;) ";" (preproc_ifdef) "#ifndef TARGET_OPENGLES\n case GL_RGBA8:\n case GL_RGB8:\n case GL_LUMINANCE8:\n case GL_LUMINANCE8_ALPHA8:\n return CV_8U;\n\n case GL_RGBA32F_ARB:\n case GL_RGB32F_ARB:\n case GL_LUMINANCE32F_ARB:\n return CV_32F;\n#endif" (#ifndef) "#ifndef" (identifier) "TARGET_OPENGLES" (case_statement) "case GL_RGBA8:" (case) "case" (identifier) "GL_RGBA8" (:) ":" (case_statement) "case GL_RGB8:" (case) "case" (identifier) "GL_RGB8" (:) ":" (case_statement) "case GL_LUMINANCE8:" (case) "case" (identifier) "GL_LUMINANCE8" (:) ":" (case_statement) "case GL_LUMINANCE8_ALPHA8:\n return CV_8U;" (case) "case" (identifier) "GL_LUMINANCE8_ALPHA8" (:) ":" (return_statement) "return CV_8U;" (return) "return" (identifier) "CV_8U" (;) ";" (case_statement) "case GL_RGBA32F_ARB:" (case) "case" (identifier) "GL_RGBA32F_ARB" (:) ":" (case_statement) "case GL_RGB32F_ARB:" (case) "case" (identifier) "GL_RGB32F_ARB" (:) ":" (case_statement) "case GL_LUMINANCE32F_ARB:\n return CV_32F;" (case) "case" (identifier) "GL_LUMINANCE32F_ARB" (:) ":" (return_statement) "return CV_32F;" (return) "return" (identifier) "CV_32F" (;) ";" (#endif) "#endif" (case_statement) "default: return 0;" (default) "default" (:) ":" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (}) "}" (expression_statement) "template <class T> inline" (binary_expression) "template <class T> inline" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "inline" (;) "" (function_definition) "int getDepth(const ofPixels_<T>& pixels) {\n switch(pixels.getBytesPerChannel()) {\n case 4: return CV_32F;\n case 2: return CV_16U;\n case 1: default: return CV_8U;\n }\n }" (primitive_type) "int" (function_declarator) "getDepth(const ofPixels_<T>& pixels)" (identifier) "getDepth" (parameter_list) "(const ofPixels_<T>& pixels)" (() "(" (parameter_declaration) "const ofPixels_<T>& pixels" (type_qualifier) "const" (const) "const" (type_identifier) "ofPixels_" (ERROR) "<T>&" (<) "<" (identifier) "T" (>) ">" (&) "&" (identifier) "pixels" ()) ")" (compound_statement) "{\n switch(pixels.getBytesPerChannel()) {\n case 4: return CV_32F;\n case 2: return CV_16U;\n case 1: default: return CV_8U;\n }\n }" ({) "{" (switch_statement) "switch(pixels.getBytesPerChannel()) {\n case 4: return CV_32F;\n case 2: return CV_16U;\n case 1: default: return CV_8U;\n }" (switch) "switch" (parenthesized_expression) "(pixels.getBytesPerChannel())" (() "(" (call_expression) "pixels.getBytesPerChannel()" (field_expression) "pixels.getBytesPerChannel" (identifier) "pixels" (.) "." (field_identifier) "getBytesPerChannel" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n case 4: return CV_32F;\n case 2: return CV_16U;\n case 1: default: return CV_8U;\n }" ({) "{" (case_statement) "case 4: return CV_32F;" (case) "case" (number_literal) "4" (:) ":" (return_statement) "return CV_32F;" (return) "return" (identifier) "CV_32F" (;) ";" (case_statement) "case 2: return CV_16U;" (case) "case" (number_literal) "2" (:) ":" (return_statement) "return CV_16U;" (return) "return" (identifier) "CV_16U" (;) ";" (case_statement) "case 1:" (case) "case" (number_literal) "1" (:) ":" (case_statement) "default: return CV_8U;" (default) "default" (:) ":" (return_statement) "return CV_8U;" (return) "return" (identifier) "CV_8U" (;) ";" (}) "}" (}) "}" (ERROR) "template <>" (identifier) "template" (<) "<" (>) ">" (function_definition) "inline int getDepth(const ofPixels_<signed short>& pixels) {\n return CV_16S;\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getDepth(const ofPixels_<signed short>& pixels)" (identifier) "getDepth" (parameter_list) "(const ofPixels_<signed short>& pixels)" (() "(" (parameter_declaration) "const ofPixels_<signed short>& pixels" (type_qualifier) "const" (const) "const" (sized_type_specifier) "ofPixels_<signed short" (type_identifier) "ofPixels_" (ERROR) "<" (<) "<" (signed) "signed" (short) "short" (ERROR) ">&" (>) ">" (&) "&" (identifier) "pixels" ()) ")" (compound_statement) "{\n return CV_16S;\n }" ({) "{" (return_statement) "return CV_16S;" (return) "return" (identifier) "CV_16S" (;) ";" (}) "}" (ERROR) "template <> inline int getDepth(const ofPixels_<signed char>& pixels)" (identifier) "template" (<) "<" (>) ">" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (identifier) "getDepth" (() "(" (parameter_declaration) "const ofPixels_<signed char" (type_qualifier) "const" (const) "const" (sized_type_specifier) "ofPixels_<signed" (type_identifier) "ofPixels_" (ERROR) "<" (<) "<" (signed) "signed" (identifier) "char" (>) ">" (pointer_expression) "& pixels" (&) "&" (identifier) "pixels" ()) ")" (compound_statement) "{\n return CV_8S;\n }" ({) "{" (return_statement) "return CV_8S;" (return) "return" (identifier) "CV_8S" (;) ";" (}) "}" (expression_statement) "template <class T> inline" (binary_expression) "template <class T> inline" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "inline" (;) "" (function_definition) "int getDepth(const ofBaseHasPixels_<T>& img) {\n return getDepth(img.getPixels());\n }" (primitive_type) "int" (function_declarator) "getDepth(const ofBaseHasPixels_<T>& img)" (identifier) "getDepth" (parameter_list) "(const ofBaseHasPixels_<T>& img)" (() "(" (parameter_declaration) "const ofBaseHasPixels_<T>& img" (type_qualifier) "const" (const) "const" (type_identifier) "ofBaseHasPixels_" (ERROR) "<T>&" (<) "<" (identifier) "T" (>) ">" (&) "&" (identifier) "img" ()) ")" (compound_statement) "{\n return getDepth(img.getPixels());\n }" ({) "{" (return_statement) "return getDepth(img.getPixels());" (return) "return" (call_expression) "getDepth(img.getPixels())" (identifier) "getDepth" (argument_list) "(img.getPixels())" (() "(" (call_expression) "img.getPixels()" (field_expression) "img.getPixels" (identifier) "img" (.) "." (field_identifier) "getPixels" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (comment) "// channels" (function_definition) "inline int getChannels(int cvImageType) {\n return CV_MAT_CN(cvImageType);\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getChannels(int cvImageType)" (identifier) "getChannels" (parameter_list) "(int cvImageType)" (() "(" (parameter_declaration) "int cvImageType" (primitive_type) "int" (identifier) "cvImageType" ()) ")" (compound_statement) "{\n return CV_MAT_CN(cvImageType);\n }" ({) "{" (return_statement) "return CV_MAT_CN(cvImageType);" (return) "return" (call_expression) "CV_MAT_CN(cvImageType)" (identifier) "CV_MAT_CN" (argument_list) "(cvImageType)" (() "(" (identifier) "cvImageType" ()) ")" (;) ";" (}) "}" (function_definition) "inline int getChannels(ofImageType imageType) {\n switch(imageType) {\n case OF_IMAGE_COLOR_ALPHA: return 4;\n case OF_IMAGE_COLOR: return 3;\n case OF_IMAGE_GRAYSCALE: default: return 1;\n }\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getChannels(ofImageType imageType)" (identifier) "getChannels" (parameter_list) "(ofImageType imageType)" (() "(" (parameter_declaration) "ofImageType imageType" (type_identifier) "ofImageType" (identifier) "imageType" ()) ")" (compound_statement) "{\n switch(imageType) {\n case OF_IMAGE_COLOR_ALPHA: return 4;\n case OF_IMAGE_COLOR: return 3;\n case OF_IMAGE_GRAYSCALE: default: return 1;\n }\n }" ({) "{" (switch_statement) "switch(imageType) {\n case OF_IMAGE_COLOR_ALPHA: return 4;\n case OF_IMAGE_COLOR: return 3;\n case OF_IMAGE_GRAYSCALE: default: return 1;\n }" (switch) "switch" (parenthesized_expression) "(imageType)" (() "(" (identifier) "imageType" ()) ")" (compound_statement) "{\n case OF_IMAGE_COLOR_ALPHA: return 4;\n case OF_IMAGE_COLOR: return 3;\n case OF_IMAGE_GRAYSCALE: default: return 1;\n }" ({) "{" (case_statement) "case OF_IMAGE_COLOR_ALPHA: return 4;" (case) "case" (identifier) "OF_IMAGE_COLOR_ALPHA" (:) ":" (return_statement) "return 4;" (return) "return" (number_literal) "4" (;) ";" (case_statement) "case OF_IMAGE_COLOR: return 3;" (case) "case" (identifier) "OF_IMAGE_COLOR" (:) ":" (return_statement) "return 3;" (return) "return" (number_literal) "3" (;) ";" (case_statement) "case OF_IMAGE_GRAYSCALE:" (case) "case" (identifier) "OF_IMAGE_GRAYSCALE" (:) ":" (case_statement) "default: return 1;" (default) "default" (:) ":" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (}) "}" (function_definition) "inline int getChannels(const cv::Mat& mat) {\n return mat.channels();\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getChannels(const cv::Mat& mat)" (identifier) "getChannels" (parameter_list) "(const cv::Mat& mat)" (() "(" (parameter_declaration) "const cv::Mat& mat" (type_qualifier) "const" (const) "const" (type_identifier) "cv" (ERROR) "::Mat&" (:) ":" (:) ":" (identifier) "Mat" (&) "&" (identifier) "mat" ()) ")" (compound_statement) "{\n return mat.channels();\n }" ({) "{" (return_statement) "return mat.channels();" (return) "return" (call_expression) "mat.channels()" (field_expression) "mat.channels" (identifier) "mat" (.) "." (field_identifier) "channels" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "inline int getChannels(const ofTexture& tex) {\n // avoid "texture not allocated" warning\n if(!tex.isAllocated()) {\n return GL_RGB;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA: return 4;\n case GL_RGB: return 3;\n case GL_LUMINANCE_ALPHA: return 2;\n case GL_LUMINANCE: return 1;\n \n#ifndef TARGET_OPENGLES\n case GL_RGBA8: return 4;\n case GL_RGB8: return 3;\n case GL_LUMINANCE8: return 1;\n case GL_LUMINANCE8_ALPHA8: return 2;\n \n case GL_RGBA32F_ARB: return 4;\n case GL_RGB32F_ARB: return 3;\n case GL_LUMINANCE32F_ARB: return 1;\n#endif\n default: return 0;\n }\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getChannels(const ofTexture& tex)" (identifier) "getChannels" (parameter_list) "(const ofTexture& tex)" (() "(" (parameter_declaration) "const ofTexture& tex" (type_qualifier) "const" (const) "const" (type_identifier) "ofTexture" (ERROR) "&" (&) "&" (identifier) "tex" ()) ")" (compound_statement) "{\n // avoid "texture not allocated" warning\n if(!tex.isAllocated()) {\n return GL_RGB;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA: return 4;\n case GL_RGB: return 3;\n case GL_LUMINANCE_ALPHA: return 2;\n case GL_LUMINANCE: return 1;\n \n#ifndef TARGET_OPENGLES\n case GL_RGBA8: return 4;\n case GL_RGB8: return 3;\n case GL_LUMINANCE8: return 1;\n case GL_LUMINANCE8_ALPHA8: return 2;\n \n case GL_RGBA32F_ARB: return 4;\n case GL_RGB32F_ARB: return 3;\n case GL_LUMINANCE32F_ARB: return 1;\n#endif\n default: return 0;\n }\n }" ({) "{" (comment) "// avoid "texture not allocated" warning" (if_statement) "if(!tex.isAllocated()) {\n return GL_RGB;\n }" (if) "if" (parenthesized_expression) "(!tex.isAllocated())" (() "(" (unary_expression) "!tex.isAllocated()" (!) "!" (call_expression) "tex.isAllocated()" (field_expression) "tex.isAllocated" (identifier) "tex" (.) "." (field_identifier) "isAllocated" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n return GL_RGB;\n }" ({) "{" (return_statement) "return GL_RGB;" (return) "return" (identifier) "GL_RGB" (;) ";" (}) "}" (declaration) "int type = tex.getTextureData().glInternalFormat;" (primitive_type) "int" (init_declarator) "type = tex.getTextureData().glInternalFormat" (identifier) "type" (=) "=" (field_expression) "tex.getTextureData().glInternalFormat" (call_expression) "tex.getTextureData()" (field_expression) "tex.getTextureData" (identifier) "tex" (.) "." (field_identifier) "getTextureData" (argument_list) "()" (() "(" ()) ")" (.) "." (field_identifier) "glInternalFormat" (;) ";" (switch_statement) "switch(type) {\n case GL_RGBA: return 4;\n case GL_RGB: return 3;\n case GL_LUMINANCE_ALPHA: return 2;\n case GL_LUMINANCE: return 1;\n \n#ifndef TARGET_OPENGLES\n case GL_RGBA8: return 4;\n case GL_RGB8: return 3;\n case GL_LUMINANCE8: return 1;\n case GL_LUMINANCE8_ALPHA8: return 2;\n \n case GL_RGBA32F_ARB: return 4;\n case GL_RGB32F_ARB: return 3;\n case GL_LUMINANCE32F_ARB: return 1;\n#endif\n default: return 0;\n }" (switch) "switch" (parenthesized_expression) "(type)" (() "(" (identifier) "type" ()) ")" (compound_statement) "{\n case GL_RGBA: return 4;\n case GL_RGB: return 3;\n case GL_LUMINANCE_ALPHA: return 2;\n case GL_LUMINANCE: return 1;\n \n#ifndef TARGET_OPENGLES\n case GL_RGBA8: return 4;\n case GL_RGB8: return 3;\n case GL_LUMINANCE8: return 1;\n case GL_LUMINANCE8_ALPHA8: return 2;\n \n case GL_RGBA32F_ARB: return 4;\n case GL_RGB32F_ARB: return 3;\n case GL_LUMINANCE32F_ARB: return 1;\n#endif\n default: return 0;\n }" ({) "{" (case_statement) "case GL_RGBA: return 4;" (case) "case" (identifier) "GL_RGBA" (:) ":" (return_statement) "return 4;" (return) "return" (number_literal) "4" (;) ";" (case_statement) "case GL_RGB: return 3;" (case) "case" (identifier) "GL_RGB" (:) ":" (return_statement) "return 3;" (return) "return" (number_literal) "3" (;) ";" (case_statement) "case GL_LUMINANCE_ALPHA: return 2;" (case) "case" (identifier) "GL_LUMINANCE_ALPHA" (:) ":" (return_statement) "return 2;" (return) "return" (number_literal) "2" (;) ";" (case_statement) "case GL_LUMINANCE: return 1;" (case) "case" (identifier) "GL_LUMINANCE" (:) ":" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (preproc_ifdef) "#ifndef TARGET_OPENGLES\n case GL_RGBA8: return 4;\n case GL_RGB8: return 3;\n case GL_LUMINANCE8: return 1;\n case GL_LUMINANCE8_ALPHA8: return 2;\n \n case GL_RGBA32F_ARB: return 4;\n case GL_RGB32F_ARB: return 3;\n case GL_LUMINANCE32F_ARB: return 1;\n#endif" (#ifndef) "#ifndef" (identifier) "TARGET_OPENGLES" (case_statement) "case GL_RGBA8: return 4;" (case) "case" (identifier) "GL_RGBA8" (:) ":" (return_statement) "return 4;" (return) "return" (number_literal) "4" (;) ";" (case_statement) "case GL_RGB8: return 3;" (case) "case" (identifier) "GL_RGB8" (:) ":" (return_statement) "return 3;" (return) "return" (number_literal) "3" (;) ";" (case_statement) "case GL_LUMINANCE8: return 1;" (case) "case" (identifier) "GL_LUMINANCE8" (:) ":" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (case_statement) "case GL_LUMINANCE8_ALPHA8: return 2;" (case) "case" (identifier) "GL_LUMINANCE8_ALPHA8" (:) ":" (return_statement) "return 2;" (return) "return" (number_literal) "2" (;) ";" (case_statement) "case GL_RGBA32F_ARB: return 4;" (case) "case" (identifier) "GL_RGBA32F_ARB" (:) ":" (return_statement) "return 4;" (return) "return" (number_literal) "4" (;) ";" (case_statement) "case GL_RGB32F_ARB: return 3;" (case) "case" (identifier) "GL_RGB32F_ARB" (:) ":" (return_statement) "return 3;" (return) "return" (number_literal) "3" (;) ";" (case_statement) "case GL_LUMINANCE32F_ARB: return 1;" (case) "case" (identifier) "GL_LUMINANCE32F_ARB" (:) ":" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (#endif) "#endif" (case_statement) "default: return 0;" (default) "default" (:) ":" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (}) "}" (expression_statement) "template <class T> inline" (binary_expression) "template <class T> inline" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "inline" (;) "" (function_definition) "int getChannels(const ofPixels_<T>& pixels) {\n return pixels.getNumChannels();\n }" (primitive_type) "int" (function_declarator) "getChannels(const ofPixels_<T>& pixels)" (identifier) "getChannels" (parameter_list) "(const ofPixels_<T>& pixels)" (() "(" (parameter_declaration) "const ofPixels_<T>& pixels" (type_qualifier) "const" (const) "const" (type_identifier) "ofPixels_" (ERROR) "<T>&" (<) "<" (identifier) "T" (>) ">" (&) "&" (identifier) "pixels" ()) ")" (compound_statement) "{\n return pixels.getNumChannels();\n }" ({) "{" (return_statement) "return pixels.getNumChannels();" (return) "return" (call_expression) "pixels.getNumChannels()" (field_expression) "pixels.getNumChannels" (identifier) "pixels" (.) "." (field_identifier) "getNumChannels" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) "template <class T> inline" (binary_expression) "template <class T> inline" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "inline" (;) "" (function_definition) "int getChannels(const ofBaseHasPixels_<T>& img) {\n return getChannels(img.getPixels());\n }" (primitive_type) "int" (function_declarator) "getChannels(const ofBaseHasPixels_<T>& img)" (identifier) "getChannels" (parameter_list) "(const ofBaseHasPixels_<T>& img)" (() "(" (parameter_declaration) "const ofBaseHasPixels_<T>& img" (type_qualifier) "const" (const) "const" (type_identifier) "ofBaseHasPixels_" (ERROR) "<T>&" (<) "<" (identifier) "T" (>) ">" (&) "&" (identifier) "img" ()) ")" (compound_statement) "{\n return getChannels(img.getPixels());\n }" ({) "{" (return_statement) "return getChannels(img.getPixels());" (return) "return" (call_expression) "getChannels(img.getPixels())" (identifier) "getChannels" (argument_list) "(img.getPixels())" (() "(" (call_expression) "img.getPixels()" (field_expression) "img.getPixels" (identifier) "img" (.) "." (field_identifier) "getPixels" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (comment) "// image type" (function_definition) "inline int getCvImageType(int channels, int cvDepth = CV_8U) {\n return CV_MAKETYPE(cvDepth, channels);\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getCvImageType(int channels, int cvDepth = CV_8U)" (identifier) "getCvImageType" (parameter_list) "(int channels, int cvDepth = CV_8U)" (() "(" (parameter_declaration) "int channels" (primitive_type) "int" (identifier) "channels" (,) "," (parameter_declaration) "int cvDepth = CV_8U" (primitive_type) "int" (ERROR) "cvDepth =" (identifier) "cvDepth" (=) "=" (identifier) "CV_8U" ()) ")" (compound_statement) "{\n return CV_MAKETYPE(cvDepth, channels);\n }" ({) "{" (return_statement) "return CV_MAKETYPE(cvDepth, channels);" (return) "return" (call_expression) "CV_MAKETYPE(cvDepth, channels)" (identifier) "CV_MAKETYPE" (argument_list) "(cvDepth, channels)" (() "(" (identifier) "cvDepth" (,) "," (identifier) "channels" ()) ")" (;) ";" (}) "}" (function_definition) "inline int getCvImageType(ofImageType imageType, int cvDepth = CV_8U) {\n return CV_MAKETYPE(cvDepth, getChannels(imageType));\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getCvImageType(ofImageType imageType, int cvDepth = CV_8U)" (identifier) "getCvImageType" (parameter_list) "(ofImageType imageType, int cvDepth = CV_8U)" (() "(" (parameter_declaration) "ofImageType imageType" (type_identifier) "ofImageType" (identifier) "imageType" (,) "," (parameter_declaration) "int cvDepth = CV_8U" (primitive_type) "int" (ERROR) "cvDepth =" (identifier) "cvDepth" (=) "=" (identifier) "CV_8U" ()) ")" (compound_statement) "{\n return CV_MAKETYPE(cvDepth, getChannels(imageType));\n }" ({) "{" (return_statement) "return CV_MAKETYPE(cvDepth, getChannels(imageType));" (return) "return" (call_expression) "CV_MAKETYPE(cvDepth, getChannels(imageType))" (identifier) "CV_MAKETYPE" (argument_list) "(cvDepth, getChannels(imageType))" (() "(" (identifier) "cvDepth" (,) "," (call_expression) "getChannels(imageType)" (identifier) "getChannels" (argument_list) "(imageType)" (() "(" (identifier) "imageType" ()) ")" ()) ")" (;) ";" (}) "}" (expression_statement) "template <class T> inline" (binary_expression) "template <class T> inline" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (identifier) "inline" (;) "" (function_definition) "int getCvImageType(const T& img) {\n return CV_MAKETYPE(getDepth(img), getChannels(img));\n }" (primitive_type) "int" (function_declarator) "getCvImageType(const T& img)" (identifier) "getCvImageType" (parameter_list) "(const T& img)" (() "(" (parameter_declaration) "const T& img" (type_qualifier) "const" (const) "const" (type_identifier) "T" (ERROR) "&" (&) "&" (identifier) "img" ()) ")" (compound_statement) "{\n return CV_MAKETYPE(getDepth(img), getChannels(img));\n }" ({) "{" (return_statement) "return CV_MAKETYPE(getDepth(img), getChannels(img));" (return) "return" (call_expression) "CV_MAKETYPE(getDepth(img), getChannels(img))" (identifier) "CV_MAKETYPE" (argument_list) "(getDepth(img), getChannels(img))" (() "(" (call_expression) "getDepth(img)" (identifier) "getDepth" (argument_list) "(img)" (() "(" (identifier) "img" ()) ")" (,) "," (call_expression) "getChannels(img)" (identifier) "getChannels" (argument_list) "(img)" (() "(" (identifier) "img" ()) ")" ()) ")" (;) ";" (}) "}" (function_definition) "inline ofImageType getOfImageType(int cvImageType) {\n switch(getChannels(cvImageType)) {\n case 4: return OF_IMAGE_COLOR_ALPHA;\n case 3: return OF_IMAGE_COLOR;\n case 1: default: return OF_IMAGE_GRAYSCALE;\n }\n }" (storage_class_specifier) "inline" (inline) "inline" (type_identifier) "ofImageType" (function_declarator) "getOfImageType(int cvImageType)" (identifier) "getOfImageType" (parameter_list) "(int cvImageType)" (() "(" (parameter_declaration) "int cvImageType" (primitive_type) "int" (identifier) "cvImageType" ()) ")" (compound_statement) "{\n switch(getChannels(cvImageType)) {\n case 4: return OF_IMAGE_COLOR_ALPHA;\n case 3: return OF_IMAGE_COLOR;\n case 1: default: return OF_IMAGE_GRAYSCALE;\n }\n }" ({) "{" (switch_statement) "switch(getChannels(cvImageType)) {\n case 4: return OF_IMAGE_COLOR_ALPHA;\n case 3: return OF_IMAGE_COLOR;\n case 1: default: return OF_IMAGE_GRAYSCALE;\n }" (switch) "switch" (parenthesized_expression) "(getChannels(cvImageType))" (() "(" (call_expression) "getChannels(cvImageType)" (identifier) "getChannels" (argument_list) "(cvImageType)" (() "(" (identifier) "cvImageType" ()) ")" ()) ")" (compound_statement) "{\n case 4: return OF_IMAGE_COLOR_ALPHA;\n case 3: return OF_IMAGE_COLOR;\n case 1: default: return OF_IMAGE_GRAYSCALE;\n }" ({) "{" (case_statement) "case 4: return OF_IMAGE_COLOR_ALPHA;" (case) "case" (number_literal) "4" (:) ":" (return_statement) "return OF_IMAGE_COLOR_ALPHA;" (return) "return" (identifier) "OF_IMAGE_COLOR_ALPHA" (;) ";" (case_statement) "case 3: return OF_IMAGE_COLOR;" (case) "case" (number_literal) "3" (:) ":" (return_statement) "return OF_IMAGE_COLOR;" (return) "return" (identifier) "OF_IMAGE_COLOR" (;) ";" (case_statement) "case 1:" (case) "case" (number_literal) "1" (:) ":" (case_statement) "default: return OF_IMAGE_GRAYSCALE;" (default) "default" (:) ":" (return_statement) "return OF_IMAGE_GRAYSCALE;" (return) "return" (identifier) "OF_IMAGE_GRAYSCALE" (;) ";" (}) "}" (}) "}" (function_definition) "inline int getGlImageType(int cvImageType) {\n int channels = getChannels(cvImageType);\n int depth = getDepth(cvImageType);\n switch(depth) {\n case CV_8U:\n switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }\n#ifndef TARGET_OPENGLES\n case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }\n#endif\n }\n return 0;\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "int" (function_declarator) "getGlImageType(int cvImageType)" (identifier) "getGlImageType" (parameter_list) "(int cvImageType)" (() "(" (parameter_declaration) "int cvImageType" (primitive_type) "int" (identifier) "cvImageType" ()) ")" (compound_statement) "{\n int channels = getChannels(cvImageType);\n int depth = getDepth(cvImageType);\n switch(depth) {\n case CV_8U:\n switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }\n#ifndef TARGET_OPENGLES\n case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }\n#endif\n }\n return 0;\n }" ({) "{" (declaration) "int channels = getChannels(cvImageType);" (primitive_type) "int" (init_declarator) "channels = getChannels(cvImageType)" (identifier) "channels" (=) "=" (call_expression) "getChannels(cvImageType)" (identifier) "getChannels" (argument_list) "(cvImageType)" (() "(" (identifier) "cvImageType" ()) ")" (;) ";" (declaration) "int depth = getDepth(cvImageType);" (primitive_type) "int" (init_declarator) "depth = getDepth(cvImageType)" (identifier) "depth" (=) "=" (call_expression) "getDepth(cvImageType)" (identifier) "getDepth" (argument_list) "(cvImageType)" (() "(" (identifier) "cvImageType" ()) ")" (;) ";" (switch_statement) "switch(depth) {\n case CV_8U:\n switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }\n#ifndef TARGET_OPENGLES\n case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }\n#endif\n }" (switch) "switch" (parenthesized_expression) "(depth)" (() "(" (identifier) "depth" ()) ")" (compound_statement) "{\n case CV_8U:\n switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }\n#ifndef TARGET_OPENGLES\n case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }\n#endif\n }" ({) "{" (case_statement) "case CV_8U:\n switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }" (case) "case" (identifier) "CV_8U" (:) ":" (switch_statement) "switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }" (switch) "switch" (parenthesized_expression) "(channels)" (() "(" (identifier) "channels" ()) ")" (compound_statement) "{\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }" ({) "{" (case_statement) "case 1: return GL_LUMINANCE;" (case) "case" (number_literal) "1" (:) ":" (return_statement) "return GL_LUMINANCE;" (return) "return" (identifier) "GL_LUMINANCE" (;) ";" (case_statement) "case 3: return GL_RGB;" (case) "case" (number_literal) "3" (:) ":" (return_statement) "return GL_RGB;" (return) "return" (identifier) "GL_RGB" (;) ";" (case_statement) "case 4: return GL_RGBA;" (case) "case" (number_literal) "4" (:) ":" (return_statement) "return GL_RGBA;" (return) "return" (identifier) "GL_RGBA" (;) ";" (}) "}" (preproc_ifdef) "#ifndef TARGET_OPENGLES\n case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }\n#endif" (#ifndef) "#ifndef" (identifier) "TARGET_OPENGLES" (case_statement) "case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }" (case) "case" (identifier) "CV_32F" (:) ":" (switch_statement) "switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }" (switch) "switch" (parenthesized_expression) "(channels)" (() "(" (identifier) "channels" ()) ")" (compound_statement) "{\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }" ({) "{" (case_statement) "case 1: return GL_LUMINANCE32F_ARB;" (case) "case" (number_literal) "1" (:) ":" (return_statement) "return GL_LUMINANCE32F_ARB;" (return) "return" (identifier) "GL_LUMINANCE32F_ARB" (;) ";" (case_statement) "case 3: return GL_RGB32F;" (case) "case" (number_literal) "3" (:) ":" (return_statement) "return GL_RGB32F;" (return) "return" (identifier) "GL_RGB32F" (;) ";" (case_statement) "case 4: return GL_RGBA32F;" (case) "case" (number_literal) "4" (:) ":" (return_statement) "return GL_RGBA32F;" (return) "return" (identifier) "GL_RGBA32F" (;) ";" (}) "}" (#endif) "#endif" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (comment) "// allocation" (comment) "// only happens when necessary" (expression_statement) "template <class T> inline void allocate(T& img, int width, int height, int cvType)" (binary_expression) "template <class T> inline void allocate(T& img, int width, int height, int cvType)" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (ERROR) "inline void" (identifier) "inline" (identifier) "void" (call_expression) "allocate(T& img, int width, int height, int cvType)" (identifier) "allocate" (argument_list) "(T& img, int width, int height, int cvType)" (() "(" (binary_expression) "T& img" (identifier) "T" (&) "&" (identifier) "img" (,) "," (ERROR) "int" (identifier) "int" (identifier) "width" (,) "," (ERROR) "int" (identifier) "int" (identifier) "height" (,) "," (ERROR) "int" (identifier) "int" (identifier) "cvType" ()) ")" (;) "" (compound_statement) "{\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getOfImageType(cvType));\n }\n }" ({) "{" (if_statement) "if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getOfImageType(cvType));\n }" (if) "if" (parenthesized_expression) "(!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)" (() "(" (binary_expression) "!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType" (binary_expression) "!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height" (binary_expression) "!img.isAllocated() ||\n getWidth(img) != width" (unary_expression) "!img.isAllocated()" (!) "!" (call_expression) "img.isAllocated()" (field_expression) "img.isAllocated" (identifier) "img" (.) "." (field_identifier) "isAllocated" (argument_list) "()" (() "(" ()) ")" (||) "||" (binary_expression) "getWidth(img) != width" (call_expression) "getWidth(img)" (identifier) "getWidth" (argument_list) "(img)" (() "(" (identifier) "img" ()) ")" (!=) "!=" (identifier) "width" (||) "||" (binary_expression) "getHeight(img) != height" (call_expression) "getHeight(img)" (identifier) "getHeight" (argument_list) "(img)" (() "(" (identifier) "img" ()) ")" (!=) "!=" (identifier) "height" (||) "||" (binary_expression) "getCvImageType(img) != cvType" (call_expression) "getCvImageType(img)" (identifier) "getCvImageType" (argument_list) "(img)" (() "(" (identifier) "img" ()) ")" (!=) "!=" (identifier) "cvType" ()) ")" (compound_statement) "{\n img.allocate(width, height, getOfImageType(cvType));\n }" ({) "{" (expression_statement) "img.allocate(width, height, getOfImageType(cvType));" (call_expression) "img.allocate(width, height, getOfImageType(cvType))" (field_expression) "img.allocate" (identifier) "img" (.) "." (field_identifier) "allocate" (argument_list) "(width, height, getOfImageType(cvType))" (() "(" (identifier) "width" (,) "," (identifier) "height" (,) "," (call_expression) "getOfImageType(cvType)" (identifier) "getOfImageType" (argument_list) "(cvType)" (() "(" (identifier) "cvType" ()) ")" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "inline void allocate(ofTexture& img, int width, int height, int cvType) {\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getGlImageType(cvType));\n }\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "allocate(ofTexture& img, int width, int height, int cvType)" (identifier) "allocate" (parameter_list) "(ofTexture& img, int width, int height, int cvType)" (() "(" (parameter_declaration) "ofTexture& img" (type_identifier) "ofTexture" (ERROR) "&" (&) "&" (identifier) "img" (,) "," (parameter_declaration) "int width" (primitive_type) "int" (identifier) "width" (,) "," (parameter_declaration) "int height" (primitive_type) "int" (identifier) "height" (,) "," (parameter_declaration) "int cvType" (primitive_type) "int" (identifier) "cvType" ()) ")" (compound_statement) "{\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getGlImageType(cvType));\n }\n }" ({) "{" (if_statement) "if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getGlImageType(cvType));\n }" (if) "if" (parenthesized_expression) "(!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)" (() "(" (binary_expression) "!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType" (binary_expression) "!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height" (binary_expression) "!img.isAllocated() ||\n getWidth(img) != width" (unary_expression) "!img.isAllocated()" (!) "!" (call_expression) "img.isAllocated()" (field_expression) "img.isAllocated" (identifier) "img" (.) "." (field_identifier) "isAllocated" (argument_list) "()" (() "(" ()) ")" (||) "||" (binary_expression) "getWidth(img) != width" (call_expression) "getWidth(img)" (identifier) "getWidth" (argument_list) "(img)" (() "(" (identifier) "img" ()) ")" (!=) "!=" (identifier) "width" (||) "||" (binary_expression) "getHeight(img) != height" (call_expression) "getHeight(img)" (identifier) "getHeight" (argument_list) "(img)" (() "(" (identifier) "img" ()) ")" (!=) "!=" (identifier) "height" (||) "||" (binary_expression) "getCvImageType(img) != cvType" (call_expression) "getCvImageType(img)" (identifier) "getCvImageType" (argument_list) "(img)" (() "(" (identifier) "img" ()) ")" (!=) "!=" (identifier) "cvType" ()) ")" (compound_statement) "{\n img.allocate(width, height, getGlImageType(cvType));\n }" ({) "{" (expression_statement) "img.allocate(width, height, getGlImageType(cvType));" (call_expression) "img.allocate(width, height, getGlImageType(cvType))" (field_expression) "img.allocate" (identifier) "img" (.) "." (field_identifier) "allocate" (argument_list) "(width, height, getGlImageType(cvType))" (() "(" (identifier) "width" (,) "," (identifier) "height" (,) "," (call_expression) "getGlImageType(cvType)" (identifier) "getGlImageType" (argument_list) "(cvType)" (() "(" (identifier) "cvType" ()) ")" ()) ")" (;) ";" (}) "}" (}) "}" (function_definition) "inline void allocate(cv::Mat& img, int width, int height, int cvType) {\n if (getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType) {\n img.create(height, width, cvType);\n }\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "allocate(cv::Mat& img, int width, int height, int cvType)" (identifier) "allocate" (parameter_list) "(cv::Mat& img, int width, int height, int cvType)" (() "(" (parameter_declaration) "cv::Mat& img" (type_identifier) "cv" (ERROR) "::Mat&" (:) ":" (:) ":" (identifier) "Mat" (&) "&" (identifier) "img" (,) "," (parameter_declaration) "int width" (primitive_type) "int" (identifier) "width" (,) "," (parameter_declaration) "int height" (primitive_type) "int" (identifier) "height" (,) "," (parameter_declaration) "int cvType" (primitive_type) "int" (identifier) "cvType" ()) ")" (compound_statement) "{\n if (getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType) {\n img.create(height, width, cvType);\n }\n }" ({) "{" (if_statement) "if (getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType) {\n img.create(height, width, cvType);\n }" (if) "if" (parenthesized_expression) "(getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)" (() "(" (binary_expression) "getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType" (binary_expression) "getWidth(img) != width ||\n getHeight(img) != height" (binary_expression) "getWidth(img) != width" (call_expression) "getWidth(img)" (identifier) "getWidth" (argument_list) "(img)" (() "(" (identifier) "img" ()) ")" (!=) "!=" (identifier) "width" (||) "||" (binary_expression) "getHeight(img) != height" (call_expression) "getHeight(img)" (identifier) "getHeight" (argument_list) "(img)" (() "(" (identifier) "img" ()) ")" (!=) "!=" (identifier) "height" (||) "||" (binary_expression) "getCvImageType(img) != cvType" (call_expression) "getCvImageType(img)" (identifier) "getCvImageType" (argument_list) "(img)" (() "(" (identifier) "img" ()) ")" (!=) "!=" (identifier) "cvType" ()) ")" (compound_statement) "{\n img.create(height, width, cvType);\n }" ({) "{" (expression_statement) "img.create(height, width, cvType);" (call_expression) "img.create(height, width, cvType)" (field_expression) "img.create" (identifier) "img" (.) "." (field_identifier) "create" (argument_list) "(height, width, cvType)" (() "(" (identifier) "height" (,) "," (identifier) "width" (,) "," (identifier) "cvType" ()) ")" (;) ";" (}) "}" (}) "}" (comment) "// ofVideoPlayer/Grabber can't be allocated, so we assume we don't need to do anything" (function_definition) "inline void allocate(ofBaseVideoDraws & img, int width, int height, int cvType) {}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "allocate(ofBaseVideoDraws & img, int width, int height, int cvType)" (identifier) "allocate" (parameter_list) "(ofBaseVideoDraws & img, int width, int height, int cvType)" (() "(" (parameter_declaration) "ofBaseVideoDraws & img" (type_identifier) "ofBaseVideoDraws" (ERROR) "&" (&) "&" (identifier) "img" (,) "," (parameter_declaration) "int width" (primitive_type) "int" (identifier) "width" (,) "," (parameter_declaration) "int height" (primitive_type) "int" (identifier) "height" (,) "," (parameter_declaration) "int cvType" (primitive_type) "int" (identifier) "cvType" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (function_definition) "inline void allocate(ofVideoPlayer & img, int width, int height, int cvType) {}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "allocate(ofVideoPlayer & img, int width, int height, int cvType)" (identifier) "allocate" (parameter_list) "(ofVideoPlayer & img, int width, int height, int cvType)" (() "(" (parameter_declaration) "ofVideoPlayer & img" (type_identifier) "ofVideoPlayer" (ERROR) "&" (&) "&" (identifier) "img" (,) "," (parameter_declaration) "int width" (primitive_type) "int" (identifier) "width" (,) "," (parameter_declaration) "int height" (primitive_type) "int" (identifier) "height" (,) "," (parameter_declaration) "int cvType" (primitive_type) "int" (identifier) "cvType" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (function_definition) "inline void allocate(ofVideoGrabber & img, int width, int height, int cvType) {}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "allocate(ofVideoGrabber & img, int width, int height, int cvType)" (identifier) "allocate" (parameter_list) "(ofVideoGrabber & img, int width, int height, int cvType)" (() "(" (parameter_declaration) "ofVideoGrabber & img" (type_identifier) "ofVideoGrabber" (ERROR) "&" (&) "&" (identifier) "img" (,) "," (parameter_declaration) "int width" (primitive_type) "int" (identifier) "width" (,) "," (parameter_declaration) "int height" (primitive_type) "int" (identifier) "height" (,) "," (parameter_declaration) "int cvType" (primitive_type) "int" (identifier) "cvType" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (function_definition) "inline void allocate(const ofBaseVideoDraws & img, int width, int height, int cvType) {}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "allocate(const ofBaseVideoDraws & img, int width, int height, int cvType)" (identifier) "allocate" (parameter_list) "(const ofBaseVideoDraws & img, int width, int height, int cvType)" (() "(" (parameter_declaration) "const ofBaseVideoDraws & img" (type_qualifier) "const" (const) "const" (type_identifier) "ofBaseVideoDraws" (ERROR) "&" (&) "&" (identifier) "img" (,) "," (parameter_declaration) "int width" (primitive_type) "int" (identifier) "width" (,) "," (parameter_declaration) "int height" (primitive_type) "int" (identifier) "height" (,) "," (parameter_declaration) "int cvType" (primitive_type) "int" (identifier) "cvType" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (function_definition) "inline void allocate(const ofVideoPlayer & img, int width, int height, int cvType) {}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "allocate(const ofVideoPlayer & img, int width, int height, int cvType)" (identifier) "allocate" (parameter_list) "(const ofVideoPlayer & img, int width, int height, int cvType)" (() "(" (parameter_declaration) "const ofVideoPlayer & img" (type_qualifier) "const" (const) "const" (type_identifier) "ofVideoPlayer" (ERROR) "&" (&) "&" (identifier) "img" (,) "," (parameter_declaration) "int width" (primitive_type) "int" (identifier) "width" (,) "," (parameter_declaration) "int height" (primitive_type) "int" (identifier) "height" (,) "," (parameter_declaration) "int cvType" (primitive_type) "int" (identifier) "cvType" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (function_definition) "inline void allocate(const ofVideoGrabber & img, int width, int height, int cvType) {}" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (function_declarator) "allocate(const ofVideoGrabber & img, int width, int height, int cvType)" (identifier) "allocate" (parameter_list) "(const ofVideoGrabber & img, int width, int height, int cvType)" (() "(" (parameter_declaration) "const ofVideoGrabber & img" (type_qualifier) "const" (const) "const" (type_identifier) "ofVideoGrabber" (ERROR) "&" (&) "&" (identifier) "img" (,) "," (parameter_declaration) "int width" (primitive_type) "int" (identifier) "width" (,) "," (parameter_declaration) "int height" (primitive_type) "int" (identifier) "height" (,) "," (parameter_declaration) "int cvType" (primitive_type) "int" (identifier) "cvType" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (comment) "// imitate() is good for preparing buffers" (comment) "// it's like allocate(), but uses the size and type of the original as a reference" (comment) "// like allocate(), the image being allocated is the first argument " (comment) "// this version copies size, but manually specifies mirror's image type" (expression_statement) "template <class M, class O> void imitate(M& mirror, const O& original, int mirrorCvImageType)" (comma_expression) "template <class M, class O> void imitate(M& mirror, const O& original, int mirrorCvImageType)" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "M" (identifier) "M" (,) "," (binary_expression) "class O> void imitate(M& mirror, const O& original, int mirrorCvImageType)" (identifier) "class" (ERROR) "O" (identifier) "O" (>) ">" (ERROR) "void" (identifier) "void" (call_expression) "imitate(M& mirror, const O& original, int mirrorCvImageType)" (identifier) "imitate" (argument_list) "(M& mirror, const O& original, int mirrorCvImageType)" (() "(" (binary_expression) "M& mirror" (identifier) "M" (&) "&" (identifier) "mirror" (,) "," (binary_expression) "const O& original" (identifier) "const" (ERROR) "O" (identifier) "O" (&) "&" (identifier) "original" (,) "," (ERROR) "int" (identifier) "int" (identifier) "mirrorCvImageType" ()) ")" (;) "" (compound_statement) "{\n int ow = getWidth(original), oh = getHeight(original);\n allocate(mirror, ow, oh, mirrorCvImageType);\n }" ({) "{" (declaration) "int ow = getWidth(original), oh = getHeight(original);" (primitive_type) "int" (init_declarator) "ow = getWidth(original)" (identifier) "ow" (=) "=" (call_expression) "getWidth(original)" (identifier) "getWidth" (argument_list) "(original)" (() "(" (identifier) "original" ()) ")" (,) "," (init_declarator) "oh = getHeight(original)" (identifier) "oh" (=) "=" (call_expression) "getHeight(original)" (identifier) "getHeight" (argument_list) "(original)" (() "(" (identifier) "original" ()) ")" (;) ";" (expression_statement) "allocate(mirror, ow, oh, mirrorCvImageType);" (call_expression) "allocate(mirror, ow, oh, mirrorCvImageType)" (identifier) "allocate" (argument_list) "(mirror, ow, oh, mirrorCvImageType)" (() "(" (identifier) "mirror" (,) "," (identifier) "ow" (,) "," (identifier) "oh" (,) "," (identifier) "mirrorCvImageType" ()) ")" (;) ";" (}) "}" (comment) "// this version copies size and image type" (expression_statement) "template <class M, class O> void imitate(M& mirror, const O& original) {\n imitate(mirror, original, getCvImageType(original));" (comma_expression) "template <class M, class O> void imitate(M& mirror, const O& original) {\n imitate(mirror, original, getCvImageType(original))" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "M" (identifier) "M" (,) "," (binary_expression) "class O> void imitate(M& mirror, const O& original) {\n imitate(mirror, original, getCvImageType(original))" (identifier) "class" (ERROR) "O" (identifier) "O" (>) ">" (ERROR) "void imitate(M& mirror, const O& original) {" (identifier) "void" (call_expression) "imitate(M& mirror, const O& original)" (identifier) "imitate" (argument_list) "(M& mirror, const O& original)" (() "(" (binary_expression) "M& mirror" (identifier) "M" (&) "&" (identifier) "mirror" (,) "," (binary_expression) "const O& original" (identifier) "const" (ERROR) "O" (identifier) "O" (&) "&" (identifier) "original" ()) ")" ({) "{" (call_expression) "imitate(mirror, original, getCvImageType(original))" (identifier) "imitate" (argument_list) "(mirror, original, getCvImageType(original))" (() "(" (identifier) "mirror" (,) "," (identifier) "original" (,) "," (call_expression) "getCvImageType(original)" (identifier) "getCvImageType" (argument_list) "(original)" (() "(" (identifier) "original" ()) ")" ()) ")" (;) ";" (}) "}" (comment) "// maximum possible values for that depth or matrix" (declaration) "float getMaxVal(int cvDepth);" (primitive_type) "float" (function_declarator) "getMaxVal(int cvDepth)" (identifier) "getMaxVal" (parameter_list) "(int cvDepth)" (() "(" (parameter_declaration) "int cvDepth" (primitive_type) "int" (identifier) "cvDepth" ()) ")" (;) ";" (declaration) "float getMaxVal(const cv::Mat& mat);" (primitive_type) "float" (function_declarator) "getMaxVal(const cv::Mat& mat)" (identifier) "getMaxVal" (parameter_list) "(const cv::Mat& mat)" (() "(" (parameter_declaration) "const cv::Mat& mat" (type_qualifier) "const" (const) "const" (type_identifier) "cv" (ERROR) "::Mat&" (:) ":" (:) ":" (identifier) "Mat" (&) "&" (identifier) "mat" ()) ")" (;) ";" (declaration) "int getTargetChannelsFromCode(int conversionCode);" (primitive_type) "int" (function_declarator) "getTargetChannelsFromCode(int conversionCode)" (identifier) "getTargetChannelsFromCode" (parameter_list) "(int conversionCode)" (() "(" (parameter_declaration) "int conversionCode" (primitive_type) "int" (identifier) "conversionCode" ()) ")" (;) ";" (comment) "// toCv functions" (comment) "// for conversion functions, the signature reveals the behavior:" (comment) "// 1 Type& argument // creates a shallow copy of the data" (comment) "// 2 const Type& argument // creates a deep copy of the data" (comment) "// 3 Type argument // creates a deep copy of the data" (comment) "// style 1 is used when possible (for Mat conversion). style 2 is used when" (comment) "// dealing with a lot of data that can't/shouldn't be shallow copied. style 3" (comment) "// is used for small objects where the compiler can optimize the copying if" (comment) "// necessary. the reference is avoided to make inline toCv/toOf use easier." (labeled_statement) "cv::Mat toCv(cv::Mat& mat);" (statement_identifier) "cv" (ERROR) "::Mat toCv(cv:" (:) ":" (:) ":" (type_identifier) "Mat" (identifier) "toCv" (() "(" (type_identifier) "cv" (:) ":" (:) ":" (expression_statement) "Mat& mat);" (binary_expression) "Mat& mat" (identifier) "Mat" (&) "&" (identifier) "mat" (ERROR) ")" ()) ")" (;) ";" (labeled_statement) "cv::Mat toCv(const cv::Mat& mat);" (statement_identifier) "cv" (ERROR) "::Mat toCv(const cv:" (:) ":" (:) ":" (type_identifier) "Mat" (identifier) "toCv" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "cv" (:) ":" (:) ":" (expression_statement) "Mat& mat);" (binary_expression) "Mat& mat" (identifier) "Mat" (&) "&" (identifier) "mat" (ERROR) ")" ()) ")" (;) ";" (ERROR) "template <class T> inline cv::Mat toCv(ofPixels_<T>& pix)" (binary_expression) "template <class T> inline cv::Mat toCv(ofPixels_<T>& pix)" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (ERROR) "inline cv::Mat" (identifier) "inline" (identifier) "cv" (:) ":" (:) ":" (identifier) "Mat" (call_expression) "toCv(ofPixels_<T>& pix)" (identifier) "toCv" (argument_list) "(ofPixels_<T>& pix)" (() "(" (binary_expression) "ofPixels_<T>& pix" (binary_expression) "ofPixels_<T" (identifier) "ofPixels_" (<) "<" (identifier) "T" (>) ">" (pointer_expression) "& pix" (&) "&" (identifier) "pix" ()) ")" (compound_statement) "{\n return cv::Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), pix.getData(), 0);\n }" ({) "{" (return_statement) "return cv::Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), pix.getData(), 0);" (return) "return" (ERROR) "cv::" (identifier) "cv" (:) ":" (:) ":" (call_expression) "Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), pix.getData(), 0)" (identifier) "Mat" (argument_list) "(pix.getHeight(), pix.getWidth(), getCvImageType(pix), pix.getData(), 0)" (() "(" (call_expression) "pix.getHeight()" (field_expression) "pix.getHeight" (identifier) "pix" (.) "." (field_identifier) "getHeight" (argument_list) "()" (() "(" ()) ")" (,) "," (call_expression) "pix.getWidth()" (field_expression) "pix.getWidth" (identifier) "pix" (.) "." (field_identifier) "getWidth" (argument_list) "()" (() "(" ()) ")" (,) "," (call_expression) "getCvImageType(pix)" (identifier) "getCvImageType" (argument_list) "(pix)" (() "(" (identifier) "pix" ()) ")" (,) "," (call_expression) "pix.getData()" (field_expression) "pix.getData" (identifier) "pix" (.) "." (field_identifier) "getData" (argument_list) "()" (() "(" ()) ")" (,) "," (number_literal) "0" ()) ")" (;) ";" (}) "}" (ERROR) "template <class T> inline cv::Mat toCv(const ofPixels_<T>& pix)" (binary_expression) "template <class T> inline cv::Mat toCv(const ofPixels_<T>& pix)" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (ERROR) "inline cv::Mat" (identifier) "inline" (identifier) "cv" (:) ":" (:) ":" (identifier) "Mat" (call_expression) "toCv(const ofPixels_<T>& pix)" (identifier) "toCv" (argument_list) "(const ofPixels_<T>& pix)" (() "(" (ERROR) "const" (identifier) "const" (binary_expression) "ofPixels_<T>& pix" (binary_expression) "ofPixels_<T" (identifier) "ofPixels_" (<) "<" (identifier) "T" (>) ">" (pointer_expression) "& pix" (&) "&" (identifier) "pix" ()) ")" (compound_statement) "{\n return cv::Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0).clone();\n }" ({) "{" (return_statement) "return cv::Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0).clone();" (return) "return" (ERROR) "cv::" (identifier) "cv" (:) ":" (:) ":" (call_expression) "Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0).clone()" (field_expression) "Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0).clone" (call_expression) "Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0)" (identifier) "Mat" (argument_list) "(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0)" (() "(" (call_expression) "pix.getHeight()" (field_expression) "pix.getHeight" (identifier) "pix" (.) "." (field_identifier) "getHeight" (argument_list) "()" (() "(" ()) ")" (,) "," (call_expression) "pix.getWidth()" (field_expression) "pix.getWidth" (identifier) "pix" (.) "." (field_identifier) "getWidth" (argument_list) "()" (() "(" ()) ")" (,) "," (call_expression) "getCvImageType(pix)" (identifier) "getCvImageType" (argument_list) "(pix)" (() "(" (identifier) "pix" ()) ")" (,) "," (binary_expression) "const_cast<T*>(pix.getData())" (binary_expression) "const_cast<T" (identifier) "const_cast" (<) "<" (identifier) "T" (ERROR) "*" (*) "*" (>) ">" (parenthesized_expression) "(pix.getData())" (() "(" (call_expression) "pix.getData()" (field_expression) "pix.getData" (identifier) "pix" (.) "." (field_identifier) "getData" (argument_list) "()" (() "(" ()) ")" ()) ")" (,) "," (number_literal) "0" ()) ")" (.) "." (field_identifier) "clone" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (ERROR) "template <class T> inline cv::Mat toCv(ofBaseHasPixels_<T>& img)" (binary_expression) "template <class T> inline cv::Mat toCv(ofBaseHasPixels_<T>& img)" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (ERROR) "inline cv::Mat" (identifier) "inline" (identifier) "cv" (:) ":" (:) ":" (identifier) "Mat" (call_expression) "toCv(ofBaseHasPixels_<T>& img)" (identifier) "toCv" (argument_list) "(ofBaseHasPixels_<T>& img)" (() "(" (binary_expression) "ofBaseHasPixels_<T>& img" (binary_expression) "ofBaseHasPixels_<T" (identifier) "ofBaseHasPixels_" (<) "<" (identifier) "T" (>) ">" (pointer_expression) "& img" (&) "&" (identifier) "img" ()) ")" (compound_statement) "{\n return toCv(img.getPixels());\n }" ({) "{" (return_statement) "return toCv(img.getPixels());" (return) "return" (call_expression) "toCv(img.getPixels())" (identifier) "toCv" (argument_list) "(img.getPixels())" (() "(" (call_expression) "img.getPixels()" (field_expression) "img.getPixels" (identifier) "img" (.) "." (field_identifier) "getPixels" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (ERROR) "template <class T> inline cv::Mat toCv(const ofBaseHasPixels_<T>& img)" (binary_expression) "template <class T> inline cv::Mat toCv(const ofBaseHasPixels_<T>& img)" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (ERROR) "inline cv::Mat" (identifier) "inline" (identifier) "cv" (:) ":" (:) ":" (identifier) "Mat" (call_expression) "toCv(const ofBaseHasPixels_<T>& img)" (identifier) "toCv" (argument_list) "(const ofBaseHasPixels_<T>& img)" (() "(" (ERROR) "const" (identifier) "const" (binary_expression) "ofBaseHasPixels_<T>& img" (binary_expression) "ofBaseHasPixels_<T" (identifier) "ofBaseHasPixels_" (<) "<" (identifier) "T" (>) ">" (pointer_expression) "& img" (&) "&" (identifier) "img" ()) ")" (compound_statement) "{\n return toCv(img.getPixels());\n }" ({) "{" (return_statement) "return toCv(img.getPixels());" (return) "return" (call_expression) "toCv(img.getPixels())" (identifier) "toCv" (argument_list) "(img.getPixels())" (() "(" (call_expression) "img.getPixels()" (field_expression) "img.getPixels" (identifier) "img" (.) "." (field_identifier) "getPixels" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (labeled_statement) "cv::Mat toCv(ofMesh& mesh);" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (declaration) "Mat toCv(ofMesh& mesh);" (type_identifier) "Mat" (function_declarator) "toCv(ofMesh& mesh)" (identifier) "toCv" (parameter_list) "(ofMesh& mesh)" (() "(" (parameter_declaration) "ofMesh& mesh" (type_identifier) "ofMesh" (ERROR) "&" (&) "&" (identifier) "mesh" ()) ")" (;) ";" (labeled_statement) "cv::Point2f toCv(glm::vec2 vec);" (statement_identifier) "cv" (ERROR) "::Point2f toCv(glm:" (:) ":" (:) ":" (type_identifier) "Point2f" (identifier) "toCv" (() "(" (type_identifier) "glm" (:) ":" (:) ":" (declaration) "vec2 vec);" (type_identifier) "vec2" (identifier) "vec" (ERROR) ")" ()) ")" (;) ";" (labeled_statement) "cv::Point3f toCv(glm::vec3 vec);" (statement_identifier) "cv" (ERROR) "::Point3f toCv(glm:" (:) ":" (:) ":" (type_identifier) "Point3f" (identifier) "toCv" (() "(" (type_identifier) "glm" (:) ":" (:) ":" (declaration) "vec3 vec);" (type_identifier) "vec3" (identifier) "vec" (ERROR) ")" ()) ")" (;) ";" (labeled_statement) "cv::Rect toCv(ofRectangle rect);" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (declaration) "Rect toCv(ofRectangle rect);" (type_identifier) "Rect" (function_declarator) "toCv(ofRectangle rect)" (identifier) "toCv" (parameter_list) "(ofRectangle rect)" (() "(" (parameter_declaration) "ofRectangle rect" (type_identifier) "ofRectangle" (identifier) "rect" ()) ")" (;) ";" (labeled_statement) "std::vector<cv::Point2f> toCv(const ofPolyline& polyline);" (statement_identifier) "std" (ERROR) "::vector<cv:" (:) ":" (:) ":" (binary_expression) "vector<cv" (identifier) "vector" (<) "<" (identifier) "cv" (:) ":" (:) ":" (expression_statement) "Point2f> toCv(const ofPolyline& polyline);" (binary_expression) "Point2f> toCv(const ofPolyline& polyline)" (identifier) "Point2f" (>) ">" (call_expression) "toCv(const ofPolyline& polyline)" (identifier) "toCv" (argument_list) "(const ofPolyline& polyline)" (() "(" (ERROR) "const" (identifier) "const" (binary_expression) "ofPolyline& polyline" (identifier) "ofPolyline" (&) "&" (identifier) "polyline" ()) ")" (;) ";" (labeled_statement) "std::vector<cv::Point2f> toCv(const std::vector<glm::vec2>& points);" (statement_identifier) "std" (ERROR) "::vector<cv:" (:) ":" (:) ":" (binary_expression) "vector<cv" (identifier) "vector" (<) "<" (identifier) "cv" (:) ":" (:) ":" (expression_statement) "Point2f> toCv(const std::vector<glm::vec2>& points);" (binary_expression) "Point2f> toCv(const std::vector<glm::vec2>& points)" (identifier) "Point2f" (>) ">" (call_expression) "toCv(const std::vector<glm::vec2>& points)" (identifier) "toCv" (argument_list) "(const std::vector<glm::vec2>& points)" (() "(" (ERROR) "const std::vector<glm::" (identifier) "const" (identifier) "std" (:) ":" (:) ":" (binary_expression) "vector<glm" (identifier) "vector" (<) "<" (identifier) "glm" (:) ":" (:) ":" (binary_expression) "vec2>& points" (identifier) "vec2" (>) ">" (pointer_expression) "& points" (&) "&" (identifier) "points" ()) ")" (;) ";" (labeled_statement) "std::vector<cv::Point3f> toCv(const std::vector<glm::vec3>& points);" (statement_identifier) "std" (ERROR) "::vector<cv:" (:) ":" (:) ":" (binary_expression) "vector<cv" (identifier) "vector" (<) "<" (identifier) "cv" (:) ":" (:) ":" (expression_statement) "Point3f> toCv(const std::vector<glm::vec3>& points);" (binary_expression) "Point3f> toCv(const std::vector<glm::vec3>& points)" (identifier) "Point3f" (>) ">" (call_expression) "toCv(const std::vector<glm::vec3>& points)" (identifier) "toCv" (argument_list) "(const std::vector<glm::vec3>& points)" (() "(" (ERROR) "const std::vector<glm::" (identifier) "const" (identifier) "std" (:) ":" (:) ":" (binary_expression) "vector<glm" (identifier) "vector" (<) "<" (identifier) "glm" (:) ":" (:) ":" (binary_expression) "vec3>& points" (identifier) "vec3" (>) ">" (pointer_expression) "& points" (&) "&" (identifier) "points" ()) ")" (;) ";" (labeled_statement) "cv::Scalar toCv(ofColor color);" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (declaration) "Scalar toCv(ofColor color);" (type_identifier) "Scalar" (function_declarator) "toCv(ofColor color)" (identifier) "toCv" (parameter_list) "(ofColor color)" (() "(" (parameter_declaration) "ofColor color" (type_identifier) "ofColor" (identifier) "color" ()) ")" (;) ";" (comment) "// cross-toolkit, cross-bitdepth copying" (expression_statement) "template <class S, class D>\n void copy(S& src, D& dst, int dstDepth) {\n imitate(dst, src, getCvImageType(getChannels(src), dstDepth));" (update_expression) "template <class S, class D>\n void copy(S& src, D& dst, int dstDepth) {\n imitate(dst, src, getCvImageType(getChannels(src), dstDepth))" (binary_expression) "template <class S, class D>\n void copy(S& src, D& dst, int dstDepth) {\n imitate(dst, src, getCvImageType(getChannels(src), dstDepth))" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "S, class D" (identifier) "S" (,) "," (identifier) "class" (identifier) "D" (>) ">" (ERROR) "void copy(S& src, D& dst, int dstDepth) {" (identifier) "void" (call_expression) "copy(S& src, D& dst, int dstDepth)" (identifier) "copy" (argument_list) "(S& src, D& dst, int dstDepth)" (() "(" (binary_expression) "S& src" (identifier) "S" (&) "&" (identifier) "src" (,) "," (binary_expression) "D& dst" (identifier) "D" (&) "&" (identifier) "dst" (,) "," (ERROR) "int" (identifier) "int" (identifier) "dstDepth" ()) ")" ({) "{" (call_expression) "imitate(dst, src, getCvImageType(getChannels(src), dstDepth))" (identifier) "imitate" (argument_list) "(dst, src, getCvImageType(getChannels(src), dstDepth))" (() "(" (identifier) "dst" (,) "," (identifier) "src" (,) "," (call_expression) "getCvImageType(getChannels(src), dstDepth)" (identifier) "getCvImageType" (argument_list) "(getChannels(src), dstDepth)" (() "(" (call_expression) "getChannels(src)" (identifier) "getChannels" (argument_list) "(src)" (() "(" (identifier) "src" ()) ")" (,) "," (identifier) "dstDepth" ()) ")" ()) ")" (--) "" (;) ";" (labeled_statement) "cv::Mat srcMat = toCv(src);" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (declaration) "Mat srcMat = toCv(src);" (type_identifier) "Mat" (init_declarator) "srcMat = toCv(src)" (identifier) "srcMat" (=) "=" (call_expression) "toCv(src)" (identifier) "toCv" (argument_list) "(src)" (() "(" (identifier) "src" ()) ")" (;) ";" (labeled_statement) "cv::Mat dstMat = toCv(dst);" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (declaration) "Mat dstMat = toCv(dst);" (type_identifier) "Mat" (init_declarator) "dstMat = toCv(dst)" (identifier) "dstMat" (=) "=" (call_expression) "toCv(dst)" (identifier) "toCv" (argument_list) "(dst)" (() "(" (identifier) "dst" ()) ")" (;) ";" (if_statement) "if(srcMat.type() == dstMat.type()) {\n srcMat.copyTo(dstMat);\n } else {\n double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n srcMat.convertTo(dstMat, dstMat.depth(), alpha);\n }" (if) "if" (parenthesized_expression) "(srcMat.type() == dstMat.type())" (() "(" (binary_expression) "srcMat.type() == dstMat.type()" (call_expression) "srcMat.type()" (field_expression) "srcMat.type" (identifier) "srcMat" (.) "." (field_identifier) "type" (argument_list) "()" (() "(" ()) ")" (==) "==" (call_expression) "dstMat.type()" (field_expression) "dstMat.type" (identifier) "dstMat" (.) "." (field_identifier) "type" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n srcMat.copyTo(dstMat);\n }" ({) "{" (expression_statement) "srcMat.copyTo(dstMat);" (call_expression) "srcMat.copyTo(dstMat)" (field_expression) "srcMat.copyTo" (identifier) "srcMat" (.) "." (field_identifier) "copyTo" (argument_list) "(dstMat)" (() "(" (identifier) "dstMat" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n srcMat.convertTo(dstMat, dstMat.depth(), alpha);\n }" (else) "else" (compound_statement) "{\n double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n srcMat.convertTo(dstMat, dstMat.depth(), alpha);\n }" ({) "{" (declaration) "double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);" (primitive_type) "double" (init_declarator) "alpha = getMaxVal(dstMat) / getMaxVal(srcMat)" (identifier) "alpha" (=) "=" (binary_expression) "getMaxVal(dstMat) / getMaxVal(srcMat)" (call_expression) "getMaxVal(dstMat)" (identifier) "getMaxVal" (argument_list) "(dstMat)" (() "(" (identifier) "dstMat" ()) ")" (/) "/" (call_expression) "getMaxVal(srcMat)" (identifier) "getMaxVal" (argument_list) "(srcMat)" (() "(" (identifier) "srcMat" ()) ")" (;) ";" (expression_statement) "srcMat.convertTo(dstMat, dstMat.depth(), alpha);" (call_expression) "srcMat.convertTo(dstMat, dstMat.depth(), alpha)" (field_expression) "srcMat.convertTo" (identifier) "srcMat" (.) "." (field_identifier) "convertTo" (argument_list) "(dstMat, dstMat.depth(), alpha)" (() "(" (identifier) "dstMat" (,) "," (call_expression) "dstMat.depth()" (field_expression) "dstMat.depth" (identifier) "dstMat" (.) "." (field_identifier) "depth" (argument_list) "()" (() "(" ()) ")" (,) "," (identifier) "alpha" ()) ")" (;) ";" (}) "}" (ERROR) "}\n\n template <class S, class D>\n void copy(const S& src, D& dst, int dstDepth)" (}) "}" (binary_expression) "template <class S, class D>\n void copy(const S& src, D& dst, int dstDepth)" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "S, class D" (identifier) "S" (,) "," (identifier) "class" (identifier) "D" (>) ">" (ERROR) "void" (identifier) "void" (call_expression) "copy(const S& src, D& dst, int dstDepth)" (identifier) "copy" (argument_list) "(const S& src, D& dst, int dstDepth)" (() "(" (binary_expression) "const S& src" (identifier) "const" (ERROR) "S" (identifier) "S" (&) "&" (identifier) "src" (,) "," (binary_expression) "D& dst" (identifier) "D" (&) "&" (identifier) "dst" (,) "," (ERROR) "int" (identifier) "int" (identifier) "dstDepth" ()) ")" (compound_statement) "{\n imitate(dst, src, getCvImageType(getChannels(src), dstDepth));\n cv::Mat srcMat = toCv(src);\n cv::Mat dstMat = toCv(dst);\n if(srcMat.type() == dstMat.type()) {\n srcMat.copyTo(dstMat);\n } else {\n double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n srcMat.convertTo(dstMat, dstMat.depth(), alpha);\n }\n }" ({) "{" (expression_statement) "imitate(dst, src, getCvImageType(getChannels(src), dstDepth));" (call_expression) "imitate(dst, src, getCvImageType(getChannels(src), dstDepth))" (identifier) "imitate" (argument_list) "(dst, src, getCvImageType(getChannels(src), dstDepth))" (() "(" (identifier) "dst" (,) "," (identifier) "src" (,) "," (call_expression) "getCvImageType(getChannels(src), dstDepth)" (identifier) "getCvImageType" (argument_list) "(getChannels(src), dstDepth)" (() "(" (call_expression) "getChannels(src)" (identifier) "getChannels" (argument_list) "(src)" (() "(" (identifier) "src" ()) ")" (,) "," (identifier) "dstDepth" ()) ")" ()) ")" (;) ";" (labeled_statement) "cv::Mat srcMat = toCv(src);" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (declaration) "Mat srcMat = toCv(src);" (type_identifier) "Mat" (init_declarator) "srcMat = toCv(src)" (identifier) "srcMat" (=) "=" (call_expression) "toCv(src)" (identifier) "toCv" (argument_list) "(src)" (() "(" (identifier) "src" ()) ")" (;) ";" (labeled_statement) "cv::Mat dstMat = toCv(dst);" (statement_identifier) "cv" (:) ":" (ERROR) ":" (:) ":" (declaration) "Mat dstMat = toCv(dst);" (type_identifier) "Mat" (init_declarator) "dstMat = toCv(dst)" (identifier) "dstMat" (=) "=" (call_expression) "toCv(dst)" (identifier) "toCv" (argument_list) "(dst)" (() "(" (identifier) "dst" ()) ")" (;) ";" (if_statement) "if(srcMat.type() == dstMat.type()) {\n srcMat.copyTo(dstMat);\n } else {\n double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n srcMat.convertTo(dstMat, dstMat.depth(), alpha);\n }" (if) "if" (parenthesized_expression) "(srcMat.type() == dstMat.type())" (() "(" (binary_expression) "srcMat.type() == dstMat.type()" (call_expression) "srcMat.type()" (field_expression) "srcMat.type" (identifier) "srcMat" (.) "." (field_identifier) "type" (argument_list) "()" (() "(" ()) ")" (==) "==" (call_expression) "dstMat.type()" (field_expression) "dstMat.type" (identifier) "dstMat" (.) "." (field_identifier) "type" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n srcMat.copyTo(dstMat);\n }" ({) "{" (expression_statement) "srcMat.copyTo(dstMat);" (call_expression) "srcMat.copyTo(dstMat)" (field_expression) "srcMat.copyTo" (identifier) "srcMat" (.) "." (field_identifier) "copyTo" (argument_list) "(dstMat)" (() "(" (identifier) "dstMat" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n srcMat.convertTo(dstMat, dstMat.depth(), alpha);\n }" (else) "else" (compound_statement) "{\n double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n srcMat.convertTo(dstMat, dstMat.depth(), alpha);\n }" ({) "{" (declaration) "double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);" (primitive_type) "double" (init_declarator) "alpha = getMaxVal(dstMat) / getMaxVal(srcMat)" (identifier) "alpha" (=) "=" (binary_expression) "getMaxVal(dstMat) / getMaxVal(srcMat)" (call_expression) "getMaxVal(dstMat)" (identifier) "getMaxVal" (argument_list) "(dstMat)" (() "(" (identifier) "dstMat" ()) ")" (/) "/" (call_expression) "getMaxVal(srcMat)" (identifier) "getMaxVal" (argument_list) "(srcMat)" (() "(" (identifier) "srcMat" ()) ")" (;) ";" (expression_statement) "srcMat.convertTo(dstMat, dstMat.depth(), alpha);" (call_expression) "srcMat.convertTo(dstMat, dstMat.depth(), alpha)" (field_expression) "srcMat.convertTo" (identifier) "srcMat" (.) "." (field_identifier) "convertTo" (argument_list) "(dstMat, dstMat.depth(), alpha)" (() "(" (identifier) "dstMat" (,) "," (call_expression) "dstMat.depth()" (field_expression) "dstMat.depth" (identifier) "dstMat" (.) "." (field_identifier) "depth" (argument_list) "()" (() "(" ()) ")" (,) "," (identifier) "alpha" ()) ")" (;) ";" (}) "}" (}) "}" (comment) "// most of the time you want the destination to be the same as the source. but" (comment) "// sometimes your destination is a different depth, and copy() will notice and" (comment) "// do the conversion for you." (ERROR) "template <class S, class D>\n void copy(S& src, D& dst)" (binary_expression) "template <class S, class D>\n void copy(S& src, D& dst)" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "S, class D" (identifier) "S" (,) "," (identifier) "class" (identifier) "D" (>) ">" (ERROR) "void" (identifier) "void" (call_expression) "copy(S& src, D& dst)" (identifier) "copy" (argument_list) "(S& src, D& dst)" (() "(" (binary_expression) "S& src" (identifier) "S" (&) "&" (identifier) "src" (,) "," (binary_expression) "D& dst" (identifier) "D" (&) "&" (identifier) "dst" ()) ")" (compound_statement) "{\n int dstDepth = 0;\n if(getAllocated(dst)) {\n dstDepth = getDepth(dst);\n } else {\n dstDepth = getDepth(src);\n }\n copy(src, dst, dstDepth);\n }" ({) "{" (declaration) "int dstDepth = 0;" (primitive_type) "int" (init_declarator) "dstDepth = 0" (identifier) "dstDepth" (=) "=" (number_literal) "0" (;) ";" (if_statement) "if(getAllocated(dst)) {\n dstDepth = getDepth(dst);\n } else {\n dstDepth = getDepth(src);\n }" (if) "if" (parenthesized_expression) "(getAllocated(dst))" (() "(" (call_expression) "getAllocated(dst)" (identifier) "getAllocated" (argument_list) "(dst)" (() "(" (identifier) "dst" ()) ")" ()) ")" (compound_statement) "{\n dstDepth = getDepth(dst);\n }" ({) "{" (expression_statement) "dstDepth = getDepth(dst);" (assignment_expression) "dstDepth = getDepth(dst)" (identifier) "dstDepth" (=) "=" (call_expression) "getDepth(dst)" (identifier) "getDepth" (argument_list) "(dst)" (() "(" (identifier) "dst" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n dstDepth = getDepth(src);\n }" (else) "else" (compound_statement) "{\n dstDepth = getDepth(src);\n }" ({) "{" (expression_statement) "dstDepth = getDepth(src);" (assignment_expression) "dstDepth = getDepth(src)" (identifier) "dstDepth" (=) "=" (call_expression) "getDepth(src)" (identifier) "getDepth" (argument_list) "(src)" (() "(" (identifier) "src" ()) ")" (;) ";" (}) "}" (expression_statement) "copy(src, dst, dstDepth);" (call_expression) "copy(src, dst, dstDepth)" (identifier) "copy" (argument_list) "(src, dst, dstDepth)" (() "(" (identifier) "src" (,) "," (identifier) "dst" (,) "," (identifier) "dstDepth" ()) ")" (;) ";" (}) "}" (ERROR) "template <class S, class D>\n void copy(const S& src, D& dst)" (binary_expression) "template <class S, class D>\n void copy(const S& src, D& dst)" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "S, class D" (identifier) "S" (,) "," (identifier) "class" (identifier) "D" (>) ">" (ERROR) "void" (identifier) "void" (call_expression) "copy(const S& src, D& dst)" (identifier) "copy" (argument_list) "(const S& src, D& dst)" (() "(" (binary_expression) "const S& src" (identifier) "const" (ERROR) "S" (identifier) "S" (&) "&" (identifier) "src" (,) "," (binary_expression) "D& dst" (identifier) "D" (&) "&" (identifier) "dst" ()) ")" (compound_statement) "{\n int dstDepth = 0;\n if(getAllocated(dst)) {\n dstDepth = getDepth(dst);\n } else {\n dstDepth = getDepth(src);\n }\n copy(src, dst, dstDepth);\n }" ({) "{" (declaration) "int dstDepth = 0;" (primitive_type) "int" (init_declarator) "dstDepth = 0" (identifier) "dstDepth" (=) "=" (number_literal) "0" (;) ";" (if_statement) "if(getAllocated(dst)) {\n dstDepth = getDepth(dst);\n } else {\n dstDepth = getDepth(src);\n }" (if) "if" (parenthesized_expression) "(getAllocated(dst))" (() "(" (call_expression) "getAllocated(dst)" (identifier) "getAllocated" (argument_list) "(dst)" (() "(" (identifier) "dst" ()) ")" ()) ")" (compound_statement) "{\n dstDepth = getDepth(dst);\n }" ({) "{" (expression_statement) "dstDepth = getDepth(dst);" (assignment_expression) "dstDepth = getDepth(dst)" (identifier) "dstDepth" (=) "=" (call_expression) "getDepth(dst)" (identifier) "getDepth" (argument_list) "(dst)" (() "(" (identifier) "dst" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n dstDepth = getDepth(src);\n }" (else) "else" (compound_statement) "{\n dstDepth = getDepth(src);\n }" ({) "{" (expression_statement) "dstDepth = getDepth(src);" (assignment_expression) "dstDepth = getDepth(src)" (identifier) "dstDepth" (=) "=" (call_expression) "getDepth(src)" (identifier) "getDepth" (argument_list) "(src)" (() "(" (identifier) "src" ()) ")" (;) ";" (}) "}" (expression_statement) "copy(src, dst, dstDepth);" (call_expression) "copy(src, dst, dstDepth)" (identifier) "copy" (argument_list) "(src, dst, dstDepth)" (() "(" (identifier) "src" (,) "," (identifier) "dst" (,) "," (identifier) "dstDepth" ()) ")" (;) ";" (}) "}" (comment) "// toOf functions" (labeled_statement) "glm::vec2 toOf(cv::Point2f point);" (statement_identifier) "glm" (ERROR) "::vec2 toOf(cv:" (:) ":" (:) ":" (type_identifier) "vec2" (identifier) "toOf" (() "(" (type_identifier) "cv" (:) ":" (:) ":" (declaration) "Point2f point);" (type_identifier) "Point2f" (identifier) "point" (ERROR) ")" ()) ")" (;) ";" (labeled_statement) "glm::vec3 toOf(cv::Point3f point);" (statement_identifier) "glm" (ERROR) "::vec3 toOf(cv:" (:) ":" (:) ":" (type_identifier) "vec3" (identifier) "toOf" (() "(" (type_identifier) "cv" (:) ":" (:) ":" (declaration) "Point3f point);" (type_identifier) "Point3f" (identifier) "point" (ERROR) ")" ()) ")" (;) ";" (declaration) "ofRectangle toOf(cv::Rect rect);" (type_identifier) "ofRectangle" (function_declarator) "toOf(cv::Rect rect)" (identifier) "toOf" (parameter_list) "(cv::Rect rect)" (() "(" (parameter_declaration) "cv::Rect rect" (type_identifier) "cv" (ERROR) "::Rect" (:) ":" (:) ":" (identifier) "Rect" (identifier) "rect" ()) ")" (;) ";" (declaration) "ofPolyline toOf(cv::RotatedRect rect);" (type_identifier) "ofPolyline" (function_declarator) "toOf(cv::RotatedRect rect)" (identifier) "toOf" (parameter_list) "(cv::RotatedRect rect)" (() "(" (parameter_declaration) "cv::RotatedRect rect" (type_identifier) "cv" (ERROR) "::RotatedRect" (:) ":" (:) ":" (identifier) "RotatedRect" (identifier) "rect" ()) ")" (;) ";" (ERROR) "template <class T> inline ofPolyline toOf(const std::vector<cv::Point_<T>>& contour)" (binary_expression) "template <class T> inline ofPolyline toOf(const std::vector<cv::Point_<T>>& contour)" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (ERROR) "inline ofPolyline" (identifier) "inline" (identifier) "ofPolyline" (call_expression) "toOf(const std::vector<cv::Point_<T>>& contour)" (identifier) "toOf" (argument_list) "(const std::vector<cv::Point_<T>>& contour)" (() "(" (ERROR) "const std::vector<cv::" (identifier) "const" (identifier) "std" (:) ":" (:) ":" (binary_expression) "vector<cv" (identifier) "vector" (<) "<" (identifier) "cv" (:) ":" (:) ":" (binary_expression) "Point_<T>>& contour" (identifier) "Point_" (<) "<" (binary_expression) "T>>& contour" (identifier) "T" (>>) ">>" (pointer_expression) "& contour" (&) "&" (identifier) "contour" ()) ")" (compound_statement) "{\n ofPolyline polyline;\n polyline.resize(contour.size());\n for(std::size_t i = 0; i < contour.size(); i++) {\n polyline[i].x = contour[i].x;\n polyline[i].y = contour[i].y;\n }\n polyline.close();\n return polyline;\n }" ({) "{" (declaration) "ofPolyline polyline;" (type_identifier) "ofPolyline" (identifier) "polyline" (;) ";" (expression_statement) "polyline.resize(contour.size());" (call_expression) "polyline.resize(contour.size())" (field_expression) "polyline.resize" (identifier) "polyline" (.) "." (field_identifier) "resize" (argument_list) "(contour.size())" (() "(" (call_expression) "contour.size()" (field_expression) "contour.size" (identifier) "contour" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (for_statement) "for(std::size_t i = 0; i < contour.size(); i++) {\n polyline[i].x = contour[i].x;\n polyline[i].y = contour[i].y;\n }" (for) "for" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (declaration) "size_t i = 0;" (primitive_type) "size_t" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < contour.size()" (identifier) "i" (<) "<" (call_expression) "contour.size()" (field_expression) "contour.size" (identifier) "contour" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n polyline[i].x = contour[i].x;\n polyline[i].y = contour[i].y;\n }" ({) "{" (expression_statement) "polyline[i].x = contour[i].x;" (assignment_expression) "polyline[i].x = contour[i].x" (field_expression) "polyline[i].x" (subscript_expression) "polyline[i]" (identifier) "polyline" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "x" (=) "=" (field_expression) "contour[i].x" (subscript_expression) "contour[i]" (identifier) "contour" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "x" (;) ";" (expression_statement) "polyline[i].y = contour[i].y;" (assignment_expression) "polyline[i].y = contour[i].y" (field_expression) "polyline[i].y" (subscript_expression) "polyline[i]" (identifier) "polyline" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "y" (=) "=" (field_expression) "contour[i].y" (subscript_expression) "contour[i]" (identifier) "contour" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "y" (;) ";" (}) "}" (expression_statement) "polyline.close();" (call_expression) "polyline.close()" (field_expression) "polyline.close" (identifier) "polyline" (.) "." (field_identifier) "close" (argument_list) "()" (() "(" ()) ")" (;) ";" (return_statement) "return polyline;" (return) "return" (identifier) "polyline" (;) ";" (}) "}" (expression_statement) "template <class T>\n void toOf(cv::Mat mat, ofPixels_<T>& pixels) {\n pixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels());\n }\n template <class T>\n void toOf(cv::Mat mat, ofImage_<T>& img) {\n imitate(img, mat);" (update_expression) "template <class T>\n void toOf(cv::Mat mat, ofPixels_<T>& pixels) {\n pixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels());\n }\n template <class T>\n void toOf(cv::Mat mat, ofImage_<T>& img) {\n imitate(img, mat)" (binary_expression) "template <class T>\n void toOf(cv::Mat mat, ofPixels_<T>& pixels) {\n pixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels());\n }\n template <class T>\n void toOf(cv::Mat mat, ofImage_<T>& img) {\n imitate(img, mat)" (binary_expression) "template <class T>\n void toOf(cv::Mat mat, ofPixels_<T>& pixels) {\n pixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels());\n }\n template <class" (binary_expression) "template <class T>\n void toOf(cv::Mat mat, ofPixels_<T>& pixels) {\n pixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels())" (binary_expression) "template <class" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (ERROR) "void toOf(cv::Mat mat, ofPixels_<T>& pixels) {" (identifier) "void" (call_expression) "toOf(cv::Mat mat, ofPixels_<T>& pixels)" (identifier) "toOf" (argument_list) "(cv::Mat mat, ofPixels_<T>& pixels)" (() "(" (ERROR) "cv::Mat" (identifier) "cv" (:) ":" (:) ":" (identifier) "Mat" (identifier) "mat" (,) "," (binary_expression) "ofPixels_<T>& pixels" (binary_expression) "ofPixels_<T" (identifier) "ofPixels_" (<) "<" (identifier) "T" (>) ">" (pointer_expression) "& pixels" (&) "&" (identifier) "pixels" ()) ")" ({) "{" (call_expression) "pixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels())" (field_expression) "pixels.setFromExternalPixels" (identifier) "pixels" (.) "." (field_identifier) "setFromExternalPixels" (argument_list) "(mat.ptr<T>(), mat.cols, mat.rows, mat.channels())" (() "(" (binary_expression) "mat.ptr<T>()" (binary_expression) "mat.ptr<T" (field_expression) "mat.ptr" (identifier) "mat" (.) "." (field_identifier) "ptr" (<) "<" (identifier) "T" (>) ">" (parenthesized_expression) "()" (() "(" (identifier) "" ()) ")" (,) "," (field_expression) "mat.cols" (identifier) "mat" (.) "." (field_identifier) "cols" (,) "," (field_expression) "mat.rows" (identifier) "mat" (.) "." (field_identifier) "rows" (,) "," (call_expression) "mat.channels()" (field_expression) "mat.channels" (identifier) "mat" (.) "." (field_identifier) "channels" (argument_list) "()" (() "(" ()) ")" ()) ")" (ERROR) ";\n }\n template" (;) ";" (}) "}" (identifier) "template" (<) "<" (identifier) "class" (ERROR) "T" (identifier) "T" (>) ">" (ERROR) "void toOf(cv::Mat mat, ofImage_<T>& img) {" (identifier) "void" (call_expression) "toOf(cv::Mat mat, ofImage_<T>& img)" (identifier) "toOf" (argument_list) "(cv::Mat mat, ofImage_<T>& img)" (() "(" (ERROR) "cv::Mat" (identifier) "cv" (:) ":" (:) ":" (identifier) "Mat" (identifier) "mat" (,) "," (binary_expression) "ofImage_<T>& img" (binary_expression) "ofImage_<T" (identifier) "ofImage_" (<) "<" (identifier) "T" (>) ">" (pointer_expression) "& img" (&) "&" (identifier) "img" ()) ")" ({) "{" (call_expression) "imitate(img, mat)" (identifier) "imitate" (argument_list) "(img, mat)" (() "(" (identifier) "img" (,) "," (identifier) "mat" ()) ")" (--) "" (;) ";" (expression_statement) "toOf(mat, img.getPixels());" (call_expression) "toOf(mat, img.getPixels())" (identifier) "toOf" (argument_list) "(mat, img.getPixels())" (() "(" (identifier) "mat" (,) "," (call_expression) "img.getPixels()" (field_expression) "img.getPixels" (identifier) "img" (.) "." (field_identifier) "getPixels" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (ERROR) "}\n}" (}) "}" (}) "}"
3,367
125
{"language": "c", "success": true, "metadata": {"lines": 325, "avg_line_length": 34.32, "nodes": 2050, "errors": 0, "source_hash": "0c4a36524d9bc261c3d7fed98ea727f470c036bbeda83d8b6ed1133b51afe8b1", "categorized_nodes": 1507}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"opencv2/opencv.hpp\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"opencv2/opencv.hpp\"", "parent": 3, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 29}}, {"id": 6, "type": "preproc_include", "text": "#include \"ofRectangle.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"ofRectangle.h\"", "parent": 6, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 24}}, {"id": 9, "type": "preproc_include", "text": "#include \"ofTexture.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"ofTexture.h\"", "parent": 9, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 22}}, {"id": 12, "type": "preproc_include", "text": "#include \"ofPixels.h\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"ofPixels.h\"", "parent": 12, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 21}}, {"id": 15, "type": "preproc_include", "text": "#include \"ofBaseTypes.h\"\n", "parent": null, "children": [16, 17], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"ofBaseTypes.h\"", "parent": 15, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 24}}, {"id": 18, "type": "preproc_include", "text": "#include \"ofVideoPlayer.h\"\n", "parent": null, "children": [19, 20], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"ofVideoPlayer.h\"", "parent": 18, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 26}}, {"id": 21, "type": "preproc_include", "text": "#include \"ofVideoGrabber.h\"\n", "parent": null, "children": [22, 23], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"ofVideoGrabber.h\"", "parent": 21, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 27}}, {"id": 24, "type": "preproc_include", "text": "#include \"ofPolyline.h\"\n", "parent": null, "children": [25, 26], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"ofPolyline.h\"", "parent": 24, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 23}}, {"id": 27, "type": "preproc_include", "text": "#include \"ofVectorMath.h\"\n", "parent": null, "children": [28, 29], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"ofVectorMath.h\"", "parent": 27, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 25}}, {"id": 30, "type": "preproc_include", "text": "#include \"ofMesh.h\"\n", "parent": null, "children": [31, 32], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"ofMesh.h\"", "parent": 30, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 19}}, {"id": 33, "type": "function_definition", "text": "namespace ofxCv {\n\t// these functions are for accessing Mat, ofPixels and ofImage consistently.\n\t// they're very important for imitate().\n\t\n\t// width, height\n\ttemplate <class T> inline int getWidth(const T& src) {return src.getWidth();}\n\ttemplate <class T> inline int getHeight(const T& src) {return src.getHeight();}\n\tinline int getWidth(const cv::Mat& src) {return src.cols;}\n\tinline int getHeight(const cv::Mat& src) {return src.rows;}\n\ttemplate <class T> inline bool getAllocated(const T& src) {\n\t\treturn getWidth(src) > 0 && getHeight(src) > 0;\n\t}\n\t\n\t// depth\n inline int getDepth(int cvImageType) {\n return CV_MAT_DEPTH(cvImageType);\n }\n\n inline int getDepth(const cv::Mat& mat) {\n return mat.depth();\n }\n\n inline int getDepth(const ofTexture& tex) {\n // avoid \"texture not allocated\" warning\n if(!tex.isAllocated()) {\n return CV_8U;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA:\n case GL_RGB:\n case GL_LUMINANCE_ALPHA:\n case GL_LUMINANCE:\n return CV_8U;\n\n#ifndef TARGET_OPENGLES\n case GL_RGBA8:\n case GL_RGB8:\n case GL_LUMINANCE8:\n case GL_LUMINANCE8_ALPHA8:\n return CV_8U;\n\n case GL_RGBA32F_ARB:\n case GL_RGB32F_ARB:\n case GL_LUMINANCE32F_ARB:\n return CV_32F;\n#endif\n default: return 0;\n }\n }\n template <class T> inline int getDepth(const ofPixels_<T>& pixels) {\n\t\tswitch(pixels.getBytesPerChannel()) {\n\t\t\tcase 4: return CV_32F;\n\t\t\tcase 2: return CV_16U;\n\t\t\tcase 1: default: return CV_8U;\n\t\t}\n\t}\n\ttemplate <> inline int getDepth(const ofPixels_<signed short>& pixels) {\n\t\treturn CV_16S;\n\t}\n\ttemplate <> inline int getDepth(const ofPixels_<signed char>& pixels) {\n\t\treturn CV_8S;\n\t}\n\ttemplate <class T> inline int getDepth(const ofBaseHasPixels_<T>& img) {\n\t\treturn getDepth(img.getPixels());\n\t}\n\t\n\t// channels\n\tinline int getChannels(int cvImageType) {\n\t\treturn CV_MAT_CN(cvImageType);\n\t}\n\tinline int getChannels(ofImageType imageType) {\n\t\tswitch(imageType) {\n\t\t\tcase OF_IMAGE_COLOR_ALPHA: return 4;\n\t\t\tcase OF_IMAGE_COLOR: return 3;\n\t\t\tcase OF_IMAGE_GRAYSCALE: default: return 1;\n\t\t}\n\t}\n\tinline int getChannels(const cv::Mat& mat) {\n\t\treturn mat.channels();\n\t}\n inline int getChannels(const ofTexture& tex) {\n // avoid \"texture not allocated\" warning\n if(!tex.isAllocated()) {\n return GL_RGB;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA: return 4;\n case GL_RGB: return 3;\n case GL_LUMINANCE_ALPHA: return 2;\n case GL_LUMINANCE: return 1;\n \n#ifndef TARGET_OPENGLES\n case GL_RGBA8: return 4;\n case GL_RGB8: return 3;\n case GL_LUMINANCE8: return 1;\n case GL_LUMINANCE8_ALPHA8: return 2;\n \n case GL_RGBA32F_ARB: return 4;\n case GL_RGB32F_ARB: return 3;\n case GL_LUMINANCE32F_ARB: return 1;\n#endif\n default: return 0;\n }\n }\n\ttemplate <class T> inline int getChannels(const ofPixels_<T>& pixels) {\n\t\treturn pixels.getNumChannels();\n\t}\n\ttemplate <class T> inline int getChannels(const ofBaseHasPixels_<T>& img) {\n\t\treturn getChannels(img.getPixels());\n\t}\n\t\n\t// image type\n\tinline int getCvImageType(int channels, int cvDepth = CV_8U) {\n\t\treturn CV_MAKETYPE(cvDepth, channels);\n\t}\n\tinline int getCvImageType(ofImageType imageType, int cvDepth = CV_8U) {\n\t\treturn CV_MAKETYPE(cvDepth, getChannels(imageType));\n\t}\n\ttemplate <class T> inline int getCvImageType(const T& img) {\n\t\treturn CV_MAKETYPE(getDepth(img), getChannels(img));\n\t}\n\tinline ofImageType getOfImageType(int cvImageType) {\n\t\tswitch(getChannels(cvImageType)) {\n\t\t\tcase 4: return OF_IMAGE_COLOR_ALPHA;\n\t\t\tcase 3: return OF_IMAGE_COLOR;\n\t\t\tcase 1: default: return OF_IMAGE_GRAYSCALE;\n\t\t}\n\t}\n inline int getGlImageType(int cvImageType) {\n int channels = getChannels(cvImageType);\n int depth = getDepth(cvImageType);\n switch(depth) {\n case CV_8U:\n switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }\n#ifndef TARGET_OPENGLES\n case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }\n#endif\n }\n return 0;\n }\n\t\n\t// allocation\n\t// only happens when necessary\n\ttemplate <class T> inline void allocate(T& img, int width, int height, int cvType) {\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getOfImageType(cvType));\n }\n }\n inline void allocate(ofTexture& img, int width, int height, int cvType) {\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getGlImageType(cvType));\n }\n }\n\tinline void allocate(cv::Mat& img, int width, int height, int cvType) {\n if (getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType) {\n\t\t\timg.create(height, width, cvType);\n\t\t}\n\t}\n\t// ofVideoPlayer/Grabber can't be allocated, so we assume we don't need to do anything\n inline void allocate(ofBaseVideoDraws & img, int width, int height, int cvType) {}\n inline void allocate(ofVideoPlayer & img, int width, int height, int cvType) {}\n inline void allocate(ofVideoGrabber & img, int width, int height, int cvType) {}\n\n inline void allocate(const ofBaseVideoDraws & img, int width, int height, int cvType) {}\n inline void allocate(const ofVideoPlayer & img, int width, int height, int cvType) {}\n inline void allocate(const ofVideoGrabber & img, int width, int height, int cvType) {}\n\n\t// imitate() is good for preparing buffers\n\t// it's like allocate(), but uses the size and type of the original as a reference\n\t// like allocate(), the image being allocated is the first argument\t\n\t\n\t// this version copies size, but manually specifies mirror's image type\n\ttemplate <class M, class O> void imitate(M& mirror, const O& original, int mirrorCvImageType) {\n\t\tint ow = getWidth(original), oh = getHeight(original);\n\t\tallocate(mirror, ow, oh, mirrorCvImageType);\n\t}\n\n\t// this version copies size and image type\n\ttemplate <class M, class O> void imitate(M& mirror, const O& original) {\n\t\timitate(mirror, original, getCvImageType(original));\n\t}", "parent": null, "children": [34, 35], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 223, "column": 2}}, {"id": 34, "type": "type_identifier", "text": "namespace", "parent": 33, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 9}}, {"id": 35, "type": "identifier", "text": "ofxCv", "parent": 33, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 15}}, {"id": 36, "type": "binary_expression", "text": "template <class T> inline", "parent": 33, "children": [37, 40, 42, 43], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 26}}, {"id": 37, "type": "binary_expression", "text": "template <class", "parent": 36, "children": [38, 39], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 16}}, {"id": 38, "type": "identifier", "text": "template", "parent": 37, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 9}}, {"id": 39, "type": "<", "text": "<", "parent": 37, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 11}}, {"id": 40, "type": "ERROR", "text": "T", "parent": 36, "children": [41], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 18}}, {"id": 41, "type": "identifier", "text": "T", "parent": 40, "children": [], "start_point": {"row": 27, "column": 17}, "end_point": {"row": 27, "column": 18}}, {"id": 42, "type": ">", "text": ">", "parent": 36, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 19}}, {"id": 43, "type": "identifier", "text": "inline", "parent": 36, "children": [], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 26}}, {"id": 44, "type": "function_definition", "text": "int getWidth(const T& src) {return src.getWidth();}", "parent": 33, "children": [45, 46], "start_point": {"row": 27, "column": 27}, "end_point": {"row": 27, "column": 78}}, {"id": 45, "type": "primitive_type", "text": "int", "parent": 44, "children": [], "start_point": {"row": 27, "column": 27}, "end_point": {"row": 27, "column": 30}}, {"id": 46, "type": "function_declarator", "text": "getWidth(const T& src)", "parent": 44, "children": [47, 48], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 53}}, {"id": 47, "type": "identifier", "text": "getWidth", "parent": 46, "children": [], "start_point": {"row": 27, "column": 31}, "end_point": {"row": 27, "column": 39}}, {"id": 48, "type": "parameter_list", "text": "(const T& src)", "parent": 46, "children": [49], "start_point": {"row": 27, "column": 39}, "end_point": {"row": 27, "column": 53}}, {"id": 49, "type": "parameter_declaration", "text": "const T& src", "parent": 48, "children": [50, 51], "start_point": {"row": 27, "column": 40}, "end_point": {"row": 27, "column": 52}}, {"id": 50, "type": "type_identifier", "text": "T", "parent": 49, "children": [], "start_point": {"row": 27, "column": 46}, "end_point": {"row": 27, "column": 47}}, {"id": 51, "type": "identifier", "text": "src", "parent": 49, "children": [], "start_point": {"row": 27, "column": 49}, "end_point": {"row": 27, "column": 52}}, {"id": 52, "type": "return_statement", "text": "return src.getWidth();", "parent": 44, "children": [53], "start_point": {"row": 27, "column": 55}, "end_point": {"row": 27, "column": 77}}, {"id": 53, "type": "call_expression", "text": "src.getWidth()", "parent": 52, "children": [54, 57], "start_point": {"row": 27, "column": 62}, "end_point": {"row": 27, "column": 76}}, {"id": 54, "type": "field_expression", "text": "src.getWidth", "parent": 53, "children": [55, 56], "start_point": {"row": 27, "column": 62}, "end_point": {"row": 27, "column": 74}}, {"id": 55, "type": "identifier", "text": "src", "parent": 54, "children": [], "start_point": {"row": 27, "column": 62}, "end_point": {"row": 27, "column": 65}}, {"id": 56, "type": "field_identifier", "text": "getWidth", "parent": 54, "children": [], "start_point": {"row": 27, "column": 66}, "end_point": {"row": 27, "column": 74}}, {"id": 57, "type": "argument_list", "text": "()", "parent": 53, "children": [], "start_point": {"row": 27, "column": 74}, "end_point": {"row": 27, "column": 76}}, {"id": 58, "type": "binary_expression", "text": "template <class T> inline", "parent": 33, "children": [59, 62, 64, 65], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 26}}, {"id": 59, "type": "binary_expression", "text": "template <class", "parent": 58, "children": [60, 61], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 16}}, {"id": 60, "type": "identifier", "text": "template", "parent": 59, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 9}}, {"id": 61, "type": "<", "text": "<", "parent": 59, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 11}}, {"id": 62, "type": "ERROR", "text": "T", "parent": 58, "children": [63], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 18}}, {"id": 63, "type": "identifier", "text": "T", "parent": 62, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 18}}, {"id": 64, "type": ">", "text": ">", "parent": 58, "children": [], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 19}}, {"id": 65, "type": "identifier", "text": "inline", "parent": 58, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 26}}, {"id": 66, "type": "function_definition", "text": "int getHeight(const T& src) {return src.getHeight();}", "parent": 33, "children": [67, 68], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 80}}, {"id": 67, "type": "primitive_type", "text": "int", "parent": 66, "children": [], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 30}}, {"id": 68, "type": "function_declarator", "text": "getHeight(const T& src)", "parent": 66, "children": [69, 70], "start_point": {"row": 28, "column": 31}, "end_point": {"row": 28, "column": 54}}, {"id": 69, "type": "identifier", "text": "getHeight", "parent": 68, "children": [], "start_point": {"row": 28, "column": 31}, "end_point": {"row": 28, "column": 40}}, {"id": 70, "type": "parameter_list", "text": "(const T& src)", "parent": 68, "children": [71], "start_point": {"row": 28, "column": 40}, "end_point": {"row": 28, "column": 54}}, {"id": 71, "type": "parameter_declaration", "text": "const T& src", "parent": 70, "children": [72, 73], "start_point": {"row": 28, "column": 41}, "end_point": {"row": 28, "column": 53}}, {"id": 72, "type": "type_identifier", "text": "T", "parent": 71, "children": [], "start_point": {"row": 28, "column": 47}, "end_point": {"row": 28, "column": 48}}, {"id": 73, "type": "identifier", "text": "src", "parent": 71, "children": [], "start_point": {"row": 28, "column": 50}, "end_point": {"row": 28, "column": 53}}, {"id": 74, "type": "return_statement", "text": "return src.getHeight();", "parent": 66, "children": [75], "start_point": {"row": 28, "column": 56}, "end_point": {"row": 28, "column": 79}}, {"id": 75, "type": "call_expression", "text": "src.getHeight()", "parent": 74, "children": [76, 79], "start_point": {"row": 28, "column": 63}, "end_point": {"row": 28, "column": 78}}, {"id": 76, "type": "field_expression", "text": "src.getHeight", "parent": 75, "children": [77, 78], "start_point": {"row": 28, "column": 63}, "end_point": {"row": 28, "column": 76}}, {"id": 77, "type": "identifier", "text": "src", "parent": 76, "children": [], "start_point": {"row": 28, "column": 63}, "end_point": {"row": 28, "column": 66}}, {"id": 78, "type": "field_identifier", "text": "getHeight", "parent": 76, "children": [], "start_point": {"row": 28, "column": 67}, "end_point": {"row": 28, "column": 76}}, {"id": 79, "type": "argument_list", "text": "()", "parent": 75, "children": [], "start_point": {"row": 28, "column": 76}, "end_point": {"row": 28, "column": 78}}, {"id": 80, "type": "function_definition", "text": "inline int getWidth(const cv::Mat& src) {return src.cols;}", "parent": 33, "children": [81, 83, 84], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 59}}, {"id": 81, "type": "storage_class_specifier", "text": "inline", "parent": 80, "children": [82], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 7}}, {"id": 82, "type": "inline", "text": "inline", "parent": 81, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 7}}, {"id": 83, "type": "primitive_type", "text": "int", "parent": 80, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 11}}, {"id": 84, "type": "function_declarator", "text": "getWidth(const cv::Mat& src)", "parent": 80, "children": [85, 86], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 40}}, {"id": 85, "type": "identifier", "text": "getWidth", "parent": 84, "children": [], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 20}}, {"id": 86, "type": "parameter_list", "text": "(const cv::Mat& src)", "parent": 84, "children": [87], "start_point": {"row": 29, "column": 20}, "end_point": {"row": 29, "column": 40}}, {"id": 87, "type": "parameter_declaration", "text": "const cv::Mat& src", "parent": 86, "children": [88, 89, 91], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 39}}, {"id": 88, "type": "type_identifier", "text": "cv", "parent": 87, "children": [], "start_point": {"row": 29, "column": 27}, "end_point": {"row": 29, "column": 29}}, {"id": 89, "type": "ERROR", "text": "::Mat&", "parent": 87, "children": [90], "start_point": {"row": 29, "column": 29}, "end_point": {"row": 29, "column": 35}}, {"id": 90, "type": "identifier", "text": "Mat", "parent": 89, "children": [], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 34}}, {"id": 91, "type": "identifier", "text": "src", "parent": 87, "children": [], "start_point": {"row": 29, "column": 36}, "end_point": {"row": 29, "column": 39}}, {"id": 92, "type": "return_statement", "text": "return src.cols;", "parent": 80, "children": [93], "start_point": {"row": 29, "column": 42}, "end_point": {"row": 29, "column": 58}}, {"id": 93, "type": "field_expression", "text": "src.cols", "parent": 92, "children": [94, 95], "start_point": {"row": 29, "column": 49}, "end_point": {"row": 29, "column": 57}}, {"id": 94, "type": "identifier", "text": "src", "parent": 93, "children": [], "start_point": {"row": 29, "column": 49}, "end_point": {"row": 29, "column": 52}}, {"id": 95, "type": "field_identifier", "text": "cols", "parent": 93, "children": [], "start_point": {"row": 29, "column": 53}, "end_point": {"row": 29, "column": 57}}, {"id": 96, "type": "function_definition", "text": "inline int getHeight(const cv::Mat& src) {return src.rows;}", "parent": 33, "children": [97, 99, 100], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 60}}, {"id": 97, "type": "storage_class_specifier", "text": "inline", "parent": 96, "children": [98], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 7}}, {"id": 98, "type": "inline", "text": "inline", "parent": 97, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 7}}, {"id": 99, "type": "primitive_type", "text": "int", "parent": 96, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 11}}, {"id": 100, "type": "function_declarator", "text": "getHeight(const cv::Mat& src)", "parent": 96, "children": [101, 102], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 41}}, {"id": 101, "type": "identifier", "text": "getHeight", "parent": 100, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 21}}, {"id": 102, "type": "parameter_list", "text": "(const cv::Mat& src)", "parent": 100, "children": [103], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 41}}, {"id": 103, "type": "parameter_declaration", "text": "const cv::Mat& src", "parent": 102, "children": [104, 105, 107], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 40}}, {"id": 104, "type": "type_identifier", "text": "cv", "parent": 103, "children": [], "start_point": {"row": 30, "column": 28}, "end_point": {"row": 30, "column": 30}}, {"id": 105, "type": "ERROR", "text": "::Mat&", "parent": 103, "children": [106], "start_point": {"row": 30, "column": 30}, "end_point": {"row": 30, "column": 36}}, {"id": 106, "type": "identifier", "text": "Mat", "parent": 105, "children": [], "start_point": {"row": 30, "column": 32}, "end_point": {"row": 30, "column": 35}}, {"id": 107, "type": "identifier", "text": "src", "parent": 103, "children": [], "start_point": {"row": 30, "column": 37}, "end_point": {"row": 30, "column": 40}}, {"id": 108, "type": "return_statement", "text": "return src.rows;", "parent": 96, "children": [109], "start_point": {"row": 30, "column": 43}, "end_point": {"row": 30, "column": 59}}, {"id": 109, "type": "field_expression", "text": "src.rows", "parent": 108, "children": [110, 111], "start_point": {"row": 30, "column": 50}, "end_point": {"row": 30, "column": 58}}, {"id": 110, "type": "identifier", "text": "src", "parent": 109, "children": [], "start_point": {"row": 30, "column": 50}, "end_point": {"row": 30, "column": 53}}, {"id": 111, "type": "field_identifier", "text": "rows", "parent": 109, "children": [], "start_point": {"row": 30, "column": 54}, "end_point": {"row": 30, "column": 58}}, {"id": 112, "type": "binary_expression", "text": "template <class T> inline", "parent": 33, "children": [113, 116, 118, 119], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 26}}, {"id": 113, "type": "binary_expression", "text": "template <class", "parent": 112, "children": [114, 115], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 16}}, {"id": 114, "type": "identifier", "text": "template", "parent": 113, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 9}}, {"id": 115, "type": "<", "text": "<", "parent": 113, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 11}}, {"id": 116, "type": "ERROR", "text": "T", "parent": 112, "children": [117], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 18}}, {"id": 117, "type": "identifier", "text": "T", "parent": 116, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 18}}, {"id": 118, "type": ">", "text": ">", "parent": 112, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 19}}, {"id": 119, "type": "identifier", "text": "inline", "parent": 112, "children": [], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 26}}, {"id": 120, "type": "function_definition", "text": "bool getAllocated(const T& src) {\n\t\treturn getWidth(src) > 0 && getHeight(src) > 0;\n\t}", "parent": 33, "children": [121, 122], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 33, "column": 2}}, {"id": 121, "type": "primitive_type", "text": "bool", "parent": 120, "children": [], "start_point": {"row": 31, "column": 27}, "end_point": {"row": 31, "column": 31}}, {"id": 122, "type": "function_declarator", "text": "getAllocated(const T& src)", "parent": 120, "children": [123, 124], "start_point": {"row": 31, "column": 32}, "end_point": {"row": 31, "column": 58}}, {"id": 123, "type": "identifier", "text": "getAllocated", "parent": 122, "children": [], "start_point": {"row": 31, "column": 32}, "end_point": {"row": 31, "column": 44}}, {"id": 124, "type": "parameter_list", "text": "(const T& src)", "parent": 122, "children": [125], "start_point": {"row": 31, "column": 44}, "end_point": {"row": 31, "column": 58}}, {"id": 125, "type": "parameter_declaration", "text": "const T& src", "parent": 124, "children": [126, 127], "start_point": {"row": 31, "column": 45}, "end_point": {"row": 31, "column": 57}}, {"id": 126, "type": "type_identifier", "text": "T", "parent": 125, "children": [], "start_point": {"row": 31, "column": 51}, "end_point": {"row": 31, "column": 52}}, {"id": 127, "type": "identifier", "text": "src", "parent": 125, "children": [], "start_point": {"row": 31, "column": 54}, "end_point": {"row": 31, "column": 57}}, {"id": 128, "type": "return_statement", "text": "return getWidth(src) > 0 && getHeight(src) > 0;", "parent": 120, "children": [129], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 49}}, {"id": 129, "type": "binary_expression", "text": "getWidth(src) > 0 && getHeight(src) > 0", "parent": 128, "children": [130, 137, 138], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 48}}, {"id": 130, "type": "binary_expression", "text": "getWidth(src) > 0", "parent": 129, "children": [131, 135, 136], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 26}}, {"id": 131, "type": "call_expression", "text": "getWidth(src)", "parent": 130, "children": [132, 133], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 22}}, {"id": 132, "type": "identifier", "text": "getWidth", "parent": 131, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 17}}, {"id": 133, "type": "argument_list", "text": "(src)", "parent": 131, "children": [134], "start_point": {"row": 32, "column": 17}, "end_point": {"row": 32, "column": 22}}, {"id": 134, "type": "identifier", "text": "src", "parent": 133, "children": [], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 21}}, {"id": 135, "type": ">", "text": ">", "parent": 130, "children": [], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 24}}, {"id": 136, "type": "number_literal", "text": "0", "parent": 130, "children": [], "start_point": {"row": 32, "column": 25}, "end_point": {"row": 32, "column": 26}}, {"id": 137, "type": "&&", "text": "&&", "parent": 129, "children": [], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 29}}, {"id": 138, "type": "binary_expression", "text": "getHeight(src) > 0", "parent": 129, "children": [139, 143, 144], "start_point": {"row": 32, "column": 30}, "end_point": {"row": 32, "column": 48}}, {"id": 139, "type": "call_expression", "text": "getHeight(src)", "parent": 138, "children": [140, 141], "start_point": {"row": 32, "column": 30}, "end_point": {"row": 32, "column": 44}}, {"id": 140, "type": "identifier", "text": "getHeight", "parent": 139, "children": [], "start_point": {"row": 32, "column": 30}, "end_point": {"row": 32, "column": 39}}, {"id": 141, "type": "argument_list", "text": "(src)", "parent": 139, "children": [142], "start_point": {"row": 32, "column": 39}, "end_point": {"row": 32, "column": 44}}, {"id": 142, "type": "identifier", "text": "src", "parent": 141, "children": [], "start_point": {"row": 32, "column": 40}, "end_point": {"row": 32, "column": 43}}, {"id": 143, "type": ">", "text": ">", "parent": 138, "children": [], "start_point": {"row": 32, "column": 45}, "end_point": {"row": 32, "column": 46}}, {"id": 144, "type": "number_literal", "text": "0", "parent": 138, "children": [], "start_point": {"row": 32, "column": 47}, "end_point": {"row": 32, "column": 48}}, {"id": 145, "type": "function_definition", "text": "inline int getDepth(int cvImageType) {\n return CV_MAT_DEPTH(cvImageType);\n }", "parent": 33, "children": [146, 148, 149], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 38, "column": 5}}, {"id": 146, "type": "storage_class_specifier", "text": "inline", "parent": 145, "children": [147], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 10}}, {"id": 147, "type": "inline", "text": "inline", "parent": 146, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 10}}, {"id": 148, "type": "primitive_type", "text": "int", "parent": 145, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 14}}, {"id": 149, "type": "function_declarator", "text": "getDepth(int cvImageType)", "parent": 145, "children": [150, 151], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 40}}, {"id": 150, "type": "identifier", "text": "getDepth", "parent": 149, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 23}}, {"id": 151, "type": "parameter_list", "text": "(int cvImageType)", "parent": 149, "children": [152], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 40}}, {"id": 152, "type": "parameter_declaration", "text": "int cvImageType", "parent": 151, "children": [153, 154], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 39}}, {"id": 153, "type": "primitive_type", "text": "int", "parent": 152, "children": [], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 27}}, {"id": 154, "type": "identifier", "text": "cvImageType", "parent": 152, "children": [], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 39}}, {"id": 155, "type": "return_statement", "text": "return CV_MAT_DEPTH(cvImageType);", "parent": 145, "children": [156], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 41}}, {"id": 156, "type": "call_expression", "text": "CV_MAT_DEPTH(cvImageType)", "parent": 155, "children": [157, 158], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 40}}, {"id": 157, "type": "identifier", "text": "CV_MAT_DEPTH", "parent": 156, "children": [], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 27}}, {"id": 158, "type": "argument_list", "text": "(cvImageType)", "parent": 156, "children": [159], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 40}}, {"id": 159, "type": "identifier", "text": "cvImageType", "parent": 158, "children": [], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 39}}, {"id": 160, "type": "function_definition", "text": "inline int getDepth(const cv::Mat& mat) {\n return mat.depth();\n }", "parent": 33, "children": [161, 163, 164], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 42, "column": 5}}, {"id": 161, "type": "storage_class_specifier", "text": "inline", "parent": 160, "children": [162], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 10}}, {"id": 162, "type": "inline", "text": "inline", "parent": 161, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 10}}, {"id": 163, "type": "primitive_type", "text": "int", "parent": 160, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 14}}, {"id": 164, "type": "function_declarator", "text": "getDepth(const cv::Mat& mat)", "parent": 160, "children": [165, 166], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 43}}, {"id": 165, "type": "identifier", "text": "getDepth", "parent": 164, "children": [], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 23}}, {"id": 166, "type": "parameter_list", "text": "(const cv::Mat& mat)", "parent": 164, "children": [167], "start_point": {"row": 40, "column": 23}, "end_point": {"row": 40, "column": 43}}, {"id": 167, "type": "parameter_declaration", "text": "const cv::Mat& mat", "parent": 166, "children": [168, 169, 171], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 42}}, {"id": 168, "type": "type_identifier", "text": "cv", "parent": 167, "children": [], "start_point": {"row": 40, "column": 30}, "end_point": {"row": 40, "column": 32}}, {"id": 169, "type": "ERROR", "text": "::Mat&", "parent": 167, "children": [170], "start_point": {"row": 40, "column": 32}, "end_point": {"row": 40, "column": 38}}, {"id": 170, "type": "identifier", "text": "Mat", "parent": 169, "children": [], "start_point": {"row": 40, "column": 34}, "end_point": {"row": 40, "column": 37}}, {"id": 171, "type": "identifier", "text": "mat", "parent": 167, "children": [], "start_point": {"row": 40, "column": 39}, "end_point": {"row": 40, "column": 42}}, {"id": 172, "type": "return_statement", "text": "return mat.depth();", "parent": 160, "children": [173], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 27}}, {"id": 173, "type": "call_expression", "text": "mat.depth()", "parent": 172, "children": [174, 177], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 26}}, {"id": 174, "type": "field_expression", "text": "mat.depth", "parent": 173, "children": [175, 176], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 24}}, {"id": 175, "type": "identifier", "text": "mat", "parent": 174, "children": [], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 18}}, {"id": 176, "type": "field_identifier", "text": "depth", "parent": 174, "children": [], "start_point": {"row": 41, "column": 19}, "end_point": {"row": 41, "column": 24}}, {"id": 177, "type": "argument_list", "text": "()", "parent": 173, "children": [], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 26}}, {"id": 178, "type": "function_definition", "text": "inline int getDepth(const ofTexture& tex) {\n // avoid \"texture not allocated\" warning\n if(!tex.isAllocated()) {\n return CV_8U;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA:\n case GL_RGB:\n case GL_LUMINANCE_ALPHA:\n case GL_LUMINANCE:\n return CV_8U;\n\n#ifndef TARGET_OPENGLES\n case GL_RGBA8:\n case GL_RGB8:\n case GL_LUMINANCE8:\n case GL_LUMINANCE8_ALPHA8:\n return CV_8U;\n\n case GL_RGBA32F_ARB:\n case GL_RGB32F_ARB:\n case GL_LUMINANCE32F_ARB:\n return CV_32F;\n#endif\n default: return 0;\n }\n }", "parent": 33, "children": [179, 181, 182], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 71, "column": 5}}, {"id": 179, "type": "storage_class_specifier", "text": "inline", "parent": 178, "children": [180], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 10}}, {"id": 180, "type": "inline", "text": "inline", "parent": 179, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 10}}, {"id": 181, "type": "primitive_type", "text": "int", "parent": 178, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 14}}, {"id": 182, "type": "function_declarator", "text": "getDepth(const ofTexture& tex)", "parent": 178, "children": [183, 184], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 45}}, {"id": 183, "type": "identifier", "text": "getDepth", "parent": 182, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 23}}, {"id": 184, "type": "parameter_list", "text": "(const ofTexture& tex)", "parent": 182, "children": [185], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 45}}, {"id": 185, "type": "parameter_declaration", "text": "const ofTexture& tex", "parent": 184, "children": [186, 187], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 44}}, {"id": 186, "type": "type_identifier", "text": "ofTexture", "parent": 185, "children": [], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 39}}, {"id": 187, "type": "identifier", "text": "tex", "parent": 185, "children": [], "start_point": {"row": 44, "column": 41}, "end_point": {"row": 44, "column": 44}}, {"id": 188, "type": "if_statement", "text": "if(!tex.isAllocated()) {\n return CV_8U;\n }", "parent": 178, "children": [189], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 48, "column": 9}}, {"id": 189, "type": "parenthesized_expression", "text": "(!tex.isAllocated())", "parent": 188, "children": [190], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 30}}, {"id": 190, "type": "unary_expression", "text": "!tex.isAllocated()", "parent": 189, "children": [191, 192], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 29}}, {"id": 191, "type": "!", "text": "!", "parent": 190, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 12}}, {"id": 192, "type": "call_expression", "text": "tex.isAllocated()", "parent": 190, "children": [193, 196], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 29}}, {"id": 193, "type": "field_expression", "text": "tex.isAllocated", "parent": 192, "children": [194, 195], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 27}}, {"id": 194, "type": "identifier", "text": "tex", "parent": 193, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 15}}, {"id": 195, "type": "field_identifier", "text": "isAllocated", "parent": 193, "children": [], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 27}}, {"id": 196, "type": "argument_list", "text": "()", "parent": 192, "children": [], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 29}}, {"id": 197, "type": "return_statement", "text": "return CV_8U;", "parent": 188, "children": [198], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 25}}, {"id": 198, "type": "identifier", "text": "CV_8U", "parent": 197, "children": [], "start_point": {"row": 47, "column": 19}, "end_point": {"row": 47, "column": 24}}, {"id": 199, "type": "declaration", "text": "int type = tex.getTextureData().glInternalFormat;", "parent": 178, "children": [200, 201], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 57}}, {"id": 200, "type": "primitive_type", "text": "int", "parent": 199, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 11}}, {"id": 201, "type": "init_declarator", "text": "type = tex.getTextureData().glInternalFormat", "parent": 199, "children": [202, 203, 204], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 56}}, {"id": 202, "type": "identifier", "text": "type", "parent": 201, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 16}}, {"id": 203, "type": "=", "text": "=", "parent": 201, "children": [], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 18}}, {"id": 204, "type": "field_expression", "text": "tex.getTextureData().glInternalFormat", "parent": 201, "children": [205, 210], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 56}}, {"id": 205, "type": "call_expression", "text": "tex.getTextureData()", "parent": 204, "children": [206, 209], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 39}}, {"id": 206, "type": "field_expression", "text": "tex.getTextureData", "parent": 205, "children": [207, 208], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 37}}, {"id": 207, "type": "identifier", "text": "tex", "parent": 206, "children": [], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 22}}, {"id": 208, "type": "field_identifier", "text": "getTextureData", "parent": 206, "children": [], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 37}}, {"id": 209, "type": "argument_list", "text": "()", "parent": 205, "children": [], "start_point": {"row": 49, "column": 37}, "end_point": {"row": 49, "column": 39}}, {"id": 210, "type": "field_identifier", "text": "glInternalFormat", "parent": 204, "children": [], "start_point": {"row": 49, "column": 40}, "end_point": {"row": 49, "column": 56}}, {"id": 211, "type": "switch_statement", "text": "switch(type) {\n case GL_RGBA:\n case GL_RGB:\n case GL_LUMINANCE_ALPHA:\n case GL_LUMINANCE:\n return CV_8U;\n\n#ifndef TARGET_OPENGLES\n case GL_RGBA8:\n case GL_RGB8:\n case GL_LUMINANCE8:\n case GL_LUMINANCE8_ALPHA8:\n return CV_8U;\n\n case GL_RGBA32F_ARB:\n case GL_RGB32F_ARB:\n case GL_LUMINANCE32F_ARB:\n return CV_32F;\n#endif\n default: return 0;\n }", "parent": 178, "children": [212, 213], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 70, "column": 9}}, {"id": 212, "type": "switch", "text": "switch", "parent": 211, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 14}}, {"id": 213, "type": "parenthesized_expression", "text": "(type)", "parent": 211, "children": [214], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 20}}, {"id": 214, "type": "identifier", "text": "type", "parent": 213, "children": [], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 19}}, {"id": 215, "type": "case_statement", "text": "case GL_RGBA:", "parent": 211, "children": [216, 217], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 25}}, {"id": 216, "type": "case", "text": "case", "parent": 215, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 16}}, {"id": 217, "type": "identifier", "text": "GL_RGBA", "parent": 215, "children": [], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 24}}, {"id": 218, "type": "case_statement", "text": "case GL_RGB:", "parent": 211, "children": [219, 220], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 24}}, {"id": 219, "type": "case", "text": "case", "parent": 218, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 16}}, {"id": 220, "type": "identifier", "text": "GL_RGB", "parent": 218, "children": [], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 23}}, {"id": 221, "type": "case_statement", "text": "case GL_LUMINANCE_ALPHA:", "parent": 211, "children": [222, 223], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 36}}, {"id": 222, "type": "case", "text": "case", "parent": 221, "children": [], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 16}}, {"id": 223, "type": "identifier", "text": "GL_LUMINANCE_ALPHA", "parent": 221, "children": [], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 35}}, {"id": 224, "type": "case_statement", "text": "case GL_LUMINANCE:\n return CV_8U;", "parent": 211, "children": [225, 226, 227], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 55, "column": 29}}, {"id": 225, "type": "case", "text": "case", "parent": 224, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 16}}, {"id": 226, "type": "identifier", "text": "GL_LUMINANCE", "parent": 224, "children": [], "start_point": {"row": 54, "column": 17}, "end_point": {"row": 54, "column": 29}}, {"id": 227, "type": "return_statement", "text": "return CV_8U;", "parent": 224, "children": [228], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 29}}, {"id": 228, "type": "identifier", "text": "CV_8U", "parent": 227, "children": [], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 28}}, {"id": 229, "type": "preproc_ifdef", "text": "#ifndef TARGET_OPENGLES\n case GL_RGBA8:\n case GL_RGB8:\n case GL_LUMINANCE8:\n case GL_LUMINANCE8_ALPHA8:\n return CV_8U;\n\n case GL_RGBA32F_ARB:\n case GL_RGB32F_ARB:\n case GL_LUMINANCE32F_ARB:\n return CV_32F;\n#endif", "parent": 211, "children": [230, 231, 232, 235, 238, 241, 246, 249, 252, 257], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 68, "column": 6}}, {"id": 230, "type": "#ifndef", "text": "#ifndef", "parent": 229, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 7}}, {"id": 231, "type": "identifier", "text": "TARGET_OPENGLES", "parent": 229, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 23}}, {"id": 232, "type": "case_statement", "text": "case GL_RGBA8:", "parent": 229, "children": [233, 234], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 26}}, {"id": 233, "type": "case", "text": "case", "parent": 232, "children": [], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 16}}, {"id": 234, "type": "identifier", "text": "GL_RGBA8", "parent": 232, "children": [], "start_point": {"row": 58, "column": 17}, "end_point": {"row": 58, "column": 25}}, {"id": 235, "type": "case_statement", "text": "case GL_RGB8:", "parent": 229, "children": [236, 237], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 25}}, {"id": 236, "type": "case", "text": "case", "parent": 235, "children": [], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 16}}, {"id": 237, "type": "identifier", "text": "GL_RGB8", "parent": 235, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 24}}, {"id": 238, "type": "case_statement", "text": "case GL_LUMINANCE8:", "parent": 229, "children": [239, 240], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 31}}, {"id": 239, "type": "case", "text": "case", "parent": 238, "children": [], "start_point": {"row": 60, "column": 12}, "end_point": {"row": 60, "column": 16}}, {"id": 240, "type": "identifier", "text": "GL_LUMINANCE8", "parent": 238, "children": [], "start_point": {"row": 60, "column": 17}, "end_point": {"row": 60, "column": 30}}, {"id": 241, "type": "case_statement", "text": "case GL_LUMINANCE8_ALPHA8:\n return CV_8U;", "parent": 229, "children": [242, 243, 244], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 62, "column": 29}}, {"id": 242, "type": "case", "text": "case", "parent": 241, "children": [], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 16}}, {"id": 243, "type": "identifier", "text": "GL_LUMINANCE8_ALPHA8", "parent": 241, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 37}}, {"id": 244, "type": "return_statement", "text": "return CV_8U;", "parent": 241, "children": [245], "start_point": {"row": 62, "column": 16}, "end_point": {"row": 62, "column": 29}}, {"id": 245, "type": "identifier", "text": "CV_8U", "parent": 244, "children": [], "start_point": {"row": 62, "column": 23}, "end_point": {"row": 62, "column": 28}}, {"id": 246, "type": "case_statement", "text": "case GL_RGBA32F_ARB:", "parent": 229, "children": [247, 248], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 32}}, {"id": 247, "type": "case", "text": "case", "parent": 246, "children": [], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 16}}, {"id": 248, "type": "identifier", "text": "GL_RGBA32F_ARB", "parent": 246, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 31}}, {"id": 249, "type": "case_statement", "text": "case GL_RGB32F_ARB:", "parent": 229, "children": [250, 251], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 31}}, {"id": 250, "type": "case", "text": "case", "parent": 249, "children": [], "start_point": {"row": 65, "column": 12}, "end_point": {"row": 65, "column": 16}}, {"id": 251, "type": "identifier", "text": "GL_RGB32F_ARB", "parent": 249, "children": [], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 30}}, {"id": 252, "type": "case_statement", "text": "case GL_LUMINANCE32F_ARB:\n return CV_32F;", "parent": 229, "children": [253, 254, 255], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 67, "column": 30}}, {"id": 253, "type": "case", "text": "case", "parent": 252, "children": [], "start_point": {"row": 66, "column": 12}, "end_point": {"row": 66, "column": 16}}, {"id": 254, "type": "identifier", "text": "GL_LUMINANCE32F_ARB", "parent": 252, "children": [], "start_point": {"row": 66, "column": 17}, "end_point": {"row": 66, "column": 36}}, {"id": 255, "type": "return_statement", "text": "return CV_32F;", "parent": 252, "children": [256], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 30}}, {"id": 256, "type": "identifier", "text": "CV_32F", "parent": 255, "children": [], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 29}}, {"id": 257, "type": "#endif", "text": "#endif", "parent": 229, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 6}}, {"id": 258, "type": "case_statement", "text": "default: return 0;", "parent": 211, "children": [259, 260], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 30}}, {"id": 259, "type": "default", "text": "default", "parent": 258, "children": [], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 19}}, {"id": 260, "type": "return_statement", "text": "return 0;", "parent": 258, "children": [261], "start_point": {"row": 69, "column": 21}, "end_point": {"row": 69, "column": 30}}, {"id": 261, "type": "number_literal", "text": "0", "parent": 260, "children": [], "start_point": {"row": 69, "column": 28}, "end_point": {"row": 69, "column": 29}}, {"id": 262, "type": "binary_expression", "text": "template <class T> inline", "parent": 33, "children": [263, 266, 268, 269], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 29}}, {"id": 263, "type": "binary_expression", "text": "template <class", "parent": 262, "children": [264, 265], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 19}}, {"id": 264, "type": "identifier", "text": "template", "parent": 263, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 12}}, {"id": 265, "type": "<", "text": "<", "parent": 263, "children": [], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 14}}, {"id": 266, "type": "ERROR", "text": "T", "parent": 262, "children": [267], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 21}}, {"id": 267, "type": "identifier", "text": "T", "parent": 266, "children": [], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 21}}, {"id": 268, "type": ">", "text": ">", "parent": 262, "children": [], "start_point": {"row": 72, "column": 21}, "end_point": {"row": 72, "column": 22}}, {"id": 269, "type": "identifier", "text": "inline", "parent": 262, "children": [], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 29}}, {"id": 270, "type": "function_definition", "text": "int getDepth(const ofPixels_<T>& pixels) {\n\t\tswitch(pixels.getBytesPerChannel()) {\n\t\t\tcase 4: return CV_32F;\n\t\t\tcase 2: return CV_16U;\n\t\t\tcase 1: default: return CV_8U;\n\t\t}\n\t}", "parent": 33, "children": [271, 272], "start_point": {"row": 72, "column": 30}, "end_point": {"row": 78, "column": 2}}, {"id": 271, "type": "primitive_type", "text": "int", "parent": 270, "children": [], "start_point": {"row": 72, "column": 30}, "end_point": {"row": 72, "column": 33}}, {"id": 272, "type": "function_declarator", "text": "getDepth(const ofPixels_<T>& pixels)", "parent": 270, "children": [273, 274], "start_point": {"row": 72, "column": 34}, "end_point": {"row": 72, "column": 70}}, {"id": 273, "type": "identifier", "text": "getDepth", "parent": 272, "children": [], "start_point": {"row": 72, "column": 34}, "end_point": {"row": 72, "column": 42}}, {"id": 274, "type": "parameter_list", "text": "(const ofPixels_<T>& pixels)", "parent": 272, "children": [275], "start_point": {"row": 72, "column": 42}, "end_point": {"row": 72, "column": 70}}, {"id": 275, "type": "parameter_declaration", "text": "const ofPixels_<T>& pixels", "parent": 274, "children": [276, 277, 281], "start_point": {"row": 72, "column": 43}, "end_point": {"row": 72, "column": 69}}, {"id": 276, "type": "type_identifier", "text": "ofPixels_", "parent": 275, "children": [], "start_point": {"row": 72, "column": 49}, "end_point": {"row": 72, "column": 58}}, {"id": 277, "type": "ERROR", "text": "<T>&", "parent": 275, "children": [278, 279, 280], "start_point": {"row": 72, "column": 58}, "end_point": {"row": 72, "column": 62}}, {"id": 278, "type": "<", "text": "<", "parent": 277, "children": [], "start_point": {"row": 72, "column": 58}, "end_point": {"row": 72, "column": 59}}, {"id": 279, "type": "identifier", "text": "T", "parent": 277, "children": [], "start_point": {"row": 72, "column": 59}, "end_point": {"row": 72, "column": 60}}, {"id": 280, "type": ">", "text": ">", "parent": 277, "children": [], "start_point": {"row": 72, "column": 60}, "end_point": {"row": 72, "column": 61}}, {"id": 281, "type": "identifier", "text": "pixels", "parent": 275, "children": [], "start_point": {"row": 72, "column": 63}, "end_point": {"row": 72, "column": 69}}, {"id": 282, "type": "switch_statement", "text": "switch(pixels.getBytesPerChannel()) {\n\t\t\tcase 4: return CV_32F;\n\t\t\tcase 2: return CV_16U;\n\t\t\tcase 1: default: return CV_8U;\n\t\t}", "parent": 270, "children": [283, 284], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 77, "column": 3}}, {"id": 283, "type": "switch", "text": "switch", "parent": 282, "children": [], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 8}}, {"id": 284, "type": "parenthesized_expression", "text": "(pixels.getBytesPerChannel())", "parent": 282, "children": [285], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 37}}, {"id": 285, "type": "call_expression", "text": "pixels.getBytesPerChannel()", "parent": 284, "children": [286, 289], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 36}}, {"id": 286, "type": "field_expression", "text": "pixels.getBytesPerChannel", "parent": 285, "children": [287, 288], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 34}}, {"id": 287, "type": "identifier", "text": "pixels", "parent": 286, "children": [], "start_point": {"row": 73, "column": 9}, "end_point": {"row": 73, "column": 15}}, {"id": 288, "type": "field_identifier", "text": "getBytesPerChannel", "parent": 286, "children": [], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 34}}, {"id": 289, "type": "argument_list", "text": "()", "parent": 285, "children": [], "start_point": {"row": 73, "column": 34}, "end_point": {"row": 73, "column": 36}}, {"id": 290, "type": "case_statement", "text": "case 4: return CV_32F;", "parent": 282, "children": [291, 292, 293], "start_point": {"row": 74, "column": 3}, "end_point": {"row": 74, "column": 25}}, {"id": 291, "type": "case", "text": "case", "parent": 290, "children": [], "start_point": {"row": 74, "column": 3}, "end_point": {"row": 74, "column": 7}}, {"id": 292, "type": "number_literal", "text": "4", "parent": 290, "children": [], "start_point": {"row": 74, "column": 8}, "end_point": {"row": 74, "column": 9}}, {"id": 293, "type": "return_statement", "text": "return CV_32F;", "parent": 290, "children": [294], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 25}}, {"id": 294, "type": "identifier", "text": "CV_32F", "parent": 293, "children": [], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 24}}, {"id": 295, "type": "case_statement", "text": "case 2: return CV_16U;", "parent": 282, "children": [296, 297, 298], "start_point": {"row": 75, "column": 3}, "end_point": {"row": 75, "column": 25}}, {"id": 296, "type": "case", "text": "case", "parent": 295, "children": [], "start_point": {"row": 75, "column": 3}, "end_point": {"row": 75, "column": 7}}, {"id": 297, "type": "number_literal", "text": "2", "parent": 295, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 9}}, {"id": 298, "type": "return_statement", "text": "return CV_16U;", "parent": 295, "children": [299], "start_point": {"row": 75, "column": 11}, "end_point": {"row": 75, "column": 25}}, {"id": 299, "type": "identifier", "text": "CV_16U", "parent": 298, "children": [], "start_point": {"row": 75, "column": 18}, "end_point": {"row": 75, "column": 24}}, {"id": 300, "type": "case_statement", "text": "case 1:", "parent": 282, "children": [301, 302], "start_point": {"row": 76, "column": 3}, "end_point": {"row": 76, "column": 10}}, {"id": 301, "type": "case", "text": "case", "parent": 300, "children": [], "start_point": {"row": 76, "column": 3}, "end_point": {"row": 76, "column": 7}}, {"id": 302, "type": "number_literal", "text": "1", "parent": 300, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 9}}, {"id": 303, "type": "case_statement", "text": "default: return CV_8U;", "parent": 282, "children": [304, 305], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 33}}, {"id": 304, "type": "default", "text": "default", "parent": 303, "children": [], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 18}}, {"id": 305, "type": "return_statement", "text": "return CV_8U;", "parent": 303, "children": [306], "start_point": {"row": 76, "column": 20}, "end_point": {"row": 76, "column": 33}}, {"id": 306, "type": "identifier", "text": "CV_8U", "parent": 305, "children": [], "start_point": {"row": 76, "column": 27}, "end_point": {"row": 76, "column": 32}}, {"id": 307, "type": "ERROR", "text": "template <>", "parent": 33, "children": [308, 309, 310], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 12}}, {"id": 308, "type": "identifier", "text": "template", "parent": 307, "children": [], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 9}}, {"id": 309, "type": "<", "text": "<", "parent": 307, "children": [], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 11}}, {"id": 310, "type": ">", "text": ">", "parent": 307, "children": [], "start_point": {"row": 79, "column": 11}, "end_point": {"row": 79, "column": 12}}, {"id": 311, "type": "function_definition", "text": "inline int getDepth(const ofPixels_<signed short>& pixels) {\n\t\treturn CV_16S;\n\t}", "parent": 33, "children": [312, 314, 315], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 81, "column": 2}}, {"id": 312, "type": "storage_class_specifier", "text": "inline", "parent": 311, "children": [313], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 19}}, {"id": 313, "type": "inline", "text": "inline", "parent": 312, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 19}}, {"id": 314, "type": "primitive_type", "text": "int", "parent": 311, "children": [], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 23}}, {"id": 315, "type": "function_declarator", "text": "getDepth(const ofPixels_<signed short>& pixels)", "parent": 311, "children": [316, 317], "start_point": {"row": 79, "column": 24}, "end_point": {"row": 79, "column": 71}}, {"id": 316, "type": "identifier", "text": "getDepth", "parent": 315, "children": [], "start_point": {"row": 79, "column": 24}, "end_point": {"row": 79, "column": 32}}, {"id": 317, "type": "parameter_list", "text": "(const ofPixels_<signed short>& pixels)", "parent": 315, "children": [318], "start_point": {"row": 79, "column": 32}, "end_point": {"row": 79, "column": 71}}, {"id": 318, "type": "parameter_declaration", "text": "const ofPixels_<signed short>& pixels", "parent": 317, "children": [319, 325, 327], "start_point": {"row": 79, "column": 33}, "end_point": {"row": 79, "column": 70}}, {"id": 319, "type": "sized_type_specifier", "text": "ofPixels_<signed short", "parent": 318, "children": [320, 321, 323, 324], "start_point": {"row": 79, "column": 39}, "end_point": {"row": 79, "column": 61}}, {"id": 320, "type": "type_identifier", "text": "ofPixels_", "parent": 319, "children": [], "start_point": {"row": 79, "column": 39}, "end_point": {"row": 79, "column": 48}}, {"id": 321, "type": "ERROR", "text": "<", "parent": 319, "children": [322], "start_point": {"row": 79, "column": 48}, "end_point": {"row": 79, "column": 49}}, {"id": 322, "type": "<", "text": "<", "parent": 321, "children": [], "start_point": {"row": 79, "column": 48}, "end_point": {"row": 79, "column": 49}}, {"id": 323, "type": "signed", "text": "signed", "parent": 319, "children": [], "start_point": {"row": 79, "column": 49}, "end_point": {"row": 79, "column": 55}}, {"id": 324, "type": "short", "text": "short", "parent": 319, "children": [], "start_point": {"row": 79, "column": 56}, "end_point": {"row": 79, "column": 61}}, {"id": 325, "type": "ERROR", "text": ">&", "parent": 318, "children": [326], "start_point": {"row": 79, "column": 61}, "end_point": {"row": 79, "column": 63}}, {"id": 326, "type": ">", "text": ">", "parent": 325, "children": [], "start_point": {"row": 79, "column": 61}, "end_point": {"row": 79, "column": 62}}, {"id": 327, "type": "identifier", "text": "pixels", "parent": 318, "children": [], "start_point": {"row": 79, "column": 64}, "end_point": {"row": 79, "column": 70}}, {"id": 328, "type": "return_statement", "text": "return CV_16S;", "parent": 311, "children": [329], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 16}}, {"id": 329, "type": "identifier", "text": "CV_16S", "parent": 328, "children": [], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 15}}, {"id": 330, "type": "ERROR", "text": "template <> inline int getDepth(const ofPixels_<signed char>& pixels)", "parent": 33, "children": [331, 332, 333, 334, 336, 337, 338, 345, 346], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 70}}, {"id": 331, "type": "identifier", "text": "template", "parent": 330, "children": [], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 9}}, {"id": 332, "type": "<", "text": "<", "parent": 330, "children": [], "start_point": {"row": 82, "column": 10}, "end_point": {"row": 82, "column": 11}}, {"id": 333, "type": ">", "text": ">", "parent": 330, "children": [], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 12}}, {"id": 334, "type": "storage_class_specifier", "text": "inline", "parent": 330, "children": [335], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 19}}, {"id": 335, "type": "inline", "text": "inline", "parent": 334, "children": [], "start_point": {"row": 82, "column": 13}, "end_point": {"row": 82, "column": 19}}, {"id": 336, "type": "primitive_type", "text": "int", "parent": 330, "children": [], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 23}}, {"id": 337, "type": "identifier", "text": "getDepth", "parent": 330, "children": [], "start_point": {"row": 82, "column": 24}, "end_point": {"row": 82, "column": 32}}, {"id": 338, "type": "parameter_declaration", "text": "const ofPixels_<signed char", "parent": 330, "children": [339, 344], "start_point": {"row": 82, "column": 33}, "end_point": {"row": 82, "column": 60}}, {"id": 339, "type": "sized_type_specifier", "text": "ofPixels_<signed", "parent": 338, "children": [340, 341, 343], "start_point": {"row": 82, "column": 39}, "end_point": {"row": 82, "column": 55}}, {"id": 340, "type": "type_identifier", "text": "ofPixels_", "parent": 339, "children": [], "start_point": {"row": 82, "column": 39}, "end_point": {"row": 82, "column": 48}}, {"id": 341, "type": "ERROR", "text": "<", "parent": 339, "children": [342], "start_point": {"row": 82, "column": 48}, "end_point": {"row": 82, "column": 49}}, {"id": 342, "type": "<", "text": "<", "parent": 341, "children": [], "start_point": {"row": 82, "column": 48}, "end_point": {"row": 82, "column": 49}}, {"id": 343, "type": "signed", "text": "signed", "parent": 339, "children": [], "start_point": {"row": 82, "column": 49}, "end_point": {"row": 82, "column": 55}}, {"id": 344, "type": "identifier", "text": "char", "parent": 338, "children": [], "start_point": {"row": 82, "column": 56}, "end_point": {"row": 82, "column": 60}}, {"id": 345, "type": ">", "text": ">", "parent": 330, "children": [], "start_point": {"row": 82, "column": 60}, "end_point": {"row": 82, "column": 61}}, {"id": 346, "type": "pointer_expression", "text": "& pixels", "parent": 330, "children": [347], "start_point": {"row": 82, "column": 61}, "end_point": {"row": 82, "column": 69}}, {"id": 347, "type": "identifier", "text": "pixels", "parent": 346, "children": [], "start_point": {"row": 82, "column": 63}, "end_point": {"row": 82, "column": 69}}, {"id": 348, "type": "return_statement", "text": "return CV_8S;", "parent": 33, "children": [349], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 15}}, {"id": 349, "type": "identifier", "text": "CV_8S", "parent": 348, "children": [], "start_point": {"row": 83, "column": 9}, "end_point": {"row": 83, "column": 14}}, {"id": 350, "type": "binary_expression", "text": "template <class T> inline", "parent": 33, "children": [351, 354, 356, 357], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 26}}, {"id": 351, "type": "binary_expression", "text": "template <class", "parent": 350, "children": [352, 353], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 16}}, {"id": 352, "type": "identifier", "text": "template", "parent": 351, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 9}}, {"id": 353, "type": "<", "text": "<", "parent": 351, "children": [], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 11}}, {"id": 354, "type": "ERROR", "text": "T", "parent": 350, "children": [355], "start_point": {"row": 85, "column": 17}, "end_point": {"row": 85, "column": 18}}, {"id": 355, "type": "identifier", "text": "T", "parent": 354, "children": [], "start_point": {"row": 85, "column": 17}, "end_point": {"row": 85, "column": 18}}, {"id": 356, "type": ">", "text": ">", "parent": 350, "children": [], "start_point": {"row": 85, "column": 18}, "end_point": {"row": 85, "column": 19}}, {"id": 357, "type": "identifier", "text": "inline", "parent": 350, "children": [], "start_point": {"row": 85, "column": 20}, "end_point": {"row": 85, "column": 26}}, {"id": 358, "type": "function_definition", "text": "int getDepth(const ofBaseHasPixels_<T>& img) {\n\t\treturn getDepth(img.getPixels());\n\t}", "parent": 33, "children": [359, 360], "start_point": {"row": 85, "column": 27}, "end_point": {"row": 87, "column": 2}}, {"id": 359, "type": "primitive_type", "text": "int", "parent": 358, "children": [], "start_point": {"row": 85, "column": 27}, "end_point": {"row": 85, "column": 30}}, {"id": 360, "type": "function_declarator", "text": "getDepth(const ofBaseHasPixels_<T>& img)", "parent": 358, "children": [361, 362], "start_point": {"row": 85, "column": 31}, "end_point": {"row": 85, "column": 71}}, {"id": 361, "type": "identifier", "text": "getDepth", "parent": 360, "children": [], "start_point": {"row": 85, "column": 31}, "end_point": {"row": 85, "column": 39}}, {"id": 362, "type": "parameter_list", "text": "(const ofBaseHasPixels_<T>& img)", "parent": 360, "children": [363], "start_point": {"row": 85, "column": 39}, "end_point": {"row": 85, "column": 71}}, {"id": 363, "type": "parameter_declaration", "text": "const ofBaseHasPixels_<T>& img", "parent": 362, "children": [364, 365, 369], "start_point": {"row": 85, "column": 40}, "end_point": {"row": 85, "column": 70}}, {"id": 364, "type": "type_identifier", "text": "ofBaseHasPixels_", "parent": 363, "children": [], "start_point": {"row": 85, "column": 46}, "end_point": {"row": 85, "column": 62}}, {"id": 365, "type": "ERROR", "text": "<T>&", "parent": 363, "children": [366, 367, 368], "start_point": {"row": 85, "column": 62}, "end_point": {"row": 85, "column": 66}}, {"id": 366, "type": "<", "text": "<", "parent": 365, "children": [], "start_point": {"row": 85, "column": 62}, "end_point": {"row": 85, "column": 63}}, {"id": 367, "type": "identifier", "text": "T", "parent": 365, "children": [], "start_point": {"row": 85, "column": 63}, "end_point": {"row": 85, "column": 64}}, {"id": 368, "type": ">", "text": ">", "parent": 365, "children": [], "start_point": {"row": 85, "column": 64}, "end_point": {"row": 85, "column": 65}}, {"id": 369, "type": "identifier", "text": "img", "parent": 363, "children": [], "start_point": {"row": 85, "column": 67}, "end_point": {"row": 85, "column": 70}}, {"id": 370, "type": "return_statement", "text": "return getDepth(img.getPixels());", "parent": 358, "children": [371], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 35}}, {"id": 371, "type": "call_expression", "text": "getDepth(img.getPixels())", "parent": 370, "children": [372, 373], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 34}}, {"id": 372, "type": "identifier", "text": "getDepth", "parent": 371, "children": [], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 17}}, {"id": 373, "type": "argument_list", "text": "(img.getPixels())", "parent": 371, "children": [374], "start_point": {"row": 86, "column": 17}, "end_point": {"row": 86, "column": 34}}, {"id": 374, "type": "call_expression", "text": "img.getPixels()", "parent": 373, "children": [375, 378], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 33}}, {"id": 375, "type": "field_expression", "text": "img.getPixels", "parent": 374, "children": [376, 377], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 31}}, {"id": 376, "type": "identifier", "text": "img", "parent": 375, "children": [], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 21}}, {"id": 377, "type": "field_identifier", "text": "getPixels", "parent": 375, "children": [], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 31}}, {"id": 378, "type": "argument_list", "text": "()", "parent": 374, "children": [], "start_point": {"row": 86, "column": 31}, "end_point": {"row": 86, "column": 33}}, {"id": 379, "type": "function_definition", "text": "inline int getChannels(int cvImageType) {\n\t\treturn CV_MAT_CN(cvImageType);\n\t}", "parent": 33, "children": [380, 382, 383], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 92, "column": 2}}, {"id": 380, "type": "storage_class_specifier", "text": "inline", "parent": 379, "children": [381], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 7}}, {"id": 381, "type": "inline", "text": "inline", "parent": 380, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 7}}, {"id": 382, "type": "primitive_type", "text": "int", "parent": 379, "children": [], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 11}}, {"id": 383, "type": "function_declarator", "text": "getChannels(int cvImageType)", "parent": 379, "children": [384, 385], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 40}}, {"id": 384, "type": "identifier", "text": "getChannels", "parent": 383, "children": [], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 23}}, {"id": 385, "type": "parameter_list", "text": "(int cvImageType)", "parent": 383, "children": [386], "start_point": {"row": 90, "column": 23}, "end_point": {"row": 90, "column": 40}}, {"id": 386, "type": "parameter_declaration", "text": "int cvImageType", "parent": 385, "children": [387, 388], "start_point": {"row": 90, "column": 24}, "end_point": {"row": 90, "column": 39}}, {"id": 387, "type": "primitive_type", "text": "int", "parent": 386, "children": [], "start_point": {"row": 90, "column": 24}, "end_point": {"row": 90, "column": 27}}, {"id": 388, "type": "identifier", "text": "cvImageType", "parent": 386, "children": [], "start_point": {"row": 90, "column": 28}, "end_point": {"row": 90, "column": 39}}, {"id": 389, "type": "return_statement", "text": "return CV_MAT_CN(cvImageType);", "parent": 379, "children": [390], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 32}}, {"id": 390, "type": "call_expression", "text": "CV_MAT_CN(cvImageType)", "parent": 389, "children": [391, 392], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 31}}, {"id": 391, "type": "identifier", "text": "CV_MAT_CN", "parent": 390, "children": [], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 18}}, {"id": 392, "type": "argument_list", "text": "(cvImageType)", "parent": 390, "children": [393], "start_point": {"row": 91, "column": 18}, "end_point": {"row": 91, "column": 31}}, {"id": 393, "type": "identifier", "text": "cvImageType", "parent": 392, "children": [], "start_point": {"row": 91, "column": 19}, "end_point": {"row": 91, "column": 30}}, {"id": 394, "type": "function_definition", "text": "inline int getChannels(ofImageType imageType) {\n\t\tswitch(imageType) {\n\t\t\tcase OF_IMAGE_COLOR_ALPHA: return 4;\n\t\t\tcase OF_IMAGE_COLOR: return 3;\n\t\t\tcase OF_IMAGE_GRAYSCALE: default: return 1;\n\t\t}\n\t}", "parent": 33, "children": [395, 397, 398], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 99, "column": 2}}, {"id": 395, "type": "storage_class_specifier", "text": "inline", "parent": 394, "children": [396], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 7}}, {"id": 396, "type": "inline", "text": "inline", "parent": 395, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 7}}, {"id": 397, "type": "primitive_type", "text": "int", "parent": 394, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 11}}, {"id": 398, "type": "function_declarator", "text": "getChannels(ofImageType imageType)", "parent": 394, "children": [399, 400], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 93, "column": 46}}, {"id": 399, "type": "identifier", "text": "getChannels", "parent": 398, "children": [], "start_point": {"row": 93, "column": 12}, "end_point": {"row": 93, "column": 23}}, {"id": 400, "type": "parameter_list", "text": "(ofImageType imageType)", "parent": 398, "children": [401], "start_point": {"row": 93, "column": 23}, "end_point": {"row": 93, "column": 46}}, {"id": 401, "type": "parameter_declaration", "text": "ofImageType imageType", "parent": 400, "children": [402, 403], "start_point": {"row": 93, "column": 24}, "end_point": {"row": 93, "column": 45}}, {"id": 402, "type": "type_identifier", "text": "ofImageType", "parent": 401, "children": [], "start_point": {"row": 93, "column": 24}, "end_point": {"row": 93, "column": 35}}, {"id": 403, "type": "identifier", "text": "imageType", "parent": 401, "children": [], "start_point": {"row": 93, "column": 36}, "end_point": {"row": 93, "column": 45}}, {"id": 404, "type": "switch_statement", "text": "switch(imageType) {\n\t\t\tcase OF_IMAGE_COLOR_ALPHA: return 4;\n\t\t\tcase OF_IMAGE_COLOR: return 3;\n\t\t\tcase OF_IMAGE_GRAYSCALE: default: return 1;\n\t\t}", "parent": 394, "children": [405, 406], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 98, "column": 3}}, {"id": 405, "type": "switch", "text": "switch", "parent": 404, "children": [], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 8}}, {"id": 406, "type": "parenthesized_expression", "text": "(imageType)", "parent": 404, "children": [407], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 19}}, {"id": 407, "type": "identifier", "text": "imageType", "parent": 406, "children": [], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 18}}, {"id": 408, "type": "case_statement", "text": "case OF_IMAGE_COLOR_ALPHA: return 4;", "parent": 404, "children": [409, 410, 411], "start_point": {"row": 95, "column": 3}, "end_point": {"row": 95, "column": 39}}, {"id": 409, "type": "case", "text": "case", "parent": 408, "children": [], "start_point": {"row": 95, "column": 3}, "end_point": {"row": 95, "column": 7}}, {"id": 410, "type": "identifier", "text": "OF_IMAGE_COLOR_ALPHA", "parent": 408, "children": [], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 28}}, {"id": 411, "type": "return_statement", "text": "return 4;", "parent": 408, "children": [412], "start_point": {"row": 95, "column": 30}, "end_point": {"row": 95, "column": 39}}, {"id": 412, "type": "number_literal", "text": "4", "parent": 411, "children": [], "start_point": {"row": 95, "column": 37}, "end_point": {"row": 95, "column": 38}}, {"id": 413, "type": "case_statement", "text": "case OF_IMAGE_COLOR: return 3;", "parent": 404, "children": [414, 415, 416], "start_point": {"row": 96, "column": 3}, "end_point": {"row": 96, "column": 33}}, {"id": 414, "type": "case", "text": "case", "parent": 413, "children": [], "start_point": {"row": 96, "column": 3}, "end_point": {"row": 96, "column": 7}}, {"id": 415, "type": "identifier", "text": "OF_IMAGE_COLOR", "parent": 413, "children": [], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 22}}, {"id": 416, "type": "return_statement", "text": "return 3;", "parent": 413, "children": [417], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 33}}, {"id": 417, "type": "number_literal", "text": "3", "parent": 416, "children": [], "start_point": {"row": 96, "column": 31}, "end_point": {"row": 96, "column": 32}}, {"id": 418, "type": "case_statement", "text": "case OF_IMAGE_GRAYSCALE:", "parent": 404, "children": [419, 420], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 97, "column": 27}}, {"id": 419, "type": "case", "text": "case", "parent": 418, "children": [], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 97, "column": 7}}, {"id": 420, "type": "identifier", "text": "OF_IMAGE_GRAYSCALE", "parent": 418, "children": [], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 26}}, {"id": 421, "type": "case_statement", "text": "default: return 1;", "parent": 404, "children": [422, 423], "start_point": {"row": 97, "column": 28}, "end_point": {"row": 97, "column": 46}}, {"id": 422, "type": "default", "text": "default", "parent": 421, "children": [], "start_point": {"row": 97, "column": 28}, "end_point": {"row": 97, "column": 35}}, {"id": 423, "type": "return_statement", "text": "return 1;", "parent": 421, "children": [424], "start_point": {"row": 97, "column": 37}, "end_point": {"row": 97, "column": 46}}, {"id": 424, "type": "number_literal", "text": "1", "parent": 423, "children": [], "start_point": {"row": 97, "column": 44}, "end_point": {"row": 97, "column": 45}}, {"id": 425, "type": "function_definition", "text": "inline int getChannels(const cv::Mat& mat) {\n\t\treturn mat.channels();\n\t}", "parent": 33, "children": [426, 428, 429], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 102, "column": 2}}, {"id": 426, "type": "storage_class_specifier", "text": "inline", "parent": 425, "children": [427], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 7}}, {"id": 427, "type": "inline", "text": "inline", "parent": 426, "children": [], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 7}}, {"id": 428, "type": "primitive_type", "text": "int", "parent": 425, "children": [], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 11}}, {"id": 429, "type": "function_declarator", "text": "getChannels(const cv::Mat& mat)", "parent": 425, "children": [430, 431], "start_point": {"row": 100, "column": 12}, "end_point": {"row": 100, "column": 43}}, {"id": 430, "type": "identifier", "text": "getChannels", "parent": 429, "children": [], "start_point": {"row": 100, "column": 12}, "end_point": {"row": 100, "column": 23}}, {"id": 431, "type": "parameter_list", "text": "(const cv::Mat& mat)", "parent": 429, "children": [432], "start_point": {"row": 100, "column": 23}, "end_point": {"row": 100, "column": 43}}, {"id": 432, "type": "parameter_declaration", "text": "const cv::Mat& mat", "parent": 431, "children": [433, 434, 436], "start_point": {"row": 100, "column": 24}, "end_point": {"row": 100, "column": 42}}, {"id": 433, "type": "type_identifier", "text": "cv", "parent": 432, "children": [], "start_point": {"row": 100, "column": 30}, "end_point": {"row": 100, "column": 32}}, {"id": 434, "type": "ERROR", "text": "::Mat&", "parent": 432, "children": [435], "start_point": {"row": 100, "column": 32}, "end_point": {"row": 100, "column": 38}}, {"id": 435, "type": "identifier", "text": "Mat", "parent": 434, "children": [], "start_point": {"row": 100, "column": 34}, "end_point": {"row": 100, "column": 37}}, {"id": 436, "type": "identifier", "text": "mat", "parent": 432, "children": [], "start_point": {"row": 100, "column": 39}, "end_point": {"row": 100, "column": 42}}, {"id": 437, "type": "return_statement", "text": "return mat.channels();", "parent": 425, "children": [438], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 24}}, {"id": 438, "type": "call_expression", "text": "mat.channels()", "parent": 437, "children": [439, 442], "start_point": {"row": 101, "column": 9}, "end_point": {"row": 101, "column": 23}}, {"id": 439, "type": "field_expression", "text": "mat.channels", "parent": 438, "children": [440, 441], "start_point": {"row": 101, "column": 9}, "end_point": {"row": 101, "column": 21}}, {"id": 440, "type": "identifier", "text": "mat", "parent": 439, "children": [], "start_point": {"row": 101, "column": 9}, "end_point": {"row": 101, "column": 12}}, {"id": 441, "type": "field_identifier", "text": "channels", "parent": 439, "children": [], "start_point": {"row": 101, "column": 13}, "end_point": {"row": 101, "column": 21}}, {"id": 442, "type": "argument_list", "text": "()", "parent": 438, "children": [], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 101, "column": 23}}, {"id": 443, "type": "function_definition", "text": "inline int getChannels(const ofTexture& tex) {\n // avoid \"texture not allocated\" warning\n if(!tex.isAllocated()) {\n return GL_RGB;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA: return 4;\n case GL_RGB: return 3;\n case GL_LUMINANCE_ALPHA: return 2;\n case GL_LUMINANCE: return 1;\n \n#ifndef TARGET_OPENGLES\n case GL_RGBA8: return 4;\n case GL_RGB8: return 3;\n case GL_LUMINANCE8: return 1;\n case GL_LUMINANCE8_ALPHA8: return 2;\n \n case GL_RGBA32F_ARB: return 4;\n case GL_RGB32F_ARB: return 3;\n case GL_LUMINANCE32F_ARB: return 1;\n#endif\n default: return 0;\n }\n }", "parent": 33, "children": [444, 446, 447], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 127, "column": 5}}, {"id": 444, "type": "storage_class_specifier", "text": "inline", "parent": 443, "children": [445], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 10}}, {"id": 445, "type": "inline", "text": "inline", "parent": 444, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 10}}, {"id": 446, "type": "primitive_type", "text": "int", "parent": 443, "children": [], "start_point": {"row": 103, "column": 11}, "end_point": {"row": 103, "column": 14}}, {"id": 447, "type": "function_declarator", "text": "getChannels(const ofTexture& tex)", "parent": 443, "children": [448, 449], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 48}}, {"id": 448, "type": "identifier", "text": "getChannels", "parent": 447, "children": [], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 26}}, {"id": 449, "type": "parameter_list", "text": "(const ofTexture& tex)", "parent": 447, "children": [450], "start_point": {"row": 103, "column": 26}, "end_point": {"row": 103, "column": 48}}, {"id": 450, "type": "parameter_declaration", "text": "const ofTexture& tex", "parent": 449, "children": [451, 452], "start_point": {"row": 103, "column": 27}, "end_point": {"row": 103, "column": 47}}, {"id": 451, "type": "type_identifier", "text": "ofTexture", "parent": 450, "children": [], "start_point": {"row": 103, "column": 33}, "end_point": {"row": 103, "column": 42}}, {"id": 452, "type": "identifier", "text": "tex", "parent": 450, "children": [], "start_point": {"row": 103, "column": 44}, "end_point": {"row": 103, "column": 47}}, {"id": 453, "type": "if_statement", "text": "if(!tex.isAllocated()) {\n return GL_RGB;\n }", "parent": 443, "children": [454], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 107, "column": 9}}, {"id": 454, "type": "parenthesized_expression", "text": "(!tex.isAllocated())", "parent": 453, "children": [455], "start_point": {"row": 105, "column": 10}, "end_point": {"row": 105, "column": 30}}, {"id": 455, "type": "unary_expression", "text": "!tex.isAllocated()", "parent": 454, "children": [456, 457], "start_point": {"row": 105, "column": 11}, "end_point": {"row": 105, "column": 29}}, {"id": 456, "type": "!", "text": "!", "parent": 455, "children": [], "start_point": {"row": 105, "column": 11}, "end_point": {"row": 105, "column": 12}}, {"id": 457, "type": "call_expression", "text": "tex.isAllocated()", "parent": 455, "children": [458, 461], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 29}}, {"id": 458, "type": "field_expression", "text": "tex.isAllocated", "parent": 457, "children": [459, 460], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 27}}, {"id": 459, "type": "identifier", "text": "tex", "parent": 458, "children": [], "start_point": {"row": 105, "column": 12}, "end_point": {"row": 105, "column": 15}}, {"id": 460, "type": "field_identifier", "text": "isAllocated", "parent": 458, "children": [], "start_point": {"row": 105, "column": 16}, "end_point": {"row": 105, "column": 27}}, {"id": 461, "type": "argument_list", "text": "()", "parent": 457, "children": [], "start_point": {"row": 105, "column": 27}, "end_point": {"row": 105, "column": 29}}, {"id": 462, "type": "return_statement", "text": "return GL_RGB;", "parent": 453, "children": [463], "start_point": {"row": 106, "column": 12}, "end_point": {"row": 106, "column": 26}}, {"id": 463, "type": "identifier", "text": "GL_RGB", "parent": 462, "children": [], "start_point": {"row": 106, "column": 19}, "end_point": {"row": 106, "column": 25}}, {"id": 464, "type": "declaration", "text": "int type = tex.getTextureData().glInternalFormat;", "parent": 443, "children": [465, 466], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 57}}, {"id": 465, "type": "primitive_type", "text": "int", "parent": 464, "children": [], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 11}}, {"id": 466, "type": "init_declarator", "text": "type = tex.getTextureData().glInternalFormat", "parent": 464, "children": [467, 468, 469], "start_point": {"row": 108, "column": 12}, "end_point": {"row": 108, "column": 56}}, {"id": 467, "type": "identifier", "text": "type", "parent": 466, "children": [], "start_point": {"row": 108, "column": 12}, "end_point": {"row": 108, "column": 16}}, {"id": 468, "type": "=", "text": "=", "parent": 466, "children": [], "start_point": {"row": 108, "column": 17}, "end_point": {"row": 108, "column": 18}}, {"id": 469, "type": "field_expression", "text": "tex.getTextureData().glInternalFormat", "parent": 466, "children": [470, 475], "start_point": {"row": 108, "column": 19}, "end_point": {"row": 108, "column": 56}}, {"id": 470, "type": "call_expression", "text": "tex.getTextureData()", "parent": 469, "children": [471, 474], "start_point": {"row": 108, "column": 19}, "end_point": {"row": 108, "column": 39}}, {"id": 471, "type": "field_expression", "text": "tex.getTextureData", "parent": 470, "children": [472, 473], "start_point": {"row": 108, "column": 19}, "end_point": {"row": 108, "column": 37}}, {"id": 472, "type": "identifier", "text": "tex", "parent": 471, "children": [], "start_point": {"row": 108, "column": 19}, "end_point": {"row": 108, "column": 22}}, {"id": 473, "type": "field_identifier", "text": "getTextureData", "parent": 471, "children": [], "start_point": {"row": 108, "column": 23}, "end_point": {"row": 108, "column": 37}}, {"id": 474, "type": "argument_list", "text": "()", "parent": 470, "children": [], "start_point": {"row": 108, "column": 37}, "end_point": {"row": 108, "column": 39}}, {"id": 475, "type": "field_identifier", "text": "glInternalFormat", "parent": 469, "children": [], "start_point": {"row": 108, "column": 40}, "end_point": {"row": 108, "column": 56}}, {"id": 476, "type": "switch_statement", "text": "switch(type) {\n case GL_RGBA: return 4;\n case GL_RGB: return 3;\n case GL_LUMINANCE_ALPHA: return 2;\n case GL_LUMINANCE: return 1;\n \n#ifndef TARGET_OPENGLES\n case GL_RGBA8: return 4;\n case GL_RGB8: return 3;\n case GL_LUMINANCE8: return 1;\n case GL_LUMINANCE8_ALPHA8: return 2;\n \n case GL_RGBA32F_ARB: return 4;\n case GL_RGB32F_ARB: return 3;\n case GL_LUMINANCE32F_ARB: return 1;\n#endif\n default: return 0;\n }", "parent": 443, "children": [477, 478], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 126, "column": 9}}, {"id": 477, "type": "switch", "text": "switch", "parent": 476, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 14}}, {"id": 478, "type": "parenthesized_expression", "text": "(type)", "parent": 476, "children": [479], "start_point": {"row": 109, "column": 14}, "end_point": {"row": 109, "column": 20}}, {"id": 479, "type": "identifier", "text": "type", "parent": 478, "children": [], "start_point": {"row": 109, "column": 15}, "end_point": {"row": 109, "column": 19}}, {"id": 480, "type": "case_statement", "text": "case GL_RGBA: return 4;", "parent": 476, "children": [481, 482, 483], "start_point": {"row": 110, "column": 12}, "end_point": {"row": 110, "column": 35}}, {"id": 481, "type": "case", "text": "case", "parent": 480, "children": [], "start_point": {"row": 110, "column": 12}, "end_point": {"row": 110, "column": 16}}, {"id": 482, "type": "identifier", "text": "GL_RGBA", "parent": 480, "children": [], "start_point": {"row": 110, "column": 17}, "end_point": {"row": 110, "column": 24}}, {"id": 483, "type": "return_statement", "text": "return 4;", "parent": 480, "children": [484], "start_point": {"row": 110, "column": 26}, "end_point": {"row": 110, "column": 35}}, {"id": 484, "type": "number_literal", "text": "4", "parent": 483, "children": [], "start_point": {"row": 110, "column": 33}, "end_point": {"row": 110, "column": 34}}, {"id": 485, "type": "case_statement", "text": "case GL_RGB: return 3;", "parent": 476, "children": [486, 487, 488], "start_point": {"row": 111, "column": 12}, "end_point": {"row": 111, "column": 34}}, {"id": 486, "type": "case", "text": "case", "parent": 485, "children": [], "start_point": {"row": 111, "column": 12}, "end_point": {"row": 111, "column": 16}}, {"id": 487, "type": "identifier", "text": "GL_RGB", "parent": 485, "children": [], "start_point": {"row": 111, "column": 17}, "end_point": {"row": 111, "column": 23}}, {"id": 488, "type": "return_statement", "text": "return 3;", "parent": 485, "children": [489], "start_point": {"row": 111, "column": 25}, "end_point": {"row": 111, "column": 34}}, {"id": 489, "type": "number_literal", "text": "3", "parent": 488, "children": [], "start_point": {"row": 111, "column": 32}, "end_point": {"row": 111, "column": 33}}, {"id": 490, "type": "case_statement", "text": "case GL_LUMINANCE_ALPHA: return 2;", "parent": 476, "children": [491, 492, 493], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 46}}, {"id": 491, "type": "case", "text": "case", "parent": 490, "children": [], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 16}}, {"id": 492, "type": "identifier", "text": "GL_LUMINANCE_ALPHA", "parent": 490, "children": [], "start_point": {"row": 112, "column": 17}, "end_point": {"row": 112, "column": 35}}, {"id": 493, "type": "return_statement", "text": "return 2;", "parent": 490, "children": [494], "start_point": {"row": 112, "column": 37}, "end_point": {"row": 112, "column": 46}}, {"id": 494, "type": "number_literal", "text": "2", "parent": 493, "children": [], "start_point": {"row": 112, "column": 44}, "end_point": {"row": 112, "column": 45}}, {"id": 495, "type": "case_statement", "text": "case GL_LUMINANCE: return 1;", "parent": 476, "children": [496, 497, 498], "start_point": {"row": 113, "column": 12}, "end_point": {"row": 113, "column": 40}}, {"id": 496, "type": "case", "text": "case", "parent": 495, "children": [], "start_point": {"row": 113, "column": 12}, "end_point": {"row": 113, "column": 16}}, {"id": 497, "type": "identifier", "text": "GL_LUMINANCE", "parent": 495, "children": [], "start_point": {"row": 113, "column": 17}, "end_point": {"row": 113, "column": 29}}, {"id": 498, "type": "return_statement", "text": "return 1;", "parent": 495, "children": [499], "start_point": {"row": 113, "column": 31}, "end_point": {"row": 113, "column": 40}}, {"id": 499, "type": "number_literal", "text": "1", "parent": 498, "children": [], "start_point": {"row": 113, "column": 38}, "end_point": {"row": 113, "column": 39}}, {"id": 500, "type": "preproc_ifdef", "text": "#ifndef TARGET_OPENGLES\n case GL_RGBA8: return 4;\n case GL_RGB8: return 3;\n case GL_LUMINANCE8: return 1;\n case GL_LUMINANCE8_ALPHA8: return 2;\n \n case GL_RGBA32F_ARB: return 4;\n case GL_RGB32F_ARB: return 3;\n case GL_LUMINANCE32F_ARB: return 1;\n#endif", "parent": 476, "children": [501, 502, 503, 508, 513, 518, 523, 528, 533, 538], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 124, "column": 6}}, {"id": 501, "type": "#ifndef", "text": "#ifndef", "parent": 500, "children": [], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 115, "column": 7}}, {"id": 502, "type": "identifier", "text": "TARGET_OPENGLES", "parent": 500, "children": [], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 23}}, {"id": 503, "type": "case_statement", "text": "case GL_RGBA8: return 4;", "parent": 500, "children": [504, 505, 506], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 36}}, {"id": 504, "type": "case", "text": "case", "parent": 503, "children": [], "start_point": {"row": 116, "column": 12}, "end_point": {"row": 116, "column": 16}}, {"id": 505, "type": "identifier", "text": "GL_RGBA8", "parent": 503, "children": [], "start_point": {"row": 116, "column": 17}, "end_point": {"row": 116, "column": 25}}, {"id": 506, "type": "return_statement", "text": "return 4;", "parent": 503, "children": [507], "start_point": {"row": 116, "column": 27}, "end_point": {"row": 116, "column": 36}}, {"id": 507, "type": "number_literal", "text": "4", "parent": 506, "children": [], "start_point": {"row": 116, "column": 34}, "end_point": {"row": 116, "column": 35}}, {"id": 508, "type": "case_statement", "text": "case GL_RGB8: return 3;", "parent": 500, "children": [509, 510, 511], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 35}}, {"id": 509, "type": "case", "text": "case", "parent": 508, "children": [], "start_point": {"row": 117, "column": 12}, "end_point": {"row": 117, "column": 16}}, {"id": 510, "type": "identifier", "text": "GL_RGB8", "parent": 508, "children": [], "start_point": {"row": 117, "column": 17}, "end_point": {"row": 117, "column": 24}}, {"id": 511, "type": "return_statement", "text": "return 3;", "parent": 508, "children": [512], "start_point": {"row": 117, "column": 26}, "end_point": {"row": 117, "column": 35}}, {"id": 512, "type": "number_literal", "text": "3", "parent": 511, "children": [], "start_point": {"row": 117, "column": 33}, "end_point": {"row": 117, "column": 34}}, {"id": 513, "type": "case_statement", "text": "case GL_LUMINANCE8: return 1;", "parent": 500, "children": [514, 515, 516], "start_point": {"row": 118, "column": 12}, "end_point": {"row": 118, "column": 41}}, {"id": 514, "type": "case", "text": "case", "parent": 513, "children": [], "start_point": {"row": 118, "column": 12}, "end_point": {"row": 118, "column": 16}}, {"id": 515, "type": "identifier", "text": "GL_LUMINANCE8", "parent": 513, "children": [], "start_point": {"row": 118, "column": 17}, "end_point": {"row": 118, "column": 30}}, {"id": 516, "type": "return_statement", "text": "return 1;", "parent": 513, "children": [517], "start_point": {"row": 118, "column": 32}, "end_point": {"row": 118, "column": 41}}, {"id": 517, "type": "number_literal", "text": "1", "parent": 516, "children": [], "start_point": {"row": 118, "column": 39}, "end_point": {"row": 118, "column": 40}}, {"id": 518, "type": "case_statement", "text": "case GL_LUMINANCE8_ALPHA8: return 2;", "parent": 500, "children": [519, 520, 521], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 48}}, {"id": 519, "type": "case", "text": "case", "parent": 518, "children": [], "start_point": {"row": 119, "column": 12}, "end_point": {"row": 119, "column": 16}}, {"id": 520, "type": "identifier", "text": "GL_LUMINANCE8_ALPHA8", "parent": 518, "children": [], "start_point": {"row": 119, "column": 17}, "end_point": {"row": 119, "column": 37}}, {"id": 521, "type": "return_statement", "text": "return 2;", "parent": 518, "children": [522], "start_point": {"row": 119, "column": 39}, "end_point": {"row": 119, "column": 48}}, {"id": 522, "type": "number_literal", "text": "2", "parent": 521, "children": [], "start_point": {"row": 119, "column": 46}, "end_point": {"row": 119, "column": 47}}, {"id": 523, "type": "case_statement", "text": "case GL_RGBA32F_ARB: return 4;", "parent": 500, "children": [524, 525, 526], "start_point": {"row": 121, "column": 12}, "end_point": {"row": 121, "column": 42}}, {"id": 524, "type": "case", "text": "case", "parent": 523, "children": [], "start_point": {"row": 121, "column": 12}, "end_point": {"row": 121, "column": 16}}, {"id": 525, "type": "identifier", "text": "GL_RGBA32F_ARB", "parent": 523, "children": [], "start_point": {"row": 121, "column": 17}, "end_point": {"row": 121, "column": 31}}, {"id": 526, "type": "return_statement", "text": "return 4;", "parent": 523, "children": [527], "start_point": {"row": 121, "column": 33}, "end_point": {"row": 121, "column": 42}}, {"id": 527, "type": "number_literal", "text": "4", "parent": 526, "children": [], "start_point": {"row": 121, "column": 40}, "end_point": {"row": 121, "column": 41}}, {"id": 528, "type": "case_statement", "text": "case GL_RGB32F_ARB: return 3;", "parent": 500, "children": [529, 530, 531], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 41}}, {"id": 529, "type": "case", "text": "case", "parent": 528, "children": [], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 16}}, {"id": 530, "type": "identifier", "text": "GL_RGB32F_ARB", "parent": 528, "children": [], "start_point": {"row": 122, "column": 17}, "end_point": {"row": 122, "column": 30}}, {"id": 531, "type": "return_statement", "text": "return 3;", "parent": 528, "children": [532], "start_point": {"row": 122, "column": 32}, "end_point": {"row": 122, "column": 41}}, {"id": 532, "type": "number_literal", "text": "3", "parent": 531, "children": [], "start_point": {"row": 122, "column": 39}, "end_point": {"row": 122, "column": 40}}, {"id": 533, "type": "case_statement", "text": "case GL_LUMINANCE32F_ARB: return 1;", "parent": 500, "children": [534, 535, 536], "start_point": {"row": 123, "column": 12}, "end_point": {"row": 123, "column": 47}}, {"id": 534, "type": "case", "text": "case", "parent": 533, "children": [], "start_point": {"row": 123, "column": 12}, "end_point": {"row": 123, "column": 16}}, {"id": 535, "type": "identifier", "text": "GL_LUMINANCE32F_ARB", "parent": 533, "children": [], "start_point": {"row": 123, "column": 17}, "end_point": {"row": 123, "column": 36}}, {"id": 536, "type": "return_statement", "text": "return 1;", "parent": 533, "children": [537], "start_point": {"row": 123, "column": 38}, "end_point": {"row": 123, "column": 47}}, {"id": 537, "type": "number_literal", "text": "1", "parent": 536, "children": [], "start_point": {"row": 123, "column": 45}, "end_point": {"row": 123, "column": 46}}, {"id": 538, "type": "#endif", "text": "#endif", "parent": 500, "children": [], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 124, "column": 6}}, {"id": 539, "type": "case_statement", "text": "default: return 0;", "parent": 476, "children": [540, 541], "start_point": {"row": 125, "column": 12}, "end_point": {"row": 125, "column": 30}}, {"id": 540, "type": "default", "text": "default", "parent": 539, "children": [], "start_point": {"row": 125, "column": 12}, "end_point": {"row": 125, "column": 19}}, {"id": 541, "type": "return_statement", "text": "return 0;", "parent": 539, "children": [542], "start_point": {"row": 125, "column": 21}, "end_point": {"row": 125, "column": 30}}, {"id": 542, "type": "number_literal", "text": "0", "parent": 541, "children": [], "start_point": {"row": 125, "column": 28}, "end_point": {"row": 125, "column": 29}}, {"id": 543, "type": "binary_expression", "text": "template <class T> inline", "parent": 33, "children": [544, 547, 549, 550], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 26}}, {"id": 544, "type": "binary_expression", "text": "template <class", "parent": 543, "children": [545, 546], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 16}}, {"id": 545, "type": "identifier", "text": "template", "parent": 544, "children": [], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 9}}, {"id": 546, "type": "<", "text": "<", "parent": 544, "children": [], "start_point": {"row": 128, "column": 10}, "end_point": {"row": 128, "column": 11}}, {"id": 547, "type": "ERROR", "text": "T", "parent": 543, "children": [548], "start_point": {"row": 128, "column": 17}, "end_point": {"row": 128, "column": 18}}, {"id": 548, "type": "identifier", "text": "T", "parent": 547, "children": [], "start_point": {"row": 128, "column": 17}, "end_point": {"row": 128, "column": 18}}, {"id": 549, "type": ">", "text": ">", "parent": 543, "children": [], "start_point": {"row": 128, "column": 18}, "end_point": {"row": 128, "column": 19}}, {"id": 550, "type": "identifier", "text": "inline", "parent": 543, "children": [], "start_point": {"row": 128, "column": 20}, "end_point": {"row": 128, "column": 26}}, {"id": 551, "type": "function_definition", "text": "int getChannels(const ofPixels_<T>& pixels) {\n\t\treturn pixels.getNumChannels();\n\t}", "parent": 33, "children": [552, 553], "start_point": {"row": 128, "column": 27}, "end_point": {"row": 130, "column": 2}}, {"id": 552, "type": "primitive_type", "text": "int", "parent": 551, "children": [], "start_point": {"row": 128, "column": 27}, "end_point": {"row": 128, "column": 30}}, {"id": 553, "type": "function_declarator", "text": "getChannels(const ofPixels_<T>& pixels)", "parent": 551, "children": [554, 555], "start_point": {"row": 128, "column": 31}, "end_point": {"row": 128, "column": 70}}, {"id": 554, "type": "identifier", "text": "getChannels", "parent": 553, "children": [], "start_point": {"row": 128, "column": 31}, "end_point": {"row": 128, "column": 42}}, {"id": 555, "type": "parameter_list", "text": "(const ofPixels_<T>& pixels)", "parent": 553, "children": [556], "start_point": {"row": 128, "column": 42}, "end_point": {"row": 128, "column": 70}}, {"id": 556, "type": "parameter_declaration", "text": "const ofPixels_<T>& pixels", "parent": 555, "children": [557, 558, 562], "start_point": {"row": 128, "column": 43}, "end_point": {"row": 128, "column": 69}}, {"id": 557, "type": "type_identifier", "text": "ofPixels_", "parent": 556, "children": [], "start_point": {"row": 128, "column": 49}, "end_point": {"row": 128, "column": 58}}, {"id": 558, "type": "ERROR", "text": "<T>&", "parent": 556, "children": [559, 560, 561], "start_point": {"row": 128, "column": 58}, "end_point": {"row": 128, "column": 62}}, {"id": 559, "type": "<", "text": "<", "parent": 558, "children": [], "start_point": {"row": 128, "column": 58}, "end_point": {"row": 128, "column": 59}}, {"id": 560, "type": "identifier", "text": "T", "parent": 558, "children": [], "start_point": {"row": 128, "column": 59}, "end_point": {"row": 128, "column": 60}}, {"id": 561, "type": ">", "text": ">", "parent": 558, "children": [], "start_point": {"row": 128, "column": 60}, "end_point": {"row": 128, "column": 61}}, {"id": 562, "type": "identifier", "text": "pixels", "parent": 556, "children": [], "start_point": {"row": 128, "column": 63}, "end_point": {"row": 128, "column": 69}}, {"id": 563, "type": "return_statement", "text": "return pixels.getNumChannels();", "parent": 551, "children": [564], "start_point": {"row": 129, "column": 2}, "end_point": {"row": 129, "column": 33}}, {"id": 564, "type": "call_expression", "text": "pixels.getNumChannels()", "parent": 563, "children": [565, 568], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 32}}, {"id": 565, "type": "field_expression", "text": "pixels.getNumChannels", "parent": 564, "children": [566, 567], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 30}}, {"id": 566, "type": "identifier", "text": "pixels", "parent": 565, "children": [], "start_point": {"row": 129, "column": 9}, "end_point": {"row": 129, "column": 15}}, {"id": 567, "type": "field_identifier", "text": "getNumChannels", "parent": 565, "children": [], "start_point": {"row": 129, "column": 16}, "end_point": {"row": 129, "column": 30}}, {"id": 568, "type": "argument_list", "text": "()", "parent": 564, "children": [], "start_point": {"row": 129, "column": 30}, "end_point": {"row": 129, "column": 32}}, {"id": 569, "type": "binary_expression", "text": "template <class T> inline", "parent": 33, "children": [570, 573, 575, 576], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 131, "column": 26}}, {"id": 570, "type": "binary_expression", "text": "template <class", "parent": 569, "children": [571, 572], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 131, "column": 16}}, {"id": 571, "type": "identifier", "text": "template", "parent": 570, "children": [], "start_point": {"row": 131, "column": 1}, "end_point": {"row": 131, "column": 9}}, {"id": 572, "type": "<", "text": "<", "parent": 570, "children": [], "start_point": {"row": 131, "column": 10}, "end_point": {"row": 131, "column": 11}}, {"id": 573, "type": "ERROR", "text": "T", "parent": 569, "children": [574], "start_point": {"row": 131, "column": 17}, "end_point": {"row": 131, "column": 18}}, {"id": 574, "type": "identifier", "text": "T", "parent": 573, "children": [], "start_point": {"row": 131, "column": 17}, "end_point": {"row": 131, "column": 18}}, {"id": 575, "type": ">", "text": ">", "parent": 569, "children": [], "start_point": {"row": 131, "column": 18}, "end_point": {"row": 131, "column": 19}}, {"id": 576, "type": "identifier", "text": "inline", "parent": 569, "children": [], "start_point": {"row": 131, "column": 20}, "end_point": {"row": 131, "column": 26}}, {"id": 577, "type": "function_definition", "text": "int getChannels(const ofBaseHasPixels_<T>& img) {\n\t\treturn getChannels(img.getPixels());\n\t}", "parent": 33, "children": [578, 579], "start_point": {"row": 131, "column": 27}, "end_point": {"row": 133, "column": 2}}, {"id": 578, "type": "primitive_type", "text": "int", "parent": 577, "children": [], "start_point": {"row": 131, "column": 27}, "end_point": {"row": 131, "column": 30}}, {"id": 579, "type": "function_declarator", "text": "getChannels(const ofBaseHasPixels_<T>& img)", "parent": 577, "children": [580, 581], "start_point": {"row": 131, "column": 31}, "end_point": {"row": 131, "column": 74}}, {"id": 580, "type": "identifier", "text": "getChannels", "parent": 579, "children": [], "start_point": {"row": 131, "column": 31}, "end_point": {"row": 131, "column": 42}}, {"id": 581, "type": "parameter_list", "text": "(const ofBaseHasPixels_<T>& img)", "parent": 579, "children": [582], "start_point": {"row": 131, "column": 42}, "end_point": {"row": 131, "column": 74}}, {"id": 582, "type": "parameter_declaration", "text": "const ofBaseHasPixels_<T>& img", "parent": 581, "children": [583, 584, 588], "start_point": {"row": 131, "column": 43}, "end_point": {"row": 131, "column": 73}}, {"id": 583, "type": "type_identifier", "text": "ofBaseHasPixels_", "parent": 582, "children": [], "start_point": {"row": 131, "column": 49}, "end_point": {"row": 131, "column": 65}}, {"id": 584, "type": "ERROR", "text": "<T>&", "parent": 582, "children": [585, 586, 587], "start_point": {"row": 131, "column": 65}, "end_point": {"row": 131, "column": 69}}, {"id": 585, "type": "<", "text": "<", "parent": 584, "children": [], "start_point": {"row": 131, "column": 65}, "end_point": {"row": 131, "column": 66}}, {"id": 586, "type": "identifier", "text": "T", "parent": 584, "children": [], "start_point": {"row": 131, "column": 66}, "end_point": {"row": 131, "column": 67}}, {"id": 587, "type": ">", "text": ">", "parent": 584, "children": [], "start_point": {"row": 131, "column": 67}, "end_point": {"row": 131, "column": 68}}, {"id": 588, "type": "identifier", "text": "img", "parent": 582, "children": [], "start_point": {"row": 131, "column": 70}, "end_point": {"row": 131, "column": 73}}, {"id": 589, "type": "return_statement", "text": "return getChannels(img.getPixels());", "parent": 577, "children": [590], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 132, "column": 38}}, {"id": 590, "type": "call_expression", "text": "getChannels(img.getPixels())", "parent": 589, "children": [591, 592], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 132, "column": 37}}, {"id": 591, "type": "identifier", "text": "getChannels", "parent": 590, "children": [], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 132, "column": 20}}, {"id": 592, "type": "argument_list", "text": "(img.getPixels())", "parent": 590, "children": [593], "start_point": {"row": 132, "column": 20}, "end_point": {"row": 132, "column": 37}}, {"id": 593, "type": "call_expression", "text": "img.getPixels()", "parent": 592, "children": [594, 597], "start_point": {"row": 132, "column": 21}, "end_point": {"row": 132, "column": 36}}, {"id": 594, "type": "field_expression", "text": "img.getPixels", "parent": 593, "children": [595, 596], "start_point": {"row": 132, "column": 21}, "end_point": {"row": 132, "column": 34}}, {"id": 595, "type": "identifier", "text": "img", "parent": 594, "children": [], "start_point": {"row": 132, "column": 21}, "end_point": {"row": 132, "column": 24}}, {"id": 596, "type": "field_identifier", "text": "getPixels", "parent": 594, "children": [], "start_point": {"row": 132, "column": 25}, "end_point": {"row": 132, "column": 34}}, {"id": 597, "type": "argument_list", "text": "()", "parent": 593, "children": [], "start_point": {"row": 132, "column": 34}, "end_point": {"row": 132, "column": 36}}, {"id": 598, "type": "function_definition", "text": "inline int getCvImageType(int channels, int cvDepth = CV_8U) {\n\t\treturn CV_MAKETYPE(cvDepth, channels);\n\t}", "parent": 33, "children": [599, 601, 602], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 138, "column": 2}}, {"id": 599, "type": "storage_class_specifier", "text": "inline", "parent": 598, "children": [600], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 7}}, {"id": 600, "type": "inline", "text": "inline", "parent": 599, "children": [], "start_point": {"row": 136, "column": 1}, "end_point": {"row": 136, "column": 7}}, {"id": 601, "type": "primitive_type", "text": "int", "parent": 598, "children": [], "start_point": {"row": 136, "column": 8}, "end_point": {"row": 136, "column": 11}}, {"id": 602, "type": "function_declarator", "text": "getCvImageType(int channels, int cvDepth = CV_8U)", "parent": 598, "children": [603, 604], "start_point": {"row": 136, "column": 12}, "end_point": {"row": 136, "column": 61}}, {"id": 603, "type": "identifier", "text": "getCvImageType", "parent": 602, "children": [], "start_point": {"row": 136, "column": 12}, "end_point": {"row": 136, "column": 26}}, {"id": 604, "type": "parameter_list", "text": "(int channels, int cvDepth = CV_8U)", "parent": 602, "children": [605, 608], "start_point": {"row": 136, "column": 26}, "end_point": {"row": 136, "column": 61}}, {"id": 605, "type": "parameter_declaration", "text": "int channels", "parent": 604, "children": [606, 607], "start_point": {"row": 136, "column": 27}, "end_point": {"row": 136, "column": 39}}, {"id": 606, "type": "primitive_type", "text": "int", "parent": 605, "children": [], "start_point": {"row": 136, "column": 27}, "end_point": {"row": 136, "column": 30}}, {"id": 607, "type": "identifier", "text": "channels", "parent": 605, "children": [], "start_point": {"row": 136, "column": 31}, "end_point": {"row": 136, "column": 39}}, {"id": 608, "type": "parameter_declaration", "text": "int cvDepth = CV_8U", "parent": 604, "children": [609, 610, 613], "start_point": {"row": 136, "column": 41}, "end_point": {"row": 136, "column": 60}}, {"id": 609, "type": "primitive_type", "text": "int", "parent": 608, "children": [], "start_point": {"row": 136, "column": 41}, "end_point": {"row": 136, "column": 44}}, {"id": 610, "type": "ERROR", "text": "cvDepth =", "parent": 608, "children": [611, 612], "start_point": {"row": 136, "column": 45}, "end_point": {"row": 136, "column": 54}}, {"id": 611, "type": "identifier", "text": "cvDepth", "parent": 610, "children": [], "start_point": {"row": 136, "column": 45}, "end_point": {"row": 136, "column": 52}}, {"id": 612, "type": "=", "text": "=", "parent": 610, "children": [], "start_point": {"row": 136, "column": 53}, "end_point": {"row": 136, "column": 54}}, {"id": 613, "type": "identifier", "text": "CV_8U", "parent": 608, "children": [], "start_point": {"row": 136, "column": 55}, "end_point": {"row": 136, "column": 60}}, {"id": 614, "type": "return_statement", "text": "return CV_MAKETYPE(cvDepth, channels);", "parent": 598, "children": [615], "start_point": {"row": 137, "column": 2}, "end_point": {"row": 137, "column": 40}}, {"id": 615, "type": "call_expression", "text": "CV_MAKETYPE(cvDepth, channels)", "parent": 614, "children": [616, 617], "start_point": {"row": 137, "column": 9}, "end_point": {"row": 137, "column": 39}}, {"id": 616, "type": "identifier", "text": "CV_MAKETYPE", "parent": 615, "children": [], "start_point": {"row": 137, "column": 9}, "end_point": {"row": 137, "column": 20}}, {"id": 617, "type": "argument_list", "text": "(cvDepth, channels)", "parent": 615, "children": [618, 619], "start_point": {"row": 137, "column": 20}, "end_point": {"row": 137, "column": 39}}, {"id": 618, "type": "identifier", "text": "cvDepth", "parent": 617, "children": [], "start_point": {"row": 137, "column": 21}, "end_point": {"row": 137, "column": 28}}, {"id": 619, "type": "identifier", "text": "channels", "parent": 617, "children": [], "start_point": {"row": 137, "column": 30}, "end_point": {"row": 137, "column": 38}}, {"id": 620, "type": "function_definition", "text": "inline int getCvImageType(ofImageType imageType, int cvDepth = CV_8U) {\n\t\treturn CV_MAKETYPE(cvDepth, getChannels(imageType));\n\t}", "parent": 33, "children": [621, 623, 624], "start_point": {"row": 139, "column": 1}, "end_point": {"row": 141, "column": 2}}, {"id": 621, "type": "storage_class_specifier", "text": "inline", "parent": 620, "children": [622], "start_point": {"row": 139, "column": 1}, "end_point": {"row": 139, "column": 7}}, {"id": 622, "type": "inline", "text": "inline", "parent": 621, "children": [], "start_point": {"row": 139, "column": 1}, "end_point": {"row": 139, "column": 7}}, {"id": 623, "type": "primitive_type", "text": "int", "parent": 620, "children": [], "start_point": {"row": 139, "column": 8}, "end_point": {"row": 139, "column": 11}}, {"id": 624, "type": "function_declarator", "text": "getCvImageType(ofImageType imageType, int cvDepth = CV_8U)", "parent": 620, "children": [625, 626], "start_point": {"row": 139, "column": 12}, "end_point": {"row": 139, "column": 70}}, {"id": 625, "type": "identifier", "text": "getCvImageType", "parent": 624, "children": [], "start_point": {"row": 139, "column": 12}, "end_point": {"row": 139, "column": 26}}, {"id": 626, "type": "parameter_list", "text": "(ofImageType imageType, int cvDepth = CV_8U)", "parent": 624, "children": [627, 630], "start_point": {"row": 139, "column": 26}, "end_point": {"row": 139, "column": 70}}, {"id": 627, "type": "parameter_declaration", "text": "ofImageType imageType", "parent": 626, "children": [628, 629], "start_point": {"row": 139, "column": 27}, "end_point": {"row": 139, "column": 48}}, {"id": 628, "type": "type_identifier", "text": "ofImageType", "parent": 627, "children": [], "start_point": {"row": 139, "column": 27}, "end_point": {"row": 139, "column": 38}}, {"id": 629, "type": "identifier", "text": "imageType", "parent": 627, "children": [], "start_point": {"row": 139, "column": 39}, "end_point": {"row": 139, "column": 48}}, {"id": 630, "type": "parameter_declaration", "text": "int cvDepth = CV_8U", "parent": 626, "children": [631, 632, 635], "start_point": {"row": 139, "column": 50}, "end_point": {"row": 139, "column": 69}}, {"id": 631, "type": "primitive_type", "text": "int", "parent": 630, "children": [], "start_point": {"row": 139, "column": 50}, "end_point": {"row": 139, "column": 53}}, {"id": 632, "type": "ERROR", "text": "cvDepth =", "parent": 630, "children": [633, 634], "start_point": {"row": 139, "column": 54}, "end_point": {"row": 139, "column": 63}}, {"id": 633, "type": "identifier", "text": "cvDepth", "parent": 632, "children": [], "start_point": {"row": 139, "column": 54}, "end_point": {"row": 139, "column": 61}}, {"id": 634, "type": "=", "text": "=", "parent": 632, "children": [], "start_point": {"row": 139, "column": 62}, "end_point": {"row": 139, "column": 63}}, {"id": 635, "type": "identifier", "text": "CV_8U", "parent": 630, "children": [], "start_point": {"row": 139, "column": 64}, "end_point": {"row": 139, "column": 69}}, {"id": 636, "type": "return_statement", "text": "return CV_MAKETYPE(cvDepth, getChannels(imageType));", "parent": 620, "children": [637], "start_point": {"row": 140, "column": 2}, "end_point": {"row": 140, "column": 54}}, {"id": 637, "type": "call_expression", "text": "CV_MAKETYPE(cvDepth, getChannels(imageType))", "parent": 636, "children": [638, 639], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 53}}, {"id": 638, "type": "identifier", "text": "CV_MAKETYPE", "parent": 637, "children": [], "start_point": {"row": 140, "column": 9}, "end_point": {"row": 140, "column": 20}}, {"id": 639, "type": "argument_list", "text": "(cvDepth, getChannels(imageType))", "parent": 637, "children": [640, 641], "start_point": {"row": 140, "column": 20}, "end_point": {"row": 140, "column": 53}}, {"id": 640, "type": "identifier", "text": "cvDepth", "parent": 639, "children": [], "start_point": {"row": 140, "column": 21}, "end_point": {"row": 140, "column": 28}}, {"id": 641, "type": "call_expression", "text": "getChannels(imageType)", "parent": 639, "children": [642, 643], "start_point": {"row": 140, "column": 30}, "end_point": {"row": 140, "column": 52}}, {"id": 642, "type": "identifier", "text": "getChannels", "parent": 641, "children": [], "start_point": {"row": 140, "column": 30}, "end_point": {"row": 140, "column": 41}}, {"id": 643, "type": "argument_list", "text": "(imageType)", "parent": 641, "children": [644], "start_point": {"row": 140, "column": 41}, "end_point": {"row": 140, "column": 52}}, {"id": 644, "type": "identifier", "text": "imageType", "parent": 643, "children": [], "start_point": {"row": 140, "column": 42}, "end_point": {"row": 140, "column": 51}}, {"id": 645, "type": "binary_expression", "text": "template <class T> inline", "parent": 33, "children": [646, 649, 651, 652], "start_point": {"row": 142, "column": 1}, "end_point": {"row": 142, "column": 26}}, {"id": 646, "type": "binary_expression", "text": "template <class", "parent": 645, "children": [647, 648], "start_point": {"row": 142, "column": 1}, "end_point": {"row": 142, "column": 16}}, {"id": 647, "type": "identifier", "text": "template", "parent": 646, "children": [], "start_point": {"row": 142, "column": 1}, "end_point": {"row": 142, "column": 9}}, {"id": 648, "type": "<", "text": "<", "parent": 646, "children": [], "start_point": {"row": 142, "column": 10}, "end_point": {"row": 142, "column": 11}}, {"id": 649, "type": "ERROR", "text": "T", "parent": 645, "children": [650], "start_point": {"row": 142, "column": 17}, "end_point": {"row": 142, "column": 18}}, {"id": 650, "type": "identifier", "text": "T", "parent": 649, "children": [], "start_point": {"row": 142, "column": 17}, "end_point": {"row": 142, "column": 18}}, {"id": 651, "type": ">", "text": ">", "parent": 645, "children": [], "start_point": {"row": 142, "column": 18}, "end_point": {"row": 142, "column": 19}}, {"id": 652, "type": "identifier", "text": "inline", "parent": 645, "children": [], "start_point": {"row": 142, "column": 20}, "end_point": {"row": 142, "column": 26}}, {"id": 653, "type": "function_definition", "text": "int getCvImageType(const T& img) {\n\t\treturn CV_MAKETYPE(getDepth(img), getChannels(img));\n\t}", "parent": 33, "children": [654, 655], "start_point": {"row": 142, "column": 27}, "end_point": {"row": 144, "column": 2}}, {"id": 654, "type": "primitive_type", "text": "int", "parent": 653, "children": [], "start_point": {"row": 142, "column": 27}, "end_point": {"row": 142, "column": 30}}, {"id": 655, "type": "function_declarator", "text": "getCvImageType(const T& img)", "parent": 653, "children": [656, 657], "start_point": {"row": 142, "column": 31}, "end_point": {"row": 142, "column": 59}}, {"id": 656, "type": "identifier", "text": "getCvImageType", "parent": 655, "children": [], "start_point": {"row": 142, "column": 31}, "end_point": {"row": 142, "column": 45}}, {"id": 657, "type": "parameter_list", "text": "(const T& img)", "parent": 655, "children": [658], "start_point": {"row": 142, "column": 45}, "end_point": {"row": 142, "column": 59}}, {"id": 658, "type": "parameter_declaration", "text": "const T& img", "parent": 657, "children": [659, 660], "start_point": {"row": 142, "column": 46}, "end_point": {"row": 142, "column": 58}}, {"id": 659, "type": "type_identifier", "text": "T", "parent": 658, "children": [], "start_point": {"row": 142, "column": 52}, "end_point": {"row": 142, "column": 53}}, {"id": 660, "type": "identifier", "text": "img", "parent": 658, "children": [], "start_point": {"row": 142, "column": 55}, "end_point": {"row": 142, "column": 58}}, {"id": 661, "type": "return_statement", "text": "return CV_MAKETYPE(getDepth(img), getChannels(img));", "parent": 653, "children": [662], "start_point": {"row": 143, "column": 2}, "end_point": {"row": 143, "column": 54}}, {"id": 662, "type": "call_expression", "text": "CV_MAKETYPE(getDepth(img), getChannels(img))", "parent": 661, "children": [663, 664], "start_point": {"row": 143, "column": 9}, "end_point": {"row": 143, "column": 53}}, {"id": 663, "type": "identifier", "text": "CV_MAKETYPE", "parent": 662, "children": [], "start_point": {"row": 143, "column": 9}, "end_point": {"row": 143, "column": 20}}, {"id": 664, "type": "argument_list", "text": "(getDepth(img), getChannels(img))", "parent": 662, "children": [665, 669], "start_point": {"row": 143, "column": 20}, "end_point": {"row": 143, "column": 53}}, {"id": 665, "type": "call_expression", "text": "getDepth(img)", "parent": 664, "children": [666, 667], "start_point": {"row": 143, "column": 21}, "end_point": {"row": 143, "column": 34}}, {"id": 666, "type": "identifier", "text": "getDepth", "parent": 665, "children": [], "start_point": {"row": 143, "column": 21}, "end_point": {"row": 143, "column": 29}}, {"id": 667, "type": "argument_list", "text": "(img)", "parent": 665, "children": [668], "start_point": {"row": 143, "column": 29}, "end_point": {"row": 143, "column": 34}}, {"id": 668, "type": "identifier", "text": "img", "parent": 667, "children": [], "start_point": {"row": 143, "column": 30}, "end_point": {"row": 143, "column": 33}}, {"id": 669, "type": "call_expression", "text": "getChannels(img)", "parent": 664, "children": [670, 671], "start_point": {"row": 143, "column": 36}, "end_point": {"row": 143, "column": 52}}, {"id": 670, "type": "identifier", "text": "getChannels", "parent": 669, "children": [], "start_point": {"row": 143, "column": 36}, "end_point": {"row": 143, "column": 47}}, {"id": 671, "type": "argument_list", "text": "(img)", "parent": 669, "children": [672], "start_point": {"row": 143, "column": 47}, "end_point": {"row": 143, "column": 52}}, {"id": 672, "type": "identifier", "text": "img", "parent": 671, "children": [], "start_point": {"row": 143, "column": 48}, "end_point": {"row": 143, "column": 51}}, {"id": 673, "type": "function_definition", "text": "inline ofImageType getOfImageType(int cvImageType) {\n\t\tswitch(getChannels(cvImageType)) {\n\t\t\tcase 4: return OF_IMAGE_COLOR_ALPHA;\n\t\t\tcase 3: return OF_IMAGE_COLOR;\n\t\t\tcase 1: default: return OF_IMAGE_GRAYSCALE;\n\t\t}\n\t}", "parent": 33, "children": [674, 676, 677], "start_point": {"row": 145, "column": 1}, "end_point": {"row": 151, "column": 2}}, {"id": 674, "type": "storage_class_specifier", "text": "inline", "parent": 673, "children": [675], "start_point": {"row": 145, "column": 1}, "end_point": {"row": 145, "column": 7}}, {"id": 675, "type": "inline", "text": "inline", "parent": 674, "children": [], "start_point": {"row": 145, "column": 1}, "end_point": {"row": 145, "column": 7}}, {"id": 676, "type": "type_identifier", "text": "ofImageType", "parent": 673, "children": [], "start_point": {"row": 145, "column": 8}, "end_point": {"row": 145, "column": 19}}, {"id": 677, "type": "function_declarator", "text": "getOfImageType(int cvImageType)", "parent": 673, "children": [678, 679], "start_point": {"row": 145, "column": 20}, "end_point": {"row": 145, "column": 51}}, {"id": 678, "type": "identifier", "text": "getOfImageType", "parent": 677, "children": [], "start_point": {"row": 145, "column": 20}, "end_point": {"row": 145, "column": 34}}, {"id": 679, "type": "parameter_list", "text": "(int cvImageType)", "parent": 677, "children": [680], "start_point": {"row": 145, "column": 34}, "end_point": {"row": 145, "column": 51}}, {"id": 680, "type": "parameter_declaration", "text": "int cvImageType", "parent": 679, "children": [681, 682], "start_point": {"row": 145, "column": 35}, "end_point": {"row": 145, "column": 50}}, {"id": 681, "type": "primitive_type", "text": "int", "parent": 680, "children": [], "start_point": {"row": 145, "column": 35}, "end_point": {"row": 145, "column": 38}}, {"id": 682, "type": "identifier", "text": "cvImageType", "parent": 680, "children": [], "start_point": {"row": 145, "column": 39}, "end_point": {"row": 145, "column": 50}}, {"id": 683, "type": "switch_statement", "text": "switch(getChannels(cvImageType)) {\n\t\t\tcase 4: return OF_IMAGE_COLOR_ALPHA;\n\t\t\tcase 3: return OF_IMAGE_COLOR;\n\t\t\tcase 1: default: return OF_IMAGE_GRAYSCALE;\n\t\t}", "parent": 673, "children": [684, 685], "start_point": {"row": 146, "column": 2}, "end_point": {"row": 150, "column": 3}}, {"id": 684, "type": "switch", "text": "switch", "parent": 683, "children": [], "start_point": {"row": 146, "column": 2}, "end_point": {"row": 146, "column": 8}}, {"id": 685, "type": "parenthesized_expression", "text": "(getChannels(cvImageType))", "parent": 683, "children": [686], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 34}}, {"id": 686, "type": "call_expression", "text": "getChannels(cvImageType)", "parent": 685, "children": [687, 688], "start_point": {"row": 146, "column": 9}, "end_point": {"row": 146, "column": 33}}, {"id": 687, "type": "identifier", "text": "getChannels", "parent": 686, "children": [], "start_point": {"row": 146, "column": 9}, "end_point": {"row": 146, "column": 20}}, {"id": 688, "type": "argument_list", "text": "(cvImageType)", "parent": 686, "children": [689], "start_point": {"row": 146, "column": 20}, "end_point": {"row": 146, "column": 33}}, {"id": 689, "type": "identifier", "text": "cvImageType", "parent": 688, "children": [], "start_point": {"row": 146, "column": 21}, "end_point": {"row": 146, "column": 32}}, {"id": 690, "type": "case_statement", "text": "case 4: return OF_IMAGE_COLOR_ALPHA;", "parent": 683, "children": [691, 692, 693], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 39}}, {"id": 691, "type": "case", "text": "case", "parent": 690, "children": [], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 7}}, {"id": 692, "type": "number_literal", "text": "4", "parent": 690, "children": [], "start_point": {"row": 147, "column": 8}, "end_point": {"row": 147, "column": 9}}, {"id": 693, "type": "return_statement", "text": "return OF_IMAGE_COLOR_ALPHA;", "parent": 690, "children": [694], "start_point": {"row": 147, "column": 11}, "end_point": {"row": 147, "column": 39}}, {"id": 694, "type": "identifier", "text": "OF_IMAGE_COLOR_ALPHA", "parent": 693, "children": [], "start_point": {"row": 147, "column": 18}, "end_point": {"row": 147, "column": 38}}, {"id": 695, "type": "case_statement", "text": "case 3: return OF_IMAGE_COLOR;", "parent": 683, "children": [696, 697, 698], "start_point": {"row": 148, "column": 3}, "end_point": {"row": 148, "column": 33}}, {"id": 696, "type": "case", "text": "case", "parent": 695, "children": [], "start_point": {"row": 148, "column": 3}, "end_point": {"row": 148, "column": 7}}, {"id": 697, "type": "number_literal", "text": "3", "parent": 695, "children": [], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 9}}, {"id": 698, "type": "return_statement", "text": "return OF_IMAGE_COLOR;", "parent": 695, "children": [699], "start_point": {"row": 148, "column": 11}, "end_point": {"row": 148, "column": 33}}, {"id": 699, "type": "identifier", "text": "OF_IMAGE_COLOR", "parent": 698, "children": [], "start_point": {"row": 148, "column": 18}, "end_point": {"row": 148, "column": 32}}, {"id": 700, "type": "case_statement", "text": "case 1:", "parent": 683, "children": [701, 702], "start_point": {"row": 149, "column": 3}, "end_point": {"row": 149, "column": 10}}, {"id": 701, "type": "case", "text": "case", "parent": 700, "children": [], "start_point": {"row": 149, "column": 3}, "end_point": {"row": 149, "column": 7}}, {"id": 702, "type": "number_literal", "text": "1", "parent": 700, "children": [], "start_point": {"row": 149, "column": 8}, "end_point": {"row": 149, "column": 9}}, {"id": 703, "type": "case_statement", "text": "default: return OF_IMAGE_GRAYSCALE;", "parent": 683, "children": [704, 705], "start_point": {"row": 149, "column": 11}, "end_point": {"row": 149, "column": 46}}, {"id": 704, "type": "default", "text": "default", "parent": 703, "children": [], "start_point": {"row": 149, "column": 11}, "end_point": {"row": 149, "column": 18}}, {"id": 705, "type": "return_statement", "text": "return OF_IMAGE_GRAYSCALE;", "parent": 703, "children": [706], "start_point": {"row": 149, "column": 20}, "end_point": {"row": 149, "column": 46}}, {"id": 706, "type": "identifier", "text": "OF_IMAGE_GRAYSCALE", "parent": 705, "children": [], "start_point": {"row": 149, "column": 27}, "end_point": {"row": 149, "column": 45}}, {"id": 707, "type": "function_definition", "text": "inline int getGlImageType(int cvImageType) {\n int channels = getChannels(cvImageType);\n int depth = getDepth(cvImageType);\n switch(depth) {\n case CV_8U:\n switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }\n#ifndef TARGET_OPENGLES\n case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }\n#endif\n }\n return 0;\n }", "parent": 33, "children": [708, 710, 711], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 172, "column": 5}}, {"id": 708, "type": "storage_class_specifier", "text": "inline", "parent": 707, "children": [709], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 10}}, {"id": 709, "type": "inline", "text": "inline", "parent": 708, "children": [], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 10}}, {"id": 710, "type": "primitive_type", "text": "int", "parent": 707, "children": [], "start_point": {"row": 152, "column": 11}, "end_point": {"row": 152, "column": 14}}, {"id": 711, "type": "function_declarator", "text": "getGlImageType(int cvImageType)", "parent": 707, "children": [712, 713], "start_point": {"row": 152, "column": 15}, "end_point": {"row": 152, "column": 46}}, {"id": 712, "type": "identifier", "text": "getGlImageType", "parent": 711, "children": [], "start_point": {"row": 152, "column": 15}, "end_point": {"row": 152, "column": 29}}, {"id": 713, "type": "parameter_list", "text": "(int cvImageType)", "parent": 711, "children": [714], "start_point": {"row": 152, "column": 29}, "end_point": {"row": 152, "column": 46}}, {"id": 714, "type": "parameter_declaration", "text": "int cvImageType", "parent": 713, "children": [715, 716], "start_point": {"row": 152, "column": 30}, "end_point": {"row": 152, "column": 45}}, {"id": 715, "type": "primitive_type", "text": "int", "parent": 714, "children": [], "start_point": {"row": 152, "column": 30}, "end_point": {"row": 152, "column": 33}}, {"id": 716, "type": "identifier", "text": "cvImageType", "parent": 714, "children": [], "start_point": {"row": 152, "column": 34}, "end_point": {"row": 152, "column": 45}}, {"id": 717, "type": "declaration", "text": "int channels = getChannels(cvImageType);", "parent": 707, "children": [718, 719], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 153, "column": 48}}, {"id": 718, "type": "primitive_type", "text": "int", "parent": 717, "children": [], "start_point": {"row": 153, "column": 8}, "end_point": {"row": 153, "column": 11}}, {"id": 719, "type": "init_declarator", "text": "channels = getChannels(cvImageType)", "parent": 717, "children": [720, 721, 722], "start_point": {"row": 153, "column": 12}, "end_point": {"row": 153, "column": 47}}, {"id": 720, "type": "identifier", "text": "channels", "parent": 719, "children": [], "start_point": {"row": 153, "column": 12}, "end_point": {"row": 153, "column": 20}}, {"id": 721, "type": "=", "text": "=", "parent": 719, "children": [], "start_point": {"row": 153, "column": 21}, "end_point": {"row": 153, "column": 22}}, {"id": 722, "type": "call_expression", "text": "getChannels(cvImageType)", "parent": 719, "children": [723, 724], "start_point": {"row": 153, "column": 23}, "end_point": {"row": 153, "column": 47}}, {"id": 723, "type": "identifier", "text": "getChannels", "parent": 722, "children": [], "start_point": {"row": 153, "column": 23}, "end_point": {"row": 153, "column": 34}}, {"id": 724, "type": "argument_list", "text": "(cvImageType)", "parent": 722, "children": [725], "start_point": {"row": 153, "column": 34}, "end_point": {"row": 153, "column": 47}}, {"id": 725, "type": "identifier", "text": "cvImageType", "parent": 724, "children": [], "start_point": {"row": 153, "column": 35}, "end_point": {"row": 153, "column": 46}}, {"id": 726, "type": "declaration", "text": "int depth = getDepth(cvImageType);", "parent": 707, "children": [727, 728], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 42}}, {"id": 727, "type": "primitive_type", "text": "int", "parent": 726, "children": [], "start_point": {"row": 154, "column": 8}, "end_point": {"row": 154, "column": 11}}, {"id": 728, "type": "init_declarator", "text": "depth = getDepth(cvImageType)", "parent": 726, "children": [729, 730, 731], "start_point": {"row": 154, "column": 12}, "end_point": {"row": 154, "column": 41}}, {"id": 729, "type": "identifier", "text": "depth", "parent": 728, "children": [], "start_point": {"row": 154, "column": 12}, "end_point": {"row": 154, "column": 17}}, {"id": 730, "type": "=", "text": "=", "parent": 728, "children": [], "start_point": {"row": 154, "column": 18}, "end_point": {"row": 154, "column": 19}}, {"id": 731, "type": "call_expression", "text": "getDepth(cvImageType)", "parent": 728, "children": [732, 733], "start_point": {"row": 154, "column": 20}, "end_point": {"row": 154, "column": 41}}, {"id": 732, "type": "identifier", "text": "getDepth", "parent": 731, "children": [], "start_point": {"row": 154, "column": 20}, "end_point": {"row": 154, "column": 28}}, {"id": 733, "type": "argument_list", "text": "(cvImageType)", "parent": 731, "children": [734], "start_point": {"row": 154, "column": 28}, "end_point": {"row": 154, "column": 41}}, {"id": 734, "type": "identifier", "text": "cvImageType", "parent": 733, "children": [], "start_point": {"row": 154, "column": 29}, "end_point": {"row": 154, "column": 40}}, {"id": 735, "type": "switch_statement", "text": "switch(depth) {\n case CV_8U:\n switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }\n#ifndef TARGET_OPENGLES\n case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }\n#endif\n }", "parent": 707, "children": [736, 737], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 170, "column": 9}}, {"id": 736, "type": "switch", "text": "switch", "parent": 735, "children": [], "start_point": {"row": 155, "column": 8}, "end_point": {"row": 155, "column": 14}}, {"id": 737, "type": "parenthesized_expression", "text": "(depth)", "parent": 735, "children": [738], "start_point": {"row": 155, "column": 14}, "end_point": {"row": 155, "column": 21}}, {"id": 738, "type": "identifier", "text": "depth", "parent": 737, "children": [], "start_point": {"row": 155, "column": 15}, "end_point": {"row": 155, "column": 20}}, {"id": 739, "type": "case_statement", "text": "case CV_8U:\n switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }", "parent": 735, "children": [740, 741, 742], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 161, "column": 17}}, {"id": 740, "type": "case", "text": "case", "parent": 739, "children": [], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 156, "column": 16}}, {"id": 741, "type": "identifier", "text": "CV_8U", "parent": 739, "children": [], "start_point": {"row": 156, "column": 17}, "end_point": {"row": 156, "column": 22}}, {"id": 742, "type": "switch_statement", "text": "switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }", "parent": 739, "children": [743, 744], "start_point": {"row": 157, "column": 16}, "end_point": {"row": 161, "column": 17}}, {"id": 743, "type": "switch", "text": "switch", "parent": 742, "children": [], "start_point": {"row": 157, "column": 16}, "end_point": {"row": 157, "column": 22}}, {"id": 744, "type": "parenthesized_expression", "text": "(channels)", "parent": 742, "children": [745], "start_point": {"row": 157, "column": 22}, "end_point": {"row": 157, "column": 32}}, {"id": 745, "type": "identifier", "text": "channels", "parent": 744, "children": [], "start_point": {"row": 157, "column": 23}, "end_point": {"row": 157, "column": 31}}, {"id": 746, "type": "case_statement", "text": "case 1: return GL_LUMINANCE;", "parent": 742, "children": [747, 748, 749], "start_point": {"row": 158, "column": 20}, "end_point": {"row": 158, "column": 48}}, {"id": 747, "type": "case", "text": "case", "parent": 746, "children": [], "start_point": {"row": 158, "column": 20}, "end_point": {"row": 158, "column": 24}}, {"id": 748, "type": "number_literal", "text": "1", "parent": 746, "children": [], "start_point": {"row": 158, "column": 25}, "end_point": {"row": 158, "column": 26}}, {"id": 749, "type": "return_statement", "text": "return GL_LUMINANCE;", "parent": 746, "children": [750], "start_point": {"row": 158, "column": 28}, "end_point": {"row": 158, "column": 48}}, {"id": 750, "type": "identifier", "text": "GL_LUMINANCE", "parent": 749, "children": [], "start_point": {"row": 158, "column": 35}, "end_point": {"row": 158, "column": 47}}, {"id": 751, "type": "case_statement", "text": "case 3: return GL_RGB;", "parent": 742, "children": [752, 753, 754], "start_point": {"row": 159, "column": 20}, "end_point": {"row": 159, "column": 42}}, {"id": 752, "type": "case", "text": "case", "parent": 751, "children": [], "start_point": {"row": 159, "column": 20}, "end_point": {"row": 159, "column": 24}}, {"id": 753, "type": "number_literal", "text": "3", "parent": 751, "children": [], "start_point": {"row": 159, "column": 25}, "end_point": {"row": 159, "column": 26}}, {"id": 754, "type": "return_statement", "text": "return GL_RGB;", "parent": 751, "children": [755], "start_point": {"row": 159, "column": 28}, "end_point": {"row": 159, "column": 42}}, {"id": 755, "type": "identifier", "text": "GL_RGB", "parent": 754, "children": [], "start_point": {"row": 159, "column": 35}, "end_point": {"row": 159, "column": 41}}, {"id": 756, "type": "case_statement", "text": "case 4: return GL_RGBA;", "parent": 742, "children": [757, 758, 759], "start_point": {"row": 160, "column": 20}, "end_point": {"row": 160, "column": 43}}, {"id": 757, "type": "case", "text": "case", "parent": 756, "children": [], "start_point": {"row": 160, "column": 20}, "end_point": {"row": 160, "column": 24}}, {"id": 758, "type": "number_literal", "text": "4", "parent": 756, "children": [], "start_point": {"row": 160, "column": 25}, "end_point": {"row": 160, "column": 26}}, {"id": 759, "type": "return_statement", "text": "return GL_RGBA;", "parent": 756, "children": [760], "start_point": {"row": 160, "column": 28}, "end_point": {"row": 160, "column": 43}}, {"id": 760, "type": "identifier", "text": "GL_RGBA", "parent": 759, "children": [], "start_point": {"row": 160, "column": 35}, "end_point": {"row": 160, "column": 42}}, {"id": 761, "type": "preproc_ifdef", "text": "#ifndef TARGET_OPENGLES\n case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }\n#endif", "parent": 735, "children": [762, 763, 764, 786], "start_point": {"row": 162, "column": 0}, "end_point": {"row": 169, "column": 6}}, {"id": 762, "type": "#ifndef", "text": "#ifndef", "parent": 761, "children": [], "start_point": {"row": 162, "column": 0}, "end_point": {"row": 162, "column": 7}}, {"id": 763, "type": "identifier", "text": "TARGET_OPENGLES", "parent": 761, "children": [], "start_point": {"row": 162, "column": 8}, "end_point": {"row": 162, "column": 23}}, {"id": 764, "type": "case_statement", "text": "case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }", "parent": 761, "children": [765, 766, 767], "start_point": {"row": 163, "column": 12}, "end_point": {"row": 168, "column": 17}}, {"id": 765, "type": "case", "text": "case", "parent": 764, "children": [], "start_point": {"row": 163, "column": 12}, "end_point": {"row": 163, "column": 16}}, {"id": 766, "type": "identifier", "text": "CV_32F", "parent": 764, "children": [], "start_point": {"row": 163, "column": 17}, "end_point": {"row": 163, "column": 23}}, {"id": 767, "type": "switch_statement", "text": "switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }", "parent": 764, "children": [768, 769], "start_point": {"row": 164, "column": 16}, "end_point": {"row": 168, "column": 17}}, {"id": 768, "type": "switch", "text": "switch", "parent": 767, "children": [], "start_point": {"row": 164, "column": 16}, "end_point": {"row": 164, "column": 22}}, {"id": 769, "type": "parenthesized_expression", "text": "(channels)", "parent": 767, "children": [770], "start_point": {"row": 164, "column": 22}, "end_point": {"row": 164, "column": 32}}, {"id": 770, "type": "identifier", "text": "channels", "parent": 769, "children": [], "start_point": {"row": 164, "column": 23}, "end_point": {"row": 164, "column": 31}}, {"id": 771, "type": "case_statement", "text": "case 1: return GL_LUMINANCE32F_ARB;", "parent": 767, "children": [772, 773, 774], "start_point": {"row": 165, "column": 20}, "end_point": {"row": 165, "column": 55}}, {"id": 772, "type": "case", "text": "case", "parent": 771, "children": [], "start_point": {"row": 165, "column": 20}, "end_point": {"row": 165, "column": 24}}, {"id": 773, "type": "number_literal", "text": "1", "parent": 771, "children": [], "start_point": {"row": 165, "column": 25}, "end_point": {"row": 165, "column": 26}}, {"id": 774, "type": "return_statement", "text": "return GL_LUMINANCE32F_ARB;", "parent": 771, "children": [775], "start_point": {"row": 165, "column": 28}, "end_point": {"row": 165, "column": 55}}, {"id": 775, "type": "identifier", "text": "GL_LUMINANCE32F_ARB", "parent": 774, "children": [], "start_point": {"row": 165, "column": 35}, "end_point": {"row": 165, "column": 54}}, {"id": 776, "type": "case_statement", "text": "case 3: return GL_RGB32F;", "parent": 767, "children": [777, 778, 779], "start_point": {"row": 166, "column": 20}, "end_point": {"row": 166, "column": 45}}, {"id": 777, "type": "case", "text": "case", "parent": 776, "children": [], "start_point": {"row": 166, "column": 20}, "end_point": {"row": 166, "column": 24}}, {"id": 778, "type": "number_literal", "text": "3", "parent": 776, "children": [], "start_point": {"row": 166, "column": 25}, "end_point": {"row": 166, "column": 26}}, {"id": 779, "type": "return_statement", "text": "return GL_RGB32F;", "parent": 776, "children": [780], "start_point": {"row": 166, "column": 28}, "end_point": {"row": 166, "column": 45}}, {"id": 780, "type": "identifier", "text": "GL_RGB32F", "parent": 779, "children": [], "start_point": {"row": 166, "column": 35}, "end_point": {"row": 166, "column": 44}}, {"id": 781, "type": "case_statement", "text": "case 4: return GL_RGBA32F;", "parent": 767, "children": [782, 783, 784], "start_point": {"row": 167, "column": 20}, "end_point": {"row": 167, "column": 46}}, {"id": 782, "type": "case", "text": "case", "parent": 781, "children": [], "start_point": {"row": 167, "column": 20}, "end_point": {"row": 167, "column": 24}}, {"id": 783, "type": "number_literal", "text": "4", "parent": 781, "children": [], "start_point": {"row": 167, "column": 25}, "end_point": {"row": 167, "column": 26}}, {"id": 784, "type": "return_statement", "text": "return GL_RGBA32F;", "parent": 781, "children": [785], "start_point": {"row": 167, "column": 28}, "end_point": {"row": 167, "column": 46}}, {"id": 785, "type": "identifier", "text": "GL_RGBA32F", "parent": 784, "children": [], "start_point": {"row": 167, "column": 35}, "end_point": {"row": 167, "column": 45}}, {"id": 786, "type": "#endif", "text": "#endif", "parent": 761, "children": [], "start_point": {"row": 169, "column": 0}, "end_point": {"row": 169, "column": 6}}, {"id": 787, "type": "return_statement", "text": "return 0;", "parent": 707, "children": [788], "start_point": {"row": 171, "column": 8}, "end_point": {"row": 171, "column": 17}}, {"id": 788, "type": "number_literal", "text": "0", "parent": 787, "children": [], "start_point": {"row": 171, "column": 15}, "end_point": {"row": 171, "column": 16}}, {"id": 789, "type": "binary_expression", "text": "template <class T> inline void allocate(T& img, int width, int height, int cvType)", "parent": 33, "children": [790, 793, 795, 796, 799], "start_point": {"row": 176, "column": 1}, "end_point": {"row": 176, "column": 83}}, {"id": 790, "type": "binary_expression", "text": "template <class", "parent": 789, "children": [791, 792], "start_point": {"row": 176, "column": 1}, "end_point": {"row": 176, "column": 16}}, {"id": 791, "type": "identifier", "text": "template", "parent": 790, "children": [], "start_point": {"row": 176, "column": 1}, "end_point": {"row": 176, "column": 9}}, {"id": 792, "type": "<", "text": "<", "parent": 790, "children": [], "start_point": {"row": 176, "column": 10}, "end_point": {"row": 176, "column": 11}}, {"id": 793, "type": "ERROR", "text": "T", "parent": 789, "children": [794], "start_point": {"row": 176, "column": 17}, "end_point": {"row": 176, "column": 18}}, {"id": 794, "type": "identifier", "text": "T", "parent": 793, "children": [], "start_point": {"row": 176, "column": 17}, "end_point": {"row": 176, "column": 18}}, {"id": 795, "type": ">", "text": ">", "parent": 789, "children": [], "start_point": {"row": 176, "column": 18}, "end_point": {"row": 176, "column": 19}}, {"id": 796, "type": "ERROR", "text": "inline void", "parent": 789, "children": [797, 798], "start_point": {"row": 176, "column": 20}, "end_point": {"row": 176, "column": 31}}, {"id": 797, "type": "identifier", "text": "inline", "parent": 796, "children": [], "start_point": {"row": 176, "column": 20}, "end_point": {"row": 176, "column": 26}}, {"id": 798, "type": "identifier", "text": "void", "parent": 796, "children": [], "start_point": {"row": 176, "column": 27}, "end_point": {"row": 176, "column": 31}}, {"id": 799, "type": "call_expression", "text": "allocate(T& img, int width, int height, int cvType)", "parent": 789, "children": [800, 801], "start_point": {"row": 176, "column": 32}, "end_point": {"row": 176, "column": 83}}, {"id": 800, "type": "identifier", "text": "allocate", "parent": 799, "children": [], "start_point": {"row": 176, "column": 32}, "end_point": {"row": 176, "column": 40}}, {"id": 801, "type": "argument_list", "text": "(T& img, int width, int height, int cvType)", "parent": 799, "children": [802, 805, 807, 808, 810, 811, 813], "start_point": {"row": 176, "column": 40}, "end_point": {"row": 176, "column": 83}}, {"id": 802, "type": "binary_expression", "text": "T& img", "parent": 801, "children": [803, 804], "start_point": {"row": 176, "column": 41}, "end_point": {"row": 176, "column": 47}}, {"id": 803, "type": "identifier", "text": "T", "parent": 802, "children": [], "start_point": {"row": 176, "column": 41}, "end_point": {"row": 176, "column": 42}}, {"id": 804, "type": "identifier", "text": "img", "parent": 802, "children": [], "start_point": {"row": 176, "column": 44}, "end_point": {"row": 176, "column": 47}}, {"id": 805, "type": "ERROR", "text": "int", "parent": 801, "children": [806], "start_point": {"row": 176, "column": 49}, "end_point": {"row": 176, "column": 52}}, {"id": 806, "type": "identifier", "text": "int", "parent": 805, "children": [], "start_point": {"row": 176, "column": 49}, "end_point": {"row": 176, "column": 52}}, {"id": 807, "type": "identifier", "text": "width", "parent": 801, "children": [], "start_point": {"row": 176, "column": 53}, "end_point": {"row": 176, "column": 58}}, {"id": 808, "type": "ERROR", "text": "int", "parent": 801, "children": [809], "start_point": {"row": 176, "column": 60}, "end_point": {"row": 176, "column": 63}}, {"id": 809, "type": "identifier", "text": "int", "parent": 808, "children": [], "start_point": {"row": 176, "column": 60}, "end_point": {"row": 176, "column": 63}}, {"id": 810, "type": "identifier", "text": "height", "parent": 801, "children": [], "start_point": {"row": 176, "column": 64}, "end_point": {"row": 176, "column": 70}}, {"id": 811, "type": "ERROR", "text": "int", "parent": 801, "children": [812], "start_point": {"row": 176, "column": 72}, "end_point": {"row": 176, "column": 75}}, {"id": 812, "type": "identifier", "text": "int", "parent": 811, "children": [], "start_point": {"row": 176, "column": 72}, "end_point": {"row": 176, "column": 75}}, {"id": 813, "type": "identifier", "text": "cvType", "parent": 801, "children": [], "start_point": {"row": 176, "column": 76}, "end_point": {"row": 176, "column": 82}}, {"id": 814, "type": "if_statement", "text": "if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getOfImageType(cvType));\n }", "parent": 33, "children": [815], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 183, "column": 9}}, {"id": 815, "type": "parenthesized_expression", "text": "(!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)", "parent": 814, "children": [816], "start_point": {"row": 177, "column": 11}, "end_point": {"row": 180, "column": 42}}, {"id": 816, "type": "binary_expression", "text": "!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType", "parent": 815, "children": [817, 842, 843], "start_point": {"row": 177, "column": 12}, "end_point": {"row": 180, "column": 41}}, {"id": 817, "type": "binary_expression", "text": "!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height", "parent": 816, "children": [818, 834, 835], "start_point": {"row": 177, "column": 12}, "end_point": {"row": 179, "column": 36}}, {"id": 818, "type": "binary_expression", "text": "!img.isAllocated() ||\n getWidth(img) != width", "parent": 817, "children": [819, 826, 827], "start_point": {"row": 177, "column": 12}, "end_point": {"row": 178, "column": 34}}, {"id": 819, "type": "unary_expression", "text": "!img.isAllocated()", "parent": 818, "children": [820, 821], "start_point": {"row": 177, "column": 12}, "end_point": {"row": 177, "column": 30}}, {"id": 820, "type": "!", "text": "!", "parent": 819, "children": [], "start_point": {"row": 177, "column": 12}, "end_point": {"row": 177, "column": 13}}, {"id": 821, "type": "call_expression", "text": "img.isAllocated()", "parent": 819, "children": [822, 825], "start_point": {"row": 177, "column": 13}, "end_point": {"row": 177, "column": 30}}, {"id": 822, "type": "field_expression", "text": "img.isAllocated", "parent": 821, "children": [823, 824], "start_point": {"row": 177, "column": 13}, "end_point": {"row": 177, "column": 28}}, {"id": 823, "type": "identifier", "text": "img", "parent": 822, "children": [], "start_point": {"row": 177, "column": 13}, "end_point": {"row": 177, "column": 16}}, {"id": 824, "type": "field_identifier", "text": "isAllocated", "parent": 822, "children": [], "start_point": {"row": 177, "column": 17}, "end_point": {"row": 177, "column": 28}}, {"id": 825, "type": "argument_list", "text": "()", "parent": 821, "children": [], "start_point": {"row": 177, "column": 28}, "end_point": {"row": 177, "column": 30}}, {"id": 826, "type": "||", "text": "||", "parent": 818, "children": [], "start_point": {"row": 177, "column": 31}, "end_point": {"row": 177, "column": 33}}, {"id": 827, "type": "binary_expression", "text": "getWidth(img) != width", "parent": 818, "children": [828, 832, 833], "start_point": {"row": 178, "column": 12}, "end_point": {"row": 178, "column": 34}}, {"id": 828, "type": "call_expression", "text": "getWidth(img)", "parent": 827, "children": [829, 830], "start_point": {"row": 178, "column": 12}, "end_point": {"row": 178, "column": 25}}, {"id": 829, "type": "identifier", "text": "getWidth", "parent": 828, "children": [], "start_point": {"row": 178, "column": 12}, "end_point": {"row": 178, "column": 20}}, {"id": 830, "type": "argument_list", "text": "(img)", "parent": 828, "children": [831], "start_point": {"row": 178, "column": 20}, "end_point": {"row": 178, "column": 25}}, {"id": 831, "type": "identifier", "text": "img", "parent": 830, "children": [], "start_point": {"row": 178, "column": 21}, "end_point": {"row": 178, "column": 24}}, {"id": 832, "type": "!=", "text": "!=", "parent": 827, "children": [], "start_point": {"row": 178, "column": 26}, "end_point": {"row": 178, "column": 28}}, {"id": 833, "type": "identifier", "text": "width", "parent": 827, "children": [], "start_point": {"row": 178, "column": 29}, "end_point": {"row": 178, "column": 34}}, {"id": 834, "type": "||", "text": "||", "parent": 817, "children": [], "start_point": {"row": 178, "column": 35}, "end_point": {"row": 178, "column": 37}}, {"id": 835, "type": "binary_expression", "text": "getHeight(img) != height", "parent": 817, "children": [836, 840, 841], "start_point": {"row": 179, "column": 12}, "end_point": {"row": 179, "column": 36}}, {"id": 836, "type": "call_expression", "text": "getHeight(img)", "parent": 835, "children": [837, 838], "start_point": {"row": 179, "column": 12}, "end_point": {"row": 179, "column": 26}}, {"id": 837, "type": "identifier", "text": "getHeight", "parent": 836, "children": [], "start_point": {"row": 179, "column": 12}, "end_point": {"row": 179, "column": 21}}, {"id": 838, "type": "argument_list", "text": "(img)", "parent": 836, "children": [839], "start_point": {"row": 179, "column": 21}, "end_point": {"row": 179, "column": 26}}, {"id": 839, "type": "identifier", "text": "img", "parent": 838, "children": [], "start_point": {"row": 179, "column": 22}, "end_point": {"row": 179, "column": 25}}, {"id": 840, "type": "!=", "text": "!=", "parent": 835, "children": [], "start_point": {"row": 179, "column": 27}, "end_point": {"row": 179, "column": 29}}, {"id": 841, "type": "identifier", "text": "height", "parent": 835, "children": [], "start_point": {"row": 179, "column": 30}, "end_point": {"row": 179, "column": 36}}, {"id": 842, "type": "||", "text": "||", "parent": 816, "children": [], "start_point": {"row": 179, "column": 37}, "end_point": {"row": 179, "column": 39}}, {"id": 843, "type": "binary_expression", "text": "getCvImageType(img) != cvType", "parent": 816, "children": [844, 848, 849], "start_point": {"row": 180, "column": 12}, "end_point": {"row": 180, "column": 41}}, {"id": 844, "type": "call_expression", "text": "getCvImageType(img)", "parent": 843, "children": [845, 846], "start_point": {"row": 180, "column": 12}, "end_point": {"row": 180, "column": 31}}, {"id": 845, "type": "identifier", "text": "getCvImageType", "parent": 844, "children": [], "start_point": {"row": 180, "column": 12}, "end_point": {"row": 180, "column": 26}}, {"id": 846, "type": "argument_list", "text": "(img)", "parent": 844, "children": [847], "start_point": {"row": 180, "column": 26}, "end_point": {"row": 180, "column": 31}}, {"id": 847, "type": "identifier", "text": "img", "parent": 846, "children": [], "start_point": {"row": 180, "column": 27}, "end_point": {"row": 180, "column": 30}}, {"id": 848, "type": "!=", "text": "!=", "parent": 843, "children": [], "start_point": {"row": 180, "column": 32}, "end_point": {"row": 180, "column": 34}}, {"id": 849, "type": "identifier", "text": "cvType", "parent": 843, "children": [], "start_point": {"row": 180, "column": 35}, "end_point": {"row": 180, "column": 41}}, {"id": 850, "type": "call_expression", "text": "img.allocate(width, height, getOfImageType(cvType))", "parent": 814, "children": [851, 854], "start_point": {"row": 182, "column": 12}, "end_point": {"row": 182, "column": 63}}, {"id": 851, "type": "field_expression", "text": "img.allocate", "parent": 850, "children": [852, 853], "start_point": {"row": 182, "column": 12}, "end_point": {"row": 182, "column": 24}}, {"id": 852, "type": "identifier", "text": "img", "parent": 851, "children": [], "start_point": {"row": 182, "column": 12}, "end_point": {"row": 182, "column": 15}}, {"id": 853, "type": "field_identifier", "text": "allocate", "parent": 851, "children": [], "start_point": {"row": 182, "column": 16}, "end_point": {"row": 182, "column": 24}}, {"id": 854, "type": "argument_list", "text": "(width, height, getOfImageType(cvType))", "parent": 850, "children": [855, 856, 857], "start_point": {"row": 182, "column": 24}, "end_point": {"row": 182, "column": 63}}, {"id": 855, "type": "identifier", "text": "width", "parent": 854, "children": [], "start_point": {"row": 182, "column": 25}, "end_point": {"row": 182, "column": 30}}, {"id": 856, "type": "identifier", "text": "height", "parent": 854, "children": [], "start_point": {"row": 182, "column": 32}, "end_point": {"row": 182, "column": 38}}, {"id": 857, "type": "call_expression", "text": "getOfImageType(cvType)", "parent": 854, "children": [858, 859], "start_point": {"row": 182, "column": 40}, "end_point": {"row": 182, "column": 62}}, {"id": 858, "type": "identifier", "text": "getOfImageType", "parent": 857, "children": [], "start_point": {"row": 182, "column": 40}, "end_point": {"row": 182, "column": 54}}, {"id": 859, "type": "argument_list", "text": "(cvType)", "parent": 857, "children": [860], "start_point": {"row": 182, "column": 54}, "end_point": {"row": 182, "column": 62}}, {"id": 860, "type": "identifier", "text": "cvType", "parent": 859, "children": [], "start_point": {"row": 182, "column": 55}, "end_point": {"row": 182, "column": 61}}, {"id": 861, "type": "function_definition", "text": "inline void allocate(ofTexture& img, int width, int height, int cvType) {\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getGlImageType(cvType));\n }\n }", "parent": 33, "children": [862, 864, 865], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 193, "column": 5}}, {"id": 862, "type": "storage_class_specifier", "text": "inline", "parent": 861, "children": [863], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 10}}, {"id": 863, "type": "inline", "text": "inline", "parent": 862, "children": [], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 10}}, {"id": 864, "type": "primitive_type", "text": "void", "parent": 861, "children": [], "start_point": {"row": 185, "column": 11}, "end_point": {"row": 185, "column": 15}}, {"id": 865, "type": "function_declarator", "text": "allocate(ofTexture& img, int width, int height, int cvType)", "parent": 861, "children": [866, 867], "start_point": {"row": 185, "column": 16}, "end_point": {"row": 185, "column": 75}}, {"id": 866, "type": "identifier", "text": "allocate", "parent": 865, "children": [], "start_point": {"row": 185, "column": 16}, "end_point": {"row": 185, "column": 24}}, {"id": 867, "type": "parameter_list", "text": "(ofTexture& img, int width, int height, int cvType)", "parent": 865, "children": [868, 871, 874, 877], "start_point": {"row": 185, "column": 24}, "end_point": {"row": 185, "column": 75}}, {"id": 868, "type": "parameter_declaration", "text": "ofTexture& img", "parent": 867, "children": [869, 870], "start_point": {"row": 185, "column": 25}, "end_point": {"row": 185, "column": 39}}, {"id": 869, "type": "type_identifier", "text": "ofTexture", "parent": 868, "children": [], "start_point": {"row": 185, "column": 25}, "end_point": {"row": 185, "column": 34}}, {"id": 870, "type": "identifier", "text": "img", "parent": 868, "children": [], "start_point": {"row": 185, "column": 36}, "end_point": {"row": 185, "column": 39}}, {"id": 871, "type": "parameter_declaration", "text": "int width", "parent": 867, "children": [872, 873], "start_point": {"row": 185, "column": 41}, "end_point": {"row": 185, "column": 50}}, {"id": 872, "type": "primitive_type", "text": "int", "parent": 871, "children": [], "start_point": {"row": 185, "column": 41}, "end_point": {"row": 185, "column": 44}}, {"id": 873, "type": "identifier", "text": "width", "parent": 871, "children": [], "start_point": {"row": 185, "column": 45}, "end_point": {"row": 185, "column": 50}}, {"id": 874, "type": "parameter_declaration", "text": "int height", "parent": 867, "children": [875, 876], "start_point": {"row": 185, "column": 52}, "end_point": {"row": 185, "column": 62}}, {"id": 875, "type": "primitive_type", "text": "int", "parent": 874, "children": [], "start_point": {"row": 185, "column": 52}, "end_point": {"row": 185, "column": 55}}, {"id": 876, "type": "identifier", "text": "height", "parent": 874, "children": [], "start_point": {"row": 185, "column": 56}, "end_point": {"row": 185, "column": 62}}, {"id": 877, "type": "parameter_declaration", "text": "int cvType", "parent": 867, "children": [878, 879], "start_point": {"row": 185, "column": 64}, "end_point": {"row": 185, "column": 74}}, {"id": 878, "type": "primitive_type", "text": "int", "parent": 877, "children": [], "start_point": {"row": 185, "column": 64}, "end_point": {"row": 185, "column": 67}}, {"id": 879, "type": "identifier", "text": "cvType", "parent": 877, "children": [], "start_point": {"row": 185, "column": 68}, "end_point": {"row": 185, "column": 74}}, {"id": 880, "type": "if_statement", "text": "if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getGlImageType(cvType));\n }", "parent": 861, "children": [881], "start_point": {"row": 186, "column": 8}, "end_point": {"row": 192, "column": 9}}, {"id": 881, "type": "parenthesized_expression", "text": "(!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)", "parent": 880, "children": [882], "start_point": {"row": 186, "column": 11}, "end_point": {"row": 189, "column": 42}}, {"id": 882, "type": "binary_expression", "text": "!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType", "parent": 881, "children": [883, 908, 909], "start_point": {"row": 186, "column": 12}, "end_point": {"row": 189, "column": 41}}, {"id": 883, "type": "binary_expression", "text": "!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height", "parent": 882, "children": [884, 900, 901], "start_point": {"row": 186, "column": 12}, "end_point": {"row": 188, "column": 36}}, {"id": 884, "type": "binary_expression", "text": "!img.isAllocated() ||\n getWidth(img) != width", "parent": 883, "children": [885, 892, 893], "start_point": {"row": 186, "column": 12}, "end_point": {"row": 187, "column": 34}}, {"id": 885, "type": "unary_expression", "text": "!img.isAllocated()", "parent": 884, "children": [886, 887], "start_point": {"row": 186, "column": 12}, "end_point": {"row": 186, "column": 30}}, {"id": 886, "type": "!", "text": "!", "parent": 885, "children": [], "start_point": {"row": 186, "column": 12}, "end_point": {"row": 186, "column": 13}}, {"id": 887, "type": "call_expression", "text": "img.isAllocated()", "parent": 885, "children": [888, 891], "start_point": {"row": 186, "column": 13}, "end_point": {"row": 186, "column": 30}}, {"id": 888, "type": "field_expression", "text": "img.isAllocated", "parent": 887, "children": [889, 890], "start_point": {"row": 186, "column": 13}, "end_point": {"row": 186, "column": 28}}, {"id": 889, "type": "identifier", "text": "img", "parent": 888, "children": [], "start_point": {"row": 186, "column": 13}, "end_point": {"row": 186, "column": 16}}, {"id": 890, "type": "field_identifier", "text": "isAllocated", "parent": 888, "children": [], "start_point": {"row": 186, "column": 17}, "end_point": {"row": 186, "column": 28}}, {"id": 891, "type": "argument_list", "text": "()", "parent": 887, "children": [], "start_point": {"row": 186, "column": 28}, "end_point": {"row": 186, "column": 30}}, {"id": 892, "type": "||", "text": "||", "parent": 884, "children": [], "start_point": {"row": 186, "column": 31}, "end_point": {"row": 186, "column": 33}}, {"id": 893, "type": "binary_expression", "text": "getWidth(img) != width", "parent": 884, "children": [894, 898, 899], "start_point": {"row": 187, "column": 12}, "end_point": {"row": 187, "column": 34}}, {"id": 894, "type": "call_expression", "text": "getWidth(img)", "parent": 893, "children": [895, 896], "start_point": {"row": 187, "column": 12}, "end_point": {"row": 187, "column": 25}}, {"id": 895, "type": "identifier", "text": "getWidth", "parent": 894, "children": [], "start_point": {"row": 187, "column": 12}, "end_point": {"row": 187, "column": 20}}, {"id": 896, "type": "argument_list", "text": "(img)", "parent": 894, "children": [897], "start_point": {"row": 187, "column": 20}, "end_point": {"row": 187, "column": 25}}, {"id": 897, "type": "identifier", "text": "img", "parent": 896, "children": [], "start_point": {"row": 187, "column": 21}, "end_point": {"row": 187, "column": 24}}, {"id": 898, "type": "!=", "text": "!=", "parent": 893, "children": [], "start_point": {"row": 187, "column": 26}, "end_point": {"row": 187, "column": 28}}, {"id": 899, "type": "identifier", "text": "width", "parent": 893, "children": [], "start_point": {"row": 187, "column": 29}, "end_point": {"row": 187, "column": 34}}, {"id": 900, "type": "||", "text": "||", "parent": 883, "children": [], "start_point": {"row": 187, "column": 35}, "end_point": {"row": 187, "column": 37}}, {"id": 901, "type": "binary_expression", "text": "getHeight(img) != height", "parent": 883, "children": [902, 906, 907], "start_point": {"row": 188, "column": 12}, "end_point": {"row": 188, "column": 36}}, {"id": 902, "type": "call_expression", "text": "getHeight(img)", "parent": 901, "children": [903, 904], "start_point": {"row": 188, "column": 12}, "end_point": {"row": 188, "column": 26}}, {"id": 903, "type": "identifier", "text": "getHeight", "parent": 902, "children": [], "start_point": {"row": 188, "column": 12}, "end_point": {"row": 188, "column": 21}}, {"id": 904, "type": "argument_list", "text": "(img)", "parent": 902, "children": [905], "start_point": {"row": 188, "column": 21}, "end_point": {"row": 188, "column": 26}}, {"id": 905, "type": "identifier", "text": "img", "parent": 904, "children": [], "start_point": {"row": 188, "column": 22}, "end_point": {"row": 188, "column": 25}}, {"id": 906, "type": "!=", "text": "!=", "parent": 901, "children": [], "start_point": {"row": 188, "column": 27}, "end_point": {"row": 188, "column": 29}}, {"id": 907, "type": "identifier", "text": "height", "parent": 901, "children": [], "start_point": {"row": 188, "column": 30}, "end_point": {"row": 188, "column": 36}}, {"id": 908, "type": "||", "text": "||", "parent": 882, "children": [], "start_point": {"row": 188, "column": 37}, "end_point": {"row": 188, "column": 39}}, {"id": 909, "type": "binary_expression", "text": "getCvImageType(img) != cvType", "parent": 882, "children": [910, 914, 915], "start_point": {"row": 189, "column": 12}, "end_point": {"row": 189, "column": 41}}, {"id": 910, "type": "call_expression", "text": "getCvImageType(img)", "parent": 909, "children": [911, 912], "start_point": {"row": 189, "column": 12}, "end_point": {"row": 189, "column": 31}}, {"id": 911, "type": "identifier", "text": "getCvImageType", "parent": 910, "children": [], "start_point": {"row": 189, "column": 12}, "end_point": {"row": 189, "column": 26}}, {"id": 912, "type": "argument_list", "text": "(img)", "parent": 910, "children": [913], "start_point": {"row": 189, "column": 26}, "end_point": {"row": 189, "column": 31}}, {"id": 913, "type": "identifier", "text": "img", "parent": 912, "children": [], "start_point": {"row": 189, "column": 27}, "end_point": {"row": 189, "column": 30}}, {"id": 914, "type": "!=", "text": "!=", "parent": 909, "children": [], "start_point": {"row": 189, "column": 32}, "end_point": {"row": 189, "column": 34}}, {"id": 915, "type": "identifier", "text": "cvType", "parent": 909, "children": [], "start_point": {"row": 189, "column": 35}, "end_point": {"row": 189, "column": 41}}, {"id": 916, "type": "call_expression", "text": "img.allocate(width, height, getGlImageType(cvType))", "parent": 880, "children": [917, 920], "start_point": {"row": 191, "column": 12}, "end_point": {"row": 191, "column": 63}}, {"id": 917, "type": "field_expression", "text": "img.allocate", "parent": 916, "children": [918, 919], "start_point": {"row": 191, "column": 12}, "end_point": {"row": 191, "column": 24}}, {"id": 918, "type": "identifier", "text": "img", "parent": 917, "children": [], "start_point": {"row": 191, "column": 12}, "end_point": {"row": 191, "column": 15}}, {"id": 919, "type": "field_identifier", "text": "allocate", "parent": 917, "children": [], "start_point": {"row": 191, "column": 16}, "end_point": {"row": 191, "column": 24}}, {"id": 920, "type": "argument_list", "text": "(width, height, getGlImageType(cvType))", "parent": 916, "children": [921, 922, 923], "start_point": {"row": 191, "column": 24}, "end_point": {"row": 191, "column": 63}}, {"id": 921, "type": "identifier", "text": "width", "parent": 920, "children": [], "start_point": {"row": 191, "column": 25}, "end_point": {"row": 191, "column": 30}}, {"id": 922, "type": "identifier", "text": "height", "parent": 920, "children": [], "start_point": {"row": 191, "column": 32}, "end_point": {"row": 191, "column": 38}}, {"id": 923, "type": "call_expression", "text": "getGlImageType(cvType)", "parent": 920, "children": [924, 925], "start_point": {"row": 191, "column": 40}, "end_point": {"row": 191, "column": 62}}, {"id": 924, "type": "identifier", "text": "getGlImageType", "parent": 923, "children": [], "start_point": {"row": 191, "column": 40}, "end_point": {"row": 191, "column": 54}}, {"id": 925, "type": "argument_list", "text": "(cvType)", "parent": 923, "children": [926], "start_point": {"row": 191, "column": 54}, "end_point": {"row": 191, "column": 62}}, {"id": 926, "type": "identifier", "text": "cvType", "parent": 925, "children": [], "start_point": {"row": 191, "column": 55}, "end_point": {"row": 191, "column": 61}}, {"id": 927, "type": "function_definition", "text": "inline void allocate(cv::Mat& img, int width, int height, int cvType) {\n if (getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType) {\n\t\t\timg.create(height, width, cvType);\n\t\t}\n\t}", "parent": 33, "children": [928, 930, 931], "start_point": {"row": 194, "column": 1}, "end_point": {"row": 200, "column": 2}}, {"id": 928, "type": "storage_class_specifier", "text": "inline", "parent": 927, "children": [929], "start_point": {"row": 194, "column": 1}, "end_point": {"row": 194, "column": 7}}, {"id": 929, "type": "inline", "text": "inline", "parent": 928, "children": [], "start_point": {"row": 194, "column": 1}, "end_point": {"row": 194, "column": 7}}, {"id": 930, "type": "primitive_type", "text": "void", "parent": 927, "children": [], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 194, "column": 12}}, {"id": 931, "type": "function_declarator", "text": "allocate(cv::Mat& img, int width, int height, int cvType)", "parent": 927, "children": [932, 933], "start_point": {"row": 194, "column": 13}, "end_point": {"row": 194, "column": 70}}, {"id": 932, "type": "identifier", "text": "allocate", "parent": 931, "children": [], "start_point": {"row": 194, "column": 13}, "end_point": {"row": 194, "column": 21}}, {"id": 933, "type": "parameter_list", "text": "(cv::Mat& img, int width, int height, int cvType)", "parent": 931, "children": [934, 939, 942, 945], "start_point": {"row": 194, "column": 21}, "end_point": {"row": 194, "column": 70}}, {"id": 934, "type": "parameter_declaration", "text": "cv::Mat& img", "parent": 933, "children": [935, 936, 938], "start_point": {"row": 194, "column": 22}, "end_point": {"row": 194, "column": 34}}, {"id": 935, "type": "type_identifier", "text": "cv", "parent": 934, "children": [], "start_point": {"row": 194, "column": 22}, "end_point": {"row": 194, "column": 24}}, {"id": 936, "type": "ERROR", "text": "::Mat&", "parent": 934, "children": [937], "start_point": {"row": 194, "column": 24}, "end_point": {"row": 194, "column": 30}}, {"id": 937, "type": "identifier", "text": "Mat", "parent": 936, "children": [], "start_point": {"row": 194, "column": 26}, "end_point": {"row": 194, "column": 29}}, {"id": 938, "type": "identifier", "text": "img", "parent": 934, "children": [], "start_point": {"row": 194, "column": 31}, "end_point": {"row": 194, "column": 34}}, {"id": 939, "type": "parameter_declaration", "text": "int width", "parent": 933, "children": [940, 941], "start_point": {"row": 194, "column": 36}, "end_point": {"row": 194, "column": 45}}, {"id": 940, "type": "primitive_type", "text": "int", "parent": 939, "children": [], "start_point": {"row": 194, "column": 36}, "end_point": {"row": 194, "column": 39}}, {"id": 941, "type": "identifier", "text": "width", "parent": 939, "children": [], "start_point": {"row": 194, "column": 40}, "end_point": {"row": 194, "column": 45}}, {"id": 942, "type": "parameter_declaration", "text": "int height", "parent": 933, "children": [943, 944], "start_point": {"row": 194, "column": 47}, "end_point": {"row": 194, "column": 57}}, {"id": 943, "type": "primitive_type", "text": "int", "parent": 942, "children": [], "start_point": {"row": 194, "column": 47}, "end_point": {"row": 194, "column": 50}}, {"id": 944, "type": "identifier", "text": "height", "parent": 942, "children": [], "start_point": {"row": 194, "column": 51}, "end_point": {"row": 194, "column": 57}}, {"id": 945, "type": "parameter_declaration", "text": "int cvType", "parent": 933, "children": [946, 947], "start_point": {"row": 194, "column": 59}, "end_point": {"row": 194, "column": 69}}, {"id": 946, "type": "primitive_type", "text": "int", "parent": 945, "children": [], "start_point": {"row": 194, "column": 59}, "end_point": {"row": 194, "column": 62}}, {"id": 947, "type": "identifier", "text": "cvType", "parent": 945, "children": [], "start_point": {"row": 194, "column": 63}, "end_point": {"row": 194, "column": 69}}, {"id": 948, "type": "if_statement", "text": "if (getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType) {\n\t\t\timg.create(height, width, cvType);\n\t\t}", "parent": 927, "children": [949], "start_point": {"row": 195, "column": 8}, "end_point": {"row": 199, "column": 3}}, {"id": 949, "type": "parenthesized_expression", "text": "(getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)", "parent": 948, "children": [950], "start_point": {"row": 195, "column": 11}, "end_point": {"row": 197, "column": 42}}, {"id": 950, "type": "binary_expression", "text": "getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType", "parent": 949, "children": [951, 967, 968], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 197, "column": 41}}, {"id": 951, "type": "binary_expression", "text": "getWidth(img) != width ||\n getHeight(img) != height", "parent": 950, "children": [952, 959, 960], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 196, "column": 36}}, {"id": 952, "type": "binary_expression", "text": "getWidth(img) != width", "parent": 951, "children": [953, 957, 958], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 195, "column": 34}}, {"id": 953, "type": "call_expression", "text": "getWidth(img)", "parent": 952, "children": [954, 955], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 195, "column": 25}}, {"id": 954, "type": "identifier", "text": "getWidth", "parent": 953, "children": [], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 195, "column": 20}}, {"id": 955, "type": "argument_list", "text": "(img)", "parent": 953, "children": [956], "start_point": {"row": 195, "column": 20}, "end_point": {"row": 195, "column": 25}}, {"id": 956, "type": "identifier", "text": "img", "parent": 955, "children": [], "start_point": {"row": 195, "column": 21}, "end_point": {"row": 195, "column": 24}}, {"id": 957, "type": "!=", "text": "!=", "parent": 952, "children": [], "start_point": {"row": 195, "column": 26}, "end_point": {"row": 195, "column": 28}}, {"id": 958, "type": "identifier", "text": "width", "parent": 952, "children": [], "start_point": {"row": 195, "column": 29}, "end_point": {"row": 195, "column": 34}}, {"id": 959, "type": "||", "text": "||", "parent": 951, "children": [], "start_point": {"row": 195, "column": 35}, "end_point": {"row": 195, "column": 37}}, {"id": 960, "type": "binary_expression", "text": "getHeight(img) != height", "parent": 951, "children": [961, 965, 966], "start_point": {"row": 196, "column": 12}, "end_point": {"row": 196, "column": 36}}, {"id": 961, "type": "call_expression", "text": "getHeight(img)", "parent": 960, "children": [962, 963], "start_point": {"row": 196, "column": 12}, "end_point": {"row": 196, "column": 26}}, {"id": 962, "type": "identifier", "text": "getHeight", "parent": 961, "children": [], "start_point": {"row": 196, "column": 12}, "end_point": {"row": 196, "column": 21}}, {"id": 963, "type": "argument_list", "text": "(img)", "parent": 961, "children": [964], "start_point": {"row": 196, "column": 21}, "end_point": {"row": 196, "column": 26}}, {"id": 964, "type": "identifier", "text": "img", "parent": 963, "children": [], "start_point": {"row": 196, "column": 22}, "end_point": {"row": 196, "column": 25}}, {"id": 965, "type": "!=", "text": "!=", "parent": 960, "children": [], "start_point": {"row": 196, "column": 27}, "end_point": {"row": 196, "column": 29}}, {"id": 966, "type": "identifier", "text": "height", "parent": 960, "children": [], "start_point": {"row": 196, "column": 30}, "end_point": {"row": 196, "column": 36}}, {"id": 967, "type": "||", "text": "||", "parent": 950, "children": [], "start_point": {"row": 196, "column": 37}, "end_point": {"row": 196, "column": 39}}, {"id": 968, "type": "binary_expression", "text": "getCvImageType(img) != cvType", "parent": 950, "children": [969, 973, 974], "start_point": {"row": 197, "column": 12}, "end_point": {"row": 197, "column": 41}}, {"id": 969, "type": "call_expression", "text": "getCvImageType(img)", "parent": 968, "children": [970, 971], "start_point": {"row": 197, "column": 12}, "end_point": {"row": 197, "column": 31}}, {"id": 970, "type": "identifier", "text": "getCvImageType", "parent": 969, "children": [], "start_point": {"row": 197, "column": 12}, "end_point": {"row": 197, "column": 26}}, {"id": 971, "type": "argument_list", "text": "(img)", "parent": 969, "children": [972], "start_point": {"row": 197, "column": 26}, "end_point": {"row": 197, "column": 31}}, {"id": 972, "type": "identifier", "text": "img", "parent": 971, "children": [], "start_point": {"row": 197, "column": 27}, "end_point": {"row": 197, "column": 30}}, {"id": 973, "type": "!=", "text": "!=", "parent": 968, "children": [], "start_point": {"row": 197, "column": 32}, "end_point": {"row": 197, "column": 34}}, {"id": 974, "type": "identifier", "text": "cvType", "parent": 968, "children": [], "start_point": {"row": 197, "column": 35}, "end_point": {"row": 197, "column": 41}}, {"id": 975, "type": "call_expression", "text": "img.create(height, width, cvType)", "parent": 948, "children": [976, 979], "start_point": {"row": 198, "column": 3}, "end_point": {"row": 198, "column": 36}}, {"id": 976, "type": "field_expression", "text": "img.create", "parent": 975, "children": [977, 978], "start_point": {"row": 198, "column": 3}, "end_point": {"row": 198, "column": 13}}, {"id": 977, "type": "identifier", "text": "img", "parent": 976, "children": [], "start_point": {"row": 198, "column": 3}, "end_point": {"row": 198, "column": 6}}, {"id": 978, "type": "field_identifier", "text": "create", "parent": 976, "children": [], "start_point": {"row": 198, "column": 7}, "end_point": {"row": 198, "column": 13}}, {"id": 979, "type": "argument_list", "text": "(height, width, cvType)", "parent": 975, "children": [980, 981, 982], "start_point": {"row": 198, "column": 13}, "end_point": {"row": 198, "column": 36}}, {"id": 980, "type": "identifier", "text": "height", "parent": 979, "children": [], "start_point": {"row": 198, "column": 14}, "end_point": {"row": 198, "column": 20}}, {"id": 981, "type": "identifier", "text": "width", "parent": 979, "children": [], "start_point": {"row": 198, "column": 22}, "end_point": {"row": 198, "column": 27}}, {"id": 982, "type": "identifier", "text": "cvType", "parent": 979, "children": [], "start_point": {"row": 198, "column": 29}, "end_point": {"row": 198, "column": 35}}, {"id": 983, "type": "function_definition", "text": "inline void allocate(ofBaseVideoDraws & img, int width, int height, int cvType) {}", "parent": 33, "children": [984, 986, 987], "start_point": {"row": 202, "column": 4}, "end_point": {"row": 202, "column": 86}}, {"id": 984, "type": "storage_class_specifier", "text": "inline", "parent": 983, "children": [985], "start_point": {"row": 202, "column": 4}, "end_point": {"row": 202, "column": 10}}, {"id": 985, "type": "inline", "text": "inline", "parent": 984, "children": [], "start_point": {"row": 202, "column": 4}, "end_point": {"row": 202, "column": 10}}, {"id": 986, "type": "primitive_type", "text": "void", "parent": 983, "children": [], "start_point": {"row": 202, "column": 11}, "end_point": {"row": 202, "column": 15}}, {"id": 987, "type": "function_declarator", "text": "allocate(ofBaseVideoDraws & img, int width, int height, int cvType)", "parent": 983, "children": [988, 989], "start_point": {"row": 202, "column": 16}, "end_point": {"row": 202, "column": 83}}, {"id": 988, "type": "identifier", "text": "allocate", "parent": 987, "children": [], "start_point": {"row": 202, "column": 16}, "end_point": {"row": 202, "column": 24}}, {"id": 989, "type": "parameter_list", "text": "(ofBaseVideoDraws & img, int width, int height, int cvType)", "parent": 987, "children": [990, 993, 996, 999], "start_point": {"row": 202, "column": 24}, "end_point": {"row": 202, "column": 83}}, {"id": 990, "type": "parameter_declaration", "text": "ofBaseVideoDraws & img", "parent": 989, "children": [991, 992], "start_point": {"row": 202, "column": 25}, "end_point": {"row": 202, "column": 47}}, {"id": 991, "type": "type_identifier", "text": "ofBaseVideoDraws", "parent": 990, "children": [], "start_point": {"row": 202, "column": 25}, "end_point": {"row": 202, "column": 41}}, {"id": 992, "type": "identifier", "text": "img", "parent": 990, "children": [], "start_point": {"row": 202, "column": 44}, "end_point": {"row": 202, "column": 47}}, {"id": 993, "type": "parameter_declaration", "text": "int width", "parent": 989, "children": [994, 995], "start_point": {"row": 202, "column": 49}, "end_point": {"row": 202, "column": 58}}, {"id": 994, "type": "primitive_type", "text": "int", "parent": 993, "children": [], "start_point": {"row": 202, "column": 49}, "end_point": {"row": 202, "column": 52}}, {"id": 995, "type": "identifier", "text": "width", "parent": 993, "children": [], "start_point": {"row": 202, "column": 53}, "end_point": {"row": 202, "column": 58}}, {"id": 996, "type": "parameter_declaration", "text": "int height", "parent": 989, "children": [997, 998], "start_point": {"row": 202, "column": 60}, "end_point": {"row": 202, "column": 70}}, {"id": 997, "type": "primitive_type", "text": "int", "parent": 996, "children": [], "start_point": {"row": 202, "column": 60}, "end_point": {"row": 202, "column": 63}}, {"id": 998, "type": "identifier", "text": "height", "parent": 996, "children": [], "start_point": {"row": 202, "column": 64}, "end_point": {"row": 202, "column": 70}}, {"id": 999, "type": "parameter_declaration", "text": "int cvType", "parent": 989, "children": [1000, 1001], "start_point": {"row": 202, "column": 72}, "end_point": {"row": 202, "column": 82}}, {"id": 1000, "type": "primitive_type", "text": "int", "parent": 999, "children": [], "start_point": {"row": 202, "column": 72}, "end_point": {"row": 202, "column": 75}}, {"id": 1001, "type": "identifier", "text": "cvType", "parent": 999, "children": [], "start_point": {"row": 202, "column": 76}, "end_point": {"row": 202, "column": 82}}, {"id": 1002, "type": "function_definition", "text": "inline void allocate(ofVideoPlayer & img, int width, int height, int cvType) {}", "parent": 33, "children": [1003, 1005, 1006], "start_point": {"row": 203, "column": 4}, "end_point": {"row": 203, "column": 83}}, {"id": 1003, "type": "storage_class_specifier", "text": "inline", "parent": 1002, "children": [1004], "start_point": {"row": 203, "column": 4}, "end_point": {"row": 203, "column": 10}}, {"id": 1004, "type": "inline", "text": "inline", "parent": 1003, "children": [], "start_point": {"row": 203, "column": 4}, "end_point": {"row": 203, "column": 10}}, {"id": 1005, "type": "primitive_type", "text": "void", "parent": 1002, "children": [], "start_point": {"row": 203, "column": 11}, "end_point": {"row": 203, "column": 15}}, {"id": 1006, "type": "function_declarator", "text": "allocate(ofVideoPlayer & img, int width, int height, int cvType)", "parent": 1002, "children": [1007, 1008], "start_point": {"row": 203, "column": 16}, "end_point": {"row": 203, "column": 80}}, {"id": 1007, "type": "identifier", "text": "allocate", "parent": 1006, "children": [], "start_point": {"row": 203, "column": 16}, "end_point": {"row": 203, "column": 24}}, {"id": 1008, "type": "parameter_list", "text": "(ofVideoPlayer & img, int width, int height, int cvType)", "parent": 1006, "children": [1009, 1012, 1015, 1018], "start_point": {"row": 203, "column": 24}, "end_point": {"row": 203, "column": 80}}, {"id": 1009, "type": "parameter_declaration", "text": "ofVideoPlayer & img", "parent": 1008, "children": [1010, 1011], "start_point": {"row": 203, "column": 25}, "end_point": {"row": 203, "column": 44}}, {"id": 1010, "type": "type_identifier", "text": "ofVideoPlayer", "parent": 1009, "children": [], "start_point": {"row": 203, "column": 25}, "end_point": {"row": 203, "column": 38}}, {"id": 1011, "type": "identifier", "text": "img", "parent": 1009, "children": [], "start_point": {"row": 203, "column": 41}, "end_point": {"row": 203, "column": 44}}, {"id": 1012, "type": "parameter_declaration", "text": "int width", "parent": 1008, "children": [1013, 1014], "start_point": {"row": 203, "column": 46}, "end_point": {"row": 203, "column": 55}}, {"id": 1013, "type": "primitive_type", "text": "int", "parent": 1012, "children": [], "start_point": {"row": 203, "column": 46}, "end_point": {"row": 203, "column": 49}}, {"id": 1014, "type": "identifier", "text": "width", "parent": 1012, "children": [], "start_point": {"row": 203, "column": 50}, "end_point": {"row": 203, "column": 55}}, {"id": 1015, "type": "parameter_declaration", "text": "int height", "parent": 1008, "children": [1016, 1017], "start_point": {"row": 203, "column": 57}, "end_point": {"row": 203, "column": 67}}, {"id": 1016, "type": "primitive_type", "text": "int", "parent": 1015, "children": [], "start_point": {"row": 203, "column": 57}, "end_point": {"row": 203, "column": 60}}, {"id": 1017, "type": "identifier", "text": "height", "parent": 1015, "children": [], "start_point": {"row": 203, "column": 61}, "end_point": {"row": 203, "column": 67}}, {"id": 1018, "type": "parameter_declaration", "text": "int cvType", "parent": 1008, "children": [1019, 1020], "start_point": {"row": 203, "column": 69}, "end_point": {"row": 203, "column": 79}}, {"id": 1019, "type": "primitive_type", "text": "int", "parent": 1018, "children": [], "start_point": {"row": 203, "column": 69}, "end_point": {"row": 203, "column": 72}}, {"id": 1020, "type": "identifier", "text": "cvType", "parent": 1018, "children": [], "start_point": {"row": 203, "column": 73}, "end_point": {"row": 203, "column": 79}}, {"id": 1021, "type": "function_definition", "text": "inline void allocate(ofVideoGrabber & img, int width, int height, int cvType) {}", "parent": 33, "children": [1022, 1024, 1025], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 84}}, {"id": 1022, "type": "storage_class_specifier", "text": "inline", "parent": 1021, "children": [1023], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 10}}, {"id": 1023, "type": "inline", "text": "inline", "parent": 1022, "children": [], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 10}}, {"id": 1024, "type": "primitive_type", "text": "void", "parent": 1021, "children": [], "start_point": {"row": 204, "column": 11}, "end_point": {"row": 204, "column": 15}}, {"id": 1025, "type": "function_declarator", "text": "allocate(ofVideoGrabber & img, int width, int height, int cvType)", "parent": 1021, "children": [1026, 1027], "start_point": {"row": 204, "column": 16}, "end_point": {"row": 204, "column": 81}}, {"id": 1026, "type": "identifier", "text": "allocate", "parent": 1025, "children": [], "start_point": {"row": 204, "column": 16}, "end_point": {"row": 204, "column": 24}}, {"id": 1027, "type": "parameter_list", "text": "(ofVideoGrabber & img, int width, int height, int cvType)", "parent": 1025, "children": [1028, 1031, 1034, 1037], "start_point": {"row": 204, "column": 24}, "end_point": {"row": 204, "column": 81}}, {"id": 1028, "type": "parameter_declaration", "text": "ofVideoGrabber & img", "parent": 1027, "children": [1029, 1030], "start_point": {"row": 204, "column": 25}, "end_point": {"row": 204, "column": 45}}, {"id": 1029, "type": "type_identifier", "text": "ofVideoGrabber", "parent": 1028, "children": [], "start_point": {"row": 204, "column": 25}, "end_point": {"row": 204, "column": 39}}, {"id": 1030, "type": "identifier", "text": "img", "parent": 1028, "children": [], "start_point": {"row": 204, "column": 42}, "end_point": {"row": 204, "column": 45}}, {"id": 1031, "type": "parameter_declaration", "text": "int width", "parent": 1027, "children": [1032, 1033], "start_point": {"row": 204, "column": 47}, "end_point": {"row": 204, "column": 56}}, {"id": 1032, "type": "primitive_type", "text": "int", "parent": 1031, "children": [], "start_point": {"row": 204, "column": 47}, "end_point": {"row": 204, "column": 50}}, {"id": 1033, "type": "identifier", "text": "width", "parent": 1031, "children": [], "start_point": {"row": 204, "column": 51}, "end_point": {"row": 204, "column": 56}}, {"id": 1034, "type": "parameter_declaration", "text": "int height", "parent": 1027, "children": [1035, 1036], "start_point": {"row": 204, "column": 58}, "end_point": {"row": 204, "column": 68}}, {"id": 1035, "type": "primitive_type", "text": "int", "parent": 1034, "children": [], "start_point": {"row": 204, "column": 58}, "end_point": {"row": 204, "column": 61}}, {"id": 1036, "type": "identifier", "text": "height", "parent": 1034, "children": [], "start_point": {"row": 204, "column": 62}, "end_point": {"row": 204, "column": 68}}, {"id": 1037, "type": "parameter_declaration", "text": "int cvType", "parent": 1027, "children": [1038, 1039], "start_point": {"row": 204, "column": 70}, "end_point": {"row": 204, "column": 80}}, {"id": 1038, "type": "primitive_type", "text": "int", "parent": 1037, "children": [], "start_point": {"row": 204, "column": 70}, "end_point": {"row": 204, "column": 73}}, {"id": 1039, "type": "identifier", "text": "cvType", "parent": 1037, "children": [], "start_point": {"row": 204, "column": 74}, "end_point": {"row": 204, "column": 80}}, {"id": 1040, "type": "function_definition", "text": "inline void allocate(const ofBaseVideoDraws & img, int width, int height, int cvType) {}", "parent": 33, "children": [1041, 1043, 1044], "start_point": {"row": 206, "column": 4}, "end_point": {"row": 206, "column": 92}}, {"id": 1041, "type": "storage_class_specifier", "text": "inline", "parent": 1040, "children": [1042], "start_point": {"row": 206, "column": 4}, "end_point": {"row": 206, "column": 10}}, {"id": 1042, "type": "inline", "text": "inline", "parent": 1041, "children": [], "start_point": {"row": 206, "column": 4}, "end_point": {"row": 206, "column": 10}}, {"id": 1043, "type": "primitive_type", "text": "void", "parent": 1040, "children": [], "start_point": {"row": 206, "column": 11}, "end_point": {"row": 206, "column": 15}}, {"id": 1044, "type": "function_declarator", "text": "allocate(const ofBaseVideoDraws & img, int width, int height, int cvType)", "parent": 1040, "children": [1045, 1046], "start_point": {"row": 206, "column": 16}, "end_point": {"row": 206, "column": 89}}, {"id": 1045, "type": "identifier", "text": "allocate", "parent": 1044, "children": [], "start_point": {"row": 206, "column": 16}, "end_point": {"row": 206, "column": 24}}, {"id": 1046, "type": "parameter_list", "text": "(const ofBaseVideoDraws & img, int width, int height, int cvType)", "parent": 1044, "children": [1047, 1050, 1053, 1056], "start_point": {"row": 206, "column": 24}, "end_point": {"row": 206, "column": 89}}, {"id": 1047, "type": "parameter_declaration", "text": "const ofBaseVideoDraws & img", "parent": 1046, "children": [1048, 1049], "start_point": {"row": 206, "column": 25}, "end_point": {"row": 206, "column": 53}}, {"id": 1048, "type": "type_identifier", "text": "ofBaseVideoDraws", "parent": 1047, "children": [], "start_point": {"row": 206, "column": 31}, "end_point": {"row": 206, "column": 47}}, {"id": 1049, "type": "identifier", "text": "img", "parent": 1047, "children": [], "start_point": {"row": 206, "column": 50}, "end_point": {"row": 206, "column": 53}}, {"id": 1050, "type": "parameter_declaration", "text": "int width", "parent": 1046, "children": [1051, 1052], "start_point": {"row": 206, "column": 55}, "end_point": {"row": 206, "column": 64}}, {"id": 1051, "type": "primitive_type", "text": "int", "parent": 1050, "children": [], "start_point": {"row": 206, "column": 55}, "end_point": {"row": 206, "column": 58}}, {"id": 1052, "type": "identifier", "text": "width", "parent": 1050, "children": [], "start_point": {"row": 206, "column": 59}, "end_point": {"row": 206, "column": 64}}, {"id": 1053, "type": "parameter_declaration", "text": "int height", "parent": 1046, "children": [1054, 1055], "start_point": {"row": 206, "column": 66}, "end_point": {"row": 206, "column": 76}}, {"id": 1054, "type": "primitive_type", "text": "int", "parent": 1053, "children": [], "start_point": {"row": 206, "column": 66}, "end_point": {"row": 206, "column": 69}}, {"id": 1055, "type": "identifier", "text": "height", "parent": 1053, "children": [], "start_point": {"row": 206, "column": 70}, "end_point": {"row": 206, "column": 76}}, {"id": 1056, "type": "parameter_declaration", "text": "int cvType", "parent": 1046, "children": [1057, 1058], "start_point": {"row": 206, "column": 78}, "end_point": {"row": 206, "column": 88}}, {"id": 1057, "type": "primitive_type", "text": "int", "parent": 1056, "children": [], "start_point": {"row": 206, "column": 78}, "end_point": {"row": 206, "column": 81}}, {"id": 1058, "type": "identifier", "text": "cvType", "parent": 1056, "children": [], "start_point": {"row": 206, "column": 82}, "end_point": {"row": 206, "column": 88}}, {"id": 1059, "type": "function_definition", "text": "inline void allocate(const ofVideoPlayer & img, int width, int height, int cvType) {}", "parent": 33, "children": [1060, 1062, 1063], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 89}}, {"id": 1060, "type": "storage_class_specifier", "text": "inline", "parent": 1059, "children": [1061], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 10}}, {"id": 1061, "type": "inline", "text": "inline", "parent": 1060, "children": [], "start_point": {"row": 207, "column": 4}, "end_point": {"row": 207, "column": 10}}, {"id": 1062, "type": "primitive_type", "text": "void", "parent": 1059, "children": [], "start_point": {"row": 207, "column": 11}, "end_point": {"row": 207, "column": 15}}, {"id": 1063, "type": "function_declarator", "text": "allocate(const ofVideoPlayer & img, int width, int height, int cvType)", "parent": 1059, "children": [1064, 1065], "start_point": {"row": 207, "column": 16}, "end_point": {"row": 207, "column": 86}}, {"id": 1064, "type": "identifier", "text": "allocate", "parent": 1063, "children": [], "start_point": {"row": 207, "column": 16}, "end_point": {"row": 207, "column": 24}}, {"id": 1065, "type": "parameter_list", "text": "(const ofVideoPlayer & img, int width, int height, int cvType)", "parent": 1063, "children": [1066, 1069, 1072, 1075], "start_point": {"row": 207, "column": 24}, "end_point": {"row": 207, "column": 86}}, {"id": 1066, "type": "parameter_declaration", "text": "const ofVideoPlayer & img", "parent": 1065, "children": [1067, 1068], "start_point": {"row": 207, "column": 25}, "end_point": {"row": 207, "column": 50}}, {"id": 1067, "type": "type_identifier", "text": "ofVideoPlayer", "parent": 1066, "children": [], "start_point": {"row": 207, "column": 31}, "end_point": {"row": 207, "column": 44}}, {"id": 1068, "type": "identifier", "text": "img", "parent": 1066, "children": [], "start_point": {"row": 207, "column": 47}, "end_point": {"row": 207, "column": 50}}, {"id": 1069, "type": "parameter_declaration", "text": "int width", "parent": 1065, "children": [1070, 1071], "start_point": {"row": 207, "column": 52}, "end_point": {"row": 207, "column": 61}}, {"id": 1070, "type": "primitive_type", "text": "int", "parent": 1069, "children": [], "start_point": {"row": 207, "column": 52}, "end_point": {"row": 207, "column": 55}}, {"id": 1071, "type": "identifier", "text": "width", "parent": 1069, "children": [], "start_point": {"row": 207, "column": 56}, "end_point": {"row": 207, "column": 61}}, {"id": 1072, "type": "parameter_declaration", "text": "int height", "parent": 1065, "children": [1073, 1074], "start_point": {"row": 207, "column": 63}, "end_point": {"row": 207, "column": 73}}, {"id": 1073, "type": "primitive_type", "text": "int", "parent": 1072, "children": [], "start_point": {"row": 207, "column": 63}, "end_point": {"row": 207, "column": 66}}, {"id": 1074, "type": "identifier", "text": "height", "parent": 1072, "children": [], "start_point": {"row": 207, "column": 67}, "end_point": {"row": 207, "column": 73}}, {"id": 1075, "type": "parameter_declaration", "text": "int cvType", "parent": 1065, "children": [1076, 1077], "start_point": {"row": 207, "column": 75}, "end_point": {"row": 207, "column": 85}}, {"id": 1076, "type": "primitive_type", "text": "int", "parent": 1075, "children": [], "start_point": {"row": 207, "column": 75}, "end_point": {"row": 207, "column": 78}}, {"id": 1077, "type": "identifier", "text": "cvType", "parent": 1075, "children": [], "start_point": {"row": 207, "column": 79}, "end_point": {"row": 207, "column": 85}}, {"id": 1078, "type": "function_definition", "text": "inline void allocate(const ofVideoGrabber & img, int width, int height, int cvType) {}", "parent": 33, "children": [1079, 1081, 1082], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 90}}, {"id": 1079, "type": "storage_class_specifier", "text": "inline", "parent": 1078, "children": [1080], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 10}}, {"id": 1080, "type": "inline", "text": "inline", "parent": 1079, "children": [], "start_point": {"row": 208, "column": 4}, "end_point": {"row": 208, "column": 10}}, {"id": 1081, "type": "primitive_type", "text": "void", "parent": 1078, "children": [], "start_point": {"row": 208, "column": 11}, "end_point": {"row": 208, "column": 15}}, {"id": 1082, "type": "function_declarator", "text": "allocate(const ofVideoGrabber & img, int width, int height, int cvType)", "parent": 1078, "children": [1083, 1084], "start_point": {"row": 208, "column": 16}, "end_point": {"row": 208, "column": 87}}, {"id": 1083, "type": "identifier", "text": "allocate", "parent": 1082, "children": [], "start_point": {"row": 208, "column": 16}, "end_point": {"row": 208, "column": 24}}, {"id": 1084, "type": "parameter_list", "text": "(const ofVideoGrabber & img, int width, int height, int cvType)", "parent": 1082, "children": [1085, 1088, 1091, 1094], "start_point": {"row": 208, "column": 24}, "end_point": {"row": 208, "column": 87}}, {"id": 1085, "type": "parameter_declaration", "text": "const ofVideoGrabber & img", "parent": 1084, "children": [1086, 1087], "start_point": {"row": 208, "column": 25}, "end_point": {"row": 208, "column": 51}}, {"id": 1086, "type": "type_identifier", "text": "ofVideoGrabber", "parent": 1085, "children": [], "start_point": {"row": 208, "column": 31}, "end_point": {"row": 208, "column": 45}}, {"id": 1087, "type": "identifier", "text": "img", "parent": 1085, "children": [], "start_point": {"row": 208, "column": 48}, "end_point": {"row": 208, "column": 51}}, {"id": 1088, "type": "parameter_declaration", "text": "int width", "parent": 1084, "children": [1089, 1090], "start_point": {"row": 208, "column": 53}, "end_point": {"row": 208, "column": 62}}, {"id": 1089, "type": "primitive_type", "text": "int", "parent": 1088, "children": [], "start_point": {"row": 208, "column": 53}, "end_point": {"row": 208, "column": 56}}, {"id": 1090, "type": "identifier", "text": "width", "parent": 1088, "children": [], "start_point": {"row": 208, "column": 57}, "end_point": {"row": 208, "column": 62}}, {"id": 1091, "type": "parameter_declaration", "text": "int height", "parent": 1084, "children": [1092, 1093], "start_point": {"row": 208, "column": 64}, "end_point": {"row": 208, "column": 74}}, {"id": 1092, "type": "primitive_type", "text": "int", "parent": 1091, "children": [], "start_point": {"row": 208, "column": 64}, "end_point": {"row": 208, "column": 67}}, {"id": 1093, "type": "identifier", "text": "height", "parent": 1091, "children": [], "start_point": {"row": 208, "column": 68}, "end_point": {"row": 208, "column": 74}}, {"id": 1094, "type": "parameter_declaration", "text": "int cvType", "parent": 1084, "children": [1095, 1096], "start_point": {"row": 208, "column": 76}, "end_point": {"row": 208, "column": 86}}, {"id": 1095, "type": "primitive_type", "text": "int", "parent": 1094, "children": [], "start_point": {"row": 208, "column": 76}, "end_point": {"row": 208, "column": 79}}, {"id": 1096, "type": "identifier", "text": "cvType", "parent": 1094, "children": [], "start_point": {"row": 208, "column": 80}, "end_point": {"row": 208, "column": 86}}, {"id": 1097, "type": "comma_expression", "text": "template <class M, class O> void imitate(M& mirror, const O& original, int mirrorCvImageType)", "parent": 33, "children": [1098, 1101, 1103], "start_point": {"row": 215, "column": 1}, "end_point": {"row": 215, "column": 94}}, {"id": 1098, "type": "binary_expression", "text": "template <class", "parent": 1097, "children": [1099, 1100], "start_point": {"row": 215, "column": 1}, "end_point": {"row": 215, "column": 16}}, {"id": 1099, "type": "identifier", "text": "template", "parent": 1098, "children": [], "start_point": {"row": 215, "column": 1}, "end_point": {"row": 215, "column": 9}}, {"id": 1100, "type": "<", "text": "<", "parent": 1098, "children": [], "start_point": {"row": 215, "column": 10}, "end_point": {"row": 215, "column": 11}}, {"id": 1101, "type": "ERROR", "text": "M", "parent": 1097, "children": [1102], "start_point": {"row": 215, "column": 17}, "end_point": {"row": 215, "column": 18}}, {"id": 1102, "type": "identifier", "text": "M", "parent": 1101, "children": [], "start_point": {"row": 215, "column": 17}, "end_point": {"row": 215, "column": 18}}, {"id": 1103, "type": "binary_expression", "text": "class O> void imitate(M& mirror, const O& original, int mirrorCvImageType)", "parent": 1097, "children": [1104, 1106, 1107, 1109], "start_point": {"row": 215, "column": 20}, "end_point": {"row": 215, "column": 94}}, {"id": 1104, "type": "ERROR", "text": "O", "parent": 1103, "children": [1105], "start_point": {"row": 215, "column": 26}, "end_point": {"row": 215, "column": 27}}, {"id": 1105, "type": "identifier", "text": "O", "parent": 1104, "children": [], "start_point": {"row": 215, "column": 26}, "end_point": {"row": 215, "column": 27}}, {"id": 1106, "type": ">", "text": ">", "parent": 1103, "children": [], "start_point": {"row": 215, "column": 27}, "end_point": {"row": 215, "column": 28}}, {"id": 1107, "type": "ERROR", "text": "void", "parent": 1103, "children": [1108], "start_point": {"row": 215, "column": 29}, "end_point": {"row": 215, "column": 33}}, {"id": 1108, "type": "identifier", "text": "void", "parent": 1107, "children": [], "start_point": {"row": 215, "column": 29}, "end_point": {"row": 215, "column": 33}}, {"id": 1109, "type": "call_expression", "text": "imitate(M& mirror, const O& original, int mirrorCvImageType)", "parent": 1103, "children": [1110, 1111], "start_point": {"row": 215, "column": 34}, "end_point": {"row": 215, "column": 94}}, {"id": 1110, "type": "identifier", "text": "imitate", "parent": 1109, "children": [], "start_point": {"row": 215, "column": 34}, "end_point": {"row": 215, "column": 41}}, {"id": 1111, "type": "argument_list", "text": "(M& mirror, const O& original, int mirrorCvImageType)", "parent": 1109, "children": [1112, 1115, 1119, 1121], "start_point": {"row": 215, "column": 41}, "end_point": {"row": 215, "column": 94}}, {"id": 1112, "type": "binary_expression", "text": "M& mirror", "parent": 1111, "children": [1113, 1114], "start_point": {"row": 215, "column": 42}, "end_point": {"row": 215, "column": 51}}, {"id": 1113, "type": "identifier", "text": "M", "parent": 1112, "children": [], "start_point": {"row": 215, "column": 42}, "end_point": {"row": 215, "column": 43}}, {"id": 1114, "type": "identifier", "text": "mirror", "parent": 1112, "children": [], "start_point": {"row": 215, "column": 45}, "end_point": {"row": 215, "column": 51}}, {"id": 1115, "type": "binary_expression", "text": "const O& original", "parent": 1111, "children": [1116, 1118], "start_point": {"row": 215, "column": 53}, "end_point": {"row": 215, "column": 70}}, {"id": 1116, "type": "ERROR", "text": "O", "parent": 1115, "children": [1117], "start_point": {"row": 215, "column": 59}, "end_point": {"row": 215, "column": 60}}, {"id": 1117, "type": "identifier", "text": "O", "parent": 1116, "children": [], "start_point": {"row": 215, "column": 59}, "end_point": {"row": 215, "column": 60}}, {"id": 1118, "type": "identifier", "text": "original", "parent": 1115, "children": [], "start_point": {"row": 215, "column": 62}, "end_point": {"row": 215, "column": 70}}, {"id": 1119, "type": "ERROR", "text": "int", "parent": 1111, "children": [1120], "start_point": {"row": 215, "column": 72}, "end_point": {"row": 215, "column": 75}}, {"id": 1120, "type": "identifier", "text": "int", "parent": 1119, "children": [], "start_point": {"row": 215, "column": 72}, "end_point": {"row": 215, "column": 75}}, {"id": 1121, "type": "identifier", "text": "mirrorCvImageType", "parent": 1111, "children": [], "start_point": {"row": 215, "column": 76}, "end_point": {"row": 215, "column": 93}}, {"id": 1122, "type": "declaration", "text": "int ow = getWidth(original), oh = getHeight(original);", "parent": 33, "children": [1123, 1124, 1131], "start_point": {"row": 216, "column": 2}, "end_point": {"row": 216, "column": 56}}, {"id": 1123, "type": "primitive_type", "text": "int", "parent": 1122, "children": [], "start_point": {"row": 216, "column": 2}, "end_point": {"row": 216, "column": 5}}, {"id": 1124, "type": "init_declarator", "text": "ow = getWidth(original)", "parent": 1122, "children": [1125, 1126, 1127], "start_point": {"row": 216, "column": 6}, "end_point": {"row": 216, "column": 29}}, {"id": 1125, "type": "identifier", "text": "ow", "parent": 1124, "children": [], "start_point": {"row": 216, "column": 6}, "end_point": {"row": 216, "column": 8}}, {"id": 1126, "type": "=", "text": "=", "parent": 1124, "children": [], "start_point": {"row": 216, "column": 9}, "end_point": {"row": 216, "column": 10}}, {"id": 1127, "type": "call_expression", "text": "getWidth(original)", "parent": 1124, "children": [1128, 1129], "start_point": {"row": 216, "column": 11}, "end_point": {"row": 216, "column": 29}}, {"id": 1128, "type": "identifier", "text": "getWidth", "parent": 1127, "children": [], "start_point": {"row": 216, "column": 11}, "end_point": {"row": 216, "column": 19}}, {"id": 1129, "type": "argument_list", "text": "(original)", "parent": 1127, "children": [1130], "start_point": {"row": 216, "column": 19}, "end_point": {"row": 216, "column": 29}}, {"id": 1130, "type": "identifier", "text": "original", "parent": 1129, "children": [], "start_point": {"row": 216, "column": 20}, "end_point": {"row": 216, "column": 28}}, {"id": 1131, "type": "init_declarator", "text": "oh = getHeight(original)", "parent": 1122, "children": [1132, 1133, 1134], "start_point": {"row": 216, "column": 31}, "end_point": {"row": 216, "column": 55}}, {"id": 1132, "type": "identifier", "text": "oh", "parent": 1131, "children": [], "start_point": {"row": 216, "column": 31}, "end_point": {"row": 216, "column": 33}}, {"id": 1133, "type": "=", "text": "=", "parent": 1131, "children": [], "start_point": {"row": 216, "column": 34}, "end_point": {"row": 216, "column": 35}}, {"id": 1134, "type": "call_expression", "text": "getHeight(original)", "parent": 1131, "children": [1135, 1136], "start_point": {"row": 216, "column": 36}, "end_point": {"row": 216, "column": 55}}, {"id": 1135, "type": "identifier", "text": "getHeight", "parent": 1134, "children": [], "start_point": {"row": 216, "column": 36}, "end_point": {"row": 216, "column": 45}}, {"id": 1136, "type": "argument_list", "text": "(original)", "parent": 1134, "children": [1137], "start_point": {"row": 216, "column": 45}, "end_point": {"row": 216, "column": 55}}, {"id": 1137, "type": "identifier", "text": "original", "parent": 1136, "children": [], "start_point": {"row": 216, "column": 46}, "end_point": {"row": 216, "column": 54}}, {"id": 1138, "type": "call_expression", "text": "allocate(mirror, ow, oh, mirrorCvImageType)", "parent": 33, "children": [1139, 1140], "start_point": {"row": 217, "column": 2}, "end_point": {"row": 217, "column": 45}}, {"id": 1139, "type": "identifier", "text": "allocate", "parent": 1138, "children": [], "start_point": {"row": 217, "column": 2}, "end_point": {"row": 217, "column": 10}}, {"id": 1140, "type": "argument_list", "text": "(mirror, ow, oh, mirrorCvImageType)", "parent": 1138, "children": [1141, 1142, 1143, 1144], "start_point": {"row": 217, "column": 10}, "end_point": {"row": 217, "column": 45}}, {"id": 1141, "type": "identifier", "text": "mirror", "parent": 1140, "children": [], "start_point": {"row": 217, "column": 11}, "end_point": {"row": 217, "column": 17}}, {"id": 1142, "type": "identifier", "text": "ow", "parent": 1140, "children": [], "start_point": {"row": 217, "column": 19}, "end_point": {"row": 217, "column": 21}}, {"id": 1143, "type": "identifier", "text": "oh", "parent": 1140, "children": [], "start_point": {"row": 217, "column": 23}, "end_point": {"row": 217, "column": 25}}, {"id": 1144, "type": "identifier", "text": "mirrorCvImageType", "parent": 1140, "children": [], "start_point": {"row": 217, "column": 27}, "end_point": {"row": 217, "column": 44}}, {"id": 1145, "type": "comma_expression", "text": "template <class M, class O> void imitate(M& mirror, const O& original) {\n\t\timitate(mirror, original, getCvImageType(original))", "parent": 33, "children": [1146, 1149, 1151], "start_point": {"row": 221, "column": 1}, "end_point": {"row": 222, "column": 53}}, {"id": 1146, "type": "binary_expression", "text": "template <class", "parent": 1145, "children": [1147, 1148], "start_point": {"row": 221, "column": 1}, "end_point": {"row": 221, "column": 16}}, {"id": 1147, "type": "identifier", "text": "template", "parent": 1146, "children": [], "start_point": {"row": 221, "column": 1}, "end_point": {"row": 221, "column": 9}}, {"id": 1148, "type": "<", "text": "<", "parent": 1146, "children": [], "start_point": {"row": 221, "column": 10}, "end_point": {"row": 221, "column": 11}}, {"id": 1149, "type": "ERROR", "text": "M", "parent": 1145, "children": [1150], "start_point": {"row": 221, "column": 17}, "end_point": {"row": 221, "column": 18}}, {"id": 1150, "type": "identifier", "text": "M", "parent": 1149, "children": [], "start_point": {"row": 221, "column": 17}, "end_point": {"row": 221, "column": 18}}, {"id": 1151, "type": "binary_expression", "text": "class O> void imitate(M& mirror, const O& original) {\n\t\timitate(mirror, original, getCvImageType(original))", "parent": 1145, "children": [1152, 1154, 1155, 1167], "start_point": {"row": 221, "column": 20}, "end_point": {"row": 222, "column": 53}}, {"id": 1152, "type": "ERROR", "text": "O", "parent": 1151, "children": [1153], "start_point": {"row": 221, "column": 26}, "end_point": {"row": 221, "column": 27}}, {"id": 1153, "type": "identifier", "text": "O", "parent": 1152, "children": [], "start_point": {"row": 221, "column": 26}, "end_point": {"row": 221, "column": 27}}, {"id": 1154, "type": ">", "text": ">", "parent": 1151, "children": [], "start_point": {"row": 221, "column": 27}, "end_point": {"row": 221, "column": 28}}, {"id": 1155, "type": "ERROR", "text": "void imitate(M& mirror, const O& original) {", "parent": 1151, "children": [1156, 1157], "start_point": {"row": 221, "column": 29}, "end_point": {"row": 221, "column": 73}}, {"id": 1156, "type": "identifier", "text": "void", "parent": 1155, "children": [], "start_point": {"row": 221, "column": 29}, "end_point": {"row": 221, "column": 33}}, {"id": 1157, "type": "call_expression", "text": "imitate(M& mirror, const O& original)", "parent": 1155, "children": [1158, 1159], "start_point": {"row": 221, "column": 34}, "end_point": {"row": 221, "column": 71}}, {"id": 1158, "type": "identifier", "text": "imitate", "parent": 1157, "children": [], "start_point": {"row": 221, "column": 34}, "end_point": {"row": 221, "column": 41}}, {"id": 1159, "type": "argument_list", "text": "(M& mirror, const O& original)", "parent": 1157, "children": [1160, 1163], "start_point": {"row": 221, "column": 41}, "end_point": {"row": 221, "column": 71}}, {"id": 1160, "type": "binary_expression", "text": "M& mirror", "parent": 1159, "children": [1161, 1162], "start_point": {"row": 221, "column": 42}, "end_point": {"row": 221, "column": 51}}, {"id": 1161, "type": "identifier", "text": "M", "parent": 1160, "children": [], "start_point": {"row": 221, "column": 42}, "end_point": {"row": 221, "column": 43}}, {"id": 1162, "type": "identifier", "text": "mirror", "parent": 1160, "children": [], "start_point": {"row": 221, "column": 45}, "end_point": {"row": 221, "column": 51}}, {"id": 1163, "type": "binary_expression", "text": "const O& original", "parent": 1159, "children": [1164, 1166], "start_point": {"row": 221, "column": 53}, "end_point": {"row": 221, "column": 70}}, {"id": 1164, "type": "ERROR", "text": "O", "parent": 1163, "children": [1165], "start_point": {"row": 221, "column": 59}, "end_point": {"row": 221, "column": 60}}, {"id": 1165, "type": "identifier", "text": "O", "parent": 1164, "children": [], "start_point": {"row": 221, "column": 59}, "end_point": {"row": 221, "column": 60}}, {"id": 1166, "type": "identifier", "text": "original", "parent": 1163, "children": [], "start_point": {"row": 221, "column": 62}, "end_point": {"row": 221, "column": 70}}, {"id": 1167, "type": "call_expression", "text": "imitate(mirror, original, getCvImageType(original))", "parent": 1151, "children": [1168, 1169], "start_point": {"row": 222, "column": 2}, "end_point": {"row": 222, "column": 53}}, {"id": 1168, "type": "identifier", "text": "imitate", "parent": 1167, "children": [], "start_point": {"row": 222, "column": 2}, "end_point": {"row": 222, "column": 9}}, {"id": 1169, "type": "argument_list", "text": "(mirror, original, getCvImageType(original))", "parent": 1167, "children": [1170, 1171, 1172], "start_point": {"row": 222, "column": 9}, "end_point": {"row": 222, "column": 53}}, {"id": 1170, "type": "identifier", "text": "mirror", "parent": 1169, "children": [], "start_point": {"row": 222, "column": 10}, "end_point": {"row": 222, "column": 16}}, {"id": 1171, "type": "identifier", "text": "original", "parent": 1169, "children": [], "start_point": {"row": 222, "column": 18}, "end_point": {"row": 222, "column": 26}}, {"id": 1172, "type": "call_expression", "text": "getCvImageType(original)", "parent": 1169, "children": [1173, 1174], "start_point": {"row": 222, "column": 28}, "end_point": {"row": 222, "column": 52}}, {"id": 1173, "type": "identifier", "text": "getCvImageType", "parent": 1172, "children": [], "start_point": {"row": 222, "column": 28}, "end_point": {"row": 222, "column": 42}}, {"id": 1174, "type": "argument_list", "text": "(original)", "parent": 1172, "children": [1175], "start_point": {"row": 222, "column": 42}, "end_point": {"row": 222, "column": 52}}, {"id": 1175, "type": "identifier", "text": "original", "parent": 1174, "children": [], "start_point": {"row": 222, "column": 43}, "end_point": {"row": 222, "column": 51}}, {"id": 1176, "type": "declaration", "text": "float getMaxVal(int cvDepth);", "parent": null, "children": [1177, 1178], "start_point": {"row": 226, "column": 1}, "end_point": {"row": 226, "column": 30}}, {"id": 1177, "type": "primitive_type", "text": "float", "parent": 1176, "children": [], "start_point": {"row": 226, "column": 1}, "end_point": {"row": 226, "column": 6}}, {"id": 1178, "type": "function_declarator", "text": "getMaxVal(int cvDepth)", "parent": 1176, "children": [1179, 1180], "start_point": {"row": 226, "column": 7}, "end_point": {"row": 226, "column": 29}}, {"id": 1179, "type": "identifier", "text": "getMaxVal", "parent": 1178, "children": [], "start_point": {"row": 226, "column": 7}, "end_point": {"row": 226, "column": 16}}, {"id": 1180, "type": "parameter_list", "text": "(int cvDepth)", "parent": 1178, "children": [1181], "start_point": {"row": 226, "column": 16}, "end_point": {"row": 226, "column": 29}}, {"id": 1181, "type": "parameter_declaration", "text": "int cvDepth", "parent": 1180, "children": [1182, 1183], "start_point": {"row": 226, "column": 17}, "end_point": {"row": 226, "column": 28}}, {"id": 1182, "type": "primitive_type", "text": "int", "parent": 1181, "children": [], "start_point": {"row": 226, "column": 17}, "end_point": {"row": 226, "column": 20}}, {"id": 1183, "type": "identifier", "text": "cvDepth", "parent": 1181, "children": [], "start_point": {"row": 226, "column": 21}, "end_point": {"row": 226, "column": 28}}, {"id": 1184, "type": "declaration", "text": "float getMaxVal(const cv::Mat& mat);", "parent": null, "children": [1185, 1186], "start_point": {"row": 227, "column": 1}, "end_point": {"row": 227, "column": 37}}, {"id": 1185, "type": "primitive_type", "text": "float", "parent": 1184, "children": [], "start_point": {"row": 227, "column": 1}, "end_point": {"row": 227, "column": 6}}, {"id": 1186, "type": "function_declarator", "text": "getMaxVal(const cv::Mat& mat)", "parent": 1184, "children": [1187, 1188], "start_point": {"row": 227, "column": 7}, "end_point": {"row": 227, "column": 36}}, {"id": 1187, "type": "identifier", "text": "getMaxVal", "parent": 1186, "children": [], "start_point": {"row": 227, "column": 7}, "end_point": {"row": 227, "column": 16}}, {"id": 1188, "type": "parameter_list", "text": "(const cv::Mat& mat)", "parent": 1186, "children": [1189], "start_point": {"row": 227, "column": 16}, "end_point": {"row": 227, "column": 36}}, {"id": 1189, "type": "parameter_declaration", "text": "const cv::Mat& mat", "parent": 1188, "children": [1190, 1191, 1193], "start_point": {"row": 227, "column": 17}, "end_point": {"row": 227, "column": 35}}, {"id": 1190, "type": "type_identifier", "text": "cv", "parent": 1189, "children": [], "start_point": {"row": 227, "column": 23}, "end_point": {"row": 227, "column": 25}}, {"id": 1191, "type": "ERROR", "text": "::Mat&", "parent": 1189, "children": [1192], "start_point": {"row": 227, "column": 25}, "end_point": {"row": 227, "column": 31}}, {"id": 1192, "type": "identifier", "text": "Mat", "parent": 1191, "children": [], "start_point": {"row": 227, "column": 27}, "end_point": {"row": 227, "column": 30}}, {"id": 1193, "type": "identifier", "text": "mat", "parent": 1189, "children": [], "start_point": {"row": 227, "column": 32}, "end_point": {"row": 227, "column": 35}}, {"id": 1194, "type": "declaration", "text": "int getTargetChannelsFromCode(int conversionCode);", "parent": null, "children": [1195, 1196], "start_point": {"row": 228, "column": 1}, "end_point": {"row": 228, "column": 51}}, {"id": 1195, "type": "primitive_type", "text": "int", "parent": 1194, "children": [], "start_point": {"row": 228, "column": 1}, "end_point": {"row": 228, "column": 4}}, {"id": 1196, "type": "function_declarator", "text": "getTargetChannelsFromCode(int conversionCode)", "parent": 1194, "children": [1197, 1198], "start_point": {"row": 228, "column": 5}, "end_point": {"row": 228, "column": 50}}, {"id": 1197, "type": "identifier", "text": "getTargetChannelsFromCode", "parent": 1196, "children": [], "start_point": {"row": 228, "column": 5}, "end_point": {"row": 228, "column": 30}}, {"id": 1198, "type": "parameter_list", "text": "(int conversionCode)", "parent": 1196, "children": [1199], "start_point": {"row": 228, "column": 30}, "end_point": {"row": 228, "column": 50}}, {"id": 1199, "type": "parameter_declaration", "text": "int conversionCode", "parent": 1198, "children": [1200, 1201], "start_point": {"row": 228, "column": 31}, "end_point": {"row": 228, "column": 49}}, {"id": 1200, "type": "primitive_type", "text": "int", "parent": 1199, "children": [], "start_point": {"row": 228, "column": 31}, "end_point": {"row": 228, "column": 34}}, {"id": 1201, "type": "identifier", "text": "conversionCode", "parent": 1199, "children": [], "start_point": {"row": 228, "column": 35}, "end_point": {"row": 228, "column": 49}}, {"id": 1202, "type": "labeled_statement", "text": "cv::Mat toCv(cv::Mat& mat);", "parent": null, "children": [1203, 1204], "start_point": {"row": 240, "column": 4}, "end_point": {"row": 240, "column": 31}}, {"id": 1203, "type": "statement_identifier", "text": "cv", "parent": 1202, "children": [], "start_point": {"row": 240, "column": 4}, "end_point": {"row": 240, "column": 6}}, {"id": 1204, "type": "ERROR", "text": "::Mat toCv(cv:", "parent": 1202, "children": [1205, 1206, 1207], "start_point": {"row": 240, "column": 6}, "end_point": {"row": 240, "column": 20}}, {"id": 1205, "type": "type_identifier", "text": "Mat", "parent": 1204, "children": [], "start_point": {"row": 240, "column": 8}, "end_point": {"row": 240, "column": 11}}, {"id": 1206, "type": "identifier", "text": "toCv", "parent": 1204, "children": [], "start_point": {"row": 240, "column": 12}, "end_point": {"row": 240, "column": 16}}, {"id": 1207, "type": "type_identifier", "text": "cv", "parent": 1204, "children": [], "start_point": {"row": 240, "column": 17}, "end_point": {"row": 240, "column": 19}}, {"id": 1208, "type": "binary_expression", "text": "Mat& mat", "parent": 1202, "children": [1209, 1210], "start_point": {"row": 240, "column": 21}, "end_point": {"row": 240, "column": 29}}, {"id": 1209, "type": "identifier", "text": "Mat", "parent": 1208, "children": [], "start_point": {"row": 240, "column": 21}, "end_point": {"row": 240, "column": 24}}, {"id": 1210, "type": "identifier", "text": "mat", "parent": 1208, "children": [], "start_point": {"row": 240, "column": 26}, "end_point": {"row": 240, "column": 29}}, {"id": 1211, "type": "labeled_statement", "text": "cv::Mat toCv(const cv::Mat& mat);", "parent": null, "children": [1212, 1213], "start_point": {"row": 241, "column": 4}, "end_point": {"row": 241, "column": 37}}, {"id": 1212, "type": "statement_identifier", "text": "cv", "parent": 1211, "children": [], "start_point": {"row": 241, "column": 4}, "end_point": {"row": 241, "column": 6}}, {"id": 1213, "type": "ERROR", "text": "::Mat toCv(const cv:", "parent": 1211, "children": [1214, 1215, 1216], "start_point": {"row": 241, "column": 6}, "end_point": {"row": 241, "column": 26}}, {"id": 1214, "type": "type_identifier", "text": "Mat", "parent": 1213, "children": [], "start_point": {"row": 241, "column": 8}, "end_point": {"row": 241, "column": 11}}, {"id": 1215, "type": "identifier", "text": "toCv", "parent": 1213, "children": [], "start_point": {"row": 241, "column": 12}, "end_point": {"row": 241, "column": 16}}, {"id": 1216, "type": "type_identifier", "text": "cv", "parent": 1213, "children": [], "start_point": {"row": 241, "column": 23}, "end_point": {"row": 241, "column": 25}}, {"id": 1217, "type": "binary_expression", "text": "Mat& mat", "parent": 1211, "children": [1218, 1219], "start_point": {"row": 241, "column": 27}, "end_point": {"row": 241, "column": 35}}, {"id": 1218, "type": "identifier", "text": "Mat", "parent": 1217, "children": [], "start_point": {"row": 241, "column": 27}, "end_point": {"row": 241, "column": 30}}, {"id": 1219, "type": "identifier", "text": "mat", "parent": 1217, "children": [], "start_point": {"row": 241, "column": 32}, "end_point": {"row": 241, "column": 35}}, {"id": 1220, "type": "ERROR", "text": "template <class T> inline cv::Mat toCv(ofPixels_<T>& pix)", "parent": null, "children": [1221], "start_point": {"row": 243, "column": 1}, "end_point": {"row": 243, "column": 58}}, {"id": 1221, "type": "binary_expression", "text": "template <class T> inline cv::Mat toCv(ofPixels_<T>& pix)", "parent": 1220, "children": [1222, 1225, 1227, 1228, 1232], "start_point": {"row": 243, "column": 1}, "end_point": {"row": 243, "column": 58}}, {"id": 1222, "type": "binary_expression", "text": "template <class", "parent": 1221, "children": [1223, 1224], "start_point": {"row": 243, "column": 1}, "end_point": {"row": 243, "column": 16}}, {"id": 1223, "type": "identifier", "text": "template", "parent": 1222, "children": [], "start_point": {"row": 243, "column": 1}, "end_point": {"row": 243, "column": 9}}, {"id": 1224, "type": "<", "text": "<", "parent": 1222, "children": [], "start_point": {"row": 243, "column": 10}, "end_point": {"row": 243, "column": 11}}, {"id": 1225, "type": "ERROR", "text": "T", "parent": 1221, "children": [1226], "start_point": {"row": 243, "column": 17}, "end_point": {"row": 243, "column": 18}}, {"id": 1226, "type": "identifier", "text": "T", "parent": 1225, "children": [], "start_point": {"row": 243, "column": 17}, "end_point": {"row": 243, "column": 18}}, {"id": 1227, "type": ">", "text": ">", "parent": 1221, "children": [], "start_point": {"row": 243, "column": 18}, "end_point": {"row": 243, "column": 19}}, {"id": 1228, "type": "ERROR", "text": "inline cv::Mat", "parent": 1221, "children": [1229, 1230, 1231], "start_point": {"row": 243, "column": 20}, "end_point": {"row": 243, "column": 34}}, {"id": 1229, "type": "identifier", "text": "inline", "parent": 1228, "children": [], "start_point": {"row": 243, "column": 20}, "end_point": {"row": 243, "column": 26}}, {"id": 1230, "type": "identifier", "text": "cv", "parent": 1228, "children": [], "start_point": {"row": 243, "column": 27}, "end_point": {"row": 243, "column": 29}}, {"id": 1231, "type": "identifier", "text": "Mat", "parent": 1228, "children": [], "start_point": {"row": 243, "column": 31}, "end_point": {"row": 243, "column": 34}}, {"id": 1232, "type": "call_expression", "text": "toCv(ofPixels_<T>& pix)", "parent": 1221, "children": [1233, 1234], "start_point": {"row": 243, "column": 35}, "end_point": {"row": 243, "column": 58}}, {"id": 1233, "type": "identifier", "text": "toCv", "parent": 1232, "children": [], "start_point": {"row": 243, "column": 35}, "end_point": {"row": 243, "column": 39}}, {"id": 1234, "type": "argument_list", "text": "(ofPixels_<T>& pix)", "parent": 1232, "children": [1235], "start_point": {"row": 243, "column": 39}, "end_point": {"row": 243, "column": 58}}, {"id": 1235, "type": "binary_expression", "text": "ofPixels_<T>& pix", "parent": 1234, "children": [1236, 1240, 1241], "start_point": {"row": 243, "column": 40}, "end_point": {"row": 243, "column": 57}}, {"id": 1236, "type": "binary_expression", "text": "ofPixels_<T", "parent": 1235, "children": [1237, 1238, 1239], "start_point": {"row": 243, "column": 40}, "end_point": {"row": 243, "column": 51}}, {"id": 1237, "type": "identifier", "text": "ofPixels_", "parent": 1236, "children": [], "start_point": {"row": 243, "column": 40}, "end_point": {"row": 243, "column": 49}}, {"id": 1238, "type": "<", "text": "<", "parent": 1236, "children": [], "start_point": {"row": 243, "column": 49}, "end_point": {"row": 243, "column": 50}}, {"id": 1239, "type": "identifier", "text": "T", "parent": 1236, "children": [], "start_point": {"row": 243, "column": 50}, "end_point": {"row": 243, "column": 51}}, {"id": 1240, "type": ">", "text": ">", "parent": 1235, "children": [], "start_point": {"row": 243, "column": 51}, "end_point": {"row": 243, "column": 52}}, {"id": 1241, "type": "pointer_expression", "text": "& pix", "parent": 1235, "children": [1242], "start_point": {"row": 243, "column": 52}, "end_point": {"row": 243, "column": 57}}, {"id": 1242, "type": "identifier", "text": "pix", "parent": 1241, "children": [], "start_point": {"row": 243, "column": 54}, "end_point": {"row": 243, "column": 57}}, {"id": 1243, "type": "return_statement", "text": "return cv::Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), pix.getData(), 0);", "parent": null, "children": [1244, 1246], "start_point": {"row": 244, "column": 2}, "end_point": {"row": 244, "column": 89}}, {"id": 1244, "type": "ERROR", "text": "cv::", "parent": 1243, "children": [1245], "start_point": {"row": 244, "column": 9}, "end_point": {"row": 244, "column": 13}}, {"id": 1245, "type": "identifier", "text": "cv", "parent": 1244, "children": [], "start_point": {"row": 244, "column": 9}, "end_point": {"row": 244, "column": 11}}, {"id": 1246, "type": "call_expression", "text": "Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), pix.getData(), 0)", "parent": 1243, "children": [1247, 1248], "start_point": {"row": 244, "column": 13}, "end_point": {"row": 244, "column": 88}}, {"id": 1247, "type": "identifier", "text": "Mat", "parent": 1246, "children": [], "start_point": {"row": 244, "column": 13}, "end_point": {"row": 244, "column": 16}}, {"id": 1248, "type": "argument_list", "text": "(pix.getHeight(), pix.getWidth(), getCvImageType(pix), pix.getData(), 0)", "parent": 1246, "children": [1249, 1254, 1259, 1263, 1268], "start_point": {"row": 244, "column": 16}, "end_point": {"row": 244, "column": 88}}, {"id": 1249, "type": "call_expression", "text": "pix.getHeight()", "parent": 1248, "children": [1250, 1253], "start_point": {"row": 244, "column": 17}, "end_point": {"row": 244, "column": 32}}, {"id": 1250, "type": "field_expression", "text": "pix.getHeight", "parent": 1249, "children": [1251, 1252], "start_point": {"row": 244, "column": 17}, "end_point": {"row": 244, "column": 30}}, {"id": 1251, "type": "identifier", "text": "pix", "parent": 1250, "children": [], "start_point": {"row": 244, "column": 17}, "end_point": {"row": 244, "column": 20}}, {"id": 1252, "type": "field_identifier", "text": "getHeight", "parent": 1250, "children": [], "start_point": {"row": 244, "column": 21}, "end_point": {"row": 244, "column": 30}}, {"id": 1253, "type": "argument_list", "text": "()", "parent": 1249, "children": [], "start_point": {"row": 244, "column": 30}, "end_point": {"row": 244, "column": 32}}, {"id": 1254, "type": "call_expression", "text": "pix.getWidth()", "parent": 1248, "children": [1255, 1258], "start_point": {"row": 244, "column": 34}, "end_point": {"row": 244, "column": 48}}, {"id": 1255, "type": "field_expression", "text": "pix.getWidth", "parent": 1254, "children": [1256, 1257], "start_point": {"row": 244, "column": 34}, "end_point": {"row": 244, "column": 46}}, {"id": 1256, "type": "identifier", "text": "pix", "parent": 1255, "children": [], "start_point": {"row": 244, "column": 34}, "end_point": {"row": 244, "column": 37}}, {"id": 1257, "type": "field_identifier", "text": "getWidth", "parent": 1255, "children": [], "start_point": {"row": 244, "column": 38}, "end_point": {"row": 244, "column": 46}}, {"id": 1258, "type": "argument_list", "text": "()", "parent": 1254, "children": [], "start_point": {"row": 244, "column": 46}, "end_point": {"row": 244, "column": 48}}, {"id": 1259, "type": "call_expression", "text": "getCvImageType(pix)", "parent": 1248, "children": [1260, 1261], "start_point": {"row": 244, "column": 50}, "end_point": {"row": 244, "column": 69}}, {"id": 1260, "type": "identifier", "text": "getCvImageType", "parent": 1259, "children": [], "start_point": {"row": 244, "column": 50}, "end_point": {"row": 244, "column": 64}}, {"id": 1261, "type": "argument_list", "text": "(pix)", "parent": 1259, "children": [1262], "start_point": {"row": 244, "column": 64}, "end_point": {"row": 244, "column": 69}}, {"id": 1262, "type": "identifier", "text": "pix", "parent": 1261, "children": [], "start_point": {"row": 244, "column": 65}, "end_point": {"row": 244, "column": 68}}, {"id": 1263, "type": "call_expression", "text": "pix.getData()", "parent": 1248, "children": [1264, 1267], "start_point": {"row": 244, "column": 71}, "end_point": {"row": 244, "column": 84}}, {"id": 1264, "type": "field_expression", "text": "pix.getData", "parent": 1263, "children": [1265, 1266], "start_point": {"row": 244, "column": 71}, "end_point": {"row": 244, "column": 82}}, {"id": 1265, "type": "identifier", "text": "pix", "parent": 1264, "children": [], "start_point": {"row": 244, "column": 71}, "end_point": {"row": 244, "column": 74}}, {"id": 1266, "type": "field_identifier", "text": "getData", "parent": 1264, "children": [], "start_point": {"row": 244, "column": 75}, "end_point": {"row": 244, "column": 82}}, {"id": 1267, "type": "argument_list", "text": "()", "parent": 1263, "children": [], "start_point": {"row": 244, "column": 82}, "end_point": {"row": 244, "column": 84}}, {"id": 1268, "type": "number_literal", "text": "0", "parent": 1248, "children": [], "start_point": {"row": 244, "column": 86}, "end_point": {"row": 244, "column": 87}}, {"id": 1269, "type": "ERROR", "text": "template <class T> inline cv::Mat toCv(const ofPixels_<T>& pix)", "parent": null, "children": [1270], "start_point": {"row": 247, "column": 4}, "end_point": {"row": 247, "column": 67}}, {"id": 1270, "type": "binary_expression", "text": "template <class T> inline cv::Mat toCv(const ofPixels_<T>& pix)", "parent": 1269, "children": [1271, 1274, 1276, 1277, 1281], "start_point": {"row": 247, "column": 4}, "end_point": {"row": 247, "column": 67}}, {"id": 1271, "type": "binary_expression", "text": "template <class", "parent": 1270, "children": [1272, 1273], "start_point": {"row": 247, "column": 4}, "end_point": {"row": 247, "column": 19}}, {"id": 1272, "type": "identifier", "text": "template", "parent": 1271, "children": [], "start_point": {"row": 247, "column": 4}, "end_point": {"row": 247, "column": 12}}, {"id": 1273, "type": "<", "text": "<", "parent": 1271, "children": [], "start_point": {"row": 247, "column": 13}, "end_point": {"row": 247, "column": 14}}, {"id": 1274, "type": "ERROR", "text": "T", "parent": 1270, "children": [1275], "start_point": {"row": 247, "column": 20}, "end_point": {"row": 247, "column": 21}}, {"id": 1275, "type": "identifier", "text": "T", "parent": 1274, "children": [], "start_point": {"row": 247, "column": 20}, "end_point": {"row": 247, "column": 21}}, {"id": 1276, "type": ">", "text": ">", "parent": 1270, "children": [], "start_point": {"row": 247, "column": 21}, "end_point": {"row": 247, "column": 22}}, {"id": 1277, "type": "ERROR", "text": "inline cv::Mat", "parent": 1270, "children": [1278, 1279, 1280], "start_point": {"row": 247, "column": 23}, "end_point": {"row": 247, "column": 37}}, {"id": 1278, "type": "identifier", "text": "inline", "parent": 1277, "children": [], "start_point": {"row": 247, "column": 23}, "end_point": {"row": 247, "column": 29}}, {"id": 1279, "type": "identifier", "text": "cv", "parent": 1277, "children": [], "start_point": {"row": 247, "column": 30}, "end_point": {"row": 247, "column": 32}}, {"id": 1280, "type": "identifier", "text": "Mat", "parent": 1277, "children": [], "start_point": {"row": 247, "column": 34}, "end_point": {"row": 247, "column": 37}}, {"id": 1281, "type": "call_expression", "text": "toCv(const ofPixels_<T>& pix)", "parent": 1270, "children": [1282, 1283], "start_point": {"row": 247, "column": 38}, "end_point": {"row": 247, "column": 67}}, {"id": 1282, "type": "identifier", "text": "toCv", "parent": 1281, "children": [], "start_point": {"row": 247, "column": 38}, "end_point": {"row": 247, "column": 42}}, {"id": 1283, "type": "argument_list", "text": "(const ofPixels_<T>& pix)", "parent": 1281, "children": [1284], "start_point": {"row": 247, "column": 42}, "end_point": {"row": 247, "column": 67}}, {"id": 1284, "type": "binary_expression", "text": "ofPixels_<T>& pix", "parent": 1283, "children": [1285, 1289, 1290], "start_point": {"row": 247, "column": 49}, "end_point": {"row": 247, "column": 66}}, {"id": 1285, "type": "binary_expression", "text": "ofPixels_<T", "parent": 1284, "children": [1286, 1287, 1288], "start_point": {"row": 247, "column": 49}, "end_point": {"row": 247, "column": 60}}, {"id": 1286, "type": "identifier", "text": "ofPixels_", "parent": 1285, "children": [], "start_point": {"row": 247, "column": 49}, "end_point": {"row": 247, "column": 58}}, {"id": 1287, "type": "<", "text": "<", "parent": 1285, "children": [], "start_point": {"row": 247, "column": 58}, "end_point": {"row": 247, "column": 59}}, {"id": 1288, "type": "identifier", "text": "T", "parent": 1285, "children": [], "start_point": {"row": 247, "column": 59}, "end_point": {"row": 247, "column": 60}}, {"id": 1289, "type": ">", "text": ">", "parent": 1284, "children": [], "start_point": {"row": 247, "column": 60}, "end_point": {"row": 247, "column": 61}}, {"id": 1290, "type": "pointer_expression", "text": "& pix", "parent": 1284, "children": [1291], "start_point": {"row": 247, "column": 61}, "end_point": {"row": 247, "column": 66}}, {"id": 1291, "type": "identifier", "text": "pix", "parent": 1290, "children": [], "start_point": {"row": 247, "column": 63}, "end_point": {"row": 247, "column": 66}}, {"id": 1292, "type": "return_statement", "text": "return cv::Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0).clone();", "parent": null, "children": [1293, 1295], "start_point": {"row": 248, "column": 8}, "end_point": {"row": 248, "column": 119}}, {"id": 1293, "type": "ERROR", "text": "cv::", "parent": 1292, "children": [1294], "start_point": {"row": 248, "column": 15}, "end_point": {"row": 248, "column": 19}}, {"id": 1294, "type": "identifier", "text": "cv", "parent": 1293, "children": [], "start_point": {"row": 248, "column": 15}, "end_point": {"row": 248, "column": 17}}, {"id": 1295, "type": "call_expression", "text": "Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0).clone()", "parent": 1292, "children": [1296, 1330], "start_point": {"row": 248, "column": 19}, "end_point": {"row": 248, "column": 118}}, {"id": 1296, "type": "field_expression", "text": "Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0).clone", "parent": 1295, "children": [1297, 1329], "start_point": {"row": 248, "column": 19}, "end_point": {"row": 248, "column": 116}}, {"id": 1297, "type": "call_expression", "text": "Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0)", "parent": 1296, "children": [1298, 1299], "start_point": {"row": 248, "column": 19}, "end_point": {"row": 248, "column": 110}}, {"id": 1298, "type": "identifier", "text": "Mat", "parent": 1297, "children": [], "start_point": {"row": 248, "column": 19}, "end_point": {"row": 248, "column": 22}}, {"id": 1299, "type": "argument_list", "text": "(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0)", "parent": 1297, "children": [1300, 1305, 1310, 1314, 1328], "start_point": {"row": 248, "column": 22}, "end_point": {"row": 248, "column": 110}}, {"id": 1300, "type": "call_expression", "text": "pix.getHeight()", "parent": 1299, "children": [1301, 1304], "start_point": {"row": 248, "column": 23}, "end_point": {"row": 248, "column": 38}}, {"id": 1301, "type": "field_expression", "text": "pix.getHeight", "parent": 1300, "children": [1302, 1303], "start_point": {"row": 248, "column": 23}, "end_point": {"row": 248, "column": 36}}, {"id": 1302, "type": "identifier", "text": "pix", "parent": 1301, "children": [], "start_point": {"row": 248, "column": 23}, "end_point": {"row": 248, "column": 26}}, {"id": 1303, "type": "field_identifier", "text": "getHeight", "parent": 1301, "children": [], "start_point": {"row": 248, "column": 27}, "end_point": {"row": 248, "column": 36}}, {"id": 1304, "type": "argument_list", "text": "()", "parent": 1300, "children": [], "start_point": {"row": 248, "column": 36}, "end_point": {"row": 248, "column": 38}}, {"id": 1305, "type": "call_expression", "text": "pix.getWidth()", "parent": 1299, "children": [1306, 1309], "start_point": {"row": 248, "column": 40}, "end_point": {"row": 248, "column": 54}}, {"id": 1306, "type": "field_expression", "text": "pix.getWidth", "parent": 1305, "children": [1307, 1308], "start_point": {"row": 248, "column": 40}, "end_point": {"row": 248, "column": 52}}, {"id": 1307, "type": "identifier", "text": "pix", "parent": 1306, "children": [], "start_point": {"row": 248, "column": 40}, "end_point": {"row": 248, "column": 43}}, {"id": 1308, "type": "field_identifier", "text": "getWidth", "parent": 1306, "children": [], "start_point": {"row": 248, "column": 44}, "end_point": {"row": 248, "column": 52}}, {"id": 1309, "type": "argument_list", "text": "()", "parent": 1305, "children": [], "start_point": {"row": 248, "column": 52}, "end_point": {"row": 248, "column": 54}}, {"id": 1310, "type": "call_expression", "text": "getCvImageType(pix)", "parent": 1299, "children": [1311, 1312], "start_point": {"row": 248, "column": 56}, "end_point": {"row": 248, "column": 75}}, {"id": 1311, "type": "identifier", "text": "getCvImageType", "parent": 1310, "children": [], "start_point": {"row": 248, "column": 56}, "end_point": {"row": 248, "column": 70}}, {"id": 1312, "type": "argument_list", "text": "(pix)", "parent": 1310, "children": [1313], "start_point": {"row": 248, "column": 70}, "end_point": {"row": 248, "column": 75}}, {"id": 1313, "type": "identifier", "text": "pix", "parent": 1312, "children": [], "start_point": {"row": 248, "column": 71}, "end_point": {"row": 248, "column": 74}}, {"id": 1314, "type": "binary_expression", "text": "const_cast<T*>(pix.getData())", "parent": 1299, "children": [1315, 1319, 1321, 1322], "start_point": {"row": 248, "column": 77}, "end_point": {"row": 248, "column": 106}}, {"id": 1315, "type": "binary_expression", "text": "const_cast<T", "parent": 1314, "children": [1316, 1317, 1318], "start_point": {"row": 248, "column": 77}, "end_point": {"row": 248, "column": 89}}, {"id": 1316, "type": "identifier", "text": "const_cast", "parent": 1315, "children": [], "start_point": {"row": 248, "column": 77}, "end_point": {"row": 248, "column": 87}}, {"id": 1317, "type": "<", "text": "<", "parent": 1315, "children": [], "start_point": {"row": 248, "column": 87}, "end_point": {"row": 248, "column": 88}}, {"id": 1318, "type": "identifier", "text": "T", "parent": 1315, "children": [], "start_point": {"row": 248, "column": 88}, "end_point": {"row": 248, "column": 89}}, {"id": 1319, "type": "ERROR", "text": "*", "parent": 1314, "children": [1320], "start_point": {"row": 248, "column": 89}, "end_point": {"row": 248, "column": 90}}, {"id": 1320, "type": "*", "text": "*", "parent": 1319, "children": [], "start_point": {"row": 248, "column": 89}, "end_point": {"row": 248, "column": 90}}, {"id": 1321, "type": ">", "text": ">", "parent": 1314, "children": [], "start_point": {"row": 248, "column": 90}, "end_point": {"row": 248, "column": 91}}, {"id": 1322, "type": "parenthesized_expression", "text": "(pix.getData())", "parent": 1314, "children": [1323], "start_point": {"row": 248, "column": 91}, "end_point": {"row": 248, "column": 106}}, {"id": 1323, "type": "call_expression", "text": "pix.getData()", "parent": 1322, "children": [1324, 1327], "start_point": {"row": 248, "column": 92}, "end_point": {"row": 248, "column": 105}}, {"id": 1324, "type": "field_expression", "text": "pix.getData", "parent": 1323, "children": [1325, 1326], "start_point": {"row": 248, "column": 92}, "end_point": {"row": 248, "column": 103}}, {"id": 1325, "type": "identifier", "text": "pix", "parent": 1324, "children": [], "start_point": {"row": 248, "column": 92}, "end_point": {"row": 248, "column": 95}}, {"id": 1326, "type": "field_identifier", "text": "getData", "parent": 1324, "children": [], "start_point": {"row": 248, "column": 96}, "end_point": {"row": 248, "column": 103}}, {"id": 1327, "type": "argument_list", "text": "()", "parent": 1323, "children": [], "start_point": {"row": 248, "column": 103}, "end_point": {"row": 248, "column": 105}}, {"id": 1328, "type": "number_literal", "text": "0", "parent": 1299, "children": [], "start_point": {"row": 248, "column": 108}, "end_point": {"row": 248, "column": 109}}, {"id": 1329, "type": "field_identifier", "text": "clone", "parent": 1296, "children": [], "start_point": {"row": 248, "column": 111}, "end_point": {"row": 248, "column": 116}}, {"id": 1330, "type": "argument_list", "text": "()", "parent": 1295, "children": [], "start_point": {"row": 248, "column": 116}, "end_point": {"row": 248, "column": 118}}, {"id": 1331, "type": "ERROR", "text": "template <class T> inline cv::Mat toCv(ofBaseHasPixels_<T>& img)", "parent": null, "children": [1332], "start_point": {"row": 251, "column": 1}, "end_point": {"row": 251, "column": 65}}, {"id": 1332, "type": "binary_expression", "text": "template <class T> inline cv::Mat toCv(ofBaseHasPixels_<T>& img)", "parent": 1331, "children": [1333, 1336, 1338, 1339, 1343], "start_point": {"row": 251, "column": 1}, "end_point": {"row": 251, "column": 65}}, {"id": 1333, "type": "binary_expression", "text": "template <class", "parent": 1332, "children": [1334, 1335], "start_point": {"row": 251, "column": 1}, "end_point": {"row": 251, "column": 16}}, {"id": 1334, "type": "identifier", "text": "template", "parent": 1333, "children": [], "start_point": {"row": 251, "column": 1}, "end_point": {"row": 251, "column": 9}}, {"id": 1335, "type": "<", "text": "<", "parent": 1333, "children": [], "start_point": {"row": 251, "column": 10}, "end_point": {"row": 251, "column": 11}}, {"id": 1336, "type": "ERROR", "text": "T", "parent": 1332, "children": [1337], "start_point": {"row": 251, "column": 17}, "end_point": {"row": 251, "column": 18}}, {"id": 1337, "type": "identifier", "text": "T", "parent": 1336, "children": [], "start_point": {"row": 251, "column": 17}, "end_point": {"row": 251, "column": 18}}, {"id": 1338, "type": ">", "text": ">", "parent": 1332, "children": [], "start_point": {"row": 251, "column": 18}, "end_point": {"row": 251, "column": 19}}, {"id": 1339, "type": "ERROR", "text": "inline cv::Mat", "parent": 1332, "children": [1340, 1341, 1342], "start_point": {"row": 251, "column": 20}, "end_point": {"row": 251, "column": 34}}, {"id": 1340, "type": "identifier", "text": "inline", "parent": 1339, "children": [], "start_point": {"row": 251, "column": 20}, "end_point": {"row": 251, "column": 26}}, {"id": 1341, "type": "identifier", "text": "cv", "parent": 1339, "children": [], "start_point": {"row": 251, "column": 27}, "end_point": {"row": 251, "column": 29}}, {"id": 1342, "type": "identifier", "text": "Mat", "parent": 1339, "children": [], "start_point": {"row": 251, "column": 31}, "end_point": {"row": 251, "column": 34}}, {"id": 1343, "type": "call_expression", "text": "toCv(ofBaseHasPixels_<T>& img)", "parent": 1332, "children": [1344, 1345], "start_point": {"row": 251, "column": 35}, "end_point": {"row": 251, "column": 65}}, {"id": 1344, "type": "identifier", "text": "toCv", "parent": 1343, "children": [], "start_point": {"row": 251, "column": 35}, "end_point": {"row": 251, "column": 39}}, {"id": 1345, "type": "argument_list", "text": "(ofBaseHasPixels_<T>& img)", "parent": 1343, "children": [1346], "start_point": {"row": 251, "column": 39}, "end_point": {"row": 251, "column": 65}}, {"id": 1346, "type": "binary_expression", "text": "ofBaseHasPixels_<T>& img", "parent": 1345, "children": [1347, 1351, 1352], "start_point": {"row": 251, "column": 40}, "end_point": {"row": 251, "column": 64}}, {"id": 1347, "type": "binary_expression", "text": "ofBaseHasPixels_<T", "parent": 1346, "children": [1348, 1349, 1350], "start_point": {"row": 251, "column": 40}, "end_point": {"row": 251, "column": 58}}, {"id": 1348, "type": "identifier", "text": "ofBaseHasPixels_", "parent": 1347, "children": [], "start_point": {"row": 251, "column": 40}, "end_point": {"row": 251, "column": 56}}, {"id": 1349, "type": "<", "text": "<", "parent": 1347, "children": [], "start_point": {"row": 251, "column": 56}, "end_point": {"row": 251, "column": 57}}, {"id": 1350, "type": "identifier", "text": "T", "parent": 1347, "children": [], "start_point": {"row": 251, "column": 57}, "end_point": {"row": 251, "column": 58}}, {"id": 1351, "type": ">", "text": ">", "parent": 1346, "children": [], "start_point": {"row": 251, "column": 58}, "end_point": {"row": 251, "column": 59}}, {"id": 1352, "type": "pointer_expression", "text": "& img", "parent": 1346, "children": [1353], "start_point": {"row": 251, "column": 59}, "end_point": {"row": 251, "column": 64}}, {"id": 1353, "type": "identifier", "text": "img", "parent": 1352, "children": [], "start_point": {"row": 251, "column": 61}, "end_point": {"row": 251, "column": 64}}, {"id": 1354, "type": "return_statement", "text": "return toCv(img.getPixels());", "parent": null, "children": [1355], "start_point": {"row": 252, "column": 2}, "end_point": {"row": 252, "column": 31}}, {"id": 1355, "type": "call_expression", "text": "toCv(img.getPixels())", "parent": 1354, "children": [1356, 1357], "start_point": {"row": 252, "column": 9}, "end_point": {"row": 252, "column": 30}}, {"id": 1356, "type": "identifier", "text": "toCv", "parent": 1355, "children": [], "start_point": {"row": 252, "column": 9}, "end_point": {"row": 252, "column": 13}}, {"id": 1357, "type": "argument_list", "text": "(img.getPixels())", "parent": 1355, "children": [1358], "start_point": {"row": 252, "column": 13}, "end_point": {"row": 252, "column": 30}}, {"id": 1358, "type": "call_expression", "text": "img.getPixels()", "parent": 1357, "children": [1359, 1362], "start_point": {"row": 252, "column": 14}, "end_point": {"row": 252, "column": 29}}, {"id": 1359, "type": "field_expression", "text": "img.getPixels", "parent": 1358, "children": [1360, 1361], "start_point": {"row": 252, "column": 14}, "end_point": {"row": 252, "column": 27}}, {"id": 1360, "type": "identifier", "text": "img", "parent": 1359, "children": [], "start_point": {"row": 252, "column": 14}, "end_point": {"row": 252, "column": 17}}, {"id": 1361, "type": "field_identifier", "text": "getPixels", "parent": 1359, "children": [], "start_point": {"row": 252, "column": 18}, "end_point": {"row": 252, "column": 27}}, {"id": 1362, "type": "argument_list", "text": "()", "parent": 1358, "children": [], "start_point": {"row": 252, "column": 27}, "end_point": {"row": 252, "column": 29}}, {"id": 1363, "type": "ERROR", "text": "template <class T> inline cv::Mat toCv(const ofBaseHasPixels_<T>& img)", "parent": null, "children": [1364], "start_point": {"row": 255, "column": 4}, "end_point": {"row": 255, "column": 74}}, {"id": 1364, "type": "binary_expression", "text": "template <class T> inline cv::Mat toCv(const ofBaseHasPixels_<T>& img)", "parent": 1363, "children": [1365, 1368, 1370, 1371, 1375], "start_point": {"row": 255, "column": 4}, "end_point": {"row": 255, "column": 74}}, {"id": 1365, "type": "binary_expression", "text": "template <class", "parent": 1364, "children": [1366, 1367], "start_point": {"row": 255, "column": 4}, "end_point": {"row": 255, "column": 19}}, {"id": 1366, "type": "identifier", "text": "template", "parent": 1365, "children": [], "start_point": {"row": 255, "column": 4}, "end_point": {"row": 255, "column": 12}}, {"id": 1367, "type": "<", "text": "<", "parent": 1365, "children": [], "start_point": {"row": 255, "column": 13}, "end_point": {"row": 255, "column": 14}}, {"id": 1368, "type": "ERROR", "text": "T", "parent": 1364, "children": [1369], "start_point": {"row": 255, "column": 20}, "end_point": {"row": 255, "column": 21}}, {"id": 1369, "type": "identifier", "text": "T", "parent": 1368, "children": [], "start_point": {"row": 255, "column": 20}, "end_point": {"row": 255, "column": 21}}, {"id": 1370, "type": ">", "text": ">", "parent": 1364, "children": [], "start_point": {"row": 255, "column": 21}, "end_point": {"row": 255, "column": 22}}, {"id": 1371, "type": "ERROR", "text": "inline cv::Mat", "parent": 1364, "children": [1372, 1373, 1374], "start_point": {"row": 255, "column": 23}, "end_point": {"row": 255, "column": 37}}, {"id": 1372, "type": "identifier", "text": "inline", "parent": 1371, "children": [], "start_point": {"row": 255, "column": 23}, "end_point": {"row": 255, "column": 29}}, {"id": 1373, "type": "identifier", "text": "cv", "parent": 1371, "children": [], "start_point": {"row": 255, "column": 30}, "end_point": {"row": 255, "column": 32}}, {"id": 1374, "type": "identifier", "text": "Mat", "parent": 1371, "children": [], "start_point": {"row": 255, "column": 34}, "end_point": {"row": 255, "column": 37}}, {"id": 1375, "type": "call_expression", "text": "toCv(const ofBaseHasPixels_<T>& img)", "parent": 1364, "children": [1376, 1377], "start_point": {"row": 255, "column": 38}, "end_point": {"row": 255, "column": 74}}, {"id": 1376, "type": "identifier", "text": "toCv", "parent": 1375, "children": [], "start_point": {"row": 255, "column": 38}, "end_point": {"row": 255, "column": 42}}, {"id": 1377, "type": "argument_list", "text": "(const ofBaseHasPixels_<T>& img)", "parent": 1375, "children": [1378], "start_point": {"row": 255, "column": 42}, "end_point": {"row": 255, "column": 74}}, {"id": 1378, "type": "binary_expression", "text": "ofBaseHasPixels_<T>& img", "parent": 1377, "children": [1379, 1383, 1384], "start_point": {"row": 255, "column": 49}, "end_point": {"row": 255, "column": 73}}, {"id": 1379, "type": "binary_expression", "text": "ofBaseHasPixels_<T", "parent": 1378, "children": [1380, 1381, 1382], "start_point": {"row": 255, "column": 49}, "end_point": {"row": 255, "column": 67}}, {"id": 1380, "type": "identifier", "text": "ofBaseHasPixels_", "parent": 1379, "children": [], "start_point": {"row": 255, "column": 49}, "end_point": {"row": 255, "column": 65}}, {"id": 1381, "type": "<", "text": "<", "parent": 1379, "children": [], "start_point": {"row": 255, "column": 65}, "end_point": {"row": 255, "column": 66}}, {"id": 1382, "type": "identifier", "text": "T", "parent": 1379, "children": [], "start_point": {"row": 255, "column": 66}, "end_point": {"row": 255, "column": 67}}, {"id": 1383, "type": ">", "text": ">", "parent": 1378, "children": [], "start_point": {"row": 255, "column": 67}, "end_point": {"row": 255, "column": 68}}, {"id": 1384, "type": "pointer_expression", "text": "& img", "parent": 1378, "children": [1385], "start_point": {"row": 255, "column": 68}, "end_point": {"row": 255, "column": 73}}, {"id": 1385, "type": "identifier", "text": "img", "parent": 1384, "children": [], "start_point": {"row": 255, "column": 70}, "end_point": {"row": 255, "column": 73}}, {"id": 1386, "type": "return_statement", "text": "return toCv(img.getPixels());", "parent": null, "children": [1387], "start_point": {"row": 256, "column": 8}, "end_point": {"row": 256, "column": 37}}, {"id": 1387, "type": "call_expression", "text": "toCv(img.getPixels())", "parent": 1386, "children": [1388, 1389], "start_point": {"row": 256, "column": 15}, "end_point": {"row": 256, "column": 36}}, {"id": 1388, "type": "identifier", "text": "toCv", "parent": 1387, "children": [], "start_point": {"row": 256, "column": 15}, "end_point": {"row": 256, "column": 19}}, {"id": 1389, "type": "argument_list", "text": "(img.getPixels())", "parent": 1387, "children": [1390], "start_point": {"row": 256, "column": 19}, "end_point": {"row": 256, "column": 36}}, {"id": 1390, "type": "call_expression", "text": "img.getPixels()", "parent": 1389, "children": [1391, 1394], "start_point": {"row": 256, "column": 20}, "end_point": {"row": 256, "column": 35}}, {"id": 1391, "type": "field_expression", "text": "img.getPixels", "parent": 1390, "children": [1392, 1393], "start_point": {"row": 256, "column": 20}, "end_point": {"row": 256, "column": 33}}, {"id": 1392, "type": "identifier", "text": "img", "parent": 1391, "children": [], "start_point": {"row": 256, "column": 20}, "end_point": {"row": 256, "column": 23}}, {"id": 1393, "type": "field_identifier", "text": "getPixels", "parent": 1391, "children": [], "start_point": {"row": 256, "column": 24}, "end_point": {"row": 256, "column": 33}}, {"id": 1394, "type": "argument_list", "text": "()", "parent": 1390, "children": [], "start_point": {"row": 256, "column": 33}, "end_point": {"row": 256, "column": 35}}, {"id": 1395, "type": "labeled_statement", "text": "cv::Mat toCv(ofMesh& mesh);", "parent": null, "children": [1396, 1397], "start_point": {"row": 259, "column": 1}, "end_point": {"row": 259, "column": 28}}, {"id": 1396, "type": "statement_identifier", "text": "cv", "parent": 1395, "children": [], "start_point": {"row": 259, "column": 1}, "end_point": {"row": 259, "column": 3}}, {"id": 1397, "type": "declaration", "text": "Mat toCv(ofMesh& mesh);", "parent": 1395, "children": [1398, 1399], "start_point": {"row": 259, "column": 5}, "end_point": {"row": 259, "column": 28}}, {"id": 1398, "type": "type_identifier", "text": "Mat", "parent": 1397, "children": [], "start_point": {"row": 259, "column": 5}, "end_point": {"row": 259, "column": 8}}, {"id": 1399, "type": "function_declarator", "text": "toCv(ofMesh& mesh)", "parent": 1397, "children": [1400, 1401], "start_point": {"row": 259, "column": 9}, "end_point": {"row": 259, "column": 27}}, {"id": 1400, "type": "identifier", "text": "toCv", "parent": 1399, "children": [], "start_point": {"row": 259, "column": 9}, "end_point": {"row": 259, "column": 13}}, {"id": 1401, "type": "parameter_list", "text": "(ofMesh& mesh)", "parent": 1399, "children": [1402], "start_point": {"row": 259, "column": 13}, "end_point": {"row": 259, "column": 27}}, {"id": 1402, "type": "parameter_declaration", "text": "ofMesh& mesh", "parent": 1401, "children": [1403, 1404], "start_point": {"row": 259, "column": 14}, "end_point": {"row": 259, "column": 26}}, {"id": 1403, "type": "type_identifier", "text": "ofMesh", "parent": 1402, "children": [], "start_point": {"row": 259, "column": 14}, "end_point": {"row": 259, "column": 20}}, {"id": 1404, "type": "identifier", "text": "mesh", "parent": 1402, "children": [], "start_point": {"row": 259, "column": 22}, "end_point": {"row": 259, "column": 26}}, {"id": 1405, "type": "labeled_statement", "text": "cv::Point2f toCv(glm::vec2 vec);", "parent": null, "children": [1406, 1407, 1411], "start_point": {"row": 260, "column": 1}, "end_point": {"row": 260, "column": 33}}, {"id": 1406, "type": "statement_identifier", "text": "cv", "parent": 1405, "children": [], "start_point": {"row": 260, "column": 1}, "end_point": {"row": 260, "column": 3}}, {"id": 1407, "type": "ERROR", "text": "::Point2f toCv(glm:", "parent": 1405, "children": [1408, 1409, 1410], "start_point": {"row": 260, "column": 3}, "end_point": {"row": 260, "column": 22}}, {"id": 1408, "type": "type_identifier", "text": "Point2f", "parent": 1407, "children": [], "start_point": {"row": 260, "column": 5}, "end_point": {"row": 260, "column": 12}}, {"id": 1409, "type": "identifier", "text": "toCv", "parent": 1407, "children": [], "start_point": {"row": 260, "column": 13}, "end_point": {"row": 260, "column": 17}}, {"id": 1410, "type": "type_identifier", "text": "glm", "parent": 1407, "children": [], "start_point": {"row": 260, "column": 18}, "end_point": {"row": 260, "column": 21}}, {"id": 1411, "type": "declaration", "text": "vec2 vec);", "parent": 1405, "children": [1412, 1413], "start_point": {"row": 260, "column": 23}, "end_point": {"row": 260, "column": 33}}, {"id": 1412, "type": "type_identifier", "text": "vec2", "parent": 1411, "children": [], "start_point": {"row": 260, "column": 23}, "end_point": {"row": 260, "column": 27}}, {"id": 1413, "type": "identifier", "text": "vec", "parent": 1411, "children": [], "start_point": {"row": 260, "column": 28}, "end_point": {"row": 260, "column": 31}}, {"id": 1414, "type": "labeled_statement", "text": "cv::Point3f toCv(glm::vec3 vec);", "parent": null, "children": [1415, 1416, 1420], "start_point": {"row": 261, "column": 1}, "end_point": {"row": 261, "column": 33}}, {"id": 1415, "type": "statement_identifier", "text": "cv", "parent": 1414, "children": [], "start_point": {"row": 261, "column": 1}, "end_point": {"row": 261, "column": 3}}, {"id": 1416, "type": "ERROR", "text": "::Point3f toCv(glm:", "parent": 1414, "children": [1417, 1418, 1419], "start_point": {"row": 261, "column": 3}, "end_point": {"row": 261, "column": 22}}, {"id": 1417, "type": "type_identifier", "text": "Point3f", "parent": 1416, "children": [], "start_point": {"row": 261, "column": 5}, "end_point": {"row": 261, "column": 12}}, {"id": 1418, "type": "identifier", "text": "toCv", "parent": 1416, "children": [], "start_point": {"row": 261, "column": 13}, "end_point": {"row": 261, "column": 17}}, {"id": 1419, "type": "type_identifier", "text": "glm", "parent": 1416, "children": [], "start_point": {"row": 261, "column": 18}, "end_point": {"row": 261, "column": 21}}, {"id": 1420, "type": "declaration", "text": "vec3 vec);", "parent": 1414, "children": [1421, 1422], "start_point": {"row": 261, "column": 23}, "end_point": {"row": 261, "column": 33}}, {"id": 1421, "type": "type_identifier", "text": "vec3", "parent": 1420, "children": [], "start_point": {"row": 261, "column": 23}, "end_point": {"row": 261, "column": 27}}, {"id": 1422, "type": "identifier", "text": "vec", "parent": 1420, "children": [], "start_point": {"row": 261, "column": 28}, "end_point": {"row": 261, "column": 31}}, {"id": 1423, "type": "labeled_statement", "text": "cv::Rect toCv(ofRectangle rect);", "parent": null, "children": [1424, 1425], "start_point": {"row": 262, "column": 1}, "end_point": {"row": 262, "column": 33}}, {"id": 1424, "type": "statement_identifier", "text": "cv", "parent": 1423, "children": [], "start_point": {"row": 262, "column": 1}, "end_point": {"row": 262, "column": 3}}, {"id": 1425, "type": "declaration", "text": "Rect toCv(ofRectangle rect);", "parent": 1423, "children": [1426, 1427], "start_point": {"row": 262, "column": 5}, "end_point": {"row": 262, "column": 33}}, {"id": 1426, "type": "type_identifier", "text": "Rect", "parent": 1425, "children": [], "start_point": {"row": 262, "column": 5}, "end_point": {"row": 262, "column": 9}}, {"id": 1427, "type": "function_declarator", "text": "toCv(ofRectangle rect)", "parent": 1425, "children": [1428, 1429], "start_point": {"row": 262, "column": 10}, "end_point": {"row": 262, "column": 32}}, {"id": 1428, "type": "identifier", "text": "toCv", "parent": 1427, "children": [], "start_point": {"row": 262, "column": 10}, "end_point": {"row": 262, "column": 14}}, {"id": 1429, "type": "parameter_list", "text": "(ofRectangle rect)", "parent": 1427, "children": [1430], "start_point": {"row": 262, "column": 14}, "end_point": {"row": 262, "column": 32}}, {"id": 1430, "type": "parameter_declaration", "text": "ofRectangle rect", "parent": 1429, "children": [1431, 1432], "start_point": {"row": 262, "column": 15}, "end_point": {"row": 262, "column": 31}}, {"id": 1431, "type": "type_identifier", "text": "ofRectangle", "parent": 1430, "children": [], "start_point": {"row": 262, "column": 15}, "end_point": {"row": 262, "column": 26}}, {"id": 1432, "type": "identifier", "text": "rect", "parent": 1430, "children": [], "start_point": {"row": 262, "column": 27}, "end_point": {"row": 262, "column": 31}}, {"id": 1433, "type": "labeled_statement", "text": "std::vector<cv::Point2f> toCv(const ofPolyline& polyline);", "parent": null, "children": [1434, 1435], "start_point": {"row": 263, "column": 1}, "end_point": {"row": 263, "column": 59}}, {"id": 1434, "type": "statement_identifier", "text": "std", "parent": 1433, "children": [], "start_point": {"row": 263, "column": 1}, "end_point": {"row": 263, "column": 4}}, {"id": 1435, "type": "ERROR", "text": "::vector<cv:", "parent": 1433, "children": [1436], "start_point": {"row": 263, "column": 4}, "end_point": {"row": 263, "column": 16}}, {"id": 1436, "type": "binary_expression", "text": "vector<cv", "parent": 1435, "children": [1437, 1438, 1439], "start_point": {"row": 263, "column": 6}, "end_point": {"row": 263, "column": 15}}, {"id": 1437, "type": "identifier", "text": "vector", "parent": 1436, "children": [], "start_point": {"row": 263, "column": 6}, "end_point": {"row": 263, "column": 12}}, {"id": 1438, "type": "<", "text": "<", "parent": 1436, "children": [], "start_point": {"row": 263, "column": 12}, "end_point": {"row": 263, "column": 13}}, {"id": 1439, "type": "identifier", "text": "cv", "parent": 1436, "children": [], "start_point": {"row": 263, "column": 13}, "end_point": {"row": 263, "column": 15}}, {"id": 1440, "type": "binary_expression", "text": "Point2f> toCv(const ofPolyline& polyline)", "parent": 1433, "children": [1441, 1442, 1443], "start_point": {"row": 263, "column": 17}, "end_point": {"row": 263, "column": 58}}, {"id": 1441, "type": "identifier", "text": "Point2f", "parent": 1440, "children": [], "start_point": {"row": 263, "column": 17}, "end_point": {"row": 263, "column": 24}}, {"id": 1442, "type": ">", "text": ">", "parent": 1440, "children": [], "start_point": {"row": 263, "column": 24}, "end_point": {"row": 263, "column": 25}}, {"id": 1443, "type": "call_expression", "text": "toCv(const ofPolyline& polyline)", "parent": 1440, "children": [1444, 1445], "start_point": {"row": 263, "column": 26}, "end_point": {"row": 263, "column": 58}}, {"id": 1444, "type": "identifier", "text": "toCv", "parent": 1443, "children": [], "start_point": {"row": 263, "column": 26}, "end_point": {"row": 263, "column": 30}}, {"id": 1445, "type": "argument_list", "text": "(const ofPolyline& polyline)", "parent": 1443, "children": [1446], "start_point": {"row": 263, "column": 30}, "end_point": {"row": 263, "column": 58}}, {"id": 1446, "type": "binary_expression", "text": "ofPolyline& polyline", "parent": 1445, "children": [1447, 1448], "start_point": {"row": 263, "column": 37}, "end_point": {"row": 263, "column": 57}}, {"id": 1447, "type": "identifier", "text": "ofPolyline", "parent": 1446, "children": [], "start_point": {"row": 263, "column": 37}, "end_point": {"row": 263, "column": 47}}, {"id": 1448, "type": "identifier", "text": "polyline", "parent": 1446, "children": [], "start_point": {"row": 263, "column": 49}, "end_point": {"row": 263, "column": 57}}, {"id": 1449, "type": "labeled_statement", "text": "std::vector<cv::Point2f> toCv(const std::vector<glm::vec2>& points);", "parent": null, "children": [1450, 1451], "start_point": {"row": 264, "column": 1}, "end_point": {"row": 264, "column": 69}}, {"id": 1450, "type": "statement_identifier", "text": "std", "parent": 1449, "children": [], "start_point": {"row": 264, "column": 1}, "end_point": {"row": 264, "column": 4}}, {"id": 1451, "type": "ERROR", "text": "::vector<cv:", "parent": 1449, "children": [1452], "start_point": {"row": 264, "column": 4}, "end_point": {"row": 264, "column": 16}}, {"id": 1452, "type": "binary_expression", "text": "vector<cv", "parent": 1451, "children": [1453, 1454, 1455], "start_point": {"row": 264, "column": 6}, "end_point": {"row": 264, "column": 15}}, {"id": 1453, "type": "identifier", "text": "vector", "parent": 1452, "children": [], "start_point": {"row": 264, "column": 6}, "end_point": {"row": 264, "column": 12}}, {"id": 1454, "type": "<", "text": "<", "parent": 1452, "children": [], "start_point": {"row": 264, "column": 12}, "end_point": {"row": 264, "column": 13}}, {"id": 1455, "type": "identifier", "text": "cv", "parent": 1452, "children": [], "start_point": {"row": 264, "column": 13}, "end_point": {"row": 264, "column": 15}}, {"id": 1456, "type": "binary_expression", "text": "Point2f> toCv(const std::vector<glm::vec2>& points)", "parent": 1449, "children": [1457, 1458, 1459], "start_point": {"row": 264, "column": 17}, "end_point": {"row": 264, "column": 68}}, {"id": 1457, "type": "identifier", "text": "Point2f", "parent": 1456, "children": [], "start_point": {"row": 264, "column": 17}, "end_point": {"row": 264, "column": 24}}, {"id": 1458, "type": ">", "text": ">", "parent": 1456, "children": [], "start_point": {"row": 264, "column": 24}, "end_point": {"row": 264, "column": 25}}, {"id": 1459, "type": "call_expression", "text": "toCv(const std::vector<glm::vec2>& points)", "parent": 1456, "children": [1460, 1461], "start_point": {"row": 264, "column": 26}, "end_point": {"row": 264, "column": 68}}, {"id": 1460, "type": "identifier", "text": "toCv", "parent": 1459, "children": [], "start_point": {"row": 264, "column": 26}, "end_point": {"row": 264, "column": 30}}, {"id": 1461, "type": "argument_list", "text": "(const std::vector<glm::vec2>& points)", "parent": 1459, "children": [1462, 1468], "start_point": {"row": 264, "column": 30}, "end_point": {"row": 264, "column": 68}}, {"id": 1462, "type": "ERROR", "text": "const std::vector<glm::", "parent": 1461, "children": [1463, 1464], "start_point": {"row": 264, "column": 31}, "end_point": {"row": 264, "column": 54}}, {"id": 1463, "type": "identifier", "text": "std", "parent": 1462, "children": [], "start_point": {"row": 264, "column": 37}, "end_point": {"row": 264, "column": 40}}, {"id": 1464, "type": "binary_expression", "text": "vector<glm", "parent": 1462, "children": [1465, 1466, 1467], "start_point": {"row": 264, "column": 42}, "end_point": {"row": 264, "column": 52}}, {"id": 1465, "type": "identifier", "text": "vector", "parent": 1464, "children": [], "start_point": {"row": 264, "column": 42}, "end_point": {"row": 264, "column": 48}}, {"id": 1466, "type": "<", "text": "<", "parent": 1464, "children": [], "start_point": {"row": 264, "column": 48}, "end_point": {"row": 264, "column": 49}}, {"id": 1467, "type": "identifier", "text": "glm", "parent": 1464, "children": [], "start_point": {"row": 264, "column": 49}, "end_point": {"row": 264, "column": 52}}, {"id": 1468, "type": "binary_expression", "text": "vec2>& points", "parent": 1461, "children": [1469, 1470, 1471], "start_point": {"row": 264, "column": 54}, "end_point": {"row": 264, "column": 67}}, {"id": 1469, "type": "identifier", "text": "vec2", "parent": 1468, "children": [], "start_point": {"row": 264, "column": 54}, "end_point": {"row": 264, "column": 58}}, {"id": 1470, "type": ">", "text": ">", "parent": 1468, "children": [], "start_point": {"row": 264, "column": 58}, "end_point": {"row": 264, "column": 59}}, {"id": 1471, "type": "pointer_expression", "text": "& points", "parent": 1468, "children": [1472], "start_point": {"row": 264, "column": 59}, "end_point": {"row": 264, "column": 67}}, {"id": 1472, "type": "identifier", "text": "points", "parent": 1471, "children": [], "start_point": {"row": 264, "column": 61}, "end_point": {"row": 264, "column": 67}}, {"id": 1473, "type": "labeled_statement", "text": "std::vector<cv::Point3f> toCv(const std::vector<glm::vec3>& points);", "parent": null, "children": [1474, 1475], "start_point": {"row": 265, "column": 1}, "end_point": {"row": 265, "column": 69}}, {"id": 1474, "type": "statement_identifier", "text": "std", "parent": 1473, "children": [], "start_point": {"row": 265, "column": 1}, "end_point": {"row": 265, "column": 4}}, {"id": 1475, "type": "ERROR", "text": "::vector<cv:", "parent": 1473, "children": [1476], "start_point": {"row": 265, "column": 4}, "end_point": {"row": 265, "column": 16}}, {"id": 1476, "type": "binary_expression", "text": "vector<cv", "parent": 1475, "children": [1477, 1478, 1479], "start_point": {"row": 265, "column": 6}, "end_point": {"row": 265, "column": 15}}, {"id": 1477, "type": "identifier", "text": "vector", "parent": 1476, "children": [], "start_point": {"row": 265, "column": 6}, "end_point": {"row": 265, "column": 12}}, {"id": 1478, "type": "<", "text": "<", "parent": 1476, "children": [], "start_point": {"row": 265, "column": 12}, "end_point": {"row": 265, "column": 13}}, {"id": 1479, "type": "identifier", "text": "cv", "parent": 1476, "children": [], "start_point": {"row": 265, "column": 13}, "end_point": {"row": 265, "column": 15}}, {"id": 1480, "type": "binary_expression", "text": "Point3f> toCv(const std::vector<glm::vec3>& points)", "parent": 1473, "children": [1481, 1482, 1483], "start_point": {"row": 265, "column": 17}, "end_point": {"row": 265, "column": 68}}, {"id": 1481, "type": "identifier", "text": "Point3f", "parent": 1480, "children": [], "start_point": {"row": 265, "column": 17}, "end_point": {"row": 265, "column": 24}}, {"id": 1482, "type": ">", "text": ">", "parent": 1480, "children": [], "start_point": {"row": 265, "column": 24}, "end_point": {"row": 265, "column": 25}}, {"id": 1483, "type": "call_expression", "text": "toCv(const std::vector<glm::vec3>& points)", "parent": 1480, "children": [1484, 1485], "start_point": {"row": 265, "column": 26}, "end_point": {"row": 265, "column": 68}}, {"id": 1484, "type": "identifier", "text": "toCv", "parent": 1483, "children": [], "start_point": {"row": 265, "column": 26}, "end_point": {"row": 265, "column": 30}}, {"id": 1485, "type": "argument_list", "text": "(const std::vector<glm::vec3>& points)", "parent": 1483, "children": [1486, 1492], "start_point": {"row": 265, "column": 30}, "end_point": {"row": 265, "column": 68}}, {"id": 1486, "type": "ERROR", "text": "const std::vector<glm::", "parent": 1485, "children": [1487, 1488], "start_point": {"row": 265, "column": 31}, "end_point": {"row": 265, "column": 54}}, {"id": 1487, "type": "identifier", "text": "std", "parent": 1486, "children": [], "start_point": {"row": 265, "column": 37}, "end_point": {"row": 265, "column": 40}}, {"id": 1488, "type": "binary_expression", "text": "vector<glm", "parent": 1486, "children": [1489, 1490, 1491], "start_point": {"row": 265, "column": 42}, "end_point": {"row": 265, "column": 52}}, {"id": 1489, "type": "identifier", "text": "vector", "parent": 1488, "children": [], "start_point": {"row": 265, "column": 42}, "end_point": {"row": 265, "column": 48}}, {"id": 1490, "type": "<", "text": "<", "parent": 1488, "children": [], "start_point": {"row": 265, "column": 48}, "end_point": {"row": 265, "column": 49}}, {"id": 1491, "type": "identifier", "text": "glm", "parent": 1488, "children": [], "start_point": {"row": 265, "column": 49}, "end_point": {"row": 265, "column": 52}}, {"id": 1492, "type": "binary_expression", "text": "vec3>& points", "parent": 1485, "children": [1493, 1494, 1495], "start_point": {"row": 265, "column": 54}, "end_point": {"row": 265, "column": 67}}, {"id": 1493, "type": "identifier", "text": "vec3", "parent": 1492, "children": [], "start_point": {"row": 265, "column": 54}, "end_point": {"row": 265, "column": 58}}, {"id": 1494, "type": ">", "text": ">", "parent": 1492, "children": [], "start_point": {"row": 265, "column": 58}, "end_point": {"row": 265, "column": 59}}, {"id": 1495, "type": "pointer_expression", "text": "& points", "parent": 1492, "children": [1496], "start_point": {"row": 265, "column": 59}, "end_point": {"row": 265, "column": 67}}, {"id": 1496, "type": "identifier", "text": "points", "parent": 1495, "children": [], "start_point": {"row": 265, "column": 61}, "end_point": {"row": 265, "column": 67}}, {"id": 1497, "type": "labeled_statement", "text": "cv::Scalar toCv(ofColor color);", "parent": null, "children": [1498, 1499], "start_point": {"row": 266, "column": 1}, "end_point": {"row": 266, "column": 32}}, {"id": 1498, "type": "statement_identifier", "text": "cv", "parent": 1497, "children": [], "start_point": {"row": 266, "column": 1}, "end_point": {"row": 266, "column": 3}}, {"id": 1499, "type": "declaration", "text": "Scalar toCv(ofColor color);", "parent": 1497, "children": [1500, 1501], "start_point": {"row": 266, "column": 5}, "end_point": {"row": 266, "column": 32}}, {"id": 1500, "type": "type_identifier", "text": "Scalar", "parent": 1499, "children": [], "start_point": {"row": 266, "column": 5}, "end_point": {"row": 266, "column": 11}}, {"id": 1501, "type": "function_declarator", "text": "toCv(ofColor color)", "parent": 1499, "children": [1502, 1503], "start_point": {"row": 266, "column": 12}, "end_point": {"row": 266, "column": 31}}, {"id": 1502, "type": "identifier", "text": "toCv", "parent": 1501, "children": [], "start_point": {"row": 266, "column": 12}, "end_point": {"row": 266, "column": 16}}, {"id": 1503, "type": "parameter_list", "text": "(ofColor color)", "parent": 1501, "children": [1504], "start_point": {"row": 266, "column": 16}, "end_point": {"row": 266, "column": 31}}, {"id": 1504, "type": "parameter_declaration", "text": "ofColor color", "parent": 1503, "children": [1505, 1506], "start_point": {"row": 266, "column": 17}, "end_point": {"row": 266, "column": 30}}, {"id": 1505, "type": "type_identifier", "text": "ofColor", "parent": 1504, "children": [], "start_point": {"row": 266, "column": 17}, "end_point": {"row": 266, "column": 24}}, {"id": 1506, "type": "identifier", "text": "color", "parent": 1504, "children": [], "start_point": {"row": 266, "column": 25}, "end_point": {"row": 266, "column": 30}}, {"id": 1507, "type": "update_expression", "text": "template <class S, class D>\n\tvoid copy(S& src, D& dst, int dstDepth) {\n\t\timitate(dst, src, getCvImageType(getChannels(src), dstDepth))", "parent": null, "children": [1508, 1543], "start_point": {"row": 269, "column": 1}, "end_point": {"row": 271, "column": 63}}, {"id": 1508, "type": "binary_expression", "text": "template <class S, class D>\n\tvoid copy(S& src, D& dst, int dstDepth) {\n\t\timitate(dst, src, getCvImageType(getChannels(src), dstDepth))", "parent": 1507, "children": [1509, 1512, 1515, 1516, 1530], "start_point": {"row": 269, "column": 1}, "end_point": {"row": 271, "column": 63}}, {"id": 1509, "type": "binary_expression", "text": "template <class", "parent": 1508, "children": [1510, 1511], "start_point": {"row": 269, "column": 1}, "end_point": {"row": 269, "column": 16}}, {"id": 1510, "type": "identifier", "text": "template", "parent": 1509, "children": [], "start_point": {"row": 269, "column": 1}, "end_point": {"row": 269, "column": 9}}, {"id": 1511, "type": "<", "text": "<", "parent": 1509, "children": [], "start_point": {"row": 269, "column": 10}, "end_point": {"row": 269, "column": 11}}, {"id": 1512, "type": "ERROR", "text": "S, class D", "parent": 1508, "children": [1513, 1514], "start_point": {"row": 269, "column": 17}, "end_point": {"row": 269, "column": 27}}, {"id": 1513, "type": "identifier", "text": "S", "parent": 1512, "children": [], "start_point": {"row": 269, "column": 17}, "end_point": {"row": 269, "column": 18}}, {"id": 1514, "type": "identifier", "text": "D", "parent": 1512, "children": [], "start_point": {"row": 269, "column": 26}, "end_point": {"row": 269, "column": 27}}, {"id": 1515, "type": ">", "text": ">", "parent": 1508, "children": [], "start_point": {"row": 269, "column": 27}, "end_point": {"row": 269, "column": 28}}, {"id": 1516, "type": "ERROR", "text": "void copy(S& src, D& dst, int dstDepth) {", "parent": 1508, "children": [1517, 1518], "start_point": {"row": 270, "column": 1}, "end_point": {"row": 270, "column": 42}}, {"id": 1517, "type": "identifier", "text": "void", "parent": 1516, "children": [], "start_point": {"row": 270, "column": 1}, "end_point": {"row": 270, "column": 5}}, {"id": 1518, "type": "call_expression", "text": "copy(S& src, D& dst, int dstDepth)", "parent": 1516, "children": [1519, 1520], "start_point": {"row": 270, "column": 6}, "end_point": {"row": 270, "column": 40}}, {"id": 1519, "type": "identifier", "text": "copy", "parent": 1518, "children": [], "start_point": {"row": 270, "column": 6}, "end_point": {"row": 270, "column": 10}}, {"id": 1520, "type": "argument_list", "text": "(S& src, D& dst, int dstDepth)", "parent": 1518, "children": [1521, 1524, 1527, 1529], "start_point": {"row": 270, "column": 10}, "end_point": {"row": 270, "column": 40}}, {"id": 1521, "type": "binary_expression", "text": "S& src", "parent": 1520, "children": [1522, 1523], "start_point": {"row": 270, "column": 11}, "end_point": {"row": 270, "column": 17}}, {"id": 1522, "type": "identifier", "text": "S", "parent": 1521, "children": [], "start_point": {"row": 270, "column": 11}, "end_point": {"row": 270, "column": 12}}, {"id": 1523, "type": "identifier", "text": "src", "parent": 1521, "children": [], "start_point": {"row": 270, "column": 14}, "end_point": {"row": 270, "column": 17}}, {"id": 1524, "type": "binary_expression", "text": "D& dst", "parent": 1520, "children": [1525, 1526], "start_point": {"row": 270, "column": 19}, "end_point": {"row": 270, "column": 25}}, {"id": 1525, "type": "identifier", "text": "D", "parent": 1524, "children": [], "start_point": {"row": 270, "column": 19}, "end_point": {"row": 270, "column": 20}}, {"id": 1526, "type": "identifier", "text": "dst", "parent": 1524, "children": [], "start_point": {"row": 270, "column": 22}, "end_point": {"row": 270, "column": 25}}, {"id": 1527, "type": "ERROR", "text": "int", "parent": 1520, "children": [1528], "start_point": {"row": 270, "column": 27}, "end_point": {"row": 270, "column": 30}}, {"id": 1528, "type": "identifier", "text": "int", "parent": 1527, "children": [], "start_point": {"row": 270, "column": 27}, "end_point": {"row": 270, "column": 30}}, {"id": 1529, "type": "identifier", "text": "dstDepth", "parent": 1520, "children": [], "start_point": {"row": 270, "column": 31}, "end_point": {"row": 270, "column": 39}}, {"id": 1530, "type": "call_expression", "text": "imitate(dst, src, getCvImageType(getChannels(src), dstDepth))", "parent": 1508, "children": [1531, 1532], "start_point": {"row": 271, "column": 2}, "end_point": {"row": 271, "column": 63}}, {"id": 1531, "type": "identifier", "text": "imitate", "parent": 1530, "children": [], "start_point": {"row": 271, "column": 2}, "end_point": {"row": 271, "column": 9}}, {"id": 1532, "type": "argument_list", "text": "(dst, src, getCvImageType(getChannels(src), dstDepth))", "parent": 1530, "children": [1533, 1534, 1535], "start_point": {"row": 271, "column": 9}, "end_point": {"row": 271, "column": 63}}, {"id": 1533, "type": "identifier", "text": "dst", "parent": 1532, "children": [], "start_point": {"row": 271, "column": 10}, "end_point": {"row": 271, "column": 13}}, {"id": 1534, "type": "identifier", "text": "src", "parent": 1532, "children": [], "start_point": {"row": 271, "column": 15}, "end_point": {"row": 271, "column": 18}}, {"id": 1535, "type": "call_expression", "text": "getCvImageType(getChannels(src), dstDepth)", "parent": 1532, "children": [1536, 1537], "start_point": {"row": 271, "column": 20}, "end_point": {"row": 271, "column": 62}}, {"id": 1536, "type": "identifier", "text": "getCvImageType", "parent": 1535, "children": [], "start_point": {"row": 271, "column": 20}, "end_point": {"row": 271, "column": 34}}, {"id": 1537, "type": "argument_list", "text": "(getChannels(src), dstDepth)", "parent": 1535, "children": [1538, 1542], "start_point": {"row": 271, "column": 34}, "end_point": {"row": 271, "column": 62}}, {"id": 1538, "type": "call_expression", "text": "getChannels(src)", "parent": 1537, "children": [1539, 1540], "start_point": {"row": 271, "column": 35}, "end_point": {"row": 271, "column": 51}}, {"id": 1539, "type": "identifier", "text": "getChannels", "parent": 1538, "children": [], "start_point": {"row": 271, "column": 35}, "end_point": {"row": 271, "column": 46}}, {"id": 1540, "type": "argument_list", "text": "(src)", "parent": 1538, "children": [1541], "start_point": {"row": 271, "column": 46}, "end_point": {"row": 271, "column": 51}}, {"id": 1541, "type": "identifier", "text": "src", "parent": 1540, "children": [], "start_point": {"row": 271, "column": 47}, "end_point": {"row": 271, "column": 50}}, {"id": 1542, "type": "identifier", "text": "dstDepth", "parent": 1537, "children": [], "start_point": {"row": 271, "column": 53}, "end_point": {"row": 271, "column": 61}}, {"id": 1543, "type": "--", "text": "", "parent": 1507, "children": [], "start_point": {"row": 271, "column": 63}, "end_point": {"row": 271, "column": 63}}, {"id": 1544, "type": "labeled_statement", "text": "cv::Mat srcMat = toCv(src);", "parent": null, "children": [1545, 1546], "start_point": {"row": 272, "column": 8}, "end_point": {"row": 272, "column": 35}}, {"id": 1545, "type": "statement_identifier", "text": "cv", "parent": 1544, "children": [], "start_point": {"row": 272, "column": 8}, "end_point": {"row": 272, "column": 10}}, {"id": 1546, "type": "declaration", "text": "Mat srcMat = toCv(src);", "parent": 1544, "children": [1547, 1548], "start_point": {"row": 272, "column": 12}, "end_point": {"row": 272, "column": 35}}, {"id": 1547, "type": "type_identifier", "text": "Mat", "parent": 1546, "children": [], "start_point": {"row": 272, "column": 12}, "end_point": {"row": 272, "column": 15}}, {"id": 1548, "type": "init_declarator", "text": "srcMat = toCv(src)", "parent": 1546, "children": [1549, 1550, 1551], "start_point": {"row": 272, "column": 16}, "end_point": {"row": 272, "column": 34}}, {"id": 1549, "type": "identifier", "text": "srcMat", "parent": 1548, "children": [], "start_point": {"row": 272, "column": 16}, "end_point": {"row": 272, "column": 22}}, {"id": 1550, "type": "=", "text": "=", "parent": 1548, "children": [], "start_point": {"row": 272, "column": 23}, "end_point": {"row": 272, "column": 24}}, {"id": 1551, "type": "call_expression", "text": "toCv(src)", "parent": 1548, "children": [1552, 1553], "start_point": {"row": 272, "column": 25}, "end_point": {"row": 272, "column": 34}}, {"id": 1552, "type": "identifier", "text": "toCv", "parent": 1551, "children": [], "start_point": {"row": 272, "column": 25}, "end_point": {"row": 272, "column": 29}}, {"id": 1553, "type": "argument_list", "text": "(src)", "parent": 1551, "children": [1554], "start_point": {"row": 272, "column": 29}, "end_point": {"row": 272, "column": 34}}, {"id": 1554, "type": "identifier", "text": "src", "parent": 1553, "children": [], "start_point": {"row": 272, "column": 30}, "end_point": {"row": 272, "column": 33}}, {"id": 1555, "type": "labeled_statement", "text": "cv::Mat dstMat = toCv(dst);", "parent": null, "children": [1556, 1557], "start_point": {"row": 273, "column": 8}, "end_point": {"row": 273, "column": 35}}, {"id": 1556, "type": "statement_identifier", "text": "cv", "parent": 1555, "children": [], "start_point": {"row": 273, "column": 8}, "end_point": {"row": 273, "column": 10}}, {"id": 1557, "type": "declaration", "text": "Mat dstMat = toCv(dst);", "parent": 1555, "children": [1558, 1559], "start_point": {"row": 273, "column": 12}, "end_point": {"row": 273, "column": 35}}, {"id": 1558, "type": "type_identifier", "text": "Mat", "parent": 1557, "children": [], "start_point": {"row": 273, "column": 12}, "end_point": {"row": 273, "column": 15}}, {"id": 1559, "type": "init_declarator", "text": "dstMat = toCv(dst)", "parent": 1557, "children": [1560, 1561, 1562], "start_point": {"row": 273, "column": 16}, "end_point": {"row": 273, "column": 34}}, {"id": 1560, "type": "identifier", "text": "dstMat", "parent": 1559, "children": [], "start_point": {"row": 273, "column": 16}, "end_point": {"row": 273, "column": 22}}, {"id": 1561, "type": "=", "text": "=", "parent": 1559, "children": [], "start_point": {"row": 273, "column": 23}, "end_point": {"row": 273, "column": 24}}, {"id": 1562, "type": "call_expression", "text": "toCv(dst)", "parent": 1559, "children": [1563, 1564], "start_point": {"row": 273, "column": 25}, "end_point": {"row": 273, "column": 34}}, {"id": 1563, "type": "identifier", "text": "toCv", "parent": 1562, "children": [], "start_point": {"row": 273, "column": 25}, "end_point": {"row": 273, "column": 29}}, {"id": 1564, "type": "argument_list", "text": "(dst)", "parent": 1562, "children": [1565], "start_point": {"row": 273, "column": 29}, "end_point": {"row": 273, "column": 34}}, {"id": 1565, "type": "identifier", "text": "dst", "parent": 1564, "children": [], "start_point": {"row": 273, "column": 30}, "end_point": {"row": 273, "column": 33}}, {"id": 1566, "type": "if_statement", "text": "if(srcMat.type() == dstMat.type()) {\n\t\t\tsrcMat.copyTo(dstMat);\n\t\t} else {\n\t\t\tdouble alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n\t\t\tsrcMat.convertTo(dstMat, dstMat.depth(), alpha);\n\t\t}", "parent": null, "children": [1567, 1586], "start_point": {"row": 274, "column": 2}, "end_point": {"row": 279, "column": 3}}, {"id": 1567, "type": "parenthesized_expression", "text": "(srcMat.type() == dstMat.type())", "parent": 1566, "children": [1568], "start_point": {"row": 274, "column": 4}, "end_point": {"row": 274, "column": 36}}, {"id": 1568, "type": "binary_expression", "text": "srcMat.type() == dstMat.type()", "parent": 1567, "children": [1569, 1574, 1575], "start_point": {"row": 274, "column": 5}, "end_point": {"row": 274, "column": 35}}, {"id": 1569, "type": "call_expression", "text": "srcMat.type()", "parent": 1568, "children": [1570, 1573], "start_point": {"row": 274, "column": 5}, "end_point": {"row": 274, "column": 18}}, {"id": 1570, "type": "field_expression", "text": "srcMat.type", "parent": 1569, "children": [1571, 1572], "start_point": {"row": 274, "column": 5}, "end_point": {"row": 274, "column": 16}}, {"id": 1571, "type": "identifier", "text": "srcMat", "parent": 1570, "children": [], "start_point": {"row": 274, "column": 5}, "end_point": {"row": 274, "column": 11}}, {"id": 1572, "type": "field_identifier", "text": "type", "parent": 1570, "children": [], "start_point": {"row": 274, "column": 12}, "end_point": {"row": 274, "column": 16}}, {"id": 1573, "type": "argument_list", "text": "()", "parent": 1569, "children": [], "start_point": {"row": 274, "column": 16}, "end_point": {"row": 274, "column": 18}}, {"id": 1574, "type": "==", "text": "==", "parent": 1568, "children": [], "start_point": {"row": 274, "column": 19}, "end_point": {"row": 274, "column": 21}}, {"id": 1575, "type": "call_expression", "text": "dstMat.type()", "parent": 1568, "children": [1576, 1579], "start_point": {"row": 274, "column": 22}, "end_point": {"row": 274, "column": 35}}, {"id": 1576, "type": "field_expression", "text": "dstMat.type", "parent": 1575, "children": [1577, 1578], "start_point": {"row": 274, "column": 22}, "end_point": {"row": 274, "column": 33}}, {"id": 1577, "type": "identifier", "text": "dstMat", "parent": 1576, "children": [], "start_point": {"row": 274, "column": 22}, "end_point": {"row": 274, "column": 28}}, {"id": 1578, "type": "field_identifier", "text": "type", "parent": 1576, "children": [], "start_point": {"row": 274, "column": 29}, "end_point": {"row": 274, "column": 33}}, {"id": 1579, "type": "argument_list", "text": "()", "parent": 1575, "children": [], "start_point": {"row": 274, "column": 33}, "end_point": {"row": 274, "column": 35}}, {"id": 1580, "type": "call_expression", "text": "srcMat.copyTo(dstMat)", "parent": 1566, "children": [1581, 1584], "start_point": {"row": 275, "column": 3}, "end_point": {"row": 275, "column": 24}}, {"id": 1581, "type": "field_expression", "text": "srcMat.copyTo", "parent": 1580, "children": [1582, 1583], "start_point": {"row": 275, "column": 3}, "end_point": {"row": 275, "column": 16}}, {"id": 1582, "type": "identifier", "text": "srcMat", "parent": 1581, "children": [], "start_point": {"row": 275, "column": 3}, "end_point": {"row": 275, "column": 9}}, {"id": 1583, "type": "field_identifier", "text": "copyTo", "parent": 1581, "children": [], "start_point": {"row": 275, "column": 10}, "end_point": {"row": 275, "column": 16}}, {"id": 1584, "type": "argument_list", "text": "(dstMat)", "parent": 1580, "children": [1585], "start_point": {"row": 275, "column": 16}, "end_point": {"row": 275, "column": 24}}, {"id": 1585, "type": "identifier", "text": "dstMat", "parent": 1584, "children": [], "start_point": {"row": 275, "column": 17}, "end_point": {"row": 275, "column": 23}}, {"id": 1586, "type": "else_clause", "text": "else {\n\t\t\tdouble alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n\t\t\tsrcMat.convertTo(dstMat, dstMat.depth(), alpha);\n\t\t}", "parent": 1566, "children": [], "start_point": {"row": 276, "column": 4}, "end_point": {"row": 279, "column": 3}}, {"id": 1587, "type": "declaration", "text": "double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);", "parent": 1586, "children": [1588, 1589], "start_point": {"row": 277, "column": 3}, "end_point": {"row": 277, "column": 56}}, {"id": 1588, "type": "primitive_type", "text": "double", "parent": 1587, "children": [], "start_point": {"row": 277, "column": 3}, "end_point": {"row": 277, "column": 9}}, {"id": 1589, "type": "init_declarator", "text": "alpha = getMaxVal(dstMat) / getMaxVal(srcMat)", "parent": 1587, "children": [1590, 1591, 1592], "start_point": {"row": 277, "column": 10}, "end_point": {"row": 277, "column": 55}}, {"id": 1590, "type": "identifier", "text": "alpha", "parent": 1589, "children": [], "start_point": {"row": 277, "column": 10}, "end_point": {"row": 277, "column": 15}}, {"id": 1591, "type": "=", "text": "=", "parent": 1589, "children": [], "start_point": {"row": 277, "column": 16}, "end_point": {"row": 277, "column": 17}}, {"id": 1592, "type": "binary_expression", "text": "getMaxVal(dstMat) / getMaxVal(srcMat)", "parent": 1589, "children": [1593, 1597, 1598], "start_point": {"row": 277, "column": 18}, "end_point": {"row": 277, "column": 55}}, {"id": 1593, "type": "call_expression", "text": "getMaxVal(dstMat)", "parent": 1592, "children": [1594, 1595], "start_point": {"row": 277, "column": 18}, "end_point": {"row": 277, "column": 35}}, {"id": 1594, "type": "identifier", "text": "getMaxVal", "parent": 1593, "children": [], "start_point": {"row": 277, "column": 18}, "end_point": {"row": 277, "column": 27}}, {"id": 1595, "type": "argument_list", "text": "(dstMat)", "parent": 1593, "children": [1596], "start_point": {"row": 277, "column": 27}, "end_point": {"row": 277, "column": 35}}, {"id": 1596, "type": "identifier", "text": "dstMat", "parent": 1595, "children": [], "start_point": {"row": 277, "column": 28}, "end_point": {"row": 277, "column": 34}}, {"id": 1597, "type": "/", "text": "/", "parent": 1592, "children": [], "start_point": {"row": 277, "column": 36}, "end_point": {"row": 277, "column": 37}}, {"id": 1598, "type": "call_expression", "text": "getMaxVal(srcMat)", "parent": 1592, "children": [1599, 1600], "start_point": {"row": 277, "column": 38}, "end_point": {"row": 277, "column": 55}}, {"id": 1599, "type": "identifier", "text": "getMaxVal", "parent": 1598, "children": [], "start_point": {"row": 277, "column": 38}, "end_point": {"row": 277, "column": 47}}, {"id": 1600, "type": "argument_list", "text": "(srcMat)", "parent": 1598, "children": [1601], "start_point": {"row": 277, "column": 47}, "end_point": {"row": 277, "column": 55}}, {"id": 1601, "type": "identifier", "text": "srcMat", "parent": 1600, "children": [], "start_point": {"row": 277, "column": 48}, "end_point": {"row": 277, "column": 54}}, {"id": 1602, "type": "call_expression", "text": "srcMat.convertTo(dstMat, dstMat.depth(), alpha)", "parent": 1586, "children": [1603, 1606], "start_point": {"row": 278, "column": 3}, "end_point": {"row": 278, "column": 50}}, {"id": 1603, "type": "field_expression", "text": "srcMat.convertTo", "parent": 1602, "children": [1604, 1605], "start_point": {"row": 278, "column": 3}, "end_point": {"row": 278, "column": 19}}, {"id": 1604, "type": "identifier", "text": "srcMat", "parent": 1603, "children": [], "start_point": {"row": 278, "column": 3}, "end_point": {"row": 278, "column": 9}}, {"id": 1605, "type": "field_identifier", "text": "convertTo", "parent": 1603, "children": [], "start_point": {"row": 278, "column": 10}, "end_point": {"row": 278, "column": 19}}, {"id": 1606, "type": "argument_list", "text": "(dstMat, dstMat.depth(), alpha)", "parent": 1602, "children": [1607, 1608, 1613], "start_point": {"row": 278, "column": 19}, "end_point": {"row": 278, "column": 50}}, {"id": 1607, "type": "identifier", "text": "dstMat", "parent": 1606, "children": [], "start_point": {"row": 278, "column": 20}, "end_point": {"row": 278, "column": 26}}, {"id": 1608, "type": "call_expression", "text": "dstMat.depth()", "parent": 1606, "children": [1609, 1612], "start_point": {"row": 278, "column": 28}, "end_point": {"row": 278, "column": 42}}, {"id": 1609, "type": "field_expression", "text": "dstMat.depth", "parent": 1608, "children": [1610, 1611], "start_point": {"row": 278, "column": 28}, "end_point": {"row": 278, "column": 40}}, {"id": 1610, "type": "identifier", "text": "dstMat", "parent": 1609, "children": [], "start_point": {"row": 278, "column": 28}, "end_point": {"row": 278, "column": 34}}, {"id": 1611, "type": "field_identifier", "text": "depth", "parent": 1609, "children": [], "start_point": {"row": 278, "column": 35}, "end_point": {"row": 278, "column": 40}}, {"id": 1612, "type": "argument_list", "text": "()", "parent": 1608, "children": [], "start_point": {"row": 278, "column": 40}, "end_point": {"row": 278, "column": 42}}, {"id": 1613, "type": "identifier", "text": "alpha", "parent": 1606, "children": [], "start_point": {"row": 278, "column": 44}, "end_point": {"row": 278, "column": 49}}, {"id": 1614, "type": "ERROR", "text": "}\n\n template <class S, class D>\n void copy(const S& src, D& dst, int dstDepth)", "parent": null, "children": [1615], "start_point": {"row": 280, "column": 1}, "end_point": {"row": 283, "column": 49}}, {"id": 1615, "type": "binary_expression", "text": "template <class S, class D>\n void copy(const S& src, D& dst, int dstDepth)", "parent": 1614, "children": [1616, 1619, 1622, 1623, 1625], "start_point": {"row": 282, "column": 4}, "end_point": {"row": 283, "column": 49}}, {"id": 1616, "type": "binary_expression", "text": "template <class", "parent": 1615, "children": [1617, 1618], "start_point": {"row": 282, "column": 4}, "end_point": {"row": 282, "column": 19}}, {"id": 1617, "type": "identifier", "text": "template", "parent": 1616, "children": [], "start_point": {"row": 282, "column": 4}, "end_point": {"row": 282, "column": 12}}, {"id": 1618, "type": "<", "text": "<", "parent": 1616, "children": [], "start_point": {"row": 282, "column": 13}, "end_point": {"row": 282, "column": 14}}, {"id": 1619, "type": "ERROR", "text": "S, class D", "parent": 1615, "children": [1620, 1621], "start_point": {"row": 282, "column": 20}, "end_point": {"row": 282, "column": 30}}, {"id": 1620, "type": "identifier", "text": "S", "parent": 1619, "children": [], "start_point": {"row": 282, "column": 20}, "end_point": {"row": 282, "column": 21}}, {"id": 1621, "type": "identifier", "text": "D", "parent": 1619, "children": [], "start_point": {"row": 282, "column": 29}, "end_point": {"row": 282, "column": 30}}, {"id": 1622, "type": ">", "text": ">", "parent": 1615, "children": [], "start_point": {"row": 282, "column": 30}, "end_point": {"row": 282, "column": 31}}, {"id": 1623, "type": "ERROR", "text": "void", "parent": 1615, "children": [1624], "start_point": {"row": 283, "column": 4}, "end_point": {"row": 283, "column": 8}}, {"id": 1624, "type": "identifier", "text": "void", "parent": 1623, "children": [], "start_point": {"row": 283, "column": 4}, "end_point": {"row": 283, "column": 8}}, {"id": 1625, "type": "call_expression", "text": "copy(const S& src, D& dst, int dstDepth)", "parent": 1615, "children": [1626, 1627], "start_point": {"row": 283, "column": 9}, "end_point": {"row": 283, "column": 49}}, {"id": 1626, "type": "identifier", "text": "copy", "parent": 1625, "children": [], "start_point": {"row": 283, "column": 9}, "end_point": {"row": 283, "column": 13}}, {"id": 1627, "type": "argument_list", "text": "(const S& src, D& dst, int dstDepth)", "parent": 1625, "children": [1628, 1632, 1635, 1637], "start_point": {"row": 283, "column": 13}, "end_point": {"row": 283, "column": 49}}, {"id": 1628, "type": "binary_expression", "text": "const S& src", "parent": 1627, "children": [1629, 1631], "start_point": {"row": 283, "column": 14}, "end_point": {"row": 283, "column": 26}}, {"id": 1629, "type": "ERROR", "text": "S", "parent": 1628, "children": [1630], "start_point": {"row": 283, "column": 20}, "end_point": {"row": 283, "column": 21}}, {"id": 1630, "type": "identifier", "text": "S", "parent": 1629, "children": [], "start_point": {"row": 283, "column": 20}, "end_point": {"row": 283, "column": 21}}, {"id": 1631, "type": "identifier", "text": "src", "parent": 1628, "children": [], "start_point": {"row": 283, "column": 23}, "end_point": {"row": 283, "column": 26}}, {"id": 1632, "type": "binary_expression", "text": "D& dst", "parent": 1627, "children": [1633, 1634], "start_point": {"row": 283, "column": 28}, "end_point": {"row": 283, "column": 34}}, {"id": 1633, "type": "identifier", "text": "D", "parent": 1632, "children": [], "start_point": {"row": 283, "column": 28}, "end_point": {"row": 283, "column": 29}}, {"id": 1634, "type": "identifier", "text": "dst", "parent": 1632, "children": [], "start_point": {"row": 283, "column": 31}, "end_point": {"row": 283, "column": 34}}, {"id": 1635, "type": "ERROR", "text": "int", "parent": 1627, "children": [1636], "start_point": {"row": 283, "column": 36}, "end_point": {"row": 283, "column": 39}}, {"id": 1636, "type": "identifier", "text": "int", "parent": 1635, "children": [], "start_point": {"row": 283, "column": 36}, "end_point": {"row": 283, "column": 39}}, {"id": 1637, "type": "identifier", "text": "dstDepth", "parent": 1627, "children": [], "start_point": {"row": 283, "column": 40}, "end_point": {"row": 283, "column": 48}}, {"id": 1638, "type": "call_expression", "text": "imitate(dst, src, getCvImageType(getChannels(src), dstDepth))", "parent": null, "children": [1639, 1640], "start_point": {"row": 284, "column": 8}, "end_point": {"row": 284, "column": 69}}, {"id": 1639, "type": "identifier", "text": "imitate", "parent": 1638, "children": [], "start_point": {"row": 284, "column": 8}, "end_point": {"row": 284, "column": 15}}, {"id": 1640, "type": "argument_list", "text": "(dst, src, getCvImageType(getChannels(src), dstDepth))", "parent": 1638, "children": [1641, 1642, 1643], "start_point": {"row": 284, "column": 15}, "end_point": {"row": 284, "column": 69}}, {"id": 1641, "type": "identifier", "text": "dst", "parent": 1640, "children": [], "start_point": {"row": 284, "column": 16}, "end_point": {"row": 284, "column": 19}}, {"id": 1642, "type": "identifier", "text": "src", "parent": 1640, "children": [], "start_point": {"row": 284, "column": 21}, "end_point": {"row": 284, "column": 24}}, {"id": 1643, "type": "call_expression", "text": "getCvImageType(getChannels(src), dstDepth)", "parent": 1640, "children": [1644, 1645], "start_point": {"row": 284, "column": 26}, "end_point": {"row": 284, "column": 68}}, {"id": 1644, "type": "identifier", "text": "getCvImageType", "parent": 1643, "children": [], "start_point": {"row": 284, "column": 26}, "end_point": {"row": 284, "column": 40}}, {"id": 1645, "type": "argument_list", "text": "(getChannels(src), dstDepth)", "parent": 1643, "children": [1646, 1650], "start_point": {"row": 284, "column": 40}, "end_point": {"row": 284, "column": 68}}, {"id": 1646, "type": "call_expression", "text": "getChannels(src)", "parent": 1645, "children": [1647, 1648], "start_point": {"row": 284, "column": 41}, "end_point": {"row": 284, "column": 57}}, {"id": 1647, "type": "identifier", "text": "getChannels", "parent": 1646, "children": [], "start_point": {"row": 284, "column": 41}, "end_point": {"row": 284, "column": 52}}, {"id": 1648, "type": "argument_list", "text": "(src)", "parent": 1646, "children": [1649], "start_point": {"row": 284, "column": 52}, "end_point": {"row": 284, "column": 57}}, {"id": 1649, "type": "identifier", "text": "src", "parent": 1648, "children": [], "start_point": {"row": 284, "column": 53}, "end_point": {"row": 284, "column": 56}}, {"id": 1650, "type": "identifier", "text": "dstDepth", "parent": 1645, "children": [], "start_point": {"row": 284, "column": 59}, "end_point": {"row": 284, "column": 67}}, {"id": 1651, "type": "labeled_statement", "text": "cv::Mat srcMat = toCv(src);", "parent": null, "children": [1652, 1653], "start_point": {"row": 285, "column": 8}, "end_point": {"row": 285, "column": 35}}, {"id": 1652, "type": "statement_identifier", "text": "cv", "parent": 1651, "children": [], "start_point": {"row": 285, "column": 8}, "end_point": {"row": 285, "column": 10}}, {"id": 1653, "type": "declaration", "text": "Mat srcMat = toCv(src);", "parent": 1651, "children": [1654, 1655], "start_point": {"row": 285, "column": 12}, "end_point": {"row": 285, "column": 35}}, {"id": 1654, "type": "type_identifier", "text": "Mat", "parent": 1653, "children": [], "start_point": {"row": 285, "column": 12}, "end_point": {"row": 285, "column": 15}}, {"id": 1655, "type": "init_declarator", "text": "srcMat = toCv(src)", "parent": 1653, "children": [1656, 1657, 1658], "start_point": {"row": 285, "column": 16}, "end_point": {"row": 285, "column": 34}}, {"id": 1656, "type": "identifier", "text": "srcMat", "parent": 1655, "children": [], "start_point": {"row": 285, "column": 16}, "end_point": {"row": 285, "column": 22}}, {"id": 1657, "type": "=", "text": "=", "parent": 1655, "children": [], "start_point": {"row": 285, "column": 23}, "end_point": {"row": 285, "column": 24}}, {"id": 1658, "type": "call_expression", "text": "toCv(src)", "parent": 1655, "children": [1659, 1660], "start_point": {"row": 285, "column": 25}, "end_point": {"row": 285, "column": 34}}, {"id": 1659, "type": "identifier", "text": "toCv", "parent": 1658, "children": [], "start_point": {"row": 285, "column": 25}, "end_point": {"row": 285, "column": 29}}, {"id": 1660, "type": "argument_list", "text": "(src)", "parent": 1658, "children": [1661], "start_point": {"row": 285, "column": 29}, "end_point": {"row": 285, "column": 34}}, {"id": 1661, "type": "identifier", "text": "src", "parent": 1660, "children": [], "start_point": {"row": 285, "column": 30}, "end_point": {"row": 285, "column": 33}}, {"id": 1662, "type": "labeled_statement", "text": "cv::Mat dstMat = toCv(dst);", "parent": null, "children": [1663, 1664], "start_point": {"row": 286, "column": 8}, "end_point": {"row": 286, "column": 35}}, {"id": 1663, "type": "statement_identifier", "text": "cv", "parent": 1662, "children": [], "start_point": {"row": 286, "column": 8}, "end_point": {"row": 286, "column": 10}}, {"id": 1664, "type": "declaration", "text": "Mat dstMat = toCv(dst);", "parent": 1662, "children": [1665, 1666], "start_point": {"row": 286, "column": 12}, "end_point": {"row": 286, "column": 35}}, {"id": 1665, "type": "type_identifier", "text": "Mat", "parent": 1664, "children": [], "start_point": {"row": 286, "column": 12}, "end_point": {"row": 286, "column": 15}}, {"id": 1666, "type": "init_declarator", "text": "dstMat = toCv(dst)", "parent": 1664, "children": [1667, 1668, 1669], "start_point": {"row": 286, "column": 16}, "end_point": {"row": 286, "column": 34}}, {"id": 1667, "type": "identifier", "text": "dstMat", "parent": 1666, "children": [], "start_point": {"row": 286, "column": 16}, "end_point": {"row": 286, "column": 22}}, {"id": 1668, "type": "=", "text": "=", "parent": 1666, "children": [], "start_point": {"row": 286, "column": 23}, "end_point": {"row": 286, "column": 24}}, {"id": 1669, "type": "call_expression", "text": "toCv(dst)", "parent": 1666, "children": [1670, 1671], "start_point": {"row": 286, "column": 25}, "end_point": {"row": 286, "column": 34}}, {"id": 1670, "type": "identifier", "text": "toCv", "parent": 1669, "children": [], "start_point": {"row": 286, "column": 25}, "end_point": {"row": 286, "column": 29}}, {"id": 1671, "type": "argument_list", "text": "(dst)", "parent": 1669, "children": [1672], "start_point": {"row": 286, "column": 29}, "end_point": {"row": 286, "column": 34}}, {"id": 1672, "type": "identifier", "text": "dst", "parent": 1671, "children": [], "start_point": {"row": 286, "column": 30}, "end_point": {"row": 286, "column": 33}}, {"id": 1673, "type": "if_statement", "text": "if(srcMat.type() == dstMat.type()) {\n srcMat.copyTo(dstMat);\n } else {\n double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n srcMat.convertTo(dstMat, dstMat.depth(), alpha);\n }", "parent": null, "children": [1674, 1693], "start_point": {"row": 287, "column": 8}, "end_point": {"row": 292, "column": 9}}, {"id": 1674, "type": "parenthesized_expression", "text": "(srcMat.type() == dstMat.type())", "parent": 1673, "children": [1675], "start_point": {"row": 287, "column": 10}, "end_point": {"row": 287, "column": 42}}, {"id": 1675, "type": "binary_expression", "text": "srcMat.type() == dstMat.type()", "parent": 1674, "children": [1676, 1681, 1682], "start_point": {"row": 287, "column": 11}, "end_point": {"row": 287, "column": 41}}, {"id": 1676, "type": "call_expression", "text": "srcMat.type()", "parent": 1675, "children": [1677, 1680], "start_point": {"row": 287, "column": 11}, "end_point": {"row": 287, "column": 24}}, {"id": 1677, "type": "field_expression", "text": "srcMat.type", "parent": 1676, "children": [1678, 1679], "start_point": {"row": 287, "column": 11}, "end_point": {"row": 287, "column": 22}}, {"id": 1678, "type": "identifier", "text": "srcMat", "parent": 1677, "children": [], "start_point": {"row": 287, "column": 11}, "end_point": {"row": 287, "column": 17}}, {"id": 1679, "type": "field_identifier", "text": "type", "parent": 1677, "children": [], "start_point": {"row": 287, "column": 18}, "end_point": {"row": 287, "column": 22}}, {"id": 1680, "type": "argument_list", "text": "()", "parent": 1676, "children": [], "start_point": {"row": 287, "column": 22}, "end_point": {"row": 287, "column": 24}}, {"id": 1681, "type": "==", "text": "==", "parent": 1675, "children": [], "start_point": {"row": 287, "column": 25}, "end_point": {"row": 287, "column": 27}}, {"id": 1682, "type": "call_expression", "text": "dstMat.type()", "parent": 1675, "children": [1683, 1686], "start_point": {"row": 287, "column": 28}, "end_point": {"row": 287, "column": 41}}, {"id": 1683, "type": "field_expression", "text": "dstMat.type", "parent": 1682, "children": [1684, 1685], "start_point": {"row": 287, "column": 28}, "end_point": {"row": 287, "column": 39}}, {"id": 1684, "type": "identifier", "text": "dstMat", "parent": 1683, "children": [], "start_point": {"row": 287, "column": 28}, "end_point": {"row": 287, "column": 34}}, {"id": 1685, "type": "field_identifier", "text": "type", "parent": 1683, "children": [], "start_point": {"row": 287, "column": 35}, "end_point": {"row": 287, "column": 39}}, {"id": 1686, "type": "argument_list", "text": "()", "parent": 1682, "children": [], "start_point": {"row": 287, "column": 39}, "end_point": {"row": 287, "column": 41}}, {"id": 1687, "type": "call_expression", "text": "srcMat.copyTo(dstMat)", "parent": 1673, "children": [1688, 1691], "start_point": {"row": 288, "column": 12}, "end_point": {"row": 288, "column": 33}}, {"id": 1688, "type": "field_expression", "text": "srcMat.copyTo", "parent": 1687, "children": [1689, 1690], "start_point": {"row": 288, "column": 12}, "end_point": {"row": 288, "column": 25}}, {"id": 1689, "type": "identifier", "text": "srcMat", "parent": 1688, "children": [], "start_point": {"row": 288, "column": 12}, "end_point": {"row": 288, "column": 18}}, {"id": 1690, "type": "field_identifier", "text": "copyTo", "parent": 1688, "children": [], "start_point": {"row": 288, "column": 19}, "end_point": {"row": 288, "column": 25}}, {"id": 1691, "type": "argument_list", "text": "(dstMat)", "parent": 1687, "children": [1692], "start_point": {"row": 288, "column": 25}, "end_point": {"row": 288, "column": 33}}, {"id": 1692, "type": "identifier", "text": "dstMat", "parent": 1691, "children": [], "start_point": {"row": 288, "column": 26}, "end_point": {"row": 288, "column": 32}}, {"id": 1693, "type": "else_clause", "text": "else {\n double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n srcMat.convertTo(dstMat, dstMat.depth(), alpha);\n }", "parent": 1673, "children": [], "start_point": {"row": 289, "column": 10}, "end_point": {"row": 292, "column": 9}}, {"id": 1694, "type": "declaration", "text": "double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);", "parent": 1693, "children": [1695, 1696], "start_point": {"row": 290, "column": 12}, "end_point": {"row": 290, "column": 65}}, {"id": 1695, "type": "primitive_type", "text": "double", "parent": 1694, "children": [], "start_point": {"row": 290, "column": 12}, "end_point": {"row": 290, "column": 18}}, {"id": 1696, "type": "init_declarator", "text": "alpha = getMaxVal(dstMat) / getMaxVal(srcMat)", "parent": 1694, "children": [1697, 1698, 1699], "start_point": {"row": 290, "column": 19}, "end_point": {"row": 290, "column": 64}}, {"id": 1697, "type": "identifier", "text": "alpha", "parent": 1696, "children": [], "start_point": {"row": 290, "column": 19}, "end_point": {"row": 290, "column": 24}}, {"id": 1698, "type": "=", "text": "=", "parent": 1696, "children": [], "start_point": {"row": 290, "column": 25}, "end_point": {"row": 290, "column": 26}}, {"id": 1699, "type": "binary_expression", "text": "getMaxVal(dstMat) / getMaxVal(srcMat)", "parent": 1696, "children": [1700, 1704, 1705], "start_point": {"row": 290, "column": 27}, "end_point": {"row": 290, "column": 64}}, {"id": 1700, "type": "call_expression", "text": "getMaxVal(dstMat)", "parent": 1699, "children": [1701, 1702], "start_point": {"row": 290, "column": 27}, "end_point": {"row": 290, "column": 44}}, {"id": 1701, "type": "identifier", "text": "getMaxVal", "parent": 1700, "children": [], "start_point": {"row": 290, "column": 27}, "end_point": {"row": 290, "column": 36}}, {"id": 1702, "type": "argument_list", "text": "(dstMat)", "parent": 1700, "children": [1703], "start_point": {"row": 290, "column": 36}, "end_point": {"row": 290, "column": 44}}, {"id": 1703, "type": "identifier", "text": "dstMat", "parent": 1702, "children": [], "start_point": {"row": 290, "column": 37}, "end_point": {"row": 290, "column": 43}}, {"id": 1704, "type": "/", "text": "/", "parent": 1699, "children": [], "start_point": {"row": 290, "column": 45}, "end_point": {"row": 290, "column": 46}}, {"id": 1705, "type": "call_expression", "text": "getMaxVal(srcMat)", "parent": 1699, "children": [1706, 1707], "start_point": {"row": 290, "column": 47}, "end_point": {"row": 290, "column": 64}}, {"id": 1706, "type": "identifier", "text": "getMaxVal", "parent": 1705, "children": [], "start_point": {"row": 290, "column": 47}, "end_point": {"row": 290, "column": 56}}, {"id": 1707, "type": "argument_list", "text": "(srcMat)", "parent": 1705, "children": [1708], "start_point": {"row": 290, "column": 56}, "end_point": {"row": 290, "column": 64}}, {"id": 1708, "type": "identifier", "text": "srcMat", "parent": 1707, "children": [], "start_point": {"row": 290, "column": 57}, "end_point": {"row": 290, "column": 63}}, {"id": 1709, "type": "call_expression", "text": "srcMat.convertTo(dstMat, dstMat.depth(), alpha)", "parent": 1693, "children": [1710, 1713], "start_point": {"row": 291, "column": 12}, "end_point": {"row": 291, "column": 59}}, {"id": 1710, "type": "field_expression", "text": "srcMat.convertTo", "parent": 1709, "children": [1711, 1712], "start_point": {"row": 291, "column": 12}, "end_point": {"row": 291, "column": 28}}, {"id": 1711, "type": "identifier", "text": "srcMat", "parent": 1710, "children": [], "start_point": {"row": 291, "column": 12}, "end_point": {"row": 291, "column": 18}}, {"id": 1712, "type": "field_identifier", "text": "convertTo", "parent": 1710, "children": [], "start_point": {"row": 291, "column": 19}, "end_point": {"row": 291, "column": 28}}, {"id": 1713, "type": "argument_list", "text": "(dstMat, dstMat.depth(), alpha)", "parent": 1709, "children": [1714, 1715, 1720], "start_point": {"row": 291, "column": 28}, "end_point": {"row": 291, "column": 59}}, {"id": 1714, "type": "identifier", "text": "dstMat", "parent": 1713, "children": [], "start_point": {"row": 291, "column": 29}, "end_point": {"row": 291, "column": 35}}, {"id": 1715, "type": "call_expression", "text": "dstMat.depth()", "parent": 1713, "children": [1716, 1719], "start_point": {"row": 291, "column": 37}, "end_point": {"row": 291, "column": 51}}, {"id": 1716, "type": "field_expression", "text": "dstMat.depth", "parent": 1715, "children": [1717, 1718], "start_point": {"row": 291, "column": 37}, "end_point": {"row": 291, "column": 49}}, {"id": 1717, "type": "identifier", "text": "dstMat", "parent": 1716, "children": [], "start_point": {"row": 291, "column": 37}, "end_point": {"row": 291, "column": 43}}, {"id": 1718, "type": "field_identifier", "text": "depth", "parent": 1716, "children": [], "start_point": {"row": 291, "column": 44}, "end_point": {"row": 291, "column": 49}}, {"id": 1719, "type": "argument_list", "text": "()", "parent": 1715, "children": [], "start_point": {"row": 291, "column": 49}, "end_point": {"row": 291, "column": 51}}, {"id": 1720, "type": "identifier", "text": "alpha", "parent": 1713, "children": [], "start_point": {"row": 291, "column": 53}, "end_point": {"row": 291, "column": 58}}, {"id": 1721, "type": "ERROR", "text": "template <class S, class D>\n\tvoid copy(S& src, D& dst)", "parent": null, "children": [1722], "start_point": {"row": 298, "column": 1}, "end_point": {"row": 299, "column": 26}}, {"id": 1722, "type": "binary_expression", "text": "template <class S, class D>\n\tvoid copy(S& src, D& dst)", "parent": 1721, "children": [1723, 1726, 1729, 1730, 1732], "start_point": {"row": 298, "column": 1}, "end_point": {"row": 299, "column": 26}}, {"id": 1723, "type": "binary_expression", "text": "template <class", "parent": 1722, "children": [1724, 1725], "start_point": {"row": 298, "column": 1}, "end_point": {"row": 298, "column": 16}}, {"id": 1724, "type": "identifier", "text": "template", "parent": 1723, "children": [], "start_point": {"row": 298, "column": 1}, "end_point": {"row": 298, "column": 9}}, {"id": 1725, "type": "<", "text": "<", "parent": 1723, "children": [], "start_point": {"row": 298, "column": 10}, "end_point": {"row": 298, "column": 11}}, {"id": 1726, "type": "ERROR", "text": "S, class D", "parent": 1722, "children": [1727, 1728], "start_point": {"row": 298, "column": 17}, "end_point": {"row": 298, "column": 27}}, {"id": 1727, "type": "identifier", "text": "S", "parent": 1726, "children": [], "start_point": {"row": 298, "column": 17}, "end_point": {"row": 298, "column": 18}}, {"id": 1728, "type": "identifier", "text": "D", "parent": 1726, "children": [], "start_point": {"row": 298, "column": 26}, "end_point": {"row": 298, "column": 27}}, {"id": 1729, "type": ">", "text": ">", "parent": 1722, "children": [], "start_point": {"row": 298, "column": 27}, "end_point": {"row": 298, "column": 28}}, {"id": 1730, "type": "ERROR", "text": "void", "parent": 1722, "children": [1731], "start_point": {"row": 299, "column": 1}, "end_point": {"row": 299, "column": 5}}, {"id": 1731, "type": "identifier", "text": "void", "parent": 1730, "children": [], "start_point": {"row": 299, "column": 1}, "end_point": {"row": 299, "column": 5}}, {"id": 1732, "type": "call_expression", "text": "copy(S& src, D& dst)", "parent": 1722, "children": [1733, 1734], "start_point": {"row": 299, "column": 6}, "end_point": {"row": 299, "column": 26}}, {"id": 1733, "type": "identifier", "text": "copy", "parent": 1732, "children": [], "start_point": {"row": 299, "column": 6}, "end_point": {"row": 299, "column": 10}}, {"id": 1734, "type": "argument_list", "text": "(S& src, D& dst)", "parent": 1732, "children": [1735, 1738], "start_point": {"row": 299, "column": 10}, "end_point": {"row": 299, "column": 26}}, {"id": 1735, "type": "binary_expression", "text": "S& src", "parent": 1734, "children": [1736, 1737], "start_point": {"row": 299, "column": 11}, "end_point": {"row": 299, "column": 17}}, {"id": 1736, "type": "identifier", "text": "S", "parent": 1735, "children": [], "start_point": {"row": 299, "column": 11}, "end_point": {"row": 299, "column": 12}}, {"id": 1737, "type": "identifier", "text": "src", "parent": 1735, "children": [], "start_point": {"row": 299, "column": 14}, "end_point": {"row": 299, "column": 17}}, {"id": 1738, "type": "binary_expression", "text": "D& dst", "parent": 1734, "children": [1739, 1740], "start_point": {"row": 299, "column": 19}, "end_point": {"row": 299, "column": 25}}, {"id": 1739, "type": "identifier", "text": "D", "parent": 1738, "children": [], "start_point": {"row": 299, "column": 19}, "end_point": {"row": 299, "column": 20}}, {"id": 1740, "type": "identifier", "text": "dst", "parent": 1738, "children": [], "start_point": {"row": 299, "column": 22}, "end_point": {"row": 299, "column": 25}}, {"id": 1741, "type": "declaration", "text": "int dstDepth = 0;", "parent": null, "children": [1742, 1743], "start_point": {"row": 300, "column": 2}, "end_point": {"row": 300, "column": 19}}, {"id": 1742, "type": "primitive_type", "text": "int", "parent": 1741, "children": [], "start_point": {"row": 300, "column": 2}, "end_point": {"row": 300, "column": 5}}, {"id": 1743, "type": "init_declarator", "text": "dstDepth = 0", "parent": 1741, "children": [1744, 1745, 1746], "start_point": {"row": 300, "column": 6}, "end_point": {"row": 300, "column": 18}}, {"id": 1744, "type": "identifier", "text": "dstDepth", "parent": 1743, "children": [], "start_point": {"row": 300, "column": 6}, "end_point": {"row": 300, "column": 14}}, {"id": 1745, "type": "=", "text": "=", "parent": 1743, "children": [], "start_point": {"row": 300, "column": 15}, "end_point": {"row": 300, "column": 16}}, {"id": 1746, "type": "number_literal", "text": "0", "parent": 1743, "children": [], "start_point": {"row": 300, "column": 17}, "end_point": {"row": 300, "column": 18}}, {"id": 1747, "type": "if_statement", "text": "if(getAllocated(dst)) {\n\t\t\tdstDepth = getDepth(dst);\n\t\t} else {\n\t\t\tdstDepth = getDepth(src);\n\t\t}", "parent": null, "children": [1748, 1760], "start_point": {"row": 301, "column": 2}, "end_point": {"row": 305, "column": 3}}, {"id": 1748, "type": "parenthesized_expression", "text": "(getAllocated(dst))", "parent": 1747, "children": [1749], "start_point": {"row": 301, "column": 4}, "end_point": {"row": 301, "column": 23}}, {"id": 1749, "type": "call_expression", "text": "getAllocated(dst)", "parent": 1748, "children": [1750, 1751], "start_point": {"row": 301, "column": 5}, "end_point": {"row": 301, "column": 22}}, {"id": 1750, "type": "identifier", "text": "getAllocated", "parent": 1749, "children": [], "start_point": {"row": 301, "column": 5}, "end_point": {"row": 301, "column": 17}}, {"id": 1751, "type": "argument_list", "text": "(dst)", "parent": 1749, "children": [1752], "start_point": {"row": 301, "column": 17}, "end_point": {"row": 301, "column": 22}}, {"id": 1752, "type": "identifier", "text": "dst", "parent": 1751, "children": [], "start_point": {"row": 301, "column": 18}, "end_point": {"row": 301, "column": 21}}, {"id": 1753, "type": "assignment_expression", "text": "dstDepth = getDepth(dst)", "parent": 1747, "children": [1754, 1755, 1756], "start_point": {"row": 302, "column": 3}, "end_point": {"row": 302, "column": 27}}, {"id": 1754, "type": "identifier", "text": "dstDepth", "parent": 1753, "children": [], "start_point": {"row": 302, "column": 3}, "end_point": {"row": 302, "column": 11}}, {"id": 1755, "type": "=", "text": "=", "parent": 1753, "children": [], "start_point": {"row": 302, "column": 12}, "end_point": {"row": 302, "column": 13}}, {"id": 1756, "type": "call_expression", "text": "getDepth(dst)", "parent": 1753, "children": [1757, 1758], "start_point": {"row": 302, "column": 14}, "end_point": {"row": 302, "column": 27}}, {"id": 1757, "type": "identifier", "text": "getDepth", "parent": 1756, "children": [], "start_point": {"row": 302, "column": 14}, "end_point": {"row": 302, "column": 22}}, {"id": 1758, "type": "argument_list", "text": "(dst)", "parent": 1756, "children": [1759], "start_point": {"row": 302, "column": 22}, "end_point": {"row": 302, "column": 27}}, {"id": 1759, "type": "identifier", "text": "dst", "parent": 1758, "children": [], "start_point": {"row": 302, "column": 23}, "end_point": {"row": 302, "column": 26}}, {"id": 1760, "type": "else_clause", "text": "else {\n\t\t\tdstDepth = getDepth(src);\n\t\t}", "parent": 1747, "children": [], "start_point": {"row": 303, "column": 4}, "end_point": {"row": 305, "column": 3}}, {"id": 1761, "type": "assignment_expression", "text": "dstDepth = getDepth(src)", "parent": 1760, "children": [1762, 1763, 1764], "start_point": {"row": 304, "column": 3}, "end_point": {"row": 304, "column": 27}}, {"id": 1762, "type": "identifier", "text": "dstDepth", "parent": 1761, "children": [], "start_point": {"row": 304, "column": 3}, "end_point": {"row": 304, "column": 11}}, {"id": 1763, "type": "=", "text": "=", "parent": 1761, "children": [], "start_point": {"row": 304, "column": 12}, "end_point": {"row": 304, "column": 13}}, {"id": 1764, "type": "call_expression", "text": "getDepth(src)", "parent": 1761, "children": [1765, 1766], "start_point": {"row": 304, "column": 14}, "end_point": {"row": 304, "column": 27}}, {"id": 1765, "type": "identifier", "text": "getDepth", "parent": 1764, "children": [], "start_point": {"row": 304, "column": 14}, "end_point": {"row": 304, "column": 22}}, {"id": 1766, "type": "argument_list", "text": "(src)", "parent": 1764, "children": [1767], "start_point": {"row": 304, "column": 22}, "end_point": {"row": 304, "column": 27}}, {"id": 1767, "type": "identifier", "text": "src", "parent": 1766, "children": [], "start_point": {"row": 304, "column": 23}, "end_point": {"row": 304, "column": 26}}, {"id": 1768, "type": "call_expression", "text": "copy(src, dst, dstDepth)", "parent": null, "children": [1769, 1770], "start_point": {"row": 306, "column": 2}, "end_point": {"row": 306, "column": 26}}, {"id": 1769, "type": "identifier", "text": "copy", "parent": 1768, "children": [], "start_point": {"row": 306, "column": 2}, "end_point": {"row": 306, "column": 6}}, {"id": 1770, "type": "argument_list", "text": "(src, dst, dstDepth)", "parent": 1768, "children": [1771, 1772, 1773], "start_point": {"row": 306, "column": 6}, "end_point": {"row": 306, "column": 26}}, {"id": 1771, "type": "identifier", "text": "src", "parent": 1770, "children": [], "start_point": {"row": 306, "column": 7}, "end_point": {"row": 306, "column": 10}}, {"id": 1772, "type": "identifier", "text": "dst", "parent": 1770, "children": [], "start_point": {"row": 306, "column": 12}, "end_point": {"row": 306, "column": 15}}, {"id": 1773, "type": "identifier", "text": "dstDepth", "parent": 1770, "children": [], "start_point": {"row": 306, "column": 17}, "end_point": {"row": 306, "column": 25}}, {"id": 1774, "type": "ERROR", "text": "template <class S, class D>\n void copy(const S& src, D& dst)", "parent": null, "children": [1775], "start_point": {"row": 309, "column": 4}, "end_point": {"row": 310, "column": 35}}, {"id": 1775, "type": "binary_expression", "text": "template <class S, class D>\n void copy(const S& src, D& dst)", "parent": 1774, "children": [1776, 1779, 1782, 1783, 1785], "start_point": {"row": 309, "column": 4}, "end_point": {"row": 310, "column": 35}}, {"id": 1776, "type": "binary_expression", "text": "template <class", "parent": 1775, "children": [1777, 1778], "start_point": {"row": 309, "column": 4}, "end_point": {"row": 309, "column": 19}}, {"id": 1777, "type": "identifier", "text": "template", "parent": 1776, "children": [], "start_point": {"row": 309, "column": 4}, "end_point": {"row": 309, "column": 12}}, {"id": 1778, "type": "<", "text": "<", "parent": 1776, "children": [], "start_point": {"row": 309, "column": 13}, "end_point": {"row": 309, "column": 14}}, {"id": 1779, "type": "ERROR", "text": "S, class D", "parent": 1775, "children": [1780, 1781], "start_point": {"row": 309, "column": 20}, "end_point": {"row": 309, "column": 30}}, {"id": 1780, "type": "identifier", "text": "S", "parent": 1779, "children": [], "start_point": {"row": 309, "column": 20}, "end_point": {"row": 309, "column": 21}}, {"id": 1781, "type": "identifier", "text": "D", "parent": 1779, "children": [], "start_point": {"row": 309, "column": 29}, "end_point": {"row": 309, "column": 30}}, {"id": 1782, "type": ">", "text": ">", "parent": 1775, "children": [], "start_point": {"row": 309, "column": 30}, "end_point": {"row": 309, "column": 31}}, {"id": 1783, "type": "ERROR", "text": "void", "parent": 1775, "children": [1784], "start_point": {"row": 310, "column": 4}, "end_point": {"row": 310, "column": 8}}, {"id": 1784, "type": "identifier", "text": "void", "parent": 1783, "children": [], "start_point": {"row": 310, "column": 4}, "end_point": {"row": 310, "column": 8}}, {"id": 1785, "type": "call_expression", "text": "copy(const S& src, D& dst)", "parent": 1775, "children": [1786, 1787], "start_point": {"row": 310, "column": 9}, "end_point": {"row": 310, "column": 35}}, {"id": 1786, "type": "identifier", "text": "copy", "parent": 1785, "children": [], "start_point": {"row": 310, "column": 9}, "end_point": {"row": 310, "column": 13}}, {"id": 1787, "type": "argument_list", "text": "(const S& src, D& dst)", "parent": 1785, "children": [1788, 1792], "start_point": {"row": 310, "column": 13}, "end_point": {"row": 310, "column": 35}}, {"id": 1788, "type": "binary_expression", "text": "const S& src", "parent": 1787, "children": [1789, 1791], "start_point": {"row": 310, "column": 14}, "end_point": {"row": 310, "column": 26}}, {"id": 1789, "type": "ERROR", "text": "S", "parent": 1788, "children": [1790], "start_point": {"row": 310, "column": 20}, "end_point": {"row": 310, "column": 21}}, {"id": 1790, "type": "identifier", "text": "S", "parent": 1789, "children": [], "start_point": {"row": 310, "column": 20}, "end_point": {"row": 310, "column": 21}}, {"id": 1791, "type": "identifier", "text": "src", "parent": 1788, "children": [], "start_point": {"row": 310, "column": 23}, "end_point": {"row": 310, "column": 26}}, {"id": 1792, "type": "binary_expression", "text": "D& dst", "parent": 1787, "children": [1793, 1794], "start_point": {"row": 310, "column": 28}, "end_point": {"row": 310, "column": 34}}, {"id": 1793, "type": "identifier", "text": "D", "parent": 1792, "children": [], "start_point": {"row": 310, "column": 28}, "end_point": {"row": 310, "column": 29}}, {"id": 1794, "type": "identifier", "text": "dst", "parent": 1792, "children": [], "start_point": {"row": 310, "column": 31}, "end_point": {"row": 310, "column": 34}}, {"id": 1795, "type": "declaration", "text": "int dstDepth = 0;", "parent": null, "children": [1796, 1797], "start_point": {"row": 311, "column": 8}, "end_point": {"row": 311, "column": 25}}, {"id": 1796, "type": "primitive_type", "text": "int", "parent": 1795, "children": [], "start_point": {"row": 311, "column": 8}, "end_point": {"row": 311, "column": 11}}, {"id": 1797, "type": "init_declarator", "text": "dstDepth = 0", "parent": 1795, "children": [1798, 1799, 1800], "start_point": {"row": 311, "column": 12}, "end_point": {"row": 311, "column": 24}}, {"id": 1798, "type": "identifier", "text": "dstDepth", "parent": 1797, "children": [], "start_point": {"row": 311, "column": 12}, "end_point": {"row": 311, "column": 20}}, {"id": 1799, "type": "=", "text": "=", "parent": 1797, "children": [], "start_point": {"row": 311, "column": 21}, "end_point": {"row": 311, "column": 22}}, {"id": 1800, "type": "number_literal", "text": "0", "parent": 1797, "children": [], "start_point": {"row": 311, "column": 23}, "end_point": {"row": 311, "column": 24}}, {"id": 1801, "type": "if_statement", "text": "if(getAllocated(dst)) {\n dstDepth = getDepth(dst);\n } else {\n dstDepth = getDepth(src);\n }", "parent": null, "children": [1802, 1814], "start_point": {"row": 312, "column": 8}, "end_point": {"row": 316, "column": 9}}, {"id": 1802, "type": "parenthesized_expression", "text": "(getAllocated(dst))", "parent": 1801, "children": [1803], "start_point": {"row": 312, "column": 10}, "end_point": {"row": 312, "column": 29}}, {"id": 1803, "type": "call_expression", "text": "getAllocated(dst)", "parent": 1802, "children": [1804, 1805], "start_point": {"row": 312, "column": 11}, "end_point": {"row": 312, "column": 28}}, {"id": 1804, "type": "identifier", "text": "getAllocated", "parent": 1803, "children": [], "start_point": {"row": 312, "column": 11}, "end_point": {"row": 312, "column": 23}}, {"id": 1805, "type": "argument_list", "text": "(dst)", "parent": 1803, "children": [1806], "start_point": {"row": 312, "column": 23}, "end_point": {"row": 312, "column": 28}}, {"id": 1806, "type": "identifier", "text": "dst", "parent": 1805, "children": [], "start_point": {"row": 312, "column": 24}, "end_point": {"row": 312, "column": 27}}, {"id": 1807, "type": "assignment_expression", "text": "dstDepth = getDepth(dst)", "parent": 1801, "children": [1808, 1809, 1810], "start_point": {"row": 313, "column": 12}, "end_point": {"row": 313, "column": 36}}, {"id": 1808, "type": "identifier", "text": "dstDepth", "parent": 1807, "children": [], "start_point": {"row": 313, "column": 12}, "end_point": {"row": 313, "column": 20}}, {"id": 1809, "type": "=", "text": "=", "parent": 1807, "children": [], "start_point": {"row": 313, "column": 21}, "end_point": {"row": 313, "column": 22}}, {"id": 1810, "type": "call_expression", "text": "getDepth(dst)", "parent": 1807, "children": [1811, 1812], "start_point": {"row": 313, "column": 23}, "end_point": {"row": 313, "column": 36}}, {"id": 1811, "type": "identifier", "text": "getDepth", "parent": 1810, "children": [], "start_point": {"row": 313, "column": 23}, "end_point": {"row": 313, "column": 31}}, {"id": 1812, "type": "argument_list", "text": "(dst)", "parent": 1810, "children": [1813], "start_point": {"row": 313, "column": 31}, "end_point": {"row": 313, "column": 36}}, {"id": 1813, "type": "identifier", "text": "dst", "parent": 1812, "children": [], "start_point": {"row": 313, "column": 32}, "end_point": {"row": 313, "column": 35}}, {"id": 1814, "type": "else_clause", "text": "else {\n dstDepth = getDepth(src);\n }", "parent": 1801, "children": [], "start_point": {"row": 314, "column": 10}, "end_point": {"row": 316, "column": 9}}, {"id": 1815, "type": "assignment_expression", "text": "dstDepth = getDepth(src)", "parent": 1814, "children": [1816, 1817, 1818], "start_point": {"row": 315, "column": 12}, "end_point": {"row": 315, "column": 36}}, {"id": 1816, "type": "identifier", "text": "dstDepth", "parent": 1815, "children": [], "start_point": {"row": 315, "column": 12}, "end_point": {"row": 315, "column": 20}}, {"id": 1817, "type": "=", "text": "=", "parent": 1815, "children": [], "start_point": {"row": 315, "column": 21}, "end_point": {"row": 315, "column": 22}}, {"id": 1818, "type": "call_expression", "text": "getDepth(src)", "parent": 1815, "children": [1819, 1820], "start_point": {"row": 315, "column": 23}, "end_point": {"row": 315, "column": 36}}, {"id": 1819, "type": "identifier", "text": "getDepth", "parent": 1818, "children": [], "start_point": {"row": 315, "column": 23}, "end_point": {"row": 315, "column": 31}}, {"id": 1820, "type": "argument_list", "text": "(src)", "parent": 1818, "children": [1821], "start_point": {"row": 315, "column": 31}, "end_point": {"row": 315, "column": 36}}, {"id": 1821, "type": "identifier", "text": "src", "parent": 1820, "children": [], "start_point": {"row": 315, "column": 32}, "end_point": {"row": 315, "column": 35}}, {"id": 1822, "type": "call_expression", "text": "copy(src, dst, dstDepth)", "parent": null, "children": [1823, 1824], "start_point": {"row": 317, "column": 8}, "end_point": {"row": 317, "column": 32}}, {"id": 1823, "type": "identifier", "text": "copy", "parent": 1822, "children": [], "start_point": {"row": 317, "column": 8}, "end_point": {"row": 317, "column": 12}}, {"id": 1824, "type": "argument_list", "text": "(src, dst, dstDepth)", "parent": 1822, "children": [1825, 1826, 1827], "start_point": {"row": 317, "column": 12}, "end_point": {"row": 317, "column": 32}}, {"id": 1825, "type": "identifier", "text": "src", "parent": 1824, "children": [], "start_point": {"row": 317, "column": 13}, "end_point": {"row": 317, "column": 16}}, {"id": 1826, "type": "identifier", "text": "dst", "parent": 1824, "children": [], "start_point": {"row": 317, "column": 18}, "end_point": {"row": 317, "column": 21}}, {"id": 1827, "type": "identifier", "text": "dstDepth", "parent": 1824, "children": [], "start_point": {"row": 317, "column": 23}, "end_point": {"row": 317, "column": 31}}, {"id": 1828, "type": "labeled_statement", "text": "glm::vec2 toOf(cv::Point2f point);", "parent": null, "children": [1829, 1830, 1834], "start_point": {"row": 321, "column": 1}, "end_point": {"row": 321, "column": 35}}, {"id": 1829, "type": "statement_identifier", "text": "glm", "parent": 1828, "children": [], "start_point": {"row": 321, "column": 1}, "end_point": {"row": 321, "column": 4}}, {"id": 1830, "type": "ERROR", "text": "::vec2 toOf(cv:", "parent": 1828, "children": [1831, 1832, 1833], "start_point": {"row": 321, "column": 4}, "end_point": {"row": 321, "column": 19}}, {"id": 1831, "type": "type_identifier", "text": "vec2", "parent": 1830, "children": [], "start_point": {"row": 321, "column": 6}, "end_point": {"row": 321, "column": 10}}, {"id": 1832, "type": "identifier", "text": "toOf", "parent": 1830, "children": [], "start_point": {"row": 321, "column": 11}, "end_point": {"row": 321, "column": 15}}, {"id": 1833, "type": "type_identifier", "text": "cv", "parent": 1830, "children": [], "start_point": {"row": 321, "column": 16}, "end_point": {"row": 321, "column": 18}}, {"id": 1834, "type": "declaration", "text": "Point2f point);", "parent": 1828, "children": [1835, 1836], "start_point": {"row": 321, "column": 20}, "end_point": {"row": 321, "column": 35}}, {"id": 1835, "type": "type_identifier", "text": "Point2f", "parent": 1834, "children": [], "start_point": {"row": 321, "column": 20}, "end_point": {"row": 321, "column": 27}}, {"id": 1836, "type": "identifier", "text": "point", "parent": 1834, "children": [], "start_point": {"row": 321, "column": 28}, "end_point": {"row": 321, "column": 33}}, {"id": 1837, "type": "labeled_statement", "text": "glm::vec3 toOf(cv::Point3f point);", "parent": null, "children": [1838, 1839, 1843], "start_point": {"row": 322, "column": 1}, "end_point": {"row": 322, "column": 35}}, {"id": 1838, "type": "statement_identifier", "text": "glm", "parent": 1837, "children": [], "start_point": {"row": 322, "column": 1}, "end_point": {"row": 322, "column": 4}}, {"id": 1839, "type": "ERROR", "text": "::vec3 toOf(cv:", "parent": 1837, "children": [1840, 1841, 1842], "start_point": {"row": 322, "column": 4}, "end_point": {"row": 322, "column": 19}}, {"id": 1840, "type": "type_identifier", "text": "vec3", "parent": 1839, "children": [], "start_point": {"row": 322, "column": 6}, "end_point": {"row": 322, "column": 10}}, {"id": 1841, "type": "identifier", "text": "toOf", "parent": 1839, "children": [], "start_point": {"row": 322, "column": 11}, "end_point": {"row": 322, "column": 15}}, {"id": 1842, "type": "type_identifier", "text": "cv", "parent": 1839, "children": [], "start_point": {"row": 322, "column": 16}, "end_point": {"row": 322, "column": 18}}, {"id": 1843, "type": "declaration", "text": "Point3f point);", "parent": 1837, "children": [1844, 1845], "start_point": {"row": 322, "column": 20}, "end_point": {"row": 322, "column": 35}}, {"id": 1844, "type": "type_identifier", "text": "Point3f", "parent": 1843, "children": [], "start_point": {"row": 322, "column": 20}, "end_point": {"row": 322, "column": 27}}, {"id": 1845, "type": "identifier", "text": "point", "parent": 1843, "children": [], "start_point": {"row": 322, "column": 28}, "end_point": {"row": 322, "column": 33}}, {"id": 1846, "type": "declaration", "text": "ofRectangle toOf(cv::Rect rect);", "parent": null, "children": [1847, 1848], "start_point": {"row": 323, "column": 1}, "end_point": {"row": 323, "column": 33}}, {"id": 1847, "type": "type_identifier", "text": "ofRectangle", "parent": 1846, "children": [], "start_point": {"row": 323, "column": 1}, "end_point": {"row": 323, "column": 12}}, {"id": 1848, "type": "function_declarator", "text": "toOf(cv::Rect rect)", "parent": 1846, "children": [1849, 1850], "start_point": {"row": 323, "column": 13}, "end_point": {"row": 323, "column": 32}}, {"id": 1849, "type": "identifier", "text": "toOf", "parent": 1848, "children": [], "start_point": {"row": 323, "column": 13}, "end_point": {"row": 323, "column": 17}}, {"id": 1850, "type": "parameter_list", "text": "(cv::Rect rect)", "parent": 1848, "children": [1851], "start_point": {"row": 323, "column": 17}, "end_point": {"row": 323, "column": 32}}, {"id": 1851, "type": "parameter_declaration", "text": "cv::Rect rect", "parent": 1850, "children": [1852, 1853, 1855], "start_point": {"row": 323, "column": 18}, "end_point": {"row": 323, "column": 31}}, {"id": 1852, "type": "type_identifier", "text": "cv", "parent": 1851, "children": [], "start_point": {"row": 323, "column": 18}, "end_point": {"row": 323, "column": 20}}, {"id": 1853, "type": "ERROR", "text": "::Rect", "parent": 1851, "children": [1854], "start_point": {"row": 323, "column": 20}, "end_point": {"row": 323, "column": 26}}, {"id": 1854, "type": "identifier", "text": "Rect", "parent": 1853, "children": [], "start_point": {"row": 323, "column": 22}, "end_point": {"row": 323, "column": 26}}, {"id": 1855, "type": "identifier", "text": "rect", "parent": 1851, "children": [], "start_point": {"row": 323, "column": 27}, "end_point": {"row": 323, "column": 31}}, {"id": 1856, "type": "declaration", "text": "ofPolyline toOf(cv::RotatedRect rect);", "parent": null, "children": [1857, 1858], "start_point": {"row": 324, "column": 1}, "end_point": {"row": 324, "column": 39}}, {"id": 1857, "type": "type_identifier", "text": "ofPolyline", "parent": 1856, "children": [], "start_point": {"row": 324, "column": 1}, "end_point": {"row": 324, "column": 11}}, {"id": 1858, "type": "function_declarator", "text": "toOf(cv::RotatedRect rect)", "parent": 1856, "children": [1859, 1860], "start_point": {"row": 324, "column": 12}, "end_point": {"row": 324, "column": 38}}, {"id": 1859, "type": "identifier", "text": "toOf", "parent": 1858, "children": [], "start_point": {"row": 324, "column": 12}, "end_point": {"row": 324, "column": 16}}, {"id": 1860, "type": "parameter_list", "text": "(cv::RotatedRect rect)", "parent": 1858, "children": [1861], "start_point": {"row": 324, "column": 16}, "end_point": {"row": 324, "column": 38}}, {"id": 1861, "type": "parameter_declaration", "text": "cv::RotatedRect rect", "parent": 1860, "children": [1862, 1863, 1865], "start_point": {"row": 324, "column": 17}, "end_point": {"row": 324, "column": 37}}, {"id": 1862, "type": "type_identifier", "text": "cv", "parent": 1861, "children": [], "start_point": {"row": 324, "column": 17}, "end_point": {"row": 324, "column": 19}}, {"id": 1863, "type": "ERROR", "text": "::RotatedRect", "parent": 1861, "children": [1864], "start_point": {"row": 324, "column": 19}, "end_point": {"row": 324, "column": 32}}, {"id": 1864, "type": "identifier", "text": "RotatedRect", "parent": 1863, "children": [], "start_point": {"row": 324, "column": 21}, "end_point": {"row": 324, "column": 32}}, {"id": 1865, "type": "identifier", "text": "rect", "parent": 1861, "children": [], "start_point": {"row": 324, "column": 33}, "end_point": {"row": 324, "column": 37}}, {"id": 1866, "type": "ERROR", "text": "template <class T> inline ofPolyline toOf(const std::vector<cv::Point_<T>>& contour)", "parent": null, "children": [1867], "start_point": {"row": 325, "column": 1}, "end_point": {"row": 325, "column": 85}}, {"id": 1867, "type": "binary_expression", "text": "template <class T> inline ofPolyline toOf(const std::vector<cv::Point_<T>>& contour)", "parent": 1866, "children": [1868, 1871, 1873, 1874, 1877], "start_point": {"row": 325, "column": 1}, "end_point": {"row": 325, "column": 85}}, {"id": 1868, "type": "binary_expression", "text": "template <class", "parent": 1867, "children": [1869, 1870], "start_point": {"row": 325, "column": 1}, "end_point": {"row": 325, "column": 16}}, {"id": 1869, "type": "identifier", "text": "template", "parent": 1868, "children": [], "start_point": {"row": 325, "column": 1}, "end_point": {"row": 325, "column": 9}}, {"id": 1870, "type": "<", "text": "<", "parent": 1868, "children": [], "start_point": {"row": 325, "column": 10}, "end_point": {"row": 325, "column": 11}}, {"id": 1871, "type": "ERROR", "text": "T", "parent": 1867, "children": [1872], "start_point": {"row": 325, "column": 17}, "end_point": {"row": 325, "column": 18}}, {"id": 1872, "type": "identifier", "text": "T", "parent": 1871, "children": [], "start_point": {"row": 325, "column": 17}, "end_point": {"row": 325, "column": 18}}, {"id": 1873, "type": ">", "text": ">", "parent": 1867, "children": [], "start_point": {"row": 325, "column": 18}, "end_point": {"row": 325, "column": 19}}, {"id": 1874, "type": "ERROR", "text": "inline ofPolyline", "parent": 1867, "children": [1875, 1876], "start_point": {"row": 325, "column": 20}, "end_point": {"row": 325, "column": 37}}, {"id": 1875, "type": "identifier", "text": "inline", "parent": 1874, "children": [], "start_point": {"row": 325, "column": 20}, "end_point": {"row": 325, "column": 26}}, {"id": 1876, "type": "identifier", "text": "ofPolyline", "parent": 1874, "children": [], "start_point": {"row": 325, "column": 27}, "end_point": {"row": 325, "column": 37}}, {"id": 1877, "type": "call_expression", "text": "toOf(const std::vector<cv::Point_<T>>& contour)", "parent": 1867, "children": [1878, 1879], "start_point": {"row": 325, "column": 38}, "end_point": {"row": 325, "column": 85}}, {"id": 1878, "type": "identifier", "text": "toOf", "parent": 1877, "children": [], "start_point": {"row": 325, "column": 38}, "end_point": {"row": 325, "column": 42}}, {"id": 1879, "type": "argument_list", "text": "(const std::vector<cv::Point_<T>>& contour)", "parent": 1877, "children": [1880, 1886], "start_point": {"row": 325, "column": 42}, "end_point": {"row": 325, "column": 85}}, {"id": 1880, "type": "ERROR", "text": "const std::vector<cv::", "parent": 1879, "children": [1881, 1882], "start_point": {"row": 325, "column": 43}, "end_point": {"row": 325, "column": 65}}, {"id": 1881, "type": "identifier", "text": "std", "parent": 1880, "children": [], "start_point": {"row": 325, "column": 49}, "end_point": {"row": 325, "column": 52}}, {"id": 1882, "type": "binary_expression", "text": "vector<cv", "parent": 1880, "children": [1883, 1884, 1885], "start_point": {"row": 325, "column": 54}, "end_point": {"row": 325, "column": 63}}, {"id": 1883, "type": "identifier", "text": "vector", "parent": 1882, "children": [], "start_point": {"row": 325, "column": 54}, "end_point": {"row": 325, "column": 60}}, {"id": 1884, "type": "<", "text": "<", "parent": 1882, "children": [], "start_point": {"row": 325, "column": 60}, "end_point": {"row": 325, "column": 61}}, {"id": 1885, "type": "identifier", "text": "cv", "parent": 1882, "children": [], "start_point": {"row": 325, "column": 61}, "end_point": {"row": 325, "column": 63}}, {"id": 1886, "type": "binary_expression", "text": "Point_<T>>& contour", "parent": 1879, "children": [1887, 1888, 1889], "start_point": {"row": 325, "column": 65}, "end_point": {"row": 325, "column": 84}}, {"id": 1887, "type": "identifier", "text": "Point_", "parent": 1886, "children": [], "start_point": {"row": 325, "column": 65}, "end_point": {"row": 325, "column": 71}}, {"id": 1888, "type": "<", "text": "<", "parent": 1886, "children": [], "start_point": {"row": 325, "column": 71}, "end_point": {"row": 325, "column": 72}}, {"id": 1889, "type": "binary_expression", "text": "T>>& contour", "parent": 1886, "children": [1890, 1891, 1892], "start_point": {"row": 325, "column": 72}, "end_point": {"row": 325, "column": 84}}, {"id": 1890, "type": "identifier", "text": "T", "parent": 1889, "children": [], "start_point": {"row": 325, "column": 72}, "end_point": {"row": 325, "column": 73}}, {"id": 1891, "type": ">>", "text": ">>", "parent": 1889, "children": [], "start_point": {"row": 325, "column": 73}, "end_point": {"row": 325, "column": 75}}, {"id": 1892, "type": "pointer_expression", "text": "& contour", "parent": 1889, "children": [1893], "start_point": {"row": 325, "column": 75}, "end_point": {"row": 325, "column": 84}}, {"id": 1893, "type": "identifier", "text": "contour", "parent": 1892, "children": [], "start_point": {"row": 325, "column": 77}, "end_point": {"row": 325, "column": 84}}, {"id": 1894, "type": "declaration", "text": "ofPolyline polyline;", "parent": null, "children": [1895, 1896], "start_point": {"row": 326, "column": 2}, "end_point": {"row": 326, "column": 22}}, {"id": 1895, "type": "type_identifier", "text": "ofPolyline", "parent": 1894, "children": [], "start_point": {"row": 326, "column": 2}, "end_point": {"row": 326, "column": 12}}, {"id": 1896, "type": "identifier", "text": "polyline", "parent": 1894, "children": [], "start_point": {"row": 326, "column": 13}, "end_point": {"row": 326, "column": 21}}, {"id": 1897, "type": "call_expression", "text": "polyline.resize(contour.size())", "parent": null, "children": [1898, 1901], "start_point": {"row": 327, "column": 2}, "end_point": {"row": 327, "column": 33}}, {"id": 1898, "type": "field_expression", "text": "polyline.resize", "parent": 1897, "children": [1899, 1900], "start_point": {"row": 327, "column": 2}, "end_point": {"row": 327, "column": 17}}, {"id": 1899, "type": "identifier", "text": "polyline", "parent": 1898, "children": [], "start_point": {"row": 327, "column": 2}, "end_point": {"row": 327, "column": 10}}, {"id": 1900, "type": "field_identifier", "text": "resize", "parent": 1898, "children": [], "start_point": {"row": 327, "column": 11}, "end_point": {"row": 327, "column": 17}}, {"id": 1901, "type": "argument_list", "text": "(contour.size())", "parent": 1897, "children": [1902], "start_point": {"row": 327, "column": 17}, "end_point": {"row": 327, "column": 33}}, {"id": 1902, "type": "call_expression", "text": "contour.size()", "parent": 1901, "children": [1903, 1906], "start_point": {"row": 327, "column": 18}, "end_point": {"row": 327, "column": 32}}, {"id": 1903, "type": "field_expression", "text": "contour.size", "parent": 1902, "children": [1904, 1905], "start_point": {"row": 327, "column": 18}, "end_point": {"row": 327, "column": 30}}, {"id": 1904, "type": "identifier", "text": "contour", "parent": 1903, "children": [], "start_point": {"row": 327, "column": 18}, "end_point": {"row": 327, "column": 25}}, {"id": 1905, "type": "field_identifier", "text": "size", "parent": 1903, "children": [], "start_point": {"row": 327, "column": 26}, "end_point": {"row": 327, "column": 30}}, {"id": 1906, "type": "argument_list", "text": "()", "parent": 1902, "children": [], "start_point": {"row": 327, "column": 30}, "end_point": {"row": 327, "column": 32}}, {"id": 1907, "type": "for_statement", "text": "for(std::size_t i = 0; i < contour.size(); i++) {\n\t\t\tpolyline[i].x = contour[i].x;\n\t\t\tpolyline[i].y = contour[i].y;\n\t\t}", "parent": null, "children": [1908, 1910, 1916, 1924], "start_point": {"row": 328, "column": 8}, "end_point": {"row": 331, "column": 3}}, {"id": 1908, "type": "ERROR", "text": "std::", "parent": 1907, "children": [1909], "start_point": {"row": 328, "column": 12}, "end_point": {"row": 328, "column": 17}}, {"id": 1909, "type": "identifier", "text": "std", "parent": 1908, "children": [], "start_point": {"row": 328, "column": 12}, "end_point": {"row": 328, "column": 15}}, {"id": 1910, "type": "declaration", "text": "size_t i = 0;", "parent": 1907, "children": [1911, 1912], "start_point": {"row": 328, "column": 17}, "end_point": {"row": 328, "column": 30}}, {"id": 1911, "type": "primitive_type", "text": "size_t", "parent": 1910, "children": [], "start_point": {"row": 328, "column": 17}, "end_point": {"row": 328, "column": 23}}, {"id": 1912, "type": "init_declarator", "text": "i = 0", "parent": 1910, "children": [1913, 1914, 1915], "start_point": {"row": 328, "column": 24}, "end_point": {"row": 328, "column": 29}}, {"id": 1913, "type": "identifier", "text": "i", "parent": 1912, "children": [], "start_point": {"row": 328, "column": 24}, "end_point": {"row": 328, "column": 25}}, {"id": 1914, "type": "=", "text": "=", "parent": 1912, "children": [], "start_point": {"row": 328, "column": 26}, "end_point": {"row": 328, "column": 27}}, {"id": 1915, "type": "number_literal", "text": "0", "parent": 1912, "children": [], "start_point": {"row": 328, "column": 28}, "end_point": {"row": 328, "column": 29}}, {"id": 1916, "type": "binary_expression", "text": "i < contour.size()", "parent": 1907, "children": [1917, 1918, 1919], "start_point": {"row": 328, "column": 31}, "end_point": {"row": 328, "column": 49}}, {"id": 1917, "type": "identifier", "text": "i", "parent": 1916, "children": [], "start_point": {"row": 328, "column": 31}, "end_point": {"row": 328, "column": 32}}, {"id": 1918, "type": "<", "text": "<", "parent": 1916, "children": [], "start_point": {"row": 328, "column": 33}, "end_point": {"row": 328, "column": 34}}, {"id": 1919, "type": "call_expression", "text": "contour.size()", "parent": 1916, "children": [1920, 1923], "start_point": {"row": 328, "column": 35}, "end_point": {"row": 328, "column": 49}}, {"id": 1920, "type": "field_expression", "text": "contour.size", "parent": 1919, "children": [1921, 1922], "start_point": {"row": 328, "column": 35}, "end_point": {"row": 328, "column": 47}}, {"id": 1921, "type": "identifier", "text": "contour", "parent": 1920, "children": [], "start_point": {"row": 328, "column": 35}, "end_point": {"row": 328, "column": 42}}, {"id": 1922, "type": "field_identifier", "text": "size", "parent": 1920, "children": [], "start_point": {"row": 328, "column": 43}, "end_point": {"row": 328, "column": 47}}, {"id": 1923, "type": "argument_list", "text": "()", "parent": 1919, "children": [], "start_point": {"row": 328, "column": 47}, "end_point": {"row": 328, "column": 49}}, {"id": 1924, "type": "update_expression", "text": "i++", "parent": 1907, "children": [1925, 1926], "start_point": {"row": 328, "column": 51}, "end_point": {"row": 328, "column": 54}}, {"id": 1925, "type": "identifier", "text": "i", "parent": 1924, "children": [], "start_point": {"row": 328, "column": 51}, "end_point": {"row": 328, "column": 52}}, {"id": 1926, "type": "++", "text": "++", "parent": 1924, "children": [], "start_point": {"row": 328, "column": 52}, "end_point": {"row": 328, "column": 54}}, {"id": 1927, "type": "assignment_expression", "text": "polyline[i].x = contour[i].x", "parent": 1907, "children": [1928, 1933, 1934], "start_point": {"row": 329, "column": 3}, "end_point": {"row": 329, "column": 31}}, {"id": 1928, "type": "field_expression", "text": "polyline[i].x", "parent": 1927, "children": [1929, 1932], "start_point": {"row": 329, "column": 3}, "end_point": {"row": 329, "column": 16}}, {"id": 1929, "type": "subscript_expression", "text": "polyline[i]", "parent": 1928, "children": [1930, 1931], "start_point": {"row": 329, "column": 3}, "end_point": {"row": 329, "column": 14}}, {"id": 1930, "type": "identifier", "text": "polyline", "parent": 1929, "children": [], "start_point": {"row": 329, "column": 3}, "end_point": {"row": 329, "column": 11}}, {"id": 1931, "type": "identifier", "text": "i", "parent": 1929, "children": [], "start_point": {"row": 329, "column": 12}, "end_point": {"row": 329, "column": 13}}, {"id": 1932, "type": "field_identifier", "text": "x", "parent": 1928, "children": [], "start_point": {"row": 329, "column": 15}, "end_point": {"row": 329, "column": 16}}, {"id": 1933, "type": "=", "text": "=", "parent": 1927, "children": [], "start_point": {"row": 329, "column": 17}, "end_point": {"row": 329, "column": 18}}, {"id": 1934, "type": "field_expression", "text": "contour[i].x", "parent": 1927, "children": [1935, 1938], "start_point": {"row": 329, "column": 19}, "end_point": {"row": 329, "column": 31}}, {"id": 1935, "type": "subscript_expression", "text": "contour[i]", "parent": 1934, "children": [1936, 1937], "start_point": {"row": 329, "column": 19}, "end_point": {"row": 329, "column": 29}}, {"id": 1936, "type": "identifier", "text": "contour", "parent": 1935, "children": [], "start_point": {"row": 329, "column": 19}, "end_point": {"row": 329, "column": 26}}, {"id": 1937, "type": "identifier", "text": "i", "parent": 1935, "children": [], "start_point": {"row": 329, "column": 27}, "end_point": {"row": 329, "column": 28}}, {"id": 1938, "type": "field_identifier", "text": "x", "parent": 1934, "children": [], "start_point": {"row": 329, "column": 30}, "end_point": {"row": 329, "column": 31}}, {"id": 1939, "type": "assignment_expression", "text": "polyline[i].y = contour[i].y", "parent": 1907, "children": [1940, 1945, 1946], "start_point": {"row": 330, "column": 3}, "end_point": {"row": 330, "column": 31}}, {"id": 1940, "type": "field_expression", "text": "polyline[i].y", "parent": 1939, "children": [1941, 1944], "start_point": {"row": 330, "column": 3}, "end_point": {"row": 330, "column": 16}}, {"id": 1941, "type": "subscript_expression", "text": "polyline[i]", "parent": 1940, "children": [1942, 1943], "start_point": {"row": 330, "column": 3}, "end_point": {"row": 330, "column": 14}}, {"id": 1942, "type": "identifier", "text": "polyline", "parent": 1941, "children": [], "start_point": {"row": 330, "column": 3}, "end_point": {"row": 330, "column": 11}}, {"id": 1943, "type": "identifier", "text": "i", "parent": 1941, "children": [], "start_point": {"row": 330, "column": 12}, "end_point": {"row": 330, "column": 13}}, {"id": 1944, "type": "field_identifier", "text": "y", "parent": 1940, "children": [], "start_point": {"row": 330, "column": 15}, "end_point": {"row": 330, "column": 16}}, {"id": 1945, "type": "=", "text": "=", "parent": 1939, "children": [], "start_point": {"row": 330, "column": 17}, "end_point": {"row": 330, "column": 18}}, {"id": 1946, "type": "field_expression", "text": "contour[i].y", "parent": 1939, "children": [1947, 1950], "start_point": {"row": 330, "column": 19}, "end_point": {"row": 330, "column": 31}}, {"id": 1947, "type": "subscript_expression", "text": "contour[i]", "parent": 1946, "children": [1948, 1949], "start_point": {"row": 330, "column": 19}, "end_point": {"row": 330, "column": 29}}, {"id": 1948, "type": "identifier", "text": "contour", "parent": 1947, "children": [], "start_point": {"row": 330, "column": 19}, "end_point": {"row": 330, "column": 26}}, {"id": 1949, "type": "identifier", "text": "i", "parent": 1947, "children": [], "start_point": {"row": 330, "column": 27}, "end_point": {"row": 330, "column": 28}}, {"id": 1950, "type": "field_identifier", "text": "y", "parent": 1946, "children": [], "start_point": {"row": 330, "column": 30}, "end_point": {"row": 330, "column": 31}}, {"id": 1951, "type": "call_expression", "text": "polyline.close()", "parent": null, "children": [1952, 1955], "start_point": {"row": 332, "column": 2}, "end_point": {"row": 332, "column": 18}}, {"id": 1952, "type": "field_expression", "text": "polyline.close", "parent": 1951, "children": [1953, 1954], "start_point": {"row": 332, "column": 2}, "end_point": {"row": 332, "column": 16}}, {"id": 1953, "type": "identifier", "text": "polyline", "parent": 1952, "children": [], "start_point": {"row": 332, "column": 2}, "end_point": {"row": 332, "column": 10}}, {"id": 1954, "type": "field_identifier", "text": "close", "parent": 1952, "children": [], "start_point": {"row": 332, "column": 11}, "end_point": {"row": 332, "column": 16}}, {"id": 1955, "type": "argument_list", "text": "()", "parent": 1951, "children": [], "start_point": {"row": 332, "column": 16}, "end_point": {"row": 332, "column": 18}}, {"id": 1956, "type": "return_statement", "text": "return polyline;", "parent": null, "children": [1957], "start_point": {"row": 333, "column": 2}, "end_point": {"row": 333, "column": 18}}, {"id": 1957, "type": "identifier", "text": "polyline", "parent": 1956, "children": [], "start_point": {"row": 333, "column": 9}, "end_point": {"row": 333, "column": 17}}, {"id": 1958, "type": "update_expression", "text": "template <class T>\n\tvoid toOf(cv::Mat mat, ofPixels_<T>& pixels) {\n\t\tpixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels());\n\t}\n\ttemplate <class T>\n\tvoid toOf(cv::Mat mat, ofImage_<T>& img) {\n\t\timitate(img, mat)", "parent": null, "children": [1959, 2039], "start_point": {"row": 335, "column": 1}, "end_point": {"row": 341, "column": 19}}, {"id": 1959, "type": "binary_expression", "text": "template <class T>\n\tvoid toOf(cv::Mat mat, ofPixels_<T>& pixels) {\n\t\tpixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels());\n\t}\n\ttemplate <class T>\n\tvoid toOf(cv::Mat mat, ofImage_<T>& img) {\n\t\timitate(img, mat)", "parent": 1958, "children": [1960, 2014, 2016, 2017, 2034], "start_point": {"row": 335, "column": 1}, "end_point": {"row": 341, "column": 19}}, {"id": 1960, "type": "binary_expression", "text": "template <class T>\n\tvoid toOf(cv::Mat mat, ofPixels_<T>& pixels) {\n\t\tpixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels());\n\t}\n\ttemplate <class", "parent": 1959, "children": [1961, 2011, 2013], "start_point": {"row": 335, "column": 1}, "end_point": {"row": 339, "column": 16}}, {"id": 1961, "type": "binary_expression", "text": "template <class T>\n\tvoid toOf(cv::Mat mat, ofPixels_<T>& pixels) {\n\t\tpixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels())", "parent": 1960, "children": [1962, 1965, 1967, 1968, 1985], "start_point": {"row": 335, "column": 1}, "end_point": {"row": 337, "column": 80}}, {"id": 1962, "type": "binary_expression", "text": "template <class", "parent": 1961, "children": [1963, 1964], "start_point": {"row": 335, "column": 1}, "end_point": {"row": 335, "column": 16}}, {"id": 1963, "type": "identifier", "text": "template", "parent": 1962, "children": [], "start_point": {"row": 335, "column": 1}, "end_point": {"row": 335, "column": 9}}, {"id": 1964, "type": "<", "text": "<", "parent": 1962, "children": [], "start_point": {"row": 335, "column": 10}, "end_point": {"row": 335, "column": 11}}, {"id": 1965, "type": "ERROR", "text": "T", "parent": 1961, "children": [1966], "start_point": {"row": 335, "column": 17}, "end_point": {"row": 335, "column": 18}}, {"id": 1966, "type": "identifier", "text": "T", "parent": 1965, "children": [], "start_point": {"row": 335, "column": 17}, "end_point": {"row": 335, "column": 18}}, {"id": 1967, "type": ">", "text": ">", "parent": 1961, "children": [], "start_point": {"row": 335, "column": 18}, "end_point": {"row": 335, "column": 19}}, {"id": 1968, "type": "ERROR", "text": "void toOf(cv::Mat mat, ofPixels_<T>& pixels) {", "parent": 1961, "children": [1969, 1970], "start_point": {"row": 336, "column": 1}, "end_point": {"row": 336, "column": 47}}, {"id": 1969, "type": "identifier", "text": "void", "parent": 1968, "children": [], "start_point": {"row": 336, "column": 1}, "end_point": {"row": 336, "column": 5}}, {"id": 1970, "type": "call_expression", "text": "toOf(cv::Mat mat, ofPixels_<T>& pixels)", "parent": 1968, "children": [1971, 1972], "start_point": {"row": 336, "column": 6}, "end_point": {"row": 336, "column": 45}}, {"id": 1971, "type": "identifier", "text": "toOf", "parent": 1970, "children": [], "start_point": {"row": 336, "column": 6}, "end_point": {"row": 336, "column": 10}}, {"id": 1972, "type": "argument_list", "text": "(cv::Mat mat, ofPixels_<T>& pixels)", "parent": 1970, "children": [1973, 1976, 1977], "start_point": {"row": 336, "column": 10}, "end_point": {"row": 336, "column": 45}}, {"id": 1973, "type": "ERROR", "text": "cv::Mat", "parent": 1972, "children": [1974, 1975], "start_point": {"row": 336, "column": 11}, "end_point": {"row": 336, "column": 18}}, {"id": 1974, "type": "identifier", "text": "cv", "parent": 1973, "children": [], "start_point": {"row": 336, "column": 11}, "end_point": {"row": 336, "column": 13}}, {"id": 1975, "type": "identifier", "text": "Mat", "parent": 1973, "children": [], "start_point": {"row": 336, "column": 15}, "end_point": {"row": 336, "column": 18}}, {"id": 1976, "type": "identifier", "text": "mat", "parent": 1972, "children": [], "start_point": {"row": 336, "column": 19}, "end_point": {"row": 336, "column": 22}}, {"id": 1977, "type": "binary_expression", "text": "ofPixels_<T>& pixels", "parent": 1972, "children": [1978, 1982, 1983], "start_point": {"row": 336, "column": 24}, "end_point": {"row": 336, "column": 44}}, {"id": 1978, "type": "binary_expression", "text": "ofPixels_<T", "parent": 1977, "children": [1979, 1980, 1981], "start_point": {"row": 336, "column": 24}, "end_point": {"row": 336, "column": 35}}, {"id": 1979, "type": "identifier", "text": "ofPixels_", "parent": 1978, "children": [], "start_point": {"row": 336, "column": 24}, "end_point": {"row": 336, "column": 33}}, {"id": 1980, "type": "<", "text": "<", "parent": 1978, "children": [], "start_point": {"row": 336, "column": 33}, "end_point": {"row": 336, "column": 34}}, {"id": 1981, "type": "identifier", "text": "T", "parent": 1978, "children": [], "start_point": {"row": 336, "column": 34}, "end_point": {"row": 336, "column": 35}}, {"id": 1982, "type": ">", "text": ">", "parent": 1977, "children": [], "start_point": {"row": 336, "column": 35}, "end_point": {"row": 336, "column": 36}}, {"id": 1983, "type": "pointer_expression", "text": "& pixels", "parent": 1977, "children": [1984], "start_point": {"row": 336, "column": 36}, "end_point": {"row": 336, "column": 44}}, {"id": 1984, "type": "identifier", "text": "pixels", "parent": 1983, "children": [], "start_point": {"row": 336, "column": 38}, "end_point": {"row": 336, "column": 44}}, {"id": 1985, "type": "call_expression", "text": "pixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels())", "parent": 1961, "children": [1986, 1989], "start_point": {"row": 337, "column": 2}, "end_point": {"row": 337, "column": 80}}, {"id": 1986, "type": "field_expression", "text": "pixels.setFromExternalPixels", "parent": 1985, "children": [1987, 1988], "start_point": {"row": 337, "column": 2}, "end_point": {"row": 337, "column": 30}}, {"id": 1987, "type": "identifier", "text": "pixels", "parent": 1986, "children": [], "start_point": {"row": 337, "column": 2}, "end_point": {"row": 337, "column": 8}}, {"id": 1988, "type": "field_identifier", "text": "setFromExternalPixels", "parent": 1986, "children": [], "start_point": {"row": 337, "column": 9}, "end_point": {"row": 337, "column": 30}}, {"id": 1989, "type": "argument_list", "text": "(mat.ptr<T>(), mat.cols, mat.rows, mat.channels())", "parent": 1985, "children": [1990, 2000, 2003, 2006], "start_point": {"row": 337, "column": 30}, "end_point": {"row": 337, "column": 80}}, {"id": 1990, "type": "binary_expression", "text": "mat.ptr<T>()", "parent": 1989, "children": [1991, 1997, 1998], "start_point": {"row": 337, "column": 31}, "end_point": {"row": 337, "column": 43}}, {"id": 1991, "type": "binary_expression", "text": "mat.ptr<T", "parent": 1990, "children": [1992, 1995, 1996], "start_point": {"row": 337, "column": 31}, "end_point": {"row": 337, "column": 40}}, {"id": 1992, "type": "field_expression", "text": "mat.ptr", "parent": 1991, "children": [1993, 1994], "start_point": {"row": 337, "column": 31}, "end_point": {"row": 337, "column": 38}}, {"id": 1993, "type": "identifier", "text": "mat", "parent": 1992, "children": [], "start_point": {"row": 337, "column": 31}, "end_point": {"row": 337, "column": 34}}, {"id": 1994, "type": "field_identifier", "text": "ptr", "parent": 1992, "children": [], "start_point": {"row": 337, "column": 35}, "end_point": {"row": 337, "column": 38}}, {"id": 1995, "type": "<", "text": "<", "parent": 1991, "children": [], "start_point": {"row": 337, "column": 38}, "end_point": {"row": 337, "column": 39}}, {"id": 1996, "type": "identifier", "text": "T", "parent": 1991, "children": [], "start_point": {"row": 337, "column": 39}, "end_point": {"row": 337, "column": 40}}, {"id": 1997, "type": ">", "text": ">", "parent": 1990, "children": [], "start_point": {"row": 337, "column": 40}, "end_point": {"row": 337, "column": 41}}, {"id": 1998, "type": "parenthesized_expression", "text": "()", "parent": 1990, "children": [1999], "start_point": {"row": 337, "column": 41}, "end_point": {"row": 337, "column": 43}}, {"id": 1999, "type": "identifier", "text": "", "parent": 1998, "children": [], "start_point": {"row": 337, "column": 42}, "end_point": {"row": 337, "column": 42}}, {"id": 2000, "type": "field_expression", "text": "mat.cols", "parent": 1989, "children": [2001, 2002], "start_point": {"row": 337, "column": 45}, "end_point": {"row": 337, "column": 53}}, {"id": 2001, "type": "identifier", "text": "mat", "parent": 2000, "children": [], "start_point": {"row": 337, "column": 45}, "end_point": {"row": 337, "column": 48}}, {"id": 2002, "type": "field_identifier", "text": "cols", "parent": 2000, "children": [], "start_point": {"row": 337, "column": 49}, "end_point": {"row": 337, "column": 53}}, {"id": 2003, "type": "field_expression", "text": "mat.rows", "parent": 1989, "children": [2004, 2005], "start_point": {"row": 337, "column": 55}, "end_point": {"row": 337, "column": 63}}, {"id": 2004, "type": "identifier", "text": "mat", "parent": 2003, "children": [], "start_point": {"row": 337, "column": 55}, "end_point": {"row": 337, "column": 58}}, {"id": 2005, "type": "field_identifier", "text": "rows", "parent": 2003, "children": [], "start_point": {"row": 337, "column": 59}, "end_point": {"row": 337, "column": 63}}, {"id": 2006, "type": "call_expression", "text": "mat.channels()", "parent": 1989, "children": [2007, 2010], "start_point": {"row": 337, "column": 65}, "end_point": {"row": 337, "column": 79}}, {"id": 2007, "type": "field_expression", "text": "mat.channels", "parent": 2006, "children": [2008, 2009], "start_point": {"row": 337, "column": 65}, "end_point": {"row": 337, "column": 77}}, {"id": 2008, "type": "identifier", "text": "mat", "parent": 2007, "children": [], "start_point": {"row": 337, "column": 65}, "end_point": {"row": 337, "column": 68}}, {"id": 2009, "type": "field_identifier", "text": "channels", "parent": 2007, "children": [], "start_point": {"row": 337, "column": 69}, "end_point": {"row": 337, "column": 77}}, {"id": 2010, "type": "argument_list", "text": "()", "parent": 2006, "children": [], "start_point": {"row": 337, "column": 77}, "end_point": {"row": 337, "column": 79}}, {"id": 2011, "type": "ERROR", "text": ";\n\t}\n\ttemplate", "parent": 1960, "children": [2012], "start_point": {"row": 337, "column": 80}, "end_point": {"row": 339, "column": 9}}, {"id": 2012, "type": "identifier", "text": "template", "parent": 2011, "children": [], "start_point": {"row": 339, "column": 1}, "end_point": {"row": 339, "column": 9}}, {"id": 2013, "type": "<", "text": "<", "parent": 1960, "children": [], "start_point": {"row": 339, "column": 10}, "end_point": {"row": 339, "column": 11}}, {"id": 2014, "type": "ERROR", "text": "T", "parent": 1959, "children": [2015], "start_point": {"row": 339, "column": 17}, "end_point": {"row": 339, "column": 18}}, {"id": 2015, "type": "identifier", "text": "T", "parent": 2014, "children": [], "start_point": {"row": 339, "column": 17}, "end_point": {"row": 339, "column": 18}}, {"id": 2016, "type": ">", "text": ">", "parent": 1959, "children": [], "start_point": {"row": 339, "column": 18}, "end_point": {"row": 339, "column": 19}}, {"id": 2017, "type": "ERROR", "text": "void toOf(cv::Mat mat, ofImage_<T>& img) {", "parent": 1959, "children": [2018, 2019], "start_point": {"row": 340, "column": 1}, "end_point": {"row": 340, "column": 43}}, {"id": 2018, "type": "identifier", "text": "void", "parent": 2017, "children": [], "start_point": {"row": 340, "column": 1}, "end_point": {"row": 340, "column": 5}}, {"id": 2019, "type": "call_expression", "text": "toOf(cv::Mat mat, ofImage_<T>& img)", "parent": 2017, "children": [2020, 2021], "start_point": {"row": 340, "column": 6}, "end_point": {"row": 340, "column": 41}}, {"id": 2020, "type": "identifier", "text": "toOf", "parent": 2019, "children": [], "start_point": {"row": 340, "column": 6}, "end_point": {"row": 340, "column": 10}}, {"id": 2021, "type": "argument_list", "text": "(cv::Mat mat, ofImage_<T>& img)", "parent": 2019, "children": [2022, 2025, 2026], "start_point": {"row": 340, "column": 10}, "end_point": {"row": 340, "column": 41}}, {"id": 2022, "type": "ERROR", "text": "cv::Mat", "parent": 2021, "children": [2023, 2024], "start_point": {"row": 340, "column": 11}, "end_point": {"row": 340, "column": 18}}, {"id": 2023, "type": "identifier", "text": "cv", "parent": 2022, "children": [], "start_point": {"row": 340, "column": 11}, "end_point": {"row": 340, "column": 13}}, {"id": 2024, "type": "identifier", "text": "Mat", "parent": 2022, "children": [], "start_point": {"row": 340, "column": 15}, "end_point": {"row": 340, "column": 18}}, {"id": 2025, "type": "identifier", "text": "mat", "parent": 2021, "children": [], "start_point": {"row": 340, "column": 19}, "end_point": {"row": 340, "column": 22}}, {"id": 2026, "type": "binary_expression", "text": "ofImage_<T>& img", "parent": 2021, "children": [2027, 2031, 2032], "start_point": {"row": 340, "column": 24}, "end_point": {"row": 340, "column": 40}}, {"id": 2027, "type": "binary_expression", "text": "ofImage_<T", "parent": 2026, "children": [2028, 2029, 2030], "start_point": {"row": 340, "column": 24}, "end_point": {"row": 340, "column": 34}}, {"id": 2028, "type": "identifier", "text": "ofImage_", "parent": 2027, "children": [], "start_point": {"row": 340, "column": 24}, "end_point": {"row": 340, "column": 32}}, {"id": 2029, "type": "<", "text": "<", "parent": 2027, "children": [], "start_point": {"row": 340, "column": 32}, "end_point": {"row": 340, "column": 33}}, {"id": 2030, "type": "identifier", "text": "T", "parent": 2027, "children": [], "start_point": {"row": 340, "column": 33}, "end_point": {"row": 340, "column": 34}}, {"id": 2031, "type": ">", "text": ">", "parent": 2026, "children": [], "start_point": {"row": 340, "column": 34}, "end_point": {"row": 340, "column": 35}}, {"id": 2032, "type": "pointer_expression", "text": "& img", "parent": 2026, "children": [2033], "start_point": {"row": 340, "column": 35}, "end_point": {"row": 340, "column": 40}}, {"id": 2033, "type": "identifier", "text": "img", "parent": 2032, "children": [], "start_point": {"row": 340, "column": 37}, "end_point": {"row": 340, "column": 40}}, {"id": 2034, "type": "call_expression", "text": "imitate(img, mat)", "parent": 1959, "children": [2035, 2036], "start_point": {"row": 341, "column": 2}, "end_point": {"row": 341, "column": 19}}, {"id": 2035, "type": "identifier", "text": "imitate", "parent": 2034, "children": [], "start_point": {"row": 341, "column": 2}, "end_point": {"row": 341, "column": 9}}, {"id": 2036, "type": "argument_list", "text": "(img, mat)", "parent": 2034, "children": [2037, 2038], "start_point": {"row": 341, "column": 9}, "end_point": {"row": 341, "column": 19}}, {"id": 2037, "type": "identifier", "text": "img", "parent": 2036, "children": [], "start_point": {"row": 341, "column": 10}, "end_point": {"row": 341, "column": 13}}, {"id": 2038, "type": "identifier", "text": "mat", "parent": 2036, "children": [], "start_point": {"row": 341, "column": 15}, "end_point": {"row": 341, "column": 18}}, {"id": 2039, "type": "--", "text": "", "parent": 1958, "children": [], "start_point": {"row": 341, "column": 19}, "end_point": {"row": 341, "column": 19}}, {"id": 2040, "type": "call_expression", "text": "toOf(mat, img.getPixels())", "parent": null, "children": [2041, 2042], "start_point": {"row": 342, "column": 2}, "end_point": {"row": 342, "column": 28}}, {"id": 2041, "type": "identifier", "text": "toOf", "parent": 2040, "children": [], "start_point": {"row": 342, "column": 2}, "end_point": {"row": 342, "column": 6}}, {"id": 2042, "type": "argument_list", "text": "(mat, img.getPixels())", "parent": 2040, "children": [2043, 2044], "start_point": {"row": 342, "column": 6}, "end_point": {"row": 342, "column": 28}}, {"id": 2043, "type": "identifier", "text": "mat", "parent": 2042, "children": [], "start_point": {"row": 342, "column": 7}, "end_point": {"row": 342, "column": 10}}, {"id": 2044, "type": "call_expression", "text": "img.getPixels()", "parent": 2042, "children": [2045, 2048], "start_point": {"row": 342, "column": 12}, "end_point": {"row": 342, "column": 27}}, {"id": 2045, "type": "field_expression", "text": "img.getPixels", "parent": 2044, "children": [2046, 2047], "start_point": {"row": 342, "column": 12}, "end_point": {"row": 342, "column": 25}}, {"id": 2046, "type": "identifier", "text": "img", "parent": 2045, "children": [], "start_point": {"row": 342, "column": 12}, "end_point": {"row": 342, "column": 15}}, {"id": 2047, "type": "field_identifier", "text": "getPixels", "parent": 2045, "children": [], "start_point": {"row": 342, "column": 16}, "end_point": {"row": 342, "column": 25}}, {"id": 2048, "type": "argument_list", "text": "()", "parent": 2044, "children": [], "start_point": {"row": 342, "column": 25}, "end_point": {"row": 342, "column": 27}}, {"id": 2049, "type": "ERROR", "text": "}\n}", "parent": null, "children": [], "start_point": {"row": 343, "column": 1}, "end_point": {"row": 344, "column": 1}}]}, "node_categories": {"declarations": {"functions": [33, 44, 46, 66, 68, 80, 84, 96, 100, 120, 122, 145, 149, 160, 164, 178, 182, 270, 272, 311, 315, 358, 360, 379, 383, 394, 398, 425, 429, 443, 447, 551, 553, 577, 579, 598, 602, 620, 624, 653, 655, 673, 677, 707, 711, 861, 865, 927, 931, 983, 987, 1002, 1006, 1021, 1025, 1040, 1044, 1059, 1063, 1078, 1082, 1178, 1186, 1196, 1399, 1427, 1501, 1848, 1858], "variables": [49, 71, 87, 103, 125, 152, 167, 185, 199, 275, 318, 338, 363, 386, 401, 432, 450, 464, 556, 582, 605, 608, 627, 630, 658, 680, 714, 717, 726, 868, 871, 874, 877, 934, 939, 942, 945, 990, 993, 996, 999, 1009, 1012, 1015, 1018, 1028, 1031, 1034, 1037, 1047, 1050, 1053, 1056, 1066, 1069, 1072, 1075, 1085, 1088, 1091, 1094, 1122, 1176, 1181, 1184, 1189, 1194, 1199, 1397, 1402, 1411, 1420, 1425, 1430, 1499, 1504, 1546, 1557, 1587, 1653, 1664, 1694, 1741, 1795, 1834, 1843, 1846, 1851, 1856, 1861, 1894, 1910], "classes": [81, 97, 146, 161, 179, 312, 334, 380, 395, 426, 444, 599, 621, 674, 708, 862, 928, 984, 1003, 1022, 1041, 1060, 1079], "imports": [3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31], "modules": [], "enums": []}, "statements": {"expressions": [36, 37, 53, 54, 58, 59, 75, 76, 93, 109, 112, 113, 129, 130, 131, 138, 139, 156, 173, 174, 189, 190, 192, 193, 204, 205, 206, 213, 262, 263, 284, 285, 286, 346, 350, 351, 371, 374, 375, 390, 406, 438, 439, 454, 455, 457, 458, 469, 470, 471, 478, 543, 544, 564, 565, 569, 570, 590, 593, 594, 615, 637, 641, 645, 646, 662, 665, 669, 685, 686, 722, 731, 737, 744, 769, 789, 790, 799, 802, 815, 816, 817, 818, 819, 821, 822, 827, 828, 835, 836, 843, 844, 850, 851, 857, 881, 882, 883, 884, 885, 887, 888, 893, 894, 901, 902, 909, 910, 916, 917, 923, 949, 950, 951, 952, 953, 960, 961, 968, 969, 975, 976, 1097, 1098, 1103, 1109, 1112, 1115, 1127, 1134, 1138, 1145, 1146, 1151, 1157, 1160, 1163, 1167, 1172, 1208, 1217, 1221, 1222, 1232, 1235, 1236, 1241, 1246, 1249, 1250, 1254, 1255, 1259, 1263, 1264, 1270, 1271, 1281, 1284, 1285, 1290, 1295, 1296, 1297, 1300, 1301, 1305, 1306, 1310, 1314, 1315, 1322, 1323, 1324, 1332, 1333, 1343, 1346, 1347, 1352, 1355, 1358, 1359, 1364, 1365, 1375, 1378, 1379, 1384, 1387, 1390, 1391, 1436, 1440, 1443, 1446, 1452, 1456, 1459, 1464, 1468, 1471, 1476, 1480, 1483, 1488, 1492, 1495, 1507, 1508, 1509, 1518, 1521, 1524, 1530, 1535, 1538, 1551, 1562, 1567, 1568, 1569, 1570, 1575, 1576, 1580, 1581, 1592, 1593, 1598, 1602, 1603, 1608, 1609, 1615, 1616, 1625, 1628, 1632, 1638, 1643, 1646, 1658, 1669, 1674, 1675, 1676, 1677, 1682, 1683, 1687, 1688, 1699, 1700, 1705, 1709, 1710, 1715, 1716, 1722, 1723, 1732, 1735, 1738, 1748, 1749, 1756, 1764, 1768, 1775, 1776, 1785, 1788, 1792, 1802, 1803, 1810, 1818, 1822, 1867, 1868, 1877, 1882, 1886, 1889, 1892, 1897, 1898, 1902, 1903, 1916, 1919, 1920, 1924, 1928, 1929, 1934, 1935, 1940, 1941, 1946, 1947, 1951, 1952, 1958, 1959, 1960, 1961, 1962, 1970, 1977, 1978, 1983, 1985, 1986, 1990, 1991, 1992, 1998, 2000, 2003, 2006, 2007, 2019, 2026, 2027, 2032, 2034, 2040, 2044, 2045], "assignments": [1753, 1761, 1807, 1815, 1927, 1939], "loops": [1907], "conditionals": [34, 35, 38, 41, 43, 47, 50, 51, 55, 56, 60, 63, 65, 69, 72, 73, 77, 78, 85, 88, 90, 91, 94, 95, 101, 104, 106, 107, 110, 111, 114, 117, 119, 123, 126, 127, 132, 134, 140, 142, 150, 154, 157, 159, 165, 168, 170, 171, 175, 176, 183, 186, 187, 188, 194, 195, 198, 202, 207, 208, 210, 211, 212, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 256, 257, 258, 264, 267, 269, 273, 276, 279, 281, 282, 283, 287, 288, 290, 291, 294, 295, 296, 299, 300, 301, 303, 306, 308, 316, 319, 320, 327, 329, 331, 337, 339, 340, 344, 347, 349, 352, 355, 357, 361, 364, 367, 369, 372, 376, 377, 384, 388, 391, 393, 399, 402, 403, 404, 405, 407, 408, 409, 410, 413, 414, 415, 418, 419, 420, 421, 430, 433, 435, 436, 440, 441, 448, 451, 452, 453, 459, 460, 463, 467, 472, 473, 475, 476, 477, 479, 480, 481, 482, 485, 486, 487, 490, 491, 492, 495, 496, 497, 500, 501, 502, 503, 504, 505, 508, 509, 510, 513, 514, 515, 518, 519, 520, 523, 524, 525, 528, 529, 530, 533, 534, 535, 538, 539, 545, 548, 550, 554, 557, 560, 562, 566, 567, 571, 574, 576, 580, 583, 586, 588, 591, 595, 596, 603, 607, 611, 613, 616, 618, 619, 625, 628, 629, 633, 635, 638, 640, 642, 644, 647, 650, 652, 656, 659, 660, 663, 666, 668, 670, 672, 676, 678, 682, 683, 684, 687, 689, 690, 691, 694, 695, 696, 699, 700, 701, 703, 706, 712, 716, 720, 723, 725, 729, 732, 734, 735, 736, 738, 739, 740, 741, 742, 743, 745, 746, 747, 750, 751, 752, 755, 756, 757, 760, 761, 762, 763, 764, 765, 766, 767, 768, 770, 771, 772, 775, 776, 777, 780, 781, 782, 785, 786, 791, 794, 797, 798, 800, 803, 804, 806, 807, 809, 810, 812, 813, 814, 823, 824, 829, 831, 833, 837, 839, 841, 845, 847, 849, 852, 853, 855, 856, 858, 860, 866, 869, 870, 873, 876, 879, 880, 889, 890, 895, 897, 899, 903, 905, 907, 911, 913, 915, 918, 919, 921, 922, 924, 926, 932, 935, 937, 938, 941, 944, 947, 948, 954, 956, 958, 962, 964, 966, 970, 972, 974, 977, 978, 980, 981, 982, 988, 991, 992, 995, 998, 1001, 1007, 1010, 1011, 1014, 1017, 1020, 1026, 1029, 1030, 1033, 1036, 1039, 1045, 1048, 1049, 1052, 1055, 1058, 1064, 1067, 1068, 1071, 1074, 1077, 1083, 1086, 1087, 1090, 1093, 1096, 1099, 1102, 1105, 1108, 1110, 1113, 1114, 1117, 1118, 1120, 1121, 1125, 1128, 1130, 1132, 1135, 1137, 1139, 1141, 1142, 1143, 1144, 1147, 1150, 1153, 1156, 1158, 1161, 1162, 1165, 1166, 1168, 1170, 1171, 1173, 1175, 1179, 1183, 1187, 1190, 1192, 1193, 1197, 1201, 1203, 1205, 1206, 1207, 1209, 1210, 1212, 1214, 1215, 1216, 1218, 1219, 1223, 1226, 1229, 1230, 1231, 1233, 1237, 1239, 1242, 1245, 1247, 1251, 1252, 1256, 1257, 1260, 1262, 1265, 1266, 1272, 1275, 1278, 1279, 1280, 1282, 1286, 1288, 1291, 1294, 1298, 1302, 1303, 1307, 1308, 1311, 1313, 1316, 1318, 1325, 1326, 1329, 1334, 1337, 1340, 1341, 1342, 1344, 1348, 1350, 1353, 1356, 1360, 1361, 1366, 1369, 1372, 1373, 1374, 1376, 1380, 1382, 1385, 1388, 1392, 1393, 1396, 1398, 1400, 1403, 1404, 1406, 1408, 1409, 1410, 1412, 1413, 1415, 1417, 1418, 1419, 1421, 1422, 1424, 1426, 1428, 1431, 1432, 1434, 1437, 1439, 1441, 1444, 1447, 1448, 1450, 1453, 1455, 1457, 1460, 1463, 1465, 1467, 1469, 1472, 1474, 1477, 1479, 1481, 1484, 1487, 1489, 1491, 1493, 1496, 1498, 1500, 1502, 1505, 1506, 1510, 1513, 1514, 1517, 1519, 1522, 1523, 1525, 1526, 1528, 1529, 1531, 1533, 1534, 1536, 1539, 1541, 1542, 1545, 1547, 1549, 1552, 1554, 1556, 1558, 1560, 1563, 1565, 1566, 1571, 1572, 1577, 1578, 1582, 1583, 1585, 1590, 1594, 1596, 1599, 1601, 1604, 1605, 1607, 1610, 1611, 1613, 1617, 1620, 1621, 1624, 1626, 1630, 1631, 1633, 1634, 1636, 1637, 1639, 1641, 1642, 1644, 1647, 1649, 1650, 1652, 1654, 1656, 1659, 1661, 1663, 1665, 1667, 1670, 1672, 1673, 1678, 1679, 1684, 1685, 1689, 1690, 1692, 1697, 1701, 1703, 1706, 1708, 1711, 1712, 1714, 1717, 1718, 1720, 1724, 1727, 1728, 1731, 1733, 1736, 1737, 1739, 1740, 1744, 1747, 1750, 1752, 1754, 1757, 1759, 1762, 1765, 1767, 1769, 1771, 1772, 1773, 1777, 1780, 1781, 1784, 1786, 1790, 1791, 1793, 1794, 1798, 1801, 1804, 1806, 1808, 1811, 1813, 1816, 1819, 1821, 1823, 1825, 1826, 1827, 1829, 1831, 1832, 1833, 1835, 1836, 1838, 1840, 1841, 1842, 1844, 1845, 1847, 1849, 1852, 1854, 1855, 1857, 1859, 1862, 1864, 1865, 1869, 1872, 1875, 1876, 1878, 1881, 1883, 1885, 1887, 1890, 1893, 1895, 1896, 1899, 1900, 1904, 1905, 1909, 1913, 1917, 1921, 1922, 1925, 1930, 1931, 1932, 1936, 1937, 1938, 1942, 1943, 1944, 1948, 1949, 1950, 1953, 1954, 1957, 1963, 1966, 1969, 1971, 1974, 1975, 1976, 1979, 1981, 1984, 1987, 1988, 1993, 1994, 1996, 1999, 2001, 2002, 2004, 2005, 2008, 2009, 2012, 2015, 2018, 2020, 2023, 2024, 2025, 2028, 2030, 2033, 2035, 2037, 2038, 2041, 2043, 2046, 2047], "returns": [52, 74, 92, 108, 128, 155, 172, 197, 227, 244, 255, 260, 293, 298, 305, 328, 348, 370, 389, 411, 416, 423, 437, 462, 483, 488, 493, 498, 506, 511, 516, 521, 526, 531, 536, 541, 563, 589, 614, 636, 661, 693, 698, 705, 749, 754, 759, 774, 779, 784, 787, 1243, 1292, 1354, 1386, 1956], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 136, 144, 261, 292, 297, 302, 412, 417, 424, 484, 489, 494, 499, 507, 512, 517, 522, 527, 532, 537, 542, 692, 697, 702, 748, 753, 758, 773, 778, 783, 788, 1268, 1328, 1746, 1800, 1915], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 33, "universal_type": "function", "name": "getWidth", "text_snippet": "namespace ofxCv {\n\t// these functions are for accessing Mat, ofPixels and ofImage consistently.\n\t// "}, {"node_id": 44, "universal_type": "function", "name": "getWidth", "text_snippet": "int getWidth(const T& src) {return src.getWidth();}"}, {"node_id": 46, "universal_type": "function", "name": "unknown", "text_snippet": "getWidth(const T& src)"}, {"node_id": 66, "universal_type": "function", "name": "getHeight", "text_snippet": "int getHeight(const T& src) {return src.getHeight();}"}, {"node_id": 68, "universal_type": "function", "name": "unknown", "text_snippet": "getHeight(const T& src)"}, {"node_id": 80, "universal_type": "function", "name": "getWidth", "text_snippet": "inline int getWidth(const cv::Mat& src) {return src.cols;}"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "getWidth(const cv::Mat& src)"}, {"node_id": 96, "universal_type": "function", "name": "getHeight", "text_snippet": "inline int getHeight(const cv::Mat& src) {return src.rows;}"}, {"node_id": 100, "universal_type": "function", "name": "unknown", "text_snippet": "getHeight(const cv::Mat& src)"}, {"node_id": 120, "universal_type": "function", "name": "getAllocated", "text_snippet": "bool getAllocated(const T& src) {\n\t\treturn getWidth(src) > 0 && getHeight(src) > 0;\n\t}"}, {"node_id": 122, "universal_type": "function", "name": "unknown", "text_snippet": "getAllocated(const T& src)"}, {"node_id": 145, "universal_type": "function", "name": "getDepth", "text_snippet": "inline int getDepth(int cvImageType) {\n return CV_MAT_DEPTH(cvImageType);\n }"}, {"node_id": 149, "universal_type": "function", "name": "unknown", "text_snippet": "getDepth(int cvImageType)"}, {"node_id": 160, "universal_type": "function", "name": "getDepth", "text_snippet": "inline int getDepth(const cv::Mat& mat) {\n return mat.depth();\n }"}, {"node_id": 164, "universal_type": "function", "name": "unknown", "text_snippet": "getDepth(const cv::Mat& mat)"}, {"node_id": 178, "universal_type": "function", "name": "getDepth", "text_snippet": "inline int getDepth(const ofTexture& tex) {\n // avoid \"texture not allocated\" warning\n "}, {"node_id": 182, "universal_type": "function", "name": "unknown", "text_snippet": "getDepth(const ofTexture& tex)"}, {"node_id": 270, "universal_type": "function", "name": "getDepth", "text_snippet": "int getDepth(const ofPixels_<T>& pixels) {\n\t\tswitch(pixels.getBytesPerChannel()) {\n\t\t\tcase 4: return"}, {"node_id": 272, "universal_type": "function", "name": "unknown", "text_snippet": "getDepth(const ofPixels_<T>& pixels)"}, {"node_id": 311, "universal_type": "function", "name": "getDepth", "text_snippet": "inline int getDepth(const ofPixels_<signed short>& pixels) {\n\t\treturn CV_16S;\n\t}"}, {"node_id": 315, "universal_type": "function", "name": "unknown", "text_snippet": "getDepth(const ofPixels_<signed short>& pixels)"}, {"node_id": 358, "universal_type": "function", "name": "getDepth", "text_snippet": "int getDepth(const ofBaseHasPixels_<T>& img) {\n\t\treturn getDepth(img.getPixels());\n\t}"}, {"node_id": 360, "universal_type": "function", "name": "unknown", "text_snippet": "getDepth(const ofBaseHasPixels_<T>& img)"}, {"node_id": 379, "universal_type": "function", "name": "getChannels", "text_snippet": "inline int getChannels(int cvImageType) {\n\t\treturn CV_MAT_CN(cvImageType);\n\t}"}, {"node_id": 383, "universal_type": "function", "name": "unknown", "text_snippet": "getChannels(int cvImageType)"}, {"node_id": 394, "universal_type": "function", "name": "getChannels", "text_snippet": "inline int getChannels(ofImageType imageType) {\n\t\tswitch(imageType) {\n\t\t\tcase OF_IMAGE_COLOR_ALPHA: "}, {"node_id": 398, "universal_type": "function", "name": "unknown", "text_snippet": "getChannels(ofImageType imageType)"}, {"node_id": 425, "universal_type": "function", "name": "getChannels", "text_snippet": "inline int getChannels(const cv::Mat& mat) {\n\t\treturn mat.channels();\n\t}"}, {"node_id": 429, "universal_type": "function", "name": "unknown", "text_snippet": "getChannels(const cv::Mat& mat)"}, {"node_id": 443, "universal_type": "function", "name": "getChannels", "text_snippet": "inline int getChannels(const ofTexture& tex) {\n // avoid \"texture not allocated\" warning\n "}, {"node_id": 447, "universal_type": "function", "name": "unknown", "text_snippet": "getChannels(const ofTexture& tex)"}, {"node_id": 551, "universal_type": "function", "name": "getChannels", "text_snippet": "int getChannels(const ofPixels_<T>& pixels) {\n\t\treturn pixels.getNumChannels();\n\t}"}, {"node_id": 553, "universal_type": "function", "name": "unknown", "text_snippet": "getChannels(const ofPixels_<T>& pixels)"}, {"node_id": 577, "universal_type": "function", "name": "getChannels", "text_snippet": "int getChannels(const ofBaseHasPixels_<T>& img) {\n\t\treturn getChannels(img.getPixels());\n\t}"}, {"node_id": 579, "universal_type": "function", "name": "unknown", "text_snippet": "getChannels(const ofBaseHasPixels_<T>& img)"}, {"node_id": 598, "universal_type": "function", "name": "getCvImageType", "text_snippet": "inline int getCvImageType(int channels, int cvDepth = CV_8U) {\n\t\treturn CV_MAKETYPE(cvDepth, channel"}, {"node_id": 602, "universal_type": "function", "name": "cvDepth", "text_snippet": "getCvImageType(int channels, int cvDepth = CV_8U)"}, {"node_id": 620, "universal_type": "function", "name": "getCvImageType", "text_snippet": "inline int getCvImageType(ofImageType imageType, int cvDepth = CV_8U) {\n\t\treturn CV_MAKETYPE(cvDepth"}, {"node_id": 624, "universal_type": "function", "name": "cvDepth", "text_snippet": "getCvImageType(ofImageType imageType, int cvDepth = CV_8U)"}, {"node_id": 653, "universal_type": "function", "name": "getCvImageType", "text_snippet": "int getCvImageType(const T& img) {\n\t\treturn CV_MAKETYPE(getDepth(img), getChannels(img));\n\t}"}, {"node_id": 655, "universal_type": "function", "name": "unknown", "text_snippet": "getCvImageType(const T& img)"}, {"node_id": 673, "universal_type": "function", "name": "unknown", "text_snippet": "inline ofImageType getOfImageType(int cvImageType) {\n\t\tswitch(getChannels(cvImageType)) {\n\t\t\tcase 4:"}, {"node_id": 677, "universal_type": "function", "name": "unknown", "text_snippet": "getOfImageType(int cvImageType)"}, {"node_id": 707, "universal_type": "function", "name": "getGlImageType", "text_snippet": "inline int getGlImageType(int cvImageType) {\n int channels = getChannels(cvImageType);\n "}, {"node_id": 711, "universal_type": "function", "name": "unknown", "text_snippet": "getGlImageType(int cvImageType)"}, {"node_id": 861, "universal_type": "function", "name": "allocate", "text_snippet": "inline void allocate(ofTexture& img, int width, int height, int cvType) {\n if (!img.isAllocat"}, {"node_id": 865, "universal_type": "function", "name": "width,", "text_snippet": "allocate(ofTexture& img, int width, int height, int cvType)"}, {"node_id": 927, "universal_type": "function", "name": "allocate", "text_snippet": "inline void allocate(cv::Mat& img, int width, int height, int cvType) {\n if (getWidth(img) !="}, {"node_id": 931, "universal_type": "function", "name": "width,", "text_snippet": "allocate(cv::Mat& img, int width, int height, int cvType)"}, {"node_id": 983, "universal_type": "function", "name": "allocate", "text_snippet": "inline void allocate(ofBaseVideoDraws & img, int width, int height, int cvType) {}"}, {"node_id": 987, "universal_type": "function", "name": "width,", "text_snippet": "allocate(ofBaseVideoDraws & img, int width, int height, int cvType)"}, {"node_id": 1002, "universal_type": "function", "name": "allocate", "text_snippet": "inline void allocate(ofVideoPlayer & img, int width, int height, int cvType) {}"}, {"node_id": 1006, "universal_type": "function", "name": "width,", "text_snippet": "allocate(ofVideoPlayer & img, int width, int height, int cvType)"}, {"node_id": 1021, "universal_type": "function", "name": "allocate", "text_snippet": "inline void allocate(ofVideoGrabber & img, int width, int height, int cvType) {}"}, {"node_id": 1025, "universal_type": "function", "name": "width,", "text_snippet": "allocate(ofVideoGrabber & img, int width, int height, int cvType)"}, {"node_id": 1040, "universal_type": "function", "name": "allocate", "text_snippet": "inline void allocate(const ofBaseVideoDraws & img, int width, int height, int cvType) {}"}, {"node_id": 1044, "universal_type": "function", "name": "width,", "text_snippet": "allocate(const ofBaseVideoDraws & img, int width, int height, int cvType)"}, {"node_id": 1059, "universal_type": "function", "name": "allocate", "text_snippet": "inline void allocate(const ofVideoPlayer & img, int width, int height, int cvType) {}"}, {"node_id": 1063, "universal_type": "function", "name": "width,", "text_snippet": "allocate(const ofVideoPlayer & img, int width, int height, int cvType)"}, {"node_id": 1078, "universal_type": "function", "name": "allocate", "text_snippet": "inline void allocate(const ofVideoGrabber & img, int width, int height, int cvType) {}"}, {"node_id": 1082, "universal_type": "function", "name": "width,", "text_snippet": "allocate(const ofVideoGrabber & img, int width, int height, int cvType)"}, {"node_id": 1178, "universal_type": "function", "name": "unknown", "text_snippet": "getMaxVal(int cvDepth)"}, {"node_id": 1186, "universal_type": "function", "name": "unknown", "text_snippet": "getMaxVal(const cv::Mat& mat)"}, {"node_id": 1196, "universal_type": "function", "name": "unknown", "text_snippet": "getTargetChannelsFromCode(int conversionCode)"}, {"node_id": 1399, "universal_type": "function", "name": "unknown", "text_snippet": "toCv(ofMesh& mesh)"}, {"node_id": 1427, "universal_type": "function", "name": "unknown", "text_snippet": "toCv(ofRectangle rect)"}, {"node_id": 1501, "universal_type": "function", "name": "unknown", "text_snippet": "toCv(ofColor color)"}, {"node_id": 1848, "universal_type": "function", "name": "unknown", "text_snippet": "toOf(cv::Rect rect)"}, {"node_id": 1858, "universal_type": "function", "name": "unknown", "text_snippet": "toOf(cv::RotatedRect rect)"}], "class_declarations": [{"node_id": 81, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 97, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 146, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 161, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 179, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 312, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 334, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 380, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 395, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 426, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 444, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 599, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 621, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 674, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 708, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 862, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 928, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 984, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 1003, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 1022, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 1041, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 1060, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 1079, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 3, "text": "#include \"opencv2/opencv.hpp\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"ofRectangle.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"ofTexture.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"ofPixels.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"ofBaseTypes.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"ofVideoPlayer.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"ofVideoGrabber.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"ofPolyline.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"ofVectorMath.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"ofMesh.h\"\n"}, {"node_id": 31, "text": "#include"}]}, "original_source_code": "/*\n utilities are used internally by ofxCv, and make it easier to write code that\n can work with OpenCv and openFrameworks data.\n \n useful functions from this file:\n - imitate and copy\n - toCv and toOf\n */\n\n#pragma once\n\n#include \"opencv2/opencv.hpp\"\n#include \"ofRectangle.h\"\n#include \"ofTexture.h\"\n#include \"ofPixels.h\"\n#include \"ofBaseTypes.h\"\n#include \"ofVideoPlayer.h\"\n#include \"ofVideoGrabber.h\"\n#include \"ofPolyline.h\"\n#include \"ofVectorMath.h\"\n#include \"ofMesh.h\"\n\nnamespace ofxCv {\n\t// these functions are for accessing Mat, ofPixels and ofImage consistently.\n\t// they're very important for imitate().\n\t\n\t// width, height\n\ttemplate <class T> inline int getWidth(const T& src) {return src.getWidth();}\n\ttemplate <class T> inline int getHeight(const T& src) {return src.getHeight();}\n\tinline int getWidth(const cv::Mat& src) {return src.cols;}\n\tinline int getHeight(const cv::Mat& src) {return src.rows;}\n\ttemplate <class T> inline bool getAllocated(const T& src) {\n\t\treturn getWidth(src) > 0 && getHeight(src) > 0;\n\t}\n\t\n\t// depth\n inline int getDepth(int cvImageType) {\n return CV_MAT_DEPTH(cvImageType);\n }\n\n inline int getDepth(const cv::Mat& mat) {\n return mat.depth();\n }\n\n inline int getDepth(const ofTexture& tex) {\n // avoid \"texture not allocated\" warning\n if(!tex.isAllocated()) {\n return CV_8U;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA:\n case GL_RGB:\n case GL_LUMINANCE_ALPHA:\n case GL_LUMINANCE:\n return CV_8U;\n\n#ifndef TARGET_OPENGLES\n case GL_RGBA8:\n case GL_RGB8:\n case GL_LUMINANCE8:\n case GL_LUMINANCE8_ALPHA8:\n return CV_8U;\n\n case GL_RGBA32F_ARB:\n case GL_RGB32F_ARB:\n case GL_LUMINANCE32F_ARB:\n return CV_32F;\n#endif\n default: return 0;\n }\n }\n template <class T> inline int getDepth(const ofPixels_<T>& pixels) {\n\t\tswitch(pixels.getBytesPerChannel()) {\n\t\t\tcase 4: return CV_32F;\n\t\t\tcase 2: return CV_16U;\n\t\t\tcase 1: default: return CV_8U;\n\t\t}\n\t}\n\ttemplate <> inline int getDepth(const ofPixels_<signed short>& pixels) {\n\t\treturn CV_16S;\n\t}\n\ttemplate <> inline int getDepth(const ofPixels_<signed char>& pixels) {\n\t\treturn CV_8S;\n\t}\n\ttemplate <class T> inline int getDepth(const ofBaseHasPixels_<T>& img) {\n\t\treturn getDepth(img.getPixels());\n\t}\n\t\n\t// channels\n\tinline int getChannels(int cvImageType) {\n\t\treturn CV_MAT_CN(cvImageType);\n\t}\n\tinline int getChannels(ofImageType imageType) {\n\t\tswitch(imageType) {\n\t\t\tcase OF_IMAGE_COLOR_ALPHA: return 4;\n\t\t\tcase OF_IMAGE_COLOR: return 3;\n\t\t\tcase OF_IMAGE_GRAYSCALE: default: return 1;\n\t\t}\n\t}\n\tinline int getChannels(const cv::Mat& mat) {\n\t\treturn mat.channels();\n\t}\n inline int getChannels(const ofTexture& tex) {\n // avoid \"texture not allocated\" warning\n if(!tex.isAllocated()) {\n return GL_RGB;\n }\n int type = tex.getTextureData().glInternalFormat;\n switch(type) {\n case GL_RGBA: return 4;\n case GL_RGB: return 3;\n case GL_LUMINANCE_ALPHA: return 2;\n case GL_LUMINANCE: return 1;\n \n#ifndef TARGET_OPENGLES\n case GL_RGBA8: return 4;\n case GL_RGB8: return 3;\n case GL_LUMINANCE8: return 1;\n case GL_LUMINANCE8_ALPHA8: return 2;\n \n case GL_RGBA32F_ARB: return 4;\n case GL_RGB32F_ARB: return 3;\n case GL_LUMINANCE32F_ARB: return 1;\n#endif\n default: return 0;\n }\n }\n\ttemplate <class T> inline int getChannels(const ofPixels_<T>& pixels) {\n\t\treturn pixels.getNumChannels();\n\t}\n\ttemplate <class T> inline int getChannels(const ofBaseHasPixels_<T>& img) {\n\t\treturn getChannels(img.getPixels());\n\t}\n\t\n\t// image type\n\tinline int getCvImageType(int channels, int cvDepth = CV_8U) {\n\t\treturn CV_MAKETYPE(cvDepth, channels);\n\t}\n\tinline int getCvImageType(ofImageType imageType, int cvDepth = CV_8U) {\n\t\treturn CV_MAKETYPE(cvDepth, getChannels(imageType));\n\t}\n\ttemplate <class T> inline int getCvImageType(const T& img) {\n\t\treturn CV_MAKETYPE(getDepth(img), getChannels(img));\n\t}\n\tinline ofImageType getOfImageType(int cvImageType) {\n\t\tswitch(getChannels(cvImageType)) {\n\t\t\tcase 4: return OF_IMAGE_COLOR_ALPHA;\n\t\t\tcase 3: return OF_IMAGE_COLOR;\n\t\t\tcase 1: default: return OF_IMAGE_GRAYSCALE;\n\t\t}\n\t}\n inline int getGlImageType(int cvImageType) {\n int channels = getChannels(cvImageType);\n int depth = getDepth(cvImageType);\n switch(depth) {\n case CV_8U:\n switch(channels) {\n case 1: return GL_LUMINANCE;\n case 3: return GL_RGB;\n case 4: return GL_RGBA;\n }\n#ifndef TARGET_OPENGLES\n case CV_32F:\n switch(channels) {\n case 1: return GL_LUMINANCE32F_ARB;\n case 3: return GL_RGB32F;\n case 4: return GL_RGBA32F;\n }\n#endif\n }\n return 0;\n }\n\t\n\t// allocation\n\t// only happens when necessary\n\ttemplate <class T> inline void allocate(T& img, int width, int height, int cvType) {\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getOfImageType(cvType));\n }\n }\n inline void allocate(ofTexture& img, int width, int height, int cvType) {\n if (!img.isAllocated() ||\n getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType)\n {\n img.allocate(width, height, getGlImageType(cvType));\n }\n }\n\tinline void allocate(cv::Mat& img, int width, int height, int cvType) {\n if (getWidth(img) != width ||\n getHeight(img) != height ||\n getCvImageType(img) != cvType) {\n\t\t\timg.create(height, width, cvType);\n\t\t}\n\t}\n\t// ofVideoPlayer/Grabber can't be allocated, so we assume we don't need to do anything\n inline void allocate(ofBaseVideoDraws & img, int width, int height, int cvType) {}\n inline void allocate(ofVideoPlayer & img, int width, int height, int cvType) {}\n inline void allocate(ofVideoGrabber & img, int width, int height, int cvType) {}\n\n inline void allocate(const ofBaseVideoDraws & img, int width, int height, int cvType) {}\n inline void allocate(const ofVideoPlayer & img, int width, int height, int cvType) {}\n inline void allocate(const ofVideoGrabber & img, int width, int height, int cvType) {}\n\n\t// imitate() is good for preparing buffers\n\t// it's like allocate(), but uses the size and type of the original as a reference\n\t// like allocate(), the image being allocated is the first argument\t\n\t\n\t// this version copies size, but manually specifies mirror's image type\n\ttemplate <class M, class O> void imitate(M& mirror, const O& original, int mirrorCvImageType) {\n\t\tint ow = getWidth(original), oh = getHeight(original);\n\t\tallocate(mirror, ow, oh, mirrorCvImageType);\n\t}\n\n\t// this version copies size and image type\n\ttemplate <class M, class O> void imitate(M& mirror, const O& original) {\n\t\timitate(mirror, original, getCvImageType(original));\n\t}\n\n\t// maximum possible values for that depth or matrix\n\tfloat getMaxVal(int cvDepth);\n\tfloat getMaxVal(const cv::Mat& mat);\n\tint getTargetChannelsFromCode(int conversionCode);\n \n\t// toCv functions\n\t// for conversion functions, the signature reveals the behavior:\n\t// 1 Type& argument // creates a shallow copy of the data\n\t// 2 const Type& argument // creates a deep copy of the data\n\t// 3 Type argument // creates a deep copy of the data\n\t// style 1 is used when possible (for Mat conversion). style 2 is used when\n\t// dealing with a lot of data that can't/shouldn't be shallow copied. style 3\n\t// is used for small objects where the compiler can optimize the copying if\n\t// necessary. the reference is avoided to make inline toCv/toOf use easier.\n\t\n cv::Mat toCv(cv::Mat& mat);\n cv::Mat toCv(const cv::Mat& mat);\n\n\ttemplate <class T> inline cv::Mat toCv(ofPixels_<T>& pix) {\n\t\treturn cv::Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), pix.getData(), 0);\n\t}\n\n template <class T> inline cv::Mat toCv(const ofPixels_<T>& pix) {\n return cv::Mat(pix.getHeight(), pix.getWidth(), getCvImageType(pix), const_cast<T*>(pix.getData()), 0).clone();\n }\n\n\ttemplate <class T> inline cv::Mat toCv(ofBaseHasPixels_<T>& img) {\n\t\treturn toCv(img.getPixels());\n\t}\n\n template <class T> inline cv::Mat toCv(const ofBaseHasPixels_<T>& img) {\n return toCv(img.getPixels());\n }\n\n\tcv::Mat toCv(ofMesh& mesh);\n\tcv::Point2f toCv(glm::vec2 vec);\n\tcv::Point3f toCv(glm::vec3 vec);\n\tcv::Rect toCv(ofRectangle rect);\n\tstd::vector<cv::Point2f> toCv(const ofPolyline& polyline);\n\tstd::vector<cv::Point2f> toCv(const std::vector<glm::vec2>& points);\n\tstd::vector<cv::Point3f> toCv(const std::vector<glm::vec3>& points);\n\tcv::Scalar toCv(ofColor color);\n\t\n\t// cross-toolkit, cross-bitdepth copying\n\ttemplate <class S, class D>\n\tvoid copy(S& src, D& dst, int dstDepth) {\n\t\timitate(dst, src, getCvImageType(getChannels(src), dstDepth));\n cv::Mat srcMat = toCv(src);\n cv::Mat dstMat = toCv(dst);\n\t\tif(srcMat.type() == dstMat.type()) {\n\t\t\tsrcMat.copyTo(dstMat);\n\t\t} else {\n\t\t\tdouble alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n\t\t\tsrcMat.convertTo(dstMat, dstMat.depth(), alpha);\n\t\t}\n\t}\n\n template <class S, class D>\n void copy(const S& src, D& dst, int dstDepth) {\n imitate(dst, src, getCvImageType(getChannels(src), dstDepth));\n cv::Mat srcMat = toCv(src);\n cv::Mat dstMat = toCv(dst);\n if(srcMat.type() == dstMat.type()) {\n srcMat.copyTo(dstMat);\n } else {\n double alpha = getMaxVal(dstMat) / getMaxVal(srcMat);\n srcMat.convertTo(dstMat, dstMat.depth(), alpha);\n }\n }\n\n\t// most of the time you want the destination to be the same as the source. but\n\t// sometimes your destination is a different depth, and copy() will notice and\n\t// do the conversion for you.\n\ttemplate <class S, class D>\n\tvoid copy(S& src, D& dst) {\n\t\tint dstDepth = 0;\n\t\tif(getAllocated(dst)) {\n\t\t\tdstDepth = getDepth(dst);\n\t\t} else {\n\t\t\tdstDepth = getDepth(src);\n\t\t}\n\t\tcopy(src, dst, dstDepth);\n\t}\n\n template <class S, class D>\n void copy(const S& src, D& dst) {\n int dstDepth = 0;\n if(getAllocated(dst)) {\n dstDepth = getDepth(dst);\n } else {\n dstDepth = getDepth(src);\n }\n copy(src, dst, dstDepth);\n }\n\n\t// toOf functions\n\tglm::vec2 toOf(cv::Point2f point);\n\tglm::vec3 toOf(cv::Point3f point);\n\tofRectangle toOf(cv::Rect rect);\n\tofPolyline toOf(cv::RotatedRect rect);\n\ttemplate <class T> inline ofPolyline toOf(const std::vector<cv::Point_<T>>& contour) {\n\t\tofPolyline polyline;\n\t\tpolyline.resize(contour.size());\n for(std::size_t i = 0; i < contour.size(); i++) {\n\t\t\tpolyline[i].x = contour[i].x;\n\t\t\tpolyline[i].y = contour[i].y;\n\t\t}\n\t\tpolyline.close();\n\t\treturn polyline;\n\t}\n\ttemplate <class T>\n\tvoid toOf(cv::Mat mat, ofPixels_<T>& pixels) {\n\t\tpixels.setFromExternalPixels(mat.ptr<T>(), mat.cols, mat.rows, mat.channels());\n\t}\n\ttemplate <class T>\n\tvoid toOf(cv::Mat mat, ofImage_<T>& img) {\n\t\timitate(img, mat);\n\t\ttoOf(mat, img.getPixels());\n\t}\n}\n"}
29
c
/* Copyright (c) 2009 Yahoo! Inc. All rights reserved. The copyrights embodied in the content of this file are licensed under the BSD (revised) open source license */ #ifndef PE_H #define PE_H #include <stdint.h> #include "io.h" #include "parse_regressor.h" #include "parse_primitives.h" #include "parser.h" #include "example.h" //example processing int read_features(parser* p, void* ex); hash_func_t getHasher(const std::string& s); #endif
25.18
17
(translation_unit) "/*\nCopyright (c) 2009 Yahoo! Inc. All rights reserved. The copyrights\nembodied in the content of this file are licensed under the BSD\n(revised) open source license\n */\n\n#ifndef PE_H\n#define PE_H\n#include <stdint.h>\n#include "io.h"\n#include "parse_regressor.h"\n#include "parse_primitives.h"\n#include "parser.h"\n#include "example.h"\n\n//example processing\nint read_features(parser* p, void* ex);\nhash_func_t getHasher(const std::string& s);\n\n#endif\n" (comment) "/*\nCopyright (c) 2009 Yahoo! Inc. All rights reserved. The copyrights\nembodied in the content of this file are licensed under the BSD\n(revised) open source license\n */" (preproc_ifdef) "#ifndef PE_H\n#define PE_H\n#include <stdint.h>\n#include "io.h"\n#include "parse_regressor.h"\n#include "parse_primitives.h"\n#include "parser.h"\n#include "example.h"\n\n//example processing\nint read_features(parser* p, void* ex);\nhash_func_t getHasher(const std::string& s);\n\n#endif" (#ifndef) "#ifndef" (identifier) "PE_H" (preproc_def) "#define PE_H\n" (#define) "#define" (identifier) "PE_H" (preproc_include) "#include <stdint.h>\n" (#include) "#include" (system_lib_string) "<stdint.h>" (preproc_include) "#include "io.h"\n" (#include) "#include" (string_literal) ""io.h"" (") """ (string_content) "io.h" (") """ (preproc_include) "#include "parse_regressor.h"\n" (#include) "#include" (string_literal) ""parse_regressor.h"" (") """ (string_content) "parse_regressor.h" (") """ (preproc_include) "#include "parse_primitives.h"\n" (#include) "#include" (string_literal) ""parse_primitives.h"" (") """ (string_content) "parse_primitives.h" (") """ (preproc_include) "#include "parser.h"\n" (#include) "#include" (string_literal) ""parser.h"" (") """ (string_content) "parser.h" (") """ (preproc_include) "#include "example.h"\n" (#include) "#include" (string_literal) ""example.h"" (") """ (string_content) "example.h" (") """ (comment) "//example processing" (declaration) "int read_features(parser* p, void* ex);" (primitive_type) "int" (function_declarator) "read_features(parser* p, void* ex)" (identifier) "read_features" (parameter_list) "(parser* p, void* ex)" (() "(" (parameter_declaration) "parser* p" (type_identifier) "parser" (pointer_declarator) "* p" (*) "*" (identifier) "p" (,) "," (parameter_declaration) "void* ex" (primitive_type) "void" (pointer_declarator) "* ex" (*) "*" (identifier) "ex" ()) ")" (;) ";" (declaration) "hash_func_t getHasher(const std::string& s);" (type_identifier) "hash_func_t" (function_declarator) "getHasher(const std::string& s)" (identifier) "getHasher" (parameter_list) "(const std::string& s)" (() "(" (parameter_declaration) "const std::string& s" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "s" ()) ")" (;) ";" (#endif) "#endif"
80
1
{"language": "c", "success": true, "metadata": {"lines": 17, "avg_line_length": 25.18, "nodes": 50, "errors": 0, "source_hash": "f2b71d3f97a77f54336e52930f5a95786635c3b699964694c833d5c90ffdeabd", "categorized_nodes": 39}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef PE_H\n#define PE_H\n#include <stdint.h>\n#include \"io.h\"\n#include \"parse_regressor.h\"\n#include \"parse_primitives.h\"\n#include \"parser.h\"\n#include \"example.h\"\n\n//example processing\nint read_features(parser* p, void* ex);\nhash_func_t getHasher(const std::string& s);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 39, 49], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 2, "type": "identifier", "text": "PE_H", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 12}}, {"id": 3, "type": "preproc_def", "text": "#define PE_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 5, "type": "identifier", "text": "PE_H", "parent": 3, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 12}}, {"id": 6, "type": "preproc_include", "text": "#include <stdint.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdint.h>", "parent": 6, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include \"io.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"io.h\"", "parent": 9, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 15}}, {"id": 12, "type": "preproc_include", "text": "#include \"parse_regressor.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"parse_regressor.h\"", "parent": 12, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 28}}, {"id": 15, "type": "preproc_include", "text": "#include \"parse_primitives.h\"\n", "parent": 0, "children": [16, 17], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"parse_primitives.h\"", "parent": 15, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 29}}, {"id": 18, "type": "preproc_include", "text": "#include \"parser.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": "\"parser.h\"", "parent": 18, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 19}}, {"id": 21, "type": "preproc_include", "text": "#include \"example.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": "\"example.h\"", "parent": 21, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 20}}, {"id": 24, "type": "declaration", "text": "int read_features(parser* p, void* ex);", "parent": 0, "children": [25, 26], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 39}}, {"id": 25, "type": "primitive_type", "text": "int", "parent": 24, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 3}}, {"id": 26, "type": "function_declarator", "text": "read_features(parser* p, void* ex)", "parent": 24, "children": [27, 28], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 38}}, {"id": 27, "type": "identifier", "text": "read_features", "parent": 26, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 17}}, {"id": 28, "type": "parameter_list", "text": "(parser* p, void* ex)", "parent": 26, "children": [29, 34], "start_point": {"row": 16, "column": 17}, "end_point": {"row": 16, "column": 38}}, {"id": 29, "type": "parameter_declaration", "text": "parser* p", "parent": 28, "children": [30, 31], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 27}}, {"id": 30, "type": "type_identifier", "text": "parser", "parent": 29, "children": [], "start_point": {"row": 16, "column": 18}, "end_point": {"row": 16, "column": 24}}, {"id": 31, "type": "pointer_declarator", "text": "* p", "parent": 29, "children": [32, 33], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 27}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 25}}, {"id": 33, "type": "identifier", "text": "p", "parent": 31, "children": [], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 27}}, {"id": 34, "type": "parameter_declaration", "text": "void* ex", "parent": 28, "children": [35, 36], "start_point": {"row": 16, "column": 29}, "end_point": {"row": 16, "column": 37}}, {"id": 35, "type": "primitive_type", "text": "void", "parent": 34, "children": [], "start_point": {"row": 16, "column": 29}, "end_point": {"row": 16, "column": 33}}, {"id": 36, "type": "pointer_declarator", "text": "* ex", "parent": 34, "children": [37, 38], "start_point": {"row": 16, "column": 33}, "end_point": {"row": 16, "column": 37}}, {"id": 37, "type": "*", "text": "*", "parent": 36, "children": [], "start_point": {"row": 16, "column": 33}, "end_point": {"row": 16, "column": 34}}, {"id": 38, "type": "identifier", "text": "ex", "parent": 36, "children": [], "start_point": {"row": 16, "column": 35}, "end_point": {"row": 16, "column": 37}}, {"id": 39, "type": "declaration", "text": "hash_func_t getHasher(const std::string& s);", "parent": 0, "children": [40, 41], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 44}}, {"id": 40, "type": "type_identifier", "text": "hash_func_t", "parent": 39, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 11}}, {"id": 41, "type": "function_declarator", "text": "getHasher(const std::string& s)", "parent": 39, "children": [42, 43], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 43}}, {"id": 42, "type": "identifier", "text": "getHasher", "parent": 41, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 21}}, {"id": 43, "type": "parameter_list", "text": "(const std::string& s)", "parent": 41, "children": [44], "start_point": {"row": 17, "column": 21}, "end_point": {"row": 17, "column": 43}}, {"id": 44, "type": "parameter_declaration", "text": "const std::string& s", "parent": 43, "children": [45, 46, 48], "start_point": {"row": 17, "column": 22}, "end_point": {"row": 17, "column": 42}}, {"id": 45, "type": "type_identifier", "text": "std", "parent": 44, "children": [], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 31}}, {"id": 46, "type": "ERROR", "text": "::string&", "parent": 44, "children": [47], "start_point": {"row": 17, "column": 31}, "end_point": {"row": 17, "column": 40}}, {"id": 47, "type": "identifier", "text": "string", "parent": 46, "children": [], "start_point": {"row": 17, "column": 33}, "end_point": {"row": 17, "column": 39}}, {"id": 48, "type": "identifier", "text": "s", "parent": 44, "children": [], "start_point": {"row": 17, "column": 41}, "end_point": {"row": 17, "column": 42}}, {"id": 49, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}]}, "node_categories": {"declarations": {"functions": [26, 41], "variables": [24, 29, 34, 39, 44], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 27, 30, 33, 38, 40, 42, 45, 47, 48, 49], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 26, "universal_type": "function", "name": "unknown", "text_snippet": "read_features(parser* p, void* ex)"}, {"node_id": 41, "universal_type": "function", "name": "unknown", "text_snippet": "getHasher(const std::string& s)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <stdint.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"io.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"parse_regressor.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"parse_primitives.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"parser.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"example.h\"\n"}, {"node_id": 22, "text": "#include"}]}, "original_source_code": "/*\nCopyright (c) 2009 Yahoo! Inc. All rights reserved. The copyrights\nembodied in the content of this file are licensed under the BSD\n(revised) open source license\n */\n\n#ifndef PE_H\n#define PE_H\n#include <stdint.h>\n#include \"io.h\"\n#include \"parse_regressor.h\"\n#include \"parse_primitives.h\"\n#include \"parser.h\"\n#include \"example.h\"\n\n//example processing\nint read_features(parser* p, void* ex);\nhash_func_t getHasher(const std::string& s);\n\n#endif\n"}
30
c
// // Meal.h // FoodTrackerObjC // // Created by <NAME> on 19/3/18. // Copyright © 2018 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface Meal : NSObject @property (weak, nonatomic) NSString *name; @property (weak, nonatomic) UIImage *photo; @property (nonatomic) NSInteger rating; -(void)setParams:(NSString*)name andPhoto:(UIImage*)photo andRating:(NSInteger)rating; @end
25.4
15
(translation_unit) "//\n// Meal.h\n// FoodTrackerObjC\n//\n// Created by <NAME> on 19/3/18.\n// Copyright © 2018 <NAME>. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n\n@interface Meal : NSObject\n\n@property (weak, nonatomic) NSString *name;\n@property (weak, nonatomic) UIImage *photo;\n@property (nonatomic) NSInteger rating;\n\n-(void)setParams:(NSString*)name andPhoto:(UIImage*)photo andRating:(NSInteger)rating;\n\n@end\n" (comment) "//" (comment) "// Meal.h" (comment) "// FoodTrackerObjC" (comment) "//" (comment) "// Created by <NAME> on 19/3/18." (comment) "// Copyright © 2018 <NAME>. All rights reserved.\n" (comment) "/\n" (preproc_call) "import <UIKit/UIKit.h>\n\n" (preproc_directive) "import " (preproc_arg) "UIKit/UIKit.h>\n" (ERROR) "interface Meal : NSObject\n\n@property (weak, nonatomic) NSString *name;\n@property (weak, nonatomic) UIImage *photo;\n@property (nonatomic) NSInteger rating;\n\n-(void)setParams:(NSString*)name andPhoto:(UIImage*)photo andRating:(N" (ERROR) "i" (type_identifier) "nterface " (ERROR) "eal : NSObject\n\n@p" (identifier) "eal " (:) " " (identifier) "SObject\n" (ERROR) "p" (function_declarator) "roperty (weak, nonatomic) " (identifier) "roperty " (parameter_list) "weak, nonatomic) " (() "w" (identifier) "eak," (,) " " (identifier) "onatomic)" ()) " " (declaration) "SString *name;\n" (type_identifier) "SString " (pointer_declarator) "name;" (*) "n" (identifier) "ame;" (;) "\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty (weak, nonatomic) UIImage *photo;\n" (macro_type_specifier) "roperty (weak, nonatomic) " (identifier) "roperty " (() "w" (ERROR) "eak, " (type_descriptor) "eak," (type_identifier) "eak," (,) " " (type_descriptor) "onatomic)" (type_identifier) "onatomic)" ()) " " (ERROR) "IImage " (identifier) "IImage " (pointer_declarator) "photo;" (*) "p" (identifier) "hoto;" (;) "\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty (nonatomic) NSInteger rating;\n" (macro_type_specifier) "roperty (nonatomic) " (identifier) "roperty " (() "n" (type_descriptor) "onatomic)" (type_identifier) "onatomic)" ()) " " (identifier) "SInteger " (ERROR) "ating;" (identifier) "ating;" (;) "\n" (unary_expression) "(void)setParams:" (-) "(" (cast_expression) "void)setParams:" (() "v" (type_descriptor) "oid)" (primitive_type) "oid)" ()) "s" (identifier) "etParams:" (:) "(" (() "N" (binary_expression) "SString*)name andPhoto:" (identifier) "SString*" (*) ")" (ERROR) "name " ()) "n" (identifier) "ame " (identifier) "ndPhoto:" (:) "(" (() "U" (binary_expression) "IImage*)photo andRating:" (identifier) "IImage*" (*) ")" (ERROR) "photo " ()) "p" (identifier) "hoto " (identifier) "ndRating:" (:) "(" (() "N" (declaration) "SInteger)rating;\n" (type_identifier) "SInteger)" (ERROR) "r" ()) "r" (identifier) "ating;" (;) "\n" (ERROR) "e" (ERROR) "e" (expression_statement) "nd\n" (identifier) "nd\n" (;) ""
104
16
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 25.4, "nodes": 66, "errors": 0, "source_hash": "407598d27546229643f88766cac37ecf00a14458ff65bb1b715f6d2ddc8fd211", "categorized_nodes": 39}, "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": "ERROR", "text": "interface Meal : NSObject\n\n@property (weak, nonatomic) NSString *name;\n@property (weak, nonatomic) UIImage *photo;\n@property (nonatomic) NSInteger rating;\n\n-(void)setParams:(NSString*)name andPhoto:(UIImage*)photo andRating:(N", "parent": null, "children": [3, 4, 5, 9, 14, 19, 21, 34, 36, 44, 49, 54], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 17, "column": 69}}, {"id": 3, "type": "ERROR", "text": "i", "parent": 2, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 4, "type": "type_identifier", "text": "nterface ", "parent": 2, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 10}}, {"id": 5, "type": "ERROR", "text": "eal : NSObject\n\n@p", "parent": 2, "children": [6, 7, 8], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 13, "column": 1}}, {"id": 6, "type": "identifier", "text": "eal ", "parent": 5, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 15}}, {"id": 7, "type": "identifier", "text": "SObject\n", "parent": 5, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 26}}, {"id": 8, "type": "ERROR", "text": "p", "parent": 5, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 9, "type": "function_declarator", "text": "roperty (weak, nonatomic) ", "parent": 2, "children": [10, 11], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 27}}, {"id": 10, "type": "identifier", "text": "roperty ", "parent": 9, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 9}}, {"id": 11, "type": "parameter_list", "text": "weak, nonatomic) ", "parent": 9, "children": [12, 13], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 27}}, {"id": 12, "type": "identifier", "text": "eak,", "parent": 11, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 15}}, {"id": 13, "type": "identifier", "text": "onatomic)", "parent": 11, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 26}}, {"id": 14, "type": "declaration", "text": "SString *name;\n", "parent": 2, "children": [15, 16], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 43}}, {"id": 15, "type": "type_identifier", "text": "SString ", "parent": 14, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 36}}, {"id": 16, "type": "pointer_declarator", "text": "name;", "parent": 14, "children": [17, 18], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 42}}, {"id": 17, "type": "*", "text": "n", "parent": 16, "children": [], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 38}}, {"id": 18, "type": "identifier", "text": "ame;", "parent": 16, "children": [], "start_point": {"row": 13, "column": 38}, "end_point": {"row": 13, "column": 42}}, {"id": 19, "type": "ERROR", "text": "p", "parent": 2, "children": [20], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 20, "type": "ERROR", "text": "p", "parent": 19, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 21, "type": "declaration", "text": "roperty (weak, nonatomic) UIImage *photo;\n", "parent": 2, "children": [22, 29, 31], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 43}}, {"id": 22, "type": "macro_type_specifier", "text": "roperty (weak, nonatomic) ", "parent": 21, "children": [23, 24, 27], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 27}}, {"id": 23, "type": "identifier", "text": "roperty ", "parent": 22, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 24, "type": "ERROR", "text": "eak, ", "parent": 22, "children": [25], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 16}}, {"id": 25, "type": "type_descriptor", "text": "eak,", "parent": 24, "children": [26], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 15}}, {"id": 26, "type": "type_identifier", "text": "eak,", "parent": 25, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 15}}, {"id": 27, "type": "type_descriptor", "text": "onatomic)", "parent": 22, "children": [28], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 26}}, {"id": 28, "type": "type_identifier", "text": "onatomic)", "parent": 27, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 26}}, {"id": 29, "type": "ERROR", "text": "IImage ", "parent": 21, "children": [30], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 35}}, {"id": 30, "type": "identifier", "text": "IImage ", "parent": 29, "children": [], "start_point": {"row": 14, "column": 28}, "end_point": {"row": 14, "column": 35}}, {"id": 31, "type": "pointer_declarator", "text": "photo;", "parent": 21, "children": [32, 33], "start_point": {"row": 14, "column": 36}, "end_point": {"row": 14, "column": 42}}, {"id": 32, "type": "*", "text": "p", "parent": 31, "children": [], "start_point": {"row": 14, "column": 36}, "end_point": {"row": 14, "column": 37}}, {"id": 33, "type": "identifier", "text": "hoto;", "parent": 31, "children": [], "start_point": {"row": 14, "column": 37}, "end_point": {"row": 14, "column": 42}}, {"id": 34, "type": "ERROR", "text": "p", "parent": 2, "children": [35], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 35, "type": "ERROR", "text": "p", "parent": 34, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 36, "type": "declaration", "text": "roperty (nonatomic) NSInteger rating;\n", "parent": 2, "children": [37, 41, 42], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 39}}, {"id": 37, "type": "macro_type_specifier", "text": "roperty (nonatomic) ", "parent": 36, "children": [38, 39], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 21}}, {"id": 38, "type": "identifier", "text": "roperty ", "parent": 37, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 9}}, {"id": 39, "type": "type_descriptor", "text": "onatomic)", "parent": 37, "children": [40], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 40, "type": "type_identifier", "text": "onatomic)", "parent": 39, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 20}}, {"id": 41, "type": "identifier", "text": "SInteger ", "parent": 36, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 31}}, {"id": 42, "type": "ERROR", "text": "ating;", "parent": 36, "children": [43], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 38}}, {"id": 43, "type": "identifier", "text": "ating;", "parent": 42, "children": [], "start_point": {"row": 15, "column": 32}, "end_point": {"row": 15, "column": 38}}, {"id": 44, "type": "unary_expression", "text": "(void)setParams:", "parent": 2, "children": [45], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 16}}, {"id": 45, "type": "cast_expression", "text": "void)setParams:", "parent": 44, "children": [46, 48], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 16}}, {"id": 46, "type": "type_descriptor", "text": "oid)", "parent": 45, "children": [47], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 6}}, {"id": 47, "type": "primitive_type", "text": "oid)", "parent": 46, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 6}}, {"id": 48, "type": "identifier", "text": "etParams:", "parent": 45, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 16}}, {"id": 49, "type": "binary_expression", "text": "SString*)name andPhoto:", "parent": 2, "children": [50, 51, 53], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 41}}, {"id": 50, "type": "identifier", "text": "SString*", "parent": 49, "children": [], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 26}}, {"id": 51, "type": "ERROR", "text": "name ", "parent": 49, "children": [52], "start_point": {"row": 17, "column": 27}, "end_point": {"row": 17, "column": 32}}, {"id": 52, "type": "identifier", "text": "ame ", "parent": 51, "children": [], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 32}}, {"id": 53, "type": "identifier", "text": "ndPhoto:", "parent": 49, "children": [], "start_point": {"row": 17, "column": 33}, "end_point": {"row": 17, "column": 41}}, {"id": 54, "type": "binary_expression", "text": "IImage*)photo andRating:", "parent": 2, "children": [55, 56, 58], "start_point": {"row": 17, "column": 43}, "end_point": {"row": 17, "column": 67}}, {"id": 55, "type": "identifier", "text": "IImage*", "parent": 54, "children": [], "start_point": {"row": 17, "column": 43}, "end_point": {"row": 17, "column": 50}}, {"id": 56, "type": "ERROR", "text": "photo ", "parent": 54, "children": [57], "start_point": {"row": 17, "column": 51}, "end_point": {"row": 17, "column": 57}}, {"id": 57, "type": "identifier", "text": "hoto ", "parent": 56, "children": [], "start_point": {"row": 17, "column": 52}, "end_point": {"row": 17, "column": 57}}, {"id": 58, "type": "identifier", "text": "ndRating:", "parent": 54, "children": [], "start_point": {"row": 17, "column": 58}, "end_point": {"row": 17, "column": 67}}, {"id": 59, "type": "declaration", "text": "SInteger)rating;\n", "parent": null, "children": [60, 61, 62], "start_point": {"row": 17, "column": 69}, "end_point": {"row": 17, "column": 86}}, {"id": 60, "type": "type_identifier", "text": "SInteger)", "parent": 59, "children": [], "start_point": {"row": 17, "column": 69}, "end_point": {"row": 17, "column": 78}}, {"id": 61, "type": "ERROR", "text": "r", "parent": 59, "children": [], "start_point": {"row": 17, "column": 78}, "end_point": {"row": 17, "column": 79}}, {"id": 62, "type": "identifier", "text": "ating;", "parent": 59, "children": [], "start_point": {"row": 17, "column": 79}, "end_point": {"row": 17, "column": 85}}, {"id": 63, "type": "ERROR", "text": "e", "parent": null, "children": [64], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 64, "type": "ERROR", "text": "e", "parent": 63, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 1}}, {"id": 65, "type": "identifier", "text": "nd\n", "parent": null, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 4}}]}, "node_categories": {"declarations": {"functions": [9], "variables": [14, 21, 36, 59], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [44, 45, 49, 54], "assignments": [], "loops": [], "conditionals": [4, 6, 7, 10, 12, 13, 15, 18, 22, 23, 26, 28, 30, 33, 37, 38, 40, 41, 43, 48, 50, 52, 53, 55, 57, 58, 60, 62, 65], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "unknown", "text_snippet": "roperty (weak, nonatomic) "}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// Meal.h\n// FoodTrackerObjC\n//\n// Created by <NAME> on 19/3/18.\n// Copyright \u00a9 2018 <NAME>. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n\n@interface Meal : NSObject\n\n@property (weak, nonatomic) NSString *name;\n@property (weak, nonatomic) UIImage *photo;\n@property (nonatomic) NSInteger rating;\n\n-(void)setParams:(NSString*)name andPhoto:(UIImage*)photo andRating:(NSInteger)rating;\n\n@end\n"}
31
c
/******************************************************************** * This file is part of the tool Normalizer of the project Discover. * * Copyright (c) 2020-2022 Singapore Blockchain Innovation Programme. * All rights reserved. *******************************************************************/ #include <iostream> #include "llvm/IR/Function.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Module.h" #include "llvm/IR/PassManager.h" #include "llvm/IR/Type.h" #include "llvm/Pass.h" #include "llvm/Passes/PassBuilder.h" #include "llvm/Passes/PassPlugin.h" #include "llvm/Support/raw_ostream.h" #include "llvm/IR/LegacyPassManager.h" #include "llvm/Transforms/IPO/PassManagerBuilder.h" #include "Utils/Common.h" using namespace std; using namespace llvm; namespace discover { struct CombineGEP : public FunctionPass { static char ID; CombineGEP() : FunctionPass(ID) {} virtual bool runOnFunction(Function &F) override; }; } // namespace discover
33.46
28
(translation_unit) "/********************************************************************\n * This file is part of the tool Normalizer of the project Discover.\n *\n * Copyright (c) 2020-2022 Singapore Blockchain Innovation Programme.\n * All rights reserved.\n *******************************************************************/\n\n#include <iostream>\n\n#include "llvm/IR/Function.h"\n#include "llvm/IR/IRBuilder.h"\n#include "llvm/IR/Module.h"\n#include "llvm/IR/PassManager.h"\n#include "llvm/IR/Type.h"\n\n#include "llvm/Pass.h"\n#include "llvm/Passes/PassBuilder.h"\n#include "llvm/Passes/PassPlugin.h"\n#include "llvm/Support/raw_ostream.h"\n\n#include "llvm/IR/LegacyPassManager.h"\n#include "llvm/Transforms/IPO/PassManagerBuilder.h"\n\n#include "Utils/Common.h"\n\nusing namespace std;\nusing namespace llvm;\n\nnamespace discover {\n\nstruct CombineGEP : public FunctionPass {\n static char ID;\n\n CombineGEP() : FunctionPass(ID) {}\n\n virtual bool runOnFunction(Function &F) override;\n};\n\n} // namespace discover\n" (comment) "/********************************************************************\n * This file is part of the tool Normalizer of the project Discover.\n *\n * Copyright (c) 2020-2022 Singapore Blockchain Innovation Programme.\n * All rights reserved.\n *******************************************************************/" (preproc_include) "#include <iostream>\n" (#include) "#include" (system_lib_string) "<iostream>" (preproc_include) "#include "llvm/IR/Function.h"\n" (#include) "#include" (string_literal) ""llvm/IR/Function.h"" (") """ (string_content) "llvm/IR/Function.h" (") """ (preproc_include) "#include "llvm/IR/IRBuilder.h"\n" (#include) "#include" (string_literal) ""llvm/IR/IRBuilder.h"" (") """ (string_content) "llvm/IR/IRBuilder.h" (") """ (preproc_include) "#include "llvm/IR/Module.h"\n" (#include) "#include" (string_literal) ""llvm/IR/Module.h"" (") """ (string_content) "llvm/IR/Module.h" (") """ (preproc_include) "#include "llvm/IR/PassManager.h"\n" (#include) "#include" (string_literal) ""llvm/IR/PassManager.h"" (") """ (string_content) "llvm/IR/PassManager.h" (") """ (preproc_include) "#include "llvm/IR/Type.h"\n" (#include) "#include" (string_literal) ""llvm/IR/Type.h"" (") """ (string_content) "llvm/IR/Type.h" (") """ (preproc_include) "#include "llvm/Pass.h"\n" (#include) "#include" (string_literal) ""llvm/Pass.h"" (") """ (string_content) "llvm/Pass.h" (") """ (preproc_include) "#include "llvm/Passes/PassBuilder.h"\n" (#include) "#include" (string_literal) ""llvm/Passes/PassBuilder.h"" (") """ (string_content) "llvm/Passes/PassBuilder.h" (") """ (preproc_include) "#include "llvm/Passes/PassPlugin.h"\n" (#include) "#include" (string_literal) ""llvm/Passes/PassPlugin.h"" (") """ (string_content) "llvm/Passes/PassPlugin.h" (") """ (preproc_include) "#include "llvm/Support/raw_ostream.h"\n" (#include) "#include" (string_literal) ""llvm/Support/raw_ostream.h"" (") """ (string_content) "llvm/Support/raw_ostream.h" (") """ (preproc_include) "#include "llvm/IR/LegacyPassManager.h"\n" (#include) "#include" (string_literal) ""llvm/IR/LegacyPassManager.h"" (") """ (string_content) "llvm/IR/LegacyPassManager.h" (") """ (preproc_include) "#include "llvm/Transforms/IPO/PassManagerBuilder.h"\n" (#include) "#include" (string_literal) ""llvm/Transforms/IPO/PassManagerBuilder.h"" (") """ (string_content) "llvm/Transforms/IPO/PassManagerBuilder.h" (") """ (preproc_include) "#include "Utils/Common.h"\n" (#include) "#include" (string_literal) ""Utils/Common.h"" (") """ (string_content) "Utils/Common.h" (") """ (declaration) "using namespace std;" (type_identifier) "using" (identifier) "namespace" (ERROR) "std" (identifier) "std" (;) ";" (declaration) "using namespace llvm;" (type_identifier) "using" (identifier) "namespace" (ERROR) "llvm" (identifier) "llvm" (;) ";" (function_definition) "namespace discover {\n\nstruct CombineGEP : public FunctionPass {\n static char ID;\n\n CombineGEP() : FunctionPass(ID) {}\n\n virtual bool runOnFunction(Function &F) override;\n};\n\n}" (type_identifier) "namespace" (identifier) "discover" (compound_statement) "{\n\nstruct CombineGEP : public FunctionPass {\n static char ID;\n\n CombineGEP() : FunctionPass(ID) {}\n\n virtual bool runOnFunction(Function &F) override;\n};\n\n}" ({) "{" (function_definition) "struct CombineGEP : public FunctionPass {\n static char ID;\n\n CombineGEP() : FunctionPass(ID) {}\n\n virtual bool runOnFunction(Function &F) override;\n}" (struct_specifier) "struct CombineGEP" (struct) "struct" (type_identifier) "CombineGEP" (ERROR) ": public" (:) ":" (identifier) "public" (identifier) "FunctionPass" (compound_statement) "{\n static char ID;\n\n CombineGEP() : FunctionPass(ID) {}\n\n virtual bool runOnFunction(Function &F) override;\n}" ({) "{" (declaration) "static char ID;" (storage_class_specifier) "static" (static) "static" (primitive_type) "char" (identifier) "ID" (;) ";" (ERROR) "CombineGEP() :" (call_expression) "CombineGEP()" (identifier) "CombineGEP" (argument_list) "()" (() "(" ()) ")" (:) ":" (function_definition) "FunctionPass(ID) {}" (type_identifier) "FunctionPass" (parenthesized_declarator) "(ID)" (() "(" (identifier) "ID" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (declaration) "virtual bool" (type_identifier) "virtual" (identifier) "bool" (;) "" (expression_statement) "runOnFunction(Function &F) override;" (call_expression) "runOnFunction(Function &F)" (identifier) "runOnFunction" (argument_list) "(Function &F)" (() "(" (binary_expression) "Function &F" (identifier) "Function" (&) "&" (identifier) "F" ()) ")" (ERROR) "override" (identifier) "override" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace discover"
148
5
{"language": "c", "success": true, "metadata": {"lines": 28, "avg_line_length": 33.46, "nodes": 80, "errors": 0, "source_hash": "3d89c279ea1bd3ad8d350ea484487cfcde0d530500fb803c80e6576403824f96", "categorized_nodes": 71}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <iostream>\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": "<iostream>", "parent": 0, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include \"llvm/IR/Function.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": "\"llvm/IR/Function.h\"", "parent": 3, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 29}}, {"id": 6, "type": "preproc_include", "text": "#include \"llvm/IR/IRBuilder.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"llvm/IR/IRBuilder.h\"", "parent": 6, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 30}}, {"id": 9, "type": "preproc_include", "text": "#include \"llvm/IR/Module.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"llvm/IR/Module.h\"", "parent": 9, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 27}}, {"id": 12, "type": "preproc_include", "text": "#include \"llvm/IR/PassManager.h\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"llvm/IR/PassManager.h\"", "parent": 12, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 32}}, {"id": 15, "type": "preproc_include", "text": "#include \"llvm/IR/Type.h\"\n", "parent": null, "children": [16, 17], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 17, "type": "string_literal", "text": "\"llvm/IR/Type.h\"", "parent": 15, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 25}}, {"id": 18, "type": "preproc_include", "text": "#include \"llvm/Pass.h\"\n", "parent": null, "children": [19, 20], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"llvm/Pass.h\"", "parent": 18, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 22}}, {"id": 21, "type": "preproc_include", "text": "#include \"llvm/Passes/PassBuilder.h\"\n", "parent": null, "children": [22, 23], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"llvm/Passes/PassBuilder.h\"", "parent": 21, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 36}}, {"id": 24, "type": "preproc_include", "text": "#include \"llvm/Passes/PassPlugin.h\"\n", "parent": null, "children": [25, 26], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"llvm/Passes/PassPlugin.h\"", "parent": 24, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 35}}, {"id": 27, "type": "preproc_include", "text": "#include \"llvm/Support/raw_ostream.h\"\n", "parent": null, "children": [28, 29], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"llvm/Support/raw_ostream.h\"", "parent": 27, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 37}}, {"id": 30, "type": "preproc_include", "text": "#include \"llvm/IR/LegacyPassManager.h\"\n", "parent": null, "children": [31, 32], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"llvm/IR/LegacyPassManager.h\"", "parent": 30, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 38}}, {"id": 33, "type": "preproc_include", "text": "#include \"llvm/Transforms/IPO/PassManagerBuilder.h\"\n", "parent": null, "children": [34, 35], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"llvm/Transforms/IPO/PassManagerBuilder.h\"", "parent": 33, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 51}}, {"id": 36, "type": "preproc_include", "text": "#include \"Utils/Common.h\"\n", "parent": null, "children": [37, 38], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 38, "type": "string_literal", "text": "\"Utils/Common.h\"", "parent": 36, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 25}}, {"id": 39, "type": "declaration", "text": "using namespace std;", "parent": null, "children": [40, 41, 42], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 20}}, {"id": 40, "type": "type_identifier", "text": "using", "parent": 39, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 5}}, {"id": 41, "type": "identifier", "text": "namespace", "parent": 39, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 15}}, {"id": 42, "type": "ERROR", "text": "std", "parent": 39, "children": [43], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 19}}, {"id": 43, "type": "identifier", "text": "std", "parent": 42, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 19}}, {"id": 44, "type": "declaration", "text": "using namespace llvm;", "parent": null, "children": [45, 46, 47], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 21}}, {"id": 45, "type": "type_identifier", "text": "using", "parent": 44, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 5}}, {"id": 46, "type": "identifier", "text": "namespace", "parent": 44, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 15}}, {"id": 47, "type": "ERROR", "text": "llvm", "parent": 44, "children": [48], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 20}}, {"id": 48, "type": "identifier", "text": "llvm", "parent": 47, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 20}}, {"id": 49, "type": "function_definition", "text": "namespace discover {\n\nstruct CombineGEP : public FunctionPass {\n static char ID;\n\n CombineGEP() : FunctionPass(ID) {}\n\n virtual bool runOnFunction(Function &F) override;\n};\n\n}", "parent": null, "children": [50, 51], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 50, "type": "type_identifier", "text": "namespace", "parent": 49, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 9}}, {"id": 51, "type": "identifier", "text": "discover", "parent": 49, "children": [], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 18}}, {"id": 52, "type": "function_definition", "text": "struct CombineGEP : public FunctionPass {\n static char ID;\n\n CombineGEP() : FunctionPass(ID) {}\n\n virtual bool runOnFunction(Function &F) override;\n}", "parent": 49, "children": [53, 56, 57], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 53, "type": "struct_specifier", "text": "struct CombineGEP", "parent": 52, "children": [54, 55], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 17}}, {"id": 54, "type": "struct", "text": "struct", "parent": 53, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 6}}, {"id": 55, "type": "type_identifier", "text": "CombineGEP", "parent": 53, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 17}}, {"id": 56, "type": "ERROR", "text": ": public", "parent": 52, "children": [], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 26}}, {"id": 57, "type": "identifier", "text": "FunctionPass", "parent": 52, "children": [], "start_point": {"row": 30, "column": 27}, "end_point": {"row": 30, "column": 39}}, {"id": 58, "type": "declaration", "text": "static char ID;", "parent": 52, "children": [59, 60], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 17}}, {"id": 59, "type": "primitive_type", "text": "char", "parent": 58, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 13}}, {"id": 60, "type": "identifier", "text": "ID", "parent": 58, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 16}}, {"id": 61, "type": "ERROR", "text": "CombineGEP() :", "parent": 52, "children": [62], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 16}}, {"id": 62, "type": "call_expression", "text": "CombineGEP()", "parent": 61, "children": [63, 64], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 14}}, {"id": 63, "type": "identifier", "text": "CombineGEP", "parent": 62, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 12}}, {"id": 64, "type": "argument_list", "text": "()", "parent": 62, "children": [], "start_point": {"row": 33, "column": 12}, "end_point": {"row": 33, "column": 14}}, {"id": 65, "type": "function_definition", "text": "FunctionPass(ID) {}", "parent": 52, "children": [66, 67], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 36}}, {"id": 66, "type": "type_identifier", "text": "FunctionPass", "parent": 65, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 29}}, {"id": 67, "type": "parenthesized_declarator", "text": "(ID)", "parent": 65, "children": [68], "start_point": {"row": 33, "column": 29}, "end_point": {"row": 33, "column": 33}}, {"id": 68, "type": "identifier", "text": "ID", "parent": 67, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 32}}, {"id": 69, "type": "declaration", "text": "virtual bool", "parent": 52, "children": [70, 71], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 14}}, {"id": 70, "type": "type_identifier", "text": "virtual", "parent": 69, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 9}}, {"id": 71, "type": "identifier", "text": "bool", "parent": 69, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 14}}, {"id": 72, "type": "call_expression", "text": "runOnFunction(Function &F)", "parent": 52, "children": [73, 74], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 41}}, {"id": 73, "type": "identifier", "text": "runOnFunction", "parent": 72, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 28}}, {"id": 74, "type": "argument_list", "text": "(Function &F)", "parent": 72, "children": [75], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 41}}, {"id": 75, "type": "binary_expression", "text": "Function &F", "parent": 74, "children": [76, 77], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 40}}, {"id": 76, "type": "identifier", "text": "Function", "parent": 75, "children": [], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 37}}, {"id": 77, "type": "identifier", "text": "F", "parent": 75, "children": [], "start_point": {"row": 35, "column": 39}, "end_point": {"row": 35, "column": 40}}, {"id": 78, "type": "ERROR", "text": "override", "parent": 52, "children": [79], "start_point": {"row": 35, "column": 42}, "end_point": {"row": 35, "column": 50}}, {"id": 79, "type": "identifier", "text": "override", "parent": 78, "children": [], "start_point": {"row": 35, "column": 42}, "end_point": {"row": 35, "column": 50}}]}, "node_categories": {"declarations": {"functions": [49, 52, 65], "variables": [39, 44, 58, 69], "classes": [53, 54], "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], "modules": [], "enums": []}, "statements": {"expressions": [62, 72, 75], "assignments": [], "loops": [], "conditionals": [40, 41, 43, 45, 46, 48, 50, 51, 55, 57, 60, 63, 66, 68, 70, 71, 73, 76, 77, 79], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 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": 49, "universal_type": "function", "name": "CombineGEP", "text_snippet": "namespace discover {\n\nstruct CombineGEP : public FunctionPass {\n static char ID;\n\n CombineGEP() : "}, {"node_id": 52, "universal_type": "function", "name": "CombineGEP", "text_snippet": "struct CombineGEP : public FunctionPass {\n static char ID;\n\n CombineGEP() : FunctionPass(ID) {}\n\n "}, {"node_id": 65, "universal_type": "function", "name": "unknown", "text_snippet": "FunctionPass(ID) {}"}], "class_declarations": [{"node_id": 53, "universal_type": "class", "name": "CombineGEP", "text_snippet": "struct CombineGEP"}, {"node_id": 54, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <iostream>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"llvm/IR/Function.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"llvm/IR/IRBuilder.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"llvm/IR/Module.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"llvm/IR/PassManager.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"llvm/IR/Type.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"llvm/Pass.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"llvm/Passes/PassBuilder.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"llvm/Passes/PassPlugin.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"llvm/Support/raw_ostream.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"llvm/IR/LegacyPassManager.h\"\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"llvm/Transforms/IPO/PassManagerBuilder.h\"\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include \"Utils/Common.h\"\n"}, {"node_id": 37, "text": "#include"}]}, "original_source_code": "/********************************************************************\n * This file is part of the tool Normalizer of the project Discover.\n *\n * Copyright (c) 2020-2022 Singapore Blockchain Innovation Programme.\n * All rights reserved.\n *******************************************************************/\n\n#include <iostream>\n\n#include \"llvm/IR/Function.h\"\n#include \"llvm/IR/IRBuilder.h\"\n#include \"llvm/IR/Module.h\"\n#include \"llvm/IR/PassManager.h\"\n#include \"llvm/IR/Type.h\"\n\n#include \"llvm/Pass.h\"\n#include \"llvm/Passes/PassBuilder.h\"\n#include \"llvm/Passes/PassPlugin.h\"\n#include \"llvm/Support/raw_ostream.h\"\n\n#include \"llvm/IR/LegacyPassManager.h\"\n#include \"llvm/Transforms/IPO/PassManagerBuilder.h\"\n\n#include \"Utils/Common.h\"\n\nusing namespace std;\nusing namespace llvm;\n\nnamespace discover {\n\nstruct CombineGEP : public FunctionPass {\n static char ID;\n\n CombineGEP() : FunctionPass(ID) {}\n\n virtual bool runOnFunction(Function &F) override;\n};\n\n} // namespace discover\n"}
32
c
#pragma once #include <KAI/Network/Config.h> KAI_NET_BEGIN struct Address; struct NetHandle; struct Node; struct Representative; struct Domain; KAI_NET_END
16.33
9
(translation_unit) "#pragma once\n\n#include <KAI/Network/Config.h>\n\nKAI_NET_BEGIN\n\nstruct Address;\nstruct NetHandle;\nstruct Node;\nstruct Representative;\nstruct Domain;\n\nKAI_NET_END\n\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <KAI/Network/Config.h>\n" (#include) "#include" (system_lib_string) "<KAI/Network/Config.h>" (declaration) "KAI_NET_BEGIN\n\nstruct Address;" (type_identifier) "KAI_NET_BEGIN" (ERROR) "struct" (identifier) "struct" (identifier) "Address" (;) ";" (struct_specifier) "struct NetHandle" (struct) "struct" (type_identifier) "NetHandle" (;) ";" (struct_specifier) "struct Node" (struct) "struct" (type_identifier) "Node" (;) ";" (struct_specifier) "struct Representative" (struct) "struct" (type_identifier) "Representative" (;) ";" (struct_specifier) "struct Domain" (struct) "struct" (type_identifier) "Domain" (;) ";" (expression_statement) "KAI_NET_END" (identifier) "KAI_NET_END" (;) ""
32
1
{"language": "c", "success": true, "metadata": {"lines": 9, "avg_line_length": 16.33, "nodes": 24, "errors": 0, "source_hash": "ccf4885c082a61b7efa666f5a8740a34056a81f27643b1edd4c993987b534b80", "categorized_nodes": 21}, "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 <KAI/Network/Config.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": "<KAI/Network/Config.h>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 31}}, {"id": 6, "type": "declaration", "text": "KAI_NET_BEGIN\n\nstruct Address;", "parent": null, "children": [7, 8, 10], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 6, "column": 15}}, {"id": 7, "type": "type_identifier", "text": "KAI_NET_BEGIN", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 13}}, {"id": 8, "type": "ERROR", "text": "struct", "parent": 6, "children": [9], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 6}}, {"id": 9, "type": "identifier", "text": "struct", "parent": 8, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 6}}, {"id": 10, "type": "identifier", "text": "Address", "parent": 6, "children": [], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 14}}, {"id": 11, "type": "struct_specifier", "text": "struct NetHandle", "parent": null, "children": [12, 13], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 16}}, {"id": 12, "type": "struct", "text": "struct", "parent": 11, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 6}}, {"id": 13, "type": "type_identifier", "text": "NetHandle", "parent": 11, "children": [], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 16}}, {"id": 14, "type": "struct_specifier", "text": "struct Node", "parent": null, "children": [15, 16], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 11}}, {"id": 15, "type": "struct", "text": "struct", "parent": 14, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 16, "type": "type_identifier", "text": "Node", "parent": 14, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 11}}, {"id": 17, "type": "struct_specifier", "text": "struct Representative", "parent": null, "children": [18, 19], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 21}}, {"id": 18, "type": "struct", "text": "struct", "parent": 17, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 19, "type": "type_identifier", "text": "Representative", "parent": 17, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 21}}, {"id": 20, "type": "struct_specifier", "text": "struct Domain", "parent": null, "children": [21, 22], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 13}}, {"id": 21, "type": "struct", "text": "struct", "parent": 20, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 22, "type": "type_identifier", "text": "Domain", "parent": 20, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 13}}, {"id": 23, "type": "identifier", "text": "KAI_NET_END", "parent": null, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 11}}]}, "node_categories": {"declarations": {"functions": [], "variables": [6], "classes": [11, 12, 14, 15, 17, 18, 20, 21], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [7, 9, 10, 13, 16, 19, 22, 23], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 11, "universal_type": "class", "name": "NetHandle", "text_snippet": "struct NetHandle"}, {"node_id": 12, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 14, "universal_type": "class", "name": "Node", "text_snippet": "struct Node"}, {"node_id": 15, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 17, "universal_type": "class", "name": "Representative", "text_snippet": "struct Representative"}, {"node_id": 18, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 20, "universal_type": "class", "name": "Domain", "text_snippet": "struct Domain"}, {"node_id": 21, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include <KAI/Network/Config.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <KAI/Network/Config.h>\n\nKAI_NET_BEGIN\n\nstruct Address;\nstruct NetHandle;\nstruct Node;\nstruct Representative;\nstruct Domain;\n\nKAI_NET_END\n\n"}
33
c
/// \file FileOperations.h /// /// This file is part of RakNet Copyright 2003 Jenkins Software LLC /// /// Usage of RakNet is subject to the appropriate license agreement. #include "NativeFeatureIncludes.h" #if _RAKNET_SUPPORT_FileOperations==1 #ifndef __FILE_OPERATIONS_H #define __FILE_OPERATIONS_H #include "Export.h" bool RAK_DLL_EXPORT WriteFileWithDirectories( const char *path, char *data, unsigned dataLength ); bool RAK_DLL_EXPORT IsSlash(unsigned char c); void RAK_DLL_EXPORT AddSlash( char *input ); void RAK_DLL_EXPORT QuoteIfSpaces(char *str); bool RAK_DLL_EXPORT DirectoryExists(const char *directory); unsigned int RAK_DLL_EXPORT GetFileLength(const char *path); #endif #endif // _RAKNET_SUPPORT_FileOperations
30.46
24
(translation_unit) "/// \file FileOperations.h \n/// \n/// This file is part of RakNet Copyright 2003 Jenkins Software LLC \n/// \n/// Usage of RakNet is subject to the appropriate license agreement. \n \n#include "NativeFeatureIncludes.h" \n#if _RAKNET_SUPPORT_FileOperations==1 \n \n#ifndef __FILE_OPERATIONS_H \n#define __FILE_OPERATIONS_H \n \n#include "Export.h" \n \nbool RAK_DLL_EXPORT WriteFileWithDirectories( const char *path, char *data, unsigned dataLength ); \nbool RAK_DLL_EXPORT IsSlash(unsigned char c); \nvoid RAK_DLL_EXPORT AddSlash( char *input ); \nvoid RAK_DLL_EXPORT QuoteIfSpaces(char *str); \nbool RAK_DLL_EXPORT DirectoryExists(const char *directory); \nunsigned int RAK_DLL_EXPORT GetFileLength(const char *path); \n \n#endif \n \n#endif // _RAKNET_SUPPORT_FileOperations \n" (comment) "/// \file FileOperations.h " (comment) "/// " (comment) "/// This file is part of RakNet Copyright 2003 Jenkins Software LLC " (comment) "/// " (comment) "/// Usage of RakNet is subject to the appropriate license agreement. " (preproc_include) "#include "NativeFeatureIncludes.h" \n" (#include) "#include" (string_literal) ""NativeFeatureIncludes.h"" (") """ (string_content) "NativeFeatureIncludes.h" (") """ (preproc_if) "#if _RAKNET_SUPPORT_FileOperations==1 \n \n#ifndef __FILE_OPERATIONS_H \n#define __FILE_OPERATIONS_H \n \n#include "Export.h" \n \nbool RAK_DLL_EXPORT WriteFileWithDirectories( const char *path, char *data, unsigned dataLength ); \nbool RAK_DLL_EXPORT IsSlash(unsigned char c); \nvoid RAK_DLL_EXPORT AddSlash( char *input ); \nvoid RAK_DLL_EXPORT QuoteIfSpaces(char *str); \nbool RAK_DLL_EXPORT DirectoryExists(const char *directory); \nunsigned int RAK_DLL_EXPORT GetFileLength(const char *path); \n \n#endif \n \n#endif" (#if) "#if" (binary_expression) "_RAKNET_SUPPORT_FileOperations==1" (identifier) "_RAKNET_SUPPORT_FileOperations" (==) "==" (number_literal) "1" ( ) "\n" (preproc_ifdef) "#ifndef __FILE_OPERATIONS_H \n#define __FILE_OPERATIONS_H \n \n#include "Export.h" \n \nbool RAK_DLL_EXPORT WriteFileWithDirectories( const char *path, char *data, unsigned dataLength ); \nbool RAK_DLL_EXPORT IsSlash(unsigned char c); \nvoid RAK_DLL_EXPORT AddSlash( char *input ); \nvoid RAK_DLL_EXPORT QuoteIfSpaces(char *str); \nbool RAK_DLL_EXPORT DirectoryExists(const char *directory); \nunsigned int RAK_DLL_EXPORT GetFileLength(const char *path); \n \n#endif" (#ifndef) "#ifndef" (identifier) "__FILE_OPERATIONS_H" (preproc_def) "#define __FILE_OPERATIONS_H \n" (#define) "#define" (identifier) "__FILE_OPERATIONS_H" (preproc_include) "#include "Export.h" \n" (#include) "#include" (string_literal) ""Export.h"" (") """ (string_content) "Export.h" (") """ (declaration) "bool RAK_DLL_EXPORT WriteFileWithDirectories( const char *path, char *data, unsigned dataLength );" (primitive_type) "bool" (ERROR) "RAK_DLL_EXPORT" (identifier) "RAK_DLL_EXPORT" (function_declarator) "WriteFileWithDirectories( const char *path, char *data, unsigned dataLength )" (identifier) "WriteFileWithDirectories" (parameter_list) "( const char *path, char *data, unsigned dataLength )" (() "(" (parameter_declaration) "const char *path" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*path" (*) "*" (identifier) "path" (,) "," (parameter_declaration) "char *data" (primitive_type) "char" (pointer_declarator) "*data" (*) "*" (identifier) "data" (,) "," (parameter_declaration) "unsigned dataLength" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (identifier) "dataLength" ()) ")" (;) ";" (declaration) "bool RAK_DLL_EXPORT IsSlash(unsigned char c);" (primitive_type) "bool" (ERROR) "RAK_DLL_EXPORT" (identifier) "RAK_DLL_EXPORT" (function_declarator) "IsSlash(unsigned char c)" (identifier) "IsSlash" (parameter_list) "(unsigned char c)" (() "(" (parameter_declaration) "unsigned char c" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (identifier) "c" ()) ")" (;) ";" (declaration) "void RAK_DLL_EXPORT" (primitive_type) "void" (identifier) "RAK_DLL_EXPORT" (;) "" (expression_statement) "AddSlash( char *input );" (call_expression) "AddSlash( char *input )" (identifier) "AddSlash" (argument_list) "( char *input )" (() "(" (binary_expression) "char *input" (identifier) "char" (*) "*" (identifier) "input" ()) ")" (;) ";" (declaration) "void RAK_DLL_EXPORT" (primitive_type) "void" (identifier) "RAK_DLL_EXPORT" (;) "" (expression_statement) "QuoteIfSpaces(char *str);" (call_expression) "QuoteIfSpaces(char *str)" (identifier) "QuoteIfSpaces" (argument_list) "(char *str)" (() "(" (binary_expression) "char *str" (identifier) "char" (*) "*" (identifier) "str" ()) ")" (;) ";" (declaration) "bool RAK_DLL_EXPORT DirectoryExists(const char *directory);" (primitive_type) "bool" (ERROR) "RAK_DLL_EXPORT" (identifier) "RAK_DLL_EXPORT" (function_declarator) "DirectoryExists(const char *directory)" (identifier) "DirectoryExists" (parameter_list) "(const char *directory)" (() "(" (parameter_declaration) "const char *directory" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*directory" (*) "*" (identifier) "directory" ()) ")" (;) ";" (declaration) "unsigned int RAK_DLL_EXPORT GetFileLength(const char *path);" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (ERROR) "RAK_DLL_EXPORT" (identifier) "RAK_DLL_EXPORT" (function_declarator) "GetFileLength(const char *path)" (identifier) "GetFileLength" (parameter_list) "(const char *path)" (() "(" (parameter_declaration) "const char *path" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*path" (*) "*" (identifier) "path" ()) ")" (;) ";" (#endif) "#endif" (#endif) "#endif" (comment) "// _RAKNET_SUPPORT_FileOperations "
143
4
{"language": "c", "success": true, "metadata": {"lines": 24, "avg_line_length": 30.46, "nodes": 100, "errors": 0, "source_hash": "dd626ec22234c41f2ea8b37c8c961e8b32862580a2815026a656029e454db30d", "categorized_nodes": 62}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"NativeFeatureIncludes.h\"\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"NativeFeatureIncludes.h\"", "parent": 0, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 34}}, {"id": 3, "type": "preproc_if", "text": "#if _RAKNET_SUPPORT_FileOperations==1\r\n\r\n#ifndef __FILE_OPERATIONS_H\r\n#define __FILE_OPERATIONS_H\r\n\r\n#include \"Export.h\"\r\n\r\nbool RAK_DLL_EXPORT WriteFileWithDirectories( const char *path, char *data, unsigned dataLength );\r\nbool RAK_DLL_EXPORT IsSlash(unsigned char c);\r\nvoid RAK_DLL_EXPORT AddSlash( char *input );\r\nvoid RAK_DLL_EXPORT QuoteIfSpaces(char *str);\r\nbool RAK_DLL_EXPORT DirectoryExists(const char *directory);\r\nunsigned int RAK_DLL_EXPORT GetFileLength(const char *path);\r\n\r\n#endif\r\n\r\n#endif", "parent": null, "children": [4, 5, 9, 10, 99], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 23, "column": 6}}, {"id": 4, "type": "#if", "text": "#if", "parent": 3, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 3}}, {"id": 5, "type": "binary_expression", "text": "_RAKNET_SUPPORT_FileOperations==1", "parent": 3, "children": [6, 7, 8], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 37}}, {"id": 6, "type": "identifier", "text": "_RAKNET_SUPPORT_FileOperations", "parent": 5, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 34}}, {"id": 7, "type": "==", "text": "==", "parent": 5, "children": [], "start_point": {"row": 7, "column": 34}, "end_point": {"row": 7, "column": 36}}, {"id": 8, "type": "number_literal", "text": "1", "parent": 5, "children": [], "start_point": {"row": 7, "column": 36}, "end_point": {"row": 7, "column": 37}}, {"id": 9, "type": "\n", "text": "\n", "parent": 3, "children": [], "start_point": {"row": 7, "column": 38}, "end_point": {"row": 8, "column": 0}}, {"id": 10, "type": "preproc_ifdef", "text": "#ifndef __FILE_OPERATIONS_H\r\n#define __FILE_OPERATIONS_H\r\n\r\n#include \"Export.h\"\r\n\r\nbool RAK_DLL_EXPORT WriteFileWithDirectories( const char *path, char *data, unsigned dataLength );\r\nbool RAK_DLL_EXPORT IsSlash(unsigned char c);\r\nvoid RAK_DLL_EXPORT AddSlash( char *input );\r\nvoid RAK_DLL_EXPORT QuoteIfSpaces(char *str);\r\nbool RAK_DLL_EXPORT DirectoryExists(const char *directory);\r\nunsigned int RAK_DLL_EXPORT GetFileLength(const char *path);\r\n\r\n#endif", "parent": 3, "children": [11, 12, 13, 16, 19, 40, 52, 62, 72, 84, 98], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 21, "column": 6}}, {"id": 11, "type": "#ifndef", "text": "#ifndef", "parent": 10, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 12, "type": "identifier", "text": "__FILE_OPERATIONS_H", "parent": 10, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 27}}, {"id": 13, "type": "preproc_def", "text": "#define __FILE_OPERATIONS_H\r\n", "parent": 10, "children": [14, 15], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 14, "type": "#define", "text": "#define", "parent": 13, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 15, "type": "identifier", "text": "__FILE_OPERATIONS_H", "parent": 13, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 27}}, {"id": 16, "type": "preproc_include", "text": "#include \"Export.h\"\r\n", "parent": 10, "children": [17, 18], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 17, "type": "#include", "text": "#include", "parent": 16, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 18, "type": "string_literal", "text": "\"Export.h\"", "parent": 16, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 19}}, {"id": 19, "type": "declaration", "text": "bool RAK_DLL_EXPORT WriteFileWithDirectories( const char *path, char *data, unsigned dataLength );", "parent": 10, "children": [20, 21, 23], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 98}}, {"id": 20, "type": "primitive_type", "text": "bool", "parent": 19, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 4}}, {"id": 21, "type": "ERROR", "text": "RAK_DLL_EXPORT", "parent": 19, "children": [22], "start_point": {"row": 14, "column": 5}, "end_point": {"row": 14, "column": 19}}, {"id": 22, "type": "identifier", "text": "RAK_DLL_EXPORT", "parent": 21, "children": [], "start_point": {"row": 14, "column": 5}, "end_point": {"row": 14, "column": 19}}, {"id": 23, "type": "function_declarator", "text": "WriteFileWithDirectories( const char *path, char *data, unsigned dataLength )", "parent": 19, "children": [24, 25], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 97}}, {"id": 24, "type": "identifier", "text": "WriteFileWithDirectories", "parent": 23, "children": [], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 44}}, {"id": 25, "type": "parameter_list", "text": "( const char *path, char *data, unsigned dataLength )", "parent": 23, "children": [26, 31, 36], "start_point": {"row": 14, "column": 44}, "end_point": {"row": 14, "column": 97}}, {"id": 26, "type": "parameter_declaration", "text": "const char *path", "parent": 25, "children": [27, 28], "start_point": {"row": 14, "column": 46}, "end_point": {"row": 14, "column": 62}}, {"id": 27, "type": "primitive_type", "text": "char", "parent": 26, "children": [], "start_point": {"row": 14, "column": 52}, "end_point": {"row": 14, "column": 56}}, {"id": 28, "type": "pointer_declarator", "text": "*path", "parent": 26, "children": [29, 30], "start_point": {"row": 14, "column": 57}, "end_point": {"row": 14, "column": 62}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 14, "column": 57}, "end_point": {"row": 14, "column": 58}}, {"id": 30, "type": "identifier", "text": "path", "parent": 28, "children": [], "start_point": {"row": 14, "column": 58}, "end_point": {"row": 14, "column": 62}}, {"id": 31, "type": "parameter_declaration", "text": "char *data", "parent": 25, "children": [32, 33], "start_point": {"row": 14, "column": 64}, "end_point": {"row": 14, "column": 74}}, {"id": 32, "type": "primitive_type", "text": "char", "parent": 31, "children": [], "start_point": {"row": 14, "column": 64}, "end_point": {"row": 14, "column": 68}}, {"id": 33, "type": "pointer_declarator", "text": "*data", "parent": 31, "children": [34, 35], "start_point": {"row": 14, "column": 69}, "end_point": {"row": 14, "column": 74}}, {"id": 34, "type": "*", "text": "*", "parent": 33, "children": [], "start_point": {"row": 14, "column": 69}, "end_point": {"row": 14, "column": 70}}, {"id": 35, "type": "identifier", "text": "data", "parent": 33, "children": [], "start_point": {"row": 14, "column": 70}, "end_point": {"row": 14, "column": 74}}, {"id": 36, "type": "parameter_declaration", "text": "unsigned dataLength", "parent": 25, "children": [37, 39], "start_point": {"row": 14, "column": 76}, "end_point": {"row": 14, "column": 95}}, {"id": 37, "type": "sized_type_specifier", "text": "unsigned", "parent": 36, "children": [38], "start_point": {"row": 14, "column": 76}, "end_point": {"row": 14, "column": 84}}, {"id": 38, "type": "unsigned", "text": "unsigned", "parent": 37, "children": [], "start_point": {"row": 14, "column": 76}, "end_point": {"row": 14, "column": 84}}, {"id": 39, "type": "identifier", "text": "dataLength", "parent": 36, "children": [], "start_point": {"row": 14, "column": 85}, "end_point": {"row": 14, "column": 95}}, {"id": 40, "type": "declaration", "text": "bool RAK_DLL_EXPORT IsSlash(unsigned char c);", "parent": 10, "children": [41, 42, 44], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 45}}, {"id": 41, "type": "primitive_type", "text": "bool", "parent": 40, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 4}}, {"id": 42, "type": "ERROR", "text": "RAK_DLL_EXPORT", "parent": 40, "children": [43], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 19}}, {"id": 43, "type": "identifier", "text": "RAK_DLL_EXPORT", "parent": 42, "children": [], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 19}}, {"id": 44, "type": "function_declarator", "text": "IsSlash(unsigned char c)", "parent": 40, "children": [45, 46], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 44}}, {"id": 45, "type": "identifier", "text": "IsSlash", "parent": 44, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 27}}, {"id": 46, "type": "parameter_list", "text": "(unsigned char c)", "parent": 44, "children": [47], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 44}}, {"id": 47, "type": "parameter_declaration", "text": "unsigned char c", "parent": 46, "children": [48, 51], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 43}}, {"id": 48, "type": "sized_type_specifier", "text": "unsigned char", "parent": 47, "children": [49, 50], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 41}}, {"id": 49, "type": "unsigned", "text": "unsigned", "parent": 48, "children": [], "start_point": {"row": 15, "column": 28}, "end_point": {"row": 15, "column": 36}}, {"id": 50, "type": "primitive_type", "text": "char", "parent": 48, "children": [], "start_point": {"row": 15, "column": 37}, "end_point": {"row": 15, "column": 41}}, {"id": 51, "type": "identifier", "text": "c", "parent": 47, "children": [], "start_point": {"row": 15, "column": 42}, "end_point": {"row": 15, "column": 43}}, {"id": 52, "type": "declaration", "text": "void RAK_DLL_EXPORT", "parent": 10, "children": [53, 54], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 19}}, {"id": 53, "type": "primitive_type", "text": "void", "parent": 52, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 4}}, {"id": 54, "type": "identifier", "text": "RAK_DLL_EXPORT", "parent": 52, "children": [], "start_point": {"row": 16, "column": 5}, "end_point": {"row": 16, "column": 19}}, {"id": 55, "type": "call_expression", "text": "AddSlash( char *input )", "parent": 10, "children": [56, 57], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 43}}, {"id": 56, "type": "identifier", "text": "AddSlash", "parent": 55, "children": [], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 28}}, {"id": 57, "type": "argument_list", "text": "( char *input )", "parent": 55, "children": [58], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 43}}, {"id": 58, "type": "binary_expression", "text": "char *input", "parent": 57, "children": [59, 60, 61], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 41}}, {"id": 59, "type": "identifier", "text": "char", "parent": 58, "children": [], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 34}}, {"id": 60, "type": "*", "text": "*", "parent": 58, "children": [], "start_point": {"row": 16, "column": 35}, "end_point": {"row": 16, "column": 36}}, {"id": 61, "type": "identifier", "text": "input", "parent": 58, "children": [], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 41}}, {"id": 62, "type": "declaration", "text": "void RAK_DLL_EXPORT", "parent": 10, "children": [63, 64], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 19}}, {"id": 63, "type": "primitive_type", "text": "void", "parent": 62, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 4}}, {"id": 64, "type": "identifier", "text": "RAK_DLL_EXPORT", "parent": 62, "children": [], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 19}}, {"id": 65, "type": "call_expression", "text": "QuoteIfSpaces(char *str)", "parent": 10, "children": [66, 67], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 44}}, {"id": 66, "type": "identifier", "text": "QuoteIfSpaces", "parent": 65, "children": [], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 33}}, {"id": 67, "type": "argument_list", "text": "(char *str)", "parent": 65, "children": [68], "start_point": {"row": 17, "column": 33}, "end_point": {"row": 17, "column": 44}}, {"id": 68, "type": "binary_expression", "text": "char *str", "parent": 67, "children": [69, 70, 71], "start_point": {"row": 17, "column": 34}, "end_point": {"row": 17, "column": 43}}, {"id": 69, "type": "identifier", "text": "char", "parent": 68, "children": [], "start_point": {"row": 17, "column": 34}, "end_point": {"row": 17, "column": 38}}, {"id": 70, "type": "*", "text": "*", "parent": 68, "children": [], "start_point": {"row": 17, "column": 39}, "end_point": {"row": 17, "column": 40}}, {"id": 71, "type": "identifier", "text": "str", "parent": 68, "children": [], "start_point": {"row": 17, "column": 40}, "end_point": {"row": 17, "column": 43}}, {"id": 72, "type": "declaration", "text": "bool RAK_DLL_EXPORT DirectoryExists(const char *directory);", "parent": 10, "children": [73, 74, 76], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 59}}, {"id": 73, "type": "primitive_type", "text": "bool", "parent": 72, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 4}}, {"id": 74, "type": "ERROR", "text": "RAK_DLL_EXPORT", "parent": 72, "children": [75], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 19}}, {"id": 75, "type": "identifier", "text": "RAK_DLL_EXPORT", "parent": 74, "children": [], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 19}}, {"id": 76, "type": "function_declarator", "text": "DirectoryExists(const char *directory)", "parent": 72, "children": [77, 78], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 58}}, {"id": 77, "type": "identifier", "text": "DirectoryExists", "parent": 76, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 35}}, {"id": 78, "type": "parameter_list", "text": "(const char *directory)", "parent": 76, "children": [79], "start_point": {"row": 18, "column": 35}, "end_point": {"row": 18, "column": 58}}, {"id": 79, "type": "parameter_declaration", "text": "const char *directory", "parent": 78, "children": [80, 81], "start_point": {"row": 18, "column": 36}, "end_point": {"row": 18, "column": 57}}, {"id": 80, "type": "primitive_type", "text": "char", "parent": 79, "children": [], "start_point": {"row": 18, "column": 42}, "end_point": {"row": 18, "column": 46}}, {"id": 81, "type": "pointer_declarator", "text": "*directory", "parent": 79, "children": [82, 83], "start_point": {"row": 18, "column": 47}, "end_point": {"row": 18, "column": 57}}, {"id": 82, "type": "*", "text": "*", "parent": 81, "children": [], "start_point": {"row": 18, "column": 47}, "end_point": {"row": 18, "column": 48}}, {"id": 83, "type": "identifier", "text": "directory", "parent": 81, "children": [], "start_point": {"row": 18, "column": 48}, "end_point": {"row": 18, "column": 57}}, {"id": 84, "type": "declaration", "text": "unsigned int RAK_DLL_EXPORT GetFileLength(const char *path);", "parent": 10, "children": [85, 88, 90], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 60}}, {"id": 85, "type": "sized_type_specifier", "text": "unsigned int", "parent": 84, "children": [86, 87], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 12}}, {"id": 86, "type": "unsigned", "text": "unsigned", "parent": 85, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 87, "type": "primitive_type", "text": "int", "parent": 85, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 12}}, {"id": 88, "type": "ERROR", "text": "RAK_DLL_EXPORT", "parent": 84, "children": [89], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 27}}, {"id": 89, "type": "identifier", "text": "RAK_DLL_EXPORT", "parent": 88, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 27}}, {"id": 90, "type": "function_declarator", "text": "GetFileLength(const char *path)", "parent": 84, "children": [91, 92], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 59}}, {"id": 91, "type": "identifier", "text": "GetFileLength", "parent": 90, "children": [], "start_point": {"row": 19, "column": 28}, "end_point": {"row": 19, "column": 41}}, {"id": 92, "type": "parameter_list", "text": "(const char *path)", "parent": 90, "children": [93], "start_point": {"row": 19, "column": 41}, "end_point": {"row": 19, "column": 59}}, {"id": 93, "type": "parameter_declaration", "text": "const char *path", "parent": 92, "children": [94, 95], "start_point": {"row": 19, "column": 42}, "end_point": {"row": 19, "column": 58}}, {"id": 94, "type": "primitive_type", "text": "char", "parent": 93, "children": [], "start_point": {"row": 19, "column": 48}, "end_point": {"row": 19, "column": 52}}, {"id": 95, "type": "pointer_declarator", "text": "*path", "parent": 93, "children": [96, 97], "start_point": {"row": 19, "column": 53}, "end_point": {"row": 19, "column": 58}}, {"id": 96, "type": "*", "text": "*", "parent": 95, "children": [], "start_point": {"row": 19, "column": 53}, "end_point": {"row": 19, "column": 54}}, {"id": 97, "type": "identifier", "text": "path", "parent": 95, "children": [], "start_point": {"row": 19, "column": 54}, "end_point": {"row": 19, "column": 58}}, {"id": 98, "type": "#endif", "text": "#endif", "parent": 10, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 6}}, {"id": 99, "type": "#endif", "text": "#endif", "parent": 3, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 6}}]}, "node_categories": {"declarations": {"functions": [23, 44, 76, 90], "variables": [19, 26, 31, 36, 40, 47, 52, 62, 72, 79, 84, 93], "classes": [], "imports": [0, 1, 16, 17], "modules": [], "enums": []}, "statements": {"expressions": [5, 55, 58, 65, 68], "assignments": [], "loops": [], "conditionals": [3, 4, 6, 10, 11, 12, 15, 22, 24, 30, 35, 37, 39, 43, 45, 48, 51, 54, 56, 59, 61, 64, 66, 69, 71, 75, 77, 83, 85, 89, 91, 97, 98, 99], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 8, 18], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 23, "universal_type": "function", "name": "unknown", "text_snippet": "WriteFileWithDirectories( const char *path, char *data, unsigned dataLength )"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "IsSlash(unsigned char c)"}, {"node_id": 76, "universal_type": "function", "name": "unknown", "text_snippet": "DirectoryExists(const char *directory)"}, {"node_id": 90, "universal_type": "function", "name": "unknown", "text_snippet": "GetFileLength(const char *path)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"NativeFeatureIncludes.h\"\r\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 16, "text": "#include \"Export.h\"\r\n"}, {"node_id": 17, "text": "#include"}]}, "original_source_code": "/// \\file FileOperations.h\r\n///\r\n/// This file is part of RakNet Copyright 2003 Jenkins Software LLC\r\n///\r\n/// Usage of RakNet is subject to the appropriate license agreement.\r\n\r\n#include \"NativeFeatureIncludes.h\"\r\n#if _RAKNET_SUPPORT_FileOperations==1\r\n\r\n#ifndef __FILE_OPERATIONS_H\r\n#define __FILE_OPERATIONS_H\r\n\r\n#include \"Export.h\"\r\n\r\nbool RAK_DLL_EXPORT WriteFileWithDirectories( const char *path, char *data, unsigned dataLength );\r\nbool RAK_DLL_EXPORT IsSlash(unsigned char c);\r\nvoid RAK_DLL_EXPORT AddSlash( char *input );\r\nvoid RAK_DLL_EXPORT QuoteIfSpaces(char *str);\r\nbool RAK_DLL_EXPORT DirectoryExists(const char *directory);\r\nunsigned int RAK_DLL_EXPORT GetFileLength(const char *path);\r\n\r\n#endif\r\n\r\n#endif // _RAKNET_SUPPORT_FileOperations\r\n"}
34
c
//===- BuildFile.h ----------------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LICENSE.txt for license information // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// #ifndef LLBUILD_BUILDSYSTEM_BUILDFILE_H #define LLBUILD_BUILDSYSTEM_BUILDFILE_H #include "llbuild/Basic/Compiler.h" #include "llbuild/Basic/LLVM.h" #include "llvm/ADT/StringRef.h" #include <memory> #include <string> #include <unordered_map> #include <utility> #include <vector> namespace llbuild { namespace basic { class FileSystem; } namespace buildsystem { /// The type used to pass parsed properties to the delegate. typedef std::vector<std::pair<std::string, std::string>> property_list_type; class BuildDescription; class BuildFileDelegate; class BuildKey; class BuildSystem; class BuildSystemCommandInterface; class BuildValue; class Command; class Node; class Target; class Tool; /// Minimal token object representing the range where a diagnostic occurred. struct BuildFileToken { const char* start; unsigned length; }; /// Context for information that may be needed for a configuration action. struct ConfigureContext { /// The file delegate, to use for error reporting, etc. BuildFileDelegate& delegate; /// The file the configuration request originated from. StringRef filename; /// The token to use in error reporting. BuildFileToken at; public: BuildFileDelegate& getDelegate() const { return delegate; } void error(const Twine& message) const; }; class BuildFileDelegate { public: virtual ~BuildFileDelegate(); /// Get an interned string. virtual StringRef getInternedString(StringRef value) = 0; /// Get the file system to use for access. virtual basic::FileSystem& getFileSystem() = 0; /// Called by the build file loader to register the current file contents. // // FIXME: This is a total hack, and should be cleaned up. virtual void setFileContentsBeingParsed(StringRef buffer) = 0; /// Called by the build file loader to report an error. /// /// \param filename The file the error occurred in. /// /// \param at The token at which the error occurred. The token will be null if /// no location is associated. /// /// \param message The diagnostic message. virtual void error(StringRef filename, const BuildFileToken& at, const Twine& message) = 0; /// Called by the build file loader after the 'client' file section has been /// loaded. /// /// \param name The expected client name. /// \param version The client version specified in the file. /// \param properties The list of additional properties passed to the client. /// /// \returns True on success. virtual bool configureClient(const ConfigureContext&, StringRef name, uint32_t version, const property_list_type& properties) = 0; /// Called by the build file loader to get a tool definition. /// /// \param name The name of the tool to lookup. /// \returns The tool to use on success, or otherwise nil. virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0; /// Called by the build file loader to inform the client that a target /// definition has been loaded. virtual void loadedTarget(StringRef name, const Target& target) = 0; /// Called by the build file loader to inform the client that a default /// target has been loaded. virtual void loadedDefaultTarget(StringRef target) = 0; /// Called by the build file loader to inform the client that a command /// has been fully loaded. virtual void loadedCommand(StringRef name, const Command& command) = 0; /// Called by the build file loader to get a node. /// /// \param name The name of the node to lookup. /// /// \param isImplicit Whether the node is an implicit one (created as a side /// effect of being declared by a command). virtual std::unique_ptr<Node> lookupNode(StringRef name, bool isImplicit=false) = 0; }; /// The BuildFile class supports the "llbuild"-native build description file /// format. class BuildFile { private: void *impl; public: /// Create a build file with the given delegate. /// /// \arg mainFilename The path of the main build file. explicit BuildFile(StringRef mainFilename, BuildFileDelegate& delegate); ~BuildFile(); /// Return the delegate the engine was configured with. BuildFileDelegate* getDelegate(); /// Load the build file from the provided filename. /// /// \returns A non-null build description on success. std::unique_ptr<BuildDescription> load(); }; } } #endif
35.59
136
(translation_unit) "//===- BuildFile.h ----------------------------------------------*- C++ -*-===//\n//\n// This source file is part of the Swift.org open source project\n//\n// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors\n// Licensed under Apache License v2.0 with Runtime Library Exception\n//\n// See http://swift.org/LICENSE.txt for license information\n// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors\n//\n//===----------------------------------------------------------------------===//\n\n#ifndef LLBUILD_BUILDSYSTEM_BUILDFILE_H\n#define LLBUILD_BUILDSYSTEM_BUILDFILE_H\n\n#include "llbuild/Basic/Compiler.h"\n#include "llbuild/Basic/LLVM.h"\n\n#include "llvm/ADT/StringRef.h"\n\n#include <memory>\n#include <string>\n#include <unordered_map>\n#include <utility>\n#include <vector>\n\nnamespace llbuild {\nnamespace basic {\n\nclass FileSystem;\n\n}\n\nnamespace buildsystem {\n\n/// The type used to pass parsed properties to the delegate.\ntypedef std::vector<std::pair<std::string, std::string>> property_list_type;\n\nclass BuildDescription;\nclass BuildFileDelegate;\nclass BuildKey;\nclass BuildSystem;\nclass BuildSystemCommandInterface;\nclass BuildValue;\nclass Command;\nclass Node;\nclass Target;\nclass Tool;\n\n/// Minimal token object representing the range where a diagnostic occurred.\nstruct BuildFileToken {\n const char* start;\n unsigned length;\n};\n\n/// Context for information that may be needed for a configuration action.\nstruct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }\n\n void error(const Twine& message) const;\n};\n\nclass BuildFileDelegate {\npublic:\n virtual ~BuildFileDelegate();\n\n /// Get an interned string.\n virtual StringRef getInternedString(StringRef value) = 0;\n \n /// Get the file system to use for access.\n virtual basic::FileSystem& getFileSystem() = 0;\n \n /// Called by the build file loader to register the current file contents.\n //\n // FIXME: This is a total hack, and should be cleaned up.\n virtual void setFileContentsBeingParsed(StringRef buffer) = 0;\n\n /// Called by the build file loader to report an error.\n ///\n /// \param filename The file the error occurred in.\n ///\n /// \param at The token at which the error occurred. The token will be null if\n /// no location is associated.\n ///\n /// \param message The diagnostic message.\n virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;\n \n /// Called by the build file loader after the 'client' file section has been\n /// loaded.\n ///\n /// \param name The expected client name.\n /// \param version The client version specified in the file.\n /// \param properties The list of additional properties passed to the client.\n ///\n /// \returns True on success.\n virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;\n\n /// Called by the build file loader to get a tool definition.\n ///\n /// \param name The name of the tool to lookup.\n /// \returns The tool to use on success, or otherwise nil.\n virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;\n\n /// Called by the build file loader to inform the client that a target\n /// definition has been loaded.\n virtual void loadedTarget(StringRef name, const Target& target) = 0;\n\n /// Called by the build file loader to inform the client that a default\n /// target has been loaded.\n virtual void loadedDefaultTarget(StringRef target) = 0;\n\n /// Called by the build file loader to inform the client that a command\n /// has been fully loaded.\n virtual void loadedCommand(StringRef name, const Command& command) = 0;\n\n /// Called by the build file loader to get a node.\n ///\n /// \param name The name of the node to lookup.\n ///\n /// \param isImplicit Whether the node is an implicit one (created as a side\n /// effect of being declared by a command).\n virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;\n};\n\n/// The BuildFile class supports the "llbuild"-native build description file\n/// format.\nclass BuildFile {\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate.\n ///\n /// \arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);\n ~BuildFile();\n\n /// Return the delegate the engine was configured with.\n BuildFileDelegate* getDelegate();\n\n /// Load the build file from the provided filename.\n ///\n /// \returns A non-null build description on success.\n std::unique_ptr<BuildDescription> load();\n};\n\n}\n}\n\n#endif\n" (comment) "//===- BuildFile.h ----------------------------------------------*- C++ -*-===//" (comment) "//" (comment) "// This source file is part of the Swift.org open source project" (comment) "//" (comment) "// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors" (comment) "// Licensed under Apache License v2.0 with Runtime Library Exception" (comment) "//" (comment) "// See http://swift.org/LICENSE.txt for license information" (comment) "// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors" (comment) "//" (comment) "//===----------------------------------------------------------------------===//" (preproc_ifdef) "#ifndef LLBUILD_BUILDSYSTEM_BUILDFILE_H\n#define LLBUILD_BUILDSYSTEM_BUILDFILE_H\n\n#include "llbuild/Basic/Compiler.h"\n#include "llbuild/Basic/LLVM.h"\n\n#include "llvm/ADT/StringRef.h"\n\n#include <memory>\n#include <string>\n#include <unordered_map>\n#include <utility>\n#include <vector>\n\nnamespace llbuild {\nnamespace basic {\n\nclass FileSystem;\n\n}\n\nnamespace buildsystem {\n\n/// The type used to pass parsed properties to the delegate.\ntypedef std::vector<std::pair<std::string, std::string>> property_list_type;\n\nclass BuildDescription;\nclass BuildFileDelegate;\nclass BuildKey;\nclass BuildSystem;\nclass BuildSystemCommandInterface;\nclass BuildValue;\nclass Command;\nclass Node;\nclass Target;\nclass Tool;\n\n/// Minimal token object representing the range where a diagnostic occurred.\nstruct BuildFileToken {\n const char* start;\n unsigned length;\n};\n\n/// Context for information that may be needed for a configuration action.\nstruct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }\n\n void error(const Twine& message) const;\n};\n\nclass BuildFileDelegate {\npublic:\n virtual ~BuildFileDelegate();\n\n /// Get an interned string.\n virtual StringRef getInternedString(StringRef value) = 0;\n \n /// Get the file system to use for access.\n virtual basic::FileSystem& getFileSystem() = 0;\n \n /// Called by the build file loader to register the current file contents.\n //\n // FIXME: This is a total hack, and should be cleaned up.\n virtual void setFileContentsBeingParsed(StringRef buffer) = 0;\n\n /// Called by the build file loader to report an error.\n ///\n /// \param filename The file the error occurred in.\n ///\n /// \param at The token at which the error occurred. The token will be null if\n /// no location is associated.\n ///\n /// \param message The diagnostic message.\n virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;\n \n /// Called by the build file loader after the 'client' file section has been\n /// loaded.\n ///\n /// \param name The expected client name.\n /// \param version The client version specified in the file.\n /// \param properties The list of additional properties passed to the client.\n ///\n /// \returns True on success.\n virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;\n\n /// Called by the build file loader to get a tool definition.\n ///\n /// \param name The name of the tool to lookup.\n /// \returns The tool to use on success, or otherwise nil.\n virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;\n\n /// Called by the build file loader to inform the client that a target\n /// definition has been loaded.\n virtual void loadedTarget(StringRef name, const Target& target) = 0;\n\n /// Called by the build file loader to inform the client that a default\n /// target has been loaded.\n virtual void loadedDefaultTarget(StringRef target) = 0;\n\n /// Called by the build file loader to inform the client that a command\n /// has been fully loaded.\n virtual void loadedCommand(StringRef name, const Command& command) = 0;\n\n /// Called by the build file loader to get a node.\n ///\n /// \param name The name of the node to lookup.\n ///\n /// \param isImplicit Whether the node is an implicit one (created as a side\n /// effect of being declared by a command).\n virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;\n};\n\n/// The BuildFile class supports the "llbuild"-native build description file\n/// format.\nclass BuildFile {\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate.\n ///\n /// \arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);\n ~BuildFile();\n\n /// Return the delegate the engine was configured with.\n BuildFileDelegate* getDelegate();\n\n /// Load the build file from the provided filename.\n ///\n /// \returns A non-null build description on success.\n std::unique_ptr<BuildDescription> load();\n};\n\n}\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "LLBUILD_BUILDSYSTEM_BUILDFILE_H" (preproc_def) "#define LLBUILD_BUILDSYSTEM_BUILDFILE_H\n" (#define) "#define" (identifier) "LLBUILD_BUILDSYSTEM_BUILDFILE_H" (preproc_include) "#include "llbuild/Basic/Compiler.h"\n" (#include) "#include" (string_literal) ""llbuild/Basic/Compiler.h"" (") """ (string_content) "llbuild/Basic/Compiler.h" (") """ (preproc_include) "#include "llbuild/Basic/LLVM.h"\n" (#include) "#include" (string_literal) ""llbuild/Basic/LLVM.h"" (") """ (string_content) "llbuild/Basic/LLVM.h" (") """ (preproc_include) "#include "llvm/ADT/StringRef.h"\n" (#include) "#include" (string_literal) ""llvm/ADT/StringRef.h"" (") """ (string_content) "llvm/ADT/StringRef.h" (") """ (preproc_include) "#include <memory>\n" (#include) "#include" (system_lib_string) "<memory>" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (preproc_include) "#include <unordered_map>\n" (#include) "#include" (system_lib_string) "<unordered_map>" (preproc_include) "#include <utility>\n" (#include) "#include" (system_lib_string) "<utility>" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (function_definition) "namespace llbuild {\nnamespace basic {\n\nclass FileSystem;\n\n}\n\nnamespace buildsystem {\n\n/// The type used to pass parsed properties to the delegate.\ntypedef std::vector<std::pair<std::string, std::string>> property_list_type;\n\nclass BuildDescription;\nclass BuildFileDelegate;\nclass BuildKey;\nclass BuildSystem;\nclass BuildSystemCommandInterface;\nclass BuildValue;\nclass Command;\nclass Node;\nclass Target;\nclass Tool;\n\n/// Minimal token object representing the range where a diagnostic occurred.\nstruct BuildFileToken {\n const char* start;\n unsigned length;\n};\n\n/// Context for information that may be needed for a configuration action.\nstruct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }\n\n void error(const Twine& message) const;\n};\n\nclass BuildFileDelegate {\npublic:\n virtual ~BuildFileDelegate();\n\n /// Get an interned string.\n virtual StringRef getInternedString(StringRef value) = 0;\n \n /// Get the file system to use for access.\n virtual basic::FileSystem& getFileSystem() = 0;\n \n /// Called by the build file loader to register the current file contents.\n //\n // FIXME: This is a total hack, and should be cleaned up.\n virtual void setFileContentsBeingParsed(StringRef buffer) = 0;\n\n /// Called by the build file loader to report an error.\n ///\n /// \param filename The file the error occurred in.\n ///\n /// \param at The token at which the error occurred. The token will be null if\n /// no location is associated.\n ///\n /// \param message The diagnostic message.\n virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;\n \n /// Called by the build file loader after the 'client' file section has been\n /// loaded.\n ///\n /// \param name The expected client name.\n /// \param version The client version specified in the file.\n /// \param properties The list of additional properties passed to the client.\n ///\n /// \returns True on success.\n virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;\n\n /// Called by the build file loader to get a tool definition.\n ///\n /// \param name The name of the tool to lookup.\n /// \returns The tool to use on success, or otherwise nil.\n virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;\n\n /// Called by the build file loader to inform the client that a target\n /// definition has been loaded.\n virtual void loadedTarget(StringRef name, const Target& target) = 0;\n\n /// Called by the build file loader to inform the client that a default\n /// target has been loaded.\n virtual void loadedDefaultTarget(StringRef target) = 0;\n\n /// Called by the build file loader to inform the client that a command\n /// has been fully loaded.\n virtual void loadedCommand(StringRef name, const Command& command) = 0;\n\n /// Called by the build file loader to get a node.\n ///\n /// \param name The name of the node to lookup.\n ///\n /// \param isImplicit Whether the node is an implicit one (created as a side\n /// effect of being declared by a command).\n virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;\n};\n\n/// The BuildFile class supports the "llbuild"-native build description file\n/// format.\nclass BuildFile {\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate.\n ///\n /// \arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);\n ~BuildFile();\n\n /// Return the delegate the engine was configured with.\n BuildFileDelegate* getDelegate();\n\n /// Load the build file from the provided filename.\n ///\n /// \returns A non-null build description on success.\n std::unique_ptr<BuildDescription> load();\n};\n\n}\n}" (type_identifier) "namespace" (identifier) "llbuild" (compound_statement) "{\nnamespace basic {\n\nclass FileSystem;\n\n}\n\nnamespace buildsystem {\n\n/// The type used to pass parsed properties to the delegate.\ntypedef std::vector<std::pair<std::string, std::string>> property_list_type;\n\nclass BuildDescription;\nclass BuildFileDelegate;\nclass BuildKey;\nclass BuildSystem;\nclass BuildSystemCommandInterface;\nclass BuildValue;\nclass Command;\nclass Node;\nclass Target;\nclass Tool;\n\n/// Minimal token object representing the range where a diagnostic occurred.\nstruct BuildFileToken {\n const char* start;\n unsigned length;\n};\n\n/// Context for information that may be needed for a configuration action.\nstruct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }\n\n void error(const Twine& message) const;\n};\n\nclass BuildFileDelegate {\npublic:\n virtual ~BuildFileDelegate();\n\n /// Get an interned string.\n virtual StringRef getInternedString(StringRef value) = 0;\n \n /// Get the file system to use for access.\n virtual basic::FileSystem& getFileSystem() = 0;\n \n /// Called by the build file loader to register the current file contents.\n //\n // FIXME: This is a total hack, and should be cleaned up.\n virtual void setFileContentsBeingParsed(StringRef buffer) = 0;\n\n /// Called by the build file loader to report an error.\n ///\n /// \param filename The file the error occurred in.\n ///\n /// \param at The token at which the error occurred. The token will be null if\n /// no location is associated.\n ///\n /// \param message The diagnostic message.\n virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;\n \n /// Called by the build file loader after the 'client' file section has been\n /// loaded.\n ///\n /// \param name The expected client name.\n /// \param version The client version specified in the file.\n /// \param properties The list of additional properties passed to the client.\n ///\n /// \returns True on success.\n virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;\n\n /// Called by the build file loader to get a tool definition.\n ///\n /// \param name The name of the tool to lookup.\n /// \returns The tool to use on success, or otherwise nil.\n virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;\n\n /// Called by the build file loader to inform the client that a target\n /// definition has been loaded.\n virtual void loadedTarget(StringRef name, const Target& target) = 0;\n\n /// Called by the build file loader to inform the client that a default\n /// target has been loaded.\n virtual void loadedDefaultTarget(StringRef target) = 0;\n\n /// Called by the build file loader to inform the client that a command\n /// has been fully loaded.\n virtual void loadedCommand(StringRef name, const Command& command) = 0;\n\n /// Called by the build file loader to get a node.\n ///\n /// \param name The name of the node to lookup.\n ///\n /// \param isImplicit Whether the node is an implicit one (created as a side\n /// effect of being declared by a command).\n virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;\n};\n\n/// The BuildFile class supports the "llbuild"-native build description file\n/// format.\nclass BuildFile {\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate.\n ///\n /// \arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);\n ~BuildFile();\n\n /// Return the delegate the engine was configured with.\n BuildFileDelegate* getDelegate();\n\n /// Load the build file from the provided filename.\n ///\n /// \returns A non-null build description on success.\n std::unique_ptr<BuildDescription> load();\n};\n\n}\n}" ({) "{" (function_definition) "namespace basic {\n\nclass FileSystem;\n\n}" (type_identifier) "namespace" (identifier) "basic" (compound_statement) "{\n\nclass FileSystem;\n\n}" ({) "{" (declaration) "class FileSystem;" (type_identifier) "class" (identifier) "FileSystem" (;) ";" (}) "}" (function_definition) "namespace buildsystem {\n\n/// The type used to pass parsed properties to the delegate.\ntypedef std::vector<std::pair<std::string, std::string>> property_list_type;\n\nclass BuildDescription;\nclass BuildFileDelegate;\nclass BuildKey;\nclass BuildSystem;\nclass BuildSystemCommandInterface;\nclass BuildValue;\nclass Command;\nclass Node;\nclass Target;\nclass Tool;\n\n/// Minimal token object representing the range where a diagnostic occurred.\nstruct BuildFileToken {\n const char* start;\n unsigned length;\n};\n\n/// Context for information that may be needed for a configuration action.\nstruct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }\n\n void error(const Twine& message) const;\n};\n\nclass BuildFileDelegate {\npublic:\n virtual ~BuildFileDelegate();\n\n /// Get an interned string.\n virtual StringRef getInternedString(StringRef value) = 0;\n \n /// Get the file system to use for access.\n virtual basic::FileSystem& getFileSystem() = 0;\n \n /// Called by the build file loader to register the current file contents.\n //\n // FIXME: This is a total hack, and should be cleaned up.\n virtual void setFileContentsBeingParsed(StringRef buffer) = 0;\n\n /// Called by the build file loader to report an error.\n ///\n /// \param filename The file the error occurred in.\n ///\n /// \param at The token at which the error occurred. The token will be null if\n /// no location is associated.\n ///\n /// \param message The diagnostic message.\n virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;\n \n /// Called by the build file loader after the 'client' file section has been\n /// loaded.\n ///\n /// \param name The expected client name.\n /// \param version The client version specified in the file.\n /// \param properties The list of additional properties passed to the client.\n ///\n /// \returns True on success.\n virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;\n\n /// Called by the build file loader to get a tool definition.\n ///\n /// \param name The name of the tool to lookup.\n /// \returns The tool to use on success, or otherwise nil.\n virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;\n\n /// Called by the build file loader to inform the client that a target\n /// definition has been loaded.\n virtual void loadedTarget(StringRef name, const Target& target) = 0;\n\n /// Called by the build file loader to inform the client that a default\n /// target has been loaded.\n virtual void loadedDefaultTarget(StringRef target) = 0;\n\n /// Called by the build file loader to inform the client that a command\n /// has been fully loaded.\n virtual void loadedCommand(StringRef name, const Command& command) = 0;\n\n /// Called by the build file loader to get a node.\n ///\n /// \param name The name of the node to lookup.\n ///\n /// \param isImplicit Whether the node is an implicit one (created as a side\n /// effect of being declared by a command).\n virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;\n};\n\n/// The BuildFile class supports the "llbuild"-native build description file\n/// format.\nclass BuildFile {\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate.\n ///\n /// \arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);\n ~BuildFile();\n\n /// Return the delegate the engine was configured with.\n BuildFileDelegate* getDelegate();\n\n /// Load the build file from the provided filename.\n ///\n /// \returns A non-null build description on success.\n std::unique_ptr<BuildDescription> load();\n};\n\n}" (type_identifier) "namespace" (identifier) "buildsystem" (compound_statement) "{\n\n/// The type used to pass parsed properties to the delegate.\ntypedef std::vector<std::pair<std::string, std::string>> property_list_type;\n\nclass BuildDescription;\nclass BuildFileDelegate;\nclass BuildKey;\nclass BuildSystem;\nclass BuildSystemCommandInterface;\nclass BuildValue;\nclass Command;\nclass Node;\nclass Target;\nclass Tool;\n\n/// Minimal token object representing the range where a diagnostic occurred.\nstruct BuildFileToken {\n const char* start;\n unsigned length;\n};\n\n/// Context for information that may be needed for a configuration action.\nstruct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }\n\n void error(const Twine& message) const;\n};\n\nclass BuildFileDelegate {\npublic:\n virtual ~BuildFileDelegate();\n\n /// Get an interned string.\n virtual StringRef getInternedString(StringRef value) = 0;\n \n /// Get the file system to use for access.\n virtual basic::FileSystem& getFileSystem() = 0;\n \n /// Called by the build file loader to register the current file contents.\n //\n // FIXME: This is a total hack, and should be cleaned up.\n virtual void setFileContentsBeingParsed(StringRef buffer) = 0;\n\n /// Called by the build file loader to report an error.\n ///\n /// \param filename The file the error occurred in.\n ///\n /// \param at The token at which the error occurred. The token will be null if\n /// no location is associated.\n ///\n /// \param message The diagnostic message.\n virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;\n \n /// Called by the build file loader after the 'client' file section has been\n /// loaded.\n ///\n /// \param name The expected client name.\n /// \param version The client version specified in the file.\n /// \param properties The list of additional properties passed to the client.\n ///\n /// \returns True on success.\n virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;\n\n /// Called by the build file loader to get a tool definition.\n ///\n /// \param name The name of the tool to lookup.\n /// \returns The tool to use on success, or otherwise nil.\n virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;\n\n /// Called by the build file loader to inform the client that a target\n /// definition has been loaded.\n virtual void loadedTarget(StringRef name, const Target& target) = 0;\n\n /// Called by the build file loader to inform the client that a default\n /// target has been loaded.\n virtual void loadedDefaultTarget(StringRef target) = 0;\n\n /// Called by the build file loader to inform the client that a command\n /// has been fully loaded.\n virtual void loadedCommand(StringRef name, const Command& command) = 0;\n\n /// Called by the build file loader to get a node.\n ///\n /// \param name The name of the node to lookup.\n ///\n /// \param isImplicit Whether the node is an implicit one (created as a side\n /// effect of being declared by a command).\n virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;\n};\n\n/// The BuildFile class supports the "llbuild"-native build description file\n/// format.\nclass BuildFile {\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate.\n ///\n /// \arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);\n ~BuildFile();\n\n /// Return the delegate the engine was configured with.\n BuildFileDelegate* getDelegate();\n\n /// Load the build file from the provided filename.\n ///\n /// \returns A non-null build description on success.\n std::unique_ptr<BuildDescription> load();\n};\n\n}" ({) "{" (comment) "/// The type used to pass parsed properties to the delegate." (type_definition) "typedef std::vector<std::pair<std::string, std::string>> property_list_type;" (typedef) "typedef" (type_identifier) "std" (ERROR) "::vector<std::pair<std::" (:) ":" (:) ":" (type_identifier) "vector" (<) "<" (type_identifier) "std" (:) ":" (:) ":" (type_identifier) "pair" (<) "<" (type_identifier) "std" (:) ":" (:) ":" (type_identifier) "string" (,) "," (ERROR) "std::string>>" (type_identifier) "std" (:) ":" (:) ":" (type_identifier) "string" (>>) ">>" (type_identifier) "property_list_type" (;) ";" (declaration) "class BuildDescription;" (type_identifier) "class" (identifier) "BuildDescription" (;) ";" (declaration) "class BuildFileDelegate;" (type_identifier) "class" (identifier) "BuildFileDelegate" (;) ";" (declaration) "class BuildKey;" (type_identifier) "class" (identifier) "BuildKey" (;) ";" (declaration) "class BuildSystem;" (type_identifier) "class" (identifier) "BuildSystem" (;) ";" (declaration) "class BuildSystemCommandInterface;" (type_identifier) "class" (identifier) "BuildSystemCommandInterface" (;) ";" (declaration) "class BuildValue;" (type_identifier) "class" (identifier) "BuildValue" (;) ";" (declaration) "class Command;" (type_identifier) "class" (identifier) "Command" (;) ";" (declaration) "class Node;" (type_identifier) "class" (identifier) "Node" (;) ";" (declaration) "class Target;" (type_identifier) "class" (identifier) "Target" (;) ";" (declaration) "class Tool;" (type_identifier) "class" (identifier) "Tool" (;) ";" (comment) "/// Minimal token object representing the range where a diagnostic occurred." (struct_specifier) "struct BuildFileToken {\n const char* start;\n unsigned length;\n}" (struct) "struct" (type_identifier) "BuildFileToken" (field_declaration_list) "{\n const char* start;\n unsigned length;\n}" ({) "{" (field_declaration) "const char* start;" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "* start" (*) "*" (field_identifier) "start" (;) ";" (field_declaration) "unsigned length;" (sized_type_specifier) "unsigned" (unsigned) "unsigned" (field_identifier) "length" (;) ";" (}) "}" (;) ";" (comment) "/// Context for information that may be needed for a configuration action." (function_definition) "struct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }\n\n void error(const Twine& message) const;\n};\n\nclass BuildFileDelegate {\npublic:\n virtual ~BuildFileDelegate();\n\n /// Get an interned string.\n virtual StringRef getInternedString(StringRef value) = 0;\n \n /// Get the file system to use for access.\n virtual basic::FileSystem& getFileSystem() = 0;\n \n /// Called by the build file loader to register the current file contents.\n //\n // FIXME: This is a total hack, and should be cleaned up.\n virtual void setFileContentsBeingParsed(StringRef buffer) = 0;\n\n /// Called by the build file loader to report an error.\n ///\n /// \param filename The file the error occurred in.\n ///\n /// \param at The token at which the error occurred. The token will be null if\n /// no location is associated.\n ///\n /// \param message The diagnostic message.\n virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;\n \n /// Called by the build file loader after the 'client' file section has been\n /// loaded.\n ///\n /// \param name The expected client name.\n /// \param version The client version specified in the file.\n /// \param properties The list of additional properties passed to the client.\n ///\n /// \returns True on success.\n virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;\n\n /// Called by the build file loader to get a tool definition.\n ///\n /// \param name The name of the tool to lookup.\n /// \returns The tool to use on success, or otherwise nil.\n virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;\n\n /// Called by the build file loader to inform the client that a target\n /// definition has been loaded.\n virtual void loadedTarget(StringRef name, const Target& target) = 0;\n\n /// Called by the build file loader to inform the client that a default\n /// target has been loaded.\n virtual void loadedDefaultTarget(StringRef target) = 0;\n\n /// Called by the build file loader to inform the client that a command\n /// has been fully loaded.\n virtual void loadedCommand(StringRef name, const Command& command) = 0;\n\n /// Called by the build file loader to get a node.\n ///\n /// \param name The name of the node to lookup.\n ///\n /// \param isImplicit Whether the node is an implicit one (created as a side\n /// effect of being declared by a command).\n virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;\n}" (struct_specifier) "struct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }" (struct) "struct" (type_identifier) "ConfigureContext" (field_declaration_list) "{\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }" ({) "{" (comment) "/// The file delegate, to use for error reporting, etc." (field_declaration) "BuildFileDelegate& delegate;" (type_identifier) "BuildFileDelegate" (ERROR) "&" (&) "&" (field_identifier) "delegate" (;) ";" (comment) "/// The file the configuration request originated from." (field_declaration) "StringRef filename;" (type_identifier) "StringRef" (field_identifier) "filename" (;) ";" (comment) "/// The token to use in error reporting." (field_declaration) "BuildFileToken at;" (type_identifier) "BuildFileToken" (field_identifier) "at" (;) ";" (field_declaration) "public:\n BuildFileDelegate& getDelegate() const { return delegate;" (type_identifier) "public" (field_identifier) "" (bitfield_clause) ":\n BuildFileDelegate& getDelegate()" (:) ":" (binary_expression) "BuildFileDelegate& getDelegate()" (identifier) "BuildFileDelegate" (&) "&" (call_expression) "getDelegate()" (identifier) "getDelegate" (argument_list) "()" (() "(" ()) ")" (ERROR) "const { return delegate" (identifier) "const" ({) "{" (return) "return" (identifier) "delegate" (;) ";" (}) "}" (ERROR) "void error(const Twine& message) const;\n};\n\nclass" (identifier) "void" (function_declarator) "error(const Twine& message) const" (identifier) "error" (parameter_list) "(const Twine& message)" (() "(" (parameter_declaration) "const Twine& message" (type_qualifier) "const" (const) "const" (type_identifier) "Twine" (ERROR) "&" (&) "&" (identifier) "message" ()) ")" (identifier) "const" (;) ";" (}) "}" (;) ";" (identifier) "class" (identifier) "BuildFileDelegate" (compound_statement) "{\npublic:\n virtual ~BuildFileDelegate();\n\n /// Get an interned string.\n virtual StringRef getInternedString(StringRef value) = 0;\n \n /// Get the file system to use for access.\n virtual basic::FileSystem& getFileSystem() = 0;\n \n /// Called by the build file loader to register the current file contents.\n //\n // FIXME: This is a total hack, and should be cleaned up.\n virtual void setFileContentsBeingParsed(StringRef buffer) = 0;\n\n /// Called by the build file loader to report an error.\n ///\n /// \param filename The file the error occurred in.\n ///\n /// \param at The token at which the error occurred. The token will be null if\n /// no location is associated.\n ///\n /// \param message The diagnostic message.\n virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;\n \n /// Called by the build file loader after the 'client' file section has been\n /// loaded.\n ///\n /// \param name The expected client name.\n /// \param version The client version specified in the file.\n /// \param properties The list of additional properties passed to the client.\n ///\n /// \returns True on success.\n virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;\n\n /// Called by the build file loader to get a tool definition.\n ///\n /// \param name The name of the tool to lookup.\n /// \returns The tool to use on success, or otherwise nil.\n virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;\n\n /// Called by the build file loader to inform the client that a target\n /// definition has been loaded.\n virtual void loadedTarget(StringRef name, const Target& target) = 0;\n\n /// Called by the build file loader to inform the client that a default\n /// target has been loaded.\n virtual void loadedDefaultTarget(StringRef target) = 0;\n\n /// Called by the build file loader to inform the client that a command\n /// has been fully loaded.\n virtual void loadedCommand(StringRef name, const Command& command) = 0;\n\n /// Called by the build file loader to get a node.\n ///\n /// \param name The name of the node to lookup.\n ///\n /// \param isImplicit Whether the node is an implicit one (created as a side\n /// effect of being declared by a command).\n virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;\n}" ({) "{" (labeled_statement) "public:\n virtual ~BuildFileDelegate();" (statement_identifier) "public" (:) ":" (declaration) "virtual ~BuildFileDelegate();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "BuildFileDelegate()" (identifier) "BuildFileDelegate" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/// Get an interned string." (declaration) "virtual StringRef getInternedString(StringRef value) = 0;" (type_identifier) "virtual" (ERROR) "StringRef" (identifier) "StringRef" (init_declarator) "getInternedString(StringRef value) = 0" (function_declarator) "getInternedString(StringRef value)" (identifier) "getInternedString" (parameter_list) "(StringRef value)" (() "(" (parameter_declaration) "StringRef value" (type_identifier) "StringRef" (identifier) "value" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/// Get the file system to use for access." (declaration) "virtual basic::FileSystem& getFileSystem() = 0;" (type_identifier) "virtual" (ERROR) "basic::FileSystem&" (identifier) "basic" (:) ":" (:) ":" (identifier) "FileSystem" (&) "&" (init_declarator) "getFileSystem() = 0" (function_declarator) "getFileSystem()" (identifier) "getFileSystem" (parameter_list) "()" (() "(" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/// Called by the build file loader to register the current file contents." (comment) "//" (comment) "// FIXME: This is a total hack, and should be cleaned up." (declaration) "virtual void setFileContentsBeingParsed(StringRef buffer) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "setFileContentsBeingParsed(StringRef buffer) = 0" (function_declarator) "setFileContentsBeingParsed(StringRef buffer)" (identifier) "setFileContentsBeingParsed" (parameter_list) "(StringRef buffer)" (() "(" (parameter_declaration) "StringRef buffer" (type_identifier) "StringRef" (identifier) "buffer" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/// Called by the build file loader to report an error." (comment) "///" (comment) "/// \param filename The file the error occurred in." (comment) "///" (comment) "/// \param at The token at which the error occurred. The token will be null if" (comment) "/// no location is associated." (comment) "///" (comment) "/// \param message The diagnostic message." (declaration) "virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0" (function_declarator) "error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message)" (identifier) "error" (parameter_list) "(StringRef filename,\n const BuildFileToken& at,\n const Twine& message)" (() "(" (parameter_declaration) "StringRef filename" (type_identifier) "StringRef" (identifier) "filename" (,) "," (parameter_declaration) "const BuildFileToken& at" (type_qualifier) "const" (const) "const" (type_identifier) "BuildFileToken" (ERROR) "&" (&) "&" (identifier) "at" (,) "," (parameter_declaration) "const Twine& message" (type_qualifier) "const" (const) "const" (type_identifier) "Twine" (ERROR) "&" (&) "&" (identifier) "message" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/// Called by the build file loader after the 'client' file section has been" (comment) "/// loaded." (comment) "///" (comment) "/// \param name The expected client name." (comment) "/// \param version The client version specified in the file." (comment) "/// \param properties The list of additional properties passed to the client." (comment) "///" (comment) "/// \returns True on success." (declaration) "virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;" (type_identifier) "virtual" (ERROR) "bool" (identifier) "bool" (init_declarator) "configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0" (function_declarator) "configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties)" (identifier) "configureClient" (parameter_list) "(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties)" (() "(" (parameter_declaration) "const ConfigureContext" (type_qualifier) "const" (const) "const" (type_identifier) "ConfigureContext" (ERROR) "&" (&) "&" (,) "," (parameter_declaration) "StringRef name" (type_identifier) "StringRef" (identifier) "name" (,) "," (parameter_declaration) "uint32_t version" (primitive_type) "uint32_t" (identifier) "version" (,) "," (parameter_declaration) "const property_list_type& properties" (type_qualifier) "const" (const) "const" (type_identifier) "property_list_type" (ERROR) "&" (&) "&" (identifier) "properties" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/// Called by the build file loader to get a tool definition." (comment) "///" (comment) "/// \param name The name of the tool to lookup." (comment) "/// \returns The tool to use on success, or otherwise nil." (declaration) "virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;" (type_identifier) "virtual" (ERROR) "std::unique_ptr<Tool>" (identifier) "std" (:) ":" (:) ":" (identifier) "unique_ptr" (<) "<" (identifier) "Tool" (>) ">" (init_declarator) "lookupTool(StringRef name) = 0" (function_declarator) "lookupTool(StringRef name)" (identifier) "lookupTool" (parameter_list) "(StringRef name)" (() "(" (parameter_declaration) "StringRef name" (type_identifier) "StringRef" (identifier) "name" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/// Called by the build file loader to inform the client that a target" (comment) "/// definition has been loaded." (declaration) "virtual void loadedTarget(StringRef name, const Target& target) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "loadedTarget(StringRef name, const Target& target) = 0" (function_declarator) "loadedTarget(StringRef name, const Target& target)" (identifier) "loadedTarget" (parameter_list) "(StringRef name, const Target& target)" (() "(" (parameter_declaration) "StringRef name" (type_identifier) "StringRef" (identifier) "name" (,) "," (parameter_declaration) "const Target& target" (type_qualifier) "const" (const) "const" (type_identifier) "Target" (ERROR) "&" (&) "&" (identifier) "target" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/// Called by the build file loader to inform the client that a default" (comment) "/// target has been loaded." (declaration) "virtual void loadedDefaultTarget(StringRef target) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "loadedDefaultTarget(StringRef target) = 0" (function_declarator) "loadedDefaultTarget(StringRef target)" (identifier) "loadedDefaultTarget" (parameter_list) "(StringRef target)" (() "(" (parameter_declaration) "StringRef target" (type_identifier) "StringRef" (identifier) "target" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/// Called by the build file loader to inform the client that a command" (comment) "/// has been fully loaded." (declaration) "virtual void loadedCommand(StringRef name, const Command& command) = 0;" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (init_declarator) "loadedCommand(StringRef name, const Command& command) = 0" (function_declarator) "loadedCommand(StringRef name, const Command& command)" (identifier) "loadedCommand" (parameter_list) "(StringRef name, const Command& command)" (() "(" (parameter_declaration) "StringRef name" (type_identifier) "StringRef" (identifier) "name" (,) "," (parameter_declaration) "const Command& command" (type_qualifier) "const" (const) "const" (type_identifier) "Command" (ERROR) "&" (&) "&" (identifier) "command" ()) ")" (=) "=" (number_literal) "0" (;) ";" (comment) "/// Called by the build file loader to get a node." (comment) "///" (comment) "/// \param name The name of the node to lookup." (comment) "///" (comment) "/// \param isImplicit Whether the node is an implicit one (created as a side" (comment) "/// effect of being declared by a command)." (declaration) "virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;" (type_identifier) "virtual" (ERROR) "std::unique_ptr<Node>" (identifier) "std" (:) ":" (:) ":" (identifier) "unique_ptr" (<) "<" (identifier) "Node" (>) ">" (init_declarator) "lookupNode(StringRef name,\n bool isImplicit=false" (function_declarator) "lookupNode(StringRef name,\n bool isImplicit" (identifier) "lookupNode" (parameter_list) "(StringRef name,\n bool isImplicit" (() "(" (parameter_declaration) "StringRef name" (type_identifier) "StringRef" (identifier) "name" (,) "," (parameter_declaration) "bool isImplicit" (primitive_type) "bool" (identifier) "isImplicit" ()) "" (=) "=" (false) "false" (ERROR) ") = 0" ()) ")" (=) "=" (number_literal) "0" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "/// The BuildFile class supports the "llbuild"-native build description file" (comment) "/// format." (function_definition) "class BuildFile {\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate.\n ///\n /// \arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);\n ~BuildFile();\n\n /// Return the delegate the engine was configured with.\n BuildFileDelegate* getDelegate();\n\n /// Load the build file from the provided filename.\n ///\n /// \returns A non-null build description on success.\n std::unique_ptr<BuildDescription> load();\n}" (type_identifier) "class" (identifier) "BuildFile" (compound_statement) "{\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate.\n ///\n /// \arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);\n ~BuildFile();\n\n /// Return the delegate the engine was configured with.\n BuildFileDelegate* getDelegate();\n\n /// Load the build file from the provided filename.\n ///\n /// \returns A non-null build description on success.\n std::unique_ptr<BuildDescription> load();\n}" ({) "{" (labeled_statement) "private:\n void *impl;" (statement_identifier) "private" (:) ":" (declaration) "void *impl;" (primitive_type) "void" (pointer_declarator) "*impl" (*) "*" (identifier) "impl" (;) ";" (labeled_statement) "public:\n /// Create a build file with the given delegate.\n ///\n /// \arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);" (statement_identifier) "public" (:) ":" (comment) "/// Create a build file with the given delegate." (comment) "///" (comment) "/// \arg mainFilename The path of the main build file." (declaration) "explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);" (type_identifier) "explicit" (function_declarator) "BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate)" (identifier) "BuildFile" (parameter_list) "(StringRef mainFilename,\n BuildFileDelegate& delegate)" (() "(" (parameter_declaration) "StringRef mainFilename" (type_identifier) "StringRef" (identifier) "mainFilename" (,) "," (parameter_declaration) "BuildFileDelegate& delegate" (type_identifier) "BuildFileDelegate" (ERROR) "&" (&) "&" (identifier) "delegate" ()) ")" (;) ";" (expression_statement) "~BuildFile();" (unary_expression) "~BuildFile()" (~) "~" (call_expression) "BuildFile()" (identifier) "BuildFile" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "/// Return the delegate the engine was configured with." (declaration) "BuildFileDelegate* getDelegate();" (type_identifier) "BuildFileDelegate" (pointer_declarator) "* getDelegate()" (*) "*" (function_declarator) "getDelegate()" (identifier) "getDelegate" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/// Load the build file from the provided filename." (comment) "///" (comment) "/// \returns A non-null build description on success." (labeled_statement) "std::unique_ptr<BuildDescription> load();" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "unique_ptr<BuildDescription> load();" (binary_expression) "unique_ptr<BuildDescription> load()" (binary_expression) "unique_ptr<BuildDescription" (identifier) "unique_ptr" (<) "<" (identifier) "BuildDescription" (>) ">" (call_expression) "load()" (identifier) "load" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (}) "}" (#endif) "#endif"
596
26
{"language": "c", "success": true, "metadata": {"lines": 136, "avg_line_length": 35.59, "nodes": 335, "errors": 0, "source_hash": "8f099f6c7ab4a1ef3526f5fb426316e4221b25e3e1630e194b36470c7256ec72", "categorized_nodes": 251}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef LLBUILD_BUILDSYSTEM_BUILDFILE_H\n#define LLBUILD_BUILDSYSTEM_BUILDFILE_H\n\n#include \"llbuild/Basic/Compiler.h\"\n#include \"llbuild/Basic/LLVM.h\"\n\n#include \"llvm/ADT/StringRef.h\"\n\n#include <memory>\n#include <string>\n#include <unordered_map>\n#include <utility>\n#include <vector>\n\nnamespace llbuild {\nnamespace basic {\n\nclass FileSystem;\n\n}\n\nnamespace buildsystem {\n\n/// The type used to pass parsed properties to the delegate.\ntypedef std::vector<std::pair<std::string, std::string>> property_list_type;\n\nclass BuildDescription;\nclass BuildFileDelegate;\nclass BuildKey;\nclass BuildSystem;\nclass BuildSystemCommandInterface;\nclass BuildValue;\nclass Command;\nclass Node;\nclass Target;\nclass Tool;\n\n/// Minimal token object representing the range where a diagnostic occurred.\nstruct BuildFileToken {\n const char* start;\n unsigned length;\n};\n\n/// Context for information that may be needed for a configuration action.\nstruct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }\n\n void error(const Twine& message) const;\n};\n\nclass BuildFileDelegate {\npublic:\n virtual ~BuildFileDelegate();\n\n /// Get an interned string.\n virtual StringRef getInternedString(StringRef value) = 0;\n \n /// Get the file system to use for access.\n virtual basic::FileSystem& getFileSystem() = 0;\n \n /// Called by the build file loader to register the current file contents.\n //\n // FIXME: This is a total hack, and should be cleaned up.\n virtual void setFileContentsBeingParsed(StringRef buffer) = 0;\n\n /// Called by the build file loader to report an error.\n ///\n /// \\param filename The file the error occurred in.\n ///\n /// \\param at The token at which the error occurred. The token will be null if\n /// no location is associated.\n ///\n /// \\param message The diagnostic message.\n virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;\n \n /// Called by the build file loader after the 'client' file section has been\n /// loaded.\n ///\n /// \\param name The expected client name.\n /// \\param version The client version specified in the file.\n /// \\param properties The list of additional properties passed to the client.\n ///\n /// \\returns True on success.\n virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;\n\n /// Called by the build file loader to get a tool definition.\n ///\n /// \\param name The name of the tool to lookup.\n /// \\returns The tool to use on success, or otherwise nil.\n virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;\n\n /// Called by the build file loader to inform the client that a target\n /// definition has been loaded.\n virtual void loadedTarget(StringRef name, const Target& target) = 0;\n\n /// Called by the build file loader to inform the client that a default\n /// target has been loaded.\n virtual void loadedDefaultTarget(StringRef target) = 0;\n\n /// Called by the build file loader to inform the client that a command\n /// has been fully loaded.\n virtual void loadedCommand(StringRef name, const Command& command) = 0;\n\n /// Called by the build file loader to get a node.\n ///\n /// \\param name The name of the node to lookup.\n ///\n /// \\param isImplicit Whether the node is an implicit one (created as a side\n /// effect of being declared by a command).\n virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;\n};\n\n/// The BuildFile class supports the \"llbuild\"-native build description file\n/// format.\nclass BuildFile {\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate.\n ///\n /// \\arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);\n ~BuildFile();\n\n /// Return the delegate the engine was configured with.\n BuildFileDelegate* getDelegate();\n\n /// Load the build file from the provided filename.\n ///\n /// \\returns A non-null build description on success.\n std::unique_ptr<BuildDescription> load();\n};\n\n}\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 334], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 165, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 2, "type": "identifier", "text": "LLBUILD_BUILDSYSTEM_BUILDFILE_H", "parent": 0, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 39}}, {"id": 3, "type": "preproc_def", "text": "#define LLBUILD_BUILDSYSTEM_BUILDFILE_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 5, "type": "identifier", "text": "LLBUILD_BUILDSYSTEM_BUILDFILE_H", "parent": 3, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 39}}, {"id": 6, "type": "preproc_include", "text": "#include \"llbuild/Basic/Compiler.h\"\n", "parent": 0, "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": "string_literal", "text": "\"llbuild/Basic/Compiler.h\"", "parent": 6, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 35}}, {"id": 9, "type": "preproc_include", "text": "#include \"llbuild/Basic/LLVM.h\"\n", "parent": 0, "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": "string_literal", "text": "\"llbuild/Basic/LLVM.h\"", "parent": 9, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 31}}, {"id": 12, "type": "preproc_include", "text": "#include \"llvm/ADT/StringRef.h\"\n", "parent": 0, "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": "\"llvm/ADT/StringRef.h\"", "parent": 12, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 31}}, {"id": 15, "type": "preproc_include", "text": "#include <memory>\n", "parent": 0, "children": [16, 17], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<memory>", "parent": 15, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 17}}, {"id": 18, "type": "preproc_include", "text": "#include <string>\n", "parent": 0, "children": [19, 20], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<string>", "parent": 18, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 17}}, {"id": 21, "type": "preproc_include", "text": "#include <unordered_map>\n", "parent": 0, "children": [22, 23], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<unordered_map>", "parent": 21, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 24}}, {"id": 24, "type": "preproc_include", "text": "#include <utility>\n", "parent": 0, "children": [25, 26], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<utility>", "parent": 24, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 18}}, {"id": 27, "type": "preproc_include", "text": "#include <vector>\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": "system_lib_string", "text": "<vector>", "parent": 27, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 17}}, {"id": 30, "type": "function_definition", "text": "namespace llbuild {\nnamespace basic {\n\nclass FileSystem;\n\n}\n\nnamespace buildsystem {\n\n/// The type used to pass parsed properties to the delegate.\ntypedef std::vector<std::pair<std::string, std::string>> property_list_type;\n\nclass BuildDescription;\nclass BuildFileDelegate;\nclass BuildKey;\nclass BuildSystem;\nclass BuildSystemCommandInterface;\nclass BuildValue;\nclass Command;\nclass Node;\nclass Target;\nclass Tool;\n\n/// Minimal token object representing the range where a diagnostic occurred.\nstruct BuildFileToken {\n const char* start;\n unsigned length;\n};\n\n/// Context for information that may be needed for a configuration action.\nstruct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }\n\n void error(const Twine& message) const;\n};\n\nclass BuildFileDelegate {\npublic:\n virtual ~BuildFileDelegate();\n\n /// Get an interned string.\n virtual StringRef getInternedString(StringRef value) = 0;\n \n /// Get the file system to use for access.\n virtual basic::FileSystem& getFileSystem() = 0;\n \n /// Called by the build file loader to register the current file contents.\n //\n // FIXME: This is a total hack, and should be cleaned up.\n virtual void setFileContentsBeingParsed(StringRef buffer) = 0;\n\n /// Called by the build file loader to report an error.\n ///\n /// \\param filename The file the error occurred in.\n ///\n /// \\param at The token at which the error occurred. The token will be null if\n /// no location is associated.\n ///\n /// \\param message The diagnostic message.\n virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;\n \n /// Called by the build file loader after the 'client' file section has been\n /// loaded.\n ///\n /// \\param name The expected client name.\n /// \\param version The client version specified in the file.\n /// \\param properties The list of additional properties passed to the client.\n ///\n /// \\returns True on success.\n virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;\n\n /// Called by the build file loader to get a tool definition.\n ///\n /// \\param name The name of the tool to lookup.\n /// \\returns The tool to use on success, or otherwise nil.\n virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;\n\n /// Called by the build file loader to inform the client that a target\n /// definition has been loaded.\n virtual void loadedTarget(StringRef name, const Target& target) = 0;\n\n /// Called by the build file loader to inform the client that a default\n /// target has been loaded.\n virtual void loadedDefaultTarget(StringRef target) = 0;\n\n /// Called by the build file loader to inform the client that a command\n /// has been fully loaded.\n virtual void loadedCommand(StringRef name, const Command& command) = 0;\n\n /// Called by the build file loader to get a node.\n ///\n /// \\param name The name of the node to lookup.\n ///\n /// \\param isImplicit Whether the node is an implicit one (created as a side\n /// effect of being declared by a command).\n virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;\n};\n\n/// The BuildFile class supports the \"llbuild\"-native build description file\n/// format.\nclass BuildFile {\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate.\n ///\n /// \\arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);\n ~BuildFile();\n\n /// Return the delegate the engine was configured with.\n BuildFileDelegate* getDelegate();\n\n /// Load the build file from the provided filename.\n ///\n /// \\returns A non-null build description on success.\n std::unique_ptr<BuildDescription> load();\n};\n\n}\n}", "parent": 0, "children": [31, 32], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 163, "column": 1}}, {"id": 31, "type": "type_identifier", "text": "namespace", "parent": 30, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 9}}, {"id": 32, "type": "identifier", "text": "llbuild", "parent": 30, "children": [], "start_point": {"row": 26, "column": 10}, "end_point": {"row": 26, "column": 17}}, {"id": 33, "type": "function_definition", "text": "namespace basic {\n\nclass FileSystem;\n\n}", "parent": 30, "children": [34, 35], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 34, "type": "type_identifier", "text": "namespace", "parent": 33, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 9}}, {"id": 35, "type": "identifier", "text": "basic", "parent": 33, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 15}}, {"id": 36, "type": "declaration", "text": "class FileSystem;", "parent": 33, "children": [37], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 17}}, {"id": 37, "type": "identifier", "text": "FileSystem", "parent": 36, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 16}}, {"id": 38, "type": "function_definition", "text": "namespace buildsystem {\n\n/// The type used to pass parsed properties to the delegate.\ntypedef std::vector<std::pair<std::string, std::string>> property_list_type;\n\nclass BuildDescription;\nclass BuildFileDelegate;\nclass BuildKey;\nclass BuildSystem;\nclass BuildSystemCommandInterface;\nclass BuildValue;\nclass Command;\nclass Node;\nclass Target;\nclass Tool;\n\n/// Minimal token object representing the range where a diagnostic occurred.\nstruct BuildFileToken {\n const char* start;\n unsigned length;\n};\n\n/// Context for information that may be needed for a configuration action.\nstruct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }\n\n void error(const Twine& message) const;\n};\n\nclass BuildFileDelegate {\npublic:\n virtual ~BuildFileDelegate();\n\n /// Get an interned string.\n virtual StringRef getInternedString(StringRef value) = 0;\n \n /// Get the file system to use for access.\n virtual basic::FileSystem& getFileSystem() = 0;\n \n /// Called by the build file loader to register the current file contents.\n //\n // FIXME: This is a total hack, and should be cleaned up.\n virtual void setFileContentsBeingParsed(StringRef buffer) = 0;\n\n /// Called by the build file loader to report an error.\n ///\n /// \\param filename The file the error occurred in.\n ///\n /// \\param at The token at which the error occurred. The token will be null if\n /// no location is associated.\n ///\n /// \\param message The diagnostic message.\n virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;\n \n /// Called by the build file loader after the 'client' file section has been\n /// loaded.\n ///\n /// \\param name The expected client name.\n /// \\param version The client version specified in the file.\n /// \\param properties The list of additional properties passed to the client.\n ///\n /// \\returns True on success.\n virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;\n\n /// Called by the build file loader to get a tool definition.\n ///\n /// \\param name The name of the tool to lookup.\n /// \\returns The tool to use on success, or otherwise nil.\n virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;\n\n /// Called by the build file loader to inform the client that a target\n /// definition has been loaded.\n virtual void loadedTarget(StringRef name, const Target& target) = 0;\n\n /// Called by the build file loader to inform the client that a default\n /// target has been loaded.\n virtual void loadedDefaultTarget(StringRef target) = 0;\n\n /// Called by the build file loader to inform the client that a command\n /// has been fully loaded.\n virtual void loadedCommand(StringRef name, const Command& command) = 0;\n\n /// Called by the build file loader to get a node.\n ///\n /// \\param name The name of the node to lookup.\n ///\n /// \\param isImplicit Whether the node is an implicit one (created as a side\n /// effect of being declared by a command).\n virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;\n};\n\n/// The BuildFile class supports the \"llbuild\"-native build description file\n/// format.\nclass BuildFile {\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate.\n ///\n /// \\arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);\n ~BuildFile();\n\n /// Return the delegate the engine was configured with.\n BuildFileDelegate* getDelegate();\n\n /// Load the build file from the provided filename.\n ///\n /// \\returns A non-null build description on success.\n std::unique_ptr<BuildDescription> load();\n};\n\n}", "parent": 30, "children": [39, 40], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 162, "column": 1}}, {"id": 39, "type": "type_identifier", "text": "namespace", "parent": 38, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 9}}, {"id": 40, "type": "identifier", "text": "buildsystem", "parent": 38, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 21}}, {"id": 41, "type": "type_definition", "text": "typedef std::vector<std::pair<std::string, std::string>> property_list_type;", "parent": 38, "children": [42, 43, 44, 51, 52, 56], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 76}}, {"id": 42, "type": "typedef", "text": "typedef", "parent": 41, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 43, "type": "type_identifier", "text": "std", "parent": 41, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 11}}, {"id": 44, "type": "ERROR", "text": "::vector<std::pair<std::", "parent": 41, "children": [45, 46, 47, 48, 49, 50], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 35}}, {"id": 45, "type": "type_identifier", "text": "vector", "parent": 44, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 19}}, {"id": 46, "type": "<", "text": "<", "parent": 44, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 20}}, {"id": 47, "type": "type_identifier", "text": "std", "parent": 44, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 23}}, {"id": 48, "type": "type_identifier", "text": "pair", "parent": 44, "children": [], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 29}}, {"id": 49, "type": "<", "text": "<", "parent": 44, "children": [], "start_point": {"row": 36, "column": 29}, "end_point": {"row": 36, "column": 30}}, {"id": 50, "type": "type_identifier", "text": "std", "parent": 44, "children": [], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 33}}, {"id": 51, "type": "type_identifier", "text": "string", "parent": 41, "children": [], "start_point": {"row": 36, "column": 35}, "end_point": {"row": 36, "column": 41}}, {"id": 52, "type": "ERROR", "text": "std::string>>", "parent": 41, "children": [53, 54, 55], "start_point": {"row": 36, "column": 43}, "end_point": {"row": 36, "column": 56}}, {"id": 53, "type": "type_identifier", "text": "std", "parent": 52, "children": [], "start_point": {"row": 36, "column": 43}, "end_point": {"row": 36, "column": 46}}, {"id": 54, "type": "type_identifier", "text": "string", "parent": 52, "children": [], "start_point": {"row": 36, "column": 48}, "end_point": {"row": 36, "column": 54}}, {"id": 55, "type": ">>", "text": ">>", "parent": 52, "children": [], "start_point": {"row": 36, "column": 54}, "end_point": {"row": 36, "column": 56}}, {"id": 56, "type": "type_identifier", "text": "property_list_type", "parent": 41, "children": [], "start_point": {"row": 36, "column": 57}, "end_point": {"row": 36, "column": 75}}, {"id": 57, "type": "declaration", "text": "class BuildDescription;", "parent": 38, "children": [58], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 23}}, {"id": 58, "type": "identifier", "text": "BuildDescription", "parent": 57, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 22}}, {"id": 59, "type": "declaration", "text": "class BuildFileDelegate;", "parent": 38, "children": [60], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 24}}, {"id": 60, "type": "identifier", "text": "BuildFileDelegate", "parent": 59, "children": [], "start_point": {"row": 39, "column": 6}, "end_point": {"row": 39, "column": 23}}, {"id": 61, "type": "declaration", "text": "class BuildKey;", "parent": 38, "children": [62], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 15}}, {"id": 62, "type": "identifier", "text": "BuildKey", "parent": 61, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 14}}, {"id": 63, "type": "declaration", "text": "class BuildSystem;", "parent": 38, "children": [64], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 18}}, {"id": 64, "type": "identifier", "text": "BuildSystem", "parent": 63, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 17}}, {"id": 65, "type": "declaration", "text": "class BuildSystemCommandInterface;", "parent": 38, "children": [66], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 34}}, {"id": 66, "type": "identifier", "text": "BuildSystemCommandInterface", "parent": 65, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 33}}, {"id": 67, "type": "declaration", "text": "class BuildValue;", "parent": 38, "children": [68], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 17}}, {"id": 68, "type": "identifier", "text": "BuildValue", "parent": 67, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 16}}, {"id": 69, "type": "declaration", "text": "class Command;", "parent": 38, "children": [70], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 14}}, {"id": 70, "type": "identifier", "text": "Command", "parent": 69, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 13}}, {"id": 71, "type": "declaration", "text": "class Node;", "parent": 38, "children": [72], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 11}}, {"id": 72, "type": "identifier", "text": "Node", "parent": 71, "children": [], "start_point": {"row": 45, "column": 6}, "end_point": {"row": 45, "column": 10}}, {"id": 73, "type": "declaration", "text": "class Target;", "parent": 38, "children": [74], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 13}}, {"id": 74, "type": "identifier", "text": "Target", "parent": 73, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 12}}, {"id": 75, "type": "declaration", "text": "class Tool;", "parent": 38, "children": [76], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 11}}, {"id": 76, "type": "identifier", "text": "Tool", "parent": 75, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 10}}, {"id": 77, "type": "struct_specifier", "text": "struct BuildFileToken {\n const char* start;\n unsigned length;\n}", "parent": 38, "children": [78, 79], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 53, "column": 1}}, {"id": 78, "type": "struct", "text": "struct", "parent": 77, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 6}}, {"id": 79, "type": "type_identifier", "text": "BuildFileToken", "parent": 77, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 21}}, {"id": 80, "type": "field_declaration", "text": "const char* start;", "parent": 77, "children": [81, 82], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 20}}, {"id": 81, "type": "primitive_type", "text": "char", "parent": 80, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 12}}, {"id": 82, "type": "pointer_declarator", "text": "* start", "parent": 80, "children": [83, 84], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 19}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 13}}, {"id": 84, "type": "field_identifier", "text": "start", "parent": 82, "children": [], "start_point": {"row": 51, "column": 14}, "end_point": {"row": 51, "column": 19}}, {"id": 85, "type": "field_declaration", "text": "unsigned length;", "parent": 77, "children": [86, 88], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 18}}, {"id": 86, "type": "sized_type_specifier", "text": "unsigned", "parent": 85, "children": [87], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 10}}, {"id": 87, "type": "unsigned", "text": "unsigned", "parent": 86, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 10}}, {"id": 88, "type": "field_identifier", "text": "length", "parent": 85, "children": [], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 17}}, {"id": 89, "type": "function_definition", "text": "struct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }\n\n void error(const Twine& message) const;\n};\n\nclass BuildFileDelegate {\npublic:\n virtual ~BuildFileDelegate();\n\n /// Get an interned string.\n virtual StringRef getInternedString(StringRef value) = 0;\n \n /// Get the file system to use for access.\n virtual basic::FileSystem& getFileSystem() = 0;\n \n /// Called by the build file loader to register the current file contents.\n //\n // FIXME: This is a total hack, and should be cleaned up.\n virtual void setFileContentsBeingParsed(StringRef buffer) = 0;\n\n /// Called by the build file loader to report an error.\n ///\n /// \\param filename The file the error occurred in.\n ///\n /// \\param at The token at which the error occurred. The token will be null if\n /// no location is associated.\n ///\n /// \\param message The diagnostic message.\n virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;\n \n /// Called by the build file loader after the 'client' file section has been\n /// loaded.\n ///\n /// \\param name The expected client name.\n /// \\param version The client version specified in the file.\n /// \\param properties The list of additional properties passed to the client.\n ///\n /// \\returns True on success.\n virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;\n\n /// Called by the build file loader to get a tool definition.\n ///\n /// \\param name The name of the tool to lookup.\n /// \\returns The tool to use on success, or otherwise nil.\n virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;\n\n /// Called by the build file loader to inform the client that a target\n /// definition has been loaded.\n virtual void loadedTarget(StringRef name, const Target& target) = 0;\n\n /// Called by the build file loader to inform the client that a default\n /// target has been loaded.\n virtual void loadedDefaultTarget(StringRef target) = 0;\n\n /// Called by the build file loader to inform the client that a command\n /// has been fully loaded.\n virtual void loadedCommand(StringRef name, const Command& command) = 0;\n\n /// Called by the build file loader to get a node.\n ///\n /// \\param name The name of the node to lookup.\n ///\n /// \\param isImplicit Whether the node is an implicit one (created as a side\n /// effect of being declared by a command).\n virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;\n}", "parent": 38, "children": [90, 112, 120], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 137, "column": 1}}, {"id": 90, "type": "struct_specifier", "text": "struct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }", "parent": 89, "children": [91, 92], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 67, "column": 61}}, {"id": 91, "type": "struct", "text": "struct", "parent": 90, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 6}}, {"id": 92, "type": "type_identifier", "text": "ConfigureContext", "parent": 90, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 23}}, {"id": 93, "type": "field_declaration", "text": "BuildFileDelegate& delegate;", "parent": 90, "children": [94, 95], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 30}}, {"id": 94, "type": "type_identifier", "text": "BuildFileDelegate", "parent": 93, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 19}}, {"id": 95, "type": "field_identifier", "text": "delegate", "parent": 93, "children": [], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 29}}, {"id": 96, "type": "field_declaration", "text": "StringRef filename;", "parent": 90, "children": [97, 98], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 21}}, {"id": 97, "type": "type_identifier", "text": "StringRef", "parent": 96, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 11}}, {"id": 98, "type": "field_identifier", "text": "filename", "parent": 96, "children": [], "start_point": {"row": 61, "column": 12}, "end_point": {"row": 61, "column": 20}}, {"id": 99, "type": "field_declaration", "text": "BuildFileToken at;", "parent": 90, "children": [100, 101], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 20}}, {"id": 100, "type": "type_identifier", "text": "BuildFileToken", "parent": 99, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 16}}, {"id": 101, "type": "field_identifier", "text": "at", "parent": 99, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 19}}, {"id": 102, "type": "field_declaration", "text": "public:\n BuildFileDelegate& getDelegate() const { return delegate;", "parent": 90, "children": [103, 104, 110], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 67, "column": 59}}, {"id": 103, "type": "field_identifier", "text": "", "parent": 102, "children": [], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 66, "column": 6}}, {"id": 104, "type": "bitfield_clause", "text": ":\n BuildFileDelegate& getDelegate()", "parent": 102, "children": [105], "start_point": {"row": 66, "column": 6}, "end_point": {"row": 67, "column": 34}}, {"id": 105, "type": "binary_expression", "text": "BuildFileDelegate& getDelegate()", "parent": 104, "children": [106, 107], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 34}}, {"id": 106, "type": "identifier", "text": "BuildFileDelegate", "parent": 105, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 19}}, {"id": 107, "type": "call_expression", "text": "getDelegate()", "parent": 105, "children": [108, 109], "start_point": {"row": 67, "column": 21}, "end_point": {"row": 67, "column": 34}}, {"id": 108, "type": "identifier", "text": "getDelegate", "parent": 107, "children": [], "start_point": {"row": 67, "column": 21}, "end_point": {"row": 67, "column": 32}}, {"id": 109, "type": "argument_list", "text": "()", "parent": 107, "children": [], "start_point": {"row": 67, "column": 32}, "end_point": {"row": 67, "column": 34}}, {"id": 110, "type": "ERROR", "text": "const { return delegate", "parent": 102, "children": [111], "start_point": {"row": 67, "column": 35}, "end_point": {"row": 67, "column": 58}}, {"id": 111, "type": "identifier", "text": "delegate", "parent": 110, "children": [], "start_point": {"row": 67, "column": 50}, "end_point": {"row": 67, "column": 58}}, {"id": 112, "type": "ERROR", "text": "void error(const Twine& message) const;\n};\n\nclass", "parent": 89, "children": [113, 114], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 72, "column": 5}}, {"id": 113, "type": "identifier", "text": "void", "parent": 112, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 6}}, {"id": 114, "type": "function_declarator", "text": "error(const Twine& message) const", "parent": 112, "children": [115, 116], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 40}}, {"id": 115, "type": "identifier", "text": "error", "parent": 114, "children": [], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 12}}, {"id": 116, "type": "parameter_list", "text": "(const Twine& message)", "parent": 114, "children": [117], "start_point": {"row": 69, "column": 12}, "end_point": {"row": 69, "column": 34}}, {"id": 117, "type": "parameter_declaration", "text": "const Twine& message", "parent": 116, "children": [118, 119], "start_point": {"row": 69, "column": 13}, "end_point": {"row": 69, "column": 33}}, {"id": 118, "type": "type_identifier", "text": "Twine", "parent": 117, "children": [], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 24}}, {"id": 119, "type": "identifier", "text": "message", "parent": 117, "children": [], "start_point": {"row": 69, "column": 26}, "end_point": {"row": 69, "column": 33}}, {"id": 120, "type": "identifier", "text": "BuildFileDelegate", "parent": 89, "children": [], "start_point": {"row": 72, "column": 6}, "end_point": {"row": 72, "column": 23}}, {"id": 121, "type": "labeled_statement", "text": "public:\n virtual ~BuildFileDelegate();", "parent": 89, "children": [122], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 74, "column": 31}}, {"id": 122, "type": "declaration", "text": "virtual ~BuildFileDelegate();", "parent": 121, "children": [123, 124, 126], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 31}}, {"id": 123, "type": "type_identifier", "text": "virtual", "parent": 122, "children": [], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 9}}, {"id": 124, "type": "ERROR", "text": "~", "parent": 122, "children": [125], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 11}}, {"id": 125, "type": "~", "text": "~", "parent": 124, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 11}}, {"id": 126, "type": "function_declarator", "text": "BuildFileDelegate()", "parent": 122, "children": [127, 128], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 30}}, {"id": 127, "type": "identifier", "text": "BuildFileDelegate", "parent": 126, "children": [], "start_point": {"row": 74, "column": 11}, "end_point": {"row": 74, "column": 28}}, {"id": 128, "type": "parameter_list", "text": "()", "parent": 126, "children": [], "start_point": {"row": 74, "column": 28}, "end_point": {"row": 74, "column": 30}}, {"id": 129, "type": "declaration", "text": "virtual StringRef getInternedString(StringRef value) = 0;", "parent": 89, "children": [130, 131, 133], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 59}}, {"id": 130, "type": "type_identifier", "text": "virtual", "parent": 129, "children": [], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 9}}, {"id": 131, "type": "ERROR", "text": "StringRef", "parent": 129, "children": [132], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 19}}, {"id": 132, "type": "identifier", "text": "StringRef", "parent": 131, "children": [], "start_point": {"row": 77, "column": 10}, "end_point": {"row": 77, "column": 19}}, {"id": 133, "type": "init_declarator", "text": "getInternedString(StringRef value) = 0", "parent": 129, "children": [134, 140, 141], "start_point": {"row": 77, "column": 20}, "end_point": {"row": 77, "column": 58}}, {"id": 134, "type": "function_declarator", "text": "getInternedString(StringRef value)", "parent": 133, "children": [135, 136], "start_point": {"row": 77, "column": 20}, "end_point": {"row": 77, "column": 54}}, {"id": 135, "type": "identifier", "text": "getInternedString", "parent": 134, "children": [], "start_point": {"row": 77, "column": 20}, "end_point": {"row": 77, "column": 37}}, {"id": 136, "type": "parameter_list", "text": "(StringRef value)", "parent": 134, "children": [137], "start_point": {"row": 77, "column": 37}, "end_point": {"row": 77, "column": 54}}, {"id": 137, "type": "parameter_declaration", "text": "StringRef value", "parent": 136, "children": [138, 139], "start_point": {"row": 77, "column": 38}, "end_point": {"row": 77, "column": 53}}, {"id": 138, "type": "type_identifier", "text": "StringRef", "parent": 137, "children": [], "start_point": {"row": 77, "column": 38}, "end_point": {"row": 77, "column": 47}}, {"id": 139, "type": "identifier", "text": "value", "parent": 137, "children": [], "start_point": {"row": 77, "column": 48}, "end_point": {"row": 77, "column": 53}}, {"id": 140, "type": "=", "text": "=", "parent": 133, "children": [], "start_point": {"row": 77, "column": 55}, "end_point": {"row": 77, "column": 56}}, {"id": 141, "type": "number_literal", "text": "0", "parent": 133, "children": [], "start_point": {"row": 77, "column": 57}, "end_point": {"row": 77, "column": 58}}, {"id": 142, "type": "declaration", "text": "virtual basic::FileSystem& getFileSystem() = 0;", "parent": 89, "children": [143, 144, 147], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 49}}, {"id": 143, "type": "type_identifier", "text": "virtual", "parent": 142, "children": [], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 9}}, {"id": 144, "type": "ERROR", "text": "basic::FileSystem&", "parent": 142, "children": [145, 146], "start_point": {"row": 80, "column": 10}, "end_point": {"row": 80, "column": 28}}, {"id": 145, "type": "identifier", "text": "basic", "parent": 144, "children": [], "start_point": {"row": 80, "column": 10}, "end_point": {"row": 80, "column": 15}}, {"id": 146, "type": "identifier", "text": "FileSystem", "parent": 144, "children": [], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 27}}, {"id": 147, "type": "init_declarator", "text": "getFileSystem() = 0", "parent": 142, "children": [148, 151, 152], "start_point": {"row": 80, "column": 29}, "end_point": {"row": 80, "column": 48}}, {"id": 148, "type": "function_declarator", "text": "getFileSystem()", "parent": 147, "children": [149, 150], "start_point": {"row": 80, "column": 29}, "end_point": {"row": 80, "column": 44}}, {"id": 149, "type": "identifier", "text": "getFileSystem", "parent": 148, "children": [], "start_point": {"row": 80, "column": 29}, "end_point": {"row": 80, "column": 42}}, {"id": 150, "type": "parameter_list", "text": "()", "parent": 148, "children": [], "start_point": {"row": 80, "column": 42}, "end_point": {"row": 80, "column": 44}}, {"id": 151, "type": "=", "text": "=", "parent": 147, "children": [], "start_point": {"row": 80, "column": 45}, "end_point": {"row": 80, "column": 46}}, {"id": 152, "type": "number_literal", "text": "0", "parent": 147, "children": [], "start_point": {"row": 80, "column": 47}, "end_point": {"row": 80, "column": 48}}, {"id": 153, "type": "declaration", "text": "virtual void setFileContentsBeingParsed(StringRef buffer) = 0;", "parent": 89, "children": [154, 155, 157], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 64}}, {"id": 154, "type": "type_identifier", "text": "virtual", "parent": 153, "children": [], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 9}}, {"id": 155, "type": "ERROR", "text": "void", "parent": 153, "children": [156], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 14}}, {"id": 156, "type": "identifier", "text": "void", "parent": 155, "children": [], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 14}}, {"id": 157, "type": "init_declarator", "text": "setFileContentsBeingParsed(StringRef buffer) = 0", "parent": 153, "children": [158, 164, 165], "start_point": {"row": 85, "column": 15}, "end_point": {"row": 85, "column": 63}}, {"id": 158, "type": "function_declarator", "text": "setFileContentsBeingParsed(StringRef buffer)", "parent": 157, "children": [159, 160], "start_point": {"row": 85, "column": 15}, "end_point": {"row": 85, "column": 59}}, {"id": 159, "type": "identifier", "text": "setFileContentsBeingParsed", "parent": 158, "children": [], "start_point": {"row": 85, "column": 15}, "end_point": {"row": 85, "column": 41}}, {"id": 160, "type": "parameter_list", "text": "(StringRef buffer)", "parent": 158, "children": [161], "start_point": {"row": 85, "column": 41}, "end_point": {"row": 85, "column": 59}}, {"id": 161, "type": "parameter_declaration", "text": "StringRef buffer", "parent": 160, "children": [162, 163], "start_point": {"row": 85, "column": 42}, "end_point": {"row": 85, "column": 58}}, {"id": 162, "type": "type_identifier", "text": "StringRef", "parent": 161, "children": [], "start_point": {"row": 85, "column": 42}, "end_point": {"row": 85, "column": 51}}, {"id": 163, "type": "identifier", "text": "buffer", "parent": 161, "children": [], "start_point": {"row": 85, "column": 52}, "end_point": {"row": 85, "column": 58}}, {"id": 164, "type": "=", "text": "=", "parent": 157, "children": [], "start_point": {"row": 85, "column": 60}, "end_point": {"row": 85, "column": 61}}, {"id": 165, "type": "number_literal", "text": "0", "parent": 157, "children": [], "start_point": {"row": 85, "column": 62}, "end_point": {"row": 85, "column": 63}}, {"id": 166, "type": "declaration", "text": "virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;", "parent": 89, "children": [167, 168, 170], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 97, "column": 47}}, {"id": 167, "type": "type_identifier", "text": "virtual", "parent": 166, "children": [], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 9}}, {"id": 168, "type": "ERROR", "text": "void", "parent": 166, "children": [169], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 14}}, {"id": 169, "type": "identifier", "text": "void", "parent": 168, "children": [], "start_point": {"row": 95, "column": 10}, "end_point": {"row": 95, "column": 14}}, {"id": 170, "type": "init_declarator", "text": "error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0", "parent": 166, "children": [171, 183, 184], "start_point": {"row": 95, "column": 15}, "end_point": {"row": 97, "column": 46}}, {"id": 171, "type": "function_declarator", "text": "error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message)", "parent": 170, "children": [172, 173], "start_point": {"row": 95, "column": 15}, "end_point": {"row": 97, "column": 42}}, {"id": 172, "type": "identifier", "text": "error", "parent": 171, "children": [], "start_point": {"row": 95, "column": 15}, "end_point": {"row": 95, "column": 20}}, {"id": 173, "type": "parameter_list", "text": "(StringRef filename,\n const BuildFileToken& at,\n const Twine& message)", "parent": 171, "children": [174, 177, 180], "start_point": {"row": 95, "column": 20}, "end_point": {"row": 97, "column": 42}}, {"id": 174, "type": "parameter_declaration", "text": "StringRef filename", "parent": 173, "children": [175, 176], "start_point": {"row": 95, "column": 21}, "end_point": {"row": 95, "column": 39}}, {"id": 175, "type": "type_identifier", "text": "StringRef", "parent": 174, "children": [], "start_point": {"row": 95, "column": 21}, "end_point": {"row": 95, "column": 30}}, {"id": 176, "type": "identifier", "text": "filename", "parent": 174, "children": [], "start_point": {"row": 95, "column": 31}, "end_point": {"row": 95, "column": 39}}, {"id": 177, "type": "parameter_declaration", "text": "const BuildFileToken& at", "parent": 173, "children": [178, 179], "start_point": {"row": 96, "column": 21}, "end_point": {"row": 96, "column": 45}}, {"id": 178, "type": "type_identifier", "text": "BuildFileToken", "parent": 177, "children": [], "start_point": {"row": 96, "column": 27}, "end_point": {"row": 96, "column": 41}}, {"id": 179, "type": "identifier", "text": "at", "parent": 177, "children": [], "start_point": {"row": 96, "column": 43}, "end_point": {"row": 96, "column": 45}}, {"id": 180, "type": "parameter_declaration", "text": "const Twine& message", "parent": 173, "children": [181, 182], "start_point": {"row": 97, "column": 21}, "end_point": {"row": 97, "column": 41}}, {"id": 181, "type": "type_identifier", "text": "Twine", "parent": 180, "children": [], "start_point": {"row": 97, "column": 27}, "end_point": {"row": 97, "column": 32}}, {"id": 182, "type": "identifier", "text": "message", "parent": 180, "children": [], "start_point": {"row": 97, "column": 34}, "end_point": {"row": 97, "column": 41}}, {"id": 183, "type": "=", "text": "=", "parent": 170, "children": [], "start_point": {"row": 97, "column": 43}, "end_point": {"row": 97, "column": 44}}, {"id": 184, "type": "number_literal", "text": "0", "parent": 170, "children": [], "start_point": {"row": 97, "column": 45}, "end_point": {"row": 97, "column": 46}}, {"id": 185, "type": "declaration", "text": "virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;", "parent": 89, "children": [186, 187, 189], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 109, "column": 73}}, {"id": 186, "type": "type_identifier", "text": "virtual", "parent": 185, "children": [], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 9}}, {"id": 187, "type": "ERROR", "text": "bool", "parent": 185, "children": [188], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 14}}, {"id": 188, "type": "identifier", "text": "bool", "parent": 187, "children": [], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 14}}, {"id": 189, "type": "init_declarator", "text": "configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0", "parent": 185, "children": [190, 204, 205], "start_point": {"row": 107, "column": 15}, "end_point": {"row": 109, "column": 72}}, {"id": 190, "type": "function_declarator", "text": "configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties)", "parent": 189, "children": [191, 192], "start_point": {"row": 107, "column": 15}, "end_point": {"row": 109, "column": 68}}, {"id": 191, "type": "identifier", "text": "configureClient", "parent": 190, "children": [], "start_point": {"row": 107, "column": 15}, "end_point": {"row": 107, "column": 30}}, {"id": 192, "type": "parameter_list", "text": "(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties)", "parent": 190, "children": [193, 195, 198, 201], "start_point": {"row": 107, "column": 30}, "end_point": {"row": 109, "column": 68}}, {"id": 193, "type": "parameter_declaration", "text": "const ConfigureContext", "parent": 192, "children": [194], "start_point": {"row": 107, "column": 31}, "end_point": {"row": 107, "column": 53}}, {"id": 194, "type": "type_identifier", "text": "ConfigureContext", "parent": 193, "children": [], "start_point": {"row": 107, "column": 37}, "end_point": {"row": 107, "column": 53}}, {"id": 195, "type": "parameter_declaration", "text": "StringRef name", "parent": 192, "children": [196, 197], "start_point": {"row": 107, "column": 56}, "end_point": {"row": 107, "column": 70}}, {"id": 196, "type": "type_identifier", "text": "StringRef", "parent": 195, "children": [], "start_point": {"row": 107, "column": 56}, "end_point": {"row": 107, "column": 65}}, {"id": 197, "type": "identifier", "text": "name", "parent": 195, "children": [], "start_point": {"row": 107, "column": 66}, "end_point": {"row": 107, "column": 70}}, {"id": 198, "type": "parameter_declaration", "text": "uint32_t version", "parent": 192, "children": [199, 200], "start_point": {"row": 108, "column": 31}, "end_point": {"row": 108, "column": 47}}, {"id": 199, "type": "primitive_type", "text": "uint32_t", "parent": 198, "children": [], "start_point": {"row": 108, "column": 31}, "end_point": {"row": 108, "column": 39}}, {"id": 200, "type": "identifier", "text": "version", "parent": 198, "children": [], "start_point": {"row": 108, "column": 40}, "end_point": {"row": 108, "column": 47}}, {"id": 201, "type": "parameter_declaration", "text": "const property_list_type& properties", "parent": 192, "children": [202, 203], "start_point": {"row": 109, "column": 31}, "end_point": {"row": 109, "column": 67}}, {"id": 202, "type": "type_identifier", "text": "property_list_type", "parent": 201, "children": [], "start_point": {"row": 109, "column": 37}, "end_point": {"row": 109, "column": 55}}, {"id": 203, "type": "identifier", "text": "properties", "parent": 201, "children": [], "start_point": {"row": 109, "column": 57}, "end_point": {"row": 109, "column": 67}}, {"id": 204, "type": "=", "text": "=", "parent": 189, "children": [], "start_point": {"row": 109, "column": 69}, "end_point": {"row": 109, "column": 70}}, {"id": 205, "type": "number_literal", "text": "0", "parent": 189, "children": [], "start_point": {"row": 109, "column": 71}, "end_point": {"row": 109, "column": 72}}, {"id": 206, "type": "declaration", "text": "virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;", "parent": 89, "children": [207, 208, 214], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 63}}, {"id": 207, "type": "type_identifier", "text": "virtual", "parent": 206, "children": [], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 9}}, {"id": 208, "type": "ERROR", "text": "std::unique_ptr<Tool>", "parent": 206, "children": [209, 210, 211, 212, 213], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 31}}, {"id": 209, "type": "identifier", "text": "std", "parent": 208, "children": [], "start_point": {"row": 115, "column": 10}, "end_point": {"row": 115, "column": 13}}, {"id": 210, "type": "identifier", "text": "unique_ptr", "parent": 208, "children": [], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 25}}, {"id": 211, "type": "<", "text": "<", "parent": 208, "children": [], "start_point": {"row": 115, "column": 25}, "end_point": {"row": 115, "column": 26}}, {"id": 212, "type": "identifier", "text": "Tool", "parent": 208, "children": [], "start_point": {"row": 115, "column": 26}, "end_point": {"row": 115, "column": 30}}, {"id": 213, "type": ">", "text": ">", "parent": 208, "children": [], "start_point": {"row": 115, "column": 30}, "end_point": {"row": 115, "column": 31}}, {"id": 214, "type": "init_declarator", "text": "lookupTool(StringRef name) = 0", "parent": 206, "children": [215, 221, 222], "start_point": {"row": 115, "column": 32}, "end_point": {"row": 115, "column": 62}}, {"id": 215, "type": "function_declarator", "text": "lookupTool(StringRef name)", "parent": 214, "children": [216, 217], "start_point": {"row": 115, "column": 32}, "end_point": {"row": 115, "column": 58}}, {"id": 216, "type": "identifier", "text": "lookupTool", "parent": 215, "children": [], "start_point": {"row": 115, "column": 32}, "end_point": {"row": 115, "column": 42}}, {"id": 217, "type": "parameter_list", "text": "(StringRef name)", "parent": 215, "children": [218], "start_point": {"row": 115, "column": 42}, "end_point": {"row": 115, "column": 58}}, {"id": 218, "type": "parameter_declaration", "text": "StringRef name", "parent": 217, "children": [219, 220], "start_point": {"row": 115, "column": 43}, "end_point": {"row": 115, "column": 57}}, {"id": 219, "type": "type_identifier", "text": "StringRef", "parent": 218, "children": [], "start_point": {"row": 115, "column": 43}, "end_point": {"row": 115, "column": 52}}, {"id": 220, "type": "identifier", "text": "name", "parent": 218, "children": [], "start_point": {"row": 115, "column": 53}, "end_point": {"row": 115, "column": 57}}, {"id": 221, "type": "=", "text": "=", "parent": 214, "children": [], "start_point": {"row": 115, "column": 59}, "end_point": {"row": 115, "column": 60}}, {"id": 222, "type": "number_literal", "text": "0", "parent": 214, "children": [], "start_point": {"row": 115, "column": 61}, "end_point": {"row": 115, "column": 62}}, {"id": 223, "type": "declaration", "text": "virtual void loadedTarget(StringRef name, const Target& target) = 0;", "parent": 89, "children": [224, 225, 227], "start_point": {"row": 119, "column": 2}, "end_point": {"row": 119, "column": 70}}, {"id": 224, "type": "type_identifier", "text": "virtual", "parent": 223, "children": [], "start_point": {"row": 119, "column": 2}, "end_point": {"row": 119, "column": 9}}, {"id": 225, "type": "ERROR", "text": "void", "parent": 223, "children": [226], "start_point": {"row": 119, "column": 10}, "end_point": {"row": 119, "column": 14}}, {"id": 226, "type": "identifier", "text": "void", "parent": 225, "children": [], "start_point": {"row": 119, "column": 10}, "end_point": {"row": 119, "column": 14}}, {"id": 227, "type": "init_declarator", "text": "loadedTarget(StringRef name, const Target& target) = 0", "parent": 223, "children": [228, 237, 238], "start_point": {"row": 119, "column": 15}, "end_point": {"row": 119, "column": 69}}, {"id": 228, "type": "function_declarator", "text": "loadedTarget(StringRef name, const Target& target)", "parent": 227, "children": [229, 230], "start_point": {"row": 119, "column": 15}, "end_point": {"row": 119, "column": 65}}, {"id": 229, "type": "identifier", "text": "loadedTarget", "parent": 228, "children": [], "start_point": {"row": 119, "column": 15}, "end_point": {"row": 119, "column": 27}}, {"id": 230, "type": "parameter_list", "text": "(StringRef name, const Target& target)", "parent": 228, "children": [231, 234], "start_point": {"row": 119, "column": 27}, "end_point": {"row": 119, "column": 65}}, {"id": 231, "type": "parameter_declaration", "text": "StringRef name", "parent": 230, "children": [232, 233], "start_point": {"row": 119, "column": 28}, "end_point": {"row": 119, "column": 42}}, {"id": 232, "type": "type_identifier", "text": "StringRef", "parent": 231, "children": [], "start_point": {"row": 119, "column": 28}, "end_point": {"row": 119, "column": 37}}, {"id": 233, "type": "identifier", "text": "name", "parent": 231, "children": [], "start_point": {"row": 119, "column": 38}, "end_point": {"row": 119, "column": 42}}, {"id": 234, "type": "parameter_declaration", "text": "const Target& target", "parent": 230, "children": [235, 236], "start_point": {"row": 119, "column": 44}, "end_point": {"row": 119, "column": 64}}, {"id": 235, "type": "type_identifier", "text": "Target", "parent": 234, "children": [], "start_point": {"row": 119, "column": 50}, "end_point": {"row": 119, "column": 56}}, {"id": 236, "type": "identifier", "text": "target", "parent": 234, "children": [], "start_point": {"row": 119, "column": 58}, "end_point": {"row": 119, "column": 64}}, {"id": 237, "type": "=", "text": "=", "parent": 227, "children": [], "start_point": {"row": 119, "column": 66}, "end_point": {"row": 119, "column": 67}}, {"id": 238, "type": "number_literal", "text": "0", "parent": 227, "children": [], "start_point": {"row": 119, "column": 68}, "end_point": {"row": 119, "column": 69}}, {"id": 239, "type": "declaration", "text": "virtual void loadedDefaultTarget(StringRef target) = 0;", "parent": 89, "children": [240, 241, 243], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 57}}, {"id": 240, "type": "type_identifier", "text": "virtual", "parent": 239, "children": [], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 9}}, {"id": 241, "type": "ERROR", "text": "void", "parent": 239, "children": [242], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 123, "column": 14}}, {"id": 242, "type": "identifier", "text": "void", "parent": 241, "children": [], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 123, "column": 14}}, {"id": 243, "type": "init_declarator", "text": "loadedDefaultTarget(StringRef target) = 0", "parent": 239, "children": [244, 250, 251], "start_point": {"row": 123, "column": 15}, "end_point": {"row": 123, "column": 56}}, {"id": 244, "type": "function_declarator", "text": "loadedDefaultTarget(StringRef target)", "parent": 243, "children": [245, 246], "start_point": {"row": 123, "column": 15}, "end_point": {"row": 123, "column": 52}}, {"id": 245, "type": "identifier", "text": "loadedDefaultTarget", "parent": 244, "children": [], "start_point": {"row": 123, "column": 15}, "end_point": {"row": 123, "column": 34}}, {"id": 246, "type": "parameter_list", "text": "(StringRef target)", "parent": 244, "children": [247], "start_point": {"row": 123, "column": 34}, "end_point": {"row": 123, "column": 52}}, {"id": 247, "type": "parameter_declaration", "text": "StringRef target", "parent": 246, "children": [248, 249], "start_point": {"row": 123, "column": 35}, "end_point": {"row": 123, "column": 51}}, {"id": 248, "type": "type_identifier", "text": "StringRef", "parent": 247, "children": [], "start_point": {"row": 123, "column": 35}, "end_point": {"row": 123, "column": 44}}, {"id": 249, "type": "identifier", "text": "target", "parent": 247, "children": [], "start_point": {"row": 123, "column": 45}, "end_point": {"row": 123, "column": 51}}, {"id": 250, "type": "=", "text": "=", "parent": 243, "children": [], "start_point": {"row": 123, "column": 53}, "end_point": {"row": 123, "column": 54}}, {"id": 251, "type": "number_literal", "text": "0", "parent": 243, "children": [], "start_point": {"row": 123, "column": 55}, "end_point": {"row": 123, "column": 56}}, {"id": 252, "type": "declaration", "text": "virtual void loadedCommand(StringRef name, const Command& command) = 0;", "parent": 89, "children": [253, 254, 256], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 127, "column": 73}}, {"id": 253, "type": "type_identifier", "text": "virtual", "parent": 252, "children": [], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 127, "column": 9}}, {"id": 254, "type": "ERROR", "text": "void", "parent": 252, "children": [255], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 14}}, {"id": 255, "type": "identifier", "text": "void", "parent": 254, "children": [], "start_point": {"row": 127, "column": 10}, "end_point": {"row": 127, "column": 14}}, {"id": 256, "type": "init_declarator", "text": "loadedCommand(StringRef name, const Command& command) = 0", "parent": 252, "children": [257, 266, 267], "start_point": {"row": 127, "column": 15}, "end_point": {"row": 127, "column": 72}}, {"id": 257, "type": "function_declarator", "text": "loadedCommand(StringRef name, const Command& command)", "parent": 256, "children": [258, 259], "start_point": {"row": 127, "column": 15}, "end_point": {"row": 127, "column": 68}}, {"id": 258, "type": "identifier", "text": "loadedCommand", "parent": 257, "children": [], "start_point": {"row": 127, "column": 15}, "end_point": {"row": 127, "column": 28}}, {"id": 259, "type": "parameter_list", "text": "(StringRef name, const Command& command)", "parent": 257, "children": [260, 263], "start_point": {"row": 127, "column": 28}, "end_point": {"row": 127, "column": 68}}, {"id": 260, "type": "parameter_declaration", "text": "StringRef name", "parent": 259, "children": [261, 262], "start_point": {"row": 127, "column": 29}, "end_point": {"row": 127, "column": 43}}, {"id": 261, "type": "type_identifier", "text": "StringRef", "parent": 260, "children": [], "start_point": {"row": 127, "column": 29}, "end_point": {"row": 127, "column": 38}}, {"id": 262, "type": "identifier", "text": "name", "parent": 260, "children": [], "start_point": {"row": 127, "column": 39}, "end_point": {"row": 127, "column": 43}}, {"id": 263, "type": "parameter_declaration", "text": "const Command& command", "parent": 259, "children": [264, 265], "start_point": {"row": 127, "column": 45}, "end_point": {"row": 127, "column": 67}}, {"id": 264, "type": "type_identifier", "text": "Command", "parent": 263, "children": [], "start_point": {"row": 127, "column": 51}, "end_point": {"row": 127, "column": 58}}, {"id": 265, "type": "identifier", "text": "command", "parent": 263, "children": [], "start_point": {"row": 127, "column": 60}, "end_point": {"row": 127, "column": 67}}, {"id": 266, "type": "=", "text": "=", "parent": 256, "children": [], "start_point": {"row": 127, "column": 69}, "end_point": {"row": 127, "column": 70}}, {"id": 267, "type": "number_literal", "text": "0", "parent": 256, "children": [], "start_point": {"row": 127, "column": 71}, "end_point": {"row": 127, "column": 72}}, {"id": 268, "type": "declaration", "text": "virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;", "parent": 89, "children": [269, 270, 276, 288], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 136, "column": 70}}, {"id": 269, "type": "type_identifier", "text": "virtual", "parent": 268, "children": [], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 9}}, {"id": 270, "type": "ERROR", "text": "std::unique_ptr<Node>", "parent": 268, "children": [271, 272, 273, 274, 275], "start_point": {"row": 135, "column": 10}, "end_point": {"row": 135, "column": 31}}, {"id": 271, "type": "identifier", "text": "std", "parent": 270, "children": [], "start_point": {"row": 135, "column": 10}, "end_point": {"row": 135, "column": 13}}, {"id": 272, "type": "identifier", "text": "unique_ptr", "parent": 270, "children": [], "start_point": {"row": 135, "column": 15}, "end_point": {"row": 135, "column": 25}}, {"id": 273, "type": "<", "text": "<", "parent": 270, "children": [], "start_point": {"row": 135, "column": 25}, "end_point": {"row": 135, "column": 26}}, {"id": 274, "type": "identifier", "text": "Node", "parent": 270, "children": [], "start_point": {"row": 135, "column": 26}, "end_point": {"row": 135, "column": 30}}, {"id": 275, "type": ">", "text": ">", "parent": 270, "children": [], "start_point": {"row": 135, "column": 30}, "end_point": {"row": 135, "column": 31}}, {"id": 276, "type": "init_declarator", "text": "lookupNode(StringRef name,\n bool isImplicit=false", "parent": 268, "children": [277, 286, 287], "start_point": {"row": 135, "column": 32}, "end_point": {"row": 136, "column": 64}}, {"id": 277, "type": "function_declarator", "text": "lookupNode(StringRef name,\n bool isImplicit", "parent": 276, "children": [278, 279], "start_point": {"row": 135, "column": 32}, "end_point": {"row": 136, "column": 58}}, {"id": 278, "type": "identifier", "text": "lookupNode", "parent": 277, "children": [], "start_point": {"row": 135, "column": 32}, "end_point": {"row": 135, "column": 42}}, {"id": 279, "type": "parameter_list", "text": "(StringRef name,\n bool isImplicit", "parent": 277, "children": [280, 283], "start_point": {"row": 135, "column": 42}, "end_point": {"row": 136, "column": 58}}, {"id": 280, "type": "parameter_declaration", "text": "StringRef name", "parent": 279, "children": [281, 282], "start_point": {"row": 135, "column": 43}, "end_point": {"row": 135, "column": 57}}, {"id": 281, "type": "type_identifier", "text": "StringRef", "parent": 280, "children": [], "start_point": {"row": 135, "column": 43}, "end_point": {"row": 135, "column": 52}}, {"id": 282, "type": "identifier", "text": "name", "parent": 280, "children": [], "start_point": {"row": 135, "column": 53}, "end_point": {"row": 135, "column": 57}}, {"id": 283, "type": "parameter_declaration", "text": "bool isImplicit", "parent": 279, "children": [284, 285], "start_point": {"row": 136, "column": 43}, "end_point": {"row": 136, "column": 58}}, {"id": 284, "type": "primitive_type", "text": "bool", "parent": 283, "children": [], "start_point": {"row": 136, "column": 43}, "end_point": {"row": 136, "column": 47}}, {"id": 285, "type": "identifier", "text": "isImplicit", "parent": 283, "children": [], "start_point": {"row": 136, "column": 48}, "end_point": {"row": 136, "column": 58}}, {"id": 286, "type": "=", "text": "=", "parent": 276, "children": [], "start_point": {"row": 136, "column": 58}, "end_point": {"row": 136, "column": 59}}, {"id": 287, "type": "false", "text": "false", "parent": 276, "children": [], "start_point": {"row": 136, "column": 59}, "end_point": {"row": 136, "column": 64}}, {"id": 288, "type": "ERROR", "text": ") = 0", "parent": 268, "children": [289, 290], "start_point": {"row": 136, "column": 64}, "end_point": {"row": 136, "column": 69}}, {"id": 289, "type": "=", "text": "=", "parent": 288, "children": [], "start_point": {"row": 136, "column": 66}, "end_point": {"row": 136, "column": 67}}, {"id": 290, "type": "number_literal", "text": "0", "parent": 288, "children": [], "start_point": {"row": 136, "column": 68}, "end_point": {"row": 136, "column": 69}}, {"id": 291, "type": "function_definition", "text": "class BuildFile {\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate.\n ///\n /// \\arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);\n ~BuildFile();\n\n /// Return the delegate the engine was configured with.\n BuildFileDelegate* getDelegate();\n\n /// Load the build file from the provided filename.\n ///\n /// \\returns A non-null build description on success.\n std::unique_ptr<BuildDescription> load();\n}", "parent": 38, "children": [292], "start_point": {"row": 141, "column": 0}, "end_point": {"row": 160, "column": 1}}, {"id": 292, "type": "identifier", "text": "BuildFile", "parent": 291, "children": [], "start_point": {"row": 141, "column": 6}, "end_point": {"row": 141, "column": 15}}, {"id": 293, "type": "labeled_statement", "text": "private:\n void *impl;", "parent": 291, "children": [294], "start_point": {"row": 142, "column": 0}, "end_point": {"row": 143, "column": 13}}, {"id": 294, "type": "declaration", "text": "void *impl;", "parent": 293, "children": [295, 296], "start_point": {"row": 143, "column": 2}, "end_point": {"row": 143, "column": 13}}, {"id": 295, "type": "primitive_type", "text": "void", "parent": 294, "children": [], "start_point": {"row": 143, "column": 2}, "end_point": {"row": 143, "column": 6}}, {"id": 296, "type": "pointer_declarator", "text": "*impl", "parent": 294, "children": [297, 298], "start_point": {"row": 143, "column": 7}, "end_point": {"row": 143, "column": 12}}, {"id": 297, "type": "*", "text": "*", "parent": 296, "children": [], "start_point": {"row": 143, "column": 7}, "end_point": {"row": 143, "column": 8}}, {"id": 298, "type": "identifier", "text": "impl", "parent": 296, "children": [], "start_point": {"row": 143, "column": 8}, "end_point": {"row": 143, "column": 12}}, {"id": 299, "type": "labeled_statement", "text": "public:\n /// Create a build file with the given delegate.\n ///\n /// \\arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);", "parent": 291, "children": [300], "start_point": {"row": 145, "column": 0}, "end_point": {"row": 150, "column": 50}}, {"id": 300, "type": "declaration", "text": "explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);", "parent": 299, "children": [301, 302], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 150, "column": 50}}, {"id": 301, "type": "type_identifier", "text": "explicit", "parent": 300, "children": [], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 149, "column": 10}}, {"id": 302, "type": "function_declarator", "text": "BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate)", "parent": 300, "children": [303, 304], "start_point": {"row": 149, "column": 11}, "end_point": {"row": 150, "column": 49}}, {"id": 303, "type": "identifier", "text": "BuildFile", "parent": 302, "children": [], "start_point": {"row": 149, "column": 11}, "end_point": {"row": 149, "column": 20}}, {"id": 304, "type": "parameter_list", "text": "(StringRef mainFilename,\n BuildFileDelegate& delegate)", "parent": 302, "children": [305, 308], "start_point": {"row": 149, "column": 20}, "end_point": {"row": 150, "column": 49}}, {"id": 305, "type": "parameter_declaration", "text": "StringRef mainFilename", "parent": 304, "children": [306, 307], "start_point": {"row": 149, "column": 21}, "end_point": {"row": 149, "column": 43}}, {"id": 306, "type": "type_identifier", "text": "StringRef", "parent": 305, "children": [], "start_point": {"row": 149, "column": 21}, "end_point": {"row": 149, "column": 30}}, {"id": 307, "type": "identifier", "text": "mainFilename", "parent": 305, "children": [], "start_point": {"row": 149, "column": 31}, "end_point": {"row": 149, "column": 43}}, {"id": 308, "type": "parameter_declaration", "text": "BuildFileDelegate& delegate", "parent": 304, "children": [309, 310], "start_point": {"row": 150, "column": 21}, "end_point": {"row": 150, "column": 48}}, {"id": 309, "type": "type_identifier", "text": "BuildFileDelegate", "parent": 308, "children": [], "start_point": {"row": 150, "column": 21}, "end_point": {"row": 150, "column": 38}}, {"id": 310, "type": "identifier", "text": "delegate", "parent": 308, "children": [], "start_point": {"row": 150, "column": 40}, "end_point": {"row": 150, "column": 48}}, {"id": 311, "type": "unary_expression", "text": "~BuildFile()", "parent": 291, "children": [312, 313], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 14}}, {"id": 312, "type": "~", "text": "~", "parent": 311, "children": [], "start_point": {"row": 151, "column": 2}, "end_point": {"row": 151, "column": 3}}, {"id": 313, "type": "call_expression", "text": "BuildFile()", "parent": 311, "children": [314, 315], "start_point": {"row": 151, "column": 3}, "end_point": {"row": 151, "column": 14}}, {"id": 314, "type": "identifier", "text": "BuildFile", "parent": 313, "children": [], "start_point": {"row": 151, "column": 3}, "end_point": {"row": 151, "column": 12}}, {"id": 315, "type": "argument_list", "text": "()", "parent": 313, "children": [], "start_point": {"row": 151, "column": 12}, "end_point": {"row": 151, "column": 14}}, {"id": 316, "type": "declaration", "text": "BuildFileDelegate* getDelegate();", "parent": 291, "children": [317, 318], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 154, "column": 35}}, {"id": 317, "type": "type_identifier", "text": "BuildFileDelegate", "parent": 316, "children": [], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 154, "column": 19}}, {"id": 318, "type": "pointer_declarator", "text": "* getDelegate()", "parent": 316, "children": [319, 320], "start_point": {"row": 154, "column": 19}, "end_point": {"row": 154, "column": 34}}, {"id": 319, "type": "*", "text": "*", "parent": 318, "children": [], "start_point": {"row": 154, "column": 19}, "end_point": {"row": 154, "column": 20}}, {"id": 320, "type": "function_declarator", "text": "getDelegate()", "parent": 318, "children": [321, 322], "start_point": {"row": 154, "column": 21}, "end_point": {"row": 154, "column": 34}}, {"id": 321, "type": "identifier", "text": "getDelegate", "parent": 320, "children": [], "start_point": {"row": 154, "column": 21}, "end_point": {"row": 154, "column": 32}}, {"id": 322, "type": "parameter_list", "text": "()", "parent": 320, "children": [], "start_point": {"row": 154, "column": 32}, "end_point": {"row": 154, "column": 34}}, {"id": 323, "type": "labeled_statement", "text": "std::unique_ptr<BuildDescription> load();", "parent": 291, "children": [324], "start_point": {"row": 159, "column": 2}, "end_point": {"row": 159, "column": 43}}, {"id": 324, "type": "statement_identifier", "text": "std", "parent": 323, "children": [], "start_point": {"row": 159, "column": 2}, "end_point": {"row": 159, "column": 5}}, {"id": 325, "type": "binary_expression", "text": "unique_ptr<BuildDescription> load()", "parent": 323, "children": [326, 330, 331], "start_point": {"row": 159, "column": 7}, "end_point": {"row": 159, "column": 42}}, {"id": 326, "type": "binary_expression", "text": "unique_ptr<BuildDescription", "parent": 325, "children": [327, 328, 329], "start_point": {"row": 159, "column": 7}, "end_point": {"row": 159, "column": 34}}, {"id": 327, "type": "identifier", "text": "unique_ptr", "parent": 326, "children": [], "start_point": {"row": 159, "column": 7}, "end_point": {"row": 159, "column": 17}}, {"id": 328, "type": "<", "text": "<", "parent": 326, "children": [], "start_point": {"row": 159, "column": 17}, "end_point": {"row": 159, "column": 18}}, {"id": 329, "type": "identifier", "text": "BuildDescription", "parent": 326, "children": [], "start_point": {"row": 159, "column": 18}, "end_point": {"row": 159, "column": 34}}, {"id": 330, "type": ">", "text": ">", "parent": 325, "children": [], "start_point": {"row": 159, "column": 34}, "end_point": {"row": 159, "column": 35}}, {"id": 331, "type": "call_expression", "text": "load()", "parent": 325, "children": [332, 333], "start_point": {"row": 159, "column": 36}, "end_point": {"row": 159, "column": 42}}, {"id": 332, "type": "identifier", "text": "load", "parent": 331, "children": [], "start_point": {"row": 159, "column": 36}, "end_point": {"row": 159, "column": 40}}, {"id": 333, "type": "argument_list", "text": "()", "parent": 331, "children": [], "start_point": {"row": 159, "column": 40}, "end_point": {"row": 159, "column": 42}}, {"id": 334, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 165, "column": 0}, "end_point": {"row": 165, "column": 6}}]}, "node_categories": {"declarations": {"functions": [30, 33, 38, 89, 114, 126, 134, 148, 158, 171, 190, 215, 228, 244, 257, 277, 291, 302, 320], "variables": [36, 41, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 80, 85, 93, 96, 99, 102, 117, 122, 129, 137, 142, 153, 161, 166, 174, 177, 180, 185, 193, 195, 198, 201, 206, 218, 223, 231, 234, 239, 247, 252, 260, 263, 268, 280, 283, 294, 300, 305, 308, 316], "classes": [77, 78, 90, 91], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28], "modules": [], "enums": []}, "statements": {"expressions": [105, 107, 311, 313, 325, 326, 331], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 31, 32, 34, 35, 37, 39, 40, 43, 45, 47, 48, 50, 51, 53, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 79, 84, 86, 88, 92, 94, 95, 97, 98, 100, 101, 103, 106, 108, 111, 113, 115, 118, 119, 120, 123, 127, 130, 132, 135, 138, 139, 143, 145, 146, 149, 154, 156, 159, 162, 163, 167, 169, 172, 175, 176, 178, 179, 181, 182, 186, 188, 191, 194, 196, 197, 200, 202, 203, 207, 209, 210, 212, 216, 219, 220, 224, 226, 229, 232, 233, 235, 236, 240, 242, 245, 248, 249, 253, 255, 258, 261, 262, 264, 265, 269, 271, 272, 274, 278, 281, 282, 285, 292, 298, 301, 303, 306, 307, 309, 310, 314, 317, 321, 324, 327, 329, 332, 334], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 141, 152, 165, 184, 205, 222, 238, 251, 267, 290], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [104]}}, "cross_language_map": {"function_declarations": [{"node_id": 30, "universal_type": "function", "name": "FileSystem;", "text_snippet": "namespace llbuild {\nnamespace basic {\n\nclass FileSystem;\n\n}\n\nnamespace buildsystem {\n\n/// The type u"}, {"node_id": 33, "universal_type": "function", "name": "FileSystem;", "text_snippet": "namespace basic {\n\nclass FileSystem;\n\n}"}, {"node_id": 38, "universal_type": "function", "name": "BuildDescription;", "text_snippet": "namespace buildsystem {\n\n/// The type used to pass parsed properties to the delegate.\ntypedef std::v"}, {"node_id": 89, "universal_type": "function", "name": "ConfigureContext", "text_snippet": "struct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDeleg"}, {"node_id": 114, "universal_type": "function", "name": "unknown", "text_snippet": "error(const Twine& message) const"}, {"node_id": 126, "universal_type": "function", "name": "unknown", "text_snippet": "BuildFileDelegate()"}, {"node_id": 134, "universal_type": "function", "name": "unknown", "text_snippet": "getInternedString(StringRef value)"}, {"node_id": 148, "universal_type": "function", "name": "unknown", "text_snippet": "getFileSystem()"}, {"node_id": 158, "universal_type": "function", "name": "unknown", "text_snippet": "setFileContentsBeingParsed(StringRef buffer)"}, {"node_id": 171, "universal_type": "function", "name": "unknown", "text_snippet": "error(StringRef filename,\n const BuildFileToken& at,\n const "}, {"node_id": 190, "universal_type": "function", "name": "unknown", "text_snippet": "configureClient(const ConfigureContext&, StringRef name,\n uint32_t ver"}, {"node_id": 215, "universal_type": "function", "name": "unknown", "text_snippet": "lookupTool(StringRef name)"}, {"node_id": 228, "universal_type": "function", "name": "unknown", "text_snippet": "loadedTarget(StringRef name, const Target& target)"}, {"node_id": 244, "universal_type": "function", "name": "unknown", "text_snippet": "loadedDefaultTarget(StringRef target)"}, {"node_id": 257, "universal_type": "function", "name": "unknown", "text_snippet": "loadedCommand(StringRef name, const Command& command)"}, {"node_id": 277, "universal_type": "function", "name": "isImplicit", "text_snippet": "lookupNode(StringRef name,\n bool isImplicit"}, {"node_id": 291, "universal_type": "function", "name": "BuildFile", "text_snippet": "class BuildFile {\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate."}, {"node_id": 302, "universal_type": "function", "name": "unknown", "text_snippet": "BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate)"}, {"node_id": 320, "universal_type": "function", "name": "unknown", "text_snippet": "getDelegate()"}], "class_declarations": [{"node_id": 77, "universal_type": "class", "name": "BuildFileToken", "text_snippet": "struct BuildFileToken {\n const char* start;\n unsigned length;\n}"}, {"node_id": 78, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 90, "universal_type": "class", "name": "ConfigureContext", "text_snippet": "struct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDeleg"}, {"node_id": 91, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include \"llbuild/Basic/Compiler.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"llbuild/Basic/LLVM.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"llvm/ADT/StringRef.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <memory>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <string>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <unordered_map>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <utility>\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include <vector>\n"}, {"node_id": 28, "text": "#include"}]}, "original_source_code": "//===- BuildFile.h ----------------------------------------------*- C++ -*-===//\n//\n// This source file is part of the Swift.org open source project\n//\n// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors\n// Licensed under Apache License v2.0 with Runtime Library Exception\n//\n// See http://swift.org/LICENSE.txt for license information\n// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors\n//\n//===----------------------------------------------------------------------===//\n\n#ifndef LLBUILD_BUILDSYSTEM_BUILDFILE_H\n#define LLBUILD_BUILDSYSTEM_BUILDFILE_H\n\n#include \"llbuild/Basic/Compiler.h\"\n#include \"llbuild/Basic/LLVM.h\"\n\n#include \"llvm/ADT/StringRef.h\"\n\n#include <memory>\n#include <string>\n#include <unordered_map>\n#include <utility>\n#include <vector>\n\nnamespace llbuild {\nnamespace basic {\n\nclass FileSystem;\n\n}\n\nnamespace buildsystem {\n\n/// The type used to pass parsed properties to the delegate.\ntypedef std::vector<std::pair<std::string, std::string>> property_list_type;\n\nclass BuildDescription;\nclass BuildFileDelegate;\nclass BuildKey;\nclass BuildSystem;\nclass BuildSystemCommandInterface;\nclass BuildValue;\nclass Command;\nclass Node;\nclass Target;\nclass Tool;\n\n/// Minimal token object representing the range where a diagnostic occurred.\nstruct BuildFileToken {\n const char* start;\n unsigned length;\n};\n\n/// Context for information that may be needed for a configuration action.\nstruct ConfigureContext {\n /// The file delegate, to use for error reporting, etc.\n BuildFileDelegate& delegate;\n\n /// The file the configuration request originated from.\n StringRef filename;\n\n /// The token to use in error reporting.\n BuildFileToken at;\n\npublic:\n BuildFileDelegate& getDelegate() const { return delegate; }\n\n void error(const Twine& message) const;\n};\n\nclass BuildFileDelegate {\npublic:\n virtual ~BuildFileDelegate();\n\n /// Get an interned string.\n virtual StringRef getInternedString(StringRef value) = 0;\n \n /// Get the file system to use for access.\n virtual basic::FileSystem& getFileSystem() = 0;\n \n /// Called by the build file loader to register the current file contents.\n //\n // FIXME: This is a total hack, and should be cleaned up.\n virtual void setFileContentsBeingParsed(StringRef buffer) = 0;\n\n /// Called by the build file loader to report an error.\n ///\n /// \\param filename The file the error occurred in.\n ///\n /// \\param at The token at which the error occurred. The token will be null if\n /// no location is associated.\n ///\n /// \\param message The diagnostic message.\n virtual void error(StringRef filename,\n const BuildFileToken& at,\n const Twine& message) = 0;\n \n /// Called by the build file loader after the 'client' file section has been\n /// loaded.\n ///\n /// \\param name The expected client name.\n /// \\param version The client version specified in the file.\n /// \\param properties The list of additional properties passed to the client.\n ///\n /// \\returns True on success.\n virtual bool configureClient(const ConfigureContext&, StringRef name,\n uint32_t version,\n const property_list_type& properties) = 0;\n\n /// Called by the build file loader to get a tool definition.\n ///\n /// \\param name The name of the tool to lookup.\n /// \\returns The tool to use on success, or otherwise nil.\n virtual std::unique_ptr<Tool> lookupTool(StringRef name) = 0;\n\n /// Called by the build file loader to inform the client that a target\n /// definition has been loaded.\n virtual void loadedTarget(StringRef name, const Target& target) = 0;\n\n /// Called by the build file loader to inform the client that a default\n /// target has been loaded.\n virtual void loadedDefaultTarget(StringRef target) = 0;\n\n /// Called by the build file loader to inform the client that a command\n /// has been fully loaded.\n virtual void loadedCommand(StringRef name, const Command& command) = 0;\n\n /// Called by the build file loader to get a node.\n ///\n /// \\param name The name of the node to lookup.\n ///\n /// \\param isImplicit Whether the node is an implicit one (created as a side\n /// effect of being declared by a command).\n virtual std::unique_ptr<Node> lookupNode(StringRef name,\n bool isImplicit=false) = 0;\n};\n\n/// The BuildFile class supports the \"llbuild\"-native build description file\n/// format.\nclass BuildFile {\nprivate:\n void *impl;\n\npublic:\n /// Create a build file with the given delegate.\n ///\n /// \\arg mainFilename The path of the main build file.\n explicit BuildFile(StringRef mainFilename,\n BuildFileDelegate& delegate);\n ~BuildFile();\n\n /// Return the delegate the engine was configured with.\n BuildFileDelegate* getDelegate();\n\n /// Load the build file from the provided filename.\n ///\n /// \\returns A non-null build description on success.\n std::unique_ptr<BuildDescription> load();\n};\n\n}\n}\n\n#endif\n"}
35
c
/*! AudioCompress.c * Simple commandline audio compressor * * (c)2002-2007 busybee (http://beesbuzz.biz/) * Licensed under the terms of the LGPL. See the file COPYING for details. */ #include <stdio.h> #include <sys/types.h> #include <errno.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include "compress.h" #include "config.h" #ifdef USE_ESD #include "esd.h" #endif void showhelp(char *name) { fprintf(stderr, "Usage: %s [options] < raw_sample_in > raw_sample_out 2>log\n", name); fprintf(stderr, "\nOptions:\n"); fprintf(stderr, "\t-t #\tSet the target signal level (1-32767; default: %d)\n", TARGET); fprintf(stderr, "\t-g #\tSet the maximum gain (1-255; default: %d)\n", GAINMAX); fprintf(stderr, "\t-s #\tSet the gain smoothing exponent (1-15; default: %d)\n", GAINSMOOTH); fprintf(stderr, "\t-b #\tSet the history length (default: %d)\n", BUCKETS); fprintf(stderr, "\t-x/-X \tEnable/disable byte swapping\n"); #ifdef USE_ESD fprintf(stderr, "\t-e [host]\tConnect to esound daemon\n"); #endif fprintf(stderr, "\t-h\tShow this usage information\n"); } int Run(int argc, char *argv[], struct Compressor *cmp) { int16_t buf[4096]; int ofs = 0, len; int opt; int swab = 0; #ifdef USE_ESD int esd = 0; char *esd_host = NULL; #endif struct CompressorConfig *cfg = Compressor_getConfig(cmp); int fd_in = fileno(stdin), fd_out = fileno(stdout); while ((opt = getopt(argc, argv, #ifdef USE_ESD "e:" #endif "t:g:s:b:xXh")) >= 0) { switch(opt) { #ifdef USE_ESD case 'e': esd = 1; esd_host = optarg; break; #endif case 't': cfg->target = atoi(optarg); if (cfg->target < 0 || cfg->target > 32767) { fprintf(stderr, "Invalid target level %s\n", optarg); return 1; } break; case 'g': cfg->maxgain = atoi(optarg); if (cfg->maxgain < 0 || cfg->maxgain > 255) { fprintf(stderr, "Invalid maximum gain %s\n", optarg); return 1; } break; case 's': cfg->smooth = atoi(optarg); if (cfg->smooth < 0 || cfg->smooth > 15) { fprintf(stderr, "Invalid smoothing value %s\n", optarg); return 1; } break; case 'b': { unsigned int hsize = atoi(optarg); if (hsize < 1) { fprintf(stderr, "Invalid history size %s\n", optarg); return 1; } Compressor_setHistory(cmp, hsize); break; } case 'x': swab = 1; break; case 'X': swab = 0; break; case 'h': showhelp(argv[0]); return 0; default: showhelp(argv[0]); return 1; } } #ifdef USE_ESD if (esd) { fd_in = fd_out = esd_filter_stream( ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY, ESD_DEFAULT_RATE, esd_host, argv[0]); if (fd_in < 0) { fprintf(stderr, "esd connection failed\n"); return 1; } } #endif // skip 44 byte way header read(fd_in, buf, 44); write(fd_out, buf, 44 ); ofs = 0; while ((len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))) > 0) { int count = len/sizeof(int16_t); int used = count*sizeof(int16_t); if (swab) { int i; for (i = 0; i < count; i++) buf[i] = ((buf[i]&255)<<8) | (buf[i]>>8); } if (count) { Compressor_Process_int16(cmp, buf, count); write(fd_out, buf, used); } //! Fix a read which generated an incomplete sample ofs = len - used; if (ofs) memmove(buf, buf + used, ofs); } if (len < 0) { perror("AudioCompress"); return 1; } return 0; } //! I'd rather be using C++, what with scope-lifeime objects and so on. Sigh. int main(int argc, char *argv[]) { struct Compressor *cmp = Compressor_new(0); int ret = Run(argc, argv, cmp); Compressor_delete(cmp); return ret; }
21.56
176
(translation_unit) "/*! AudioCompress.c\n * Simple commandline audio compressor\n *\n * (c)2002-2007 busybee (http://beesbuzz.biz/)\n * Licensed under the terms of the LGPL. See the file COPYING for details.\n */\n\n#include <stdio.h>\n#include <sys/types.h>\n#include <errno.h>\n\n#include <unistd.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include "compress.h"\n#include "config.h"\n\n#ifdef USE_ESD\n#include "esd.h"\n#endif\n\nvoid showhelp(char *name)\n{\n fprintf(stderr, "Usage: %s [options] < raw_sample_in > raw_sample_out 2>log\n", name);\n fprintf(stderr, "\nOptions:\n");\n fprintf(stderr,\n "\t-t #\tSet the target signal level (1-32767; default: %d)\n",\n TARGET);\n fprintf(stderr,\n "\t-g #\tSet the maximum gain (1-255; default: %d)\n",\n GAINMAX);\n fprintf(stderr,\n "\t-s #\tSet the gain smoothing exponent (1-15; default: %d)\n",\n GAINSMOOTH);\n fprintf(stderr,\n "\t-b #\tSet the history length (default: %d)\n",\n BUCKETS);\n fprintf(stderr,\n "\t-x/-X \tEnable/disable byte swapping\n");\n\n#ifdef USE_ESD\n fprintf(stderr,\n "\t-e [host]\tConnect to esound daemon\n");\n#endif\n\n fprintf(stderr, "\t-h\tShow this usage information\n");\n}\n\nint Run(int argc, char *argv[], struct Compressor *cmp)\n{\n int16_t buf[4096];\n int ofs = 0, len;\n int opt;\n int swab = 0;\n#ifdef USE_ESD\n int esd = 0;\n char *esd_host = NULL;\n#endif\n struct CompressorConfig *cfg = Compressor_getConfig(cmp);\n int fd_in = fileno(stdin), fd_out = fileno(stdout);\n\n while ((opt = getopt(argc, argv,\n#ifdef USE_ESD\n "e:"\n#endif\n "t:g:s:b:xXh")) >= 0)\n {\n switch(opt)\n {\n#ifdef USE_ESD\n case 'e':\n esd = 1;\n esd_host = optarg;\n break;\n#endif\n case 't':\n cfg->target = atoi(optarg);\n if (cfg->target < 0 || cfg->target > 32767)\n {\n fprintf(stderr,\n "Invalid target level %s\n", optarg);\n return 1;\n }\n break;\n\n case 'g':\n cfg->maxgain = atoi(optarg);\n if (cfg->maxgain < 0 || cfg->maxgain > 255)\n {\n fprintf(stderr,\n "Invalid maximum gain %s\n", optarg);\n return 1;\n }\n break;\n\n case 's':\n cfg->smooth = atoi(optarg);\n if (cfg->smooth < 0 || cfg->smooth > 15)\n {\n fprintf(stderr,\n "Invalid smoothing value %s\n",\n optarg);\n return 1;\n }\n break;\n\n case 'b':\n {\n unsigned int hsize = atoi(optarg);\n if (hsize < 1)\n {\n fprintf(stderr,\n "Invalid history size %s\n",\n optarg);\n return 1;\n }\n Compressor_setHistory(cmp, hsize);\n break;\n }\n\n case 'x':\n swab = 1;\n break;\n case 'X':\n swab = 0;\n break;\n\n case 'h':\n showhelp(argv[0]);\n return 0;\n\n default:\n showhelp(argv[0]);\n return 1;\n }\n }\n\n#ifdef USE_ESD\n if (esd)\n {\n fd_in = fd_out = esd_filter_stream(\n ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n ESD_DEFAULT_RATE, esd_host, argv[0]);\n \n if (fd_in < 0) {\n fprintf(stderr, "esd connection failed\n");\n return 1;\n }\n } \n#endif\n\n // skip 44 byte way header\n read(fd_in, buf, 44);\n write(fd_out, buf, 44 );\n\n ofs = 0;\n while ((len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))) > 0)\n {\n int count = len/sizeof(int16_t);\n int used = count*sizeof(int16_t);\n \n if (swab)\n {\n int i;\n for (i = 0; i < count; i++)\n buf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);\n }\n\n if (count)\n {\n Compressor_Process_int16(cmp, buf, count);\n write(fd_out, buf, used);\n }\n \n //! Fix a read which generated an incomplete sample\n ofs = len - used; \n if (ofs)\n memmove(buf, buf + used, ofs);\n }\n\n if (len < 0)\n {\n perror("AudioCompress");\n return 1;\n }\n\n return 0;\n}\n\n//! I'd rather be using C++, what with scope-lifeime objects and so on. Sigh.\nint main(int argc, char *argv[])\n{\n struct Compressor *cmp = Compressor_new(0);\n int ret = Run(argc, argv, cmp);\n Compressor_delete(cmp);\n return ret;\n}\n" (comment) "/*! AudioCompress.c\n * Simple commandline audio compressor\n *\n * (c)2002-2007 busybee (http://beesbuzz.biz/)\n * Licensed under the terms of the LGPL. See the file COPYING for details.\n */" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <sys/types.h>\n" (#include) "#include" (system_lib_string) "<sys/types.h>" (preproc_include) "#include <errno.h>\n" (#include) "#include" (system_lib_string) "<errno.h>" (preproc_include) "#include <unistd.h>\n" (#include) "#include" (system_lib_string) "<unistd.h>" (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 "compress.h"\n" (#include) "#include" (string_literal) ""compress.h"" (") """ (string_content) "compress.h" (") """ (preproc_include) "#include "config.h"\n" (#include) "#include" (string_literal) ""config.h"" (") """ (string_content) "config.h" (") """ (preproc_ifdef) "#ifdef USE_ESD\n#include "esd.h"\n#endif" (#ifdef) "#ifdef" (identifier) "USE_ESD" (preproc_include) "#include "esd.h"\n" (#include) "#include" (string_literal) ""esd.h"" (") """ (string_content) "esd.h" (") """ (#endif) "#endif" (function_definition) "void showhelp(char *name)\n{\n fprintf(stderr, "Usage: %s [options] < raw_sample_in > raw_sample_out 2>log\n", name);\n fprintf(stderr, "\nOptions:\n");\n fprintf(stderr,\n "\t-t #\tSet the target signal level (1-32767; default: %d)\n",\n TARGET);\n fprintf(stderr,\n "\t-g #\tSet the maximum gain (1-255; default: %d)\n",\n GAINMAX);\n fprintf(stderr,\n "\t-s #\tSet the gain smoothing exponent (1-15; default: %d)\n",\n GAINSMOOTH);\n fprintf(stderr,\n "\t-b #\tSet the history length (default: %d)\n",\n BUCKETS);\n fprintf(stderr,\n "\t-x/-X \tEnable/disable byte swapping\n");\n\n#ifdef USE_ESD\n fprintf(stderr,\n "\t-e [host]\tConnect to esound daemon\n");\n#endif\n\n fprintf(stderr, "\t-h\tShow this usage information\n");\n}" (primitive_type) "void" (function_declarator) "showhelp(char *name)" (identifier) "showhelp" (parameter_list) "(char *name)" (() "(" (parameter_declaration) "char *name" (primitive_type) "char" (pointer_declarator) "*name" (*) "*" (identifier) "name" ()) ")" (compound_statement) "{\n fprintf(stderr, "Usage: %s [options] < raw_sample_in > raw_sample_out 2>log\n", name);\n fprintf(stderr, "\nOptions:\n");\n fprintf(stderr,\n "\t-t #\tSet the target signal level (1-32767; default: %d)\n",\n TARGET);\n fprintf(stderr,\n "\t-g #\tSet the maximum gain (1-255; default: %d)\n",\n GAINMAX);\n fprintf(stderr,\n "\t-s #\tSet the gain smoothing exponent (1-15; default: %d)\n",\n GAINSMOOTH);\n fprintf(stderr,\n "\t-b #\tSet the history length (default: %d)\n",\n BUCKETS);\n fprintf(stderr,\n "\t-x/-X \tEnable/disable byte swapping\n");\n\n#ifdef USE_ESD\n fprintf(stderr,\n "\t-e [host]\tConnect to esound daemon\n");\n#endif\n\n fprintf(stderr, "\t-h\tShow this usage information\n");\n}" ({) "{" (expression_statement) "fprintf(stderr, "Usage: %s [options] < raw_sample_in > raw_sample_out 2>log\n", name);" (call_expression) "fprintf(stderr, "Usage: %s [options] < raw_sample_in > raw_sample_out 2>log\n", name)" (identifier) "fprintf" (argument_list) "(stderr, "Usage: %s [options] < raw_sample_in > raw_sample_out 2>log\n", name)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""Usage: %s [options] < raw_sample_in > raw_sample_out 2>log\n"" (") """ (string_content) "Usage: %s [options] < raw_sample_in > raw_sample_out 2>log" (escape_sequence) "\n" (") """ (,) "," (identifier) "name" ()) ")" (;) ";" (expression_statement) "fprintf(stderr, "\nOptions:\n");" (call_expression) "fprintf(stderr, "\nOptions:\n")" (identifier) "fprintf" (argument_list) "(stderr, "\nOptions:\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""\nOptions:\n"" (") """ (escape_sequence) "\n" (string_content) "Options:" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fprintf(stderr,\n "\t-t #\tSet the target signal level (1-32767; default: %d)\n",\n TARGET);" (call_expression) "fprintf(stderr,\n "\t-t #\tSet the target signal level (1-32767; default: %d)\n",\n TARGET)" (identifier) "fprintf" (argument_list) "(stderr,\n "\t-t #\tSet the target signal level (1-32767; default: %d)\n",\n TARGET)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""\t-t #\tSet the target signal level (1-32767; default: %d)\n"" (") """ (escape_sequence) "\t" (string_content) "-t #" (escape_sequence) "\t" (string_content) "Set the target signal level (1-32767; default: %d)" (escape_sequence) "\n" (") """ (,) "," (identifier) "TARGET" ()) ")" (;) ";" (expression_statement) "fprintf(stderr,\n "\t-g #\tSet the maximum gain (1-255; default: %d)\n",\n GAINMAX);" (call_expression) "fprintf(stderr,\n "\t-g #\tSet the maximum gain (1-255; default: %d)\n",\n GAINMAX)" (identifier) "fprintf" (argument_list) "(stderr,\n "\t-g #\tSet the maximum gain (1-255; default: %d)\n",\n GAINMAX)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""\t-g #\tSet the maximum gain (1-255; default: %d)\n"" (") """ (escape_sequence) "\t" (string_content) "-g #" (escape_sequence) "\t" (string_content) "Set the maximum gain (1-255; default: %d)" (escape_sequence) "\n" (") """ (,) "," (identifier) "GAINMAX" ()) ")" (;) ";" (expression_statement) "fprintf(stderr,\n "\t-s #\tSet the gain smoothing exponent (1-15; default: %d)\n",\n GAINSMOOTH);" (call_expression) "fprintf(stderr,\n "\t-s #\tSet the gain smoothing exponent (1-15; default: %d)\n",\n GAINSMOOTH)" (identifier) "fprintf" (argument_list) "(stderr,\n "\t-s #\tSet the gain smoothing exponent (1-15; default: %d)\n",\n GAINSMOOTH)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""\t-s #\tSet the gain smoothing exponent (1-15; default: %d)\n"" (") """ (escape_sequence) "\t" (string_content) "-s #" (escape_sequence) "\t" (string_content) "Set the gain smoothing exponent (1-15; default: %d)" (escape_sequence) "\n" (") """ (,) "," (identifier) "GAINSMOOTH" ()) ")" (;) ";" (expression_statement) "fprintf(stderr,\n "\t-b #\tSet the history length (default: %d)\n",\n BUCKETS);" (call_expression) "fprintf(stderr,\n "\t-b #\tSet the history length (default: %d)\n",\n BUCKETS)" (identifier) "fprintf" (argument_list) "(stderr,\n "\t-b #\tSet the history length (default: %d)\n",\n BUCKETS)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""\t-b #\tSet the history length (default: %d)\n"" (") """ (escape_sequence) "\t" (string_content) "-b #" (escape_sequence) "\t" (string_content) "Set the history length (default: %d)" (escape_sequence) "\n" (") """ (,) "," (identifier) "BUCKETS" ()) ")" (;) ";" (expression_statement) "fprintf(stderr,\n "\t-x/-X \tEnable/disable byte swapping\n");" (call_expression) "fprintf(stderr,\n "\t-x/-X \tEnable/disable byte swapping\n")" (identifier) "fprintf" (argument_list) "(stderr,\n "\t-x/-X \tEnable/disable byte swapping\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""\t-x/-X \tEnable/disable byte swapping\n"" (") """ (escape_sequence) "\t" (string_content) "-x/-X " (escape_sequence) "\t" (string_content) "Enable/disable byte swapping" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (preproc_ifdef) "#ifdef USE_ESD\n fprintf(stderr,\n "\t-e [host]\tConnect to esound daemon\n");\n#endif" (#ifdef) "#ifdef" (identifier) "USE_ESD" (expression_statement) "fprintf(stderr,\n "\t-e [host]\tConnect to esound daemon\n");" (call_expression) "fprintf(stderr,\n "\t-e [host]\tConnect to esound daemon\n")" (identifier) "fprintf" (argument_list) "(stderr,\n "\t-e [host]\tConnect to esound daemon\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""\t-e [host]\tConnect to esound daemon\n"" (") """ (escape_sequence) "\t" (string_content) "-e [host]" (escape_sequence) "\t" (string_content) "Connect to esound daemon" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (#endif) "#endif" (expression_statement) "fprintf(stderr, "\t-h\tShow this usage information\n");" (call_expression) "fprintf(stderr, "\t-h\tShow this usage information\n")" (identifier) "fprintf" (argument_list) "(stderr, "\t-h\tShow this usage information\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""\t-h\tShow this usage information\n"" (") """ (escape_sequence) "\t" (string_content) "-h" (escape_sequence) "\t" (string_content) "Show this usage information" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}" (function_definition) "int Run(int argc, char *argv[], struct Compressor *cmp)\n{\n int16_t buf[4096];\n int ofs = 0, len;\n int opt;\n int swab = 0;\n#ifdef USE_ESD\n int esd = 0;\n char *esd_host = NULL;\n#endif\n struct CompressorConfig *cfg = Compressor_getConfig(cmp);\n int fd_in = fileno(stdin), fd_out = fileno(stdout);\n\n while ((opt = getopt(argc, argv,\n#ifdef USE_ESD\n "e:"\n#endif\n "t:g:s:b:xXh")) >= 0)\n {\n switch(opt)\n {\n#ifdef USE_ESD\n case 'e':\n esd = 1;\n esd_host = optarg;\n break;\n#endif\n case 't':\n cfg->target = atoi(optarg);\n if (cfg->target < 0 || cfg->target > 32767)\n {\n fprintf(stderr,\n "Invalid target level %s\n", optarg);\n return 1;\n }\n break;\n\n case 'g':\n cfg->maxgain = atoi(optarg);\n if (cfg->maxgain < 0 || cfg->maxgain > 255)\n {\n fprintf(stderr,\n "Invalid maximum gain %s\n", optarg);\n return 1;\n }\n break;\n\n case 's':\n cfg->smooth = atoi(optarg);\n if (cfg->smooth < 0 || cfg->smooth > 15)\n {\n fprintf(stderr,\n "Invalid smoothing value %s\n",\n optarg);\n return 1;\n }\n break;\n\n case 'b':\n {\n unsigned int hsize = atoi(optarg);\n if (hsize < 1)\n {\n fprintf(stderr,\n "Invalid history size %s\n",\n optarg);\n return 1;\n }\n Compressor_setHistory(cmp, hsize);\n break;\n }\n\n case 'x':\n swab = 1;\n break;\n case 'X':\n swab = 0;\n break;\n\n case 'h':\n showhelp(argv[0]);\n return 0;\n\n default:\n showhelp(argv[0]);\n return 1;\n }\n }\n\n#ifdef USE_ESD\n if (esd)\n {\n fd_in = fd_out = esd_filter_stream(\n ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n ESD_DEFAULT_RATE, esd_host, argv[0]);\n \n if (fd_in < 0) {\n fprintf(stderr, "esd connection failed\n");\n return 1;\n }\n } \n#endif\n\n // skip 44 byte way header\n read(fd_in, buf, 44);\n write(fd_out, buf, 44 );\n\n ofs = 0;\n while ((len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))) > 0)\n {\n int count = len/sizeof(int16_t);\n int used = count*sizeof(int16_t);\n \n if (swab)\n {\n int i;\n for (i = 0; i < count; i++)\n buf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);\n }\n\n if (count)\n {\n Compressor_Process_int16(cmp, buf, count);\n write(fd_out, buf, used);\n }\n \n //! Fix a read which generated an incomplete sample\n ofs = len - used; \n if (ofs)\n memmove(buf, buf + used, ofs);\n }\n\n if (len < 0)\n {\n perror("AudioCompress");\n return 1;\n }\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "Run(int argc, char *argv[], struct Compressor *cmp)" (identifier) "Run" (parameter_list) "(int argc, char *argv[], struct Compressor *cmp)" (() "(" (parameter_declaration) "int argc" (primitive_type) "int" (identifier) "argc" (,) "," (parameter_declaration) "char *argv[]" (primitive_type) "char" (pointer_declarator) "*argv[]" (*) "*" (array_declarator) "argv[]" (identifier) "argv" ([) "[" (]) "]" (,) "," (parameter_declaration) "struct Compressor *cmp" (struct_specifier) "struct Compressor" (struct) "struct" (type_identifier) "Compressor" (pointer_declarator) "*cmp" (*) "*" (identifier) "cmp" ()) ")" (compound_statement) "{\n int16_t buf[4096];\n int ofs = 0, len;\n int opt;\n int swab = 0;\n#ifdef USE_ESD\n int esd = 0;\n char *esd_host = NULL;\n#endif\n struct CompressorConfig *cfg = Compressor_getConfig(cmp);\n int fd_in = fileno(stdin), fd_out = fileno(stdout);\n\n while ((opt = getopt(argc, argv,\n#ifdef USE_ESD\n "e:"\n#endif\n "t:g:s:b:xXh")) >= 0)\n {\n switch(opt)\n {\n#ifdef USE_ESD\n case 'e':\n esd = 1;\n esd_host = optarg;\n break;\n#endif\n case 't':\n cfg->target = atoi(optarg);\n if (cfg->target < 0 || cfg->target > 32767)\n {\n fprintf(stderr,\n "Invalid target level %s\n", optarg);\n return 1;\n }\n break;\n\n case 'g':\n cfg->maxgain = atoi(optarg);\n if (cfg->maxgain < 0 || cfg->maxgain > 255)\n {\n fprintf(stderr,\n "Invalid maximum gain %s\n", optarg);\n return 1;\n }\n break;\n\n case 's':\n cfg->smooth = atoi(optarg);\n if (cfg->smooth < 0 || cfg->smooth > 15)\n {\n fprintf(stderr,\n "Invalid smoothing value %s\n",\n optarg);\n return 1;\n }\n break;\n\n case 'b':\n {\n unsigned int hsize = atoi(optarg);\n if (hsize < 1)\n {\n fprintf(stderr,\n "Invalid history size %s\n",\n optarg);\n return 1;\n }\n Compressor_setHistory(cmp, hsize);\n break;\n }\n\n case 'x':\n swab = 1;\n break;\n case 'X':\n swab = 0;\n break;\n\n case 'h':\n showhelp(argv[0]);\n return 0;\n\n default:\n showhelp(argv[0]);\n return 1;\n }\n }\n\n#ifdef USE_ESD\n if (esd)\n {\n fd_in = fd_out = esd_filter_stream(\n ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n ESD_DEFAULT_RATE, esd_host, argv[0]);\n \n if (fd_in < 0) {\n fprintf(stderr, "esd connection failed\n");\n return 1;\n }\n } \n#endif\n\n // skip 44 byte way header\n read(fd_in, buf, 44);\n write(fd_out, buf, 44 );\n\n ofs = 0;\n while ((len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))) > 0)\n {\n int count = len/sizeof(int16_t);\n int used = count*sizeof(int16_t);\n \n if (swab)\n {\n int i;\n for (i = 0; i < count; i++)\n buf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);\n }\n\n if (count)\n {\n Compressor_Process_int16(cmp, buf, count);\n write(fd_out, buf, used);\n }\n \n //! Fix a read which generated an incomplete sample\n ofs = len - used; \n if (ofs)\n memmove(buf, buf + used, ofs);\n }\n\n if (len < 0)\n {\n perror("AudioCompress");\n return 1;\n }\n\n return 0;\n}" ({) "{" (declaration) "int16_t buf[4096];" (primitive_type) "int16_t" (array_declarator) "buf[4096]" (identifier) "buf" ([) "[" (number_literal) "4096" (]) "]" (;) ";" (declaration) "int ofs = 0, len;" (primitive_type) "int" (init_declarator) "ofs = 0" (identifier) "ofs" (=) "=" (number_literal) "0" (,) "," (identifier) "len" (;) ";" (declaration) "int opt;" (primitive_type) "int" (identifier) "opt" (;) ";" (declaration) "int swab = 0;" (primitive_type) "int" (init_declarator) "swab = 0" (identifier) "swab" (=) "=" (number_literal) "0" (;) ";" (preproc_ifdef) "#ifdef USE_ESD\n int esd = 0;\n char *esd_host = NULL;\n#endif" (#ifdef) "#ifdef" (identifier) "USE_ESD" (declaration) "int esd = 0;" (primitive_type) "int" (init_declarator) "esd = 0" (identifier) "esd" (=) "=" (number_literal) "0" (;) ";" (declaration) "char *esd_host = NULL;" (primitive_type) "char" (init_declarator) "*esd_host = NULL" (pointer_declarator) "*esd_host" (*) "*" (identifier) "esd_host" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (#endif) "#endif" (declaration) "struct CompressorConfig *cfg = Compressor_getConfig(cmp);" (struct_specifier) "struct CompressorConfig" (struct) "struct" (type_identifier) "CompressorConfig" (init_declarator) "*cfg = Compressor_getConfig(cmp)" (pointer_declarator) "*cfg" (*) "*" (identifier) "cfg" (=) "=" (call_expression) "Compressor_getConfig(cmp)" (identifier) "Compressor_getConfig" (argument_list) "(cmp)" (() "(" (identifier) "cmp" ()) ")" (;) ";" (declaration) "int fd_in = fileno(stdin), fd_out = fileno(stdout);" (primitive_type) "int" (init_declarator) "fd_in = fileno(stdin)" (identifier) "fd_in" (=) "=" (call_expression) "fileno(stdin)" (identifier) "fileno" (argument_list) "(stdin)" (() "(" (identifier) "stdin" ()) ")" (,) "," (init_declarator) "fd_out = fileno(stdout)" (identifier) "fd_out" (=) "=" (call_expression) "fileno(stdout)" (identifier) "fileno" (argument_list) "(stdout)" (() "(" (identifier) "stdout" ()) ")" (;) ";" (while_statement) "while ((opt = getopt(argc, argv,\n#ifdef USE_ESD\n "e:"\n#endif\n "t:g:s:b:xXh")) >= 0)\n {\n switch(opt)\n {\n#ifdef USE_ESD\n case 'e':\n esd = 1;\n esd_host = optarg;\n break;\n#endif\n case 't':\n cfg->target = atoi(optarg);\n if (cfg->target < 0 || cfg->target > 32767)\n {\n fprintf(stderr,\n "Invalid target level %s\n", optarg);\n return 1;\n }\n break;\n\n case 'g':\n cfg->maxgain = atoi(optarg);\n if (cfg->maxgain < 0 || cfg->maxgain > 255)\n {\n fprintf(stderr,\n "Invalid maximum gain %s\n", optarg);\n return 1;\n }\n break;\n\n case 's':\n cfg->smooth = atoi(optarg);\n if (cfg->smooth < 0 || cfg->smooth > 15)\n {\n fprintf(stderr,\n "Invalid smoothing value %s\n",\n optarg);\n return 1;\n }\n break;\n\n case 'b':\n {\n unsigned int hsize = atoi(optarg);\n if (hsize < 1)\n {\n fprintf(stderr,\n "Invalid history size %s\n",\n optarg);\n return 1;\n }\n Compressor_setHistory(cmp, hsize);\n break;\n }\n\n case 'x':\n swab = 1;\n break;\n case 'X':\n swab = 0;\n break;\n\n case 'h':\n showhelp(argv[0]);\n return 0;\n\n default:\n showhelp(argv[0]);\n return 1;\n }\n }" (while) "while" (parenthesized_expression) "((opt = getopt(argc, argv,\n#ifdef USE_ESD\n "e:"\n#endif\n "t:g:s:b:xXh")) >= 0)" (() "(" (binary_expression) "(opt = getopt(argc, argv,\n#ifdef USE_ESD\n "e:"\n#endif\n "t:g:s:b:xXh")) >= 0" (parenthesized_expression) "(opt = getopt(argc, argv,\n#ifdef USE_ESD\n "e:"\n#endif\n "t:g:s:b:xXh"))" (() "(" (assignment_expression) "opt = getopt(argc, argv,\n#ifdef USE_ESD\n "e:"\n#endif\n "t:g:s:b:xXh")" (identifier) "opt" (=) "=" (call_expression) "getopt(argc, argv,\n#ifdef USE_ESD\n "e:"\n#endif\n "t:g:s:b:xXh")" (identifier) "getopt" (argument_list) "(argc, argv,\n#ifdef USE_ESD\n "e:"\n#endif\n "t:g:s:b:xXh")" (() "(" (identifier) "argc" (,) "," (identifier) "argv" (,) "," (ERROR) "#ifdef USE_ESD\n "e:"\n#endif" (#ifdef) "#ifdef" (concatenated_string) "USE_ESD\n "e:"" (identifier) "USE_ESD" (string_literal) ""e:"" (") """ (string_content) "e:" (") """ (#endif) "#endif" (string_literal) ""t:g:s:b:xXh"" (") """ (string_content) "t:g:s:b:xXh" (") """ ()) ")" ()) ")" (>=) ">=" (number_literal) "0" ()) ")" (compound_statement) "{\n switch(opt)\n {\n#ifdef USE_ESD\n case 'e':\n esd = 1;\n esd_host = optarg;\n break;\n#endif\n case 't':\n cfg->target = atoi(optarg);\n if (cfg->target < 0 || cfg->target > 32767)\n {\n fprintf(stderr,\n "Invalid target level %s\n", optarg);\n return 1;\n }\n break;\n\n case 'g':\n cfg->maxgain = atoi(optarg);\n if (cfg->maxgain < 0 || cfg->maxgain > 255)\n {\n fprintf(stderr,\n "Invalid maximum gain %s\n", optarg);\n return 1;\n }\n break;\n\n case 's':\n cfg->smooth = atoi(optarg);\n if (cfg->smooth < 0 || cfg->smooth > 15)\n {\n fprintf(stderr,\n "Invalid smoothing value %s\n",\n optarg);\n return 1;\n }\n break;\n\n case 'b':\n {\n unsigned int hsize = atoi(optarg);\n if (hsize < 1)\n {\n fprintf(stderr,\n "Invalid history size %s\n",\n optarg);\n return 1;\n }\n Compressor_setHistory(cmp, hsize);\n break;\n }\n\n case 'x':\n swab = 1;\n break;\n case 'X':\n swab = 0;\n break;\n\n case 'h':\n showhelp(argv[0]);\n return 0;\n\n default:\n showhelp(argv[0]);\n return 1;\n }\n }" ({) "{" (switch_statement) "switch(opt)\n {\n#ifdef USE_ESD\n case 'e':\n esd = 1;\n esd_host = optarg;\n break;\n#endif\n case 't':\n cfg->target = atoi(optarg);\n if (cfg->target < 0 || cfg->target > 32767)\n {\n fprintf(stderr,\n "Invalid target level %s\n", optarg);\n return 1;\n }\n break;\n\n case 'g':\n cfg->maxgain = atoi(optarg);\n if (cfg->maxgain < 0 || cfg->maxgain > 255)\n {\n fprintf(stderr,\n "Invalid maximum gain %s\n", optarg);\n return 1;\n }\n break;\n\n case 's':\n cfg->smooth = atoi(optarg);\n if (cfg->smooth < 0 || cfg->smooth > 15)\n {\n fprintf(stderr,\n "Invalid smoothing value %s\n",\n optarg);\n return 1;\n }\n break;\n\n case 'b':\n {\n unsigned int hsize = atoi(optarg);\n if (hsize < 1)\n {\n fprintf(stderr,\n "Invalid history size %s\n",\n optarg);\n return 1;\n }\n Compressor_setHistory(cmp, hsize);\n break;\n }\n\n case 'x':\n swab = 1;\n break;\n case 'X':\n swab = 0;\n break;\n\n case 'h':\n showhelp(argv[0]);\n return 0;\n\n default:\n showhelp(argv[0]);\n return 1;\n }" (switch) "switch" (parenthesized_expression) "(opt)" (() "(" (identifier) "opt" ()) ")" (compound_statement) "{\n#ifdef USE_ESD\n case 'e':\n esd = 1;\n esd_host = optarg;\n break;\n#endif\n case 't':\n cfg->target = atoi(optarg);\n if (cfg->target < 0 || cfg->target > 32767)\n {\n fprintf(stderr,\n "Invalid target level %s\n", optarg);\n return 1;\n }\n break;\n\n case 'g':\n cfg->maxgain = atoi(optarg);\n if (cfg->maxgain < 0 || cfg->maxgain > 255)\n {\n fprintf(stderr,\n "Invalid maximum gain %s\n", optarg);\n return 1;\n }\n break;\n\n case 's':\n cfg->smooth = atoi(optarg);\n if (cfg->smooth < 0 || cfg->smooth > 15)\n {\n fprintf(stderr,\n "Invalid smoothing value %s\n",\n optarg);\n return 1;\n }\n break;\n\n case 'b':\n {\n unsigned int hsize = atoi(optarg);\n if (hsize < 1)\n {\n fprintf(stderr,\n "Invalid history size %s\n",\n optarg);\n return 1;\n }\n Compressor_setHistory(cmp, hsize);\n break;\n }\n\n case 'x':\n swab = 1;\n break;\n case 'X':\n swab = 0;\n break;\n\n case 'h':\n showhelp(argv[0]);\n return 0;\n\n default:\n showhelp(argv[0]);\n return 1;\n }" ({) "{" (preproc_ifdef) "#ifdef USE_ESD\n case 'e':\n esd = 1;\n esd_host = optarg;\n break;\n#endif" (#ifdef) "#ifdef" (identifier) "USE_ESD" (case_statement) "case 'e':\n esd = 1;\n esd_host = optarg;\n break;" (case) "case" (char_literal) "'e'" (') "'" (character) "e" (') "'" (:) ":" (expression_statement) "esd = 1;" (assignment_expression) "esd = 1" (identifier) "esd" (=) "=" (number_literal) "1" (;) ";" (expression_statement) "esd_host = optarg;" (assignment_expression) "esd_host = optarg" (identifier) "esd_host" (=) "=" (identifier) "optarg" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (#endif) "#endif" (case_statement) "case 't':\n cfg->target = atoi(optarg);\n if (cfg->target < 0 || cfg->target > 32767)\n {\n fprintf(stderr,\n "Invalid target level %s\n", optarg);\n return 1;\n }\n break;" (case) "case" (char_literal) "'t'" (') "'" (character) "t" (') "'" (:) ":" (expression_statement) "cfg->target = atoi(optarg);" (assignment_expression) "cfg->target = atoi(optarg)" (field_expression) "cfg->target" (identifier) "cfg" (->) "->" (field_identifier) "target" (=) "=" (call_expression) "atoi(optarg)" (identifier) "atoi" (argument_list) "(optarg)" (() "(" (identifier) "optarg" ()) ")" (;) ";" (if_statement) "if (cfg->target < 0 || cfg->target > 32767)\n {\n fprintf(stderr,\n "Invalid target level %s\n", optarg);\n return 1;\n }" (if) "if" (parenthesized_expression) "(cfg->target < 0 || cfg->target > 32767)" (() "(" (binary_expression) "cfg->target < 0 || cfg->target > 32767" (binary_expression) "cfg->target < 0" (field_expression) "cfg->target" (identifier) "cfg" (->) "->" (field_identifier) "target" (<) "<" (number_literal) "0" (||) "||" (binary_expression) "cfg->target > 32767" (field_expression) "cfg->target" (identifier) "cfg" (->) "->" (field_identifier) "target" (>) ">" (number_literal) "32767" ()) ")" (compound_statement) "{\n fprintf(stderr,\n "Invalid target level %s\n", optarg);\n return 1;\n }" ({) "{" (expression_statement) "fprintf(stderr,\n "Invalid target level %s\n", optarg);" (call_expression) "fprintf(stderr,\n "Invalid target level %s\n", optarg)" (identifier) "fprintf" (argument_list) "(stderr,\n "Invalid target level %s\n", optarg)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""Invalid target level %s\n"" (") """ (string_content) "Invalid target level %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "optarg" ()) ")" (;) ";" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 'g':\n cfg->maxgain = atoi(optarg);\n if (cfg->maxgain < 0 || cfg->maxgain > 255)\n {\n fprintf(stderr,\n "Invalid maximum gain %s\n", optarg);\n return 1;\n }\n break;" (case) "case" (char_literal) "'g'" (') "'" (character) "g" (') "'" (:) ":" (expression_statement) "cfg->maxgain = atoi(optarg);" (assignment_expression) "cfg->maxgain = atoi(optarg)" (field_expression) "cfg->maxgain" (identifier) "cfg" (->) "->" (field_identifier) "maxgain" (=) "=" (call_expression) "atoi(optarg)" (identifier) "atoi" (argument_list) "(optarg)" (() "(" (identifier) "optarg" ()) ")" (;) ";" (if_statement) "if (cfg->maxgain < 0 || cfg->maxgain > 255)\n {\n fprintf(stderr,\n "Invalid maximum gain %s\n", optarg);\n return 1;\n }" (if) "if" (parenthesized_expression) "(cfg->maxgain < 0 || cfg->maxgain > 255)" (() "(" (binary_expression) "cfg->maxgain < 0 || cfg->maxgain > 255" (binary_expression) "cfg->maxgain < 0" (field_expression) "cfg->maxgain" (identifier) "cfg" (->) "->" (field_identifier) "maxgain" (<) "<" (number_literal) "0" (||) "||" (binary_expression) "cfg->maxgain > 255" (field_expression) "cfg->maxgain" (identifier) "cfg" (->) "->" (field_identifier) "maxgain" (>) ">" (number_literal) "255" ()) ")" (compound_statement) "{\n fprintf(stderr,\n "Invalid maximum gain %s\n", optarg);\n return 1;\n }" ({) "{" (expression_statement) "fprintf(stderr,\n "Invalid maximum gain %s\n", optarg);" (call_expression) "fprintf(stderr,\n "Invalid maximum gain %s\n", optarg)" (identifier) "fprintf" (argument_list) "(stderr,\n "Invalid maximum gain %s\n", optarg)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""Invalid maximum gain %s\n"" (") """ (string_content) "Invalid maximum gain %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "optarg" ()) ")" (;) ";" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 's':\n cfg->smooth = atoi(optarg);\n if (cfg->smooth < 0 || cfg->smooth > 15)\n {\n fprintf(stderr,\n "Invalid smoothing value %s\n",\n optarg);\n return 1;\n }\n break;" (case) "case" (char_literal) "'s'" (') "'" (character) "s" (') "'" (:) ":" (expression_statement) "cfg->smooth = atoi(optarg);" (assignment_expression) "cfg->smooth = atoi(optarg)" (field_expression) "cfg->smooth" (identifier) "cfg" (->) "->" (field_identifier) "smooth" (=) "=" (call_expression) "atoi(optarg)" (identifier) "atoi" (argument_list) "(optarg)" (() "(" (identifier) "optarg" ()) ")" (;) ";" (if_statement) "if (cfg->smooth < 0 || cfg->smooth > 15)\n {\n fprintf(stderr,\n "Invalid smoothing value %s\n",\n optarg);\n return 1;\n }" (if) "if" (parenthesized_expression) "(cfg->smooth < 0 || cfg->smooth > 15)" (() "(" (binary_expression) "cfg->smooth < 0 || cfg->smooth > 15" (binary_expression) "cfg->smooth < 0" (field_expression) "cfg->smooth" (identifier) "cfg" (->) "->" (field_identifier) "smooth" (<) "<" (number_literal) "0" (||) "||" (binary_expression) "cfg->smooth > 15" (field_expression) "cfg->smooth" (identifier) "cfg" (->) "->" (field_identifier) "smooth" (>) ">" (number_literal) "15" ()) ")" (compound_statement) "{\n fprintf(stderr,\n "Invalid smoothing value %s\n",\n optarg);\n return 1;\n }" ({) "{" (expression_statement) "fprintf(stderr,\n "Invalid smoothing value %s\n",\n optarg);" (call_expression) "fprintf(stderr,\n "Invalid smoothing value %s\n",\n optarg)" (identifier) "fprintf" (argument_list) "(stderr,\n "Invalid smoothing value %s\n",\n optarg)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""Invalid smoothing value %s\n"" (") """ (string_content) "Invalid smoothing value %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "optarg" ()) ")" (;) ";" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 'b':\n {\n unsigned int hsize = atoi(optarg);\n if (hsize < 1)\n {\n fprintf(stderr,\n "Invalid history size %s\n",\n optarg);\n return 1;\n }\n Compressor_setHistory(cmp, hsize);\n break;\n }" (case) "case" (char_literal) "'b'" (') "'" (character) "b" (') "'" (:) ":" (compound_statement) "{\n unsigned int hsize = atoi(optarg);\n if (hsize < 1)\n {\n fprintf(stderr,\n "Invalid history size %s\n",\n optarg);\n return 1;\n }\n Compressor_setHistory(cmp, hsize);\n break;\n }" ({) "{" (declaration) "unsigned int hsize = atoi(optarg);" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (init_declarator) "hsize = atoi(optarg)" (identifier) "hsize" (=) "=" (call_expression) "atoi(optarg)" (identifier) "atoi" (argument_list) "(optarg)" (() "(" (identifier) "optarg" ()) ")" (;) ";" (if_statement) "if (hsize < 1)\n {\n fprintf(stderr,\n "Invalid history size %s\n",\n optarg);\n return 1;\n }" (if) "if" (parenthesized_expression) "(hsize < 1)" (() "(" (binary_expression) "hsize < 1" (identifier) "hsize" (<) "<" (number_literal) "1" ()) ")" (compound_statement) "{\n fprintf(stderr,\n "Invalid history size %s\n",\n optarg);\n return 1;\n }" ({) "{" (expression_statement) "fprintf(stderr,\n "Invalid history size %s\n",\n optarg);" (call_expression) "fprintf(stderr,\n "Invalid history size %s\n",\n optarg)" (identifier) "fprintf" (argument_list) "(stderr,\n "Invalid history size %s\n",\n optarg)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""Invalid history size %s\n"" (") """ (string_content) "Invalid history size %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "optarg" ()) ")" (;) ";" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (expression_statement) "Compressor_setHistory(cmp, hsize);" (call_expression) "Compressor_setHistory(cmp, hsize)" (identifier) "Compressor_setHistory" (argument_list) "(cmp, hsize)" (() "(" (identifier) "cmp" (,) "," (identifier) "hsize" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (case_statement) "case 'x':\n swab = 1;\n break;" (case) "case" (char_literal) "'x'" (') "'" (character) "x" (') "'" (:) ":" (expression_statement) "swab = 1;" (assignment_expression) "swab = 1" (identifier) "swab" (=) "=" (number_literal) "1" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 'X':\n swab = 0;\n break;" (case) "case" (char_literal) "'X'" (') "'" (character) "X" (') "'" (:) ":" (expression_statement) "swab = 0;" (assignment_expression) "swab = 0" (identifier) "swab" (=) "=" (number_literal) "0" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 'h':\n showhelp(argv[0]);\n return 0;" (case) "case" (char_literal) "'h'" (') "'" (character) "h" (') "'" (:) ":" (expression_statement) "showhelp(argv[0]);" (call_expression) "showhelp(argv[0])" (identifier) "showhelp" (argument_list) "(argv[0])" (() "(" (subscript_expression) "argv[0]" (identifier) "argv" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (case_statement) "default:\n showhelp(argv[0]);\n return 1;" (default) "default" (:) ":" (expression_statement) "showhelp(argv[0]);" (call_expression) "showhelp(argv[0])" (identifier) "showhelp" (argument_list) "(argv[0])" (() "(" (subscript_expression) "argv[0]" (identifier) "argv" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (}) "}" (preproc_ifdef) "#ifdef USE_ESD\n if (esd)\n {\n fd_in = fd_out = esd_filter_stream(\n ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n ESD_DEFAULT_RATE, esd_host, argv[0]);\n \n if (fd_in < 0) {\n fprintf(stderr, "esd connection failed\n");\n return 1;\n }\n } \n#endif" (#ifdef) "#ifdef" (identifier) "USE_ESD" (if_statement) "if (esd)\n {\n fd_in = fd_out = esd_filter_stream(\n ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n ESD_DEFAULT_RATE, esd_host, argv[0]);\n \n if (fd_in < 0) {\n fprintf(stderr, "esd connection failed\n");\n return 1;\n }\n }" (if) "if" (parenthesized_expression) "(esd)" (() "(" (identifier) "esd" ()) ")" (compound_statement) "{\n fd_in = fd_out = esd_filter_stream(\n ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n ESD_DEFAULT_RATE, esd_host, argv[0]);\n \n if (fd_in < 0) {\n fprintf(stderr, "esd connection failed\n");\n return 1;\n }\n }" ({) "{" (expression_statement) "fd_in = fd_out = esd_filter_stream(\n ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n ESD_DEFAULT_RATE, esd_host, argv[0]);" (assignment_expression) "fd_in = fd_out = esd_filter_stream(\n ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n ESD_DEFAULT_RATE, esd_host, argv[0])" (identifier) "fd_in" (=) "=" (assignment_expression) "fd_out = esd_filter_stream(\n ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n ESD_DEFAULT_RATE, esd_host, argv[0])" (identifier) "fd_out" (=) "=" (call_expression) "esd_filter_stream(\n ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n ESD_DEFAULT_RATE, esd_host, argv[0])" (identifier) "esd_filter_stream" (argument_list) "(\n ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n ESD_DEFAULT_RATE, esd_host, argv[0])" (() "(" (binary_expression) "ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY" (binary_expression) "ESD_BITS16|ESD_STEREO|ESD_STREAM" (binary_expression) "ESD_BITS16|ESD_STEREO" (identifier) "ESD_BITS16" (|) "|" (identifier) "ESD_STEREO" (|) "|" (identifier) "ESD_STREAM" (|) "|" (identifier) "ESD_PLAY" (,) "," (identifier) "ESD_DEFAULT_RATE" (,) "," (identifier) "esd_host" (,) "," (subscript_expression) "argv[0]" (identifier) "argv" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (if_statement) "if (fd_in < 0) {\n fprintf(stderr, "esd connection failed\n");\n return 1;\n }" (if) "if" (parenthesized_expression) "(fd_in < 0)" (() "(" (binary_expression) "fd_in < 0" (identifier) "fd_in" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n fprintf(stderr, "esd connection failed\n");\n return 1;\n }" ({) "{" (expression_statement) "fprintf(stderr, "esd connection failed\n");" (call_expression) "fprintf(stderr, "esd connection failed\n")" (identifier) "fprintf" (argument_list) "(stderr, "esd connection failed\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""esd connection failed\n"" (") """ (string_content) "esd connection failed" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (}) "}" (#endif) "#endif" (comment) "// skip 44 byte way header" (expression_statement) "read(fd_in, buf, 44);" (call_expression) "read(fd_in, buf, 44)" (identifier) "read" (argument_list) "(fd_in, buf, 44)" (() "(" (identifier) "fd_in" (,) "," (identifier) "buf" (,) "," (number_literal) "44" ()) ")" (;) ";" (expression_statement) "write(fd_out, buf, 44 );" (call_expression) "write(fd_out, buf, 44 )" (identifier) "write" (argument_list) "(fd_out, buf, 44 )" (() "(" (identifier) "fd_out" (,) "," (identifier) "buf" (,) "," (number_literal) "44" ()) ")" (;) ";" (expression_statement) "ofs = 0;" (assignment_expression) "ofs = 0" (identifier) "ofs" (=) "=" (number_literal) "0" (;) ";" (while_statement) "while ((len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))) > 0)\n {\n int count = len/sizeof(int16_t);\n int used = count*sizeof(int16_t);\n \n if (swab)\n {\n int i;\n for (i = 0; i < count; i++)\n buf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);\n }\n\n if (count)\n {\n Compressor_Process_int16(cmp, buf, count);\n write(fd_out, buf, used);\n }\n \n //! Fix a read which generated an incomplete sample\n ofs = len - used; \n if (ofs)\n memmove(buf, buf + used, ofs);\n }" (while) "while" (parenthesized_expression) "((len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))) > 0)" (() "(" (binary_expression) "(len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))) > 0" (parenthesized_expression) "(len = read(fd_in, buf + ofs, 4096*sizeof(int16_t)))" (() "(" (assignment_expression) "len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))" (identifier) "len" (=) "=" (call_expression) "read(fd_in, buf + ofs, 4096*sizeof(int16_t))" (identifier) "read" (argument_list) "(fd_in, buf + ofs, 4096*sizeof(int16_t))" (() "(" (identifier) "fd_in" (,) "," (binary_expression) "buf + ofs" (identifier) "buf" (+) "+" (identifier) "ofs" (,) "," (binary_expression) "4096*sizeof(int16_t)" (number_literal) "4096" (*) "*" (sizeof_expression) "sizeof(int16_t)" (sizeof) "sizeof" (() "(" (type_descriptor) "int16_t" (primitive_type) "int16_t" ()) ")" ()) ")" ()) ")" (>) ">" (number_literal) "0" ()) ")" (compound_statement) "{\n int count = len/sizeof(int16_t);\n int used = count*sizeof(int16_t);\n \n if (swab)\n {\n int i;\n for (i = 0; i < count; i++)\n buf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);\n }\n\n if (count)\n {\n Compressor_Process_int16(cmp, buf, count);\n write(fd_out, buf, used);\n }\n \n //! Fix a read which generated an incomplete sample\n ofs = len - used; \n if (ofs)\n memmove(buf, buf + used, ofs);\n }" ({) "{" (declaration) "int count = len/sizeof(int16_t);" (primitive_type) "int" (init_declarator) "count = len/sizeof(int16_t)" (identifier) "count" (=) "=" (binary_expression) "len/sizeof(int16_t)" (identifier) "len" (/) "/" (sizeof_expression) "sizeof(int16_t)" (sizeof) "sizeof" (() "(" (type_descriptor) "int16_t" (primitive_type) "int16_t" ()) ")" (;) ";" (declaration) "int used = count*sizeof(int16_t);" (primitive_type) "int" (init_declarator) "used = count*sizeof(int16_t)" (identifier) "used" (=) "=" (binary_expression) "count*sizeof(int16_t)" (identifier) "count" (*) "*" (sizeof_expression) "sizeof(int16_t)" (sizeof) "sizeof" (() "(" (type_descriptor) "int16_t" (primitive_type) "int16_t" ()) ")" (;) ";" (if_statement) "if (swab)\n {\n int i;\n for (i = 0; i < count; i++)\n buf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);\n }" (if) "if" (parenthesized_expression) "(swab)" (() "(" (identifier) "swab" ()) ")" (compound_statement) "{\n int i;\n for (i = 0; i < count; i++)\n buf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);\n }" ({) "{" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (for_statement) "for (i = 0; i < count; i++)\n buf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < count" (identifier) "i" (<) "<" (identifier) "count" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (expression_statement) "buf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);" (assignment_expression) "buf[i] = ((buf[i]&255)<<8) | (buf[i]>>8)" (subscript_expression) "buf[i]" (identifier) "buf" ([) "[" (identifier) "i" (]) "]" (=) "=" (binary_expression) "((buf[i]&255)<<8) | (buf[i]>>8)" (parenthesized_expression) "((buf[i]&255)<<8)" (() "(" (binary_expression) "(buf[i]&255)<<8" (parenthesized_expression) "(buf[i]&255)" (() "(" (binary_expression) "buf[i]&255" (subscript_expression) "buf[i]" (identifier) "buf" ([) "[" (identifier) "i" (]) "]" (&) "&" (number_literal) "255" ()) ")" (<<) "<<" (number_literal) "8" ()) ")" (|) "|" (parenthesized_expression) "(buf[i]>>8)" (() "(" (binary_expression) "buf[i]>>8" (subscript_expression) "buf[i]" (identifier) "buf" ([) "[" (identifier) "i" (]) "]" (>>) ">>" (number_literal) "8" ()) ")" (;) ";" (}) "}" (if_statement) "if (count)\n {\n Compressor_Process_int16(cmp, buf, count);\n write(fd_out, buf, used);\n }" (if) "if" (parenthesized_expression) "(count)" (() "(" (identifier) "count" ()) ")" (compound_statement) "{\n Compressor_Process_int16(cmp, buf, count);\n write(fd_out, buf, used);\n }" ({) "{" (expression_statement) "Compressor_Process_int16(cmp, buf, count);" (call_expression) "Compressor_Process_int16(cmp, buf, count)" (identifier) "Compressor_Process_int16" (argument_list) "(cmp, buf, count)" (() "(" (identifier) "cmp" (,) "," (identifier) "buf" (,) "," (identifier) "count" ()) ")" (;) ";" (expression_statement) "write(fd_out, buf, used);" (call_expression) "write(fd_out, buf, used)" (identifier) "write" (argument_list) "(fd_out, buf, used)" (() "(" (identifier) "fd_out" (,) "," (identifier) "buf" (,) "," (identifier) "used" ()) ")" (;) ";" (}) "}" (comment) "//! Fix a read which generated an incomplete sample" (expression_statement) "ofs = len - used;" (assignment_expression) "ofs = len - used" (identifier) "ofs" (=) "=" (binary_expression) "len - used" (identifier) "len" (-) "-" (identifier) "used" (;) ";" (if_statement) "if (ofs)\n memmove(buf, buf + used, ofs);" (if) "if" (parenthesized_expression) "(ofs)" (() "(" (identifier) "ofs" ()) ")" (expression_statement) "memmove(buf, buf + used, ofs);" (call_expression) "memmove(buf, buf + used, ofs)" (identifier) "memmove" (argument_list) "(buf, buf + used, ofs)" (() "(" (identifier) "buf" (,) "," (binary_expression) "buf + used" (identifier) "buf" (+) "+" (identifier) "used" (,) "," (identifier) "ofs" ()) ")" (;) ";" (}) "}" (if_statement) "if (len < 0)\n {\n perror("AudioCompress");\n return 1;\n }" (if) "if" (parenthesized_expression) "(len < 0)" (() "(" (binary_expression) "len < 0" (identifier) "len" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n perror("AudioCompress");\n return 1;\n }" ({) "{" (expression_statement) "perror("AudioCompress");" (call_expression) "perror("AudioCompress")" (identifier) "perror" (argument_list) "("AudioCompress")" (() "(" (string_literal) ""AudioCompress"" (") """ (string_content) "AudioCompress" (") """ ()) ")" (;) ";" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (comment) "//! I'd rather be using C++, what with scope-lifeime objects and so on. Sigh." (function_definition) "int main(int argc, char *argv[])\n{\n struct Compressor *cmp = Compressor_new(0);\n int ret = Run(argc, argv, cmp);\n Compressor_delete(cmp);\n return ret;\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 Compressor *cmp = Compressor_new(0);\n int ret = Run(argc, argv, cmp);\n Compressor_delete(cmp);\n return ret;\n}" ({) "{" (declaration) "struct Compressor *cmp = Compressor_new(0);" (struct_specifier) "struct Compressor" (struct) "struct" (type_identifier) "Compressor" (init_declarator) "*cmp = Compressor_new(0)" (pointer_declarator) "*cmp" (*) "*" (identifier) "cmp" (=) "=" (call_expression) "Compressor_new(0)" (identifier) "Compressor_new" (argument_list) "(0)" (() "(" (number_literal) "0" ()) ")" (;) ";" (declaration) "int ret = Run(argc, argv, cmp);" (primitive_type) "int" (init_declarator) "ret = Run(argc, argv, cmp)" (identifier) "ret" (=) "=" (call_expression) "Run(argc, argv, cmp)" (identifier) "Run" (argument_list) "(argc, argv, cmp)" (() "(" (identifier) "argc" (,) "," (identifier) "argv" (,) "," (identifier) "cmp" ()) ")" (;) ";" (expression_statement) "Compressor_delete(cmp);" (call_expression) "Compressor_delete(cmp)" (identifier) "Compressor_delete" (argument_list) "(cmp)" (() "(" (identifier) "cmp" ()) ")" (;) ";" (return_statement) "return ret;" (return) "return" (identifier) "ret" (;) ";" (}) "}"
1,163
1
{"language": "c", "success": true, "metadata": {"lines": 176, "avg_line_length": 21.56, "nodes": 703, "errors": 0, "source_hash": "3b10bb4f72b0211b37987706cbba3728d2ed544b08bfdbf29d81e5017c651ec6", "categorized_nodes": 486}, "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 <sys/types.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": "<sys/types.h>", "parent": 3, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include <errno.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": "<errno.h>", "parent": 6, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <unistd.h>\n", "parent": null, "children": [10, 11], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<unistd.h>", "parent": 9, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [13, 14], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 12, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include <string.h>\n", "parent": null, "children": [16, 17], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<string.h>", "parent": 15, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 19}}, {"id": 18, "type": "preproc_include", "text": "#include \"compress.h\"\n", "parent": null, "children": [19, 20], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"compress.h\"", "parent": 18, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 21}}, {"id": 21, "type": "preproc_include", "text": "#include \"config.h\"\n", "parent": null, "children": [22, 23], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"config.h\"", "parent": 21, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 19}}, {"id": 24, "type": "preproc_ifdef", "text": "#ifdef USE_ESD\n#include \"esd.h\"\n#endif", "parent": null, "children": [25, 26, 27, 30], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 20, "column": 6}}, {"id": 25, "type": "#ifdef", "text": "#ifdef", "parent": 24, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}, {"id": 26, "type": "identifier", "text": "USE_ESD", "parent": 24, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 14}}, {"id": 27, "type": "preproc_include", "text": "#include \"esd.h\"\n", "parent": 24, "children": [28, 29], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"esd.h\"", "parent": 27, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 16}}, {"id": 30, "type": "#endif", "text": "#endif", "parent": 24, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 6}}, {"id": 31, "type": "function_definition", "text": "void showhelp(char *name)\n{\n\tfprintf(stderr, \"Usage: %s [options] < raw_sample_in > raw_sample_out 2>log\\n\", name);\n\tfprintf(stderr, \"\\nOptions:\\n\");\n\tfprintf(stderr,\n\t\t\"\\t-t #\\tSet the target signal level (1-32767; default: %d)\\n\",\n\t\tTARGET);\n\tfprintf(stderr,\n\t\t\"\\t-g #\\tSet the maximum gain (1-255; default: %d)\\n\",\n\t\tGAINMAX);\n\tfprintf(stderr,\n\t\t\"\\t-s #\\tSet the gain smoothing exponent (1-15; default: %d)\\n\",\n\t\tGAINSMOOTH);\n\tfprintf(stderr,\n\t\t\"\\t-b #\\tSet the history length (default: %d)\\n\",\n\t\tBUCKETS);\n\tfprintf(stderr,\n\t\t\"\\t-x/-X \\tEnable/disable byte swapping\\n\");\n\n#ifdef USE_ESD\n\tfprintf(stderr,\n\t\t\"\\t-e [host]\\tConnect to esound daemon\\n\");\n#endif\n\n\tfprintf(stderr, \"\\t-h\\tShow this usage information\\n\");\n}", "parent": null, "children": [32, 33], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 47, "column": 1}}, {"id": 32, "type": "primitive_type", "text": "void", "parent": 31, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 4}}, {"id": 33, "type": "function_declarator", "text": "showhelp(char *name)", "parent": 31, "children": [34, 35], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 25}}, {"id": 34, "type": "identifier", "text": "showhelp", "parent": 33, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 13}}, {"id": 35, "type": "parameter_list", "text": "(char *name)", "parent": 33, "children": [36], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 25}}, {"id": 36, "type": "parameter_declaration", "text": "char *name", "parent": 35, "children": [37, 38], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 24}}, {"id": 37, "type": "primitive_type", "text": "char", "parent": 36, "children": [], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 18}}, {"id": 38, "type": "pointer_declarator", "text": "*name", "parent": 36, "children": [39, 40], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 24}}, {"id": 39, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 20}}, {"id": 40, "type": "identifier", "text": "name", "parent": 38, "children": [], "start_point": {"row": 22, "column": 20}, "end_point": {"row": 22, "column": 24}}, {"id": 41, "type": "call_expression", "text": "fprintf(stderr, \"Usage: %s [options] < raw_sample_in > raw_sample_out 2>log\\n\", name)", "parent": 31, "children": [42, 43], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 86}}, {"id": 42, "type": "identifier", "text": "fprintf", "parent": 41, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 8}}, {"id": 43, "type": "argument_list", "text": "(stderr, \"Usage: %s [options] < raw_sample_in > raw_sample_out 2>log\\n\", name)", "parent": 41, "children": [44, 45, 47], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 86}}, {"id": 44, "type": "identifier", "text": "stderr", "parent": 43, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 15}}, {"id": 45, "type": "string_literal", "text": "\"Usage: %s [options] < raw_sample_in > raw_sample_out 2>log\\n\"", "parent": 43, "children": [46], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 79}}, {"id": 46, "type": "escape_sequence", "text": "\\n", "parent": 45, "children": [], "start_point": {"row": 24, "column": 76}, "end_point": {"row": 24, "column": 78}}, {"id": 47, "type": "identifier", "text": "name", "parent": 43, "children": [], "start_point": {"row": 24, "column": 81}, "end_point": {"row": 24, "column": 85}}, {"id": 48, "type": "call_expression", "text": "fprintf(stderr, \"\\nOptions:\\n\")", "parent": 31, "children": [49, 50], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 32}}, {"id": 49, "type": "identifier", "text": "fprintf", "parent": 48, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 8}}, {"id": 50, "type": "argument_list", "text": "(stderr, \"\\nOptions:\\n\")", "parent": 48, "children": [51, 52], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 32}}, {"id": 51, "type": "identifier", "text": "stderr", "parent": 50, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 15}}, {"id": 52, "type": "string_literal", "text": "\"\\nOptions:\\n\"", "parent": 50, "children": [53, 54], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 31}}, {"id": 53, "type": "escape_sequence", "text": "\\n", "parent": 52, "children": [], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 20}}, {"id": 54, "type": "escape_sequence", "text": "\\n", "parent": 52, "children": [], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 30}}, {"id": 55, "type": "call_expression", "text": "fprintf(stderr,\n\t\t\"\\t-t #\\tSet the target signal level (1-32767; default: %d)\\n\",\n\t\tTARGET)", "parent": 31, "children": [56, 57], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 28, "column": 9}}, {"id": 56, "type": "identifier", "text": "fprintf", "parent": 55, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 8}}, {"id": 57, "type": "argument_list", "text": "(stderr,\n\t\t\"\\t-t #\\tSet the target signal level (1-32767; default: %d)\\n\",\n\t\tTARGET)", "parent": 55, "children": [58, 59, 63], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 28, "column": 9}}, {"id": 58, "type": "identifier", "text": "stderr", "parent": 57, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 15}}, {"id": 59, "type": "string_literal", "text": "\"\\t-t #\\tSet the target signal level (1-32767; default: %d)\\n\"", "parent": 57, "children": [60, 61, 62], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 64}}, {"id": 60, "type": "escape_sequence", "text": "\\t", "parent": 59, "children": [], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 5}}, {"id": 61, "type": "escape_sequence", "text": "\\t", "parent": 59, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 11}}, {"id": 62, "type": "escape_sequence", "text": "\\n", "parent": 59, "children": [], "start_point": {"row": 27, "column": 61}, "end_point": {"row": 27, "column": 63}}, {"id": 63, "type": "identifier", "text": "TARGET", "parent": 57, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 8}}, {"id": 64, "type": "call_expression", "text": "fprintf(stderr,\n\t\t\"\\t-g #\\tSet the maximum gain (1-255; default: %d)\\n\",\n\t\tGAINMAX)", "parent": 31, "children": [65, 66], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 31, "column": 10}}, {"id": 65, "type": "identifier", "text": "fprintf", "parent": 64, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 8}}, {"id": 66, "type": "argument_list", "text": "(stderr,\n\t\t\"\\t-g #\\tSet the maximum gain (1-255; default: %d)\\n\",\n\t\tGAINMAX)", "parent": 64, "children": [67, 68, 72], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 31, "column": 10}}, {"id": 67, "type": "identifier", "text": "stderr", "parent": 66, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 15}}, {"id": 68, "type": "string_literal", "text": "\"\\t-g #\\tSet the maximum gain (1-255; default: %d)\\n\"", "parent": 66, "children": [69, 70, 71], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 55}}, {"id": 69, "type": "escape_sequence", "text": "\\t", "parent": 68, "children": [], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 30, "column": 5}}, {"id": 70, "type": "escape_sequence", "text": "\\t", "parent": 68, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 11}}, {"id": 71, "type": "escape_sequence", "text": "\\n", "parent": 68, "children": [], "start_point": {"row": 30, "column": 52}, "end_point": {"row": 30, "column": 54}}, {"id": 72, "type": "identifier", "text": "GAINMAX", "parent": 66, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 9}}, {"id": 73, "type": "call_expression", "text": "fprintf(stderr,\n\t\t\"\\t-s #\\tSet the gain smoothing exponent (1-15; default: %d)\\n\",\n\t\tGAINSMOOTH)", "parent": 31, "children": [74, 75], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 34, "column": 13}}, {"id": 74, "type": "identifier", "text": "fprintf", "parent": 73, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 8}}, {"id": 75, "type": "argument_list", "text": "(stderr,\n\t\t\"\\t-s #\\tSet the gain smoothing exponent (1-15; default: %d)\\n\",\n\t\tGAINSMOOTH)", "parent": 73, "children": [76, 77, 81], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 34, "column": 13}}, {"id": 76, "type": "identifier", "text": "stderr", "parent": 75, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 15}}, {"id": 77, "type": "string_literal", "text": "\"\\t-s #\\tSet the gain smoothing exponent (1-15; default: %d)\\n\"", "parent": 75, "children": [78, 79, 80], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 65}}, {"id": 78, "type": "escape_sequence", "text": "\\t", "parent": 77, "children": [], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 5}}, {"id": 79, "type": "escape_sequence", "text": "\\t", "parent": 77, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 11}}, {"id": 80, "type": "escape_sequence", "text": "\\n", "parent": 77, "children": [], "start_point": {"row": 33, "column": 62}, "end_point": {"row": 33, "column": 64}}, {"id": 81, "type": "identifier", "text": "GAINSMOOTH", "parent": 75, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 12}}, {"id": 82, "type": "call_expression", "text": "fprintf(stderr,\n\t\t\"\\t-b #\\tSet the history length (default: %d)\\n\",\n\t\tBUCKETS)", "parent": 31, "children": [83, 84], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 37, "column": 10}}, {"id": 83, "type": "identifier", "text": "fprintf", "parent": 82, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 8}}, {"id": 84, "type": "argument_list", "text": "(stderr,\n\t\t\"\\t-b #\\tSet the history length (default: %d)\\n\",\n\t\tBUCKETS)", "parent": 82, "children": [85, 86, 90], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 37, "column": 10}}, {"id": 85, "type": "identifier", "text": "stderr", "parent": 84, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 15}}, {"id": 86, "type": "string_literal", "text": "\"\\t-b #\\tSet the history length (default: %d)\\n\"", "parent": 84, "children": [87, 88, 89], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 50}}, {"id": 87, "type": "escape_sequence", "text": "\\t", "parent": 86, "children": [], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 5}}, {"id": 88, "type": "escape_sequence", "text": "\\t", "parent": 86, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 11}}, {"id": 89, "type": "escape_sequence", "text": "\\n", "parent": 86, "children": [], "start_point": {"row": 36, "column": 47}, "end_point": {"row": 36, "column": 49}}, {"id": 90, "type": "identifier", "text": "BUCKETS", "parent": 84, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 9}}, {"id": 91, "type": "call_expression", "text": "fprintf(stderr,\n\t\t\"\\t-x/-X \\tEnable/disable byte swapping\\n\")", "parent": 31, "children": [92, 93], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 39, "column": 45}}, {"id": 92, "type": "identifier", "text": "fprintf", "parent": 91, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 8}}, {"id": 93, "type": "argument_list", "text": "(stderr,\n\t\t\"\\t-x/-X \\tEnable/disable byte swapping\\n\")", "parent": 91, "children": [94, 95], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 39, "column": 45}}, {"id": 94, "type": "identifier", "text": "stderr", "parent": 93, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 15}}, {"id": 95, "type": "string_literal", "text": "\"\\t-x/-X \\tEnable/disable byte swapping\\n\"", "parent": 93, "children": [96, 97, 98], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 44}}, {"id": 96, "type": "escape_sequence", "text": "\\t", "parent": 95, "children": [], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 5}}, {"id": 97, "type": "escape_sequence", "text": "\\t", "parent": 95, "children": [], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 13}}, {"id": 98, "type": "escape_sequence", "text": "\\n", "parent": 95, "children": [], "start_point": {"row": 39, "column": 41}, "end_point": {"row": 39, "column": 43}}, {"id": 99, "type": "preproc_ifdef", "text": "#ifdef USE_ESD\n\tfprintf(stderr,\n\t\t\"\\t-e [host]\\tConnect to esound daemon\\n\");\n#endif", "parent": 31, "children": [100, 101, 110], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 44, "column": 6}}, {"id": 100, "type": "#ifdef", "text": "#ifdef", "parent": 99, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 6}}, {"id": 101, "type": "identifier", "text": "USE_ESD", "parent": 99, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 14}}, {"id": 102, "type": "call_expression", "text": "fprintf(stderr,\n\t\t\"\\t-e [host]\\tConnect to esound daemon\\n\")", "parent": 99, "children": [103, 104], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 43, "column": 44}}, {"id": 103, "type": "identifier", "text": "fprintf", "parent": 102, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 8}}, {"id": 104, "type": "argument_list", "text": "(stderr,\n\t\t\"\\t-e [host]\\tConnect to esound daemon\\n\")", "parent": 102, "children": [105, 106], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 43, "column": 44}}, {"id": 105, "type": "identifier", "text": "stderr", "parent": 104, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 15}}, {"id": 106, "type": "string_literal", "text": "\"\\t-e [host]\\tConnect to esound daemon\\n\"", "parent": 104, "children": [107, 108, 109], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 43}}, {"id": 107, "type": "escape_sequence", "text": "\\t", "parent": 106, "children": [], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 5}}, {"id": 108, "type": "escape_sequence", "text": "\\t", "parent": 106, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 16}}, {"id": 109, "type": "escape_sequence", "text": "\\n", "parent": 106, "children": [], "start_point": {"row": 43, "column": 40}, "end_point": {"row": 43, "column": 42}}, {"id": 110, "type": "#endif", "text": "#endif", "parent": 99, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 6}}, {"id": 111, "type": "call_expression", "text": "fprintf(stderr, \"\\t-h\\tShow this usage information\\n\")", "parent": 31, "children": [112, 113], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 55}}, {"id": 112, "type": "identifier", "text": "fprintf", "parent": 111, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 8}}, {"id": 113, "type": "argument_list", "text": "(stderr, \"\\t-h\\tShow this usage information\\n\")", "parent": 111, "children": [114, 115], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 55}}, {"id": 114, "type": "identifier", "text": "stderr", "parent": 113, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 15}}, {"id": 115, "type": "string_literal", "text": "\"\\t-h\\tShow this usage information\\n\"", "parent": 113, "children": [116, 117, 118], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 54}}, {"id": 116, "type": "escape_sequence", "text": "\\t", "parent": 115, "children": [], "start_point": {"row": 46, "column": 18}, "end_point": {"row": 46, "column": 20}}, {"id": 117, "type": "escape_sequence", "text": "\\t", "parent": 115, "children": [], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 24}}, {"id": 118, "type": "escape_sequence", "text": "\\n", "parent": 115, "children": [], "start_point": {"row": 46, "column": 51}, "end_point": {"row": 46, "column": 53}}, {"id": 119, "type": "function_definition", "text": "int Run(int argc, char *argv[], struct Compressor *cmp)\n{\n\tint16_t buf[4096];\n int ofs = 0, len;\n\tint opt;\n\tint swab = 0;\n#ifdef USE_ESD\n\tint esd = 0;\n\tchar *esd_host = NULL;\n#endif\n struct CompressorConfig *cfg = Compressor_getConfig(cmp);\n\tint fd_in = fileno(stdin), fd_out = fileno(stdout);\n\n\twhile ((opt = getopt(argc, argv,\n#ifdef USE_ESD\n\t\t\t\t\t\"e:\"\n#endif\n\t\t\t\t\t\"t:g:s:b:xXh\")) >= 0)\n\t{\n\t\tswitch(opt)\n\t\t{\n#ifdef USE_ESD\n\t\tcase 'e':\n\t\t\tesd = 1;\n\t\t\tesd_host = optarg;\n\t\t\tbreak;\n#endif\n\t\tcase 't':\n\t\t\tcfg->target = atoi(optarg);\n\t\t\tif (cfg->target < 0 || cfg->target > 32767)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid target level %s\\n\", optarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'g':\n\t\t\tcfg->maxgain = atoi(optarg);\n\t\t\tif (cfg->maxgain < 0 || cfg->maxgain > 255)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid maximum gain %s\\n\", optarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 's':\n\t\t\tcfg->smooth = atoi(optarg);\n\t\t\tif (cfg->smooth < 0 || cfg->smooth > 15)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid smoothing value %s\\n\",\n\t\t\t\t\toptarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'b':\n {\n\t\t\tunsigned int hsize = atoi(optarg);\n\t\t\tif (hsize < 1)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid history size %s\\n\",\n\t\t\t\t\toptarg);\n\t\t\t\treturn 1;\n\t\t\t}\n Compressor_setHistory(cmp, hsize);\n\t\t\tbreak;\n }\n\n\t\tcase 'x':\n\t\t\tswab = 1;\n\t\t\tbreak;\n\t\tcase 'X':\n\t\t\tswab = 0;\n\t\t\tbreak;\n\n\t\tcase 'h':\n\t\t\tshowhelp(argv[0]);\n\t\t\treturn 0;\n\n\t\tdefault:\n\t\t\tshowhelp(argv[0]);\n\t\t\treturn 1;\n\t\t}\n\t}\n\n#ifdef USE_ESD\n\tif (esd)\n {\n\t\tfd_in = fd_out = esd_filter_stream(\n\t\t\tESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n\t\t\tESD_DEFAULT_RATE, esd_host, argv[0]);\n\t\t\n\t\tif (fd_in < 0) {\n\t\t\tfprintf(stderr, \"esd connection failed\\n\");\n\t\t\treturn 1;\n\t\t}\n\t}\t\n#endif\n\n\t// skip 44 byte way header\n\tread(fd_in, buf, 44);\n\twrite(fd_out, buf, 44 );\n\n ofs = 0;\n\twhile ((len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))) > 0)\n\t{\n int count = len/sizeof(int16_t);\n int used = count*sizeof(int16_t);\n \n\t\tif (swab)\n\t\t{\n\t\t\tint i;\n\t\t\tfor (i = 0; i < count; i++)\n\t\t\t\tbuf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);\n\t\t}\n\n if (count)\n {\n Compressor_Process_int16(cmp, buf, count);\n write(fd_out, buf, used);\n }\n \n //! Fix a read which generated an incomplete sample\n ofs = len - used; \n if (ofs)\n memmove(buf, buf + used, ofs);\n\t}\n\n\tif (len < 0)\n\t{\n\t\tperror(\"AudioCompress\");\n\t\treturn 1;\n\t}\n\n\treturn 0;\n}", "parent": null, "children": [120, 121], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 188, "column": 1}}, {"id": 120, "type": "primitive_type", "text": "int", "parent": 119, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 3}}, {"id": 121, "type": "function_declarator", "text": "Run(int argc, char *argv[], struct Compressor *cmp)", "parent": 119, "children": [122, 123], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 55}}, {"id": 122, "type": "identifier", "text": "Run", "parent": 121, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 7}}, {"id": 123, "type": "parameter_list", "text": "(int argc, char *argv[], struct Compressor *cmp)", "parent": 121, "children": [124, 127, 133], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 55}}, {"id": 124, "type": "parameter_declaration", "text": "int argc", "parent": 123, "children": [125, 126], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 16}}, {"id": 125, "type": "primitive_type", "text": "int", "parent": 124, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 11}}, {"id": 126, "type": "identifier", "text": "argc", "parent": 124, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 16}}, {"id": 127, "type": "parameter_declaration", "text": "char *argv[]", "parent": 123, "children": [128, 129], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 30}}, {"id": 128, "type": "primitive_type", "text": "char", "parent": 127, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 22}}, {"id": 129, "type": "pointer_declarator", "text": "*argv[]", "parent": 127, "children": [130, 131], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 30}}, {"id": 130, "type": "*", "text": "*", "parent": 129, "children": [], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 24}}, {"id": 131, "type": "array_declarator", "text": "argv[]", "parent": 129, "children": [132], "start_point": {"row": 49, "column": 24}, "end_point": {"row": 49, "column": 30}}, {"id": 132, "type": "identifier", "text": "argv", "parent": 131, "children": [], "start_point": {"row": 49, "column": 24}, "end_point": {"row": 49, "column": 28}}, {"id": 133, "type": "parameter_declaration", "text": "struct Compressor *cmp", "parent": 123, "children": [134, 137], "start_point": {"row": 49, "column": 32}, "end_point": {"row": 49, "column": 54}}, {"id": 134, "type": "struct_specifier", "text": "struct Compressor", "parent": 133, "children": [135, 136], "start_point": {"row": 49, "column": 32}, "end_point": {"row": 49, "column": 49}}, {"id": 135, "type": "struct", "text": "struct", "parent": 134, "children": [], "start_point": {"row": 49, "column": 32}, "end_point": {"row": 49, "column": 38}}, {"id": 136, "type": "type_identifier", "text": "Compressor", "parent": 134, "children": [], "start_point": {"row": 49, "column": 39}, "end_point": {"row": 49, "column": 49}}, {"id": 137, "type": "pointer_declarator", "text": "*cmp", "parent": 133, "children": [138, 139], "start_point": {"row": 49, "column": 50}, "end_point": {"row": 49, "column": 54}}, {"id": 138, "type": "*", "text": "*", "parent": 137, "children": [], "start_point": {"row": 49, "column": 50}, "end_point": {"row": 49, "column": 51}}, {"id": 139, "type": "identifier", "text": "cmp", "parent": 137, "children": [], "start_point": {"row": 49, "column": 51}, "end_point": {"row": 49, "column": 54}}, {"id": 140, "type": "declaration", "text": "int16_t buf[4096];", "parent": 119, "children": [141, 142], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 19}}, {"id": 141, "type": "primitive_type", "text": "int16_t", "parent": 140, "children": [], "start_point": {"row": 51, "column": 1}, "end_point": {"row": 51, "column": 8}}, {"id": 142, "type": "array_declarator", "text": "buf[4096]", "parent": 140, "children": [143, 144], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 18}}, {"id": 143, "type": "identifier", "text": "buf", "parent": 142, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 12}}, {"id": 144, "type": "number_literal", "text": "4096", "parent": 142, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 17}}, {"id": 145, "type": "declaration", "text": "int ofs = 0, len;", "parent": 119, "children": [146, 147, 151], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 25}}, {"id": 146, "type": "primitive_type", "text": "int", "parent": 145, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 11}}, {"id": 147, "type": "init_declarator", "text": "ofs = 0", "parent": 145, "children": [148, 149, 150], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 19}}, {"id": 148, "type": "identifier", "text": "ofs", "parent": 147, "children": [], "start_point": {"row": 52, "column": 12}, "end_point": {"row": 52, "column": 15}}, {"id": 149, "type": "=", "text": "=", "parent": 147, "children": [], "start_point": {"row": 52, "column": 16}, "end_point": {"row": 52, "column": 17}}, {"id": 150, "type": "number_literal", "text": "0", "parent": 147, "children": [], "start_point": {"row": 52, "column": 18}, "end_point": {"row": 52, "column": 19}}, {"id": 151, "type": "identifier", "text": "len", "parent": 145, "children": [], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 24}}, {"id": 152, "type": "declaration", "text": "int opt;", "parent": 119, "children": [153, 154], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 9}}, {"id": 153, "type": "primitive_type", "text": "int", "parent": 152, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 4}}, {"id": 154, "type": "identifier", "text": "opt", "parent": 152, "children": [], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 8}}, {"id": 155, "type": "declaration", "text": "int swab = 0;", "parent": 119, "children": [156, 157], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 14}}, {"id": 156, "type": "primitive_type", "text": "int", "parent": 155, "children": [], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 54, "column": 4}}, {"id": 157, "type": "init_declarator", "text": "swab = 0", "parent": 155, "children": [158, 159, 160], "start_point": {"row": 54, "column": 5}, "end_point": {"row": 54, "column": 13}}, {"id": 158, "type": "identifier", "text": "swab", "parent": 157, "children": [], "start_point": {"row": 54, "column": 5}, "end_point": {"row": 54, "column": 9}}, {"id": 159, "type": "=", "text": "=", "parent": 157, "children": [], "start_point": {"row": 54, "column": 10}, "end_point": {"row": 54, "column": 11}}, {"id": 160, "type": "number_literal", "text": "0", "parent": 157, "children": [], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 13}}, {"id": 161, "type": "preproc_ifdef", "text": "#ifdef USE_ESD\n\tint esd = 0;\n\tchar *esd_host = NULL;\n#endif", "parent": 119, "children": [162, 163, 164, 170, 179], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 58, "column": 6}}, {"id": 162, "type": "#ifdef", "text": "#ifdef", "parent": 161, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 6}}, {"id": 163, "type": "identifier", "text": "USE_ESD", "parent": 161, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 14}}, {"id": 164, "type": "declaration", "text": "int esd = 0;", "parent": 161, "children": [165, 166], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 13}}, {"id": 165, "type": "primitive_type", "text": "int", "parent": 164, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 4}}, {"id": 166, "type": "init_declarator", "text": "esd = 0", "parent": 164, "children": [167, 168, 169], "start_point": {"row": 56, "column": 5}, "end_point": {"row": 56, "column": 12}}, {"id": 167, "type": "identifier", "text": "esd", "parent": 166, "children": [], "start_point": {"row": 56, "column": 5}, "end_point": {"row": 56, "column": 8}}, {"id": 168, "type": "=", "text": "=", "parent": 166, "children": [], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 10}}, {"id": 169, "type": "number_literal", "text": "0", "parent": 166, "children": [], "start_point": {"row": 56, "column": 11}, "end_point": {"row": 56, "column": 12}}, {"id": 170, "type": "declaration", "text": "char *esd_host = NULL;", "parent": 161, "children": [171, 172], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 23}}, {"id": 171, "type": "primitive_type", "text": "char", "parent": 170, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 5}}, {"id": 172, "type": "init_declarator", "text": "*esd_host = NULL", "parent": 170, "children": [173, 176, 177], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 22}}, {"id": 173, "type": "pointer_declarator", "text": "*esd_host", "parent": 172, "children": [174, 175], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 15}}, {"id": 174, "type": "*", "text": "*", "parent": 173, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 7}}, {"id": 175, "type": "identifier", "text": "esd_host", "parent": 173, "children": [], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 15}}, {"id": 176, "type": "=", "text": "=", "parent": 172, "children": [], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 17}}, {"id": 177, "type": "null", "text": "NULL", "parent": 172, "children": [178], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 22}}, {"id": 178, "type": "NULL", "text": "NULL", "parent": 177, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 22}}, {"id": 179, "type": "#endif", "text": "#endif", "parent": 161, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 6}}, {"id": 180, "type": "declaration", "text": "struct CompressorConfig *cfg = Compressor_getConfig(cmp);", "parent": 119, "children": [181, 184], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 65}}, {"id": 181, "type": "struct_specifier", "text": "struct CompressorConfig", "parent": 180, "children": [182, 183], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 31}}, {"id": 182, "type": "struct", "text": "struct", "parent": 181, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 14}}, {"id": 183, "type": "type_identifier", "text": "CompressorConfig", "parent": 181, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 31}}, {"id": 184, "type": "init_declarator", "text": "*cfg = Compressor_getConfig(cmp)", "parent": 180, "children": [185, 188, 189], "start_point": {"row": 59, "column": 32}, "end_point": {"row": 59, "column": 64}}, {"id": 185, "type": "pointer_declarator", "text": "*cfg", "parent": 184, "children": [186, 187], "start_point": {"row": 59, "column": 32}, "end_point": {"row": 59, "column": 36}}, {"id": 186, "type": "*", "text": "*", "parent": 185, "children": [], "start_point": {"row": 59, "column": 32}, "end_point": {"row": 59, "column": 33}}, {"id": 187, "type": "identifier", "text": "cfg", "parent": 185, "children": [], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 36}}, {"id": 188, "type": "=", "text": "=", "parent": 184, "children": [], "start_point": {"row": 59, "column": 37}, "end_point": {"row": 59, "column": 38}}, {"id": 189, "type": "call_expression", "text": "Compressor_getConfig(cmp)", "parent": 184, "children": [190, 191], "start_point": {"row": 59, "column": 39}, "end_point": {"row": 59, "column": 64}}, {"id": 190, "type": "identifier", "text": "Compressor_getConfig", "parent": 189, "children": [], "start_point": {"row": 59, "column": 39}, "end_point": {"row": 59, "column": 59}}, {"id": 191, "type": "argument_list", "text": "(cmp)", "parent": 189, "children": [192], "start_point": {"row": 59, "column": 59}, "end_point": {"row": 59, "column": 64}}, {"id": 192, "type": "identifier", "text": "cmp", "parent": 191, "children": [], "start_point": {"row": 59, "column": 60}, "end_point": {"row": 59, "column": 63}}, {"id": 193, "type": "declaration", "text": "int fd_in = fileno(stdin), fd_out = fileno(stdout);", "parent": 119, "children": [194, 195, 202], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 52}}, {"id": 194, "type": "primitive_type", "text": "int", "parent": 193, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 4}}, {"id": 195, "type": "init_declarator", "text": "fd_in = fileno(stdin)", "parent": 193, "children": [196, 197, 198], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 26}}, {"id": 196, "type": "identifier", "text": "fd_in", "parent": 195, "children": [], "start_point": {"row": 60, "column": 5}, "end_point": {"row": 60, "column": 10}}, {"id": 197, "type": "=", "text": "=", "parent": 195, "children": [], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 12}}, {"id": 198, "type": "call_expression", "text": "fileno(stdin)", "parent": 195, "children": [199, 200], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 26}}, {"id": 199, "type": "identifier", "text": "fileno", "parent": 198, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 19}}, {"id": 200, "type": "argument_list", "text": "(stdin)", "parent": 198, "children": [201], "start_point": {"row": 60, "column": 19}, "end_point": {"row": 60, "column": 26}}, {"id": 201, "type": "identifier", "text": "stdin", "parent": 200, "children": [], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 25}}, {"id": 202, "type": "init_declarator", "text": "fd_out = fileno(stdout)", "parent": 193, "children": [203, 204, 205], "start_point": {"row": 60, "column": 28}, "end_point": {"row": 60, "column": 51}}, {"id": 203, "type": "identifier", "text": "fd_out", "parent": 202, "children": [], "start_point": {"row": 60, "column": 28}, "end_point": {"row": 60, "column": 34}}, {"id": 204, "type": "=", "text": "=", "parent": 202, "children": [], "start_point": {"row": 60, "column": 35}, "end_point": {"row": 60, "column": 36}}, {"id": 205, "type": "call_expression", "text": "fileno(stdout)", "parent": 202, "children": [206, 207], "start_point": {"row": 60, "column": 37}, "end_point": {"row": 60, "column": 51}}, {"id": 206, "type": "identifier", "text": "fileno", "parent": 205, "children": [], "start_point": {"row": 60, "column": 37}, "end_point": {"row": 60, "column": 43}}, {"id": 207, "type": "argument_list", "text": "(stdout)", "parent": 205, "children": [208], "start_point": {"row": 60, "column": 43}, "end_point": {"row": 60, "column": 51}}, {"id": 208, "type": "identifier", "text": "stdout", "parent": 207, "children": [], "start_point": {"row": 60, "column": 44}, "end_point": {"row": 60, "column": 50}}, {"id": 209, "type": "while_statement", "text": "while ((opt = getopt(argc, argv,\n#ifdef USE_ESD\n\t\t\t\t\t\"e:\"\n#endif\n\t\t\t\t\t\"t:g:s:b:xXh\")) >= 0)\n\t{\n\t\tswitch(opt)\n\t\t{\n#ifdef USE_ESD\n\t\tcase 'e':\n\t\t\tesd = 1;\n\t\t\tesd_host = optarg;\n\t\t\tbreak;\n#endif\n\t\tcase 't':\n\t\t\tcfg->target = atoi(optarg);\n\t\t\tif (cfg->target < 0 || cfg->target > 32767)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid target level %s\\n\", optarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'g':\n\t\t\tcfg->maxgain = atoi(optarg);\n\t\t\tif (cfg->maxgain < 0 || cfg->maxgain > 255)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid maximum gain %s\\n\", optarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 's':\n\t\t\tcfg->smooth = atoi(optarg);\n\t\t\tif (cfg->smooth < 0 || cfg->smooth > 15)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid smoothing value %s\\n\",\n\t\t\t\t\toptarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'b':\n {\n\t\t\tunsigned int hsize = atoi(optarg);\n\t\t\tif (hsize < 1)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid history size %s\\n\",\n\t\t\t\t\toptarg);\n\t\t\t\treturn 1;\n\t\t\t}\n Compressor_setHistory(cmp, hsize);\n\t\t\tbreak;\n }\n\n\t\tcase 'x':\n\t\t\tswab = 1;\n\t\t\tbreak;\n\t\tcase 'X':\n\t\t\tswab = 0;\n\t\t\tbreak;\n\n\t\tcase 'h':\n\t\t\tshowhelp(argv[0]);\n\t\t\treturn 0;\n\n\t\tdefault:\n\t\t\tshowhelp(argv[0]);\n\t\t\treturn 1;\n\t\t}\n\t}", "parent": 119, "children": [210], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 136, "column": 2}}, {"id": 210, "type": "parenthesized_expression", "text": "((opt = getopt(argc, argv,\n#ifdef USE_ESD\n\t\t\t\t\t\"e:\"\n#endif\n\t\t\t\t\t\"t:g:s:b:xXh\")) >= 0)", "parent": 209, "children": [211], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 66, "column": 26}}, {"id": 211, "type": "binary_expression", "text": "(opt = getopt(argc, argv,\n#ifdef USE_ESD\n\t\t\t\t\t\"e:\"\n#endif\n\t\t\t\t\t\"t:g:s:b:xXh\")) >= 0", "parent": 210, "children": [212, 228, 229], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 66, "column": 25}}, {"id": 212, "type": "parenthesized_expression", "text": "(opt = getopt(argc, argv,\n#ifdef USE_ESD\n\t\t\t\t\t\"e:\"\n#endif\n\t\t\t\t\t\"t:g:s:b:xXh\"))", "parent": 211, "children": [213], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 66, "column": 20}}, {"id": 213, "type": "assignment_expression", "text": "opt = getopt(argc, argv,\n#ifdef USE_ESD\n\t\t\t\t\t\"e:\"\n#endif\n\t\t\t\t\t\"t:g:s:b:xXh\")", "parent": 212, "children": [214, 215, 216], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 66, "column": 19}}, {"id": 214, "type": "identifier", "text": "opt", "parent": 213, "children": [], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 12}}, {"id": 215, "type": "=", "text": "=", "parent": 213, "children": [], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 14}}, {"id": 216, "type": "call_expression", "text": "getopt(argc, argv,\n#ifdef USE_ESD\n\t\t\t\t\t\"e:\"\n#endif\n\t\t\t\t\t\"t:g:s:b:xXh\")", "parent": 213, "children": [217, 218], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 66, "column": 19}}, {"id": 217, "type": "identifier", "text": "getopt", "parent": 216, "children": [], "start_point": {"row": 62, "column": 15}, "end_point": {"row": 62, "column": 21}}, {"id": 218, "type": "argument_list", "text": "(argc, argv,\n#ifdef USE_ESD\n\t\t\t\t\t\"e:\"\n#endif\n\t\t\t\t\t\"t:g:s:b:xXh\")", "parent": 216, "children": [219, 220, 221, 227], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 66, "column": 19}}, {"id": 219, "type": "identifier", "text": "argc", "parent": 218, "children": [], "start_point": {"row": 62, "column": 22}, "end_point": {"row": 62, "column": 26}}, {"id": 220, "type": "identifier", "text": "argv", "parent": 218, "children": [], "start_point": {"row": 62, "column": 28}, "end_point": {"row": 62, "column": 32}}, {"id": 221, "type": "ERROR", "text": "#ifdef USE_ESD\n\t\t\t\t\t\"e:\"\n#endif", "parent": 218, "children": [222, 223, 226], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 65, "column": 6}}, {"id": 222, "type": "#ifdef", "text": "#ifdef", "parent": 221, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 6}}, {"id": 223, "type": "concatenated_string", "text": "USE_ESD\n\t\t\t\t\t\"e:\"", "parent": 221, "children": [224, 225], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 64, "column": 9}}, {"id": 224, "type": "identifier", "text": "USE_ESD", "parent": 223, "children": [], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 14}}, {"id": 225, "type": "string_literal", "text": "\"e:\"", "parent": 223, "children": [], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 9}}, {"id": 226, "type": "#endif", "text": "#endif", "parent": 221, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 6}}, {"id": 227, "type": "string_literal", "text": "\"t:g:s:b:xXh\"", "parent": 218, "children": [], "start_point": {"row": 66, "column": 5}, "end_point": {"row": 66, "column": 18}}, {"id": 228, "type": ">=", "text": ">=", "parent": 211, "children": [], "start_point": {"row": 66, "column": 21}, "end_point": {"row": 66, "column": 23}}, {"id": 229, "type": "number_literal", "text": "0", "parent": 211, "children": [], "start_point": {"row": 66, "column": 24}, "end_point": {"row": 66, "column": 25}}, {"id": 230, "type": "switch_statement", "text": "switch(opt)\n\t\t{\n#ifdef USE_ESD\n\t\tcase 'e':\n\t\t\tesd = 1;\n\t\t\tesd_host = optarg;\n\t\t\tbreak;\n#endif\n\t\tcase 't':\n\t\t\tcfg->target = atoi(optarg);\n\t\t\tif (cfg->target < 0 || cfg->target > 32767)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid target level %s\\n\", optarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'g':\n\t\t\tcfg->maxgain = atoi(optarg);\n\t\t\tif (cfg->maxgain < 0 || cfg->maxgain > 255)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid maximum gain %s\\n\", optarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 's':\n\t\t\tcfg->smooth = atoi(optarg);\n\t\t\tif (cfg->smooth < 0 || cfg->smooth > 15)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid smoothing value %s\\n\",\n\t\t\t\t\toptarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'b':\n {\n\t\t\tunsigned int hsize = atoi(optarg);\n\t\t\tif (hsize < 1)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid history size %s\\n\",\n\t\t\t\t\toptarg);\n\t\t\t\treturn 1;\n\t\t\t}\n Compressor_setHistory(cmp, hsize);\n\t\t\tbreak;\n }\n\n\t\tcase 'x':\n\t\t\tswab = 1;\n\t\t\tbreak;\n\t\tcase 'X':\n\t\t\tswab = 0;\n\t\t\tbreak;\n\n\t\tcase 'h':\n\t\t\tshowhelp(argv[0]);\n\t\t\treturn 0;\n\n\t\tdefault:\n\t\t\tshowhelp(argv[0]);\n\t\t\treturn 1;\n\t\t}", "parent": 209, "children": [231, 232], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 135, "column": 3}}, {"id": 231, "type": "switch", "text": "switch", "parent": 230, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 8}}, {"id": 232, "type": "parenthesized_expression", "text": "(opt)", "parent": 230, "children": [233], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 13}}, {"id": 233, "type": "identifier", "text": "opt", "parent": 232, "children": [], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 12}}, {"id": 234, "type": "preproc_ifdef", "text": "#ifdef USE_ESD\n\t\tcase 'e':\n\t\t\tesd = 1;\n\t\t\tesd_host = optarg;\n\t\t\tbreak;\n#endif", "parent": 230, "children": [235, 236, 237, 253], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 75, "column": 6}}, {"id": 235, "type": "#ifdef", "text": "#ifdef", "parent": 234, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 6}}, {"id": 236, "type": "identifier", "text": "USE_ESD", "parent": 234, "children": [], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 14}}, {"id": 237, "type": "case_statement", "text": "case 'e':\n\t\t\tesd = 1;\n\t\t\tesd_host = optarg;\n\t\t\tbreak;", "parent": 234, "children": [238, 239, 251], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 74, "column": 9}}, {"id": 238, "type": "case", "text": "case", "parent": 237, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 6}}, {"id": 239, "type": "char_literal", "text": "'e'", "parent": 237, "children": [240, 241, 242], "start_point": {"row": 71, "column": 7}, "end_point": {"row": 71, "column": 10}}, {"id": 240, "type": "'", "text": "'", "parent": 239, "children": [], "start_point": {"row": 71, "column": 7}, "end_point": {"row": 71, "column": 8}}, {"id": 241, "type": "character", "text": "e", "parent": 239, "children": [], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 9}}, {"id": 242, "type": "'", "text": "'", "parent": 239, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 10}}, {"id": 243, "type": "assignment_expression", "text": "esd = 1", "parent": 237, "children": [244, 245, 246], "start_point": {"row": 72, "column": 3}, "end_point": {"row": 72, "column": 10}}, {"id": 244, "type": "identifier", "text": "esd", "parent": 243, "children": [], "start_point": {"row": 72, "column": 3}, "end_point": {"row": 72, "column": 6}}, {"id": 245, "type": "=", "text": "=", "parent": 243, "children": [], "start_point": {"row": 72, "column": 7}, "end_point": {"row": 72, "column": 8}}, {"id": 246, "type": "number_literal", "text": "1", "parent": 243, "children": [], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 10}}, {"id": 247, "type": "assignment_expression", "text": "esd_host = optarg", "parent": 237, "children": [248, 249, 250], "start_point": {"row": 73, "column": 3}, "end_point": {"row": 73, "column": 20}}, {"id": 248, "type": "identifier", "text": "esd_host", "parent": 247, "children": [], "start_point": {"row": 73, "column": 3}, "end_point": {"row": 73, "column": 11}}, {"id": 249, "type": "=", "text": "=", "parent": 247, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 13}}, {"id": 250, "type": "identifier", "text": "optarg", "parent": 247, "children": [], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 20}}, {"id": 251, "type": "break_statement", "text": "break;", "parent": 237, "children": [252], "start_point": {"row": 74, "column": 3}, "end_point": {"row": 74, "column": 9}}, {"id": 252, "type": "break", "text": "break", "parent": 251, "children": [], "start_point": {"row": 74, "column": 3}, "end_point": {"row": 74, "column": 8}}, {"id": 253, "type": "#endif", "text": "#endif", "parent": 234, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 6}}, {"id": 254, "type": "case_statement", "text": "case 't':\n\t\t\tcfg->target = atoi(optarg);\n\t\t\tif (cfg->target < 0 || cfg->target > 32767)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid target level %s\\n\", optarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;", "parent": 230, "children": [255, 256, 269, 294], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 84, "column": 9}}, {"id": 255, "type": "case", "text": "case", "parent": 254, "children": [], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 6}}, {"id": 256, "type": "char_literal", "text": "'t'", "parent": 254, "children": [257, 258, 259], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 10}}, {"id": 257, "type": "'", "text": "'", "parent": 256, "children": [], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 8}}, {"id": 258, "type": "character", "text": "t", "parent": 256, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 9}}, {"id": 259, "type": "'", "text": "'", "parent": 256, "children": [], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 10}}, {"id": 260, "type": "assignment_expression", "text": "cfg->target = atoi(optarg)", "parent": 254, "children": [261, 264, 265], "start_point": {"row": 77, "column": 3}, "end_point": {"row": 77, "column": 29}}, {"id": 261, "type": "field_expression", "text": "cfg->target", "parent": 260, "children": [262, 263], "start_point": {"row": 77, "column": 3}, "end_point": {"row": 77, "column": 14}}, {"id": 262, "type": "identifier", "text": "cfg", "parent": 261, "children": [], "start_point": {"row": 77, "column": 3}, "end_point": {"row": 77, "column": 6}}, {"id": 263, "type": "field_identifier", "text": "target", "parent": 261, "children": [], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 14}}, {"id": 264, "type": "=", "text": "=", "parent": 260, "children": [], "start_point": {"row": 77, "column": 15}, "end_point": {"row": 77, "column": 16}}, {"id": 265, "type": "call_expression", "text": "atoi(optarg)", "parent": 260, "children": [266, 267], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 29}}, {"id": 266, "type": "identifier", "text": "atoi", "parent": 265, "children": [], "start_point": {"row": 77, "column": 17}, "end_point": {"row": 77, "column": 21}}, {"id": 267, "type": "argument_list", "text": "(optarg)", "parent": 265, "children": [268], "start_point": {"row": 77, "column": 21}, "end_point": {"row": 77, "column": 29}}, {"id": 268, "type": "identifier", "text": "optarg", "parent": 267, "children": [], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 28}}, {"id": 269, "type": "if_statement", "text": "if (cfg->target < 0 || cfg->target > 32767)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid target level %s\\n\", optarg);\n\t\t\t\treturn 1;\n\t\t\t}", "parent": 254, "children": [270], "start_point": {"row": 78, "column": 3}, "end_point": {"row": 83, "column": 4}}, {"id": 270, "type": "parenthesized_expression", "text": "(cfg->target < 0 || cfg->target > 32767)", "parent": 269, "children": [271], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 46}}, {"id": 271, "type": "binary_expression", "text": "cfg->target < 0 || cfg->target > 32767", "parent": 270, "children": [272, 278, 279], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 45}}, {"id": 272, "type": "binary_expression", "text": "cfg->target < 0", "parent": 271, "children": [273, 276, 277], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 22}}, {"id": 273, "type": "field_expression", "text": "cfg->target", "parent": 272, "children": [274, 275], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 18}}, {"id": 274, "type": "identifier", "text": "cfg", "parent": 273, "children": [], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 10}}, {"id": 275, "type": "field_identifier", "text": "target", "parent": 273, "children": [], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 18}}, {"id": 276, "type": "<", "text": "<", "parent": 272, "children": [], "start_point": {"row": 78, "column": 19}, "end_point": {"row": 78, "column": 20}}, {"id": 277, "type": "number_literal", "text": "0", "parent": 272, "children": [], "start_point": {"row": 78, "column": 21}, "end_point": {"row": 78, "column": 22}}, {"id": 278, "type": "||", "text": "||", "parent": 271, "children": [], "start_point": {"row": 78, "column": 23}, "end_point": {"row": 78, "column": 25}}, {"id": 279, "type": "binary_expression", "text": "cfg->target > 32767", "parent": 271, "children": [280, 283, 284], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 45}}, {"id": 280, "type": "field_expression", "text": "cfg->target", "parent": 279, "children": [281, 282], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 37}}, {"id": 281, "type": "identifier", "text": "cfg", "parent": 280, "children": [], "start_point": {"row": 78, "column": 26}, "end_point": {"row": 78, "column": 29}}, {"id": 282, "type": "field_identifier", "text": "target", "parent": 280, "children": [], "start_point": {"row": 78, "column": 31}, "end_point": {"row": 78, "column": 37}}, {"id": 283, "type": ">", "text": ">", "parent": 279, "children": [], "start_point": {"row": 78, "column": 38}, "end_point": {"row": 78, "column": 39}}, {"id": 284, "type": "number_literal", "text": "32767", "parent": 279, "children": [], "start_point": {"row": 78, "column": 40}, "end_point": {"row": 78, "column": 45}}, {"id": 285, "type": "call_expression", "text": "fprintf(stderr,\n\t\t\t\t\t\"Invalid target level %s\\n\", optarg)", "parent": 269, "children": [286, 287], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 81, "column": 41}}, {"id": 286, "type": "identifier", "text": "fprintf", "parent": 285, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 11}}, {"id": 287, "type": "argument_list", "text": "(stderr,\n\t\t\t\t\t\"Invalid target level %s\\n\", optarg)", "parent": 285, "children": [288, 289, 291], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 81, "column": 41}}, {"id": 288, "type": "identifier", "text": "stderr", "parent": 287, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 18}}, {"id": 289, "type": "string_literal", "text": "\"Invalid target level %s\\n\"", "parent": 287, "children": [290], "start_point": {"row": 81, "column": 5}, "end_point": {"row": 81, "column": 32}}, {"id": 290, "type": "escape_sequence", "text": "\\n", "parent": 289, "children": [], "start_point": {"row": 81, "column": 29}, "end_point": {"row": 81, "column": 31}}, {"id": 291, "type": "identifier", "text": "optarg", "parent": 287, "children": [], "start_point": {"row": 81, "column": 34}, "end_point": {"row": 81, "column": 40}}, {"id": 292, "type": "return_statement", "text": "return 1;", "parent": 269, "children": [293], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 13}}, {"id": 293, "type": "number_literal", "text": "1", "parent": 292, "children": [], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 12}}, {"id": 294, "type": "break_statement", "text": "break;", "parent": 254, "children": [295], "start_point": {"row": 84, "column": 3}, "end_point": {"row": 84, "column": 9}}, {"id": 295, "type": "break", "text": "break", "parent": 294, "children": [], "start_point": {"row": 84, "column": 3}, "end_point": {"row": 84, "column": 8}}, {"id": 296, "type": "case_statement", "text": "case 'g':\n\t\t\tcfg->maxgain = atoi(optarg);\n\t\t\tif (cfg->maxgain < 0 || cfg->maxgain > 255)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid maximum gain %s\\n\", optarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;", "parent": 230, "children": [297, 298, 311, 336], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 94, "column": 9}}, {"id": 297, "type": "case", "text": "case", "parent": 296, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 6}}, {"id": 298, "type": "char_literal", "text": "'g'", "parent": 296, "children": [299, 300, 301], "start_point": {"row": 86, "column": 7}, "end_point": {"row": 86, "column": 10}}, {"id": 299, "type": "'", "text": "'", "parent": 298, "children": [], "start_point": {"row": 86, "column": 7}, "end_point": {"row": 86, "column": 8}}, {"id": 300, "type": "character", "text": "g", "parent": 298, "children": [], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 9}}, {"id": 301, "type": "'", "text": "'", "parent": 298, "children": [], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 10}}, {"id": 302, "type": "assignment_expression", "text": "cfg->maxgain = atoi(optarg)", "parent": 296, "children": [303, 306, 307], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 87, "column": 30}}, {"id": 303, "type": "field_expression", "text": "cfg->maxgain", "parent": 302, "children": [304, 305], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 87, "column": 15}}, {"id": 304, "type": "identifier", "text": "cfg", "parent": 303, "children": [], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 87, "column": 6}}, {"id": 305, "type": "field_identifier", "text": "maxgain", "parent": 303, "children": [], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 15}}, {"id": 306, "type": "=", "text": "=", "parent": 302, "children": [], "start_point": {"row": 87, "column": 16}, "end_point": {"row": 87, "column": 17}}, {"id": 307, "type": "call_expression", "text": "atoi(optarg)", "parent": 302, "children": [308, 309], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 30}}, {"id": 308, "type": "identifier", "text": "atoi", "parent": 307, "children": [], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 22}}, {"id": 309, "type": "argument_list", "text": "(optarg)", "parent": 307, "children": [310], "start_point": {"row": 87, "column": 22}, "end_point": {"row": 87, "column": 30}}, {"id": 310, "type": "identifier", "text": "optarg", "parent": 309, "children": [], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 29}}, {"id": 311, "type": "if_statement", "text": "if (cfg->maxgain < 0 || cfg->maxgain > 255)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid maximum gain %s\\n\", optarg);\n\t\t\t\treturn 1;\n\t\t\t}", "parent": 296, "children": [312], "start_point": {"row": 88, "column": 3}, "end_point": {"row": 93, "column": 4}}, {"id": 312, "type": "parenthesized_expression", "text": "(cfg->maxgain < 0 || cfg->maxgain > 255)", "parent": 311, "children": [313], "start_point": {"row": 88, "column": 6}, "end_point": {"row": 88, "column": 46}}, {"id": 313, "type": "binary_expression", "text": "cfg->maxgain < 0 || cfg->maxgain > 255", "parent": 312, "children": [314, 320, 321], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 45}}, {"id": 314, "type": "binary_expression", "text": "cfg->maxgain < 0", "parent": 313, "children": [315, 318, 319], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 23}}, {"id": 315, "type": "field_expression", "text": "cfg->maxgain", "parent": 314, "children": [316, 317], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 19}}, {"id": 316, "type": "identifier", "text": "cfg", "parent": 315, "children": [], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 10}}, {"id": 317, "type": "field_identifier", "text": "maxgain", "parent": 315, "children": [], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 19}}, {"id": 318, "type": "<", "text": "<", "parent": 314, "children": [], "start_point": {"row": 88, "column": 20}, "end_point": {"row": 88, "column": 21}}, {"id": 319, "type": "number_literal", "text": "0", "parent": 314, "children": [], "start_point": {"row": 88, "column": 22}, "end_point": {"row": 88, "column": 23}}, {"id": 320, "type": "||", "text": "||", "parent": 313, "children": [], "start_point": {"row": 88, "column": 24}, "end_point": {"row": 88, "column": 26}}, {"id": 321, "type": "binary_expression", "text": "cfg->maxgain > 255", "parent": 313, "children": [322, 325, 326], "start_point": {"row": 88, "column": 27}, "end_point": {"row": 88, "column": 45}}, {"id": 322, "type": "field_expression", "text": "cfg->maxgain", "parent": 321, "children": [323, 324], "start_point": {"row": 88, "column": 27}, "end_point": {"row": 88, "column": 39}}, {"id": 323, "type": "identifier", "text": "cfg", "parent": 322, "children": [], "start_point": {"row": 88, "column": 27}, "end_point": {"row": 88, "column": 30}}, {"id": 324, "type": "field_identifier", "text": "maxgain", "parent": 322, "children": [], "start_point": {"row": 88, "column": 32}, "end_point": {"row": 88, "column": 39}}, {"id": 325, "type": ">", "text": ">", "parent": 321, "children": [], "start_point": {"row": 88, "column": 40}, "end_point": {"row": 88, "column": 41}}, {"id": 326, "type": "number_literal", "text": "255", "parent": 321, "children": [], "start_point": {"row": 88, "column": 42}, "end_point": {"row": 88, "column": 45}}, {"id": 327, "type": "call_expression", "text": "fprintf(stderr,\n\t\t\t\t\t\"Invalid maximum gain %s\\n\", optarg)", "parent": 311, "children": [328, 329], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 91, "column": 41}}, {"id": 328, "type": "identifier", "text": "fprintf", "parent": 327, "children": [], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 11}}, {"id": 329, "type": "argument_list", "text": "(stderr,\n\t\t\t\t\t\"Invalid maximum gain %s\\n\", optarg)", "parent": 327, "children": [330, 331, 333], "start_point": {"row": 90, "column": 11}, "end_point": {"row": 91, "column": 41}}, {"id": 330, "type": "identifier", "text": "stderr", "parent": 329, "children": [], "start_point": {"row": 90, "column": 12}, "end_point": {"row": 90, "column": 18}}, {"id": 331, "type": "string_literal", "text": "\"Invalid maximum gain %s\\n\"", "parent": 329, "children": [332], "start_point": {"row": 91, "column": 5}, "end_point": {"row": 91, "column": 32}}, {"id": 332, "type": "escape_sequence", "text": "\\n", "parent": 331, "children": [], "start_point": {"row": 91, "column": 29}, "end_point": {"row": 91, "column": 31}}, {"id": 333, "type": "identifier", "text": "optarg", "parent": 329, "children": [], "start_point": {"row": 91, "column": 34}, "end_point": {"row": 91, "column": 40}}, {"id": 334, "type": "return_statement", "text": "return 1;", "parent": 311, "children": [335], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 13}}, {"id": 335, "type": "number_literal", "text": "1", "parent": 334, "children": [], "start_point": {"row": 92, "column": 11}, "end_point": {"row": 92, "column": 12}}, {"id": 336, "type": "break_statement", "text": "break;", "parent": 296, "children": [337], "start_point": {"row": 94, "column": 3}, "end_point": {"row": 94, "column": 9}}, {"id": 337, "type": "break", "text": "break", "parent": 336, "children": [], "start_point": {"row": 94, "column": 3}, "end_point": {"row": 94, "column": 8}}, {"id": 338, "type": "case_statement", "text": "case 's':\n\t\t\tcfg->smooth = atoi(optarg);\n\t\t\tif (cfg->smooth < 0 || cfg->smooth > 15)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid smoothing value %s\\n\",\n\t\t\t\t\toptarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;", "parent": 230, "children": [339, 340, 353, 378], "start_point": {"row": 96, "column": 2}, "end_point": {"row": 105, "column": 9}}, {"id": 339, "type": "case", "text": "case", "parent": 338, "children": [], "start_point": {"row": 96, "column": 2}, "end_point": {"row": 96, "column": 6}}, {"id": 340, "type": "char_literal", "text": "'s'", "parent": 338, "children": [341, 342, 343], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 10}}, {"id": 341, "type": "'", "text": "'", "parent": 340, "children": [], "start_point": {"row": 96, "column": 7}, "end_point": {"row": 96, "column": 8}}, {"id": 342, "type": "character", "text": "s", "parent": 340, "children": [], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 9}}, {"id": 343, "type": "'", "text": "'", "parent": 340, "children": [], "start_point": {"row": 96, "column": 9}, "end_point": {"row": 96, "column": 10}}, {"id": 344, "type": "assignment_expression", "text": "cfg->smooth = atoi(optarg)", "parent": 338, "children": [345, 348, 349], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 97, "column": 29}}, {"id": 345, "type": "field_expression", "text": "cfg->smooth", "parent": 344, "children": [346, 347], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 97, "column": 14}}, {"id": 346, "type": "identifier", "text": "cfg", "parent": 345, "children": [], "start_point": {"row": 97, "column": 3}, "end_point": {"row": 97, "column": 6}}, {"id": 347, "type": "field_identifier", "text": "smooth", "parent": 345, "children": [], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 14}}, {"id": 348, "type": "=", "text": "=", "parent": 344, "children": [], "start_point": {"row": 97, "column": 15}, "end_point": {"row": 97, "column": 16}}, {"id": 349, "type": "call_expression", "text": "atoi(optarg)", "parent": 344, "children": [350, 351], "start_point": {"row": 97, "column": 17}, "end_point": {"row": 97, "column": 29}}, {"id": 350, "type": "identifier", "text": "atoi", "parent": 349, "children": [], "start_point": {"row": 97, "column": 17}, "end_point": {"row": 97, "column": 21}}, {"id": 351, "type": "argument_list", "text": "(optarg)", "parent": 349, "children": [352], "start_point": {"row": 97, "column": 21}, "end_point": {"row": 97, "column": 29}}, {"id": 352, "type": "identifier", "text": "optarg", "parent": 351, "children": [], "start_point": {"row": 97, "column": 22}, "end_point": {"row": 97, "column": 28}}, {"id": 353, "type": "if_statement", "text": "if (cfg->smooth < 0 || cfg->smooth > 15)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid smoothing value %s\\n\",\n\t\t\t\t\toptarg);\n\t\t\t\treturn 1;\n\t\t\t}", "parent": 338, "children": [354], "start_point": {"row": 98, "column": 3}, "end_point": {"row": 104, "column": 4}}, {"id": 354, "type": "parenthesized_expression", "text": "(cfg->smooth < 0 || cfg->smooth > 15)", "parent": 353, "children": [355], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 43}}, {"id": 355, "type": "binary_expression", "text": "cfg->smooth < 0 || cfg->smooth > 15", "parent": 354, "children": [356, 362, 363], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 42}}, {"id": 356, "type": "binary_expression", "text": "cfg->smooth < 0", "parent": 355, "children": [357, 360, 361], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 22}}, {"id": 357, "type": "field_expression", "text": "cfg->smooth", "parent": 356, "children": [358, 359], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 18}}, {"id": 358, "type": "identifier", "text": "cfg", "parent": 357, "children": [], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 10}}, {"id": 359, "type": "field_identifier", "text": "smooth", "parent": 357, "children": [], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 18}}, {"id": 360, "type": "<", "text": "<", "parent": 356, "children": [], "start_point": {"row": 98, "column": 19}, "end_point": {"row": 98, "column": 20}}, {"id": 361, "type": "number_literal", "text": "0", "parent": 356, "children": [], "start_point": {"row": 98, "column": 21}, "end_point": {"row": 98, "column": 22}}, {"id": 362, "type": "||", "text": "||", "parent": 355, "children": [], "start_point": {"row": 98, "column": 23}, "end_point": {"row": 98, "column": 25}}, {"id": 363, "type": "binary_expression", "text": "cfg->smooth > 15", "parent": 355, "children": [364, 367, 368], "start_point": {"row": 98, "column": 26}, "end_point": {"row": 98, "column": 42}}, {"id": 364, "type": "field_expression", "text": "cfg->smooth", "parent": 363, "children": [365, 366], "start_point": {"row": 98, "column": 26}, "end_point": {"row": 98, "column": 37}}, {"id": 365, "type": "identifier", "text": "cfg", "parent": 364, "children": [], "start_point": {"row": 98, "column": 26}, "end_point": {"row": 98, "column": 29}}, {"id": 366, "type": "field_identifier", "text": "smooth", "parent": 364, "children": [], "start_point": {"row": 98, "column": 31}, "end_point": {"row": 98, "column": 37}}, {"id": 367, "type": ">", "text": ">", "parent": 363, "children": [], "start_point": {"row": 98, "column": 38}, "end_point": {"row": 98, "column": 39}}, {"id": 368, "type": "number_literal", "text": "15", "parent": 363, "children": [], "start_point": {"row": 98, "column": 40}, "end_point": {"row": 98, "column": 42}}, {"id": 369, "type": "call_expression", "text": "fprintf(stderr,\n\t\t\t\t\t\"Invalid smoothing value %s\\n\",\n\t\t\t\t\toptarg)", "parent": 353, "children": [370, 371], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 102, "column": 12}}, {"id": 370, "type": "identifier", "text": "fprintf", "parent": 369, "children": [], "start_point": {"row": 100, "column": 4}, "end_point": {"row": 100, "column": 11}}, {"id": 371, "type": "argument_list", "text": "(stderr,\n\t\t\t\t\t\"Invalid smoothing value %s\\n\",\n\t\t\t\t\toptarg)", "parent": 369, "children": [372, 373, 375], "start_point": {"row": 100, "column": 11}, "end_point": {"row": 102, "column": 12}}, {"id": 372, "type": "identifier", "text": "stderr", "parent": 371, "children": [], "start_point": {"row": 100, "column": 12}, "end_point": {"row": 100, "column": 18}}, {"id": 373, "type": "string_literal", "text": "\"Invalid smoothing value %s\\n\"", "parent": 371, "children": [374], "start_point": {"row": 101, "column": 5}, "end_point": {"row": 101, "column": 35}}, {"id": 374, "type": "escape_sequence", "text": "\\n", "parent": 373, "children": [], "start_point": {"row": 101, "column": 32}, "end_point": {"row": 101, "column": 34}}, {"id": 375, "type": "identifier", "text": "optarg", "parent": 371, "children": [], "start_point": {"row": 102, "column": 5}, "end_point": {"row": 102, "column": 11}}, {"id": 376, "type": "return_statement", "text": "return 1;", "parent": 353, "children": [377], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 13}}, {"id": 377, "type": "number_literal", "text": "1", "parent": 376, "children": [], "start_point": {"row": 103, "column": 11}, "end_point": {"row": 103, "column": 12}}, {"id": 378, "type": "break_statement", "text": "break;", "parent": 338, "children": [379], "start_point": {"row": 105, "column": 3}, "end_point": {"row": 105, "column": 9}}, {"id": 379, "type": "break", "text": "break", "parent": 378, "children": [], "start_point": {"row": 105, "column": 3}, "end_point": {"row": 105, "column": 8}}, {"id": 380, "type": "case_statement", "text": "case 'b':\n {\n\t\t\tunsigned int hsize = atoi(optarg);\n\t\t\tif (hsize < 1)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid history size %s\\n\",\n\t\t\t\t\toptarg);\n\t\t\t\treturn 1;\n\t\t\t}\n Compressor_setHistory(cmp, hsize);\n\t\t\tbreak;\n }", "parent": 230, "children": [381, 382], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 119, "column": 17}}, {"id": 381, "type": "case", "text": "case", "parent": 380, "children": [], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 6}}, {"id": 382, "type": "char_literal", "text": "'b'", "parent": 380, "children": [383, 384, 385], "start_point": {"row": 107, "column": 7}, "end_point": {"row": 107, "column": 10}}, {"id": 383, "type": "'", "text": "'", "parent": 382, "children": [], "start_point": {"row": 107, "column": 7}, "end_point": {"row": 107, "column": 8}}, {"id": 384, "type": "character", "text": "b", "parent": 382, "children": [], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 9}}, {"id": 385, "type": "'", "text": "'", "parent": 382, "children": [], "start_point": {"row": 107, "column": 9}, "end_point": {"row": 107, "column": 10}}, {"id": 386, "type": "declaration", "text": "unsigned int hsize = atoi(optarg);", "parent": 380, "children": [387, 390], "start_point": {"row": 109, "column": 3}, "end_point": {"row": 109, "column": 37}}, {"id": 387, "type": "sized_type_specifier", "text": "unsigned int", "parent": 386, "children": [388, 389], "start_point": {"row": 109, "column": 3}, "end_point": {"row": 109, "column": 15}}, {"id": 388, "type": "unsigned", "text": "unsigned", "parent": 387, "children": [], "start_point": {"row": 109, "column": 3}, "end_point": {"row": 109, "column": 11}}, {"id": 389, "type": "primitive_type", "text": "int", "parent": 387, "children": [], "start_point": {"row": 109, "column": 12}, "end_point": {"row": 109, "column": 15}}, {"id": 390, "type": "init_declarator", "text": "hsize = atoi(optarg)", "parent": 386, "children": [391, 392, 393], "start_point": {"row": 109, "column": 16}, "end_point": {"row": 109, "column": 36}}, {"id": 391, "type": "identifier", "text": "hsize", "parent": 390, "children": [], "start_point": {"row": 109, "column": 16}, "end_point": {"row": 109, "column": 21}}, {"id": 392, "type": "=", "text": "=", "parent": 390, "children": [], "start_point": {"row": 109, "column": 22}, "end_point": {"row": 109, "column": 23}}, {"id": 393, "type": "call_expression", "text": "atoi(optarg)", "parent": 390, "children": [394, 395], "start_point": {"row": 109, "column": 24}, "end_point": {"row": 109, "column": 36}}, {"id": 394, "type": "identifier", "text": "atoi", "parent": 393, "children": [], "start_point": {"row": 109, "column": 24}, "end_point": {"row": 109, "column": 28}}, {"id": 395, "type": "argument_list", "text": "(optarg)", "parent": 393, "children": [396], "start_point": {"row": 109, "column": 28}, "end_point": {"row": 109, "column": 36}}, {"id": 396, "type": "identifier", "text": "optarg", "parent": 395, "children": [], "start_point": {"row": 109, "column": 29}, "end_point": {"row": 109, "column": 35}}, {"id": 397, "type": "if_statement", "text": "if (hsize < 1)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid history size %s\\n\",\n\t\t\t\t\toptarg);\n\t\t\t\treturn 1;\n\t\t\t}", "parent": 380, "children": [398], "start_point": {"row": 110, "column": 3}, "end_point": {"row": 116, "column": 4}}, {"id": 398, "type": "parenthesized_expression", "text": "(hsize < 1)", "parent": 397, "children": [399], "start_point": {"row": 110, "column": 6}, "end_point": {"row": 110, "column": 17}}, {"id": 399, "type": "binary_expression", "text": "hsize < 1", "parent": 398, "children": [400, 401, 402], "start_point": {"row": 110, "column": 7}, "end_point": {"row": 110, "column": 16}}, {"id": 400, "type": "identifier", "text": "hsize", "parent": 399, "children": [], "start_point": {"row": 110, "column": 7}, "end_point": {"row": 110, "column": 12}}, {"id": 401, "type": "<", "text": "<", "parent": 399, "children": [], "start_point": {"row": 110, "column": 13}, "end_point": {"row": 110, "column": 14}}, {"id": 402, "type": "number_literal", "text": "1", "parent": 399, "children": [], "start_point": {"row": 110, "column": 15}, "end_point": {"row": 110, "column": 16}}, {"id": 403, "type": "call_expression", "text": "fprintf(stderr,\n\t\t\t\t\t\"Invalid history size %s\\n\",\n\t\t\t\t\toptarg)", "parent": 397, "children": [404, 405], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 114, "column": 12}}, {"id": 404, "type": "identifier", "text": "fprintf", "parent": 403, "children": [], "start_point": {"row": 112, "column": 4}, "end_point": {"row": 112, "column": 11}}, {"id": 405, "type": "argument_list", "text": "(stderr,\n\t\t\t\t\t\"Invalid history size %s\\n\",\n\t\t\t\t\toptarg)", "parent": 403, "children": [406, 407, 409], "start_point": {"row": 112, "column": 11}, "end_point": {"row": 114, "column": 12}}, {"id": 406, "type": "identifier", "text": "stderr", "parent": 405, "children": [], "start_point": {"row": 112, "column": 12}, "end_point": {"row": 112, "column": 18}}, {"id": 407, "type": "string_literal", "text": "\"Invalid history size %s\\n\"", "parent": 405, "children": [408], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 32}}, {"id": 408, "type": "escape_sequence", "text": "\\n", "parent": 407, "children": [], "start_point": {"row": 113, "column": 29}, "end_point": {"row": 113, "column": 31}}, {"id": 409, "type": "identifier", "text": "optarg", "parent": 405, "children": [], "start_point": {"row": 114, "column": 5}, "end_point": {"row": 114, "column": 11}}, {"id": 410, "type": "return_statement", "text": "return 1;", "parent": 397, "children": [411], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 13}}, {"id": 411, "type": "number_literal", "text": "1", "parent": 410, "children": [], "start_point": {"row": 115, "column": 11}, "end_point": {"row": 115, "column": 12}}, {"id": 412, "type": "call_expression", "text": "Compressor_setHistory(cmp, hsize)", "parent": 380, "children": [413, 414], "start_point": {"row": 117, "column": 24}, "end_point": {"row": 117, "column": 57}}, {"id": 413, "type": "identifier", "text": "Compressor_setHistory", "parent": 412, "children": [], "start_point": {"row": 117, "column": 24}, "end_point": {"row": 117, "column": 45}}, {"id": 414, "type": "argument_list", "text": "(cmp, hsize)", "parent": 412, "children": [415, 416], "start_point": {"row": 117, "column": 45}, "end_point": {"row": 117, "column": 57}}, {"id": 415, "type": "identifier", "text": "cmp", "parent": 414, "children": [], "start_point": {"row": 117, "column": 46}, "end_point": {"row": 117, "column": 49}}, {"id": 416, "type": "identifier", "text": "hsize", "parent": 414, "children": [], "start_point": {"row": 117, "column": 51}, "end_point": {"row": 117, "column": 56}}, {"id": 417, "type": "break_statement", "text": "break;", "parent": 380, "children": [418], "start_point": {"row": 118, "column": 3}, "end_point": {"row": 118, "column": 9}}, {"id": 418, "type": "break", "text": "break", "parent": 417, "children": [], "start_point": {"row": 118, "column": 3}, "end_point": {"row": 118, "column": 8}}, {"id": 419, "type": "case_statement", "text": "case 'x':\n\t\t\tswab = 1;\n\t\t\tbreak;", "parent": 230, "children": [420, 421, 429], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 123, "column": 9}}, {"id": 420, "type": "case", "text": "case", "parent": 419, "children": [], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 6}}, {"id": 421, "type": "char_literal", "text": "'x'", "parent": 419, "children": [422, 423, 424], "start_point": {"row": 121, "column": 7}, "end_point": {"row": 121, "column": 10}}, {"id": 422, "type": "'", "text": "'", "parent": 421, "children": [], "start_point": {"row": 121, "column": 7}, "end_point": {"row": 121, "column": 8}}, {"id": 423, "type": "character", "text": "x", "parent": 421, "children": [], "start_point": {"row": 121, "column": 8}, "end_point": {"row": 121, "column": 9}}, {"id": 424, "type": "'", "text": "'", "parent": 421, "children": [], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 10}}, {"id": 425, "type": "assignment_expression", "text": "swab = 1", "parent": 419, "children": [426, 427, 428], "start_point": {"row": 122, "column": 3}, "end_point": {"row": 122, "column": 11}}, {"id": 426, "type": "identifier", "text": "swab", "parent": 425, "children": [], "start_point": {"row": 122, "column": 3}, "end_point": {"row": 122, "column": 7}}, {"id": 427, "type": "=", "text": "=", "parent": 425, "children": [], "start_point": {"row": 122, "column": 8}, "end_point": {"row": 122, "column": 9}}, {"id": 428, "type": "number_literal", "text": "1", "parent": 425, "children": [], "start_point": {"row": 122, "column": 10}, "end_point": {"row": 122, "column": 11}}, {"id": 429, "type": "break_statement", "text": "break;", "parent": 419, "children": [430], "start_point": {"row": 123, "column": 3}, "end_point": {"row": 123, "column": 9}}, {"id": 430, "type": "break", "text": "break", "parent": 429, "children": [], "start_point": {"row": 123, "column": 3}, "end_point": {"row": 123, "column": 8}}, {"id": 431, "type": "case_statement", "text": "case 'X':\n\t\t\tswab = 0;\n\t\t\tbreak;", "parent": 230, "children": [432, 433, 441], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 126, "column": 9}}, {"id": 432, "type": "case", "text": "case", "parent": 431, "children": [], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 6}}, {"id": 433, "type": "char_literal", "text": "'X'", "parent": 431, "children": [434, 435, 436], "start_point": {"row": 124, "column": 7}, "end_point": {"row": 124, "column": 10}}, {"id": 434, "type": "'", "text": "'", "parent": 433, "children": [], "start_point": {"row": 124, "column": 7}, "end_point": {"row": 124, "column": 8}}, {"id": 435, "type": "character", "text": "X", "parent": 433, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 9}}, {"id": 436, "type": "'", "text": "'", "parent": 433, "children": [], "start_point": {"row": 124, "column": 9}, "end_point": {"row": 124, "column": 10}}, {"id": 437, "type": "assignment_expression", "text": "swab = 0", "parent": 431, "children": [438, 439, 440], "start_point": {"row": 125, "column": 3}, "end_point": {"row": 125, "column": 11}}, {"id": 438, "type": "identifier", "text": "swab", "parent": 437, "children": [], "start_point": {"row": 125, "column": 3}, "end_point": {"row": 125, "column": 7}}, {"id": 439, "type": "=", "text": "=", "parent": 437, "children": [], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 9}}, {"id": 440, "type": "number_literal", "text": "0", "parent": 437, "children": [], "start_point": {"row": 125, "column": 10}, "end_point": {"row": 125, "column": 11}}, {"id": 441, "type": "break_statement", "text": "break;", "parent": 431, "children": [442], "start_point": {"row": 126, "column": 3}, "end_point": {"row": 126, "column": 9}}, {"id": 442, "type": "break", "text": "break", "parent": 441, "children": [], "start_point": {"row": 126, "column": 3}, "end_point": {"row": 126, "column": 8}}, {"id": 443, "type": "case_statement", "text": "case 'h':\n\t\t\tshowhelp(argv[0]);\n\t\t\treturn 0;", "parent": 230, "children": [444, 445, 455], "start_point": {"row": 128, "column": 2}, "end_point": {"row": 130, "column": 12}}, {"id": 444, "type": "case", "text": "case", "parent": 443, "children": [], "start_point": {"row": 128, "column": 2}, "end_point": {"row": 128, "column": 6}}, {"id": 445, "type": "char_literal", "text": "'h'", "parent": 443, "children": [446, 447, 448], "start_point": {"row": 128, "column": 7}, "end_point": {"row": 128, "column": 10}}, {"id": 446, "type": "'", "text": "'", "parent": 445, "children": [], "start_point": {"row": 128, "column": 7}, "end_point": {"row": 128, "column": 8}}, {"id": 447, "type": "character", "text": "h", "parent": 445, "children": [], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 9}}, {"id": 448, "type": "'", "text": "'", "parent": 445, "children": [], "start_point": {"row": 128, "column": 9}, "end_point": {"row": 128, "column": 10}}, {"id": 449, "type": "call_expression", "text": "showhelp(argv[0])", "parent": 443, "children": [450, 451], "start_point": {"row": 129, "column": 3}, "end_point": {"row": 129, "column": 20}}, {"id": 450, "type": "identifier", "text": "showhelp", "parent": 449, "children": [], "start_point": {"row": 129, "column": 3}, "end_point": {"row": 129, "column": 11}}, {"id": 451, "type": "argument_list", "text": "(argv[0])", "parent": 449, "children": [452], "start_point": {"row": 129, "column": 11}, "end_point": {"row": 129, "column": 20}}, {"id": 452, "type": "subscript_expression", "text": "argv[0]", "parent": 451, "children": [453, 454], "start_point": {"row": 129, "column": 12}, "end_point": {"row": 129, "column": 19}}, {"id": 453, "type": "identifier", "text": "argv", "parent": 452, "children": [], "start_point": {"row": 129, "column": 12}, "end_point": {"row": 129, "column": 16}}, {"id": 454, "type": "number_literal", "text": "0", "parent": 452, "children": [], "start_point": {"row": 129, "column": 17}, "end_point": {"row": 129, "column": 18}}, {"id": 455, "type": "return_statement", "text": "return 0;", "parent": 443, "children": [456], "start_point": {"row": 130, "column": 3}, "end_point": {"row": 130, "column": 12}}, {"id": 456, "type": "number_literal", "text": "0", "parent": 455, "children": [], "start_point": {"row": 130, "column": 10}, "end_point": {"row": 130, "column": 11}}, {"id": 457, "type": "case_statement", "text": "default:\n\t\t\tshowhelp(argv[0]);\n\t\t\treturn 1;", "parent": 230, "children": [458, 465], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 134, "column": 12}}, {"id": 458, "type": "default", "text": "default", "parent": 457, "children": [], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 132, "column": 9}}, {"id": 459, "type": "call_expression", "text": "showhelp(argv[0])", "parent": 457, "children": [460, 461], "start_point": {"row": 133, "column": 3}, "end_point": {"row": 133, "column": 20}}, {"id": 460, "type": "identifier", "text": "showhelp", "parent": 459, "children": [], "start_point": {"row": 133, "column": 3}, "end_point": {"row": 133, "column": 11}}, {"id": 461, "type": "argument_list", "text": "(argv[0])", "parent": 459, "children": [462], "start_point": {"row": 133, "column": 11}, "end_point": {"row": 133, "column": 20}}, {"id": 462, "type": "subscript_expression", "text": "argv[0]", "parent": 461, "children": [463, 464], "start_point": {"row": 133, "column": 12}, "end_point": {"row": 133, "column": 19}}, {"id": 463, "type": "identifier", "text": "argv", "parent": 462, "children": [], "start_point": {"row": 133, "column": 12}, "end_point": {"row": 133, "column": 16}}, {"id": 464, "type": "number_literal", "text": "0", "parent": 462, "children": [], "start_point": {"row": 133, "column": 17}, "end_point": {"row": 133, "column": 18}}, {"id": 465, "type": "return_statement", "text": "return 1;", "parent": 457, "children": [466], "start_point": {"row": 134, "column": 3}, "end_point": {"row": 134, "column": 12}}, {"id": 466, "type": "number_literal", "text": "1", "parent": 465, "children": [], "start_point": {"row": 134, "column": 10}, "end_point": {"row": 134, "column": 11}}, {"id": 467, "type": "preproc_ifdef", "text": "#ifdef USE_ESD\n\tif (esd)\n {\n\t\tfd_in = fd_out = esd_filter_stream(\n\t\t\tESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n\t\t\tESD_DEFAULT_RATE, esd_host, argv[0]);\n\t\t\n\t\tif (fd_in < 0) {\n\t\t\tfprintf(stderr, \"esd connection failed\\n\");\n\t\t\treturn 1;\n\t\t}\n\t}\t\n#endif", "parent": 119, "children": [468, 469, 470, 508], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 150, "column": 6}}, {"id": 468, "type": "#ifdef", "text": "#ifdef", "parent": 467, "children": [], "start_point": {"row": 138, "column": 0}, "end_point": {"row": 138, "column": 6}}, {"id": 469, "type": "identifier", "text": "USE_ESD", "parent": 467, "children": [], "start_point": {"row": 138, "column": 7}, "end_point": {"row": 138, "column": 14}}, {"id": 470, "type": "if_statement", "text": "if (esd)\n {\n\t\tfd_in = fd_out = esd_filter_stream(\n\t\t\tESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n\t\t\tESD_DEFAULT_RATE, esd_host, argv[0]);\n\t\t\n\t\tif (fd_in < 0) {\n\t\t\tfprintf(stderr, \"esd connection failed\\n\");\n\t\t\treturn 1;\n\t\t}\n\t}", "parent": 467, "children": [471], "start_point": {"row": 139, "column": 1}, "end_point": {"row": 149, "column": 2}}, {"id": 471, "type": "parenthesized_expression", "text": "(esd)", "parent": 470, "children": [472], "start_point": {"row": 139, "column": 4}, "end_point": {"row": 139, "column": 9}}, {"id": 472, "type": "identifier", "text": "esd", "parent": 471, "children": [], "start_point": {"row": 139, "column": 5}, "end_point": {"row": 139, "column": 8}}, {"id": 473, "type": "assignment_expression", "text": "fd_in = fd_out = esd_filter_stream(\n\t\t\tESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n\t\t\tESD_DEFAULT_RATE, esd_host, argv[0])", "parent": 470, "children": [474, 475, 476], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 143, "column": 39}}, {"id": 474, "type": "identifier", "text": "fd_in", "parent": 473, "children": [], "start_point": {"row": 141, "column": 2}, "end_point": {"row": 141, "column": 7}}, {"id": 475, "type": "=", "text": "=", "parent": 473, "children": [], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 9}}, {"id": 476, "type": "assignment_expression", "text": "fd_out = esd_filter_stream(\n\t\t\tESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n\t\t\tESD_DEFAULT_RATE, esd_host, argv[0])", "parent": 473, "children": [477, 478, 479], "start_point": {"row": 141, "column": 10}, "end_point": {"row": 143, "column": 39}}, {"id": 477, "type": "identifier", "text": "fd_out", "parent": 476, "children": [], "start_point": {"row": 141, "column": 10}, "end_point": {"row": 141, "column": 16}}, {"id": 478, "type": "=", "text": "=", "parent": 476, "children": [], "start_point": {"row": 141, "column": 17}, "end_point": {"row": 141, "column": 18}}, {"id": 479, "type": "call_expression", "text": "esd_filter_stream(\n\t\t\tESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n\t\t\tESD_DEFAULT_RATE, esd_host, argv[0])", "parent": 476, "children": [480, 481], "start_point": {"row": 141, "column": 19}, "end_point": {"row": 143, "column": 39}}, {"id": 480, "type": "identifier", "text": "esd_filter_stream", "parent": 479, "children": [], "start_point": {"row": 141, "column": 19}, "end_point": {"row": 141, "column": 36}}, {"id": 481, "type": "argument_list", "text": "(\n\t\t\tESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n\t\t\tESD_DEFAULT_RATE, esd_host, argv[0])", "parent": 479, "children": [482, 489, 490, 491], "start_point": {"row": 141, "column": 36}, "end_point": {"row": 143, "column": 39}}, {"id": 482, "type": "binary_expression", "text": "ESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY", "parent": 481, "children": [483, 488], "start_point": {"row": 142, "column": 3}, "end_point": {"row": 142, "column": 44}}, {"id": 483, "type": "binary_expression", "text": "ESD_BITS16|ESD_STEREO|ESD_STREAM", "parent": 482, "children": [484, 487], "start_point": {"row": 142, "column": 3}, "end_point": {"row": 142, "column": 35}}, {"id": 484, "type": "binary_expression", "text": "ESD_BITS16|ESD_STEREO", "parent": 483, "children": [485, 486], "start_point": {"row": 142, "column": 3}, "end_point": {"row": 142, "column": 24}}, {"id": 485, "type": "identifier", "text": "ESD_BITS16", "parent": 484, "children": [], "start_point": {"row": 142, "column": 3}, "end_point": {"row": 142, "column": 13}}, {"id": 486, "type": "identifier", "text": "ESD_STEREO", "parent": 484, "children": [], "start_point": {"row": 142, "column": 14}, "end_point": {"row": 142, "column": 24}}, {"id": 487, "type": "identifier", "text": "ESD_STREAM", "parent": 483, "children": [], "start_point": {"row": 142, "column": 25}, "end_point": {"row": 142, "column": 35}}, {"id": 488, "type": "identifier", "text": "ESD_PLAY", "parent": 482, "children": [], "start_point": {"row": 142, "column": 36}, "end_point": {"row": 142, "column": 44}}, {"id": 489, "type": "identifier", "text": "ESD_DEFAULT_RATE", "parent": 481, "children": [], "start_point": {"row": 143, "column": 3}, "end_point": {"row": 143, "column": 19}}, {"id": 490, "type": "identifier", "text": "esd_host", "parent": 481, "children": [], "start_point": {"row": 143, "column": 21}, "end_point": {"row": 143, "column": 29}}, {"id": 491, "type": "subscript_expression", "text": "argv[0]", "parent": 481, "children": [492, 493], "start_point": {"row": 143, "column": 31}, "end_point": {"row": 143, "column": 38}}, {"id": 492, "type": "identifier", "text": "argv", "parent": 491, "children": [], "start_point": {"row": 143, "column": 31}, "end_point": {"row": 143, "column": 35}}, {"id": 493, "type": "number_literal", "text": "0", "parent": 491, "children": [], "start_point": {"row": 143, "column": 36}, "end_point": {"row": 143, "column": 37}}, {"id": 494, "type": "if_statement", "text": "if (fd_in < 0) {\n\t\t\tfprintf(stderr, \"esd connection failed\\n\");\n\t\t\treturn 1;\n\t\t}", "parent": 470, "children": [495], "start_point": {"row": 145, "column": 2}, "end_point": {"row": 148, "column": 3}}, {"id": 495, "type": "parenthesized_expression", "text": "(fd_in < 0)", "parent": 494, "children": [496], "start_point": {"row": 145, "column": 5}, "end_point": {"row": 145, "column": 16}}, {"id": 496, "type": "binary_expression", "text": "fd_in < 0", "parent": 495, "children": [497, 498, 499], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 145, "column": 15}}, {"id": 497, "type": "identifier", "text": "fd_in", "parent": 496, "children": [], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 145, "column": 11}}, {"id": 498, "type": "<", "text": "<", "parent": 496, "children": [], "start_point": {"row": 145, "column": 12}, "end_point": {"row": 145, "column": 13}}, {"id": 499, "type": "number_literal", "text": "0", "parent": 496, "children": [], "start_point": {"row": 145, "column": 14}, "end_point": {"row": 145, "column": 15}}, {"id": 500, "type": "call_expression", "text": "fprintf(stderr, \"esd connection failed\\n\")", "parent": 494, "children": [501, 502], "start_point": {"row": 146, "column": 3}, "end_point": {"row": 146, "column": 45}}, {"id": 501, "type": "identifier", "text": "fprintf", "parent": 500, "children": [], "start_point": {"row": 146, "column": 3}, "end_point": {"row": 146, "column": 10}}, {"id": 502, "type": "argument_list", "text": "(stderr, \"esd connection failed\\n\")", "parent": 500, "children": [503, 504], "start_point": {"row": 146, "column": 10}, "end_point": {"row": 146, "column": 45}}, {"id": 503, "type": "identifier", "text": "stderr", "parent": 502, "children": [], "start_point": {"row": 146, "column": 11}, "end_point": {"row": 146, "column": 17}}, {"id": 504, "type": "string_literal", "text": "\"esd connection failed\\n\"", "parent": 502, "children": [505], "start_point": {"row": 146, "column": 19}, "end_point": {"row": 146, "column": 44}}, {"id": 505, "type": "escape_sequence", "text": "\\n", "parent": 504, "children": [], "start_point": {"row": 146, "column": 41}, "end_point": {"row": 146, "column": 43}}, {"id": 506, "type": "return_statement", "text": "return 1;", "parent": 494, "children": [507], "start_point": {"row": 147, "column": 3}, "end_point": {"row": 147, "column": 12}}, {"id": 507, "type": "number_literal", "text": "1", "parent": 506, "children": [], "start_point": {"row": 147, "column": 10}, "end_point": {"row": 147, "column": 11}}, {"id": 508, "type": "#endif", "text": "#endif", "parent": 467, "children": [], "start_point": {"row": 150, "column": 0}, "end_point": {"row": 150, "column": 6}}, {"id": 509, "type": "call_expression", "text": "read(fd_in, buf, 44)", "parent": 119, "children": [510, 511], "start_point": {"row": 153, "column": 1}, "end_point": {"row": 153, "column": 21}}, {"id": 510, "type": "identifier", "text": "read", "parent": 509, "children": [], "start_point": {"row": 153, "column": 1}, "end_point": {"row": 153, "column": 5}}, {"id": 511, "type": "argument_list", "text": "(fd_in, buf, 44)", "parent": 509, "children": [512, 513, 514], "start_point": {"row": 153, "column": 5}, "end_point": {"row": 153, "column": 21}}, {"id": 512, "type": "identifier", "text": "fd_in", "parent": 511, "children": [], "start_point": {"row": 153, "column": 6}, "end_point": {"row": 153, "column": 11}}, {"id": 513, "type": "identifier", "text": "buf", "parent": 511, "children": [], "start_point": {"row": 153, "column": 13}, "end_point": {"row": 153, "column": 16}}, {"id": 514, "type": "number_literal", "text": "44", "parent": 511, "children": [], "start_point": {"row": 153, "column": 18}, "end_point": {"row": 153, "column": 20}}, {"id": 515, "type": "call_expression", "text": "write(fd_out, buf, 44 )", "parent": 119, "children": [516, 517], "start_point": {"row": 154, "column": 1}, "end_point": {"row": 154, "column": 24}}, {"id": 516, "type": "identifier", "text": "write", "parent": 515, "children": [], "start_point": {"row": 154, "column": 1}, "end_point": {"row": 154, "column": 6}}, {"id": 517, "type": "argument_list", "text": "(fd_out, buf, 44 )", "parent": 515, "children": [518, 519, 520], "start_point": {"row": 154, "column": 6}, "end_point": {"row": 154, "column": 24}}, {"id": 518, "type": "identifier", "text": "fd_out", "parent": 517, "children": [], "start_point": {"row": 154, "column": 7}, "end_point": {"row": 154, "column": 13}}, {"id": 519, "type": "identifier", "text": "buf", "parent": 517, "children": [], "start_point": {"row": 154, "column": 15}, "end_point": {"row": 154, "column": 18}}, {"id": 520, "type": "number_literal", "text": "44", "parent": 517, "children": [], "start_point": {"row": 154, "column": 20}, "end_point": {"row": 154, "column": 22}}, {"id": 521, "type": "assignment_expression", "text": "ofs = 0", "parent": 119, "children": [522, 523, 524], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 15}}, {"id": 522, "type": "identifier", "text": "ofs", "parent": 521, "children": [], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 11}}, {"id": 523, "type": "=", "text": "=", "parent": 521, "children": [], "start_point": {"row": 156, "column": 12}, "end_point": {"row": 156, "column": 13}}, {"id": 524, "type": "number_literal", "text": "0", "parent": 521, "children": [], "start_point": {"row": 156, "column": 14}, "end_point": {"row": 156, "column": 15}}, {"id": 525, "type": "while_statement", "text": "while ((len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))) > 0)\n\t{\n int count = len/sizeof(int16_t);\n int used = count*sizeof(int16_t);\n \n\t\tif (swab)\n\t\t{\n\t\t\tint i;\n\t\t\tfor (i = 0; i < count; i++)\n\t\t\t\tbuf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);\n\t\t}\n\n if (count)\n {\n Compressor_Process_int16(cmp, buf, count);\n write(fd_out, buf, used);\n }\n \n //! Fix a read which generated an incomplete sample\n ofs = len - used; \n if (ofs)\n memmove(buf, buf + used, ofs);\n\t}", "parent": 119, "children": [526], "start_point": {"row": 157, "column": 1}, "end_point": {"row": 179, "column": 2}}, {"id": 526, "type": "parenthesized_expression", "text": "((len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))) > 0)", "parent": 525, "children": [527], "start_point": {"row": 157, "column": 7}, "end_point": {"row": 157, "column": 65}}, {"id": 527, "type": "binary_expression", "text": "(len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))) > 0", "parent": 526, "children": [528, 546, 547], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 157, "column": 64}}, {"id": 528, "type": "parenthesized_expression", "text": "(len = read(fd_in, buf + ofs, 4096*sizeof(int16_t)))", "parent": 527, "children": [529], "start_point": {"row": 157, "column": 8}, "end_point": {"row": 157, "column": 60}}, {"id": 529, "type": "assignment_expression", "text": "len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))", "parent": 528, "children": [530, 531, 532], "start_point": {"row": 157, "column": 9}, "end_point": {"row": 157, "column": 59}}, {"id": 530, "type": "identifier", "text": "len", "parent": 529, "children": [], "start_point": {"row": 157, "column": 9}, "end_point": {"row": 157, "column": 12}}, {"id": 531, "type": "=", "text": "=", "parent": 529, "children": [], "start_point": {"row": 157, "column": 13}, "end_point": {"row": 157, "column": 14}}, {"id": 532, "type": "call_expression", "text": "read(fd_in, buf + ofs, 4096*sizeof(int16_t))", "parent": 529, "children": [533, 534], "start_point": {"row": 157, "column": 15}, "end_point": {"row": 157, "column": 59}}, {"id": 533, "type": "identifier", "text": "read", "parent": 532, "children": [], "start_point": {"row": 157, "column": 15}, "end_point": {"row": 157, "column": 19}}, {"id": 534, "type": "argument_list", "text": "(fd_in, buf + ofs, 4096*sizeof(int16_t))", "parent": 532, "children": [535, 536, 540], "start_point": {"row": 157, "column": 19}, "end_point": {"row": 157, "column": 59}}, {"id": 535, "type": "identifier", "text": "fd_in", "parent": 534, "children": [], "start_point": {"row": 157, "column": 20}, "end_point": {"row": 157, "column": 25}}, {"id": 536, "type": "binary_expression", "text": "buf + ofs", "parent": 534, "children": [537, 538, 539], "start_point": {"row": 157, "column": 27}, "end_point": {"row": 157, "column": 36}}, {"id": 537, "type": "identifier", "text": "buf", "parent": 536, "children": [], "start_point": {"row": 157, "column": 27}, "end_point": {"row": 157, "column": 30}}, {"id": 538, "type": "+", "text": "+", "parent": 536, "children": [], "start_point": {"row": 157, "column": 31}, "end_point": {"row": 157, "column": 32}}, {"id": 539, "type": "identifier", "text": "ofs", "parent": 536, "children": [], "start_point": {"row": 157, "column": 33}, "end_point": {"row": 157, "column": 36}}, {"id": 540, "type": "binary_expression", "text": "4096*sizeof(int16_t)", "parent": 534, "children": [541, 542, 543], "start_point": {"row": 157, "column": 38}, "end_point": {"row": 157, "column": 58}}, {"id": 541, "type": "number_literal", "text": "4096", "parent": 540, "children": [], "start_point": {"row": 157, "column": 38}, "end_point": {"row": 157, "column": 42}}, {"id": 542, "type": "*", "text": "*", "parent": 540, "children": [], "start_point": {"row": 157, "column": 42}, "end_point": {"row": 157, "column": 43}}, {"id": 543, "type": "sizeof_expression", "text": "sizeof(int16_t)", "parent": 540, "children": [544], "start_point": {"row": 157, "column": 43}, "end_point": {"row": 157, "column": 58}}, {"id": 544, "type": "type_descriptor", "text": "int16_t", "parent": 543, "children": [545], "start_point": {"row": 157, "column": 50}, "end_point": {"row": 157, "column": 57}}, {"id": 545, "type": "primitive_type", "text": "int16_t", "parent": 544, "children": [], "start_point": {"row": 157, "column": 50}, "end_point": {"row": 157, "column": 57}}, {"id": 546, "type": ">", "text": ">", "parent": 527, "children": [], "start_point": {"row": 157, "column": 61}, "end_point": {"row": 157, "column": 62}}, {"id": 547, "type": "number_literal", "text": "0", "parent": 527, "children": [], "start_point": {"row": 157, "column": 63}, "end_point": {"row": 157, "column": 64}}, {"id": 548, "type": "declaration", "text": "int count = len/sizeof(int16_t);", "parent": 525, "children": [549, 550], "start_point": {"row": 159, "column": 16}, "end_point": {"row": 159, "column": 48}}, {"id": 549, "type": "primitive_type", "text": "int", "parent": 548, "children": [], "start_point": {"row": 159, "column": 16}, "end_point": {"row": 159, "column": 19}}, {"id": 550, "type": "init_declarator", "text": "count = len/sizeof(int16_t)", "parent": 548, "children": [551, 552, 553], "start_point": {"row": 159, "column": 20}, "end_point": {"row": 159, "column": 47}}, {"id": 551, "type": "identifier", "text": "count", "parent": 550, "children": [], "start_point": {"row": 159, "column": 20}, "end_point": {"row": 159, "column": 25}}, {"id": 552, "type": "=", "text": "=", "parent": 550, "children": [], "start_point": {"row": 159, "column": 26}, "end_point": {"row": 159, "column": 27}}, {"id": 553, "type": "binary_expression", "text": "len/sizeof(int16_t)", "parent": 550, "children": [554, 555, 556], "start_point": {"row": 159, "column": 28}, "end_point": {"row": 159, "column": 47}}, {"id": 554, "type": "identifier", "text": "len", "parent": 553, "children": [], "start_point": {"row": 159, "column": 28}, "end_point": {"row": 159, "column": 31}}, {"id": 555, "type": "/", "text": "/", "parent": 553, "children": [], "start_point": {"row": 159, "column": 31}, "end_point": {"row": 159, "column": 32}}, {"id": 556, "type": "sizeof_expression", "text": "sizeof(int16_t)", "parent": 553, "children": [557], "start_point": {"row": 159, "column": 32}, "end_point": {"row": 159, "column": 47}}, {"id": 557, "type": "type_descriptor", "text": "int16_t", "parent": 556, "children": [558], "start_point": {"row": 159, "column": 39}, "end_point": {"row": 159, "column": 46}}, {"id": 558, "type": "primitive_type", "text": "int16_t", "parent": 557, "children": [], "start_point": {"row": 159, "column": 39}, "end_point": {"row": 159, "column": 46}}, {"id": 559, "type": "declaration", "text": "int used = count*sizeof(int16_t);", "parent": 525, "children": [560, 561], "start_point": {"row": 160, "column": 16}, "end_point": {"row": 160, "column": 49}}, {"id": 560, "type": "primitive_type", "text": "int", "parent": 559, "children": [], "start_point": {"row": 160, "column": 16}, "end_point": {"row": 160, "column": 19}}, {"id": 561, "type": "init_declarator", "text": "used = count*sizeof(int16_t)", "parent": 559, "children": [562, 563, 564], "start_point": {"row": 160, "column": 20}, "end_point": {"row": 160, "column": 48}}, {"id": 562, "type": "identifier", "text": "used", "parent": 561, "children": [], "start_point": {"row": 160, "column": 20}, "end_point": {"row": 160, "column": 24}}, {"id": 563, "type": "=", "text": "=", "parent": 561, "children": [], "start_point": {"row": 160, "column": 25}, "end_point": {"row": 160, "column": 26}}, {"id": 564, "type": "binary_expression", "text": "count*sizeof(int16_t)", "parent": 561, "children": [565, 566, 567], "start_point": {"row": 160, "column": 27}, "end_point": {"row": 160, "column": 48}}, {"id": 565, "type": "identifier", "text": "count", "parent": 564, "children": [], "start_point": {"row": 160, "column": 27}, "end_point": {"row": 160, "column": 32}}, {"id": 566, "type": "*", "text": "*", "parent": 564, "children": [], "start_point": {"row": 160, "column": 32}, "end_point": {"row": 160, "column": 33}}, {"id": 567, "type": "sizeof_expression", "text": "sizeof(int16_t)", "parent": 564, "children": [568], "start_point": {"row": 160, "column": 33}, "end_point": {"row": 160, "column": 48}}, {"id": 568, "type": "type_descriptor", "text": "int16_t", "parent": 567, "children": [569], "start_point": {"row": 160, "column": 40}, "end_point": {"row": 160, "column": 47}}, {"id": 569, "type": "primitive_type", "text": "int16_t", "parent": 568, "children": [], "start_point": {"row": 160, "column": 40}, "end_point": {"row": 160, "column": 47}}, {"id": 570, "type": "if_statement", "text": "if (swab)\n\t\t{\n\t\t\tint i;\n\t\t\tfor (i = 0; i < count; i++)\n\t\t\t\tbuf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);\n\t\t}", "parent": 525, "children": [571], "start_point": {"row": 162, "column": 2}, "end_point": {"row": 167, "column": 3}}, {"id": 571, "type": "parenthesized_expression", "text": "(swab)", "parent": 570, "children": [572], "start_point": {"row": 162, "column": 5}, "end_point": {"row": 162, "column": 11}}, {"id": 572, "type": "identifier", "text": "swab", "parent": 571, "children": [], "start_point": {"row": 162, "column": 6}, "end_point": {"row": 162, "column": 10}}, {"id": 573, "type": "declaration", "text": "int i;", "parent": 570, "children": [574, 575], "start_point": {"row": 164, "column": 3}, "end_point": {"row": 164, "column": 9}}, {"id": 574, "type": "primitive_type", "text": "int", "parent": 573, "children": [], "start_point": {"row": 164, "column": 3}, "end_point": {"row": 164, "column": 6}}, {"id": 575, "type": "identifier", "text": "i", "parent": 573, "children": [], "start_point": {"row": 164, "column": 7}, "end_point": {"row": 164, "column": 8}}, {"id": 576, "type": "for_statement", "text": "for (i = 0; i < count; i++)\n\t\t\t\tbuf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);", "parent": 570, "children": [577, 581, 585], "start_point": {"row": 165, "column": 3}, "end_point": {"row": 166, "column": 45}}, {"id": 577, "type": "assignment_expression", "text": "i = 0", "parent": 576, "children": [578, 579, 580], "start_point": {"row": 165, "column": 8}, "end_point": {"row": 165, "column": 13}}, {"id": 578, "type": "identifier", "text": "i", "parent": 577, "children": [], "start_point": {"row": 165, "column": 8}, "end_point": {"row": 165, "column": 9}}, {"id": 579, "type": "=", "text": "=", "parent": 577, "children": [], "start_point": {"row": 165, "column": 10}, "end_point": {"row": 165, "column": 11}}, {"id": 580, "type": "number_literal", "text": "0", "parent": 577, "children": [], "start_point": {"row": 165, "column": 12}, "end_point": {"row": 165, "column": 13}}, {"id": 581, "type": "binary_expression", "text": "i < count", "parent": 576, "children": [582, 583, 584], "start_point": {"row": 165, "column": 15}, "end_point": {"row": 165, "column": 24}}, {"id": 582, "type": "identifier", "text": "i", "parent": 581, "children": [], "start_point": {"row": 165, "column": 15}, "end_point": {"row": 165, "column": 16}}, {"id": 583, "type": "<", "text": "<", "parent": 581, "children": [], "start_point": {"row": 165, "column": 17}, "end_point": {"row": 165, "column": 18}}, {"id": 584, "type": "identifier", "text": "count", "parent": 581, "children": [], "start_point": {"row": 165, "column": 19}, "end_point": {"row": 165, "column": 24}}, {"id": 585, "type": "update_expression", "text": "i++", "parent": 576, "children": [586, 587], "start_point": {"row": 165, "column": 26}, "end_point": {"row": 165, "column": 29}}, {"id": 586, "type": "identifier", "text": "i", "parent": 585, "children": [], "start_point": {"row": 165, "column": 26}, "end_point": {"row": 165, "column": 27}}, {"id": 587, "type": "++", "text": "++", "parent": 585, "children": [], "start_point": {"row": 165, "column": 27}, "end_point": {"row": 165, "column": 29}}, {"id": 588, "type": "assignment_expression", "text": "buf[i] = ((buf[i]&255)<<8) | (buf[i]>>8)", "parent": 576, "children": [589, 592, 593], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 44}}, {"id": 589, "type": "subscript_expression", "text": "buf[i]", "parent": 588, "children": [590, 591], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 10}}, {"id": 590, "type": "identifier", "text": "buf", "parent": 589, "children": [], "start_point": {"row": 166, "column": 4}, "end_point": {"row": 166, "column": 7}}, {"id": 591, "type": "identifier", "text": "i", "parent": 589, "children": [], "start_point": {"row": 166, "column": 8}, "end_point": {"row": 166, "column": 9}}, {"id": 592, "type": "=", "text": "=", "parent": 588, "children": [], "start_point": {"row": 166, "column": 11}, "end_point": {"row": 166, "column": 12}}, {"id": 593, "type": "binary_expression", "text": "((buf[i]&255)<<8) | (buf[i]>>8)", "parent": 588, "children": [594, 604], "start_point": {"row": 166, "column": 13}, "end_point": {"row": 166, "column": 44}}, {"id": 594, "type": "parenthesized_expression", "text": "((buf[i]&255)<<8)", "parent": 593, "children": [595], "start_point": {"row": 166, "column": 13}, "end_point": {"row": 166, "column": 30}}, {"id": 595, "type": "binary_expression", "text": "(buf[i]&255)<<8", "parent": 594, "children": [596, 602, 603], "start_point": {"row": 166, "column": 14}, "end_point": {"row": 166, "column": 29}}, {"id": 596, "type": "parenthesized_expression", "text": "(buf[i]&255)", "parent": 595, "children": [597], "start_point": {"row": 166, "column": 14}, "end_point": {"row": 166, "column": 26}}, {"id": 597, "type": "binary_expression", "text": "buf[i]&255", "parent": 596, "children": [598, 601], "start_point": {"row": 166, "column": 15}, "end_point": {"row": 166, "column": 25}}, {"id": 598, "type": "subscript_expression", "text": "buf[i]", "parent": 597, "children": [599, 600], "start_point": {"row": 166, "column": 15}, "end_point": {"row": 166, "column": 21}}, {"id": 599, "type": "identifier", "text": "buf", "parent": 598, "children": [], "start_point": {"row": 166, "column": 15}, "end_point": {"row": 166, "column": 18}}, {"id": 600, "type": "identifier", "text": "i", "parent": 598, "children": [], "start_point": {"row": 166, "column": 19}, "end_point": {"row": 166, "column": 20}}, {"id": 601, "type": "number_literal", "text": "255", "parent": 597, "children": [], "start_point": {"row": 166, "column": 22}, "end_point": {"row": 166, "column": 25}}, {"id": 602, "type": "<<", "text": "<<", "parent": 595, "children": [], "start_point": {"row": 166, "column": 26}, "end_point": {"row": 166, "column": 28}}, {"id": 603, "type": "number_literal", "text": "8", "parent": 595, "children": [], "start_point": {"row": 166, "column": 28}, "end_point": {"row": 166, "column": 29}}, {"id": 604, "type": "parenthesized_expression", "text": "(buf[i]>>8)", "parent": 593, "children": [605], "start_point": {"row": 166, "column": 33}, "end_point": {"row": 166, "column": 44}}, {"id": 605, "type": "binary_expression", "text": "buf[i]>>8", "parent": 604, "children": [606, 609, 610], "start_point": {"row": 166, "column": 34}, "end_point": {"row": 166, "column": 43}}, {"id": 606, "type": "subscript_expression", "text": "buf[i]", "parent": 605, "children": [607, 608], "start_point": {"row": 166, "column": 34}, "end_point": {"row": 166, "column": 40}}, {"id": 607, "type": "identifier", "text": "buf", "parent": 606, "children": [], "start_point": {"row": 166, "column": 34}, "end_point": {"row": 166, "column": 37}}, {"id": 608, "type": "identifier", "text": "i", "parent": 606, "children": [], "start_point": {"row": 166, "column": 38}, "end_point": {"row": 166, "column": 39}}, {"id": 609, "type": ">>", "text": ">>", "parent": 605, "children": [], "start_point": {"row": 166, "column": 40}, "end_point": {"row": 166, "column": 42}}, {"id": 610, "type": "number_literal", "text": "8", "parent": 605, "children": [], "start_point": {"row": 166, "column": 42}, "end_point": {"row": 166, "column": 43}}, {"id": 611, "type": "if_statement", "text": "if (count)\n {\n Compressor_Process_int16(cmp, buf, count);\n write(fd_out, buf, used);\n }", "parent": 525, "children": [612], "start_point": {"row": 169, "column": 16}, "end_point": {"row": 173, "column": 17}}, {"id": 612, "type": "parenthesized_expression", "text": "(count)", "parent": 611, "children": [613], "start_point": {"row": 169, "column": 19}, "end_point": {"row": 169, "column": 26}}, {"id": 613, "type": "identifier", "text": "count", "parent": 612, "children": [], "start_point": {"row": 169, "column": 20}, "end_point": {"row": 169, "column": 25}}, {"id": 614, "type": "call_expression", "text": "Compressor_Process_int16(cmp, buf, count)", "parent": 611, "children": [615, 616], "start_point": {"row": 171, "column": 24}, "end_point": {"row": 171, "column": 65}}, {"id": 615, "type": "identifier", "text": "Compressor_Process_int16", "parent": 614, "children": [], "start_point": {"row": 171, "column": 24}, "end_point": {"row": 171, "column": 48}}, {"id": 616, "type": "argument_list", "text": "(cmp, buf, count)", "parent": 614, "children": [617, 618, 619], "start_point": {"row": 171, "column": 48}, "end_point": {"row": 171, "column": 65}}, {"id": 617, "type": "identifier", "text": "cmp", "parent": 616, "children": [], "start_point": {"row": 171, "column": 49}, "end_point": {"row": 171, "column": 52}}, {"id": 618, "type": "identifier", "text": "buf", "parent": 616, "children": [], "start_point": {"row": 171, "column": 54}, "end_point": {"row": 171, "column": 57}}, {"id": 619, "type": "identifier", "text": "count", "parent": 616, "children": [], "start_point": {"row": 171, "column": 59}, "end_point": {"row": 171, "column": 64}}, {"id": 620, "type": "call_expression", "text": "write(fd_out, buf, used)", "parent": 611, "children": [621, 622], "start_point": {"row": 172, "column": 24}, "end_point": {"row": 172, "column": 48}}, {"id": 621, "type": "identifier", "text": "write", "parent": 620, "children": [], "start_point": {"row": 172, "column": 24}, "end_point": {"row": 172, "column": 29}}, {"id": 622, "type": "argument_list", "text": "(fd_out, buf, used)", "parent": 620, "children": [623, 624, 625], "start_point": {"row": 172, "column": 29}, "end_point": {"row": 172, "column": 48}}, {"id": 623, "type": "identifier", "text": "fd_out", "parent": 622, "children": [], "start_point": {"row": 172, "column": 30}, "end_point": {"row": 172, "column": 36}}, {"id": 624, "type": "identifier", "text": "buf", "parent": 622, "children": [], "start_point": {"row": 172, "column": 38}, "end_point": {"row": 172, "column": 41}}, {"id": 625, "type": "identifier", "text": "used", "parent": 622, "children": [], "start_point": {"row": 172, "column": 43}, "end_point": {"row": 172, "column": 47}}, {"id": 626, "type": "assignment_expression", "text": "ofs = len - used", "parent": 525, "children": [627, 628, 629], "start_point": {"row": 176, "column": 16}, "end_point": {"row": 176, "column": 32}}, {"id": 627, "type": "identifier", "text": "ofs", "parent": 626, "children": [], "start_point": {"row": 176, "column": 16}, "end_point": {"row": 176, "column": 19}}, {"id": 628, "type": "=", "text": "=", "parent": 626, "children": [], "start_point": {"row": 176, "column": 20}, "end_point": {"row": 176, "column": 21}}, {"id": 629, "type": "binary_expression", "text": "len - used", "parent": 626, "children": [630, 631, 632], "start_point": {"row": 176, "column": 22}, "end_point": {"row": 176, "column": 32}}, {"id": 630, "type": "identifier", "text": "len", "parent": 629, "children": [], "start_point": {"row": 176, "column": 22}, "end_point": {"row": 176, "column": 25}}, {"id": 631, "type": "-", "text": "-", "parent": 629, "children": [], "start_point": {"row": 176, "column": 26}, "end_point": {"row": 176, "column": 27}}, {"id": 632, "type": "identifier", "text": "used", "parent": 629, "children": [], "start_point": {"row": 176, "column": 28}, "end_point": {"row": 176, "column": 32}}, {"id": 633, "type": "if_statement", "text": "if (ofs)\n memmove(buf, buf + used, ofs);", "parent": 525, "children": [634], "start_point": {"row": 177, "column": 16}, "end_point": {"row": 178, "column": 54}}, {"id": 634, "type": "parenthesized_expression", "text": "(ofs)", "parent": 633, "children": [635], "start_point": {"row": 177, "column": 19}, "end_point": {"row": 177, "column": 24}}, {"id": 635, "type": "identifier", "text": "ofs", "parent": 634, "children": [], "start_point": {"row": 177, "column": 20}, "end_point": {"row": 177, "column": 23}}, {"id": 636, "type": "call_expression", "text": "memmove(buf, buf + used, ofs)", "parent": 633, "children": [637, 638], "start_point": {"row": 178, "column": 24}, "end_point": {"row": 178, "column": 53}}, {"id": 637, "type": "identifier", "text": "memmove", "parent": 636, "children": [], "start_point": {"row": 178, "column": 24}, "end_point": {"row": 178, "column": 31}}, {"id": 638, "type": "argument_list", "text": "(buf, buf + used, ofs)", "parent": 636, "children": [639, 640, 644], "start_point": {"row": 178, "column": 31}, "end_point": {"row": 178, "column": 53}}, {"id": 639, "type": "identifier", "text": "buf", "parent": 638, "children": [], "start_point": {"row": 178, "column": 32}, "end_point": {"row": 178, "column": 35}}, {"id": 640, "type": "binary_expression", "text": "buf + used", "parent": 638, "children": [641, 642, 643], "start_point": {"row": 178, "column": 37}, "end_point": {"row": 178, "column": 47}}, {"id": 641, "type": "identifier", "text": "buf", "parent": 640, "children": [], "start_point": {"row": 178, "column": 37}, "end_point": {"row": 178, "column": 40}}, {"id": 642, "type": "+", "text": "+", "parent": 640, "children": [], "start_point": {"row": 178, "column": 41}, "end_point": {"row": 178, "column": 42}}, {"id": 643, "type": "identifier", "text": "used", "parent": 640, "children": [], "start_point": {"row": 178, "column": 43}, "end_point": {"row": 178, "column": 47}}, {"id": 644, "type": "identifier", "text": "ofs", "parent": 638, "children": [], "start_point": {"row": 178, "column": 49}, "end_point": {"row": 178, "column": 52}}, {"id": 645, "type": "if_statement", "text": "if (len < 0)\n\t{\n\t\tperror(\"AudioCompress\");\n\t\treturn 1;\n\t}", "parent": 119, "children": [646], "start_point": {"row": 181, "column": 1}, "end_point": {"row": 185, "column": 2}}, {"id": 646, "type": "parenthesized_expression", "text": "(len < 0)", "parent": 645, "children": [647], "start_point": {"row": 181, "column": 4}, "end_point": {"row": 181, "column": 13}}, {"id": 647, "type": "binary_expression", "text": "len < 0", "parent": 646, "children": [648, 649, 650], "start_point": {"row": 181, "column": 5}, "end_point": {"row": 181, "column": 12}}, {"id": 648, "type": "identifier", "text": "len", "parent": 647, "children": [], "start_point": {"row": 181, "column": 5}, "end_point": {"row": 181, "column": 8}}, {"id": 649, "type": "<", "text": "<", "parent": 647, "children": [], "start_point": {"row": 181, "column": 9}, "end_point": {"row": 181, "column": 10}}, {"id": 650, "type": "number_literal", "text": "0", "parent": 647, "children": [], "start_point": {"row": 181, "column": 11}, "end_point": {"row": 181, "column": 12}}, {"id": 651, "type": "call_expression", "text": "perror(\"AudioCompress\")", "parent": 645, "children": [652, 653], "start_point": {"row": 183, "column": 2}, "end_point": {"row": 183, "column": 25}}, {"id": 652, "type": "identifier", "text": "perror", "parent": 651, "children": [], "start_point": {"row": 183, "column": 2}, "end_point": {"row": 183, "column": 8}}, {"id": 653, "type": "argument_list", "text": "(\"AudioCompress\")", "parent": 651, "children": [654], "start_point": {"row": 183, "column": 8}, "end_point": {"row": 183, "column": 25}}, {"id": 654, "type": "string_literal", "text": "\"AudioCompress\"", "parent": 653, "children": [], "start_point": {"row": 183, "column": 9}, "end_point": {"row": 183, "column": 24}}, {"id": 655, "type": "return_statement", "text": "return 1;", "parent": 645, "children": [656], "start_point": {"row": 184, "column": 2}, "end_point": {"row": 184, "column": 11}}, {"id": 656, "type": "number_literal", "text": "1", "parent": 655, "children": [], "start_point": {"row": 184, "column": 9}, "end_point": {"row": 184, "column": 10}}, {"id": 657, "type": "return_statement", "text": "return 0;", "parent": 119, "children": [658], "start_point": {"row": 187, "column": 1}, "end_point": {"row": 187, "column": 10}}, {"id": 658, "type": "number_literal", "text": "0", "parent": 657, "children": [], "start_point": {"row": 187, "column": 8}, "end_point": {"row": 187, "column": 9}}, {"id": 659, "type": "function_definition", "text": "int main(int argc, char *argv[])\n{\n struct Compressor *cmp = Compressor_new(0);\n int ret = Run(argc, argv, cmp);\n Compressor_delete(cmp);\n return ret;\n}", "parent": null, "children": [660, 661], "start_point": {"row": 191, "column": 0}, "end_point": {"row": 197, "column": 1}}, {"id": 660, "type": "primitive_type", "text": "int", "parent": 659, "children": [], "start_point": {"row": 191, "column": 0}, "end_point": {"row": 191, "column": 3}}, {"id": 661, "type": "function_declarator", "text": "main(int argc, char *argv[])", "parent": 659, "children": [662, 663], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 32}}, {"id": 662, "type": "identifier", "text": "main", "parent": 661, "children": [], "start_point": {"row": 191, "column": 4}, "end_point": {"row": 191, "column": 8}}, {"id": 663, "type": "parameter_list", "text": "(int argc, char *argv[])", "parent": 661, "children": [664, 667], "start_point": {"row": 191, "column": 8}, "end_point": {"row": 191, "column": 32}}, {"id": 664, "type": "parameter_declaration", "text": "int argc", "parent": 663, "children": [665, 666], "start_point": {"row": 191, "column": 9}, "end_point": {"row": 191, "column": 17}}, {"id": 665, "type": "primitive_type", "text": "int", "parent": 664, "children": [], "start_point": {"row": 191, "column": 9}, "end_point": {"row": 191, "column": 12}}, {"id": 666, "type": "identifier", "text": "argc", "parent": 664, "children": [], "start_point": {"row": 191, "column": 13}, "end_point": {"row": 191, "column": 17}}, {"id": 667, "type": "parameter_declaration", "text": "char *argv[]", "parent": 663, "children": [668, 669], "start_point": {"row": 191, "column": 19}, "end_point": {"row": 191, "column": 31}}, {"id": 668, "type": "primitive_type", "text": "char", "parent": 667, "children": [], "start_point": {"row": 191, "column": 19}, "end_point": {"row": 191, "column": 23}}, {"id": 669, "type": "pointer_declarator", "text": "*argv[]", "parent": 667, "children": [670, 671], "start_point": {"row": 191, "column": 24}, "end_point": {"row": 191, "column": 31}}, {"id": 670, "type": "*", "text": "*", "parent": 669, "children": [], "start_point": {"row": 191, "column": 24}, "end_point": {"row": 191, "column": 25}}, {"id": 671, "type": "array_declarator", "text": "argv[]", "parent": 669, "children": [672], "start_point": {"row": 191, "column": 25}, "end_point": {"row": 191, "column": 31}}, {"id": 672, "type": "identifier", "text": "argv", "parent": 671, "children": [], "start_point": {"row": 191, "column": 25}, "end_point": {"row": 191, "column": 29}}, {"id": 673, "type": "declaration", "text": "struct Compressor *cmp = Compressor_new(0);", "parent": 659, "children": [674, 677], "start_point": {"row": 193, "column": 8}, "end_point": {"row": 193, "column": 51}}, {"id": 674, "type": "struct_specifier", "text": "struct Compressor", "parent": 673, "children": [675, 676], "start_point": {"row": 193, "column": 8}, "end_point": {"row": 193, "column": 25}}, {"id": 675, "type": "struct", "text": "struct", "parent": 674, "children": [], "start_point": {"row": 193, "column": 8}, "end_point": {"row": 193, "column": 14}}, {"id": 676, "type": "type_identifier", "text": "Compressor", "parent": 674, "children": [], "start_point": {"row": 193, "column": 15}, "end_point": {"row": 193, "column": 25}}, {"id": 677, "type": "init_declarator", "text": "*cmp = Compressor_new(0)", "parent": 673, "children": [678, 681, 682], "start_point": {"row": 193, "column": 26}, "end_point": {"row": 193, "column": 50}}, {"id": 678, "type": "pointer_declarator", "text": "*cmp", "parent": 677, "children": [679, 680], "start_point": {"row": 193, "column": 26}, "end_point": {"row": 193, "column": 30}}, {"id": 679, "type": "*", "text": "*", "parent": 678, "children": [], "start_point": {"row": 193, "column": 26}, "end_point": {"row": 193, "column": 27}}, {"id": 680, "type": "identifier", "text": "cmp", "parent": 678, "children": [], "start_point": {"row": 193, "column": 27}, "end_point": {"row": 193, "column": 30}}, {"id": 681, "type": "=", "text": "=", "parent": 677, "children": [], "start_point": {"row": 193, "column": 31}, "end_point": {"row": 193, "column": 32}}, {"id": 682, "type": "call_expression", "text": "Compressor_new(0)", "parent": 677, "children": [683, 684], "start_point": {"row": 193, "column": 33}, "end_point": {"row": 193, "column": 50}}, {"id": 683, "type": "identifier", "text": "Compressor_new", "parent": 682, "children": [], "start_point": {"row": 193, "column": 33}, "end_point": {"row": 193, "column": 47}}, {"id": 684, "type": "argument_list", "text": "(0)", "parent": 682, "children": [685], "start_point": {"row": 193, "column": 47}, "end_point": {"row": 193, "column": 50}}, {"id": 685, "type": "number_literal", "text": "0", "parent": 684, "children": [], "start_point": {"row": 193, "column": 48}, "end_point": {"row": 193, "column": 49}}, {"id": 686, "type": "declaration", "text": "int ret = Run(argc, argv, cmp);", "parent": 659, "children": [687, 688], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 194, "column": 39}}, {"id": 687, "type": "primitive_type", "text": "int", "parent": 686, "children": [], "start_point": {"row": 194, "column": 8}, "end_point": {"row": 194, "column": 11}}, {"id": 688, "type": "init_declarator", "text": "ret = Run(argc, argv, cmp)", "parent": 686, "children": [689, 690, 691], "start_point": {"row": 194, "column": 12}, "end_point": {"row": 194, "column": 38}}, {"id": 689, "type": "identifier", "text": "ret", "parent": 688, "children": [], "start_point": {"row": 194, "column": 12}, "end_point": {"row": 194, "column": 15}}, {"id": 690, "type": "=", "text": "=", "parent": 688, "children": [], "start_point": {"row": 194, "column": 16}, "end_point": {"row": 194, "column": 17}}, {"id": 691, "type": "call_expression", "text": "Run(argc, argv, cmp)", "parent": 688, "children": [692, 693], "start_point": {"row": 194, "column": 18}, "end_point": {"row": 194, "column": 38}}, {"id": 692, "type": "identifier", "text": "Run", "parent": 691, "children": [], "start_point": {"row": 194, "column": 18}, "end_point": {"row": 194, "column": 21}}, {"id": 693, "type": "argument_list", "text": "(argc, argv, cmp)", "parent": 691, "children": [694, 695, 696], "start_point": {"row": 194, "column": 21}, "end_point": {"row": 194, "column": 38}}, {"id": 694, "type": "identifier", "text": "argc", "parent": 693, "children": [], "start_point": {"row": 194, "column": 22}, "end_point": {"row": 194, "column": 26}}, {"id": 695, "type": "identifier", "text": "argv", "parent": 693, "children": [], "start_point": {"row": 194, "column": 28}, "end_point": {"row": 194, "column": 32}}, {"id": 696, "type": "identifier", "text": "cmp", "parent": 693, "children": [], "start_point": {"row": 194, "column": 34}, "end_point": {"row": 194, "column": 37}}, {"id": 697, "type": "call_expression", "text": "Compressor_delete(cmp)", "parent": 659, "children": [698, 699], "start_point": {"row": 195, "column": 8}, "end_point": {"row": 195, "column": 30}}, {"id": 698, "type": "identifier", "text": "Compressor_delete", "parent": 697, "children": [], "start_point": {"row": 195, "column": 8}, "end_point": {"row": 195, "column": 25}}, {"id": 699, "type": "argument_list", "text": "(cmp)", "parent": 697, "children": [700], "start_point": {"row": 195, "column": 25}, "end_point": {"row": 195, "column": 30}}, {"id": 700, "type": "identifier", "text": "cmp", "parent": 699, "children": [], "start_point": {"row": 195, "column": 26}, "end_point": {"row": 195, "column": 29}}, {"id": 701, "type": "return_statement", "text": "return ret;", "parent": 659, "children": [702], "start_point": {"row": 196, "column": 8}, "end_point": {"row": 196, "column": 19}}, {"id": 702, "type": "identifier", "text": "ret", "parent": 701, "children": [], "start_point": {"row": 196, "column": 15}, "end_point": {"row": 196, "column": 18}}]}, "node_categories": {"declarations": {"functions": [31, 33, 119, 121, 659, 661], "variables": [36, 124, 127, 133, 140, 145, 152, 155, 164, 170, 180, 193, 386, 548, 559, 573, 664, 667, 673, 686], "classes": [134, 135, 181, 182, 674, 675], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 27, 28], "modules": [], "enums": []}, "statements": {"expressions": [41, 48, 55, 64, 73, 82, 91, 102, 111, 189, 198, 205, 210, 211, 212, 216, 232, 261, 265, 270, 271, 272, 273, 279, 280, 285, 303, 307, 312, 313, 314, 315, 321, 322, 327, 345, 349, 354, 355, 356, 357, 363, 364, 369, 393, 398, 399, 403, 412, 449, 452, 459, 462, 471, 479, 482, 483, 484, 491, 495, 496, 500, 509, 515, 526, 527, 528, 532, 536, 540, 543, 553, 556, 564, 567, 571, 581, 585, 589, 593, 594, 595, 596, 597, 598, 604, 605, 606, 612, 614, 620, 629, 634, 636, 640, 646, 647, 651, 682, 691, 697], "assignments": [213, 243, 247, 260, 302, 344, 425, 437, 473, 476, 521, 529, 577, 588, 626], "loops": [209, 525, 576], "conditionals": [24, 25, 26, 30, 34, 40, 42, 44, 47, 49, 51, 56, 58, 63, 65, 67, 72, 74, 76, 81, 83, 85, 90, 92, 94, 99, 100, 101, 103, 105, 110, 112, 114, 122, 126, 132, 136, 139, 143, 148, 151, 154, 158, 161, 162, 163, 167, 175, 179, 183, 187, 190, 192, 196, 199, 201, 203, 206, 208, 214, 217, 219, 220, 222, 224, 226, 230, 231, 233, 234, 235, 236, 237, 238, 244, 248, 250, 253, 254, 255, 262, 263, 266, 268, 269, 274, 275, 281, 282, 286, 288, 291, 296, 297, 304, 305, 308, 310, 311, 316, 317, 323, 324, 328, 330, 333, 338, 339, 346, 347, 350, 352, 353, 358, 359, 365, 366, 370, 372, 375, 380, 381, 387, 391, 394, 396, 397, 400, 404, 406, 409, 413, 415, 416, 419, 420, 426, 431, 432, 438, 443, 444, 450, 453, 457, 460, 463, 467, 468, 469, 470, 472, 474, 477, 480, 485, 486, 487, 488, 489, 490, 492, 494, 497, 501, 503, 508, 510, 512, 513, 516, 518, 519, 522, 530, 533, 535, 537, 539, 551, 554, 562, 565, 570, 572, 575, 578, 582, 584, 586, 590, 591, 599, 600, 607, 608, 611, 613, 615, 617, 618, 619, 621, 623, 624, 625, 627, 630, 632, 633, 635, 637, 639, 641, 643, 644, 645, 648, 652, 662, 666, 672, 676, 680, 683, 689, 692, 694, 695, 696, 698, 700, 702], "returns": [292, 334, 376, 410, 455, 465, 506, 655, 657, 701], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 29, 45, 52, 59, 68, 77, 86, 95, 106, 115, 144, 150, 160, 169, 223, 225, 227, 229, 239, 246, 256, 277, 284, 289, 293, 298, 319, 326, 331, 335, 340, 361, 368, 373, 377, 382, 402, 407, 411, 421, 428, 433, 440, 445, 454, 456, 464, 466, 493, 499, 504, 507, 514, 520, 524, 541, 547, 580, 601, 603, 610, 650, 654, 656, 658, 685], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 31, "universal_type": "function", "name": "showhelp", "text_snippet": "void showhelp(char *name)\n{\n\tfprintf(stderr, \"Usage: %s [options] < raw_sample_in > raw_sample_out 2"}, {"node_id": 33, "universal_type": "function", "name": "unknown", "text_snippet": "showhelp(char *name)"}, {"node_id": 119, "universal_type": "function", "name": "Run", "text_snippet": "int Run(int argc, char *argv[], struct Compressor *cmp)\n{\n\tint16_t buf[4096];\n int ofs = 0, l"}, {"node_id": 121, "universal_type": "function", "name": "Compressor", "text_snippet": "Run(int argc, char *argv[], struct Compressor *cmp)"}, {"node_id": 659, "universal_type": "function", "name": "main", "text_snippet": "int main(int argc, char *argv[])\n{\n struct Compressor *cmp = Compressor_new(0);\n int r"}, {"node_id": 661, "universal_type": "function", "name": "unknown", "text_snippet": "main(int argc, char *argv[])"}], "class_declarations": [{"node_id": 134, "universal_type": "class", "name": "Compressor", "text_snippet": "struct Compressor"}, {"node_id": 135, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 181, "universal_type": "class", "name": "CompressorConfig", "text_snippet": "struct CompressorConfig"}, {"node_id": 182, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 674, "universal_type": "class", "name": "Compressor", "text_snippet": "struct Compressor"}, {"node_id": 675, "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 <sys/types.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <errno.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 <string.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"compress.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"config.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 27, "text": "#include \"esd.h\"\n"}, {"node_id": 28, "text": "#include"}]}, "original_source_code": "/*! AudioCompress.c\n * Simple commandline audio compressor\n *\n * (c)2002-2007 busybee (http://beesbuzz.biz/)\n * Licensed under the terms of the LGPL. See the file COPYING for details.\n */\n\n#include <stdio.h>\n#include <sys/types.h>\n#include <errno.h>\n\n#include <unistd.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"compress.h\"\n#include \"config.h\"\n\n#ifdef USE_ESD\n#include \"esd.h\"\n#endif\n\nvoid showhelp(char *name)\n{\n\tfprintf(stderr, \"Usage: %s [options] < raw_sample_in > raw_sample_out 2>log\\n\", name);\n\tfprintf(stderr, \"\\nOptions:\\n\");\n\tfprintf(stderr,\n\t\t\"\\t-t #\\tSet the target signal level (1-32767; default: %d)\\n\",\n\t\tTARGET);\n\tfprintf(stderr,\n\t\t\"\\t-g #\\tSet the maximum gain (1-255; default: %d)\\n\",\n\t\tGAINMAX);\n\tfprintf(stderr,\n\t\t\"\\t-s #\\tSet the gain smoothing exponent (1-15; default: %d)\\n\",\n\t\tGAINSMOOTH);\n\tfprintf(stderr,\n\t\t\"\\t-b #\\tSet the history length (default: %d)\\n\",\n\t\tBUCKETS);\n\tfprintf(stderr,\n\t\t\"\\t-x/-X \\tEnable/disable byte swapping\\n\");\n\n#ifdef USE_ESD\n\tfprintf(stderr,\n\t\t\"\\t-e [host]\\tConnect to esound daemon\\n\");\n#endif\n\n\tfprintf(stderr, \"\\t-h\\tShow this usage information\\n\");\n}\n\nint Run(int argc, char *argv[], struct Compressor *cmp)\n{\n\tint16_t buf[4096];\n int ofs = 0, len;\n\tint opt;\n\tint swab = 0;\n#ifdef USE_ESD\n\tint esd = 0;\n\tchar *esd_host = NULL;\n#endif\n struct CompressorConfig *cfg = Compressor_getConfig(cmp);\n\tint fd_in = fileno(stdin), fd_out = fileno(stdout);\n\n\twhile ((opt = getopt(argc, argv,\n#ifdef USE_ESD\n\t\t\t\t\t\"e:\"\n#endif\n\t\t\t\t\t\"t:g:s:b:xXh\")) >= 0)\n\t{\n\t\tswitch(opt)\n\t\t{\n#ifdef USE_ESD\n\t\tcase 'e':\n\t\t\tesd = 1;\n\t\t\tesd_host = optarg;\n\t\t\tbreak;\n#endif\n\t\tcase 't':\n\t\t\tcfg->target = atoi(optarg);\n\t\t\tif (cfg->target < 0 || cfg->target > 32767)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid target level %s\\n\", optarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'g':\n\t\t\tcfg->maxgain = atoi(optarg);\n\t\t\tif (cfg->maxgain < 0 || cfg->maxgain > 255)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid maximum gain %s\\n\", optarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 's':\n\t\t\tcfg->smooth = atoi(optarg);\n\t\t\tif (cfg->smooth < 0 || cfg->smooth > 15)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid smoothing value %s\\n\",\n\t\t\t\t\toptarg);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 'b':\n {\n\t\t\tunsigned int hsize = atoi(optarg);\n\t\t\tif (hsize < 1)\n\t\t\t{\n\t\t\t\tfprintf(stderr,\n\t\t\t\t\t\"Invalid history size %s\\n\",\n\t\t\t\t\toptarg);\n\t\t\t\treturn 1;\n\t\t\t}\n Compressor_setHistory(cmp, hsize);\n\t\t\tbreak;\n }\n\n\t\tcase 'x':\n\t\t\tswab = 1;\n\t\t\tbreak;\n\t\tcase 'X':\n\t\t\tswab = 0;\n\t\t\tbreak;\n\n\t\tcase 'h':\n\t\t\tshowhelp(argv[0]);\n\t\t\treturn 0;\n\n\t\tdefault:\n\t\t\tshowhelp(argv[0]);\n\t\t\treturn 1;\n\t\t}\n\t}\n\n#ifdef USE_ESD\n\tif (esd)\n {\n\t\tfd_in = fd_out = esd_filter_stream(\n\t\t\tESD_BITS16|ESD_STEREO|ESD_STREAM|ESD_PLAY,\n\t\t\tESD_DEFAULT_RATE, esd_host, argv[0]);\n\t\t\n\t\tif (fd_in < 0) {\n\t\t\tfprintf(stderr, \"esd connection failed\\n\");\n\t\t\treturn 1;\n\t\t}\n\t}\t\n#endif\n\n\t// skip 44 byte way header\n\tread(fd_in, buf, 44);\n\twrite(fd_out, buf, 44 );\n\n ofs = 0;\n\twhile ((len = read(fd_in, buf + ofs, 4096*sizeof(int16_t))) > 0)\n\t{\n int count = len/sizeof(int16_t);\n int used = count*sizeof(int16_t);\n \n\t\tif (swab)\n\t\t{\n\t\t\tint i;\n\t\t\tfor (i = 0; i < count; i++)\n\t\t\t\tbuf[i] = ((buf[i]&255)<<8) | (buf[i]>>8);\n\t\t}\n\n if (count)\n {\n Compressor_Process_int16(cmp, buf, count);\n write(fd_out, buf, used);\n }\n \n //! Fix a read which generated an incomplete sample\n ofs = len - used; \n if (ofs)\n memmove(buf, buf + used, ofs);\n\t}\n\n\tif (len < 0)\n\t{\n\t\tperror(\"AudioCompress\");\n\t\treturn 1;\n\t}\n\n\treturn 0;\n}\n\n//! I'd rather be using C++, what with scope-lifeime objects and so on. Sigh.\nint main(int argc, char *argv[])\n{\n struct Compressor *cmp = Compressor_new(0);\n int ret = Run(argc, argv, cmp);\n Compressor_delete(cmp);\n return ret;\n}\n"}
36
c
// // AddTodoItemViewController.h // TodoList // // Created by Sovelluskontti on 03/03/2017. // Copyright © 2017 Sovelluskontti. All rights reserved. // #import <UIKit/UIKit.h> #import "TodoItem.h" @interface AddTodoItemViewController : UIViewController @property TodoItem *todoItem; @end
23.42
12
(translation_unit) "//\n// AddTodoItemViewController.h\n// TodoList\n//\n// Created by Sovelluskontti on 03/03/2017.\n// Copyright © 2017 Sovelluskontti. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#import "TodoItem.h"\n\n@interface AddTodoItemViewController : UIViewController\n\n@property TodoItem *todoItem;\n\n@end\n" (comment) "//" (comment) "// AddTodoItemViewController.h" (comment) "// TodoList" (comment) "//" (comment) "// Created by Sovelluskontti on 03/03/2017." (comment) "// Copyright © 2017 Sovelluskontti. All rights reserved.\n" (comment) "/\n" (preproc_call) "import <UIKit/UIKit.h>\n#" (preproc_directive) "import " (preproc_arg) "UIKit/UIKit.h>\n" (preproc_call) "import "TodoItem.h"\n\n" (preproc_directive) "import " (preproc_arg) "TodoItem.h"\n" (ERROR) "i" (ERROR) "i" (declaration) "nterface AddTodoItemViewController : UIViewController\n\n@property TodoItem *todoItem;\n" (type_identifier) "nterface " (ERROR) "ddTodoItemViewController : UIViewController\n\n@property TodoItem " (identifier) "ddTodoItemViewController " (:) " " (identifier) "IViewController\n" (ERROR) "p" (identifier) "roperty " (identifier) "odoItem " (pointer_declarator) "todoItem;" (*) "t" (identifier) "odoItem;" (;) "\n" (ERROR) "e" (ERROR) "e" (expression_statement) "nd\n" (identifier) "nd\n" (;) ""
34
6
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 23.42, "nodes": 20, "errors": 0, "source_hash": "1d60930e63628b70433e2d59ec48a7dabf0b326a1d7b4e6edf248916090a5d5b", "categorized_nodes": 10}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "import <UIKit/UIKit.h>\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": "preproc_call", "text": "import \"TodoItem.h\"\n\n", "parent": null, "children": [3], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 3, "type": "preproc_arg", "text": "TodoItem.h\"\n", "parent": 2, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 20}}, {"id": 4, "type": "ERROR", "text": "i", "parent": null, "children": [5], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 5, "type": "ERROR", "text": "i", "parent": 4, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 6, "type": "declaration", "text": "nterface AddTodoItemViewController : UIViewController\n\n@property TodoItem *todoItem;\n", "parent": null, "children": [7, 8, 14], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 13, "column": 29}}, {"id": 7, "type": "type_identifier", "text": "nterface ", "parent": 6, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 10}}, {"id": 8, "type": "ERROR", "text": "ddTodoItemViewController : UIViewController\n\n@property TodoItem ", "parent": 6, "children": [9, 10, 11, 12, 13], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 13, "column": 18}}, {"id": 9, "type": "identifier", "text": "ddTodoItemViewController ", "parent": 8, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 36}}, {"id": 10, "type": "identifier", "text": "IViewController\n", "parent": 8, "children": [], "start_point": {"row": 11, "column": 39}, "end_point": {"row": 11, "column": 55}}, {"id": 11, "type": "ERROR", "text": "p", "parent": 8, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 12, "type": "identifier", "text": "roperty ", "parent": 8, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 9}}, {"id": 13, "type": "identifier", "text": "odoItem ", "parent": 8, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 18}}, {"id": 14, "type": "pointer_declarator", "text": "todoItem;", "parent": 6, "children": [15, 16], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 28}}, {"id": 15, "type": "*", "text": "t", "parent": 14, "children": [], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 20}}, {"id": 16, "type": "identifier", "text": "odoItem;", "parent": 14, "children": [], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 28}}, {"id": 17, "type": "ERROR", "text": "e", "parent": null, "children": [18], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 18, "type": "ERROR", "text": "e", "parent": 17, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 19, "type": "identifier", "text": "nd\n", "parent": null, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [6], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [7, 9, 10, 12, 13, 16, 19], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 2], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// AddTodoItemViewController.h\n// TodoList\n//\n// Created by Sovelluskontti on 03/03/2017.\n// Copyright \u00a9 2017 Sovelluskontti. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#import \"TodoItem.h\"\n\n@interface AddTodoItemViewController : UIViewController\n\n@property TodoItem *todoItem;\n\n@end\n"}
37
c
#ifndef __DEBUG_USB_OUTPUT_H #define __DEBUG_USB_OUTPUT_H #include "debug_control.h" #ifdef ENABLE_USB_DEBUG #include "usbd_def.h" extern void usb_debug_usb_setup_trace(const char *source, USBD_SetupReqTypedef *req); #define usb_debug_write_counter debug_write_counter #define usb_debug_write_string debug_write_string #define usb_debug_write_int debug_write_int #define usb_debug_write_newline debug_write_newline #else #define usb_debug_usb_setup_trace(source, req) #define usb_debug_write_counter() #define usb_debug_write_string(s) #define usb_debug_write_int(v) #define usb_debug_write_newline() #endif #endif
34.67
18
(translation_unit) "#ifndef __DEBUG_USB_OUTPUT_H\n#define __DEBUG_USB_OUTPUT_H\n\n#include "debug_control.h"\n\n#ifdef ENABLE_USB_DEBUG\n\n#include "usbd_def.h"\n extern void usb_debug_usb_setup_trace(const char *source, USBD_SetupReqTypedef *req);\n\n #define usb_debug_write_counter debug_write_counter\n #define usb_debug_write_string debug_write_string\n #define usb_debug_write_int debug_write_int\n #define usb_debug_write_newline debug_write_newline\n\n#else\n\n #define usb_debug_usb_setup_trace(source, req)\n\n #define usb_debug_write_counter()\n\n #define usb_debug_write_string(s)\n #define usb_debug_write_int(v)\n #define usb_debug_write_newline()\n\n#endif\n\n#endif\n" (preproc_ifdef) "#ifndef __DEBUG_USB_OUTPUT_H\n#define __DEBUG_USB_OUTPUT_H\n\n#include "debug_control.h"\n\n#ifdef ENABLE_USB_DEBUG\n\n#include "usbd_def.h"\n extern void usb_debug_usb_setup_trace(const char *source, USBD_SetupReqTypedef *req);\n\n #define usb_debug_write_counter debug_write_counter\n #define usb_debug_write_string debug_write_string\n #define usb_debug_write_int debug_write_int\n #define usb_debug_write_newline debug_write_newline\n\n#else\n\n #define usb_debug_usb_setup_trace(source, req)\n\n #define usb_debug_write_counter()\n\n #define usb_debug_write_string(s)\n #define usb_debug_write_int(v)\n #define usb_debug_write_newline()\n\n#endif\n\n#endif" (#ifndef) "#ifndef" (identifier) "__DEBUG_USB_OUTPUT_H" (preproc_def) "#define __DEBUG_USB_OUTPUT_H\n" (#define) "#define" (identifier) "__DEBUG_USB_OUTPUT_H" (preproc_include) "#include "debug_control.h"\n" (#include) "#include" (string_literal) ""debug_control.h"" (") """ (string_content) "debug_control.h" (") """ (preproc_ifdef) "#ifdef ENABLE_USB_DEBUG\n\n#include "usbd_def.h"\n extern void usb_debug_usb_setup_trace(const char *source, USBD_SetupReqTypedef *req);\n\n #define usb_debug_write_counter debug_write_counter\n #define usb_debug_write_string debug_write_string\n #define usb_debug_write_int debug_write_int\n #define usb_debug_write_newline debug_write_newline\n\n#else\n\n #define usb_debug_usb_setup_trace(source, req)\n\n #define usb_debug_write_counter()\n\n #define usb_debug_write_string(s)\n #define usb_debug_write_int(v)\n #define usb_debug_write_newline()\n\n#endif" (#ifdef) "#ifdef" (identifier) "ENABLE_USB_DEBUG" (preproc_include) "#include "usbd_def.h"\n" (#include) "#include" (string_literal) ""usbd_def.h"" (") """ (string_content) "usbd_def.h" (") """ (declaration) "extern void usb_debug_usb_setup_trace(const char *source, USBD_SetupReqTypedef *req);" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "void" (function_declarator) "usb_debug_usb_setup_trace(const char *source, USBD_SetupReqTypedef *req)" (identifier) "usb_debug_usb_setup_trace" (parameter_list) "(const char *source, USBD_SetupReqTypedef *req)" (() "(" (parameter_declaration) "const char *source" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*source" (*) "*" (identifier) "source" (,) "," (parameter_declaration) "USBD_SetupReqTypedef *req" (type_identifier) "USBD_SetupReqTypedef" (pointer_declarator) "*req" (*) "*" (identifier) "req" ()) ")" (;) ";" (preproc_def) "#define usb_debug_write_counter debug_write_counter\n" (#define) "#define" (identifier) "usb_debug_write_counter" (preproc_arg) "debug_write_counter" (preproc_def) "#define usb_debug_write_string debug_write_string\n" (#define) "#define" (identifier) "usb_debug_write_string" (preproc_arg) "debug_write_string" (preproc_def) "#define usb_debug_write_int debug_write_int\n" (#define) "#define" (identifier) "usb_debug_write_int" (preproc_arg) "debug_write_int" (preproc_def) "#define usb_debug_write_newline debug_write_newline\n" (#define) "#define" (identifier) "usb_debug_write_newline" (preproc_arg) "debug_write_newline" (preproc_else) "#else\n\n #define usb_debug_usb_setup_trace(source, req)\n\n #define usb_debug_write_counter()\n\n #define usb_debug_write_string(s)\n #define usb_debug_write_int(v)\n #define usb_debug_write_newline()\n" (#else) "#else" (preproc_function_def) "#define usb_debug_usb_setup_trace(source, req)\n" (#define) "#define" (identifier) "usb_debug_usb_setup_trace" (preproc_params) "(source, req)" (() "(" (identifier) "source" (,) "," (identifier) "req" ()) ")" (preproc_function_def) "#define usb_debug_write_counter()\n" (#define) "#define" (identifier) "usb_debug_write_counter" (preproc_params) "()" (() "(" ()) ")" (preproc_function_def) "#define usb_debug_write_string(s)\n" (#define) "#define" (identifier) "usb_debug_write_string" (preproc_params) "(s)" (() "(" (identifier) "s" ()) ")" (preproc_function_def) "#define usb_debug_write_int(v)\n" (#define) "#define" (identifier) "usb_debug_write_int" (preproc_params) "(v)" (() "(" (identifier) "v" ()) ")" (preproc_function_def) "#define usb_debug_write_newline()\n" (#define) "#define" (identifier) "usb_debug_write_newline" (preproc_params) "()" (() "(" ()) ")" (#endif) "#endif" (#endif) "#endif"
100
0
{"language": "c", "success": true, "metadata": {"lines": 18, "avg_line_length": 34.67, "nodes": 76, "errors": 0, "source_hash": "5ddbc25215f21208c484fc95b4b8e64f4657c9da8680d2d44a0437410d1bdbb0", "categorized_nodes": 42}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __DEBUG_USB_OUTPUT_H\n#define __DEBUG_USB_OUTPUT_H\n\n#include \"debug_control.h\"\n\n#ifdef ENABLE_USB_DEBUG\n\n#include \"usbd_def.h\"\n\textern void usb_debug_usb_setup_trace(const char *source, USBD_SetupReqTypedef *req);\n\n\t#define usb_debug_write_counter\t\t\t\t\tdebug_write_counter\n\t#define usb_debug_write_string\t\t\t\t\tdebug_write_string\n\t#define usb_debug_write_int\t\t\t\t\t\tdebug_write_int\n\t#define usb_debug_write_newline\t\t\t\t\tdebug_write_newline\n\n#else\n\n\t#define usb_debug_usb_setup_trace(source, req)\n\n\t#define usb_debug_write_counter()\n\n\t#define usb_debug_write_string(s)\n\t#define usb_debug_write_int(v)\n\t#define usb_debug_write_newline()\n\n#endif\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 75], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 27, "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": "__DEBUG_USB_OUTPUT_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 28}}, {"id": 3, "type": "preproc_def", "text": "#define __DEBUG_USB_OUTPUT_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": "__DEBUG_USB_OUTPUT_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 28}}, {"id": 6, "type": "preproc_include", "text": "#include \"debug_control.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": "\"debug_control.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 26}}, {"id": 9, "type": "preproc_ifdef", "text": "#ifdef ENABLE_USB_DEBUG\n\n#include \"usbd_def.h\"\n\textern void usb_debug_usb_setup_trace(const char *source, USBD_SetupReqTypedef *req);\n\n\t#define usb_debug_write_counter\t\t\t\t\tdebug_write_counter\n\t#define usb_debug_write_string\t\t\t\t\tdebug_write_string\n\t#define usb_debug_write_int\t\t\t\t\t\tdebug_write_int\n\t#define usb_debug_write_newline\t\t\t\t\tdebug_write_newline\n\n#else\n\n\t#define usb_debug_usb_setup_trace(source, req)\n\n\t#define usb_debug_write_counter()\n\n\t#define usb_debug_write_string(s)\n\t#define usb_debug_write_int(v)\n\t#define usb_debug_write_newline()\n\n#endif", "parent": 0, "children": [10, 11, 12, 15, 32, 36, 40, 44, 48, 74], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 10, "type": "#ifdef", "text": "#ifdef", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 11, "type": "identifier", "text": "ENABLE_USB_DEBUG", "parent": 9, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 23}}, {"id": 12, "type": "preproc_include", "text": "#include \"usbd_def.h\"\n", "parent": 9, "children": [13, 14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"usbd_def.h\"", "parent": 12, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 21}}, {"id": 15, "type": "declaration", "text": "extern void usb_debug_usb_setup_trace(const char *source, USBD_SetupReqTypedef *req);", "parent": 9, "children": [16, 18, 19], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 86}}, {"id": 16, "type": "storage_class_specifier", "text": "extern", "parent": 15, "children": [17], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 7}}, {"id": 17, "type": "extern", "text": "extern", "parent": 16, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 7}}, {"id": 18, "type": "primitive_type", "text": "void", "parent": 15, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 12}}, {"id": 19, "type": "function_declarator", "text": "usb_debug_usb_setup_trace(const char *source, USBD_SetupReqTypedef *req)", "parent": 15, "children": [20, 21], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 85}}, {"id": 20, "type": "identifier", "text": "usb_debug_usb_setup_trace", "parent": 19, "children": [], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 38}}, {"id": 21, "type": "parameter_list", "text": "(const char *source, USBD_SetupReqTypedef *req)", "parent": 19, "children": [22, 27], "start_point": {"row": 8, "column": 38}, "end_point": {"row": 8, "column": 85}}, {"id": 22, "type": "parameter_declaration", "text": "const char *source", "parent": 21, "children": [23, 24], "start_point": {"row": 8, "column": 39}, "end_point": {"row": 8, "column": 57}}, {"id": 23, "type": "primitive_type", "text": "char", "parent": 22, "children": [], "start_point": {"row": 8, "column": 45}, "end_point": {"row": 8, "column": 49}}, {"id": 24, "type": "pointer_declarator", "text": "*source", "parent": 22, "children": [25, 26], "start_point": {"row": 8, "column": 50}, "end_point": {"row": 8, "column": 57}}, {"id": 25, "type": "*", "text": "*", "parent": 24, "children": [], "start_point": {"row": 8, "column": 50}, "end_point": {"row": 8, "column": 51}}, {"id": 26, "type": "identifier", "text": "source", "parent": 24, "children": [], "start_point": {"row": 8, "column": 51}, "end_point": {"row": 8, "column": 57}}, {"id": 27, "type": "parameter_declaration", "text": "USBD_SetupReqTypedef *req", "parent": 21, "children": [28, 29], "start_point": {"row": 8, "column": 59}, "end_point": {"row": 8, "column": 84}}, {"id": 28, "type": "type_identifier", "text": "USBD_SetupReqTypedef", "parent": 27, "children": [], "start_point": {"row": 8, "column": 59}, "end_point": {"row": 8, "column": 79}}, {"id": 29, "type": "pointer_declarator", "text": "*req", "parent": 27, "children": [30, 31], "start_point": {"row": 8, "column": 80}, "end_point": {"row": 8, "column": 84}}, {"id": 30, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 8, "column": 80}, "end_point": {"row": 8, "column": 81}}, {"id": 31, "type": "identifier", "text": "req", "parent": 29, "children": [], "start_point": {"row": 8, "column": 81}, "end_point": {"row": 8, "column": 84}}, {"id": 32, "type": "preproc_def", "text": "#define usb_debug_write_counter\t\t\t\t\tdebug_write_counter\n", "parent": 9, "children": [33, 34, 35], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 11, "column": 0}}, {"id": 33, "type": "#define", "text": "#define", "parent": 32, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 8}}, {"id": 34, "type": "identifier", "text": "usb_debug_write_counter", "parent": 32, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 32}}, {"id": 35, "type": "preproc_arg", "text": "debug_write_counter", "parent": 32, "children": [], "start_point": {"row": 10, "column": 37}, "end_point": {"row": 10, "column": 56}}, {"id": 36, "type": "preproc_def", "text": "#define usb_debug_write_string\t\t\t\t\tdebug_write_string\n", "parent": 9, "children": [37, 38, 39], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 12, "column": 0}}, {"id": 37, "type": "#define", "text": "#define", "parent": 36, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 8}}, {"id": 38, "type": "identifier", "text": "usb_debug_write_string", "parent": 36, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 31}}, {"id": 39, "type": "preproc_arg", "text": "debug_write_string", "parent": 36, "children": [], "start_point": {"row": 11, "column": 36}, "end_point": {"row": 11, "column": 54}}, {"id": 40, "type": "preproc_def", "text": "#define usb_debug_write_int\t\t\t\t\t\tdebug_write_int\n", "parent": 9, "children": [41, 42, 43], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 13, "column": 0}}, {"id": 41, "type": "#define", "text": "#define", "parent": 40, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 8}}, {"id": 42, "type": "identifier", "text": "usb_debug_write_int", "parent": 40, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 28}}, {"id": 43, "type": "preproc_arg", "text": "debug_write_int", "parent": 40, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 49}}, {"id": 44, "type": "preproc_def", "text": "#define usb_debug_write_newline\t\t\t\t\tdebug_write_newline\n", "parent": 9, "children": [45, 46, 47], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 14, "column": 0}}, {"id": 45, "type": "#define", "text": "#define", "parent": 44, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 8}}, {"id": 46, "type": "identifier", "text": "usb_debug_write_newline", "parent": 44, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 32}}, {"id": 47, "type": "preproc_arg", "text": "debug_write_newline", "parent": 44, "children": [], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 56}}, {"id": 48, "type": "preproc_else", "text": "#else\n\n\t#define usb_debug_usb_setup_trace(source, req)\n\n\t#define usb_debug_write_counter()\n\n\t#define usb_debug_write_string(s)\n\t#define usb_debug_write_int(v)\n\t#define usb_debug_write_newline()\n", "parent": 9, "children": [49, 50, 56, 60, 65, 70], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 49, "type": "#else", "text": "#else", "parent": 48, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 5}}, {"id": 50, "type": "preproc_function_def", "text": "#define usb_debug_usb_setup_trace(source, req)\n", "parent": 48, "children": [51, 52, 53], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 18, "column": 0}}, {"id": 51, "type": "#define", "text": "#define", "parent": 50, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 8}}, {"id": 52, "type": "identifier", "text": "usb_debug_usb_setup_trace", "parent": 50, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 34}}, {"id": 53, "type": "preproc_params", "text": "(source, req)", "parent": 50, "children": [54, 55], "start_point": {"row": 17, "column": 34}, "end_point": {"row": 17, "column": 47}}, {"id": 54, "type": "identifier", "text": "source", "parent": 53, "children": [], "start_point": {"row": 17, "column": 35}, "end_point": {"row": 17, "column": 41}}, {"id": 55, "type": "identifier", "text": "req", "parent": 53, "children": [], "start_point": {"row": 17, "column": 43}, "end_point": {"row": 17, "column": 46}}, {"id": 56, "type": "preproc_function_def", "text": "#define usb_debug_write_counter()\n", "parent": 48, "children": [57, 58, 59], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 20, "column": 0}}, {"id": 57, "type": "#define", "text": "#define", "parent": 56, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 8}}, {"id": 58, "type": "identifier", "text": "usb_debug_write_counter", "parent": 56, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 32}}, {"id": 59, "type": "preproc_params", "text": "()", "parent": 56, "children": [], "start_point": {"row": 19, "column": 32}, "end_point": {"row": 19, "column": 34}}, {"id": 60, "type": "preproc_function_def", "text": "#define usb_debug_write_string(s)\n", "parent": 48, "children": [61, 62, 63], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 22, "column": 0}}, {"id": 61, "type": "#define", "text": "#define", "parent": 60, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 8}}, {"id": 62, "type": "identifier", "text": "usb_debug_write_string", "parent": 60, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 31}}, {"id": 63, "type": "preproc_params", "text": "(s)", "parent": 60, "children": [64], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 34}}, {"id": 64, "type": "identifier", "text": "s", "parent": 63, "children": [], "start_point": {"row": 21, "column": 32}, "end_point": {"row": 21, "column": 33}}, {"id": 65, "type": "preproc_function_def", "text": "#define usb_debug_write_int(v)\n", "parent": 48, "children": [66, 67, 68], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 23, "column": 0}}, {"id": 66, "type": "#define", "text": "#define", "parent": 65, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 8}}, {"id": 67, "type": "identifier", "text": "usb_debug_write_int", "parent": 65, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 28}}, {"id": 68, "type": "preproc_params", "text": "(v)", "parent": 65, "children": [69], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 31}}, {"id": 69, "type": "identifier", "text": "v", "parent": 68, "children": [], "start_point": {"row": 22, "column": 29}, "end_point": {"row": 22, "column": 30}}, {"id": 70, "type": "preproc_function_def", "text": "#define usb_debug_write_newline()\n", "parent": 48, "children": [71, 72, 73], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 24, "column": 0}}, {"id": 71, "type": "#define", "text": "#define", "parent": 70, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 8}}, {"id": 72, "type": "identifier", "text": "usb_debug_write_newline", "parent": 70, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 32}}, {"id": 73, "type": "preproc_params", "text": "()", "parent": 70, "children": [], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 34}}, {"id": 74, "type": "#endif", "text": "#endif", "parent": 9, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 75, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}]}, "node_categories": {"declarations": {"functions": [19, 50, 56, 60, 65, 70], "variables": [15, 22, 27], "classes": [16], "imports": [6, 7, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 9, 10, 11, 20, 26, 28, 31, 34, 38, 42, 46, 52, 54, 55, 58, 62, 64, 67, 69, 72, 74, 75], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 19, "universal_type": "function", "name": "unknown", "text_snippet": "usb_debug_usb_setup_trace(const char *source, USBD_SetupReqTypedef *req)"}, {"node_id": 50, "universal_type": "function", "name": "unknown", "text_snippet": "#define usb_debug_usb_setup_trace(source, req)\n"}, {"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "#define usb_debug_write_counter()\n"}, {"node_id": 60, "universal_type": "function", "name": "unknown", "text_snippet": "#define usb_debug_write_string(s)\n"}, {"node_id": 65, "universal_type": "function", "name": "unknown", "text_snippet": "#define usb_debug_write_int(v)\n"}, {"node_id": 70, "universal_type": "function", "name": "unknown", "text_snippet": "#define usb_debug_write_newline()\n"}], "class_declarations": [{"node_id": 16, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 6, "text": "#include \"debug_control.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 12, "text": "#include \"usbd_def.h\"\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#ifndef __DEBUG_USB_OUTPUT_H\n#define __DEBUG_USB_OUTPUT_H\n\n#include \"debug_control.h\"\n\n#ifdef ENABLE_USB_DEBUG\n\n#include \"usbd_def.h\"\n\textern void usb_debug_usb_setup_trace(const char *source, USBD_SetupReqTypedef *req);\n\n\t#define usb_debug_write_counter\t\t\t\t\tdebug_write_counter\n\t#define usb_debug_write_string\t\t\t\t\tdebug_write_string\n\t#define usb_debug_write_int\t\t\t\t\t\tdebug_write_int\n\t#define usb_debug_write_newline\t\t\t\t\tdebug_write_newline\n\n#else\n\n\t#define usb_debug_usb_setup_trace(source, req)\n\n\t#define usb_debug_write_counter()\n\n\t#define usb_debug_write_string(s)\n\t#define usb_debug_write_int(v)\n\t#define usb_debug_write_newline()\n\n#endif\n\n#endif\n"}
38
c
#include "timer_interface.h" #include "cmsis_os.h" #include <stdio.h> //Create Global Timers #define MAX_NUM_TIMERS 10 typedef struct st_TimerHandle{ TimerHandle_t xTimer; uint32_t TimeToExpire; uint32_t Allocated; }st_TimerHandle_t, *pst_TimerHandle_t; /* An array to hold handles to the created timers. */ st_TimerHandle_t stTimers[MAX_NUM_TIMERS]; static int32_t AllocatedTimerIndex = -1; void vTimerCallback( TimerHandle_t pxTimer ) { } /* ... Create before creating tasks ... */ int create_global_timers( void ) { uint32_t x; /* Create some timers. Don't start them. Starting the timers before the RTOS scheduler has been started means the timers will start running immediately that the RTOS scheduler starts. Starting will be done inside code */ for( x = 0; x < MAX_NUM_TIMERS; x++ ) { stTimers[x].xTimer = xTimerCreate ( /* Just a text name, not used by the RTOS kernel. */ "Timer", /* The timer period in ticks, must be greater than 0 */ 2000, /* The timers will auto-reload themselves when they expire. */ pdFALSE, /* Assign each timer a unique id equal to its array index. */ ( void * ) x, /* Each timer calls the same callback when it expires. */ vTimerCallback ); if( stTimers[x].xTimer == NULL ) { /* The timer was not created. */ return 1; //Failure } } return 0; //Success } /** * @brief Initialize a timer * * Performs any initialization required to the timer passed in. * * @param Timer - pointer to the timer to be initialized */ void init_timer(Timer* timer) { uint32_t i = 0; AllocatedTimerIndex++; for(i=0; i < MAX_NUM_TIMERS; i++) { if(!stTimers[i].Allocated) { stTimers[i].Allocated = 1; *timer = &stTimers[i]; goto exit; } } exit: ; } void DeInitTimer(Timer* timer) { AllocatedTimerIndex--; xTimerStop( ((pst_TimerHandle_t)*timer)->xTimer, 0 ); ((pst_TimerHandle_t)*timer)->TimeToExpire = 0; ((pst_TimerHandle_t)*timer)->Allocated = 0; } /** * @brief Check if a timer is expired * * Call this function passing in a timer to check if that timer has expired. * * @param Timer - pointer to the timer to be checked for expiration * @return bool - true = timer expired, false = timer not expired */ bool has_timer_expired(Timer* timer) { if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer) != pdFALSE )// active means not expired { return pdFALSE; //0 = timer not expired } else { ((pst_TimerHandle_t)*timer)->TimeToExpire = 0; return !pdFALSE;//1 = timer expired } } /** * @brief Create a timer (milliseconds) * * Sets the timer to expire in a specified number of milliseconds. * * @param Timer - pointer to the timer to be set to expire in milliseconds * @param unsigned int - set the timer to expire in this number of milliseconds */ void countdown_ms(Timer* timer, unsigned int time_ms) { if( xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 ) == pdPASS ) { ((pst_TimerHandle_t)*timer)->TimeToExpire = xTaskGetTickCount();; } else { } } /** * @brief Create a timer (seconds) * * Sets the timer to expire in a specified number of seconds. * * @param Timer - pointer to the timer to be set to expire in seconds * @param unsigned int - set the timer to expire in this number of seconds */ void countdown_sec(Timer* timer, unsigned int time_s) { countdown_ms(timer, time_s * 1000); } /** * @brief Check the time remaining on a give timer * * Checks the input timer and returns the number of milliseconds remaining on the timer. * * @param Timer - pointer to the timer to be set to checked * @return int - milliseconds left on the countdown timer */ uint32_t left_ms(Timer* timer) { unsigned int time_s = 0; if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer ) != pdFALSE ) { //Active time_s = xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer); time_s = time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire); } else { //Not active time_s = 0; } return time_s; } /** * @brief Wait for Timeout (Time Delay) * @param millisec time delay value * @retval status code that indicates the execution status of the function. */ void fsleep(int parm) { #if INCLUDE_vTaskDelay TickType_t ticks = parm / portTICK_PERIOD_MS; vTaskDelay(ticks ? ticks : 1); /* Minimum delay = 1 tick */ #else (void) parm; #endif }
25.6
178
(translation_unit) "#include "timer_interface.h"\n#include "cmsis_os.h"\n#include <stdio.h>\n\n\n//Create Global Timers\n\n#define MAX_NUM_TIMERS 10\n\ntypedef struct st_TimerHandle{\n \n TimerHandle_t xTimer;\n uint32_t TimeToExpire;\n uint32_t Allocated;\n \n}st_TimerHandle_t, *pst_TimerHandle_t;\n\n/* An array to hold handles to the created timers. */\nst_TimerHandle_t stTimers[MAX_NUM_TIMERS]; \nstatic int32_t AllocatedTimerIndex = -1;\n\nvoid vTimerCallback( TimerHandle_t pxTimer )\n{\n}\n\n\n\n/* ... Create before creating tasks ... */\nint create_global_timers( void )\n{\n uint32_t x;\n\n /* Create some timers. Don't start them. Starting the timers before the RTOS\n scheduler has been started means the timers will start running\n immediately that the RTOS scheduler starts. Starting will be done inside code */\n\n for( x = 0; x < MAX_NUM_TIMERS; x++ )\n {\n stTimers[x].xTimer = xTimerCreate\n ( /* Just a text name, not used by the RTOS kernel. */\n "Timer",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n );\n\n if( stTimers[x].xTimer == NULL )\n {\n /* The timer was not created. */\n return 1; //Failure\n }\n }\n return 0; //Success\n}\n\n\n/**\n * @brief Initialize a timer\n *\n * Performs any initialization required to the timer passed in.\n *\n * @param Timer - pointer to the timer to be initialized\n */\n\n\nvoid init_timer(Timer* timer)\n{\n uint32_t i = 0;\n AllocatedTimerIndex++;\n\n \n for(i=0; i < MAX_NUM_TIMERS; i++)\n {\n if(!stTimers[i].Allocated)\n {\n stTimers[i].Allocated = 1;\n *timer = &stTimers[i];\n goto exit;\n }\n }\n\nexit: \n ;\n}\n\nvoid DeInitTimer(Timer* timer)\n{\n\n AllocatedTimerIndex--;\n xTimerStop( ((pst_TimerHandle_t)*timer)->xTimer, 0 );\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n ((pst_TimerHandle_t)*timer)->Allocated = 0;\n}\n\n\n\n\n\n\n\n\n/**\n* @brief Check if a timer is expired\n*\n* Call this function passing in a timer to check if that timer has expired.\n*\n* @param Timer - pointer to the timer to be checked for expiration\n* @return bool - true = timer expired, false = timer not expired\n*/\nbool has_timer_expired(Timer* timer)\n{\n\n if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer) != pdFALSE )// active means not expired\n {\n return pdFALSE; //0 = timer not expired\n }\n else\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n\n return !pdFALSE;//1 = timer expired\n }\n}\n\n/**\n* @brief Create a timer (milliseconds)\n*\n* Sets the timer to expire in a specified number of milliseconds.\n*\n* @param Timer - pointer to the timer to be set to expire in milliseconds\n* @param unsigned int - set the timer to expire in this number of milliseconds\n*/\nvoid countdown_ms(Timer* timer, unsigned int time_ms)\n{\n\n if( xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 ) == pdPASS )\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = xTaskGetTickCount();;\n }\n else\n {\n }\n \n}\n\n/**\n* @brief Create a timer (seconds)\n*\n* Sets the timer to expire in a specified number of seconds.\n*\n* @param Timer - pointer to the timer to be set to expire in seconds\n* @param unsigned int - set the timer to expire in this number of seconds\n*/\nvoid countdown_sec(Timer* timer, unsigned int time_s)\n{\n countdown_ms(timer, time_s * 1000);\n}\n\n/**\n* @brief Check the time remaining on a give timer\n*\n* Checks the input timer and returns the number of milliseconds remaining on the timer.\n*\n* @param Timer - pointer to the timer to be set to checked\n* @return int - milliseconds left on the countdown timer\n*/\nuint32_t left_ms(Timer* timer)\n{\n unsigned int time_s = 0; \n if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer ) != pdFALSE )\n {\n //Active\n time_s = xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer);\n time_s = time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire);\n }\n else\n {\n //Not active\n time_s = 0;\n }\n \n return time_s;\n}\n\n/**\n* @brief Wait for Timeout (Time Delay)\n* @param millisec time delay value\n* @retval status code that indicates the execution status of the function.\n*/\n\nvoid fsleep(int parm) \n{\n \n#if INCLUDE_vTaskDelay\n TickType_t ticks = parm / portTICK_PERIOD_MS;\n\n vTaskDelay(ticks ? ticks : 1); /* Minimum delay = 1 tick */\n\n#else\n (void) parm;\n\n#endif\n \n}\n" (preproc_include) "#include "timer_interface.h"\n" (#include) "#include" (string_literal) ""timer_interface.h"" (") """ (string_content) "timer_interface.h" (") """ (preproc_include) "#include "cmsis_os.h"\n" (#include) "#include" (string_literal) ""cmsis_os.h"" (") """ (string_content) "cmsis_os.h" (") """ (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (comment) "//Create Global Timers" (preproc_def) "#define MAX_NUM_TIMERS 10\n" (#define) "#define" (identifier) "MAX_NUM_TIMERS" (preproc_arg) "10" (type_definition) "typedef struct st_TimerHandle{\n \n TimerHandle_t xTimer;\n uint32_t TimeToExpire;\n uint32_t Allocated;\n \n}st_TimerHandle_t, *pst_TimerHandle_t;" (typedef) "typedef" (struct_specifier) "struct st_TimerHandle{\n \n TimerHandle_t xTimer;\n uint32_t TimeToExpire;\n uint32_t Allocated;\n \n}" (struct) "struct" (type_identifier) "st_TimerHandle" (field_declaration_list) "{\n \n TimerHandle_t xTimer;\n uint32_t TimeToExpire;\n uint32_t Allocated;\n \n}" ({) "{" (field_declaration) "TimerHandle_t xTimer;" (type_identifier) "TimerHandle_t" (field_identifier) "xTimer" (;) ";" (field_declaration) "uint32_t TimeToExpire;" (primitive_type) "uint32_t" (field_identifier) "TimeToExpire" (;) ";" (field_declaration) "uint32_t Allocated;" (primitive_type) "uint32_t" (field_identifier) "Allocated" (;) ";" (}) "}" (type_identifier) "st_TimerHandle_t" (,) "," (pointer_declarator) "*pst_TimerHandle_t" (*) "*" (type_identifier) "pst_TimerHandle_t" (;) ";" (comment) "/* An array to hold handles to the created timers. */" (declaration) "st_TimerHandle_t stTimers[MAX_NUM_TIMERS];" (type_identifier) "st_TimerHandle_t" (array_declarator) "stTimers[MAX_NUM_TIMERS]" (identifier) "stTimers" ([) "[" (identifier) "MAX_NUM_TIMERS" (]) "]" (;) ";" (declaration) "static int32_t AllocatedTimerIndex = -1;" (storage_class_specifier) "static" (static) "static" (primitive_type) "int32_t" (init_declarator) "AllocatedTimerIndex = -1" (identifier) "AllocatedTimerIndex" (=) "=" (number_literal) "-1" (;) ";" (function_definition) "void vTimerCallback( TimerHandle_t pxTimer )\n{\n}" (primitive_type) "void" (function_declarator) "vTimerCallback( TimerHandle_t pxTimer )" (identifier) "vTimerCallback" (parameter_list) "( TimerHandle_t pxTimer )" (() "(" (parameter_declaration) "TimerHandle_t pxTimer" (type_identifier) "TimerHandle_t" (identifier) "pxTimer" ()) ")" (compound_statement) "{\n}" ({) "{" (}) "}" (comment) "/* ... Create before creating tasks ... */" (function_definition) "int create_global_timers( void )\n{\n uint32_t x;\n\n /* Create some timers. Don't start them. Starting the timers before the RTOS\n scheduler has been started means the timers will start running\n immediately that the RTOS scheduler starts. Starting will be done inside code */\n\n for( x = 0; x < MAX_NUM_TIMERS; x++ )\n {\n stTimers[x].xTimer = xTimerCreate\n ( /* Just a text name, not used by the RTOS kernel. */\n "Timer",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n );\n\n if( stTimers[x].xTimer == NULL )\n {\n /* The timer was not created. */\n return 1; //Failure\n }\n }\n return 0; //Success\n}" (primitive_type) "int" (function_declarator) "create_global_timers( void )" (identifier) "create_global_timers" (parameter_list) "( void )" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n uint32_t x;\n\n /* Create some timers. Don't start them. Starting the timers before the RTOS\n scheduler has been started means the timers will start running\n immediately that the RTOS scheduler starts. Starting will be done inside code */\n\n for( x = 0; x < MAX_NUM_TIMERS; x++ )\n {\n stTimers[x].xTimer = xTimerCreate\n ( /* Just a text name, not used by the RTOS kernel. */\n "Timer",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n );\n\n if( stTimers[x].xTimer == NULL )\n {\n /* The timer was not created. */\n return 1; //Failure\n }\n }\n return 0; //Success\n}" ({) "{" (declaration) "uint32_t x;" (primitive_type) "uint32_t" (identifier) "x" (;) ";" (comment) "/* Create some timers. Don't start them. Starting the timers before the RTOS\n scheduler has been started means the timers will start running\n immediately that the RTOS scheduler starts. Starting will be done inside code */" (for_statement) "for( x = 0; x < MAX_NUM_TIMERS; x++ )\n {\n stTimers[x].xTimer = xTimerCreate\n ( /* Just a text name, not used by the RTOS kernel. */\n "Timer",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n );\n\n if( stTimers[x].xTimer == NULL )\n {\n /* The timer was not created. */\n return 1; //Failure\n }\n }" (for) "for" (() "(" (assignment_expression) "x = 0" (identifier) "x" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "x < MAX_NUM_TIMERS" (identifier) "x" (<) "<" (identifier) "MAX_NUM_TIMERS" (;) ";" (update_expression) "x++" (identifier) "x" (++) "++" ()) ")" (compound_statement) "{\n stTimers[x].xTimer = xTimerCreate\n ( /* Just a text name, not used by the RTOS kernel. */\n "Timer",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n );\n\n if( stTimers[x].xTimer == NULL )\n {\n /* The timer was not created. */\n return 1; //Failure\n }\n }" ({) "{" (expression_statement) "stTimers[x].xTimer = xTimerCreate\n ( /* Just a text name, not used by the RTOS kernel. */\n "Timer",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n );" (assignment_expression) "stTimers[x].xTimer = xTimerCreate\n ( /* Just a text name, not used by the RTOS kernel. */\n "Timer",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n )" (field_expression) "stTimers[x].xTimer" (subscript_expression) "stTimers[x]" (identifier) "stTimers" ([) "[" (identifier) "x" (]) "]" (.) "." (field_identifier) "xTimer" (=) "=" (call_expression) "xTimerCreate\n ( /* Just a text name, not used by the RTOS kernel. */\n "Timer",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n )" (identifier) "xTimerCreate" (argument_list) "( /* Just a text name, not used by the RTOS kernel. */\n "Timer",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n )" (() "(" (comment) "/* Just a text name, not used by the RTOS kernel. */" (string_literal) ""Timer"" (") """ (string_content) "Timer" (") """ (,) "," (comment) "/* The timer period in ticks, must be greater than 0 */" (number_literal) "2000" (,) "," (comment) "/* The timers will auto-reload themselves when they expire. */" (identifier) "pdFALSE" (,) "," (comment) "/* Assign each timer a unique id equal to its array index. */" (cast_expression) "( void * ) x" (() "(" (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "x" (,) "," (comment) "/* Each timer calls the same callback when it expires. */" (identifier) "vTimerCallback" ()) ")" (;) ";" (if_statement) "if( stTimers[x].xTimer == NULL )\n {\n /* The timer was not created. */\n return 1; //Failure\n }" (if) "if" (parenthesized_expression) "( stTimers[x].xTimer == NULL )" (() "(" (binary_expression) "stTimers[x].xTimer == NULL" (field_expression) "stTimers[x].xTimer" (subscript_expression) "stTimers[x]" (identifier) "stTimers" ([) "[" (identifier) "x" (]) "]" (.) "." (field_identifier) "xTimer" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n /* The timer was not created. */\n return 1; //Failure\n }" ({) "{" (comment) "/* The timer was not created. */" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (comment) "//Failure" (}) "}" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (comment) "//Success" (}) "}" (comment) "/**\n * @brief Initialize a timer\n *\n * Performs any initialization required to the timer passed in.\n *\n * @param Timer - pointer to the timer to be initialized\n */" (function_definition) "void init_timer(Timer* timer)\n{\n uint32_t i = 0;\n AllocatedTimerIndex++;\n\n \n for(i=0; i < MAX_NUM_TIMERS; i++)\n {\n if(!stTimers[i].Allocated)\n {\n stTimers[i].Allocated = 1;\n *timer = &stTimers[i];\n goto exit;\n }\n }\n\nexit: \n ;\n}" (primitive_type) "void" (function_declarator) "init_timer(Timer* timer)" (identifier) "init_timer" (parameter_list) "(Timer* timer)" (() "(" (parameter_declaration) "Timer* timer" (type_identifier) "Timer" (pointer_declarator) "* timer" (*) "*" (identifier) "timer" ()) ")" (compound_statement) "{\n uint32_t i = 0;\n AllocatedTimerIndex++;\n\n \n for(i=0; i < MAX_NUM_TIMERS; i++)\n {\n if(!stTimers[i].Allocated)\n {\n stTimers[i].Allocated = 1;\n *timer = &stTimers[i];\n goto exit;\n }\n }\n\nexit: \n ;\n}" ({) "{" (declaration) "uint32_t i = 0;" (primitive_type) "uint32_t" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "AllocatedTimerIndex++;" (update_expression) "AllocatedTimerIndex++" (identifier) "AllocatedTimerIndex" (++) "++" (;) ";" (for_statement) "for(i=0; i < MAX_NUM_TIMERS; i++)\n {\n if(!stTimers[i].Allocated)\n {\n stTimers[i].Allocated = 1;\n *timer = &stTimers[i];\n goto exit;\n }\n }" (for) "for" (() "(" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < MAX_NUM_TIMERS" (identifier) "i" (<) "<" (identifier) "MAX_NUM_TIMERS" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n if(!stTimers[i].Allocated)\n {\n stTimers[i].Allocated = 1;\n *timer = &stTimers[i];\n goto exit;\n }\n }" ({) "{" (if_statement) "if(!stTimers[i].Allocated)\n {\n stTimers[i].Allocated = 1;\n *timer = &stTimers[i];\n goto exit;\n }" (if) "if" (parenthesized_expression) "(!stTimers[i].Allocated)" (() "(" (unary_expression) "!stTimers[i].Allocated" (!) "!" (field_expression) "stTimers[i].Allocated" (subscript_expression) "stTimers[i]" (identifier) "stTimers" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "Allocated" ()) ")" (compound_statement) "{\n stTimers[i].Allocated = 1;\n *timer = &stTimers[i];\n goto exit;\n }" ({) "{" (expression_statement) "stTimers[i].Allocated = 1;" (assignment_expression) "stTimers[i].Allocated = 1" (field_expression) "stTimers[i].Allocated" (subscript_expression) "stTimers[i]" (identifier) "stTimers" ([) "[" (identifier) "i" (]) "]" (.) "." (field_identifier) "Allocated" (=) "=" (number_literal) "1" (;) ";" (expression_statement) "*timer = &stTimers[i];" (assignment_expression) "*timer = &stTimers[i]" (pointer_expression) "*timer" (*) "*" (identifier) "timer" (=) "=" (pointer_expression) "&stTimers[i]" (&) "&" (subscript_expression) "stTimers[i]" (identifier) "stTimers" ([) "[" (identifier) "i" (]) "]" (;) ";" (goto_statement) "goto exit;" (goto) "goto" (statement_identifier) "exit" (;) ";" (}) "}" (}) "}" (labeled_statement) "exit: \n ;" (statement_identifier) "exit" (:) ":" (expression_statement) ";" (;) ";" (}) "}" (function_definition) "void DeInitTimer(Timer* timer)\n{\n\n AllocatedTimerIndex--;\n xTimerStop( ((pst_TimerHandle_t)*timer)->xTimer, 0 );\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n ((pst_TimerHandle_t)*timer)->Allocated = 0;\n}" (primitive_type) "void" (function_declarator) "DeInitTimer(Timer* timer)" (identifier) "DeInitTimer" (parameter_list) "(Timer* timer)" (() "(" (parameter_declaration) "Timer* timer" (type_identifier) "Timer" (pointer_declarator) "* timer" (*) "*" (identifier) "timer" ()) ")" (compound_statement) "{\n\n AllocatedTimerIndex--;\n xTimerStop( ((pst_TimerHandle_t)*timer)->xTimer, 0 );\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n ((pst_TimerHandle_t)*timer)->Allocated = 0;\n}" ({) "{" (expression_statement) "AllocatedTimerIndex--;" (update_expression) "AllocatedTimerIndex--" (identifier) "AllocatedTimerIndex" (--) "--" (;) ";" (expression_statement) "xTimerStop( ((pst_TimerHandle_t)*timer)->xTimer, 0 );" (call_expression) "xTimerStop( ((pst_TimerHandle_t)*timer)->xTimer, 0 )" (identifier) "xTimerStop" (argument_list) "( ((pst_TimerHandle_t)*timer)->xTimer, 0 )" (() "(" (field_expression) "((pst_TimerHandle_t)*timer)->xTimer" (parenthesized_expression) "((pst_TimerHandle_t)*timer)" (() "(" (binary_expression) "(pst_TimerHandle_t)*timer" (parenthesized_expression) "(pst_TimerHandle_t)" (() "(" (identifier) "pst_TimerHandle_t" ()) ")" (*) "*" (identifier) "timer" ()) ")" (->) "->" (field_identifier) "xTimer" (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "((pst_TimerHandle_t)*timer)->TimeToExpire = 0;" (assignment_expression) "((pst_TimerHandle_t)*timer)->TimeToExpire = 0" (field_expression) "((pst_TimerHandle_t)*timer)->TimeToExpire" (parenthesized_expression) "((pst_TimerHandle_t)*timer)" (() "(" (binary_expression) "(pst_TimerHandle_t)*timer" (parenthesized_expression) "(pst_TimerHandle_t)" (() "(" (identifier) "pst_TimerHandle_t" ()) ")" (*) "*" (identifier) "timer" ()) ")" (->) "->" (field_identifier) "TimeToExpire" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "((pst_TimerHandle_t)*timer)->Allocated = 0;" (assignment_expression) "((pst_TimerHandle_t)*timer)->Allocated = 0" (field_expression) "((pst_TimerHandle_t)*timer)->Allocated" (parenthesized_expression) "((pst_TimerHandle_t)*timer)" (() "(" (binary_expression) "(pst_TimerHandle_t)*timer" (parenthesized_expression) "(pst_TimerHandle_t)" (() "(" (identifier) "pst_TimerHandle_t" ()) ")" (*) "*" (identifier) "timer" ()) ")" (->) "->" (field_identifier) "Allocated" (=) "=" (number_literal) "0" (;) ";" (}) "}" (comment) "/**\n* @brief Check if a timer is expired\n*\n* Call this function passing in a timer to check if that timer has expired.\n*\n* @param Timer - pointer to the timer to be checked for expiration\n* @return bool - true = timer expired, false = timer not expired\n*/" (function_definition) "bool has_timer_expired(Timer* timer)\n{\n\n if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer) != pdFALSE )// active means not expired\n {\n return pdFALSE; //0 = timer not expired\n }\n else\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n\n return !pdFALSE;//1 = timer expired\n }\n}" (primitive_type) "bool" (function_declarator) "has_timer_expired(Timer* timer)" (identifier) "has_timer_expired" (parameter_list) "(Timer* timer)" (() "(" (parameter_declaration) "Timer* timer" (type_identifier) "Timer" (pointer_declarator) "* timer" (*) "*" (identifier) "timer" ()) ")" (compound_statement) "{\n\n if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer) != pdFALSE )// active means not expired\n {\n return pdFALSE; //0 = timer not expired\n }\n else\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n\n return !pdFALSE;//1 = timer expired\n }\n}" ({) "{" (if_statement) "if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer) != pdFALSE )// active means not expired\n {\n return pdFALSE; //0 = timer not expired\n }\n else\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n\n return !pdFALSE;//1 = timer expired\n }" (if) "if" (parenthesized_expression) "( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer) != pdFALSE )" (() "(" (binary_expression) "xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer) != pdFALSE" (call_expression) "xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer)" (identifier) "xTimerIsTimerActive" (argument_list) "(((pst_TimerHandle_t)*timer)->xTimer)" (() "(" (field_expression) "((pst_TimerHandle_t)*timer)->xTimer" (parenthesized_expression) "((pst_TimerHandle_t)*timer)" (() "(" (binary_expression) "(pst_TimerHandle_t)*timer" (parenthesized_expression) "(pst_TimerHandle_t)" (() "(" (identifier) "pst_TimerHandle_t" ()) ")" (*) "*" (identifier) "timer" ()) ")" (->) "->" (field_identifier) "xTimer" ()) ")" (!=) "!=" (identifier) "pdFALSE" ()) ")" (comment) "// active means not expired" (compound_statement) "{\n return pdFALSE; //0 = timer not expired\n }" ({) "{" (return_statement) "return pdFALSE;" (return) "return" (identifier) "pdFALSE" (;) ";" (comment) "//0 = timer not expired" (}) "}" (else_clause) "else\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n\n return !pdFALSE;//1 = timer expired\n }" (else) "else" (compound_statement) "{\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n\n return !pdFALSE;//1 = timer expired\n }" ({) "{" (expression_statement) "((pst_TimerHandle_t)*timer)->TimeToExpire = 0;" (assignment_expression) "((pst_TimerHandle_t)*timer)->TimeToExpire = 0" (field_expression) "((pst_TimerHandle_t)*timer)->TimeToExpire" (parenthesized_expression) "((pst_TimerHandle_t)*timer)" (() "(" (binary_expression) "(pst_TimerHandle_t)*timer" (parenthesized_expression) "(pst_TimerHandle_t)" (() "(" (identifier) "pst_TimerHandle_t" ()) ")" (*) "*" (identifier) "timer" ()) ")" (->) "->" (field_identifier) "TimeToExpire" (=) "=" (number_literal) "0" (;) ";" (return_statement) "return !pdFALSE;" (return) "return" (unary_expression) "!pdFALSE" (!) "!" (identifier) "pdFALSE" (;) ";" (comment) "//1 = timer expired" (}) "}" (}) "}" (comment) "/**\n* @brief Create a timer (milliseconds)\n*\n* Sets the timer to expire in a specified number of milliseconds.\n*\n* @param Timer - pointer to the timer to be set to expire in milliseconds\n* @param unsigned int - set the timer to expire in this number of milliseconds\n*/" (function_definition) "void countdown_ms(Timer* timer, unsigned int time_ms)\n{\n\n if( xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 ) == pdPASS )\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = xTaskGetTickCount();;\n }\n else\n {\n }\n \n}" (primitive_type) "void" (function_declarator) "countdown_ms(Timer* timer, unsigned int time_ms)" (identifier) "countdown_ms" (parameter_list) "(Timer* timer, unsigned int time_ms)" (() "(" (parameter_declaration) "Timer* timer" (type_identifier) "Timer" (pointer_declarator) "* timer" (*) "*" (identifier) "timer" (,) "," (parameter_declaration) "unsigned int time_ms" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "time_ms" ()) ")" (compound_statement) "{\n\n if( xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 ) == pdPASS )\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = xTaskGetTickCount();;\n }\n else\n {\n }\n \n}" ({) "{" (if_statement) "if( xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 ) == pdPASS )\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = xTaskGetTickCount();;\n }\n else\n {\n }" (if) "if" (parenthesized_expression) "( xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 ) == pdPASS )" (() "(" (binary_expression) "xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 ) == pdPASS" (call_expression) "xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 )" (identifier) "xTimerChangePeriod" (argument_list) "( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 )" (() "(" (field_expression) "((pst_TimerHandle_t)*timer)->xTimer" (parenthesized_expression) "((pst_TimerHandle_t)*timer)" (() "(" (binary_expression) "(pst_TimerHandle_t)*timer" (parenthesized_expression) "(pst_TimerHandle_t)" (() "(" (identifier) "pst_TimerHandle_t" ()) ")" (*) "*" (identifier) "timer" ()) ")" (->) "->" (field_identifier) "xTimer" (,) "," (binary_expression) "time_ms / portTICK_PERIOD_MS" (identifier) "time_ms" (/) "/" (identifier) "portTICK_PERIOD_MS" (,) "," (number_literal) "0" ()) ")" (==) "==" (identifier) "pdPASS" ()) ")" (compound_statement) "{\n ((pst_TimerHandle_t)*timer)->TimeToExpire = xTaskGetTickCount();;\n }" ({) "{" (expression_statement) "((pst_TimerHandle_t)*timer)->TimeToExpire = xTaskGetTickCount();" (assignment_expression) "((pst_TimerHandle_t)*timer)->TimeToExpire = xTaskGetTickCount()" (field_expression) "((pst_TimerHandle_t)*timer)->TimeToExpire" (parenthesized_expression) "((pst_TimerHandle_t)*timer)" (() "(" (binary_expression) "(pst_TimerHandle_t)*timer" (parenthesized_expression) "(pst_TimerHandle_t)" (() "(" (identifier) "pst_TimerHandle_t" ()) ")" (*) "*" (identifier) "timer" ()) ")" (->) "->" (field_identifier) "TimeToExpire" (=) "=" (call_expression) "xTaskGetTickCount()" (identifier) "xTaskGetTickCount" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) ";" (;) ";" (}) "}" (else_clause) "else\n {\n }" (else) "else" (compound_statement) "{\n }" ({) "{" (}) "}" (}) "}" (comment) "/**\n* @brief Create a timer (seconds)\n*\n* Sets the timer to expire in a specified number of seconds.\n*\n* @param Timer - pointer to the timer to be set to expire in seconds\n* @param unsigned int - set the timer to expire in this number of seconds\n*/" (function_definition) "void countdown_sec(Timer* timer, unsigned int time_s)\n{\n countdown_ms(timer, time_s * 1000);\n}" (primitive_type) "void" (function_declarator) "countdown_sec(Timer* timer, unsigned int time_s)" (identifier) "countdown_sec" (parameter_list) "(Timer* timer, unsigned int time_s)" (() "(" (parameter_declaration) "Timer* timer" (type_identifier) "Timer" (pointer_declarator) "* timer" (*) "*" (identifier) "timer" (,) "," (parameter_declaration) "unsigned int time_s" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "time_s" ()) ")" (compound_statement) "{\n countdown_ms(timer, time_s * 1000);\n}" ({) "{" (expression_statement) "countdown_ms(timer, time_s * 1000);" (call_expression) "countdown_ms(timer, time_s * 1000)" (identifier) "countdown_ms" (argument_list) "(timer, time_s * 1000)" (() "(" (identifier) "timer" (,) "," (binary_expression) "time_s * 1000" (identifier) "time_s" (*) "*" (number_literal) "1000" ()) ")" (;) ";" (}) "}" (comment) "/**\n* @brief Check the time remaining on a give timer\n*\n* Checks the input timer and returns the number of milliseconds remaining on the timer.\n*\n* @param Timer - pointer to the timer to be set to checked\n* @return int - milliseconds left on the countdown timer\n*/" (function_definition) "uint32_t left_ms(Timer* timer)\n{\n unsigned int time_s = 0; \n if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer ) != pdFALSE )\n {\n //Active\n time_s = xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer);\n time_s = time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire);\n }\n else\n {\n //Not active\n time_s = 0;\n }\n \n return time_s;\n}" (primitive_type) "uint32_t" (function_declarator) "left_ms(Timer* timer)" (identifier) "left_ms" (parameter_list) "(Timer* timer)" (() "(" (parameter_declaration) "Timer* timer" (type_identifier) "Timer" (pointer_declarator) "* timer" (*) "*" (identifier) "timer" ()) ")" (compound_statement) "{\n unsigned int time_s = 0; \n if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer ) != pdFALSE )\n {\n //Active\n time_s = xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer);\n time_s = time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire);\n }\n else\n {\n //Not active\n time_s = 0;\n }\n \n return time_s;\n}" ({) "{" (declaration) "unsigned int time_s = 0;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (init_declarator) "time_s = 0" (identifier) "time_s" (=) "=" (number_literal) "0" (;) ";" (if_statement) "if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer ) != pdFALSE )\n {\n //Active\n time_s = xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer);\n time_s = time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire);\n }\n else\n {\n //Not active\n time_s = 0;\n }" (if) "if" (parenthesized_expression) "( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer ) != pdFALSE )" (() "(" (binary_expression) "xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer ) != pdFALSE" (call_expression) "xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer )" (identifier) "xTimerIsTimerActive" (argument_list) "(((pst_TimerHandle_t)*timer)->xTimer )" (() "(" (field_expression) "((pst_TimerHandle_t)*timer)->xTimer" (parenthesized_expression) "((pst_TimerHandle_t)*timer)" (() "(" (binary_expression) "(pst_TimerHandle_t)*timer" (parenthesized_expression) "(pst_TimerHandle_t)" (() "(" (identifier) "pst_TimerHandle_t" ()) ")" (*) "*" (identifier) "timer" ()) ")" (->) "->" (field_identifier) "xTimer" ()) ")" (!=) "!=" (identifier) "pdFALSE" ()) ")" (compound_statement) "{\n //Active\n time_s = xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer);\n time_s = time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire);\n }" ({) "{" (comment) "//Active" (expression_statement) "time_s = xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer);" (assignment_expression) "time_s = xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer)" (identifier) "time_s" (=) "=" (call_expression) "xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer)" (identifier) "xTimerLeftMs" (argument_list) "(((pst_TimerHandle_t)*timer)->xTimer)" (() "(" (field_expression) "((pst_TimerHandle_t)*timer)->xTimer" (parenthesized_expression) "((pst_TimerHandle_t)*timer)" (() "(" (binary_expression) "(pst_TimerHandle_t)*timer" (parenthesized_expression) "(pst_TimerHandle_t)" (() "(" (identifier) "pst_TimerHandle_t" ()) ")" (*) "*" (identifier) "timer" ()) ")" (->) "->" (field_identifier) "xTimer" ()) ")" (;) ";" (expression_statement) "time_s = time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire);" (assignment_expression) "time_s = time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire)" (identifier) "time_s" (=) "=" (binary_expression) "time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire)" (identifier) "time_s" (-) "-" (parenthesized_expression) "((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire)" (() "(" (cast_expression) "(xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire" (() "(" (type_descriptor) "xTaskGetTickCount()" (type_identifier) "xTaskGetTickCount" (abstract_function_declarator) "()" (parameter_list) "()" (() "(" ()) ")" ()) ")" (unary_expression) "- ((pst_TimerHandle_t)*timer)->TimeToExpire" (-) "-" (field_expression) "((pst_TimerHandle_t)*timer)->TimeToExpire" (parenthesized_expression) "((pst_TimerHandle_t)*timer)" (() "(" (binary_expression) "(pst_TimerHandle_t)*timer" (parenthesized_expression) "(pst_TimerHandle_t)" (() "(" (identifier) "pst_TimerHandle_t" ()) ")" (*) "*" (identifier) "timer" ()) ")" (->) "->" (field_identifier) "TimeToExpire" ()) ")" (;) ";" (}) "}" (else_clause) "else\n {\n //Not active\n time_s = 0;\n }" (else) "else" (compound_statement) "{\n //Not active\n time_s = 0;\n }" ({) "{" (comment) "//Not active" (expression_statement) "time_s = 0;" (assignment_expression) "time_s = 0" (identifier) "time_s" (=) "=" (number_literal) "0" (;) ";" (}) "}" (return_statement) "return time_s;" (return) "return" (identifier) "time_s" (;) ";" (}) "}" (comment) "/**\n* @brief Wait for Timeout (Time Delay)\n* @param millisec time delay value\n* @retval status code that indicates the execution status of the function.\n*/" (function_definition) "void fsleep(int parm) \n{\n \n#if INCLUDE_vTaskDelay\n TickType_t ticks = parm / portTICK_PERIOD_MS;\n\n vTaskDelay(ticks ? ticks : 1); /* Minimum delay = 1 tick */\n\n#else\n (void) parm;\n\n#endif\n \n}" (primitive_type) "void" (function_declarator) "fsleep(int parm)" (identifier) "fsleep" (parameter_list) "(int parm)" (() "(" (parameter_declaration) "int parm" (primitive_type) "int" (identifier) "parm" ()) ")" (compound_statement) "{\n \n#if INCLUDE_vTaskDelay\n TickType_t ticks = parm / portTICK_PERIOD_MS;\n\n vTaskDelay(ticks ? ticks : 1); /* Minimum delay = 1 tick */\n\n#else\n (void) parm;\n\n#endif\n \n}" ({) "{" (preproc_if) "#if INCLUDE_vTaskDelay\n TickType_t ticks = parm / portTICK_PERIOD_MS;\n\n vTaskDelay(ticks ? ticks : 1); /* Minimum delay = 1 tick */\n\n#else\n (void) parm;\n\n#endif" (#if) "#if" (identifier) "INCLUDE_vTaskDelay" ( ) "\n" (declaration) "TickType_t ticks = parm / portTICK_PERIOD_MS;" (type_identifier) "TickType_t" (init_declarator) "ticks = parm / portTICK_PERIOD_MS" (identifier) "ticks" (=) "=" (binary_expression) "parm / portTICK_PERIOD_MS" (identifier) "parm" (/) "/" (identifier) "portTICK_PERIOD_MS" (;) ";" (expression_statement) "vTaskDelay(ticks ? ticks : 1);" (call_expression) "vTaskDelay(ticks ? ticks : 1)" (identifier) "vTaskDelay" (argument_list) "(ticks ? ticks : 1)" (() "(" (conditional_expression) "ticks ? ticks : 1" (identifier) "ticks" (?) "?" (identifier) "ticks" (:) ":" (number_literal) "1" ()) ")" (;) ";" (comment) "/* Minimum delay = 1 tick */" (preproc_else) "#else\n (void) parm;" (#else) "#else" (expression_statement) "(void) parm;" (cast_expression) "(void) parm" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "parm" (;) ";" (#endif) "#endif" (}) "}"
753
0
{"language": "c", "success": true, "metadata": {"lines": 178, "avg_line_length": 25.6, "nodes": 446, "errors": 0, "source_hash": "bd9bf11fdfe29d56c2231f4a8940f958c9fb98f9730259f16cc5b0496a6c6589", "categorized_nodes": 319}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"timer_interface.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": "\"timer_interface.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 28}}, {"id": 3, "type": "preproc_include", "text": "#include \"cmsis_os.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": "\"cmsis_os.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 21}}, {"id": 6, "type": "preproc_include", "text": "#include <stdio.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": "<stdio.h>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 18}}, {"id": 9, "type": "preproc_def", "text": "#define MAX_NUM_TIMERS 10\n", "parent": null, "children": [10, 11, 12], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 10, "type": "#define", "text": "#define", "parent": 9, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 11, "type": "identifier", "text": "MAX_NUM_TIMERS", "parent": 9, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 22}}, {"id": 12, "type": "preproc_arg", "text": "10", "parent": 9, "children": [], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 25}}, {"id": 13, "type": "type_definition", "text": "typedef struct st_TimerHandle{\n \n TimerHandle_t xTimer;\n uint32_t TimeToExpire;\n uint32_t Allocated;\n \n}st_TimerHandle_t, *pst_TimerHandle_t;", "parent": null, "children": [14, 15, 27, 28], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 15, "column": 38}}, {"id": 14, "type": "typedef", "text": "typedef", "parent": 13, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 15, "type": "struct_specifier", "text": "struct st_TimerHandle{\n \n TimerHandle_t xTimer;\n uint32_t TimeToExpire;\n uint32_t Allocated;\n \n}", "parent": 13, "children": [16, 17], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 15, "column": 1}}, {"id": 16, "type": "struct", "text": "struct", "parent": 15, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 14}}, {"id": 17, "type": "type_identifier", "text": "st_TimerHandle", "parent": 15, "children": [], "start_point": {"row": 9, "column": 15}, "end_point": {"row": 9, "column": 29}}, {"id": 18, "type": "field_declaration", "text": "TimerHandle_t xTimer;", "parent": 15, "children": [19, 20], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 25}}, {"id": 19, "type": "type_identifier", "text": "TimerHandle_t", "parent": 18, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 17}}, {"id": 20, "type": "field_identifier", "text": "xTimer", "parent": 18, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 24}}, {"id": 21, "type": "field_declaration", "text": "uint32_t TimeToExpire;", "parent": 15, "children": [22, 23], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 26}}, {"id": 22, "type": "primitive_type", "text": "uint32_t", "parent": 21, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 12}}, {"id": 23, "type": "field_identifier", "text": "TimeToExpire", "parent": 21, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 25}}, {"id": 24, "type": "field_declaration", "text": "uint32_t Allocated;", "parent": 15, "children": [25, 26], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 23}}, {"id": 25, "type": "primitive_type", "text": "uint32_t", "parent": 24, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 12}}, {"id": 26, "type": "field_identifier", "text": "Allocated", "parent": 24, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 22}}, {"id": 27, "type": "type_identifier", "text": "st_TimerHandle_t", "parent": 13, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 17}}, {"id": 28, "type": "pointer_declarator", "text": "*pst_TimerHandle_t", "parent": 13, "children": [29, 30], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 37}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 20}}, {"id": 30, "type": "type_identifier", "text": "pst_TimerHandle_t", "parent": 28, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 37}}, {"id": 31, "type": "declaration", "text": "st_TimerHandle_t stTimers[MAX_NUM_TIMERS];", "parent": null, "children": [32, 33], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 42}}, {"id": 32, "type": "type_identifier", "text": "st_TimerHandle_t", "parent": 31, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 16}}, {"id": 33, "type": "array_declarator", "text": "stTimers[MAX_NUM_TIMERS]", "parent": 31, "children": [34, 35], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 41}}, {"id": 34, "type": "identifier", "text": "stTimers", "parent": 33, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 25}}, {"id": 35, "type": "identifier", "text": "MAX_NUM_TIMERS", "parent": 33, "children": [], "start_point": {"row": 18, "column": 26}, "end_point": {"row": 18, "column": 40}}, {"id": 36, "type": "declaration", "text": "static int32_t AllocatedTimerIndex = -1;", "parent": null, "children": [37, 38], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 40}}, {"id": 37, "type": "primitive_type", "text": "int32_t", "parent": 36, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 14}}, {"id": 38, "type": "init_declarator", "text": "AllocatedTimerIndex = -1", "parent": 36, "children": [39, 40, 41], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 39}}, {"id": 39, "type": "identifier", "text": "AllocatedTimerIndex", "parent": 38, "children": [], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 19, "column": 34}}, {"id": 40, "type": "=", "text": "=", "parent": 38, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 36}}, {"id": 41, "type": "number_literal", "text": "-1", "parent": 38, "children": [], "start_point": {"row": 19, "column": 37}, "end_point": {"row": 19, "column": 39}}, {"id": 42, "type": "function_definition", "text": "void vTimerCallback( TimerHandle_t pxTimer )\n{\n}", "parent": null, "children": [43, 44], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 43, "type": "primitive_type", "text": "void", "parent": 42, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 4}}, {"id": 44, "type": "function_declarator", "text": "vTimerCallback( TimerHandle_t pxTimer )", "parent": 42, "children": [45, 46], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 44}}, {"id": 45, "type": "identifier", "text": "vTimerCallback", "parent": 44, "children": [], "start_point": {"row": 21, "column": 5}, "end_point": {"row": 21, "column": 19}}, {"id": 46, "type": "parameter_list", "text": "( TimerHandle_t pxTimer )", "parent": 44, "children": [47], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 44}}, {"id": 47, "type": "parameter_declaration", "text": "TimerHandle_t pxTimer", "parent": 46, "children": [48, 49], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 42}}, {"id": 48, "type": "type_identifier", "text": "TimerHandle_t", "parent": 47, "children": [], "start_point": {"row": 21, "column": 21}, "end_point": {"row": 21, "column": 34}}, {"id": 49, "type": "identifier", "text": "pxTimer", "parent": 47, "children": [], "start_point": {"row": 21, "column": 35}, "end_point": {"row": 21, "column": 42}}, {"id": 50, "type": "function_definition", "text": "int create_global_timers( void )\n{\n uint32_t x;\n\n /* Create some timers. Don't start them. Starting the timers before the RTOS\n scheduler has been started means the timers will start running\n immediately that the RTOS scheduler starts. Starting will be done inside code */\n\n for( x = 0; x < MAX_NUM_TIMERS; x++ )\n {\n stTimers[x].xTimer = xTimerCreate\n ( /* Just a text name, not used by the RTOS kernel. */\n \"Timer\",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n );\n\n if( stTimers[x].xTimer == NULL )\n {\n /* The timer was not created. */\n return 1; //Failure\n }\n }\n return 0; //Success\n}", "parent": null, "children": [51, 52], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 58, "column": 1}}, {"id": 51, "type": "primitive_type", "text": "int", "parent": 50, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 3}}, {"id": 52, "type": "function_declarator", "text": "create_global_timers( void )", "parent": 50, "children": [53, 54], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 32}}, {"id": 53, "type": "identifier", "text": "create_global_timers", "parent": 52, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 24}}, {"id": 54, "type": "parameter_list", "text": "( void )", "parent": 52, "children": [55], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 32}}, {"id": 55, "type": "parameter_declaration", "text": "void", "parent": 54, "children": [56], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 30}}, {"id": 56, "type": "primitive_type", "text": "void", "parent": 55, "children": [], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 30}}, {"id": 57, "type": "declaration", "text": "uint32_t x;", "parent": 50, "children": [58, 59], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 15}}, {"id": 58, "type": "primitive_type", "text": "uint32_t", "parent": 57, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 12}}, {"id": 59, "type": "identifier", "text": "x", "parent": 57, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 14}}, {"id": 60, "type": "for_statement", "text": "for( x = 0; x < MAX_NUM_TIMERS; x++ )\n {\n stTimers[x].xTimer = xTimerCreate\n ( /* Just a text name, not used by the RTOS kernel. */\n \"Timer\",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n );\n\n if( stTimers[x].xTimer == NULL )\n {\n /* The timer was not created. */\n return 1; //Failure\n }\n }", "parent": 50, "children": [61, 65, 69], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 56, "column": 5}}, {"id": 61, "type": "assignment_expression", "text": "x = 0", "parent": 60, "children": [62, 63, 64], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 14}}, {"id": 62, "type": "identifier", "text": "x", "parent": 61, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 10}}, {"id": 63, "type": "=", "text": "=", "parent": 61, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 12}}, {"id": 64, "type": "number_literal", "text": "0", "parent": 61, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 14}}, {"id": 65, "type": "binary_expression", "text": "x < MAX_NUM_TIMERS", "parent": 60, "children": [66, 67, 68], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 34}}, {"id": 66, "type": "identifier", "text": "x", "parent": 65, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 17}}, {"id": 67, "type": "<", "text": "<", "parent": 65, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 19}}, {"id": 68, "type": "identifier", "text": "MAX_NUM_TIMERS", "parent": 65, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 34}}, {"id": 69, "type": "update_expression", "text": "x++", "parent": 60, "children": [70, 71], "start_point": {"row": 36, "column": 36}, "end_point": {"row": 36, "column": 39}}, {"id": 70, "type": "identifier", "text": "x", "parent": 69, "children": [], "start_point": {"row": 36, "column": 36}, "end_point": {"row": 36, "column": 37}}, {"id": 71, "type": "++", "text": "++", "parent": 69, "children": [], "start_point": {"row": 36, "column": 37}, "end_point": {"row": 36, "column": 39}}, {"id": 72, "type": "assignment_expression", "text": "stTimers[x].xTimer = xTimerCreate\n ( /* Just a text name, not used by the RTOS kernel. */\n \"Timer\",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n )", "parent": 60, "children": [73, 78, 79], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 49, "column": 9}}, {"id": 73, "type": "field_expression", "text": "stTimers[x].xTimer", "parent": 72, "children": [74, 77], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 26}}, {"id": 74, "type": "subscript_expression", "text": "stTimers[x]", "parent": 73, "children": [75, 76], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 19}}, {"id": 75, "type": "identifier", "text": "stTimers", "parent": 74, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 16}}, {"id": 76, "type": "identifier", "text": "x", "parent": 74, "children": [], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 18}}, {"id": 77, "type": "field_identifier", "text": "xTimer", "parent": 73, "children": [], "start_point": {"row": 38, "column": 20}, "end_point": {"row": 38, "column": 26}}, {"id": 78, "type": "=", "text": "=", "parent": 72, "children": [], "start_point": {"row": 38, "column": 27}, "end_point": {"row": 38, "column": 28}}, {"id": 79, "type": "call_expression", "text": "xTimerCreate\n ( /* Just a text name, not used by the RTOS kernel. */\n \"Timer\",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n )", "parent": 72, "children": [80, 81], "start_point": {"row": 38, "column": 29}, "end_point": {"row": 49, "column": 9}}, {"id": 80, "type": "identifier", "text": "xTimerCreate", "parent": 79, "children": [], "start_point": {"row": 38, "column": 29}, "end_point": {"row": 38, "column": 41}}, {"id": 81, "type": "argument_list", "text": "( /* Just a text name, not used by the RTOS kernel. */\n \"Timer\",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n )", "parent": 79, "children": [82, 83, 84, 85, 91], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 49, "column": 9}}, {"id": 82, "type": "string_literal", "text": "\"Timer\"", "parent": 81, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 15}}, {"id": 83, "type": "number_literal", "text": "2000", "parent": 81, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 12}}, {"id": 84, "type": "identifier", "text": "pdFALSE", "parent": 81, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 15}}, {"id": 85, "type": "cast_expression", "text": "( void * ) x", "parent": 81, "children": [86, 90], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 20}}, {"id": 86, "type": "type_descriptor", "text": "void *", "parent": 85, "children": [87, 88], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 16}}, {"id": 87, "type": "primitive_type", "text": "void", "parent": 86, "children": [], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 14}}, {"id": 88, "type": "abstract_pointer_declarator", "text": "*", "parent": 86, "children": [89], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 16}}, {"id": 89, "type": "*", "text": "*", "parent": 88, "children": [], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 16}}, {"id": 90, "type": "identifier", "text": "x", "parent": 85, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 20}}, {"id": 91, "type": "identifier", "text": "vTimerCallback", "parent": 81, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 22}}, {"id": 92, "type": "if_statement", "text": "if( stTimers[x].xTimer == NULL )\n {\n /* The timer was not created. */\n return 1; //Failure\n }", "parent": 60, "children": [93], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 55, "column": 9}}, {"id": 93, "type": "parenthesized_expression", "text": "( stTimers[x].xTimer == NULL )", "parent": 92, "children": [94], "start_point": {"row": 51, "column": 10}, "end_point": {"row": 51, "column": 40}}, {"id": 94, "type": "binary_expression", "text": "stTimers[x].xTimer == NULL", "parent": 93, "children": [95, 100, 101], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 38}}, {"id": 95, "type": "field_expression", "text": "stTimers[x].xTimer", "parent": 94, "children": [96, 99], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 30}}, {"id": 96, "type": "subscript_expression", "text": "stTimers[x]", "parent": 95, "children": [97, 98], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 23}}, {"id": 97, "type": "identifier", "text": "stTimers", "parent": 96, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 20}}, {"id": 98, "type": "identifier", "text": "x", "parent": 96, "children": [], "start_point": {"row": 51, "column": 21}, "end_point": {"row": 51, "column": 22}}, {"id": 99, "type": "field_identifier", "text": "xTimer", "parent": 95, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 30}}, {"id": 100, "type": "==", "text": "==", "parent": 94, "children": [], "start_point": {"row": 51, "column": 31}, "end_point": {"row": 51, "column": 33}}, {"id": 101, "type": "null", "text": "NULL", "parent": 94, "children": [102], "start_point": {"row": 51, "column": 34}, "end_point": {"row": 51, "column": 38}}, {"id": 102, "type": "NULL", "text": "NULL", "parent": 101, "children": [], "start_point": {"row": 51, "column": 34}, "end_point": {"row": 51, "column": 38}}, {"id": 103, "type": "return_statement", "text": "return 1;", "parent": 92, "children": [104], "start_point": {"row": 54, "column": 12}, "end_point": {"row": 54, "column": 21}}, {"id": 104, "type": "number_literal", "text": "1", "parent": 103, "children": [], "start_point": {"row": 54, "column": 19}, "end_point": {"row": 54, "column": 20}}, {"id": 105, "type": "return_statement", "text": "return 0;", "parent": 50, "children": [106], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 13}}, {"id": 106, "type": "number_literal", "text": "0", "parent": 105, "children": [], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 12}}, {"id": 107, "type": "function_definition", "text": "void init_timer(Timer* timer)\n{\n uint32_t i = 0;\n AllocatedTimerIndex++;\n\n \n for(i=0; i < MAX_NUM_TIMERS; i++)\n {\n if(!stTimers[i].Allocated)\n {\n stTimers[i].Allocated = 1;\n *timer = &stTimers[i];\n goto exit;\n }\n }\n\nexit:\t\n ;\n}", "parent": null, "children": [108, 109], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 88, "column": 1}}, {"id": 108, "type": "primitive_type", "text": "void", "parent": 107, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 4}}, {"id": 109, "type": "function_declarator", "text": "init_timer(Timer* timer)", "parent": 107, "children": [110, 111], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 29}}, {"id": 110, "type": "identifier", "text": "init_timer", "parent": 109, "children": [], "start_point": {"row": 70, "column": 5}, "end_point": {"row": 70, "column": 15}}, {"id": 111, "type": "parameter_list", "text": "(Timer* timer)", "parent": 109, "children": [112], "start_point": {"row": 70, "column": 15}, "end_point": {"row": 70, "column": 29}}, {"id": 112, "type": "parameter_declaration", "text": "Timer* timer", "parent": 111, "children": [113, 114], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 28}}, {"id": 113, "type": "type_identifier", "text": "Timer", "parent": 112, "children": [], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 21}}, {"id": 114, "type": "pointer_declarator", "text": "* timer", "parent": 112, "children": [115, 116], "start_point": {"row": 70, "column": 21}, "end_point": {"row": 70, "column": 28}}, {"id": 115, "type": "*", "text": "*", "parent": 114, "children": [], "start_point": {"row": 70, "column": 21}, "end_point": {"row": 70, "column": 22}}, {"id": 116, "type": "identifier", "text": "timer", "parent": 114, "children": [], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 28}}, {"id": 117, "type": "declaration", "text": "uint32_t i = 0;", "parent": 107, "children": [118, 119], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 19}}, {"id": 118, "type": "primitive_type", "text": "uint32_t", "parent": 117, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 12}}, {"id": 119, "type": "init_declarator", "text": "i = 0", "parent": 117, "children": [120, 121, 122], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 18}}, {"id": 120, "type": "identifier", "text": "i", "parent": 119, "children": [], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 14}}, {"id": 121, "type": "=", "text": "=", "parent": 119, "children": [], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 16}}, {"id": 122, "type": "number_literal", "text": "0", "parent": 119, "children": [], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 18}}, {"id": 123, "type": "update_expression", "text": "AllocatedTimerIndex++", "parent": 107, "children": [124, 125], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 25}}, {"id": 124, "type": "identifier", "text": "AllocatedTimerIndex", "parent": 123, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 23}}, {"id": 125, "type": "++", "text": "++", "parent": 123, "children": [], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 25}}, {"id": 126, "type": "for_statement", "text": "for(i=0; i < MAX_NUM_TIMERS; i++)\n {\n if(!stTimers[i].Allocated)\n {\n stTimers[i].Allocated = 1;\n *timer = &stTimers[i];\n goto exit;\n }\n }", "parent": 107, "children": [127, 131, 135], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 84, "column": 5}}, {"id": 127, "type": "assignment_expression", "text": "i=0", "parent": 126, "children": [128, 129, 130], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 11}}, {"id": 128, "type": "identifier", "text": "i", "parent": 127, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 9}}, {"id": 129, "type": "=", "text": "=", "parent": 127, "children": [], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 10}}, {"id": 130, "type": "number_literal", "text": "0", "parent": 127, "children": [], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 11}}, {"id": 131, "type": "binary_expression", "text": "i < MAX_NUM_TIMERS", "parent": 126, "children": [132, 133, 134], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 31}}, {"id": 132, "type": "identifier", "text": "i", "parent": 131, "children": [], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 14}}, {"id": 133, "type": "<", "text": "<", "parent": 131, "children": [], "start_point": {"row": 76, "column": 15}, "end_point": {"row": 76, "column": 16}}, {"id": 134, "type": "identifier", "text": "MAX_NUM_TIMERS", "parent": 131, "children": [], "start_point": {"row": 76, "column": 17}, "end_point": {"row": 76, "column": 31}}, {"id": 135, "type": "update_expression", "text": "i++", "parent": 126, "children": [136, 137], "start_point": {"row": 76, "column": 33}, "end_point": {"row": 76, "column": 36}}, {"id": 136, "type": "identifier", "text": "i", "parent": 135, "children": [], "start_point": {"row": 76, "column": 33}, "end_point": {"row": 76, "column": 34}}, {"id": 137, "type": "++", "text": "++", "parent": 135, "children": [], "start_point": {"row": 76, "column": 34}, "end_point": {"row": 76, "column": 36}}, {"id": 138, "type": "if_statement", "text": "if(!stTimers[i].Allocated)\n {\n stTimers[i].Allocated = 1;\n *timer = &stTimers[i];\n goto exit;\n }", "parent": 126, "children": [139], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 83, "column": 9}}, {"id": 139, "type": "parenthesized_expression", "text": "(!stTimers[i].Allocated)", "parent": 138, "children": [140], "start_point": {"row": 78, "column": 10}, "end_point": {"row": 78, "column": 34}}, {"id": 140, "type": "unary_expression", "text": "!stTimers[i].Allocated", "parent": 139, "children": [141, 142], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 33}}, {"id": 141, "type": "!", "text": "!", "parent": 140, "children": [], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 12}}, {"id": 142, "type": "field_expression", "text": "stTimers[i].Allocated", "parent": 140, "children": [143, 146], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 33}}, {"id": 143, "type": "subscript_expression", "text": "stTimers[i]", "parent": 142, "children": [144, 145], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 23}}, {"id": 144, "type": "identifier", "text": "stTimers", "parent": 143, "children": [], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 20}}, {"id": 145, "type": "identifier", "text": "i", "parent": 143, "children": [], "start_point": {"row": 78, "column": 21}, "end_point": {"row": 78, "column": 22}}, {"id": 146, "type": "field_identifier", "text": "Allocated", "parent": 142, "children": [], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 33}}, {"id": 147, "type": "assignment_expression", "text": "stTimers[i].Allocated = 1", "parent": 138, "children": [148, 153, 154], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 37}}, {"id": 148, "type": "field_expression", "text": "stTimers[i].Allocated", "parent": 147, "children": [149, 152], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 33}}, {"id": 149, "type": "subscript_expression", "text": "stTimers[i]", "parent": 148, "children": [150, 151], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 23}}, {"id": 150, "type": "identifier", "text": "stTimers", "parent": 149, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 20}}, {"id": 151, "type": "identifier", "text": "i", "parent": 149, "children": [], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 22}}, {"id": 152, "type": "field_identifier", "text": "Allocated", "parent": 148, "children": [], "start_point": {"row": 80, "column": 24}, "end_point": {"row": 80, "column": 33}}, {"id": 153, "type": "=", "text": "=", "parent": 147, "children": [], "start_point": {"row": 80, "column": 34}, "end_point": {"row": 80, "column": 35}}, {"id": 154, "type": "number_literal", "text": "1", "parent": 147, "children": [], "start_point": {"row": 80, "column": 36}, "end_point": {"row": 80, "column": 37}}, {"id": 155, "type": "assignment_expression", "text": "*timer = &stTimers[i]", "parent": 138, "children": [156, 159, 160], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 33}}, {"id": 156, "type": "pointer_expression", "text": "*timer", "parent": 155, "children": [157, 158], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 18}}, {"id": 157, "type": "*", "text": "*", "parent": 156, "children": [], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 13}}, {"id": 158, "type": "identifier", "text": "timer", "parent": 156, "children": [], "start_point": {"row": 81, "column": 13}, "end_point": {"row": 81, "column": 18}}, {"id": 159, "type": "=", "text": "=", "parent": 155, "children": [], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 20}}, {"id": 160, "type": "pointer_expression", "text": "&stTimers[i]", "parent": 155, "children": [161], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 33}}, {"id": 161, "type": "subscript_expression", "text": "stTimers[i]", "parent": 160, "children": [162, 163], "start_point": {"row": 81, "column": 22}, "end_point": {"row": 81, "column": 33}}, {"id": 162, "type": "identifier", "text": "stTimers", "parent": 161, "children": [], "start_point": {"row": 81, "column": 22}, "end_point": {"row": 81, "column": 30}}, {"id": 163, "type": "identifier", "text": "i", "parent": 161, "children": [], "start_point": {"row": 81, "column": 31}, "end_point": {"row": 81, "column": 32}}, {"id": 164, "type": "goto_statement", "text": "goto exit;", "parent": 138, "children": [165, 166], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 22}}, {"id": 165, "type": "goto", "text": "goto", "parent": 164, "children": [], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 16}}, {"id": 166, "type": "statement_identifier", "text": "exit", "parent": 164, "children": [], "start_point": {"row": 82, "column": 17}, "end_point": {"row": 82, "column": 21}}, {"id": 167, "type": "labeled_statement", "text": "exit:\t\n ;", "parent": 107, "children": [168], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 87, "column": 5}}, {"id": 168, "type": "statement_identifier", "text": "exit", "parent": 167, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 4}}, {"id": 169, "type": "function_definition", "text": "void DeInitTimer(Timer* timer)\n{\n\n AllocatedTimerIndex--;\n xTimerStop( ((pst_TimerHandle_t)*timer)->xTimer, 0 );\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n ((pst_TimerHandle_t)*timer)->Allocated = 0;\n}", "parent": null, "children": [170, 171], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 97, "column": 1}}, {"id": 170, "type": "primitive_type", "text": "void", "parent": 169, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 4}}, {"id": 171, "type": "function_declarator", "text": "DeInitTimer(Timer* timer)", "parent": 169, "children": [172, 173], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 30}}, {"id": 172, "type": "identifier", "text": "DeInitTimer", "parent": 171, "children": [], "start_point": {"row": 90, "column": 5}, "end_point": {"row": 90, "column": 16}}, {"id": 173, "type": "parameter_list", "text": "(Timer* timer)", "parent": 171, "children": [174], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 30}}, {"id": 174, "type": "parameter_declaration", "text": "Timer* timer", "parent": 173, "children": [175, 176], "start_point": {"row": 90, "column": 17}, "end_point": {"row": 90, "column": 29}}, {"id": 175, "type": "type_identifier", "text": "Timer", "parent": 174, "children": [], "start_point": {"row": 90, "column": 17}, "end_point": {"row": 90, "column": 22}}, {"id": 176, "type": "pointer_declarator", "text": "* timer", "parent": 174, "children": [177, 178], "start_point": {"row": 90, "column": 22}, "end_point": {"row": 90, "column": 29}}, {"id": 177, "type": "*", "text": "*", "parent": 176, "children": [], "start_point": {"row": 90, "column": 22}, "end_point": {"row": 90, "column": 23}}, {"id": 178, "type": "identifier", "text": "timer", "parent": 176, "children": [], "start_point": {"row": 90, "column": 24}, "end_point": {"row": 90, "column": 29}}, {"id": 179, "type": "update_expression", "text": "AllocatedTimerIndex--", "parent": 169, "children": [180, 181], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 25}}, {"id": 180, "type": "identifier", "text": "AllocatedTimerIndex", "parent": 179, "children": [], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 93, "column": 23}}, {"id": 181, "type": "--", "text": "--", "parent": 179, "children": [], "start_point": {"row": 93, "column": 23}, "end_point": {"row": 93, "column": 25}}, {"id": 182, "type": "call_expression", "text": "xTimerStop( ((pst_TimerHandle_t)*timer)->xTimer, 0 )", "parent": 169, "children": [183, 184], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 56}}, {"id": 183, "type": "identifier", "text": "xTimerStop", "parent": 182, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 14}}, {"id": 184, "type": "argument_list", "text": "( ((pst_TimerHandle_t)*timer)->xTimer, 0 )", "parent": 182, "children": [185, 193], "start_point": {"row": 94, "column": 14}, "end_point": {"row": 94, "column": 56}}, {"id": 185, "type": "field_expression", "text": "((pst_TimerHandle_t)*timer)->xTimer", "parent": 184, "children": [186, 192], "start_point": {"row": 94, "column": 16}, "end_point": {"row": 94, "column": 51}}, {"id": 186, "type": "parenthesized_expression", "text": "((pst_TimerHandle_t)*timer)", "parent": 185, "children": [187], "start_point": {"row": 94, "column": 16}, "end_point": {"row": 94, "column": 43}}, {"id": 187, "type": "binary_expression", "text": "(pst_TimerHandle_t)*timer", "parent": 186, "children": [188, 190, 191], "start_point": {"row": 94, "column": 17}, "end_point": {"row": 94, "column": 42}}, {"id": 188, "type": "parenthesized_expression", "text": "(pst_TimerHandle_t)", "parent": 187, "children": [189], "start_point": {"row": 94, "column": 17}, "end_point": {"row": 94, "column": 36}}, {"id": 189, "type": "identifier", "text": "pst_TimerHandle_t", "parent": 188, "children": [], "start_point": {"row": 94, "column": 18}, "end_point": {"row": 94, "column": 35}}, {"id": 190, "type": "*", "text": "*", "parent": 187, "children": [], "start_point": {"row": 94, "column": 36}, "end_point": {"row": 94, "column": 37}}, {"id": 191, "type": "identifier", "text": "timer", "parent": 187, "children": [], "start_point": {"row": 94, "column": 37}, "end_point": {"row": 94, "column": 42}}, {"id": 192, "type": "field_identifier", "text": "xTimer", "parent": 185, "children": [], "start_point": {"row": 94, "column": 45}, "end_point": {"row": 94, "column": 51}}, {"id": 193, "type": "number_literal", "text": "0", "parent": 184, "children": [], "start_point": {"row": 94, "column": 53}, "end_point": {"row": 94, "column": 54}}, {"id": 194, "type": "assignment_expression", "text": "((pst_TimerHandle_t)*timer)->TimeToExpire = 0", "parent": 169, "children": [195, 203, 204], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 49}}, {"id": 195, "type": "field_expression", "text": "((pst_TimerHandle_t)*timer)->TimeToExpire", "parent": 194, "children": [196, 202], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 45}}, {"id": 196, "type": "parenthesized_expression", "text": "((pst_TimerHandle_t)*timer)", "parent": 195, "children": [197], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 31}}, {"id": 197, "type": "binary_expression", "text": "(pst_TimerHandle_t)*timer", "parent": 196, "children": [198, 200, 201], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 95, "column": 30}}, {"id": 198, "type": "parenthesized_expression", "text": "(pst_TimerHandle_t)", "parent": 197, "children": [199], "start_point": {"row": 95, "column": 5}, "end_point": {"row": 95, "column": 24}}, {"id": 199, "type": "identifier", "text": "pst_TimerHandle_t", "parent": 198, "children": [], "start_point": {"row": 95, "column": 6}, "end_point": {"row": 95, "column": 23}}, {"id": 200, "type": "*", "text": "*", "parent": 197, "children": [], "start_point": {"row": 95, "column": 24}, "end_point": {"row": 95, "column": 25}}, {"id": 201, "type": "identifier", "text": "timer", "parent": 197, "children": [], "start_point": {"row": 95, "column": 25}, "end_point": {"row": 95, "column": 30}}, {"id": 202, "type": "field_identifier", "text": "TimeToExpire", "parent": 195, "children": [], "start_point": {"row": 95, "column": 33}, "end_point": {"row": 95, "column": 45}}, {"id": 203, "type": "=", "text": "=", "parent": 194, "children": [], "start_point": {"row": 95, "column": 46}, "end_point": {"row": 95, "column": 47}}, {"id": 204, "type": "number_literal", "text": "0", "parent": 194, "children": [], "start_point": {"row": 95, "column": 48}, "end_point": {"row": 95, "column": 49}}, {"id": 205, "type": "assignment_expression", "text": "((pst_TimerHandle_t)*timer)->Allocated = 0", "parent": 169, "children": [206, 214, 215], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 46}}, {"id": 206, "type": "field_expression", "text": "((pst_TimerHandle_t)*timer)->Allocated", "parent": 205, "children": [207, 213], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 42}}, {"id": 207, "type": "parenthesized_expression", "text": "((pst_TimerHandle_t)*timer)", "parent": 206, "children": [208], "start_point": {"row": 96, "column": 4}, "end_point": {"row": 96, "column": 31}}, {"id": 208, "type": "binary_expression", "text": "(pst_TimerHandle_t)*timer", "parent": 207, "children": [209, 211, 212], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 30}}, {"id": 209, "type": "parenthesized_expression", "text": "(pst_TimerHandle_t)", "parent": 208, "children": [210], "start_point": {"row": 96, "column": 5}, "end_point": {"row": 96, "column": 24}}, {"id": 210, "type": "identifier", "text": "pst_TimerHandle_t", "parent": 209, "children": [], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 23}}, {"id": 211, "type": "*", "text": "*", "parent": 208, "children": [], "start_point": {"row": 96, "column": 24}, "end_point": {"row": 96, "column": 25}}, {"id": 212, "type": "identifier", "text": "timer", "parent": 208, "children": [], "start_point": {"row": 96, "column": 25}, "end_point": {"row": 96, "column": 30}}, {"id": 213, "type": "field_identifier", "text": "Allocated", "parent": 206, "children": [], "start_point": {"row": 96, "column": 33}, "end_point": {"row": 96, "column": 42}}, {"id": 214, "type": "=", "text": "=", "parent": 205, "children": [], "start_point": {"row": 96, "column": 43}, "end_point": {"row": 96, "column": 44}}, {"id": 215, "type": "number_literal", "text": "0", "parent": 205, "children": [], "start_point": {"row": 96, "column": 45}, "end_point": {"row": 96, "column": 46}}, {"id": 216, "type": "function_definition", "text": "bool has_timer_expired(Timer* timer)\n{\n\n if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer) != pdFALSE )// active means not expired\n {\n return pdFALSE; //0 = timer not expired\n }\n else\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n\n return !pdFALSE;//1 = timer expired\n }\n}", "parent": null, "children": [217, 218], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 127, "column": 1}}, {"id": 217, "type": "primitive_type", "text": "bool", "parent": 216, "children": [], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 4}}, {"id": 218, "type": "function_declarator", "text": "has_timer_expired(Timer* timer)", "parent": 216, "children": [219, 220], "start_point": {"row": 114, "column": 5}, "end_point": {"row": 114, "column": 36}}, {"id": 219, "type": "identifier", "text": "has_timer_expired", "parent": 218, "children": [], "start_point": {"row": 114, "column": 5}, "end_point": {"row": 114, "column": 22}}, {"id": 220, "type": "parameter_list", "text": "(Timer* timer)", "parent": 218, "children": [221], "start_point": {"row": 114, "column": 22}, "end_point": {"row": 114, "column": 36}}, {"id": 221, "type": "parameter_declaration", "text": "Timer* timer", "parent": 220, "children": [222, 223], "start_point": {"row": 114, "column": 23}, "end_point": {"row": 114, "column": 35}}, {"id": 222, "type": "type_identifier", "text": "Timer", "parent": 221, "children": [], "start_point": {"row": 114, "column": 23}, "end_point": {"row": 114, "column": 28}}, {"id": 223, "type": "pointer_declarator", "text": "* timer", "parent": 221, "children": [224, 225], "start_point": {"row": 114, "column": 28}, "end_point": {"row": 114, "column": 35}}, {"id": 224, "type": "*", "text": "*", "parent": 223, "children": [], "start_point": {"row": 114, "column": 28}, "end_point": {"row": 114, "column": 29}}, {"id": 225, "type": "identifier", "text": "timer", "parent": 223, "children": [], "start_point": {"row": 114, "column": 30}, "end_point": {"row": 114, "column": 35}}, {"id": 226, "type": "if_statement", "text": "if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer) != pdFALSE )// active means not expired\n {\n return pdFALSE; //0 = timer not expired\n }\n else\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n\n return !pdFALSE;//1 = timer expired\n }", "parent": 216, "children": [227, 244], "start_point": {"row": 117, "column": 4}, "end_point": {"row": 126, "column": 5}}, {"id": 227, "type": "parenthesized_expression", "text": "( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer) != pdFALSE )", "parent": 226, "children": [228], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 77}}, {"id": 228, "type": "binary_expression", "text": "xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer) != pdFALSE", "parent": 227, "children": [229, 240, 241], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 75}}, {"id": 229, "type": "call_expression", "text": "xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer)", "parent": 228, "children": [230, 231], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 64}}, {"id": 230, "type": "identifier", "text": "xTimerIsTimerActive", "parent": 229, "children": [], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 27}}, {"id": 231, "type": "argument_list", "text": "(((pst_TimerHandle_t)*timer)->xTimer)", "parent": 229, "children": [232], "start_point": {"row": 117, "column": 27}, "end_point": {"row": 117, "column": 64}}, {"id": 232, "type": "field_expression", "text": "((pst_TimerHandle_t)*timer)->xTimer", "parent": 231, "children": [233, 239], "start_point": {"row": 117, "column": 28}, "end_point": {"row": 117, "column": 63}}, {"id": 233, "type": "parenthesized_expression", "text": "((pst_TimerHandle_t)*timer)", "parent": 232, "children": [234], "start_point": {"row": 117, "column": 28}, "end_point": {"row": 117, "column": 55}}, {"id": 234, "type": "binary_expression", "text": "(pst_TimerHandle_t)*timer", "parent": 233, "children": [235, 237, 238], "start_point": {"row": 117, "column": 29}, "end_point": {"row": 117, "column": 54}}, {"id": 235, "type": "parenthesized_expression", "text": "(pst_TimerHandle_t)", "parent": 234, "children": [236], "start_point": {"row": 117, "column": 29}, "end_point": {"row": 117, "column": 48}}, {"id": 236, "type": "identifier", "text": "pst_TimerHandle_t", "parent": 235, "children": [], "start_point": {"row": 117, "column": 30}, "end_point": {"row": 117, "column": 47}}, {"id": 237, "type": "*", "text": "*", "parent": 234, "children": [], "start_point": {"row": 117, "column": 48}, "end_point": {"row": 117, "column": 49}}, {"id": 238, "type": "identifier", "text": "timer", "parent": 234, "children": [], "start_point": {"row": 117, "column": 49}, "end_point": {"row": 117, "column": 54}}, {"id": 239, "type": "field_identifier", "text": "xTimer", "parent": 232, "children": [], "start_point": {"row": 117, "column": 57}, "end_point": {"row": 117, "column": 63}}, {"id": 240, "type": "!=", "text": "!=", "parent": 228, "children": [], "start_point": {"row": 117, "column": 65}, "end_point": {"row": 117, "column": 67}}, {"id": 241, "type": "identifier", "text": "pdFALSE", "parent": 228, "children": [], "start_point": {"row": 117, "column": 68}, "end_point": {"row": 117, "column": 75}}, {"id": 242, "type": "return_statement", "text": "return pdFALSE;", "parent": 226, "children": [243], "start_point": {"row": 119, "column": 8}, "end_point": {"row": 119, "column": 23}}, {"id": 243, "type": "identifier", "text": "pdFALSE", "parent": 242, "children": [], "start_point": {"row": 119, "column": 15}, "end_point": {"row": 119, "column": 22}}, {"id": 244, "type": "else_clause", "text": "else\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n\n return !pdFALSE;//1 = timer expired\n }", "parent": 226, "children": [], "start_point": {"row": 121, "column": 4}, "end_point": {"row": 126, "column": 5}}, {"id": 245, "type": "assignment_expression", "text": "((pst_TimerHandle_t)*timer)->TimeToExpire = 0", "parent": 244, "children": [246, 254, 255], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 53}}, {"id": 246, "type": "field_expression", "text": "((pst_TimerHandle_t)*timer)->TimeToExpire", "parent": 245, "children": [247, 253], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 49}}, {"id": 247, "type": "parenthesized_expression", "text": "((pst_TimerHandle_t)*timer)", "parent": 246, "children": [248], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 35}}, {"id": 248, "type": "binary_expression", "text": "(pst_TimerHandle_t)*timer", "parent": 247, "children": [249, 251, 252], "start_point": {"row": 123, "column": 9}, "end_point": {"row": 123, "column": 34}}, {"id": 249, "type": "parenthesized_expression", "text": "(pst_TimerHandle_t)", "parent": 248, "children": [250], "start_point": {"row": 123, "column": 9}, "end_point": {"row": 123, "column": 28}}, {"id": 250, "type": "identifier", "text": "pst_TimerHandle_t", "parent": 249, "children": [], "start_point": {"row": 123, "column": 10}, "end_point": {"row": 123, "column": 27}}, {"id": 251, "type": "*", "text": "*", "parent": 248, "children": [], "start_point": {"row": 123, "column": 28}, "end_point": {"row": 123, "column": 29}}, {"id": 252, "type": "identifier", "text": "timer", "parent": 248, "children": [], "start_point": {"row": 123, "column": 29}, "end_point": {"row": 123, "column": 34}}, {"id": 253, "type": "field_identifier", "text": "TimeToExpire", "parent": 246, "children": [], "start_point": {"row": 123, "column": 37}, "end_point": {"row": 123, "column": 49}}, {"id": 254, "type": "=", "text": "=", "parent": 245, "children": [], "start_point": {"row": 123, "column": 50}, "end_point": {"row": 123, "column": 51}}, {"id": 255, "type": "number_literal", "text": "0", "parent": 245, "children": [], "start_point": {"row": 123, "column": 52}, "end_point": {"row": 123, "column": 53}}, {"id": 256, "type": "return_statement", "text": "return !pdFALSE;", "parent": 244, "children": [257], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 24}}, {"id": 257, "type": "unary_expression", "text": "!pdFALSE", "parent": 256, "children": [258, 259], "start_point": {"row": 125, "column": 15}, "end_point": {"row": 125, "column": 23}}, {"id": 258, "type": "!", "text": "!", "parent": 257, "children": [], "start_point": {"row": 125, "column": 15}, "end_point": {"row": 125, "column": 16}}, {"id": 259, "type": "identifier", "text": "pdFALSE", "parent": 257, "children": [], "start_point": {"row": 125, "column": 16}, "end_point": {"row": 125, "column": 23}}, {"id": 260, "type": "function_definition", "text": "void countdown_ms(Timer* timer, unsigned int time_ms)\n{\n\n if( xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 ) == pdPASS )\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = xTaskGetTickCount();;\n }\n else\n {\n }\n \n}", "parent": null, "children": [261, 262], "start_point": {"row": 137, "column": 0}, "end_point": {"row": 148, "column": 1}}, {"id": 261, "type": "primitive_type", "text": "void", "parent": 260, "children": [], "start_point": {"row": 137, "column": 0}, "end_point": {"row": 137, "column": 4}}, {"id": 262, "type": "function_declarator", "text": "countdown_ms(Timer* timer, unsigned int time_ms)", "parent": 260, "children": [263, 264], "start_point": {"row": 137, "column": 5}, "end_point": {"row": 137, "column": 53}}, {"id": 263, "type": "identifier", "text": "countdown_ms", "parent": 262, "children": [], "start_point": {"row": 137, "column": 5}, "end_point": {"row": 137, "column": 17}}, {"id": 264, "type": "parameter_list", "text": "(Timer* timer, unsigned int time_ms)", "parent": 262, "children": [265, 270], "start_point": {"row": 137, "column": 17}, "end_point": {"row": 137, "column": 53}}, {"id": 265, "type": "parameter_declaration", "text": "Timer* timer", "parent": 264, "children": [266, 267], "start_point": {"row": 137, "column": 18}, "end_point": {"row": 137, "column": 30}}, {"id": 266, "type": "type_identifier", "text": "Timer", "parent": 265, "children": [], "start_point": {"row": 137, "column": 18}, "end_point": {"row": 137, "column": 23}}, {"id": 267, "type": "pointer_declarator", "text": "* timer", "parent": 265, "children": [268, 269], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 30}}, {"id": 268, "type": "*", "text": "*", "parent": 267, "children": [], "start_point": {"row": 137, "column": 23}, "end_point": {"row": 137, "column": 24}}, {"id": 269, "type": "identifier", "text": "timer", "parent": 267, "children": [], "start_point": {"row": 137, "column": 25}, "end_point": {"row": 137, "column": 30}}, {"id": 270, "type": "parameter_declaration", "text": "unsigned int time_ms", "parent": 264, "children": [271, 274], "start_point": {"row": 137, "column": 32}, "end_point": {"row": 137, "column": 52}}, {"id": 271, "type": "sized_type_specifier", "text": "unsigned int", "parent": 270, "children": [272, 273], "start_point": {"row": 137, "column": 32}, "end_point": {"row": 137, "column": 44}}, {"id": 272, "type": "unsigned", "text": "unsigned", "parent": 271, "children": [], "start_point": {"row": 137, "column": 32}, "end_point": {"row": 137, "column": 40}}, {"id": 273, "type": "primitive_type", "text": "int", "parent": 271, "children": [], "start_point": {"row": 137, "column": 41}, "end_point": {"row": 137, "column": 44}}, {"id": 274, "type": "identifier", "text": "time_ms", "parent": 270, "children": [], "start_point": {"row": 137, "column": 45}, "end_point": {"row": 137, "column": 52}}, {"id": 275, "type": "if_statement", "text": "if( xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 ) == pdPASS )\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = xTaskGetTickCount();;\n }\n else\n {\n }", "parent": 260, "children": [276, 309], "start_point": {"row": 140, "column": 4}, "end_point": {"row": 146, "column": 5}}, {"id": 276, "type": "parenthesized_expression", "text": "( xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 ) == pdPASS )", "parent": 275, "children": [277], "start_point": {"row": 140, "column": 6}, "end_point": {"row": 140, "column": 110}}, {"id": 277, "type": "binary_expression", "text": "xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 ) == pdPASS", "parent": 276, "children": [278, 294, 295], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 108}}, {"id": 278, "type": "call_expression", "text": "xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 )", "parent": 277, "children": [279, 280], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 98}}, {"id": 279, "type": "identifier", "text": "xTimerChangePeriod", "parent": 278, "children": [], "start_point": {"row": 140, "column": 8}, "end_point": {"row": 140, "column": 26}}, {"id": 280, "type": "argument_list", "text": "( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 )", "parent": 278, "children": [281, 289, 293], "start_point": {"row": 140, "column": 26}, "end_point": {"row": 140, "column": 98}}, {"id": 281, "type": "field_expression", "text": "((pst_TimerHandle_t)*timer)->xTimer", "parent": 280, "children": [282, 288], "start_point": {"row": 140, "column": 28}, "end_point": {"row": 140, "column": 63}}, {"id": 282, "type": "parenthesized_expression", "text": "((pst_TimerHandle_t)*timer)", "parent": 281, "children": [283], "start_point": {"row": 140, "column": 28}, "end_point": {"row": 140, "column": 55}}, {"id": 283, "type": "binary_expression", "text": "(pst_TimerHandle_t)*timer", "parent": 282, "children": [284, 286, 287], "start_point": {"row": 140, "column": 29}, "end_point": {"row": 140, "column": 54}}, {"id": 284, "type": "parenthesized_expression", "text": "(pst_TimerHandle_t)", "parent": 283, "children": [285], "start_point": {"row": 140, "column": 29}, "end_point": {"row": 140, "column": 48}}, {"id": 285, "type": "identifier", "text": "pst_TimerHandle_t", "parent": 284, "children": [], "start_point": {"row": 140, "column": 30}, "end_point": {"row": 140, "column": 47}}, {"id": 286, "type": "*", "text": "*", "parent": 283, "children": [], "start_point": {"row": 140, "column": 48}, "end_point": {"row": 140, "column": 49}}, {"id": 287, "type": "identifier", "text": "timer", "parent": 283, "children": [], "start_point": {"row": 140, "column": 49}, "end_point": {"row": 140, "column": 54}}, {"id": 288, "type": "field_identifier", "text": "xTimer", "parent": 281, "children": [], "start_point": {"row": 140, "column": 57}, "end_point": {"row": 140, "column": 63}}, {"id": 289, "type": "binary_expression", "text": "time_ms / portTICK_PERIOD_MS", "parent": 280, "children": [290, 291, 292], "start_point": {"row": 140, "column": 65}, "end_point": {"row": 140, "column": 93}}, {"id": 290, "type": "identifier", "text": "time_ms", "parent": 289, "children": [], "start_point": {"row": 140, "column": 65}, "end_point": {"row": 140, "column": 72}}, {"id": 291, "type": "/", "text": "/", "parent": 289, "children": [], "start_point": {"row": 140, "column": 73}, "end_point": {"row": 140, "column": 74}}, {"id": 292, "type": "identifier", "text": "portTICK_PERIOD_MS", "parent": 289, "children": [], "start_point": {"row": 140, "column": 75}, "end_point": {"row": 140, "column": 93}}, {"id": 293, "type": "number_literal", "text": "0", "parent": 280, "children": [], "start_point": {"row": 140, "column": 95}, "end_point": {"row": 140, "column": 96}}, {"id": 294, "type": "==", "text": "==", "parent": 277, "children": [], "start_point": {"row": 140, "column": 99}, "end_point": {"row": 140, "column": 101}}, {"id": 295, "type": "identifier", "text": "pdPASS", "parent": 277, "children": [], "start_point": {"row": 140, "column": 102}, "end_point": {"row": 140, "column": 108}}, {"id": 296, "type": "assignment_expression", "text": "((pst_TimerHandle_t)*timer)->TimeToExpire = xTaskGetTickCount()", "parent": 275, "children": [297, 305, 306], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 71}}, {"id": 297, "type": "field_expression", "text": "((pst_TimerHandle_t)*timer)->TimeToExpire", "parent": 296, "children": [298, 304], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 49}}, {"id": 298, "type": "parenthesized_expression", "text": "((pst_TimerHandle_t)*timer)", "parent": 297, "children": [299], "start_point": {"row": 142, "column": 8}, "end_point": {"row": 142, "column": 35}}, {"id": 299, "type": "binary_expression", "text": "(pst_TimerHandle_t)*timer", "parent": 298, "children": [300, 302, 303], "start_point": {"row": 142, "column": 9}, "end_point": {"row": 142, "column": 34}}, {"id": 300, "type": "parenthesized_expression", "text": "(pst_TimerHandle_t)", "parent": 299, "children": [301], "start_point": {"row": 142, "column": 9}, "end_point": {"row": 142, "column": 28}}, {"id": 301, "type": "identifier", "text": "pst_TimerHandle_t", "parent": 300, "children": [], "start_point": {"row": 142, "column": 10}, "end_point": {"row": 142, "column": 27}}, {"id": 302, "type": "*", "text": "*", "parent": 299, "children": [], "start_point": {"row": 142, "column": 28}, "end_point": {"row": 142, "column": 29}}, {"id": 303, "type": "identifier", "text": "timer", "parent": 299, "children": [], "start_point": {"row": 142, "column": 29}, "end_point": {"row": 142, "column": 34}}, {"id": 304, "type": "field_identifier", "text": "TimeToExpire", "parent": 297, "children": [], "start_point": {"row": 142, "column": 37}, "end_point": {"row": 142, "column": 49}}, {"id": 305, "type": "=", "text": "=", "parent": 296, "children": [], "start_point": {"row": 142, "column": 50}, "end_point": {"row": 142, "column": 51}}, {"id": 306, "type": "call_expression", "text": "xTaskGetTickCount()", "parent": 296, "children": [307, 308], "start_point": {"row": 142, "column": 52}, "end_point": {"row": 142, "column": 71}}, {"id": 307, "type": "identifier", "text": "xTaskGetTickCount", "parent": 306, "children": [], "start_point": {"row": 142, "column": 52}, "end_point": {"row": 142, "column": 69}}, {"id": 308, "type": "argument_list", "text": "()", "parent": 306, "children": [], "start_point": {"row": 142, "column": 69}, "end_point": {"row": 142, "column": 71}}, {"id": 309, "type": "else_clause", "text": "else\n {\n }", "parent": 275, "children": [], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 146, "column": 5}}, {"id": 310, "type": "function_definition", "text": "void countdown_sec(Timer* timer, unsigned int time_s)\n{\n countdown_ms(timer, time_s * 1000);\n}", "parent": null, "children": [311, 312], "start_point": {"row": 158, "column": 0}, "end_point": {"row": 161, "column": 1}}, {"id": 311, "type": "primitive_type", "text": "void", "parent": 310, "children": [], "start_point": {"row": 158, "column": 0}, "end_point": {"row": 158, "column": 4}}, {"id": 312, "type": "function_declarator", "text": "countdown_sec(Timer* timer, unsigned int time_s)", "parent": 310, "children": [313, 314], "start_point": {"row": 158, "column": 5}, "end_point": {"row": 158, "column": 53}}, {"id": 313, "type": "identifier", "text": "countdown_sec", "parent": 312, "children": [], "start_point": {"row": 158, "column": 5}, "end_point": {"row": 158, "column": 18}}, {"id": 314, "type": "parameter_list", "text": "(Timer* timer, unsigned int time_s)", "parent": 312, "children": [315, 320], "start_point": {"row": 158, "column": 18}, "end_point": {"row": 158, "column": 53}}, {"id": 315, "type": "parameter_declaration", "text": "Timer* timer", "parent": 314, "children": [316, 317], "start_point": {"row": 158, "column": 19}, "end_point": {"row": 158, "column": 31}}, {"id": 316, "type": "type_identifier", "text": "Timer", "parent": 315, "children": [], "start_point": {"row": 158, "column": 19}, "end_point": {"row": 158, "column": 24}}, {"id": 317, "type": "pointer_declarator", "text": "* timer", "parent": 315, "children": [318, 319], "start_point": {"row": 158, "column": 24}, "end_point": {"row": 158, "column": 31}}, {"id": 318, "type": "*", "text": "*", "parent": 317, "children": [], "start_point": {"row": 158, "column": 24}, "end_point": {"row": 158, "column": 25}}, {"id": 319, "type": "identifier", "text": "timer", "parent": 317, "children": [], "start_point": {"row": 158, "column": 26}, "end_point": {"row": 158, "column": 31}}, {"id": 320, "type": "parameter_declaration", "text": "unsigned int time_s", "parent": 314, "children": [321, 324], "start_point": {"row": 158, "column": 33}, "end_point": {"row": 158, "column": 52}}, {"id": 321, "type": "sized_type_specifier", "text": "unsigned int", "parent": 320, "children": [322, 323], "start_point": {"row": 158, "column": 33}, "end_point": {"row": 158, "column": 45}}, {"id": 322, "type": "unsigned", "text": "unsigned", "parent": 321, "children": [], "start_point": {"row": 158, "column": 33}, "end_point": {"row": 158, "column": 41}}, {"id": 323, "type": "primitive_type", "text": "int", "parent": 321, "children": [], "start_point": {"row": 158, "column": 42}, "end_point": {"row": 158, "column": 45}}, {"id": 324, "type": "identifier", "text": "time_s", "parent": 320, "children": [], "start_point": {"row": 158, "column": 46}, "end_point": {"row": 158, "column": 52}}, {"id": 325, "type": "call_expression", "text": "countdown_ms(timer, time_s * 1000)", "parent": 310, "children": [326, 327], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 38}}, {"id": 326, "type": "identifier", "text": "countdown_ms", "parent": 325, "children": [], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 16}}, {"id": 327, "type": "argument_list", "text": "(timer, time_s * 1000)", "parent": 325, "children": [328, 329], "start_point": {"row": 160, "column": 16}, "end_point": {"row": 160, "column": 38}}, {"id": 328, "type": "identifier", "text": "timer", "parent": 327, "children": [], "start_point": {"row": 160, "column": 17}, "end_point": {"row": 160, "column": 22}}, {"id": 329, "type": "binary_expression", "text": "time_s * 1000", "parent": 327, "children": [330, 331, 332], "start_point": {"row": 160, "column": 24}, "end_point": {"row": 160, "column": 37}}, {"id": 330, "type": "identifier", "text": "time_s", "parent": 329, "children": [], "start_point": {"row": 160, "column": 24}, "end_point": {"row": 160, "column": 30}}, {"id": 331, "type": "*", "text": "*", "parent": 329, "children": [], "start_point": {"row": 160, "column": 31}, "end_point": {"row": 160, "column": 32}}, {"id": 332, "type": "number_literal", "text": "1000", "parent": 329, "children": [], "start_point": {"row": 160, "column": 33}, "end_point": {"row": 160, "column": 37}}, {"id": 333, "type": "function_definition", "text": "uint32_t left_ms(Timer* timer)\n{\n unsigned int time_s = 0; \n if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer ) != pdFALSE )\n {\n //Active\n time_s = xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer);\n time_s = time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire);\n }\n else\n {\n //Not active\n time_s = 0;\n }\n \n return time_s;\n}", "parent": null, "children": [334, 335], "start_point": {"row": 171, "column": 0}, "end_point": {"row": 187, "column": 1}}, {"id": 334, "type": "primitive_type", "text": "uint32_t", "parent": 333, "children": [], "start_point": {"row": 171, "column": 0}, "end_point": {"row": 171, "column": 8}}, {"id": 335, "type": "function_declarator", "text": "left_ms(Timer* timer)", "parent": 333, "children": [336, 337], "start_point": {"row": 171, "column": 9}, "end_point": {"row": 171, "column": 30}}, {"id": 336, "type": "identifier", "text": "left_ms", "parent": 335, "children": [], "start_point": {"row": 171, "column": 9}, "end_point": {"row": 171, "column": 16}}, {"id": 337, "type": "parameter_list", "text": "(Timer* timer)", "parent": 335, "children": [338], "start_point": {"row": 171, "column": 16}, "end_point": {"row": 171, "column": 30}}, {"id": 338, "type": "parameter_declaration", "text": "Timer* timer", "parent": 337, "children": [339, 340], "start_point": {"row": 171, "column": 17}, "end_point": {"row": 171, "column": 29}}, {"id": 339, "type": "type_identifier", "text": "Timer", "parent": 338, "children": [], "start_point": {"row": 171, "column": 17}, "end_point": {"row": 171, "column": 22}}, {"id": 340, "type": "pointer_declarator", "text": "* timer", "parent": 338, "children": [341, 342], "start_point": {"row": 171, "column": 22}, "end_point": {"row": 171, "column": 29}}, {"id": 341, "type": "*", "text": "*", "parent": 340, "children": [], "start_point": {"row": 171, "column": 22}, "end_point": {"row": 171, "column": 23}}, {"id": 342, "type": "identifier", "text": "timer", "parent": 340, "children": [], "start_point": {"row": 171, "column": 24}, "end_point": {"row": 171, "column": 29}}, {"id": 343, "type": "declaration", "text": "unsigned int time_s = 0;", "parent": 333, "children": [344, 347], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 28}}, {"id": 344, "type": "sized_type_specifier", "text": "unsigned int", "parent": 343, "children": [345, 346], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 16}}, {"id": 345, "type": "unsigned", "text": "unsigned", "parent": 344, "children": [], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 12}}, {"id": 346, "type": "primitive_type", "text": "int", "parent": 344, "children": [], "start_point": {"row": 173, "column": 13}, "end_point": {"row": 173, "column": 16}}, {"id": 347, "type": "init_declarator", "text": "time_s = 0", "parent": 343, "children": [348, 349, 350], "start_point": {"row": 173, "column": 17}, "end_point": {"row": 173, "column": 27}}, {"id": 348, "type": "identifier", "text": "time_s", "parent": 347, "children": [], "start_point": {"row": 173, "column": 17}, "end_point": {"row": 173, "column": 23}}, {"id": 349, "type": "=", "text": "=", "parent": 347, "children": [], "start_point": {"row": 173, "column": 24}, "end_point": {"row": 173, "column": 25}}, {"id": 350, "type": "number_literal", "text": "0", "parent": 347, "children": [], "start_point": {"row": 173, "column": 26}, "end_point": {"row": 173, "column": 27}}, {"id": 351, "type": "if_statement", "text": "if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer ) != pdFALSE )\n {\n //Active\n time_s = xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer);\n time_s = time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire);\n }\n else\n {\n //Not active\n time_s = 0;\n }", "parent": 333, "children": [352, 403], "start_point": {"row": 174, "column": 4}, "end_point": {"row": 184, "column": 5}}, {"id": 352, "type": "parenthesized_expression", "text": "( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer ) != pdFALSE )", "parent": 351, "children": [353], "start_point": {"row": 174, "column": 6}, "end_point": {"row": 174, "column": 78}}, {"id": 353, "type": "binary_expression", "text": "xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer ) != pdFALSE", "parent": 352, "children": [354, 365, 366], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 76}}, {"id": 354, "type": "call_expression", "text": "xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer )", "parent": 353, "children": [355, 356], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 65}}, {"id": 355, "type": "identifier", "text": "xTimerIsTimerActive", "parent": 354, "children": [], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 174, "column": 27}}, {"id": 356, "type": "argument_list", "text": "(((pst_TimerHandle_t)*timer)->xTimer )", "parent": 354, "children": [357], "start_point": {"row": 174, "column": 27}, "end_point": {"row": 174, "column": 65}}, {"id": 357, "type": "field_expression", "text": "((pst_TimerHandle_t)*timer)->xTimer", "parent": 356, "children": [358, 364], "start_point": {"row": 174, "column": 28}, "end_point": {"row": 174, "column": 63}}, {"id": 358, "type": "parenthesized_expression", "text": "((pst_TimerHandle_t)*timer)", "parent": 357, "children": [359], "start_point": {"row": 174, "column": 28}, "end_point": {"row": 174, "column": 55}}, {"id": 359, "type": "binary_expression", "text": "(pst_TimerHandle_t)*timer", "parent": 358, "children": [360, 362, 363], "start_point": {"row": 174, "column": 29}, "end_point": {"row": 174, "column": 54}}, {"id": 360, "type": "parenthesized_expression", "text": "(pst_TimerHandle_t)", "parent": 359, "children": [361], "start_point": {"row": 174, "column": 29}, "end_point": {"row": 174, "column": 48}}, {"id": 361, "type": "identifier", "text": "pst_TimerHandle_t", "parent": 360, "children": [], "start_point": {"row": 174, "column": 30}, "end_point": {"row": 174, "column": 47}}, {"id": 362, "type": "*", "text": "*", "parent": 359, "children": [], "start_point": {"row": 174, "column": 48}, "end_point": {"row": 174, "column": 49}}, {"id": 363, "type": "identifier", "text": "timer", "parent": 359, "children": [], "start_point": {"row": 174, "column": 49}, "end_point": {"row": 174, "column": 54}}, {"id": 364, "type": "field_identifier", "text": "xTimer", "parent": 357, "children": [], "start_point": {"row": 174, "column": 57}, "end_point": {"row": 174, "column": 63}}, {"id": 365, "type": "!=", "text": "!=", "parent": 353, "children": [], "start_point": {"row": 174, "column": 66}, "end_point": {"row": 174, "column": 68}}, {"id": 366, "type": "identifier", "text": "pdFALSE", "parent": 353, "children": [], "start_point": {"row": 174, "column": 69}, "end_point": {"row": 174, "column": 76}}, {"id": 367, "type": "assignment_expression", "text": "time_s = xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer)", "parent": 351, "children": [368, 369, 370], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 66}}, {"id": 368, "type": "identifier", "text": "time_s", "parent": 367, "children": [], "start_point": {"row": 177, "column": 8}, "end_point": {"row": 177, "column": 14}}, {"id": 369, "type": "=", "text": "=", "parent": 367, "children": [], "start_point": {"row": 177, "column": 15}, "end_point": {"row": 177, "column": 16}}, {"id": 370, "type": "call_expression", "text": "xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer)", "parent": 367, "children": [371, 372], "start_point": {"row": 177, "column": 17}, "end_point": {"row": 177, "column": 66}}, {"id": 371, "type": "identifier", "text": "xTimerLeftMs", "parent": 370, "children": [], "start_point": {"row": 177, "column": 17}, "end_point": {"row": 177, "column": 29}}, {"id": 372, "type": "argument_list", "text": "(((pst_TimerHandle_t)*timer)->xTimer)", "parent": 370, "children": [373], "start_point": {"row": 177, "column": 29}, "end_point": {"row": 177, "column": 66}}, {"id": 373, "type": "field_expression", "text": "((pst_TimerHandle_t)*timer)->xTimer", "parent": 372, "children": [374, 380], "start_point": {"row": 177, "column": 30}, "end_point": {"row": 177, "column": 65}}, {"id": 374, "type": "parenthesized_expression", "text": "((pst_TimerHandle_t)*timer)", "parent": 373, "children": [375], "start_point": {"row": 177, "column": 30}, "end_point": {"row": 177, "column": 57}}, {"id": 375, "type": "binary_expression", "text": "(pst_TimerHandle_t)*timer", "parent": 374, "children": [376, 378, 379], "start_point": {"row": 177, "column": 31}, "end_point": {"row": 177, "column": 56}}, {"id": 376, "type": "parenthesized_expression", "text": "(pst_TimerHandle_t)", "parent": 375, "children": [377], "start_point": {"row": 177, "column": 31}, "end_point": {"row": 177, "column": 50}}, {"id": 377, "type": "identifier", "text": "pst_TimerHandle_t", "parent": 376, "children": [], "start_point": {"row": 177, "column": 32}, "end_point": {"row": 177, "column": 49}}, {"id": 378, "type": "*", "text": "*", "parent": 375, "children": [], "start_point": {"row": 177, "column": 50}, "end_point": {"row": 177, "column": 51}}, {"id": 379, "type": "identifier", "text": "timer", "parent": 375, "children": [], "start_point": {"row": 177, "column": 51}, "end_point": {"row": 177, "column": 56}}, {"id": 380, "type": "field_identifier", "text": "xTimer", "parent": 373, "children": [], "start_point": {"row": 177, "column": 59}, "end_point": {"row": 177, "column": 65}}, {"id": 381, "type": "assignment_expression", "text": "time_s = time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire)", "parent": 351, "children": [382, 383, 384], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 93}}, {"id": 382, "type": "identifier", "text": "time_s", "parent": 381, "children": [], "start_point": {"row": 178, "column": 8}, "end_point": {"row": 178, "column": 14}}, {"id": 383, "type": "=", "text": "=", "parent": 381, "children": [], "start_point": {"row": 178, "column": 15}, "end_point": {"row": 178, "column": 16}}, {"id": 384, "type": "binary_expression", "text": "time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire)", "parent": 381, "children": [385, 386, 387], "start_point": {"row": 178, "column": 17}, "end_point": {"row": 178, "column": 93}}, {"id": 385, "type": "identifier", "text": "time_s", "parent": 384, "children": [], "start_point": {"row": 178, "column": 17}, "end_point": {"row": 178, "column": 23}}, {"id": 386, "type": "-", "text": "-", "parent": 384, "children": [], "start_point": {"row": 178, "column": 24}, "end_point": {"row": 178, "column": 25}}, {"id": 387, "type": "parenthesized_expression", "text": "((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire)", "parent": 384, "children": [388], "start_point": {"row": 178, "column": 26}, "end_point": {"row": 178, "column": 93}}, {"id": 388, "type": "cast_expression", "text": "(xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire", "parent": 387, "children": [389, 393], "start_point": {"row": 178, "column": 27}, "end_point": {"row": 178, "column": 92}}, {"id": 389, "type": "type_descriptor", "text": "xTaskGetTickCount()", "parent": 388, "children": [390, 391], "start_point": {"row": 178, "column": 28}, "end_point": {"row": 178, "column": 47}}, {"id": 390, "type": "type_identifier", "text": "xTaskGetTickCount", "parent": 389, "children": [], "start_point": {"row": 178, "column": 28}, "end_point": {"row": 178, "column": 45}}, {"id": 391, "type": "abstract_function_declarator", "text": "()", "parent": 389, "children": [392], "start_point": {"row": 178, "column": 45}, "end_point": {"row": 178, "column": 47}}, {"id": 392, "type": "parameter_list", "text": "()", "parent": 391, "children": [], "start_point": {"row": 178, "column": 45}, "end_point": {"row": 178, "column": 47}}, {"id": 393, "type": "unary_expression", "text": "- ((pst_TimerHandle_t)*timer)->TimeToExpire", "parent": 388, "children": [394, 395], "start_point": {"row": 178, "column": 49}, "end_point": {"row": 178, "column": 92}}, {"id": 394, "type": "-", "text": "-", "parent": 393, "children": [], "start_point": {"row": 178, "column": 49}, "end_point": {"row": 178, "column": 50}}, {"id": 395, "type": "field_expression", "text": "((pst_TimerHandle_t)*timer)->TimeToExpire", "parent": 393, "children": [396, 402], "start_point": {"row": 178, "column": 51}, "end_point": {"row": 178, "column": 92}}, {"id": 396, "type": "parenthesized_expression", "text": "((pst_TimerHandle_t)*timer)", "parent": 395, "children": [397], "start_point": {"row": 178, "column": 51}, "end_point": {"row": 178, "column": 78}}, {"id": 397, "type": "binary_expression", "text": "(pst_TimerHandle_t)*timer", "parent": 396, "children": [398, 400, 401], "start_point": {"row": 178, "column": 52}, "end_point": {"row": 178, "column": 77}}, {"id": 398, "type": "parenthesized_expression", "text": "(pst_TimerHandle_t)", "parent": 397, "children": [399], "start_point": {"row": 178, "column": 52}, "end_point": {"row": 178, "column": 71}}, {"id": 399, "type": "identifier", "text": "pst_TimerHandle_t", "parent": 398, "children": [], "start_point": {"row": 178, "column": 53}, "end_point": {"row": 178, "column": 70}}, {"id": 400, "type": "*", "text": "*", "parent": 397, "children": [], "start_point": {"row": 178, "column": 71}, "end_point": {"row": 178, "column": 72}}, {"id": 401, "type": "identifier", "text": "timer", "parent": 397, "children": [], "start_point": {"row": 178, "column": 72}, "end_point": {"row": 178, "column": 77}}, {"id": 402, "type": "field_identifier", "text": "TimeToExpire", "parent": 395, "children": [], "start_point": {"row": 178, "column": 80}, "end_point": {"row": 178, "column": 92}}, {"id": 403, "type": "else_clause", "text": "else\n {\n //Not active\n time_s = 0;\n }", "parent": 351, "children": [], "start_point": {"row": 180, "column": 4}, "end_point": {"row": 184, "column": 5}}, {"id": 404, "type": "assignment_expression", "text": "time_s = 0", "parent": 403, "children": [405, 406, 407], "start_point": {"row": 183, "column": 8}, "end_point": {"row": 183, "column": 18}}, {"id": 405, "type": "identifier", "text": "time_s", "parent": 404, "children": [], "start_point": {"row": 183, "column": 8}, "end_point": {"row": 183, "column": 14}}, {"id": 406, "type": "=", "text": "=", "parent": 404, "children": [], "start_point": {"row": 183, "column": 15}, "end_point": {"row": 183, "column": 16}}, {"id": 407, "type": "number_literal", "text": "0", "parent": 404, "children": [], "start_point": {"row": 183, "column": 17}, "end_point": {"row": 183, "column": 18}}, {"id": 408, "type": "return_statement", "text": "return time_s;", "parent": 333, "children": [409], "start_point": {"row": 186, "column": 4}, "end_point": {"row": 186, "column": 18}}, {"id": 409, "type": "identifier", "text": "time_s", "parent": 408, "children": [], "start_point": {"row": 186, "column": 11}, "end_point": {"row": 186, "column": 17}}, {"id": 410, "type": "function_definition", "text": "void fsleep(int parm) \n{\n \n#if INCLUDE_vTaskDelay\n TickType_t ticks = parm / portTICK_PERIOD_MS;\n\n vTaskDelay(ticks ? ticks : 1); /* Minimum delay = 1 tick */\n\n#else\n (void) parm;\n\n#endif\n \n}", "parent": null, "children": [411, 412], "start_point": {"row": 195, "column": 0}, "end_point": {"row": 208, "column": 1}}, {"id": 411, "type": "primitive_type", "text": "void", "parent": 410, "children": [], "start_point": {"row": 195, "column": 0}, "end_point": {"row": 195, "column": 4}}, {"id": 412, "type": "function_declarator", "text": "fsleep(int parm)", "parent": 410, "children": [413, 414], "start_point": {"row": 195, "column": 5}, "end_point": {"row": 195, "column": 21}}, {"id": 413, "type": "identifier", "text": "fsleep", "parent": 412, "children": [], "start_point": {"row": 195, "column": 5}, "end_point": {"row": 195, "column": 11}}, {"id": 414, "type": "parameter_list", "text": "(int parm)", "parent": 412, "children": [415], "start_point": {"row": 195, "column": 11}, "end_point": {"row": 195, "column": 21}}, {"id": 415, "type": "parameter_declaration", "text": "int parm", "parent": 414, "children": [416, 417], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 195, "column": 20}}, {"id": 416, "type": "primitive_type", "text": "int", "parent": 415, "children": [], "start_point": {"row": 195, "column": 12}, "end_point": {"row": 195, "column": 15}}, {"id": 417, "type": "identifier", "text": "parm", "parent": 415, "children": [], "start_point": {"row": 195, "column": 16}, "end_point": {"row": 195, "column": 20}}, {"id": 418, "type": "preproc_if", "text": "#if INCLUDE_vTaskDelay\n TickType_t ticks = parm / portTICK_PERIOD_MS;\n\n vTaskDelay(ticks ? ticks : 1); /* Minimum delay = 1 tick */\n\n#else\n (void) parm;\n\n#endif", "parent": 410, "children": [419, 420, 421, 422, 439, 445], "start_point": {"row": 198, "column": 0}, "end_point": {"row": 206, "column": 6}}, {"id": 419, "type": "#if", "text": "#if", "parent": 418, "children": [], "start_point": {"row": 198, "column": 0}, "end_point": {"row": 198, "column": 3}}, {"id": 420, "type": "identifier", "text": "INCLUDE_vTaskDelay", "parent": 418, "children": [], "start_point": {"row": 198, "column": 4}, "end_point": {"row": 198, "column": 22}}, {"id": 421, "type": "\n", "text": "\n", "parent": 418, "children": [], "start_point": {"row": 198, "column": 22}, "end_point": {"row": 199, "column": 0}}, {"id": 422, "type": "declaration", "text": "TickType_t ticks = parm / portTICK_PERIOD_MS;", "parent": 418, "children": [423, 424], "start_point": {"row": 199, "column": 4}, "end_point": {"row": 199, "column": 49}}, {"id": 423, "type": "type_identifier", "text": "TickType_t", "parent": 422, "children": [], "start_point": {"row": 199, "column": 4}, "end_point": {"row": 199, "column": 14}}, {"id": 424, "type": "init_declarator", "text": "ticks = parm / portTICK_PERIOD_MS", "parent": 422, "children": [425, 426, 427], "start_point": {"row": 199, "column": 15}, "end_point": {"row": 199, "column": 48}}, {"id": 425, "type": "identifier", "text": "ticks", "parent": 424, "children": [], "start_point": {"row": 199, "column": 15}, "end_point": {"row": 199, "column": 20}}, {"id": 426, "type": "=", "text": "=", "parent": 424, "children": [], "start_point": {"row": 199, "column": 21}, "end_point": {"row": 199, "column": 22}}, {"id": 427, "type": "binary_expression", "text": "parm / portTICK_PERIOD_MS", "parent": 424, "children": [428, 429, 430], "start_point": {"row": 199, "column": 23}, "end_point": {"row": 199, "column": 48}}, {"id": 428, "type": "identifier", "text": "parm", "parent": 427, "children": [], "start_point": {"row": 199, "column": 23}, "end_point": {"row": 199, "column": 27}}, {"id": 429, "type": "/", "text": "/", "parent": 427, "children": [], "start_point": {"row": 199, "column": 28}, "end_point": {"row": 199, "column": 29}}, {"id": 430, "type": "identifier", "text": "portTICK_PERIOD_MS", "parent": 427, "children": [], "start_point": {"row": 199, "column": 30}, "end_point": {"row": 199, "column": 48}}, {"id": 431, "type": "call_expression", "text": "vTaskDelay(ticks ? ticks : 1)", "parent": 418, "children": [432, 433], "start_point": {"row": 201, "column": 4}, "end_point": {"row": 201, "column": 33}}, {"id": 432, "type": "identifier", "text": "vTaskDelay", "parent": 431, "children": [], "start_point": {"row": 201, "column": 4}, "end_point": {"row": 201, "column": 14}}, {"id": 433, "type": "argument_list", "text": "(ticks ? ticks : 1)", "parent": 431, "children": [434], "start_point": {"row": 201, "column": 14}, "end_point": {"row": 201, "column": 33}}, {"id": 434, "type": "conditional_expression", "text": "ticks ? ticks : 1", "parent": 433, "children": [435, 436, 437, 438], "start_point": {"row": 201, "column": 15}, "end_point": {"row": 201, "column": 32}}, {"id": 435, "type": "identifier", "text": "ticks", "parent": 434, "children": [], "start_point": {"row": 201, "column": 15}, "end_point": {"row": 201, "column": 20}}, {"id": 436, "type": "?", "text": "?", "parent": 434, "children": [], "start_point": {"row": 201, "column": 21}, "end_point": {"row": 201, "column": 22}}, {"id": 437, "type": "identifier", "text": "ticks", "parent": 434, "children": [], "start_point": {"row": 201, "column": 23}, "end_point": {"row": 201, "column": 28}}, {"id": 438, "type": "number_literal", "text": "1", "parent": 434, "children": [], "start_point": {"row": 201, "column": 31}, "end_point": {"row": 201, "column": 32}}, {"id": 439, "type": "preproc_else", "text": "#else\n (void) parm;", "parent": 418, "children": [440], "start_point": {"row": 203, "column": 0}, "end_point": {"row": 204, "column": 16}}, {"id": 440, "type": "#else", "text": "#else", "parent": 439, "children": [], "start_point": {"row": 203, "column": 0}, "end_point": {"row": 203, "column": 5}}, {"id": 441, "type": "cast_expression", "text": "(void) parm", "parent": 439, "children": [442, 444], "start_point": {"row": 204, "column": 4}, "end_point": {"row": 204, "column": 15}}, {"id": 442, "type": "type_descriptor", "text": "void", "parent": 441, "children": [443], "start_point": {"row": 204, "column": 5}, "end_point": {"row": 204, "column": 9}}, {"id": 443, "type": "primitive_type", "text": "void", "parent": 442, "children": [], "start_point": {"row": 204, "column": 5}, "end_point": {"row": 204, "column": 9}}, {"id": 444, "type": "identifier", "text": "parm", "parent": 441, "children": [], "start_point": {"row": 204, "column": 11}, "end_point": {"row": 204, "column": 15}}, {"id": 445, "type": "#endif", "text": "#endif", "parent": 418, "children": [], "start_point": {"row": 206, "column": 0}, "end_point": {"row": 206, "column": 6}}]}, "node_categories": {"declarations": {"functions": [42, 44, 50, 52, 107, 109, 169, 171, 216, 218, 260, 262, 310, 312, 333, 335, 391, 410, 412], "variables": [13, 18, 21, 24, 31, 36, 47, 55, 57, 112, 117, 174, 221, 265, 270, 315, 320, 338, 343, 415, 422], "classes": [15, 16], "imports": [0, 1, 3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [65, 69, 73, 74, 79, 85, 93, 94, 95, 96, 123, 131, 135, 139, 140, 142, 143, 148, 149, 156, 160, 161, 179, 182, 185, 186, 187, 188, 195, 196, 197, 198, 206, 207, 208, 209, 227, 228, 229, 232, 233, 234, 235, 246, 247, 248, 249, 257, 276, 277, 278, 281, 282, 283, 284, 289, 297, 298, 299, 300, 306, 325, 329, 352, 353, 354, 357, 358, 359, 360, 370, 373, 374, 375, 376, 384, 387, 388, 393, 395, 396, 397, 398, 427, 431, 441], "assignments": [61, 72, 127, 147, 155, 194, 205, 245, 296, 367, 381, 404], "loops": [60, 126], "conditionals": [11, 17, 19, 20, 23, 26, 27, 30, 32, 34, 35, 39, 45, 48, 49, 53, 59, 62, 66, 68, 70, 75, 76, 77, 80, 84, 90, 91, 92, 97, 98, 99, 110, 113, 116, 120, 124, 128, 132, 134, 136, 138, 144, 145, 146, 150, 151, 152, 158, 162, 163, 166, 168, 172, 175, 178, 180, 183, 189, 191, 192, 199, 201, 202, 210, 212, 213, 219, 222, 225, 226, 230, 236, 238, 239, 241, 243, 250, 252, 253, 259, 263, 266, 269, 271, 274, 275, 279, 285, 287, 288, 290, 292, 295, 301, 303, 304, 307, 313, 316, 319, 321, 324, 326, 328, 330, 336, 339, 342, 344, 348, 351, 355, 361, 363, 364, 366, 368, 371, 377, 379, 380, 382, 385, 390, 399, 401, 402, 405, 409, 413, 417, 418, 419, 420, 423, 425, 428, 430, 432, 434, 435, 437, 444, 445], "returns": [103, 105, 242, 256, 408], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 41, 64, 82, 83, 104, 106, 122, 130, 154, 193, 204, 215, 255, 293, 332, 350, 407, 438], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 42, "universal_type": "function", "name": "vTimerCallback", "text_snippet": "void vTimerCallback( TimerHandle_t pxTimer )\n{\n}"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "vTimerCallback( TimerHandle_t pxTimer )"}, {"node_id": 50, "universal_type": "function", "name": "create_global_timers", "text_snippet": "int create_global_timers( void )\n{\n uint32_t x;\n\n /* Create some timers. Don't start them. St"}, {"node_id": 52, "universal_type": "function", "name": ")", "text_snippet": "create_global_timers( void )"}, {"node_id": 107, "universal_type": "function", "name": "init_timer", "text_snippet": "void init_timer(Timer* timer)\n{\n uint32_t i = 0;\n AllocatedTimerIndex++;\n\n \n for(i=0; i "}, {"node_id": 109, "universal_type": "function", "name": "unknown", "text_snippet": "init_timer(Timer* timer)"}, {"node_id": 169, "universal_type": "function", "name": "DeInitTimer", "text_snippet": "void DeInitTimer(Timer* timer)\n{\n\n AllocatedTimerIndex--;\n xTimerStop( ((pst_TimerHandle_t)*ti"}, {"node_id": 171, "universal_type": "function", "name": "unknown", "text_snippet": "DeInitTimer(Timer* timer)"}, {"node_id": 216, "universal_type": "function", "name": "has_timer_expired", "text_snippet": "bool has_timer_expired(Timer* timer)\n{\n\n if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTi"}, {"node_id": 218, "universal_type": "function", "name": "unknown", "text_snippet": "has_timer_expired(Timer* timer)"}, {"node_id": 260, "universal_type": "function", "name": "countdown_ms", "text_snippet": "void countdown_ms(Timer* timer, unsigned int time_ms)\n{\n\n if( xTimerChangePeriod( ((pst_TimerHand"}, {"node_id": 262, "universal_type": "function", "name": "time_ms)", "text_snippet": "countdown_ms(Timer* timer, unsigned int time_ms)"}, {"node_id": 310, "universal_type": "function", "name": "countdown_sec", "text_snippet": "void countdown_sec(Timer* timer, unsigned int time_s)\n{\n countdown_ms(timer, time_s * 1000);\n}"}, {"node_id": 312, "universal_type": "function", "name": "time_s)", "text_snippet": "countdown_sec(Timer* timer, unsigned int time_s)"}, {"node_id": 333, "universal_type": "function", "name": "time_s", "text_snippet": "uint32_t left_ms(Timer* timer)\n{\n unsigned int time_s = 0; \n if( xTimerIsTimerActive(((pst_Tim"}, {"node_id": 335, "universal_type": "function", "name": "unknown", "text_snippet": "left_ms(Timer* timer)"}, {"node_id": 391, "universal_type": "function", "name": "unknown", "text_snippet": "()"}, {"node_id": 410, "universal_type": "function", "name": "fsleep", "text_snippet": "void fsleep(int parm) \n{\n \n#if INCLUDE_vTaskDelay\n TickType_t ticks = parm / portTICK_PERIOD_M"}, {"node_id": 412, "universal_type": "function", "name": "unknown", "text_snippet": "fsleep(int parm)"}], "class_declarations": [{"node_id": 15, "universal_type": "class", "name": "st_TimerHandle{", "text_snippet": "struct st_TimerHandle{\n \n TimerHandle_t xTimer;\n uint32_t TimeToExpire;\n uint32_t Alloca"}, {"node_id": 16, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include \"timer_interface.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"cmsis_os.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <stdio.h>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#include \"timer_interface.h\"\n#include \"cmsis_os.h\"\n#include <stdio.h>\n\n\n//Create Global Timers\n\n#define MAX_NUM_TIMERS 10\n\ntypedef struct st_TimerHandle{\n \n TimerHandle_t xTimer;\n uint32_t TimeToExpire;\n uint32_t Allocated;\n \n}st_TimerHandle_t, *pst_TimerHandle_t;\n\n/* An array to hold handles to the created timers. */\nst_TimerHandle_t stTimers[MAX_NUM_TIMERS]; \nstatic int32_t AllocatedTimerIndex = -1;\n\nvoid vTimerCallback( TimerHandle_t pxTimer )\n{\n}\n\n\n\n/* ... Create before creating tasks ... */\nint create_global_timers( void )\n{\n uint32_t x;\n\n /* Create some timers. Don't start them. Starting the timers before the RTOS\n scheduler has been started means the timers will start running\n immediately that the RTOS scheduler starts. Starting will be done inside code */\n\n for( x = 0; x < MAX_NUM_TIMERS; x++ )\n {\n stTimers[x].xTimer = xTimerCreate\n ( /* Just a text name, not used by the RTOS kernel. */\n \"Timer\",\n /* The timer period in ticks, must be greater than 0 */\n 2000,\n /* The timers will auto-reload themselves when they expire. */\n pdFALSE,\n /* Assign each timer a unique id equal to its array index. */\n ( void * ) x,\n /* Each timer calls the same callback when it expires. */\n vTimerCallback\n );\n\n if( stTimers[x].xTimer == NULL )\n {\n /* The timer was not created. */\n return 1; //Failure\n }\n }\n return 0; //Success\n}\n\n\n/**\n * @brief Initialize a timer\n *\n * Performs any initialization required to the timer passed in.\n *\n * @param Timer - pointer to the timer to be initialized\n */\n\n\nvoid init_timer(Timer* timer)\n{\n uint32_t i = 0;\n AllocatedTimerIndex++;\n\n \n for(i=0; i < MAX_NUM_TIMERS; i++)\n {\n if(!stTimers[i].Allocated)\n {\n stTimers[i].Allocated = 1;\n *timer = &stTimers[i];\n goto exit;\n }\n }\n\nexit:\t\n ;\n}\n\nvoid DeInitTimer(Timer* timer)\n{\n\n AllocatedTimerIndex--;\n xTimerStop( ((pst_TimerHandle_t)*timer)->xTimer, 0 );\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n ((pst_TimerHandle_t)*timer)->Allocated = 0;\n}\n\n\n\n\n\n\n\n\n/**\n* @brief Check if a timer is expired\n*\n* Call this function passing in a timer to check if that timer has expired.\n*\n* @param Timer - pointer to the timer to be checked for expiration\n* @return bool - true = timer expired, false = timer not expired\n*/\nbool has_timer_expired(Timer* timer)\n{\n\n if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer) != pdFALSE )// active means not expired\n {\n return pdFALSE; //0 = timer not expired\n }\n else\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = 0;\n\n return !pdFALSE;//1 = timer expired\n }\n}\n\n/**\n* @brief Create a timer (milliseconds)\n*\n* Sets the timer to expire in a specified number of milliseconds.\n*\n* @param Timer - pointer to the timer to be set to expire in milliseconds\n* @param unsigned int - set the timer to expire in this number of milliseconds\n*/\nvoid countdown_ms(Timer* timer, unsigned int time_ms)\n{\n\n if( xTimerChangePeriod( ((pst_TimerHandle_t)*timer)->xTimer, time_ms / portTICK_PERIOD_MS, 0 ) == pdPASS )\n {\n ((pst_TimerHandle_t)*timer)->TimeToExpire = xTaskGetTickCount();;\n }\n else\n {\n }\n \n}\n\n/**\n* @brief Create a timer (seconds)\n*\n* Sets the timer to expire in a specified number of seconds.\n*\n* @param Timer - pointer to the timer to be set to expire in seconds\n* @param unsigned int - set the timer to expire in this number of seconds\n*/\nvoid countdown_sec(Timer* timer, unsigned int time_s)\n{\n countdown_ms(timer, time_s * 1000);\n}\n\n/**\n* @brief Check the time remaining on a give timer\n*\n* Checks the input timer and returns the number of milliseconds remaining on the timer.\n*\n* @param Timer - pointer to the timer to be set to checked\n* @return int - milliseconds left on the countdown timer\n*/\nuint32_t left_ms(Timer* timer)\n{\n unsigned int time_s = 0; \n if( xTimerIsTimerActive(((pst_TimerHandle_t)*timer)->xTimer ) != pdFALSE )\n {\n //Active\n time_s = xTimerLeftMs(((pst_TimerHandle_t)*timer)->xTimer);\n time_s = time_s - ((xTaskGetTickCount()) - ((pst_TimerHandle_t)*timer)->TimeToExpire);\n }\n else\n {\n //Not active\n time_s = 0;\n }\n \n return time_s;\n}\n\n/**\n* @brief Wait for Timeout (Time Delay)\n* @param millisec time delay value\n* @retval status code that indicates the execution status of the function.\n*/\n\nvoid fsleep(int parm) \n{\n \n#if INCLUDE_vTaskDelay\n TickType_t ticks = parm / portTICK_PERIOD_MS;\n\n vTaskDelay(ticks ? ticks : 1); /* Minimum delay = 1 tick */\n\n#else\n (void) parm;\n\n#endif\n \n}\n"}
39
c
#pragma once #include "Animal.h" class Cat : public Animal { public: Cat(std::string name) : Animal(name) {} Animal* Clone() override { return new Cat(*this); } void Draw() override { std::cout << "I'm a cat!" << " My Name is " << _name << "\n"; } };
17.69
16
(translation_unit) "#pragma once\n#include "Animal.h"\nclass Cat :\n public Animal\n{\npublic:\n Cat(std::string name) : Animal(name) {}\n\n Animal* Clone() override\n {\n return new Cat(*this);\n }\n\n void Draw() override\n {\n std::cout << "I'm a cat!" << " My Name is " << _name << "\n";\n }\n};\n\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "Animal.h"\n" (#include) "#include" (string_literal) ""Animal.h"" (") """ (string_content) "Animal.h" (") """ (function_definition) "class Cat :\n public Animal\n{\npublic:\n Cat(std::string name) : Animal(name) {}\n\n Animal* Clone() override\n {\n return new Cat(*this);\n }\n\n void Draw() override\n {\n std::cout << "I'm a cat!" << " My Name is " << _name << "\n";\n }\n}" (type_identifier) "class" (ERROR) "Cat :\n public" (identifier) "Cat" (:) ":" (identifier) "public" (identifier) "Animal" (compound_statement) "{\npublic:\n Cat(std::string name) : Animal(name) {}\n\n Animal* Clone() override\n {\n return new Cat(*this);\n }\n\n void Draw() override\n {\n std::cout << "I'm a cat!" << " My Name is " << _name << "\n";\n }\n}" ({) "{" (labeled_statement) "public:\n Cat(std::string name) : Animal(name) {}" (statement_identifier) "public" (:) ":" (labeled_statement) "Cat(std::string name) : Animal(name) {}" (statement_identifier) "Cat" (ERROR) "(std::string name)" (() "(" (type_descriptor) "std" (type_identifier) "std" (:) ":" (:) ":" (type_identifier) "string" (identifier) "name" ()) ")" (:) ":" (ERROR) "Animal(name)" (macro_type_specifier) "Animal(name)" (identifier) "Animal" (() "(" (type_descriptor) "name" (type_identifier) "name" ()) ")" (compound_statement) "{}" ({) "{" (}) "}" (function_definition) "Animal* Clone() override\n {\n return new Cat(*this);\n }" (type_identifier) "Animal" (pointer_declarator) "* Clone() override" (*) "*" (function_declarator) "Clone() override" (identifier) "Clone" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (compound_statement) "{\n return new Cat(*this);\n }" ({) "{" (return_statement) "return new Cat(*this);" (return) "return" (ERROR) "new" (identifier) "new" (call_expression) "Cat(*this)" (identifier) "Cat" (argument_list) "(*this)" (() "(" (pointer_expression) "*this" (*) "*" (identifier) "this" ()) ")" (;) ";" (}) "}" (function_definition) "void Draw() override\n {\n std::cout << "I'm a cat!" << " My Name is " << _name << "\n";\n }" (primitive_type) "void" (function_declarator) "Draw() override" (identifier) "Draw" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (compound_statement) "{\n std::cout << "I'm a cat!" << " My Name is " << _name << "\n";\n }" ({) "{" (labeled_statement) "std::cout << "I'm a cat!" << " My Name is " << _name << "\n";" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "cout << "I'm a cat!" << " My Name is " << _name << "\n";" (binary_expression) "cout << "I'm a cat!" << " My Name is " << _name << "\n"" (binary_expression) "cout << "I'm a cat!" << " My Name is " << _name" (binary_expression) "cout << "I'm a cat!" << " My Name is "" (binary_expression) "cout << "I'm a cat!"" (identifier) "cout" (<<) "<<" (string_literal) ""I'm a cat!"" (") """ (string_content) "I'm a cat!" (") """ (<<) "<<" (string_literal) "" My Name is "" (") """ (string_content) " My Name is " (") """ (<<) "<<" (identifier) "_name" (<<) "<<" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";"
113
5
{"language": "c", "success": true, "metadata": {"lines": 16, "avg_line_length": 17.69, "nodes": 60, "errors": 0, "source_hash": "81ee448d37794bce533d22c396bd06303fcce2bdac809f12c4af634002a04cb6", "categorized_nodes": 38}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#pragma", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "once", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 12}}, {"id": 3, "type": "preproc_include", "text": "#include \"Animal.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": "\"Animal.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "function_definition", "text": "class Cat :\n public Animal\n{\npublic:\n Cat(std::string name) : Animal(name) {}\n\n Animal* Clone() override\n {\n return new Cat(*this);\n }\n\n void Draw() override\n {\n std::cout << \"I'm a cat!\" << \" My Name is \" << _name << \"\\n\";\n }\n}", "parent": null, "children": [7, 9], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 7, "type": "ERROR", "text": "Cat :\n public", "parent": 6, "children": [8], "start_point": {"row": 2, "column": 6}, "end_point": {"row": 3, "column": 10}}, {"id": 8, "type": "identifier", "text": "Cat", "parent": 7, "children": [], "start_point": {"row": 2, "column": 6}, "end_point": {"row": 2, "column": 9}}, {"id": 9, "type": "identifier", "text": "Animal", "parent": 6, "children": [], "start_point": {"row": 3, "column": 11}, "end_point": {"row": 3, "column": 17}}, {"id": 10, "type": "labeled_statement", "text": "public:\n Cat(std::string name) : Animal(name) {}", "parent": 6, "children": [11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 43}}, {"id": 11, "type": "labeled_statement", "text": "Cat(std::string name) : Animal(name) {}", "parent": 10, "children": [12, 13, 18], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 43}}, {"id": 12, "type": "statement_identifier", "text": "Cat", "parent": 11, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 7}}, {"id": 13, "type": "ERROR", "text": "(std::string name)", "parent": 11, "children": [14, 16, 17], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 25}}, {"id": 14, "type": "type_descriptor", "text": "std", "parent": 13, "children": [15], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 11}}, {"id": 15, "type": "type_identifier", "text": "std", "parent": 14, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 11}}, {"id": 16, "type": "type_identifier", "text": "string", "parent": 13, "children": [], "start_point": {"row": 6, "column": 13}, "end_point": {"row": 6, "column": 19}}, {"id": 17, "type": "identifier", "text": "name", "parent": 13, "children": [], "start_point": {"row": 6, "column": 20}, "end_point": {"row": 6, "column": 24}}, {"id": 18, "type": "ERROR", "text": "Animal(name)", "parent": 11, "children": [19], "start_point": {"row": 6, "column": 28}, "end_point": {"row": 6, "column": 40}}, {"id": 19, "type": "macro_type_specifier", "text": "Animal(name)", "parent": 18, "children": [20, 21], "start_point": {"row": 6, "column": 28}, "end_point": {"row": 6, "column": 40}}, {"id": 20, "type": "identifier", "text": "Animal", "parent": 19, "children": [], "start_point": {"row": 6, "column": 28}, "end_point": {"row": 6, "column": 34}}, {"id": 21, "type": "type_descriptor", "text": "name", "parent": 19, "children": [22], "start_point": {"row": 6, "column": 35}, "end_point": {"row": 6, "column": 39}}, {"id": 22, "type": "type_identifier", "text": "name", "parent": 21, "children": [], "start_point": {"row": 6, "column": 35}, "end_point": {"row": 6, "column": 39}}, {"id": 23, "type": "function_definition", "text": "Animal* Clone() override\n {\n return new Cat(*this);\n }", "parent": 6, "children": [24, 25], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 11, "column": 5}}, {"id": 24, "type": "type_identifier", "text": "Animal", "parent": 23, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 10}}, {"id": 25, "type": "pointer_declarator", "text": "* Clone() override", "parent": 23, "children": [26, 27], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 28}}, {"id": 26, "type": "*", "text": "*", "parent": 25, "children": [], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 11}}, {"id": 27, "type": "function_declarator", "text": "Clone() override", "parent": 25, "children": [28, 29, 30], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 28}}, {"id": 28, "type": "identifier", "text": "Clone", "parent": 27, "children": [], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 17}}, {"id": 29, "type": "parameter_list", "text": "()", "parent": 27, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 19}}, {"id": 30, "type": "identifier", "text": "override", "parent": 27, "children": [], "start_point": {"row": 8, "column": 20}, "end_point": {"row": 8, "column": 28}}, {"id": 31, "type": "return_statement", "text": "return new Cat(*this);", "parent": 23, "children": [32], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 30}}, {"id": 32, "type": "call_expression", "text": "Cat(*this)", "parent": 31, "children": [33, 34], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 29}}, {"id": 33, "type": "identifier", "text": "Cat", "parent": 32, "children": [], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 22}}, {"id": 34, "type": "argument_list", "text": "(*this)", "parent": 32, "children": [35], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 29}}, {"id": 35, "type": "pointer_expression", "text": "*this", "parent": 34, "children": [36, 37], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 28}}, {"id": 36, "type": "*", "text": "*", "parent": 35, "children": [], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 24}}, {"id": 37, "type": "identifier", "text": "this", "parent": 35, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 28}}, {"id": 38, "type": "function_definition", "text": "void Draw() override\n {\n std::cout << \"I'm a cat!\" << \" My Name is \" << _name << \"\\n\";\n }", "parent": 6, "children": [39, 40], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 16, "column": 5}}, {"id": 39, "type": "primitive_type", "text": "void", "parent": 38, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 8}}, {"id": 40, "type": "function_declarator", "text": "Draw() override", "parent": 38, "children": [41, 42, 43], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 24}}, {"id": 41, "type": "identifier", "text": "Draw", "parent": 40, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 13}}, {"id": 42, "type": "parameter_list", "text": "()", "parent": 40, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 15}}, {"id": 43, "type": "identifier", "text": "override", "parent": 40, "children": [], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 24}}, {"id": 44, "type": "labeled_statement", "text": "std::cout << \"I'm a cat!\" << \" My Name is \" << _name << \"\\n\";", "parent": 38, "children": [45], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 69}}, {"id": 45, "type": "statement_identifier", "text": "std", "parent": 44, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 11}}, {"id": 46, "type": "binary_expression", "text": "cout << \"I'm a cat!\" << \" My Name is \" << _name << \"\\n\"", "parent": 44, "children": [47, 57, 58], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 68}}, {"id": 47, "type": "binary_expression", "text": "cout << \"I'm a cat!\" << \" My Name is \" << _name", "parent": 46, "children": [48, 55, 56], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 60}}, {"id": 48, "type": "binary_expression", "text": "cout << \"I'm a cat!\" << \" My Name is \"", "parent": 47, "children": [49, 53, 54], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 51}}, {"id": 49, "type": "binary_expression", "text": "cout << \"I'm a cat!\"", "parent": 48, "children": [50, 51, 52], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 33}}, {"id": 50, "type": "identifier", "text": "cout", "parent": 49, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 17}}, {"id": 51, "type": "<<", "text": "<<", "parent": 49, "children": [], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 20}}, {"id": 52, "type": "string_literal", "text": "\"I'm a cat!\"", "parent": 49, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 33}}, {"id": 53, "type": "<<", "text": "<<", "parent": 48, "children": [], "start_point": {"row": 15, "column": 34}, "end_point": {"row": 15, "column": 36}}, {"id": 54, "type": "string_literal", "text": "\" My Name is \"", "parent": 48, "children": [], "start_point": {"row": 15, "column": 37}, "end_point": {"row": 15, "column": 51}}, {"id": 55, "type": "<<", "text": "<<", "parent": 47, "children": [], "start_point": {"row": 15, "column": 52}, "end_point": {"row": 15, "column": 54}}, {"id": 56, "type": "identifier", "text": "_name", "parent": 47, "children": [], "start_point": {"row": 15, "column": 55}, "end_point": {"row": 15, "column": 60}}, {"id": 57, "type": "<<", "text": "<<", "parent": 46, "children": [], "start_point": {"row": 15, "column": 61}, "end_point": {"row": 15, "column": 63}}, {"id": 58, "type": "string_literal", "text": "\"\\n\"", "parent": 46, "children": [59], "start_point": {"row": 15, "column": 64}, "end_point": {"row": 15, "column": 68}}, {"id": 59, "type": "escape_sequence", "text": "\\n", "parent": 58, "children": [], "start_point": {"row": 15, "column": 65}, "end_point": {"row": 15, "column": 67}}]}, "node_categories": {"declarations": {"functions": [6, 23, 27, 38, 40], "variables": [], "classes": [], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [32, 35, 46, 47, 48, 49], "assignments": [], "loops": [], "conditionals": [8, 9, 12, 15, 16, 17, 19, 20, 22, 24, 28, 30, 33, 37, 41, 43, 45, 50, 56], "returns": [31], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 52, 54, 58], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "Cat", "text_snippet": "class Cat :\n public Animal\n{\npublic:\n Cat(std::string name) : Animal(name) {}\n\n Animal* Clo"}, {"node_id": 23, "universal_type": "function", "name": "unknown", "text_snippet": "Animal* Clone() override\n {\n return new Cat(*this);\n }"}, {"node_id": 27, "universal_type": "function", "name": "unknown", "text_snippet": "Clone() override"}, {"node_id": 38, "universal_type": "function", "name": "Draw", "text_snippet": "void Draw() override\n {\n std::cout << \"I'm a cat!\" << \" My Name is \" << _name << \"\\n\";\n "}, {"node_id": 40, "universal_type": "function", "name": "unknown", "text_snippet": "Draw() override"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"Animal.h\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\n#include \"Animal.h\"\nclass Cat :\n public Animal\n{\npublic:\n Cat(std::string name) : Animal(name) {}\n\n Animal* Clone() override\n {\n return new Cat(*this);\n }\n\n void Draw() override\n {\n std::cout << \"I'm a cat!\" << \" My Name is \" << _name << \"\\n\";\n }\n};\n\n"}
40
c
#pragma once #include <string> #include <functional> #include <map> #include <iostream> template<typename ...Targs> class ComponentFactory { public: typedef std::function <IComponent*(Targs...)> FactoryFunction; static ComponentFactory<Targs...>* GetInstance() { if (_pInstance == nullptr) { _pInstance = new ComponentFactory<Targs...>(); } return _pInstance; } bool Regist(const std::string & className, FactoryFunction pFunc) { std::lock_guard<std::mutex> guard(_lock); if (_map.find(className) != _map.end()) return false; _map.insert(std::make_pair(className, pFunc)); return true; } bool IsRegisted(const std::string & className) { std::lock_guard<std::mutex> guard(_lock); return _map.find(className) != _map.end(); } IComponent* Create(const std::string className, Targs... args) { _lock.lock(); auto iter = _map.find(className); if (iter == _map.end()) { std::cout << "ComponentFactory Create failed. can't find component. className:" << className.c_str() << std::endl; return nullptr; } auto fun = iter->second; _lock.unlock(); return fun(std::forward<Targs>(args)...); } private: static ComponentFactory<Targs...>* _pInstance; std::map<std::string, FactoryFunction> _map; std::mutex _lock; }; template<typename ...Targs> ComponentFactory<Targs...>* ComponentFactory<Targs...>::_pInstance = nullptr;
25.92
51
(translation_unit) "#pragma once\n#include <string>\n#include <functional>\n#include <map>\n#include <iostream>\n\ntemplate<typename ...Targs>\nclass ComponentFactory\n{\npublic:\n typedef std::function <IComponent*(Targs...)> FactoryFunction;\n\n static ComponentFactory<Targs...>* GetInstance()\n {\n if (_pInstance == nullptr)\n {\n _pInstance = new ComponentFactory<Targs...>();\n }\n return _pInstance;\n }\n\n bool Regist(const std::string & className, FactoryFunction pFunc)\n {\n std::lock_guard<std::mutex> guard(_lock);\n if (_map.find(className) != _map.end())\n return false;\n\n _map.insert(std::make_pair(className, pFunc));\n return true;\n }\n\n bool IsRegisted(const std::string & className)\n {\n std::lock_guard<std::mutex> guard(_lock);\n return _map.find(className) != _map.end();\n }\n\n IComponent* Create(const std::string className, Targs... args)\n {\n _lock.lock();\n auto iter = _map.find(className);\n if (iter == _map.end())\n {\n std::cout << "ComponentFactory Create failed. can't find component. className:" << className.c_str() << std::endl;\n return nullptr;\n }\n auto fun = iter->second;\n _lock.unlock();\n\n return fun(std::forward<Targs>(args)...);\n }\n\nprivate:\n static ComponentFactory<Targs...>* _pInstance;\n\n std::map<std::string, FactoryFunction> _map;\n\n std::mutex _lock;\n};\n\ntemplate<typename ...Targs>\nComponentFactory<Targs...>* ComponentFactory<Targs...>::_pInstance = nullptr;\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (preproc_include) "#include <functional>\n" (#include) "#include" (system_lib_string) "<functional>" (preproc_include) "#include <map>\n" (#include) "#include" (system_lib_string) "<map>" (preproc_include) "#include <iostream>\n" (#include) "#include" (system_lib_string) "<iostream>" (ERROR) "template<typename ...Targs>\nclass ComponentFactory" (binary_expression) "template<typename ...Targs>\nclass" (binary_expression) "template<typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "...Targs" (...) "..." (identifier) "Targs" (>) ">" (identifier) "class" (identifier) "ComponentFactory" (compound_statement) "{\npublic:\n typedef std::function <IComponent*(Targs...)> FactoryFunction;\n\n static ComponentFactory<Targs...>* GetInstance()\n {\n if (_pInstance == nullptr)\n {\n _pInstance = new ComponentFactory<Targs...>();\n }\n return _pInstance;\n }\n\n bool Regist(const std::string & className, FactoryFunction pFunc)\n {\n std::lock_guard<std::mutex> guard(_lock);\n if (_map.find(className) != _map.end())\n return false;\n\n _map.insert(std::make_pair(className, pFunc));\n return true;\n }\n\n bool IsRegisted(const std::string & className)\n {\n std::lock_guard<std::mutex> guard(_lock);\n return _map.find(className) != _map.end();\n }\n\n IComponent* Create(const std::string className, Targs... args)\n {\n _lock.lock();\n auto iter = _map.find(className);\n if (iter == _map.end())\n {\n std::cout << "ComponentFactory Create failed. can't find component. className:" << className.c_str() << std::endl;\n return nullptr;\n }\n auto fun = iter->second;\n _lock.unlock();\n\n return fun(std::forward<Targs>(args)...);\n }\n\nprivate:\n static ComponentFactory<Targs...>* _pInstance;\n\n std::map<std::string, FactoryFunction> _map;\n\n std::mutex _lock;\n}" ({) "{" (labeled_statement) "public:\n typedef std::function <IComponent*(Targs...)> FactoryFunction;" (statement_identifier) "public" (ERROR) ":\n typedef std:" (:) ":" (type_identifier) "typedef" (identifier) "std" (:) ":" (:) ":" (expression_statement) "function <IComponent*(Targs...)> FactoryFunction;" (binary_expression) "function <IComponent*(Targs...)> FactoryFunction" (binary_expression) "function <IComponent*(Targs...)" (identifier) "function" (<) "<" (binary_expression) "IComponent*(Targs...)" (identifier) "IComponent" (*) "*" (parenthesized_expression) "(Targs...)" (() "(" (identifier) "Targs" (ERROR) "..." (...) "..." ()) ")" (>) ">" (identifier) "FactoryFunction" (;) ";" (function_definition) "static ComponentFactory<Targs...>* GetInstance()\n {\n if (_pInstance == nullptr)\n {\n _pInstance = new ComponentFactory<Targs...>();\n }\n return _pInstance;\n }" (storage_class_specifier) "static" (static) "static" (type_identifier) "ComponentFactory" (ERROR) "<Targs...>" (<) "<" (identifier) "Targs" (...) "..." (>) ">" (pointer_declarator) "* GetInstance()" (*) "*" (function_declarator) "GetInstance()" (identifier) "GetInstance" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n if (_pInstance == nullptr)\n {\n _pInstance = new ComponentFactory<Targs...>();\n }\n return _pInstance;\n }" ({) "{" (if_statement) "if (_pInstance == nullptr)\n {\n _pInstance = new ComponentFactory<Targs...>();\n }" (if) "if" (parenthesized_expression) "(_pInstance == nullptr)" (() "(" (binary_expression) "_pInstance == nullptr" (identifier) "_pInstance" (==) "==" (null) "nullptr" (nullptr) "nullptr" ()) ")" (compound_statement) "{\n _pInstance = new ComponentFactory<Targs...>();\n }" ({) "{" (expression_statement) "_pInstance = new ComponentFactory<Targs...>();" (assignment_expression) "_pInstance = new ComponentFactory<Targs" (identifier) "_pInstance" (=) "=" (ERROR) "new" (identifier) "new" (binary_expression) "ComponentFactory<Targs" (identifier) "ComponentFactory" (<) "<" (identifier) "Targs" (ERROR) "...>()" (...) "..." (>) ">" (() "(" ()) ")" (;) ";" (}) "}" (return_statement) "return _pInstance;" (return) "return" (identifier) "_pInstance" (;) ";" (}) "}" (function_definition) "bool Regist(const std::string & className, FactoryFunction pFunc)\n {\n std::lock_guard<std::mutex> guard(_lock);\n if (_map.find(className) != _map.end())\n return false;\n\n _map.insert(std::make_pair(className, pFunc));\n return true;\n }" (primitive_type) "bool" (function_declarator) "Regist(const std::string & className, FactoryFunction pFunc)" (identifier) "Regist" (parameter_list) "(const std::string & className, FactoryFunction pFunc)" (() "(" (parameter_declaration) "const std::string & className" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "className" (,) "," (parameter_declaration) "FactoryFunction pFunc" (type_identifier) "FactoryFunction" (identifier) "pFunc" ()) ")" (compound_statement) "{\n std::lock_guard<std::mutex> guard(_lock);\n if (_map.find(className) != _map.end())\n return false;\n\n _map.insert(std::make_pair(className, pFunc));\n return true;\n }" ({) "{" (labeled_statement) "std::lock_guard<std::mutex> guard(_lock);" (statement_identifier) "std" (ERROR) "::lock_guard<std:" (:) ":" (:) ":" (binary_expression) "lock_guard<std" (identifier) "lock_guard" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "mutex> guard(_lock);" (binary_expression) "mutex> guard(_lock)" (identifier) "mutex" (>) ">" (call_expression) "guard(_lock)" (identifier) "guard" (argument_list) "(_lock)" (() "(" (identifier) "_lock" ()) ")" (;) ";" (if_statement) "if (_map.find(className) != _map.end())\n return false;" (if) "if" (parenthesized_expression) "(_map.find(className) != _map.end())" (() "(" (binary_expression) "_map.find(className) != _map.end()" (call_expression) "_map.find(className)" (field_expression) "_map.find" (identifier) "_map" (.) "." (field_identifier) "find" (argument_list) "(className)" (() "(" (identifier) "className" ()) ")" (!=) "!=" (call_expression) "_map.end()" (field_expression) "_map.end" (identifier) "_map" (.) "." (field_identifier) "end" (argument_list) "()" (() "(" ()) ")" ()) ")" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (expression_statement) "_map.insert(std::make_pair(className, pFunc));" (call_expression) "_map.insert(std::make_pair(className, pFunc))" (field_expression) "_map.insert" (identifier) "_map" (.) "." (field_identifier) "insert" (argument_list) "(std::make_pair(className, pFunc))" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (call_expression) "make_pair(className, pFunc)" (identifier) "make_pair" (argument_list) "(className, pFunc)" (() "(" (identifier) "className" (,) "," (identifier) "pFunc" ()) ")" ()) ")" (;) ";" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (function_definition) "bool IsRegisted(const std::string & className)\n {\n std::lock_guard<std::mutex> guard(_lock);\n return _map.find(className) != _map.end();\n }" (primitive_type) "bool" (function_declarator) "IsRegisted(const std::string & className)" (identifier) "IsRegisted" (parameter_list) "(const std::string & className)" (() "(" (parameter_declaration) "const std::string & className" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "className" ()) ")" (compound_statement) "{\n std::lock_guard<std::mutex> guard(_lock);\n return _map.find(className) != _map.end();\n }" ({) "{" (labeled_statement) "std::lock_guard<std::mutex> guard(_lock);" (statement_identifier) "std" (ERROR) "::lock_guard<std:" (:) ":" (:) ":" (binary_expression) "lock_guard<std" (identifier) "lock_guard" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "mutex> guard(_lock);" (binary_expression) "mutex> guard(_lock)" (identifier) "mutex" (>) ">" (call_expression) "guard(_lock)" (identifier) "guard" (argument_list) "(_lock)" (() "(" (identifier) "_lock" ()) ")" (;) ";" (return_statement) "return _map.find(className) != _map.end();" (return) "return" (binary_expression) "_map.find(className) != _map.end()" (call_expression) "_map.find(className)" (field_expression) "_map.find" (identifier) "_map" (.) "." (field_identifier) "find" (argument_list) "(className)" (() "(" (identifier) "className" ()) ")" (!=) "!=" (call_expression) "_map.end()" (field_expression) "_map.end" (identifier) "_map" (.) "." (field_identifier) "end" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (function_definition) "IComponent* Create(const std::string className, Targs... args)\n {\n _lock.lock();\n auto iter = _map.find(className);\n if (iter == _map.end())\n {\n std::cout << "ComponentFactory Create failed. can't find component. className:" << className.c_str() << std::endl;\n return nullptr;\n }\n auto fun = iter->second;\n _lock.unlock();\n\n return fun(std::forward<Targs>(args)...);\n }" (type_identifier) "IComponent" (pointer_declarator) "* Create(const std::string className, Targs... args)" (*) "*" (function_declarator) "Create(const std::string className, Targs... args)" (identifier) "Create" (parameter_list) "(const std::string className, Targs... args)" (() "(" (parameter_declaration) "const std::string className" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (identifier) "className" (,) "," (parameter_declaration) "Targs... args" (type_identifier) "Targs" (ERROR) "..." (...) "..." (identifier) "args" ()) ")" (compound_statement) "{\n _lock.lock();\n auto iter = _map.find(className);\n if (iter == _map.end())\n {\n std::cout << "ComponentFactory Create failed. can't find component. className:" << className.c_str() << std::endl;\n return nullptr;\n }\n auto fun = iter->second;\n _lock.unlock();\n\n return fun(std::forward<Targs>(args)...);\n }" ({) "{" (expression_statement) "_lock.lock();" (call_expression) "_lock.lock()" (field_expression) "_lock.lock" (identifier) "_lock" (.) "." (field_identifier) "lock" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "auto iter = _map.find(className);" (storage_class_specifier) "auto" (auto) "auto" (type_identifier) "iter" (init_declarator) " = _map.find(className)" (identifier) "" (=) "=" (call_expression) "_map.find(className)" (field_expression) "_map.find" (identifier) "_map" (.) "." (field_identifier) "find" (argument_list) "(className)" (() "(" (identifier) "className" ()) ")" (;) ";" (if_statement) "if (iter == _map.end())\n {\n std::cout << "ComponentFactory Create failed. can't find component. className:" << className.c_str() << std::endl;\n return nullptr;\n }" (if) "if" (parenthesized_expression) "(iter == _map.end())" (() "(" (binary_expression) "iter == _map.end()" (identifier) "iter" (==) "==" (call_expression) "_map.end()" (field_expression) "_map.end" (identifier) "_map" (.) "." (field_identifier) "end" (argument_list) "()" (() "(" ()) ")" ()) ")" (compound_statement) "{\n std::cout << "ComponentFactory Create failed. can't find component. className:" << className.c_str() << std::endl;\n return nullptr;\n }" ({) "{" (labeled_statement) "std::cout << "ComponentFactory Create failed. can't find component. className:" << className.c_str() << std::endl;" (statement_identifier) "std" (ERROR) "::cout << "ComponentFactory Create failed. can't find component. className:" << className.c_str() << std:" (:) ":" (:) ":" (binary_expression) "cout << "ComponentFactory Create failed. can't find component. className:" << className.c_str() << std" (binary_expression) "cout << "ComponentFactory Create failed. can't find component. className:" << className.c_str()" (binary_expression) "cout << "ComponentFactory Create failed. can't find component. className:"" (identifier) "cout" (<<) "<<" (string_literal) ""ComponentFactory Create failed. can't find component. className:"" (") """ (string_content) "ComponentFactory Create failed. can't find component. className:" (") """ (<<) "<<" (call_expression) "className.c_str()" (field_expression) "className.c_str" (identifier) "className" (.) "." (field_identifier) "c_str" (argument_list) "()" (() "(" ()) ")" (<<) "<<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "endl;" (identifier) "endl" (;) ";" (return_statement) "return nullptr;" (return) "return" (null) "nullptr" (nullptr) "nullptr" (;) ";" (}) "}" (declaration) "auto fun = iter->second;" (storage_class_specifier) "auto" (auto) "auto" (type_identifier) "fun" (init_declarator) " = iter->second" (identifier) "" (=) "=" (field_expression) "iter->second" (identifier) "iter" (->) "->" (field_identifier) "second" (;) ";" (expression_statement) "_lock.unlock();" (call_expression) "_lock.unlock()" (field_expression) "_lock.unlock" (identifier) "_lock" (.) "." (field_identifier) "unlock" (argument_list) "()" (() "(" ()) ")" (;) ";" (return_statement) "return fun(std::forward<Targs>(args)...);" (return) "return" (call_expression) "fun(std::forward<Targs>(args)...)" (identifier) "fun" (argument_list) "(std::forward<Targs>(args)...)" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (binary_expression) "forward<Targs>(args)" (binary_expression) "forward<Targs" (identifier) "forward" (<) "<" (identifier) "Targs" (>) ">" (parenthesized_expression) "(args)" (() "(" (identifier) "args" ()) ")" (ERROR) "..." (...) "..." ()) ")" (;) ";" (}) "}" (labeled_statement) "private:\n static ComponentFactory<Targs...>* _pInstance;" (statement_identifier) "private" (:) ":" (declaration) "static ComponentFactory<Targs...>* _pInstance;" (storage_class_specifier) "static" (static) "static" (type_identifier) "ComponentFactory" (ERROR) "<Targs...>" (<) "<" (identifier) "Targs" (...) "..." (>) ">" (pointer_declarator) "* _pInstance" (*) "*" (identifier) "_pInstance" (;) ";" (labeled_statement) "std::map<std::string, FactoryFunction> _map;" (statement_identifier) "std" (ERROR) "::map<std:" (:) ":" (:) ":" (binary_expression) "map<std" (identifier) "map" (<) "<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "string, FactoryFunction> _map;" (comma_expression) "string, FactoryFunction> _map" (identifier) "string" (,) "," (binary_expression) "FactoryFunction> _map" (identifier) "FactoryFunction" (>) ">" (identifier) "_map" (;) ";" (labeled_statement) "std::mutex _lock;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "mutex _lock;" (type_identifier) "mutex" (identifier) "_lock" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (expression_statement) "template<typename ...Targs>\nComponentFactory<Targs...>* ComponentFactory<Targs...>::_pInstance = nullptr;" (update_expression) "template<typename ...Targs>\nComponentFactory<Targs...>* ComponentFactory<Targs...>::_pInstance = nullptr" (binary_expression) "template<typename ...Targs>\nComponentFactory<Targs...>* ComponentFactory<Targs...>::_pInstance = nullptr" (binary_expression) "template<typename ...Targs>\nComponentFactory<Targs...>* ComponentFactory<Targs" (binary_expression) "template<typename ...Targs>\nComponentFactory<Targs...>* ComponentFactory" (binary_expression) "template<typename ...Targs>\nComponentFactory<Targs" (binary_expression) "template<typename ...Targs>\nComponentFactory" (binary_expression) "template<typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "...Targs" (...) "..." (identifier) "Targs" (>) ">" (identifier) "ComponentFactory" (<) "<" (identifier) "Targs" (ERROR) "..." (...) "..." (>) ">" (pointer_expression) "* ComponentFactory" (*) "*" (identifier) "ComponentFactory" (<) "<" (identifier) "Targs" (ERROR) "..." (...) "..." (>) ">" (ERROR) "::" (:) ":" (:) ":" (assignment_expression) "_pInstance = nullptr" (identifier) "_pInstance" (=) "=" (null) "nullptr" (nullptr) "nullptr" (--) "" (;) ";"
512
24
{"language": "c", "success": true, "metadata": {"lines": 51, "avg_line_length": 25.92, "nodes": 311, "errors": 0, "source_hash": "676bcdb60748c5a8e0262e0b722b96e9d9c41af91a8f4c33bbeadf4473e63027", "categorized_nodes": 210}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 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 <string>\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": "<string>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 17}}, {"id": 6, "type": "preproc_include", "text": "#include <functional>\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": "<functional>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 21}}, {"id": 9, "type": "preproc_include", "text": "#include <map>\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": "<map>", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 14}}, {"id": 12, "type": "preproc_include", "text": "#include <iostream>\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": "<iostream>", "parent": 12, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 19}}, {"id": 15, "type": "ERROR", "text": "template<typename ...Targs>\nclass ComponentFactory", "parent": null, "children": [16, 24], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 22}}, {"id": 16, "type": "binary_expression", "text": "template<typename ...Targs>\nclass", "parent": 15, "children": [17, 21, 23], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 5}}, {"id": 17, "type": "binary_expression", "text": "template<typename", "parent": 16, "children": [18, 19, 20], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 17}}, {"id": 18, "type": "identifier", "text": "template", "parent": 17, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 19, "type": "<", "text": "<", "parent": 17, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 9}}, {"id": 20, "type": "identifier", "text": "typename", "parent": 17, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 17}}, {"id": 21, "type": "ERROR", "text": "...Targs", "parent": 16, "children": [22], "start_point": {"row": 6, "column": 18}, "end_point": {"row": 6, "column": 26}}, {"id": 22, "type": "identifier", "text": "Targs", "parent": 21, "children": [], "start_point": {"row": 6, "column": 21}, "end_point": {"row": 6, "column": 26}}, {"id": 23, "type": ">", "text": ">", "parent": 16, "children": [], "start_point": {"row": 6, "column": 26}, "end_point": {"row": 6, "column": 27}}, {"id": 24, "type": "identifier", "text": "ComponentFactory", "parent": 15, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 22}}, {"id": 25, "type": "labeled_statement", "text": "public:\n\ttypedef std::function <IComponent*(Targs...)> FactoryFunction;", "parent": null, "children": [26], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 63}}, {"id": 26, "type": "ERROR", "text": ":\n\ttypedef std:", "parent": 25, "children": [27, 28], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 10, "column": 13}}, {"id": 27, "type": "type_identifier", "text": "typedef", "parent": 26, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 8}}, {"id": 28, "type": "identifier", "text": "std", "parent": 26, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 12}}, {"id": 29, "type": "binary_expression", "text": "function <IComponent*(Targs...)> FactoryFunction", "parent": 25, "children": [30, 37, 38], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 62}}, {"id": 30, "type": "binary_expression", "text": "function <IComponent*(Targs...)", "parent": 29, "children": [31, 32], "start_point": {"row": 10, "column": 14}, "end_point": {"row": 10, "column": 45}}, {"id": 31, "type": "<", "text": "<", "parent": 30, "children": [], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 24}}, {"id": 32, "type": "binary_expression", "text": "IComponent*(Targs...)", "parent": 30, "children": [33, 34, 35], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 45}}, {"id": 33, "type": "identifier", "text": "IComponent", "parent": 32, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 34}}, {"id": 34, "type": "*", "text": "*", "parent": 32, "children": [], "start_point": {"row": 10, "column": 34}, "end_point": {"row": 10, "column": 35}}, {"id": 35, "type": "parenthesized_expression", "text": "(Targs...)", "parent": 32, "children": [36], "start_point": {"row": 10, "column": 35}, "end_point": {"row": 10, "column": 45}}, {"id": 36, "type": "identifier", "text": "Targs", "parent": 35, "children": [], "start_point": {"row": 10, "column": 36}, "end_point": {"row": 10, "column": 41}}, {"id": 37, "type": ">", "text": ">", "parent": 29, "children": [], "start_point": {"row": 10, "column": 45}, "end_point": {"row": 10, "column": 46}}, {"id": 38, "type": "identifier", "text": "FactoryFunction", "parent": 29, "children": [], "start_point": {"row": 10, "column": 47}, "end_point": {"row": 10, "column": 62}}, {"id": 39, "type": "function_definition", "text": "static ComponentFactory<Targs...>* GetInstance()\n\t{\n\t\tif (_pInstance == nullptr)\n\t\t{\n\t\t\t_pInstance = new ComponentFactory<Targs...>();\n\t\t}\n\t\treturn _pInstance;\n\t}", "parent": null, "children": [40, 41, 45], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 19, "column": 2}}, {"id": 40, "type": "type_identifier", "text": "ComponentFactory", "parent": 39, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 24}}, {"id": 41, "type": "ERROR", "text": "<Targs...>", "parent": 39, "children": [42, 43, 44], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 34}}, {"id": 42, "type": "<", "text": "<", "parent": 41, "children": [], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 25}}, {"id": 43, "type": "identifier", "text": "Targs", "parent": 41, "children": [], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 30}}, {"id": 44, "type": ">", "text": ">", "parent": 41, "children": [], "start_point": {"row": 12, "column": 33}, "end_point": {"row": 12, "column": 34}}, {"id": 45, "type": "pointer_declarator", "text": "* GetInstance()", "parent": 39, "children": [46, 47], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 49}}, {"id": 46, "type": "*", "text": "*", "parent": 45, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 35}}, {"id": 47, "type": "function_declarator", "text": "GetInstance()", "parent": 45, "children": [48, 49], "start_point": {"row": 12, "column": 36}, "end_point": {"row": 12, "column": 49}}, {"id": 48, "type": "identifier", "text": "GetInstance", "parent": 47, "children": [], "start_point": {"row": 12, "column": 36}, "end_point": {"row": 12, "column": 47}}, {"id": 49, "type": "parameter_list", "text": "()", "parent": 47, "children": [], "start_point": {"row": 12, "column": 47}, "end_point": {"row": 12, "column": 49}}, {"id": 50, "type": "if_statement", "text": "if (_pInstance == nullptr)\n\t\t{\n\t\t\t_pInstance = new ComponentFactory<Targs...>();\n\t\t}", "parent": 39, "children": [51], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 17, "column": 3}}, {"id": 51, "type": "parenthesized_expression", "text": "(_pInstance == nullptr)", "parent": 50, "children": [52], "start_point": {"row": 14, "column": 5}, "end_point": {"row": 14, "column": 28}}, {"id": 52, "type": "binary_expression", "text": "_pInstance == nullptr", "parent": 51, "children": [53, 54, 55], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 27}}, {"id": 53, "type": "identifier", "text": "_pInstance", "parent": 52, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 16}}, {"id": 54, "type": "==", "text": "==", "parent": 52, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 19}}, {"id": 55, "type": "null", "text": "nullptr", "parent": 52, "children": [56], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 27}}, {"id": 56, "type": "nullptr", "text": "nullptr", "parent": 55, "children": [], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 27}}, {"id": 57, "type": "assignment_expression", "text": "_pInstance = new ComponentFactory<Targs", "parent": 50, "children": [58, 59, 60], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 42}}, {"id": 58, "type": "identifier", "text": "_pInstance", "parent": 57, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 13}}, {"id": 59, "type": "=", "text": "=", "parent": 57, "children": [], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 15}}, {"id": 60, "type": "binary_expression", "text": "ComponentFactory<Targs", "parent": 57, "children": [61, 62, 63], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 42}}, {"id": 61, "type": "identifier", "text": "ComponentFactory", "parent": 60, "children": [], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 36}}, {"id": 62, "type": "<", "text": "<", "parent": 60, "children": [], "start_point": {"row": 16, "column": 36}, "end_point": {"row": 16, "column": 37}}, {"id": 63, "type": "identifier", "text": "Targs", "parent": 60, "children": [], "start_point": {"row": 16, "column": 37}, "end_point": {"row": 16, "column": 42}}, {"id": 64, "type": "ERROR", "text": "...>()", "parent": 50, "children": [65], "start_point": {"row": 16, "column": 42}, "end_point": {"row": 16, "column": 48}}, {"id": 65, "type": ">", "text": ">", "parent": 64, "children": [], "start_point": {"row": 16, "column": 45}, "end_point": {"row": 16, "column": 46}}, {"id": 66, "type": "return_statement", "text": "return _pInstance;", "parent": 39, "children": [67], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 20}}, {"id": 67, "type": "identifier", "text": "_pInstance", "parent": 66, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 19}}, {"id": 68, "type": "function_definition", "text": "bool Regist(const std::string & className, FactoryFunction pFunc)\n\t{\n\t\tstd::lock_guard<std::mutex> guard(_lock);\n\t\tif (_map.find(className) != _map.end())\n\t\t\treturn false;\n\n\t\t_map.insert(std::make_pair(className, pFunc));\n\t\treturn true;\n\t}", "parent": null, "children": [69, 70], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 29, "column": 2}}, {"id": 69, "type": "primitive_type", "text": "bool", "parent": 68, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 5}}, {"id": 70, "type": "function_declarator", "text": "Regist(const std::string & className, FactoryFunction pFunc)", "parent": 68, "children": [71, 72], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 66}}, {"id": 71, "type": "identifier", "text": "Regist", "parent": 70, "children": [], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 12}}, {"id": 72, "type": "parameter_list", "text": "(const std::string & className, FactoryFunction pFunc)", "parent": 70, "children": [73, 78], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 21, "column": 66}}, {"id": 73, "type": "parameter_declaration", "text": "const std::string & className", "parent": 72, "children": [74, 75, 77], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 42}}, {"id": 74, "type": "type_identifier", "text": "std", "parent": 73, "children": [], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 22}}, {"id": 75, "type": "ERROR", "text": "::string &", "parent": 73, "children": [76], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 32}}, {"id": 76, "type": "identifier", "text": "string", "parent": 75, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 30}}, {"id": 77, "type": "identifier", "text": "className", "parent": 73, "children": [], "start_point": {"row": 21, "column": 33}, "end_point": {"row": 21, "column": 42}}, {"id": 78, "type": "parameter_declaration", "text": "FactoryFunction pFunc", "parent": 72, "children": [79, 80], "start_point": {"row": 21, "column": 44}, "end_point": {"row": 21, "column": 65}}, {"id": 79, "type": "type_identifier", "text": "FactoryFunction", "parent": 78, "children": [], "start_point": {"row": 21, "column": 44}, "end_point": {"row": 21, "column": 59}}, {"id": 80, "type": "identifier", "text": "pFunc", "parent": 78, "children": [], "start_point": {"row": 21, "column": 60}, "end_point": {"row": 21, "column": 65}}, {"id": 81, "type": "labeled_statement", "text": "std::lock_guard<std::mutex> guard(_lock);", "parent": 68, "children": [82, 83], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 43}}, {"id": 82, "type": "statement_identifier", "text": "std", "parent": 81, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 5}}, {"id": 83, "type": "ERROR", "text": "::lock_guard<std:", "parent": 81, "children": [84], "start_point": {"row": 23, "column": 5}, "end_point": {"row": 23, "column": 22}}, {"id": 84, "type": "binary_expression", "text": "lock_guard<std", "parent": 83, "children": [85, 86, 87], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 21}}, {"id": 85, "type": "identifier", "text": "lock_guard", "parent": 84, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 17}}, {"id": 86, "type": "<", "text": "<", "parent": 84, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 18}}, {"id": 87, "type": "identifier", "text": "std", "parent": 84, "children": [], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 21}}, {"id": 88, "type": "binary_expression", "text": "mutex> guard(_lock)", "parent": 81, "children": [89, 90, 91], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 42}}, {"id": 89, "type": "identifier", "text": "mutex", "parent": 88, "children": [], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 28}}, {"id": 90, "type": ">", "text": ">", "parent": 88, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 29}}, {"id": 91, "type": "call_expression", "text": "guard(_lock)", "parent": 88, "children": [92, 93], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 42}}, {"id": 92, "type": "identifier", "text": "guard", "parent": 91, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 35}}, {"id": 93, "type": "argument_list", "text": "(_lock)", "parent": 91, "children": [94], "start_point": {"row": 23, "column": 35}, "end_point": {"row": 23, "column": 42}}, {"id": 94, "type": "identifier", "text": "_lock", "parent": 93, "children": [], "start_point": {"row": 23, "column": 36}, "end_point": {"row": 23, "column": 41}}, {"id": 95, "type": "if_statement", "text": "if (_map.find(className) != _map.end())\n\t\t\treturn false;", "parent": 68, "children": [96, 109], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 25, "column": 16}}, {"id": 96, "type": "parenthesized_expression", "text": "(_map.find(className) != _map.end())", "parent": 95, "children": [97], "start_point": {"row": 24, "column": 5}, "end_point": {"row": 24, "column": 41}}, {"id": 97, "type": "binary_expression", "text": "_map.find(className) != _map.end()", "parent": 96, "children": [98, 104, 105], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 40}}, {"id": 98, "type": "call_expression", "text": "_map.find(className)", "parent": 97, "children": [99, 102], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 26}}, {"id": 99, "type": "field_expression", "text": "_map.find", "parent": 98, "children": [100, 101], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 15}}, {"id": 100, "type": "identifier", "text": "_map", "parent": 99, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 10}}, {"id": 101, "type": "field_identifier", "text": "find", "parent": 99, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 15}}, {"id": 102, "type": "argument_list", "text": "(className)", "parent": 98, "children": [103], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 26}}, {"id": 103, "type": "identifier", "text": "className", "parent": 102, "children": [], "start_point": {"row": 24, "column": 16}, "end_point": {"row": 24, "column": 25}}, {"id": 104, "type": "!=", "text": "!=", "parent": 97, "children": [], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 29}}, {"id": 105, "type": "call_expression", "text": "_map.end()", "parent": 97, "children": [106, 108], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 40}}, {"id": 106, "type": "field_expression", "text": "_map.end", "parent": 105, "children": [107], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 38}}, {"id": 107, "type": "identifier", "text": "_map", "parent": 106, "children": [], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 34}}, {"id": 108, "type": "argument_list", "text": "()", "parent": 105, "children": [], "start_point": {"row": 24, "column": 38}, "end_point": {"row": 24, "column": 40}}, {"id": 109, "type": "return_statement", "text": "return false;", "parent": 95, "children": [110], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 16}}, {"id": 110, "type": "false", "text": "false", "parent": 109, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 15}}, {"id": 111, "type": "call_expression", "text": "_map.insert(std::make_pair(className, pFunc))", "parent": 68, "children": [112, 115], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 47}}, {"id": 112, "type": "field_expression", "text": "_map.insert", "parent": 111, "children": [113, 114], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 13}}, {"id": 113, "type": "identifier", "text": "_map", "parent": 112, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 6}}, {"id": 114, "type": "field_identifier", "text": "insert", "parent": 112, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 13}}, {"id": 115, "type": "argument_list", "text": "(std::make_pair(className, pFunc))", "parent": 111, "children": [116, 118], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 47}}, {"id": 116, "type": "ERROR", "text": "std::", "parent": 115, "children": [117], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 19}}, {"id": 117, "type": "identifier", "text": "std", "parent": 116, "children": [], "start_point": {"row": 27, "column": 14}, "end_point": {"row": 27, "column": 17}}, {"id": 118, "type": "call_expression", "text": "make_pair(className, pFunc)", "parent": 115, "children": [119, 120], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 46}}, {"id": 119, "type": "identifier", "text": "make_pair", "parent": 118, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 28}}, {"id": 120, "type": "argument_list", "text": "(className, pFunc)", "parent": 118, "children": [121, 122], "start_point": {"row": 27, "column": 28}, "end_point": {"row": 27, "column": 46}}, {"id": 121, "type": "identifier", "text": "className", "parent": 120, "children": [], "start_point": {"row": 27, "column": 29}, "end_point": {"row": 27, "column": 38}}, {"id": 122, "type": "identifier", "text": "pFunc", "parent": 120, "children": [], "start_point": {"row": 27, "column": 40}, "end_point": {"row": 27, "column": 45}}, {"id": 123, "type": "return_statement", "text": "return true;", "parent": 68, "children": [124], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 14}}, {"id": 124, "type": "true", "text": "true", "parent": 123, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 13}}, {"id": 125, "type": "function_definition", "text": "bool IsRegisted(const std::string & className)\n\t{\n\t\tstd::lock_guard<std::mutex> guard(_lock);\n\t\treturn _map.find(className) != _map.end();\n\t}", "parent": null, "children": [126, 127], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 35, "column": 2}}, {"id": 126, "type": "primitive_type", "text": "bool", "parent": 125, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 5}}, {"id": 127, "type": "function_declarator", "text": "IsRegisted(const std::string & className)", "parent": 125, "children": [128, 129], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 47}}, {"id": 128, "type": "identifier", "text": "IsRegisted", "parent": 127, "children": [], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 16}}, {"id": 129, "type": "parameter_list", "text": "(const std::string & className)", "parent": 127, "children": [130], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 47}}, {"id": 130, "type": "parameter_declaration", "text": "const std::string & className", "parent": 129, "children": [131, 132, 134], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 46}}, {"id": 131, "type": "type_identifier", "text": "std", "parent": 130, "children": [], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 26}}, {"id": 132, "type": "ERROR", "text": "::string &", "parent": 130, "children": [133], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 36}}, {"id": 133, "type": "identifier", "text": "string", "parent": 132, "children": [], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 34}}, {"id": 134, "type": "identifier", "text": "className", "parent": 130, "children": [], "start_point": {"row": 31, "column": 37}, "end_point": {"row": 31, "column": 46}}, {"id": 135, "type": "labeled_statement", "text": "std::lock_guard<std::mutex> guard(_lock);", "parent": 125, "children": [136, 137], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 43}}, {"id": 136, "type": "statement_identifier", "text": "std", "parent": 135, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 5}}, {"id": 137, "type": "ERROR", "text": "::lock_guard<std:", "parent": 135, "children": [138], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 22}}, {"id": 138, "type": "binary_expression", "text": "lock_guard<std", "parent": 137, "children": [139, 140, 141], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 21}}, {"id": 139, "type": "identifier", "text": "lock_guard", "parent": 138, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 17}}, {"id": 140, "type": "<", "text": "<", "parent": 138, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 18}}, {"id": 141, "type": "identifier", "text": "std", "parent": 138, "children": [], "start_point": {"row": 33, "column": 18}, "end_point": {"row": 33, "column": 21}}, {"id": 142, "type": "binary_expression", "text": "mutex> guard(_lock)", "parent": 135, "children": [143, 144, 145], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 42}}, {"id": 143, "type": "identifier", "text": "mutex", "parent": 142, "children": [], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 28}}, {"id": 144, "type": ">", "text": ">", "parent": 142, "children": [], "start_point": {"row": 33, "column": 28}, "end_point": {"row": 33, "column": 29}}, {"id": 145, "type": "call_expression", "text": "guard(_lock)", "parent": 142, "children": [146, 147], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 42}}, {"id": 146, "type": "identifier", "text": "guard", "parent": 145, "children": [], "start_point": {"row": 33, "column": 30}, "end_point": {"row": 33, "column": 35}}, {"id": 147, "type": "argument_list", "text": "(_lock)", "parent": 145, "children": [148], "start_point": {"row": 33, "column": 35}, "end_point": {"row": 33, "column": 42}}, {"id": 148, "type": "identifier", "text": "_lock", "parent": 147, "children": [], "start_point": {"row": 33, "column": 36}, "end_point": {"row": 33, "column": 41}}, {"id": 149, "type": "return_statement", "text": "return _map.find(className) != _map.end();", "parent": 125, "children": [150], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 44}}, {"id": 150, "type": "binary_expression", "text": "_map.find(className) != _map.end()", "parent": 149, "children": [151, 157, 158], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 43}}, {"id": 151, "type": "call_expression", "text": "_map.find(className)", "parent": 150, "children": [152, 155], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 29}}, {"id": 152, "type": "field_expression", "text": "_map.find", "parent": 151, "children": [153, 154], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 18}}, {"id": 153, "type": "identifier", "text": "_map", "parent": 152, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 13}}, {"id": 154, "type": "field_identifier", "text": "find", "parent": 152, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 18}}, {"id": 155, "type": "argument_list", "text": "(className)", "parent": 151, "children": [156], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 29}}, {"id": 156, "type": "identifier", "text": "className", "parent": 155, "children": [], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 28}}, {"id": 157, "type": "!=", "text": "!=", "parent": 150, "children": [], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 32}}, {"id": 158, "type": "call_expression", "text": "_map.end()", "parent": 150, "children": [159, 161], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 43}}, {"id": 159, "type": "field_expression", "text": "_map.end", "parent": 158, "children": [160], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 41}}, {"id": 160, "type": "identifier", "text": "_map", "parent": 159, "children": [], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 37}}, {"id": 161, "type": "argument_list", "text": "()", "parent": 158, "children": [], "start_point": {"row": 34, "column": 41}, "end_point": {"row": 34, "column": 43}}, {"id": 162, "type": "function_definition", "text": "IComponent* Create(const std::string className, Targs... args)\n\t{\n\t\t_lock.lock();\n\t\tauto iter = _map.find(className);\n\t\tif (iter == _map.end())\n\t\t{\n\t\t\tstd::cout << \"ComponentFactory Create failed. can't find component. className:\" << className.c_str() << std::endl;\n\t\t\treturn nullptr;\n\t\t}\n\t\tauto fun = iter->second;\n\t\t_lock.unlock();\n\n\t\treturn fun(std::forward<Targs>(args)...);\n\t}", "parent": null, "children": [163, 164], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 50, "column": 2}}, {"id": 163, "type": "type_identifier", "text": "IComponent", "parent": 162, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 11}}, {"id": 164, "type": "pointer_declarator", "text": "* Create(const std::string className, Targs... args)", "parent": 162, "children": [165, 166], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 63}}, {"id": 165, "type": "*", "text": "*", "parent": 164, "children": [], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 12}}, {"id": 166, "type": "function_declarator", "text": "Create(const std::string className, Targs... args)", "parent": 164, "children": [167, 168], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 63}}, {"id": 167, "type": "identifier", "text": "Create", "parent": 166, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 19}}, {"id": 168, "type": "parameter_list", "text": "(const std::string className, Targs... args)", "parent": 166, "children": [169, 174], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 63}}, {"id": 169, "type": "parameter_declaration", "text": "const std::string className", "parent": 168, "children": [170, 171, 173], "start_point": {"row": 37, "column": 20}, "end_point": {"row": 37, "column": 47}}, {"id": 170, "type": "type_identifier", "text": "std", "parent": 169, "children": [], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 29}}, {"id": 171, "type": "ERROR", "text": "::string", "parent": 169, "children": [172], "start_point": {"row": 37, "column": 29}, "end_point": {"row": 37, "column": 37}}, {"id": 172, "type": "identifier", "text": "string", "parent": 171, "children": [], "start_point": {"row": 37, "column": 31}, "end_point": {"row": 37, "column": 37}}, {"id": 173, "type": "identifier", "text": "className", "parent": 169, "children": [], "start_point": {"row": 37, "column": 38}, "end_point": {"row": 37, "column": 47}}, {"id": 174, "type": "parameter_declaration", "text": "Targs... args", "parent": 168, "children": [175, 176], "start_point": {"row": 37, "column": 49}, "end_point": {"row": 37, "column": 62}}, {"id": 175, "type": "type_identifier", "text": "Targs", "parent": 174, "children": [], "start_point": {"row": 37, "column": 49}, "end_point": {"row": 37, "column": 54}}, {"id": 176, "type": "identifier", "text": "args", "parent": 174, "children": [], "start_point": {"row": 37, "column": 58}, "end_point": {"row": 37, "column": 62}}, {"id": 177, "type": "call_expression", "text": "_lock.lock()", "parent": 162, "children": [178, 181], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 14}}, {"id": 178, "type": "field_expression", "text": "_lock.lock", "parent": 177, "children": [179, 180], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 12}}, {"id": 179, "type": "identifier", "text": "_lock", "parent": 178, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 7}}, {"id": 180, "type": "field_identifier", "text": "lock", "parent": 178, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 12}}, {"id": 181, "type": "argument_list", "text": "()", "parent": 177, "children": [], "start_point": {"row": 39, "column": 12}, "end_point": {"row": 39, "column": 14}}, {"id": 182, "type": "declaration", "text": "auto iter = _map.find(className);", "parent": 162, "children": [183, 185, 186], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 35}}, {"id": 183, "type": "storage_class_specifier", "text": "auto", "parent": 182, "children": [184], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 6}}, {"id": 184, "type": "auto", "text": "auto", "parent": 183, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 6}}, {"id": 185, "type": "type_identifier", "text": "iter", "parent": 182, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 11}}, {"id": 186, "type": "init_declarator", "text": " = _map.find(className)", "parent": 182, "children": [187, 188, 189], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 34}}, {"id": 187, "type": "identifier", "text": "", "parent": 186, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 11}}, {"id": 188, "type": "=", "text": "=", "parent": 186, "children": [], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 13}}, {"id": 189, "type": "call_expression", "text": "_map.find(className)", "parent": 186, "children": [190, 193], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 34}}, {"id": 190, "type": "field_expression", "text": "_map.find", "parent": 189, "children": [191, 192], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 23}}, {"id": 191, "type": "identifier", "text": "_map", "parent": 190, "children": [], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 18}}, {"id": 192, "type": "field_identifier", "text": "find", "parent": 190, "children": [], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 23}}, {"id": 193, "type": "argument_list", "text": "(className)", "parent": 189, "children": [194], "start_point": {"row": 40, "column": 23}, "end_point": {"row": 40, "column": 34}}, {"id": 194, "type": "identifier", "text": "className", "parent": 193, "children": [], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 33}}, {"id": 195, "type": "if_statement", "text": "if (iter == _map.end())\n\t\t{\n\t\t\tstd::cout << \"ComponentFactory Create failed. can't find component. className:\" << className.c_str() << std::endl;\n\t\t\treturn nullptr;\n\t\t}", "parent": 162, "children": [196], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 45, "column": 3}}, {"id": 196, "type": "parenthesized_expression", "text": "(iter == _map.end())", "parent": 195, "children": [197], "start_point": {"row": 41, "column": 5}, "end_point": {"row": 41, "column": 25}}, {"id": 197, "type": "binary_expression", "text": "iter == _map.end()", "parent": 196, "children": [198, 199, 200], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 24}}, {"id": 198, "type": "identifier", "text": "iter", "parent": 197, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 10}}, {"id": 199, "type": "==", "text": "==", "parent": 197, "children": [], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 13}}, {"id": 200, "type": "call_expression", "text": "_map.end()", "parent": 197, "children": [201, 203], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 24}}, {"id": 201, "type": "field_expression", "text": "_map.end", "parent": 200, "children": [202], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 22}}, {"id": 202, "type": "identifier", "text": "_map", "parent": 201, "children": [], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 18}}, {"id": 203, "type": "argument_list", "text": "()", "parent": 200, "children": [], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 24}}, {"id": 204, "type": "labeled_statement", "text": "std::cout << \"ComponentFactory Create failed. can't find component. className:\" << className.c_str() << std::endl;", "parent": 195, "children": [205, 206], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 117}}, {"id": 205, "type": "statement_identifier", "text": "std", "parent": 204, "children": [], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 6}}, {"id": 206, "type": "ERROR", "text": "::cout << \"ComponentFactory Create failed. can't find component. className:\" << className.c_str() << std:", "parent": 204, "children": [207], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 111}}, {"id": 207, "type": "binary_expression", "text": "cout << \"ComponentFactory Create failed. can't find component. className:\" << className.c_str() << std", "parent": 206, "children": [208, 219, 220], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 110}}, {"id": 208, "type": "binary_expression", "text": "cout << \"ComponentFactory Create failed. can't find component. className:\" << className.c_str()", "parent": 207, "children": [209, 213, 214], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 103}}, {"id": 209, "type": "binary_expression", "text": "cout << \"ComponentFactory Create failed. can't find component. className:\"", "parent": 208, "children": [210, 211, 212], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 82}}, {"id": 210, "type": "identifier", "text": "cout", "parent": 209, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 12}}, {"id": 211, "type": "<<", "text": "<<", "parent": 209, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 15}}, {"id": 212, "type": "string_literal", "text": "\"ComponentFactory Create failed. can't find component. className:\"", "parent": 209, "children": [], "start_point": {"row": 43, "column": 16}, "end_point": {"row": 43, "column": 82}}, {"id": 213, "type": "<<", "text": "<<", "parent": 208, "children": [], "start_point": {"row": 43, "column": 83}, "end_point": {"row": 43, "column": 85}}, {"id": 214, "type": "call_expression", "text": "className.c_str()", "parent": 208, "children": [215, 218], "start_point": {"row": 43, "column": 86}, "end_point": {"row": 43, "column": 103}}, {"id": 215, "type": "field_expression", "text": "className.c_str", "parent": 214, "children": [216, 217], "start_point": {"row": 43, "column": 86}, "end_point": {"row": 43, "column": 101}}, {"id": 216, "type": "identifier", "text": "className", "parent": 215, "children": [], "start_point": {"row": 43, "column": 86}, "end_point": {"row": 43, "column": 95}}, {"id": 217, "type": "field_identifier", "text": "c_str", "parent": 215, "children": [], "start_point": {"row": 43, "column": 96}, "end_point": {"row": 43, "column": 101}}, {"id": 218, "type": "argument_list", "text": "()", "parent": 214, "children": [], "start_point": {"row": 43, "column": 101}, "end_point": {"row": 43, "column": 103}}, {"id": 219, "type": "<<", "text": "<<", "parent": 207, "children": [], "start_point": {"row": 43, "column": 104}, "end_point": {"row": 43, "column": 106}}, {"id": 220, "type": "identifier", "text": "std", "parent": 207, "children": [], "start_point": {"row": 43, "column": 107}, "end_point": {"row": 43, "column": 110}}, {"id": 221, "type": "identifier", "text": "endl", "parent": 204, "children": [], "start_point": {"row": 43, "column": 112}, "end_point": {"row": 43, "column": 116}}, {"id": 222, "type": "return_statement", "text": "return nullptr;", "parent": 195, "children": [223], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 18}}, {"id": 223, "type": "null", "text": "nullptr", "parent": 222, "children": [224], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 17}}, {"id": 224, "type": "nullptr", "text": "nullptr", "parent": 223, "children": [], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 17}}, {"id": 225, "type": "declaration", "text": "auto fun = iter->second;", "parent": 162, "children": [226, 228, 229], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 26}}, {"id": 226, "type": "storage_class_specifier", "text": "auto", "parent": 225, "children": [227], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 6}}, {"id": 227, "type": "auto", "text": "auto", "parent": 226, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 6}}, {"id": 228, "type": "type_identifier", "text": "fun", "parent": 225, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 10}}, {"id": 229, "type": "init_declarator", "text": " = iter->second", "parent": 225, "children": [230, 231, 232], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 25}}, {"id": 230, "type": "identifier", "text": "", "parent": 229, "children": [], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 10}}, {"id": 231, "type": "=", "text": "=", "parent": 229, "children": [], "start_point": {"row": 46, "column": 11}, "end_point": {"row": 46, "column": 12}}, {"id": 232, "type": "field_expression", "text": "iter->second", "parent": 229, "children": [233, 234], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 25}}, {"id": 233, "type": "identifier", "text": "iter", "parent": 232, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 17}}, {"id": 234, "type": "field_identifier", "text": "second", "parent": 232, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 25}}, {"id": 235, "type": "call_expression", "text": "_lock.unlock()", "parent": 162, "children": [236, 239], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 16}}, {"id": 236, "type": "field_expression", "text": "_lock.unlock", "parent": 235, "children": [237, 238], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 14}}, {"id": 237, "type": "identifier", "text": "_lock", "parent": 236, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 7}}, {"id": 238, "type": "field_identifier", "text": "unlock", "parent": 236, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 14}}, {"id": 239, "type": "argument_list", "text": "()", "parent": 235, "children": [], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 16}}, {"id": 240, "type": "return_statement", "text": "return fun(std::forward<Targs>(args)...);", "parent": 162, "children": [241], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 43}}, {"id": 241, "type": "call_expression", "text": "fun(std::forward<Targs>(args)...)", "parent": 240, "children": [242, 243], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 42}}, {"id": 242, "type": "identifier", "text": "fun", "parent": 241, "children": [], "start_point": {"row": 49, "column": 9}, "end_point": {"row": 49, "column": 12}}, {"id": 243, "type": "argument_list", "text": "(std::forward<Targs>(args)...)", "parent": 241, "children": [244, 246], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 42}}, {"id": 244, "type": "ERROR", "text": "std::", "parent": 243, "children": [245], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 18}}, {"id": 245, "type": "identifier", "text": "std", "parent": 244, "children": [], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 16}}, {"id": 246, "type": "binary_expression", "text": "forward<Targs>(args)", "parent": 243, "children": [247, 251, 252], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 38}}, {"id": 247, "type": "binary_expression", "text": "forward<Targs", "parent": 246, "children": [248, 249, 250], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 31}}, {"id": 248, "type": "identifier", "text": "forward", "parent": 247, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 25}}, {"id": 249, "type": "<", "text": "<", "parent": 247, "children": [], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 26}}, {"id": 250, "type": "identifier", "text": "Targs", "parent": 247, "children": [], "start_point": {"row": 49, "column": 26}, "end_point": {"row": 49, "column": 31}}, {"id": 251, "type": ">", "text": ">", "parent": 246, "children": [], "start_point": {"row": 49, "column": 31}, "end_point": {"row": 49, "column": 32}}, {"id": 252, "type": "parenthesized_expression", "text": "(args)", "parent": 246, "children": [253], "start_point": {"row": 49, "column": 32}, "end_point": {"row": 49, "column": 38}}, {"id": 253, "type": "identifier", "text": "args", "parent": 252, "children": [], "start_point": {"row": 49, "column": 33}, "end_point": {"row": 49, "column": 37}}, {"id": 254, "type": "labeled_statement", "text": "private:\n\tstatic ComponentFactory<Targs...>* _pInstance;", "parent": null, "children": [255], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 53, "column": 47}}, {"id": 255, "type": "declaration", "text": "static ComponentFactory<Targs...>* _pInstance;", "parent": 254, "children": [256, 257, 261], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 47}}, {"id": 256, "type": "type_identifier", "text": "ComponentFactory", "parent": 255, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 24}}, {"id": 257, "type": "ERROR", "text": "<Targs...>", "parent": 255, "children": [258, 259, 260], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 34}}, {"id": 258, "type": "<", "text": "<", "parent": 257, "children": [], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 25}}, {"id": 259, "type": "identifier", "text": "Targs", "parent": 257, "children": [], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 30}}, {"id": 260, "type": ">", "text": ">", "parent": 257, "children": [], "start_point": {"row": 53, "column": 33}, "end_point": {"row": 53, "column": 34}}, {"id": 261, "type": "pointer_declarator", "text": "* _pInstance", "parent": 255, "children": [262, 263], "start_point": {"row": 53, "column": 34}, "end_point": {"row": 53, "column": 46}}, {"id": 262, "type": "*", "text": "*", "parent": 261, "children": [], "start_point": {"row": 53, "column": 34}, "end_point": {"row": 53, "column": 35}}, {"id": 263, "type": "identifier", "text": "_pInstance", "parent": 261, "children": [], "start_point": {"row": 53, "column": 36}, "end_point": {"row": 53, "column": 46}}, {"id": 264, "type": "labeled_statement", "text": "std::map<std::string, FactoryFunction> _map;", "parent": null, "children": [265, 266], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 45}}, {"id": 265, "type": "statement_identifier", "text": "std", "parent": 264, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 4}}, {"id": 266, "type": "ERROR", "text": "::map<std:", "parent": 264, "children": [267], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 14}}, {"id": 267, "type": "binary_expression", "text": "map<std", "parent": 266, "children": [268, 269, 270], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 13}}, {"id": 268, "type": "identifier", "text": "map", "parent": 267, "children": [], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 9}}, {"id": 269, "type": "<", "text": "<", "parent": 267, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 10}}, {"id": 270, "type": "identifier", "text": "std", "parent": 267, "children": [], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 13}}, {"id": 271, "type": "comma_expression", "text": "string, FactoryFunction> _map", "parent": 264, "children": [272, 273], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 44}}, {"id": 272, "type": "identifier", "text": "string", "parent": 271, "children": [], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 21}}, {"id": 273, "type": "binary_expression", "text": "FactoryFunction> _map", "parent": 271, "children": [274, 275, 276], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 44}}, {"id": 274, "type": "identifier", "text": "FactoryFunction", "parent": 273, "children": [], "start_point": {"row": 55, "column": 23}, "end_point": {"row": 55, "column": 38}}, {"id": 275, "type": ">", "text": ">", "parent": 273, "children": [], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 39}}, {"id": 276, "type": "identifier", "text": "_map", "parent": 273, "children": [], "start_point": {"row": 55, "column": 40}, "end_point": {"row": 55, "column": 44}}, {"id": 277, "type": "labeled_statement", "text": "std::mutex _lock;", "parent": null, "children": [278, 279], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 18}}, {"id": 278, "type": "statement_identifier", "text": "std", "parent": 277, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 4}}, {"id": 279, "type": "declaration", "text": "mutex _lock;", "parent": 277, "children": [280, 281], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 18}}, {"id": 280, "type": "type_identifier", "text": "mutex", "parent": 279, "children": [], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 11}}, {"id": 281, "type": "identifier", "text": "_lock", "parent": 279, "children": [], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 17}}, {"id": 282, "type": "update_expression", "text": "template<typename ...Targs>\nComponentFactory<Targs...>* ComponentFactory<Targs...>::_pInstance = nullptr", "parent": null, "children": [283, 310], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 61, "column": 76}}, {"id": 283, "type": "binary_expression", "text": "template<typename ...Targs>\nComponentFactory<Targs...>* ComponentFactory<Targs...>::_pInstance = nullptr", "parent": 282, "children": [284, 304, 305], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 61, "column": 76}}, {"id": 284, "type": "binary_expression", "text": "template<typename ...Targs>\nComponentFactory<Targs...>* ComponentFactory<Targs", "parent": 283, "children": [285, 302, 303], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 61, "column": 50}}, {"id": 285, "type": "binary_expression", "text": "template<typename ...Targs>\nComponentFactory<Targs...>* ComponentFactory", "parent": 284, "children": [286, 298, 299], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 61, "column": 44}}, {"id": 286, "type": "binary_expression", "text": "template<typename ...Targs>\nComponentFactory<Targs", "parent": 285, "children": [287, 296, 297], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 61, "column": 22}}, {"id": 287, "type": "binary_expression", "text": "template<typename ...Targs>\nComponentFactory", "parent": 286, "children": [288, 292, 294, 295], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 61, "column": 16}}, {"id": 288, "type": "binary_expression", "text": "template<typename", "parent": 287, "children": [289, 290, 291], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 17}}, {"id": 289, "type": "identifier", "text": "template", "parent": 288, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 8}}, {"id": 290, "type": "<", "text": "<", "parent": 288, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 9}}, {"id": 291, "type": "identifier", "text": "typename", "parent": 288, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 17}}, {"id": 292, "type": "ERROR", "text": "...Targs", "parent": 287, "children": [293], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 26}}, {"id": 293, "type": "identifier", "text": "Targs", "parent": 292, "children": [], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 26}}, {"id": 294, "type": ">", "text": ">", "parent": 287, "children": [], "start_point": {"row": 60, "column": 26}, "end_point": {"row": 60, "column": 27}}, {"id": 295, "type": "identifier", "text": "ComponentFactory", "parent": 287, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 16}}, {"id": 296, "type": "<", "text": "<", "parent": 286, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 17}}, {"id": 297, "type": "identifier", "text": "Targs", "parent": 286, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 22}}, {"id": 298, "type": ">", "text": ">", "parent": 285, "children": [], "start_point": {"row": 61, "column": 25}, "end_point": {"row": 61, "column": 26}}, {"id": 299, "type": "pointer_expression", "text": "* ComponentFactory", "parent": 285, "children": [300, 301], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 44}}, {"id": 300, "type": "*", "text": "*", "parent": 299, "children": [], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 27}}, {"id": 301, "type": "identifier", "text": "ComponentFactory", "parent": 299, "children": [], "start_point": {"row": 61, "column": 28}, "end_point": {"row": 61, "column": 44}}, {"id": 302, "type": "<", "text": "<", "parent": 284, "children": [], "start_point": {"row": 61, "column": 44}, "end_point": {"row": 61, "column": 45}}, {"id": 303, "type": "identifier", "text": "Targs", "parent": 284, "children": [], "start_point": {"row": 61, "column": 45}, "end_point": {"row": 61, "column": 50}}, {"id": 304, "type": ">", "text": ">", "parent": 283, "children": [], "start_point": {"row": 61, "column": 53}, "end_point": {"row": 61, "column": 54}}, {"id": 305, "type": "assignment_expression", "text": "_pInstance = nullptr", "parent": 283, "children": [306, 307, 308], "start_point": {"row": 61, "column": 56}, "end_point": {"row": 61, "column": 76}}, {"id": 306, "type": "identifier", "text": "_pInstance", "parent": 305, "children": [], "start_point": {"row": 61, "column": 56}, "end_point": {"row": 61, "column": 66}}, {"id": 307, "type": "=", "text": "=", "parent": 305, "children": [], "start_point": {"row": 61, "column": 67}, "end_point": {"row": 61, "column": 68}}, {"id": 308, "type": "null", "text": "nullptr", "parent": 305, "children": [309], "start_point": {"row": 61, "column": 69}, "end_point": {"row": 61, "column": 76}}, {"id": 309, "type": "nullptr", "text": "nullptr", "parent": 308, "children": [], "start_point": {"row": 61, "column": 69}, "end_point": {"row": 61, "column": 76}}, {"id": 310, "type": "--", "text": "", "parent": 282, "children": [], "start_point": {"row": 61, "column": 76}, "end_point": {"row": 61, "column": 76}}]}, "node_categories": {"declarations": {"functions": [39, 47, 68, 70, 125, 127, 162, 166], "variables": [73, 78, 130, 169, 174, 182, 225, 255, 279], "classes": [183, 226], "imports": [3, 4, 6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [16, 17, 29, 30, 32, 35, 51, 52, 60, 84, 88, 91, 96, 97, 98, 99, 105, 106, 111, 112, 118, 138, 142, 145, 150, 151, 152, 158, 159, 177, 178, 189, 190, 196, 197, 200, 201, 207, 208, 209, 214, 215, 232, 235, 236, 241, 246, 247, 252, 267, 271, 273, 282, 283, 284, 285, 286, 287, 288, 299], "assignments": [57, 305], "loops": [], "conditionals": [18, 20, 22, 24, 27, 28, 33, 36, 38, 40, 43, 48, 50, 53, 58, 61, 63, 67, 71, 74, 76, 77, 79, 80, 82, 85, 87, 89, 92, 94, 95, 100, 101, 103, 107, 113, 114, 117, 119, 121, 122, 128, 131, 133, 134, 136, 139, 141, 143, 146, 148, 153, 154, 156, 160, 163, 167, 170, 172, 173, 175, 176, 179, 180, 185, 187, 191, 192, 194, 195, 198, 202, 205, 210, 216, 217, 220, 221, 228, 230, 233, 234, 237, 238, 242, 245, 248, 250, 253, 256, 259, 263, 265, 268, 270, 272, 274, 276, 278, 280, 281, 289, 291, 293, 295, 297, 301, 303, 306], "returns": [66, 109, 123, 149, 222, 240], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 14, 212], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "static ComponentFactory<Targs...>* GetInstance()\n\t{\n\t\tif (_pInstance == nullptr)\n\t\t{\n\t\t\t_pInstance ="}, {"node_id": 47, "universal_type": "function", "name": "unknown", "text_snippet": "GetInstance()"}, {"node_id": 68, "universal_type": "function", "name": "Regist", "text_snippet": "bool Regist(const std::string & className, FactoryFunction pFunc)\n\t{\n\t\tstd::lock_guard<std::mutex> g"}, {"node_id": 70, "universal_type": "function", "name": "unknown", "text_snippet": "Regist(const std::string & className, FactoryFunction pFunc)"}, {"node_id": 125, "universal_type": "function", "name": "IsRegisted", "text_snippet": "bool IsRegisted(const std::string & className)\n\t{\n\t\tstd::lock_guard<std::mutex> guard(_lock);\n\t\tretu"}, {"node_id": 127, "universal_type": "function", "name": "unknown", "text_snippet": "IsRegisted(const std::string & className)"}, {"node_id": 162, "universal_type": "function", "name": "unknown", "text_snippet": "IComponent* Create(const std::string className, Targs... args)\n\t{\n\t\t_lock.lock();\n\t\tauto iter = _map"}, {"node_id": 166, "universal_type": "function", "name": "unknown", "text_snippet": "Create(const std::string className, Targs... args)"}], "class_declarations": [{"node_id": 183, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}, {"node_id": 226, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}], "import_statements": [{"node_id": 3, "text": "#include <string>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <functional>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <map>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <iostream>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#pragma once\n#include <string>\n#include <functional>\n#include <map>\n#include <iostream>\n\ntemplate<typename ...Targs>\nclass ComponentFactory\n{\npublic:\n\ttypedef std::function <IComponent*(Targs...)> FactoryFunction;\n\n\tstatic ComponentFactory<Targs...>* GetInstance()\n\t{\n\t\tif (_pInstance == nullptr)\n\t\t{\n\t\t\t_pInstance = new ComponentFactory<Targs...>();\n\t\t}\n\t\treturn _pInstance;\n\t}\n\n\tbool Regist(const std::string & className, FactoryFunction pFunc)\n\t{\n\t\tstd::lock_guard<std::mutex> guard(_lock);\n\t\tif (_map.find(className) != _map.end())\n\t\t\treturn false;\n\n\t\t_map.insert(std::make_pair(className, pFunc));\n\t\treturn true;\n\t}\n\n\tbool IsRegisted(const std::string & className)\n\t{\n\t\tstd::lock_guard<std::mutex> guard(_lock);\n\t\treturn _map.find(className) != _map.end();\n\t}\n\n\tIComponent* Create(const std::string className, Targs... args)\n\t{\n\t\t_lock.lock();\n\t\tauto iter = _map.find(className);\n\t\tif (iter == _map.end())\n\t\t{\n\t\t\tstd::cout << \"ComponentFactory Create failed. can't find component. className:\" << className.c_str() << std::endl;\n\t\t\treturn nullptr;\n\t\t}\n\t\tauto fun = iter->second;\n\t\t_lock.unlock();\n\n\t\treturn fun(std::forward<Targs>(args)...);\n\t}\n\nprivate:\n\tstatic ComponentFactory<Targs...>* _pInstance;\n\n\tstd::map<std::string, FactoryFunction> _map;\n\n\tstd::mutex _lock;\n};\n\ntemplate<typename ...Targs>\nComponentFactory<Targs...>* ComponentFactory<Targs...>::_pInstance = nullptr;\n"}
41
c
/* This file is part of Into. * Copyright (C) Intopii 2013. * All rights reserved. * * Licensees holding a commercial Into license may use this file in * accordance with the commercial license agreement. Please see * LICENSE.commercial for commercial licensing terms. * * Alternatively, this file may be used under the terms of the GNU * Affero General Public License version 3 as published by the Free * Software Foundation. In addition, Intopii gives you special rights * to use Into as a part of open source software projects. Please * refer to LICENSE.AGPL3 for details. */ #ifndef _PIITHUMBNAILLOADER_H #define _PIITHUMBNAILLOADER_H #include <QThread> #include <QImage> #include <QMutex> #include <QStringList> #include "PiiGui.h" class PII_GUI_EXPORT PiiThumbnailLoader : public QThread { Q_OBJECT public: PiiThumbnailLoader(QObject *parent = 0); void run(); /** * Start the loading thread. */ void startLoading(); /** * Stop the loading thread. */ void stopLoading(); /** * Get the list of the file names which are waiting list. */ QStringList fileNames() const; /** * Set the given file names for the loading. If the thread is not * running, we will start it automatically. */ void setFileNames(const QStringList& fileNames); /** * Add the given file name to the loading list. If the thread is not * running, we will start it automatically. */ void addFileName(const QString& fileName); signals: /** * This signal was emitted just after we have created the thumbnail * by the file name. */ void thumbnailReady(const QString& fileName, const QImage& image); private: bool _bRunning; QMutex _loadingMutex; QStringList _lstFileNames; }; #endif //_PIITHUMBNAILLOADER_H
27.97
61
(translation_unit) "/* This file is part of Into.\n * Copyright (C) Intopii 2013.\n * All rights reserved.\n *\n * Licensees holding a commercial Into license may use this file in\n * accordance with the commercial license agreement. Please see\n * LICENSE.commercial for commercial licensing terms.\n *\n * Alternatively, this file may be used under the terms of the GNU\n * Affero General Public License version 3 as published by the Free\n * Software Foundation. In addition, Intopii gives you special rights\n * to use Into as a part of open source software projects. Please\n * refer to LICENSE.AGPL3 for details.\n */\n\n#ifndef _PIITHUMBNAILLOADER_H\n#define _PIITHUMBNAILLOADER_H\n\n#include <QThread>\n#include <QImage>\n#include <QMutex>\n#include <QStringList>\n\n#include "PiiGui.h"\n\nclass PII_GUI_EXPORT PiiThumbnailLoader : public QThread\n{\n Q_OBJECT\n\npublic:\n PiiThumbnailLoader(QObject *parent = 0);\n\n void run();\n\n /**\n * Start the loading thread.\n */\n void startLoading();\n\n /**\n * Stop the loading thread.\n */\n void stopLoading();\n\n /**\n * Get the list of the file names which are waiting list.\n */\n QStringList fileNames() const;\n\n /**\n * Set the given file names for the loading. If the thread is not\n * running, we will start it automatically.\n */\n void setFileNames(const QStringList& fileNames);\n\n /**\n * Add the given file name to the loading list. If the thread is not\n * running, we will start it automatically.\n */\n void addFileName(const QString& fileName);\n\nsignals:\n /**\n * This signal was emitted just after we have created the thumbnail\n * by the file name.\n */\n void thumbnailReady(const QString& fileName, const QImage& image);\n\nprivate:\n bool _bRunning;\n QMutex _loadingMutex;\n QStringList _lstFileNames;\n};\n\n#endif //_PIITHUMBNAILLOADER_H\n" (comment) "/* This file is part of Into.\n * Copyright (C) Intopii 2013.\n * All rights reserved.\n *\n * Licensees holding a commercial Into license may use this file in\n * accordance with the commercial license agreement. Please see\n * LICENSE.commercial for commercial licensing terms.\n *\n * Alternatively, this file may be used under the terms of the GNU\n * Affero General Public License version 3 as published by the Free\n * Software Foundation. In addition, Intopii gives you special rights\n * to use Into as a part of open source software projects. Please\n * refer to LICENSE.AGPL3 for details.\n */" (preproc_ifdef) "#ifndef _PIITHUMBNAILLOADER_H\n#define _PIITHUMBNAILLOADER_H\n\n#include <QThread>\n#include <QImage>\n#include <QMutex>\n#include <QStringList>\n\n#include "PiiGui.h"\n\nclass PII_GUI_EXPORT PiiThumbnailLoader : public QThread\n{\n Q_OBJECT\n\npublic:\n PiiThumbnailLoader(QObject *parent = 0);\n\n void run();\n\n /**\n * Start the loading thread.\n */\n void startLoading();\n\n /**\n * Stop the loading thread.\n */\n void stopLoading();\n\n /**\n * Get the list of the file names which are waiting list.\n */\n QStringList fileNames() const;\n\n /**\n * Set the given file names for the loading. If the thread is not\n * running, we will start it automatically.\n */\n void setFileNames(const QStringList& fileNames);\n\n /**\n * Add the given file name to the loading list. If the thread is not\n * running, we will start it automatically.\n */\n void addFileName(const QString& fileName);\n\nsignals:\n /**\n * This signal was emitted just after we have created the thumbnail\n * by the file name.\n */\n void thumbnailReady(const QString& fileName, const QImage& image);\n\nprivate:\n bool _bRunning;\n QMutex _loadingMutex;\n QStringList _lstFileNames;\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "_PIITHUMBNAILLOADER_H" (preproc_def) "#define _PIITHUMBNAILLOADER_H\n" (#define) "#define" (identifier) "_PIITHUMBNAILLOADER_H" (preproc_include) "#include <QThread>\n" (#include) "#include" (system_lib_string) "<QThread>" (preproc_include) "#include <QImage>\n" (#include) "#include" (system_lib_string) "<QImage>" (preproc_include) "#include <QMutex>\n" (#include) "#include" (system_lib_string) "<QMutex>" (preproc_include) "#include <QStringList>\n" (#include) "#include" (system_lib_string) "<QStringList>" (preproc_include) "#include "PiiGui.h"\n" (#include) "#include" (string_literal) ""PiiGui.h"" (") """ (string_content) "PiiGui.h" (") """ (declaration) "class PII_GUI_EXPORT" (type_identifier) "class" (identifier) "PII_GUI_EXPORT" (;) "" (labeled_statement) "PiiThumbnailLoader : public QThread\n{\n Q_OBJECT\n\npublic:\n PiiThumbnailLoader(QObject *parent = 0);\n\n void run();\n\n /**\n * Start the loading thread.\n */\n void startLoading();\n\n /**\n * Stop the loading thread.\n */\n void stopLoading();\n\n /**\n * Get the list of the file names which are waiting list.\n */\n QStringList fileNames() const;\n\n /**\n * Set the given file names for the loading. If the thread is not\n * running, we will start it automatically.\n */\n void setFileNames(const QStringList& fileNames);\n\n /**\n * Add the given file name to the loading list. If the thread is not\n * running, we will start it automatically.\n */\n void addFileName(const QString& fileName);\n\nsignals:\n /**\n * This signal was emitted just after we have created the thumbnail\n * by the file name.\n */\n void thumbnailReady(const QString& fileName, const QImage& image);\n\nprivate:\n bool _bRunning;\n QMutex _loadingMutex;\n QStringList _lstFileNames;\n}" (statement_identifier) "PiiThumbnailLoader" (:) ":" (ERROR) "public QThread" (type_identifier) "public" (identifier) "QThread" (compound_statement) "{\n Q_OBJECT\n\npublic:\n PiiThumbnailLoader(QObject *parent = 0);\n\n void run();\n\n /**\n * Start the loading thread.\n */\n void startLoading();\n\n /**\n * Stop the loading thread.\n */\n void stopLoading();\n\n /**\n * Get the list of the file names which are waiting list.\n */\n QStringList fileNames() const;\n\n /**\n * Set the given file names for the loading. If the thread is not\n * running, we will start it automatically.\n */\n void setFileNames(const QStringList& fileNames);\n\n /**\n * Add the given file name to the loading list. If the thread is not\n * running, we will start it automatically.\n */\n void addFileName(const QString& fileName);\n\nsignals:\n /**\n * This signal was emitted just after we have created the thumbnail\n * by the file name.\n */\n void thumbnailReady(const QString& fileName, const QImage& image);\n\nprivate:\n bool _bRunning;\n QMutex _loadingMutex;\n QStringList _lstFileNames;\n}" ({) "{" (declaration) "Q_OBJECT\n\npublic:\n PiiThumbnailLoader(QObject *parent = 0);" (type_identifier) "Q_OBJECT" (ERROR) "public:" (identifier) "public" (:) ":" (init_declarator) "PiiThumbnailLoader(QObject *parent = 0" (function_declarator) "PiiThumbnailLoader(QObject *parent" (identifier) "PiiThumbnailLoader" (parameter_list) "(QObject *parent" (() "(" (parameter_declaration) "QObject *parent" (type_identifier) "QObject" (pointer_declarator) "*parent" (*) "*" (identifier) "parent" ()) "" (=) "=" (number_literal) "0" (ERROR) ")" ()) ")" (;) ";" (declaration) "void run();" (primitive_type) "void" (function_declarator) "run()" (identifier) "run" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/**\n * Start the loading thread.\n */" (declaration) "void startLoading();" (primitive_type) "void" (function_declarator) "startLoading()" (identifier) "startLoading" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/**\n * Stop the loading thread.\n */" (declaration) "void stopLoading();" (primitive_type) "void" (function_declarator) "stopLoading()" (identifier) "stopLoading" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/**\n * Get the list of the file names which are waiting list.\n */" (ERROR) "QStringList fileNames() const;\n\n /**\n * Set the given file names for the loading. If the thread is not\n * running, we will start it automatically.\n */\n void setFileNames(const QStringList& fileNames);\n\n /**\n * Add the given file name to the loading list. If the thread is not\n * running, we will start it automatically.\n */\n void addFileName(const QString& fileName);\n\nsignals:\n /**\n * This signal was emitted just after we have created the thumbnail\n * by the file name.\n */\n void thumbnailReady(const QString& fileName, const QImage& image);\n\nprivate:\n bool _bRunning;\n QMutex _loadingMutex;\n QStringList _lstFileNames;" (type_identifier) "QStringList" (function_declarator) "fileNames()" (identifier) "fileNames" (parameter_list) "()" (() "(" ()) ")" (declaration) "const;\n\n /**\n * Set the given file names for the loading. If the thread is not\n * running, we will start it automatically.\n */\n void setFileNames(const QStringList& fileNames);" (type_qualifier) "const" (const) "const" (ERROR) ";" (;) ";" (comment) "/**\n * Set the given file names for the loading. If the thread is not\n * running, we will start it automatically.\n */" (primitive_type) "void" (function_declarator) "setFileNames(const QStringList& fileNames)" (identifier) "setFileNames" (parameter_list) "(const QStringList& fileNames)" (() "(" (parameter_declaration) "const QStringList& fileNames" (type_qualifier) "const" (const) "const" (type_identifier) "QStringList" (ERROR) "&" (&) "&" (identifier) "fileNames" ()) ")" (;) ";" (comment) "/**\n * Add the given file name to the loading list. If the thread is not\n * running, we will start it automatically.\n */" (declaration) "void addFileName(const QString& fileName);" (primitive_type) "void" (function_declarator) "addFileName(const QString& fileName)" (identifier) "addFileName" (parameter_list) "(const QString& fileName)" (() "(" (parameter_declaration) "const QString& fileName" (type_qualifier) "const" (const) "const" (type_identifier) "QString" (ERROR) "&" (&) "&" (identifier) "fileName" ()) ")" (;) ";" (ERROR) "signals:" (type_identifier) "signals" (:) ":" (comment) "/**\n * This signal was emitted just after we have created the thumbnail\n * by the file name.\n */" (declaration) "void thumbnailReady(const QString& fileName, const QImage& image);" (primitive_type) "void" (function_declarator) "thumbnailReady(const QString& fileName, const QImage& image)" (identifier) "thumbnailReady" (parameter_list) "(const QString& fileName, const QImage& image)" (() "(" (parameter_declaration) "const QString& fileName" (type_qualifier) "const" (const) "const" (type_identifier) "QString" (ERROR) "&" (&) "&" (identifier) "fileName" (,) "," (parameter_declaration) "const QImage& image" (type_qualifier) "const" (const) "const" (type_identifier) "QImage" (ERROR) "&" (&) "&" (identifier) "image" ()) ")" (;) ";" (ERROR) "private:" (type_identifier) "private" (:) ":" (declaration) "bool _bRunning;" (primitive_type) "bool" (identifier) "_bRunning" (;) ";" (declaration) "QMutex _loadingMutex;" (type_identifier) "QMutex" (identifier) "_loadingMutex" (;) ";" (declaration) "QStringList _lstFileNames;" (type_identifier) "QStringList" (identifier) "_lstFileNames" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "//_PIITHUMBNAILLOADER_H"
176
11
{"language": "c", "success": true, "metadata": {"lines": 61, "avg_line_length": 27.97, "nodes": 101, "errors": 0, "source_hash": "d2df0965dbc971a9a95b633d857f8aefa308abef5537a19ecd1fc6d7fed94d7f", "categorized_nodes": 74}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _PIITHUMBNAILLOADER_H\n#define _PIITHUMBNAILLOADER_H\n\n#include <QThread>\n#include <QImage>\n#include <QMutex>\n#include <QStringList>\n\n#include \"PiiGui.h\"\n\nclass PII_GUI_EXPORT PiiThumbnailLoader : public QThread\n{\n Q_OBJECT\n\npublic:\n PiiThumbnailLoader(QObject *parent = 0);\n\n void run();\n\n /**\n * Start the loading thread.\n */\n void startLoading();\n\n /**\n * Stop the loading thread.\n */\n void stopLoading();\n\n /**\n * Get the list of the file names which are waiting list.\n */\n QStringList fileNames() const;\n\n /**\n * Set the given file names for the loading. If the thread is not\n * running, we will start it automatically.\n */\n void setFileNames(const QStringList& fileNames);\n\n /**\n * Add the given file name to the loading list. If the thread is not\n * running, we will start it automatically.\n */\n void addFileName(const QString& fileName);\n\nsignals:\n /**\n * This signal was emitted just after we have created the thumbnail\n * by the file name.\n */\n void thumbnailReady(const QString& fileName, const QImage& image);\n\nprivate:\n bool _bRunning;\n QMutex _loadingMutex;\n QStringList _lstFileNames;\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 23, 100], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 74, "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": "_PIITHUMBNAILLOADER_H", "parent": 0, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 29}}, {"id": 3, "type": "preproc_def", "text": "#define _PIITHUMBNAILLOADER_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": "_PIITHUMBNAILLOADER_H", "parent": 3, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 29}}, {"id": 6, "type": "preproc_include", "text": "#include <QThread>\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": "<QThread>", "parent": 6, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <QImage>\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": "<QImage>", "parent": 9, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include <QMutex>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<QMutex>", "parent": 12, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 17}}, {"id": 15, "type": "preproc_include", "text": "#include <QStringList>\n", "parent": 0, "children": [16, 17], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<QStringList>", "parent": 15, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 22}}, {"id": 18, "type": "preproc_include", "text": "#include \"PiiGui.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": "\"PiiGui.h\"", "parent": 18, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 19}}, {"id": 21, "type": "declaration", "text": "class PII_GUI_EXPORT", "parent": 0, "children": [22], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 20}}, {"id": 22, "type": "identifier", "text": "PII_GUI_EXPORT", "parent": 21, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 20}}, {"id": 23, "type": "labeled_statement", "text": "PiiThumbnailLoader : public QThread\n{\n Q_OBJECT\n\npublic:\n PiiThumbnailLoader(QObject *parent = 0);\n\n void run();\n\n /**\n * Start the loading thread.\n */\n void startLoading();\n\n /**\n * Stop the loading thread.\n */\n void stopLoading();\n\n /**\n * Get the list of the file names which are waiting list.\n */\n QStringList fileNames() const;\n\n /**\n * Set the given file names for the loading. If the thread is not\n * running, we will start it automatically.\n */\n void setFileNames(const QStringList& fileNames);\n\n /**\n * Add the given file name to the loading list. If the thread is not\n * running, we will start it automatically.\n */\n void addFileName(const QString& fileName);\n\nsignals:\n /**\n * This signal was emitted just after we have created the thumbnail\n * by the file name.\n */\n void thumbnailReady(const QString& fileName, const QImage& image);\n\nprivate:\n bool _bRunning;\n QMutex _loadingMutex;\n QStringList _lstFileNames;\n}", "parent": 0, "children": [24, 25], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 72, "column": 1}}, {"id": 24, "type": "statement_identifier", "text": "PiiThumbnailLoader", "parent": 23, "children": [], "start_point": {"row": 25, "column": 21}, "end_point": {"row": 25, "column": 39}}, {"id": 25, "type": "ERROR", "text": "public QThread", "parent": 23, "children": [26], "start_point": {"row": 25, "column": 42}, "end_point": {"row": 25, "column": 56}}, {"id": 26, "type": "identifier", "text": "QThread", "parent": 25, "children": [], "start_point": {"row": 25, "column": 49}, "end_point": {"row": 25, "column": 56}}, {"id": 27, "type": "declaration", "text": "Q_OBJECT\n\npublic:\n PiiThumbnailLoader(QObject *parent = 0);", "parent": 23, "children": [28, 29, 30], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 30, "column": 42}}, {"id": 28, "type": "type_identifier", "text": "Q_OBJECT", "parent": 27, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 10}}, {"id": 29, "type": "ERROR", "text": "public:", "parent": 27, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 30, "type": "init_declarator", "text": "PiiThumbnailLoader(QObject *parent = 0", "parent": 27, "children": [31, 39, 40], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 40}}, {"id": 31, "type": "function_declarator", "text": "PiiThumbnailLoader(QObject *parent", "parent": 30, "children": [32, 33], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 36}}, {"id": 32, "type": "identifier", "text": "PiiThumbnailLoader", "parent": 31, "children": [], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 20}}, {"id": 33, "type": "parameter_list", "text": "(QObject *parent", "parent": 31, "children": [34], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 36}}, {"id": 34, "type": "parameter_declaration", "text": "QObject *parent", "parent": 33, "children": [35, 36], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 36}}, {"id": 35, "type": "type_identifier", "text": "QObject", "parent": 34, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 28}}, {"id": 36, "type": "pointer_declarator", "text": "*parent", "parent": 34, "children": [37, 38], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 36}}, {"id": 37, "type": "*", "text": "*", "parent": 36, "children": [], "start_point": {"row": 30, "column": 29}, "end_point": {"row": 30, "column": 30}}, {"id": 38, "type": "identifier", "text": "parent", "parent": 36, "children": [], "start_point": {"row": 30, "column": 30}, "end_point": {"row": 30, "column": 36}}, {"id": 39, "type": "=", "text": "=", "parent": 30, "children": [], "start_point": {"row": 30, "column": 37}, "end_point": {"row": 30, "column": 38}}, {"id": 40, "type": "number_literal", "text": "0", "parent": 30, "children": [], "start_point": {"row": 30, "column": 39}, "end_point": {"row": 30, "column": 40}}, {"id": 41, "type": "declaration", "text": "void run();", "parent": 23, "children": [42, 43], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 13}}, {"id": 42, "type": "primitive_type", "text": "void", "parent": 41, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 6}}, {"id": 43, "type": "function_declarator", "text": "run()", "parent": 41, "children": [44, 45], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 12}}, {"id": 44, "type": "identifier", "text": "run", "parent": 43, "children": [], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 10}}, {"id": 45, "type": "parameter_list", "text": "()", "parent": 43, "children": [], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 12}}, {"id": 46, "type": "declaration", "text": "void startLoading();", "parent": 23, "children": [47, 48], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 22}}, {"id": 47, "type": "primitive_type", "text": "void", "parent": 46, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 6}}, {"id": 48, "type": "function_declarator", "text": "startLoading()", "parent": 46, "children": [49, 50], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 21}}, {"id": 49, "type": "identifier", "text": "startLoading", "parent": 48, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 19}}, {"id": 50, "type": "parameter_list", "text": "()", "parent": 48, "children": [], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 21}}, {"id": 51, "type": "declaration", "text": "void stopLoading();", "parent": 23, "children": [52, 53], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 21}}, {"id": 52, "type": "primitive_type", "text": "void", "parent": 51, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 6}}, {"id": 53, "type": "function_declarator", "text": "stopLoading()", "parent": 51, "children": [54, 55], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 20}}, {"id": 54, "type": "identifier", "text": "stopLoading", "parent": 53, "children": [], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 18}}, {"id": 55, "type": "parameter_list", "text": "()", "parent": 53, "children": [], "start_point": {"row": 42, "column": 18}, "end_point": {"row": 42, "column": 20}}, {"id": 56, "type": "ERROR", "text": "QStringList fileNames() const;\n\n /**\n * Set the given file names for the loading. If the thread is not\n * running, we will start it automatically.\n */\n void setFileNames(const QStringList& fileNames);\n\n /**\n * Add the given file name to the loading list. If the thread is not\n * running, we will start it automatically.\n */\n void addFileName(const QString& fileName);\n\nsignals:\n /**\n * This signal was emitted just after we have created the thumbnail\n * by the file name.\n */\n void thumbnailReady(const QString& fileName, const QImage& image);\n\nprivate:\n bool _bRunning;\n QMutex _loadingMutex;\n QStringList _lstFileNames;", "parent": 23, "children": [57, 58, 61, 69, 77, 79, 90, 91, 94, 97], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 71, "column": 28}}, {"id": 57, "type": "type_identifier", "text": "QStringList", "parent": 56, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 13}}, {"id": 58, "type": "function_declarator", "text": "fileNames()", "parent": 56, "children": [59, 60], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 25}}, {"id": 59, "type": "identifier", "text": "fileNames", "parent": 58, "children": [], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 23}}, {"id": 60, "type": "parameter_list", "text": "()", "parent": 58, "children": [], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 25}}, {"id": 61, "type": "declaration", "text": "const;\n\n /**\n * Set the given file names for the loading. If the thread is not\n * running, we will start it automatically.\n */\n void setFileNames(const QStringList& fileNames);", "parent": 56, "children": [62, 63], "start_point": {"row": 47, "column": 26}, "end_point": {"row": 53, "column": 50}}, {"id": 62, "type": "primitive_type", "text": "void", "parent": 61, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 6}}, {"id": 63, "type": "function_declarator", "text": "setFileNames(const QStringList& fileNames)", "parent": 61, "children": [64, 65], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 49}}, {"id": 64, "type": "identifier", "text": "setFileNames", "parent": 63, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 19}}, {"id": 65, "type": "parameter_list", "text": "(const QStringList& fileNames)", "parent": 63, "children": [66], "start_point": {"row": 53, "column": 19}, "end_point": {"row": 53, "column": 49}}, {"id": 66, "type": "parameter_declaration", "text": "const QStringList& fileNames", "parent": 65, "children": [67, 68], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 48}}, {"id": 67, "type": "type_identifier", "text": "QStringList", "parent": 66, "children": [], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 37}}, {"id": 68, "type": "identifier", "text": "fileNames", "parent": 66, "children": [], "start_point": {"row": 53, "column": 39}, "end_point": {"row": 53, "column": 48}}, {"id": 69, "type": "declaration", "text": "void addFileName(const QString& fileName);", "parent": 56, "children": [70, 71], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 44}}, {"id": 70, "type": "primitive_type", "text": "void", "parent": 69, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 6}}, {"id": 71, "type": "function_declarator", "text": "addFileName(const QString& fileName)", "parent": 69, "children": [72, 73], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 43}}, {"id": 72, "type": "identifier", "text": "addFileName", "parent": 71, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 18}}, {"id": 73, "type": "parameter_list", "text": "(const QString& fileName)", "parent": 71, "children": [74], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 43}}, {"id": 74, "type": "parameter_declaration", "text": "const QString& fileName", "parent": 73, "children": [75, 76], "start_point": {"row": 59, "column": 19}, "end_point": {"row": 59, "column": 42}}, {"id": 75, "type": "type_identifier", "text": "QString", "parent": 74, "children": [], "start_point": {"row": 59, "column": 25}, "end_point": {"row": 59, "column": 32}}, {"id": 76, "type": "identifier", "text": "fileName", "parent": 74, "children": [], "start_point": {"row": 59, "column": 34}, "end_point": {"row": 59, "column": 42}}, {"id": 77, "type": "ERROR", "text": "signals:", "parent": 56, "children": [78], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 8}}, {"id": 78, "type": "type_identifier", "text": "signals", "parent": 77, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 7}}, {"id": 79, "type": "declaration", "text": "void thumbnailReady(const QString& fileName, const QImage& image);", "parent": 56, "children": [80, 81], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 68}}, {"id": 80, "type": "primitive_type", "text": "void", "parent": 79, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 6}}, {"id": 81, "type": "function_declarator", "text": "thumbnailReady(const QString& fileName, const QImage& image)", "parent": 79, "children": [82, 83], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 67}}, {"id": 82, "type": "identifier", "text": "thumbnailReady", "parent": 81, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 21}}, {"id": 83, "type": "parameter_list", "text": "(const QString& fileName, const QImage& image)", "parent": 81, "children": [84, 87], "start_point": {"row": 66, "column": 21}, "end_point": {"row": 66, "column": 67}}, {"id": 84, "type": "parameter_declaration", "text": "const QString& fileName", "parent": 83, "children": [85, 86], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 45}}, {"id": 85, "type": "type_identifier", "text": "QString", "parent": 84, "children": [], "start_point": {"row": 66, "column": 28}, "end_point": {"row": 66, "column": 35}}, {"id": 86, "type": "identifier", "text": "fileName", "parent": 84, "children": [], "start_point": {"row": 66, "column": 37}, "end_point": {"row": 66, "column": 45}}, {"id": 87, "type": "parameter_declaration", "text": "const QImage& image", "parent": 83, "children": [88, 89], "start_point": {"row": 66, "column": 47}, "end_point": {"row": 66, "column": 66}}, {"id": 88, "type": "type_identifier", "text": "QImage", "parent": 87, "children": [], "start_point": {"row": 66, "column": 53}, "end_point": {"row": 66, "column": 59}}, {"id": 89, "type": "identifier", "text": "image", "parent": 87, "children": [], "start_point": {"row": 66, "column": 61}, "end_point": {"row": 66, "column": 66}}, {"id": 90, "type": "ERROR", "text": "private:", "parent": 56, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 8}}, {"id": 91, "type": "declaration", "text": "bool _bRunning;", "parent": 56, "children": [92, 93], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 17}}, {"id": 92, "type": "primitive_type", "text": "bool", "parent": 91, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 6}}, {"id": 93, "type": "identifier", "text": "_bRunning", "parent": 91, "children": [], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 16}}, {"id": 94, "type": "declaration", "text": "QMutex _loadingMutex;", "parent": 56, "children": [95, 96], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 23}}, {"id": 95, "type": "type_identifier", "text": "QMutex", "parent": 94, "children": [], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 8}}, {"id": 96, "type": "identifier", "text": "_loadingMutex", "parent": 94, "children": [], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 22}}, {"id": 97, "type": "declaration", "text": "QStringList _lstFileNames;", "parent": 56, "children": [98, 99], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 28}}, {"id": 98, "type": "type_identifier", "text": "QStringList", "parent": 97, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 13}}, {"id": 99, "type": "identifier", "text": "_lstFileNames", "parent": 97, "children": [], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 27}}, {"id": 100, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 74, "column": 6}}]}, "node_categories": {"declarations": {"functions": [31, 43, 48, 53, 58, 63, 71, 81], "variables": [21, 27, 34, 41, 46, 51, 61, 66, 69, 74, 79, 84, 87, 91, 94, 97], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 22, 24, 26, 28, 32, 35, 38, 44, 49, 54, 57, 59, 64, 67, 68, 72, 75, 76, 78, 82, 85, 86, 88, 89, 93, 95, 96, 98, 99, 100], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 40], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "PiiThumbnailLoader(QObject *parent"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "run()"}, {"node_id": 48, "universal_type": "function", "name": "unknown", "text_snippet": "startLoading()"}, {"node_id": 53, "universal_type": "function", "name": "unknown", "text_snippet": "stopLoading()"}, {"node_id": 58, "universal_type": "function", "name": "unknown", "text_snippet": "fileNames()"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "setFileNames(const QStringList& fileNames)"}, {"node_id": 71, "universal_type": "function", "name": "unknown", "text_snippet": "addFileName(const QString& fileName)"}, {"node_id": 81, "universal_type": "function", "name": "unknown", "text_snippet": "thumbnailReady(const QString& fileName, const QImage& image)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <QThread>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <QImage>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <QMutex>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <QStringList>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"PiiGui.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "/* This file is part of Into.\n * Copyright (C) Intopii 2013.\n * All rights reserved.\n *\n * Licensees holding a commercial Into license may use this file in\n * accordance with the commercial license agreement. Please see\n * LICENSE.commercial for commercial licensing terms.\n *\n * Alternatively, this file may be used under the terms of the GNU\n * Affero General Public License version 3 as published by the Free\n * Software Foundation. In addition, Intopii gives you special rights\n * to use Into as a part of open source software projects. Please\n * refer to LICENSE.AGPL3 for details.\n */\n\n#ifndef _PIITHUMBNAILLOADER_H\n#define _PIITHUMBNAILLOADER_H\n\n#include <QThread>\n#include <QImage>\n#include <QMutex>\n#include <QStringList>\n\n#include \"PiiGui.h\"\n\nclass PII_GUI_EXPORT PiiThumbnailLoader : public QThread\n{\n Q_OBJECT\n\npublic:\n PiiThumbnailLoader(QObject *parent = 0);\n\n void run();\n\n /**\n * Start the loading thread.\n */\n void startLoading();\n\n /**\n * Stop the loading thread.\n */\n void stopLoading();\n\n /**\n * Get the list of the file names which are waiting list.\n */\n QStringList fileNames() const;\n\n /**\n * Set the given file names for the loading. If the thread is not\n * running, we will start it automatically.\n */\n void setFileNames(const QStringList& fileNames);\n\n /**\n * Add the given file name to the loading list. If the thread is not\n * running, we will start it automatically.\n */\n void addFileName(const QString& fileName);\n\nsignals:\n /**\n * This signal was emitted just after we have created the thumbnail\n * by the file name.\n */\n void thumbnailReady(const QString& fileName, const QImage& image);\n\nprivate:\n bool _bRunning;\n QMutex _loadingMutex;\n QStringList _lstFileNames;\n};\n\n#endif //_PIITHUMBNAILLOADER_H\n"}
42
c
#include <assert.h> #include "ps4.h" #define DEBUG_SOCKET #include "defines.h" #include "pup.h" const uint8_t pup_signature[] = { 0x4F, 0x15, 0x3D, 0x1D }; CHECK_SIZE(pup_file_header, 16); CHECK_SIZE(pup_header, 32); CHECK_SIZE(pup_segment, 32); CHECK_SIZE(pup_block_info, 8);
26.7
10
(translation_unit) "#include <assert.h>\n\n#include "ps4.h"\n\n#define DEBUG_SOCKET\n#include "defines.h"\n\n#include "pup.h"\n\nconst uint8_t pup_signature[] = { 0x4F, 0x15, 0x3D, 0x1D };\n\nCHECK_SIZE(pup_file_header, 16);\nCHECK_SIZE(pup_header, 32);\nCHECK_SIZE(pup_segment, 32);\nCHECK_SIZE(pup_block_info, 8);\n" (preproc_include) "#include <assert.h>\n" (#include) "#include" (system_lib_string) "<assert.h>" (preproc_include) "#include "ps4.h"\n" (#include) "#include" (string_literal) ""ps4.h"" (") """ (string_content) "ps4.h" (") """ (preproc_def) "#define DEBUG_SOCKET\n" (#define) "#define" (identifier) "DEBUG_SOCKET" (preproc_include) "#include "defines.h"\n" (#include) "#include" (string_literal) ""defines.h"" (") """ (string_content) "defines.h" (") """ (preproc_include) "#include "pup.h"\n" (#include) "#include" (string_literal) ""pup.h"" (") """ (string_content) "pup.h" (") """ (declaration) "const uint8_t pup_signature[] = { 0x4F, 0x15, 0x3D, 0x1D };" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (init_declarator) "pup_signature[] = { 0x4F, 0x15, 0x3D, 0x1D }" (array_declarator) "pup_signature[]" (identifier) "pup_signature" ([) "[" (]) "]" (=) "=" (initializer_list) "{ 0x4F, 0x15, 0x3D, 0x1D }" ({) "{" (number_literal) "0x4F" (,) "," (number_literal) "0x15" (,) "," (number_literal) "0x3D" (,) "," (number_literal) "0x1D" (}) "}" (;) ";" (expression_statement) "CHECK_SIZE(pup_file_header, 16);" (call_expression) "CHECK_SIZE(pup_file_header, 16)" (identifier) "CHECK_SIZE" (argument_list) "(pup_file_header, 16)" (() "(" (identifier) "pup_file_header" (,) "," (number_literal) "16" ()) ")" (;) ";" (expression_statement) "CHECK_SIZE(pup_header, 32);" (call_expression) "CHECK_SIZE(pup_header, 32)" (identifier) "CHECK_SIZE" (argument_list) "(pup_header, 32)" (() "(" (identifier) "pup_header" (,) "," (number_literal) "32" ()) ")" (;) ";" (expression_statement) "CHECK_SIZE(pup_segment, 32);" (call_expression) "CHECK_SIZE(pup_segment, 32)" (identifier) "CHECK_SIZE" (argument_list) "(pup_segment, 32)" (() "(" (identifier) "pup_segment" (,) "," (number_literal) "32" ()) ")" (;) ";" (expression_statement) "CHECK_SIZE(pup_block_info, 8);" (call_expression) "CHECK_SIZE(pup_block_info, 8)" (identifier) "CHECK_SIZE" (argument_list) "(pup_block_info, 8)" (() "(" (identifier) "pup_block_info" (,) "," (number_literal) "8" ()) ")" (;) ";"
86
0
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 26.7, "nodes": 46, "errors": 0, "source_hash": "c5eb6e4d590f77b04958176a3b2a0c7019ea70867440b8ad7e03b3dc8dac2f4c", "categorized_nodes": 35}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <assert.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": "<assert.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include \"ps4.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": "\"ps4.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 16}}, {"id": 6, "type": "preproc_def", "text": "#define DEBUG_SOCKET\n", "parent": null, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 8, "type": "identifier", "text": "DEBUG_SOCKET", "parent": 6, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 20}}, {"id": 9, "type": "preproc_include", "text": "#include \"defines.h\"\n", "parent": null, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"defines.h\"", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 20}}, {"id": 12, "type": "preproc_include", "text": "#include \"pup.h\"\n", "parent": null, "children": [13, 14], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"pup.h\"", "parent": 12, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 16}}, {"id": 15, "type": "declaration", "text": "const uint8_t pup_signature[] = { 0x4F, 0x15, 0x3D, 0x1D };", "parent": null, "children": [16, 17], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 59}}, {"id": 16, "type": "primitive_type", "text": "uint8_t", "parent": 15, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 13}}, {"id": 17, "type": "init_declarator", "text": "pup_signature[] = { 0x4F, 0x15, 0x3D, 0x1D }", "parent": 15, "children": [18, 20, 21], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 58}}, {"id": 18, "type": "array_declarator", "text": "pup_signature[]", "parent": 17, "children": [19], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 29}}, {"id": 19, "type": "identifier", "text": "pup_signature", "parent": 18, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 27}}, {"id": 20, "type": "=", "text": "=", "parent": 17, "children": [], "start_point": {"row": 9, "column": 30}, "end_point": {"row": 9, "column": 31}}, {"id": 21, "type": "initializer_list", "text": "{ 0x4F, 0x15, 0x3D, 0x1D }", "parent": 17, "children": [22, 23, 24, 25], "start_point": {"row": 9, "column": 32}, "end_point": {"row": 9, "column": 58}}, {"id": 22, "type": "number_literal", "text": "0x4F", "parent": 21, "children": [], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 38}}, {"id": 23, "type": "number_literal", "text": "0x15", "parent": 21, "children": [], "start_point": {"row": 9, "column": 40}, "end_point": {"row": 9, "column": 44}}, {"id": 24, "type": "number_literal", "text": "0x3D", "parent": 21, "children": [], "start_point": {"row": 9, "column": 46}, "end_point": {"row": 9, "column": 50}}, {"id": 25, "type": "number_literal", "text": "0x1D", "parent": 21, "children": [], "start_point": {"row": 9, "column": 52}, "end_point": {"row": 9, "column": 56}}, {"id": 26, "type": "call_expression", "text": "CHECK_SIZE(pup_file_header, 16)", "parent": null, "children": [27, 28], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 31}}, {"id": 27, "type": "identifier", "text": "CHECK_SIZE", "parent": 26, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 10}}, {"id": 28, "type": "argument_list", "text": "(pup_file_header, 16)", "parent": 26, "children": [29, 30], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 31}}, {"id": 29, "type": "identifier", "text": "pup_file_header", "parent": 28, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 26}}, {"id": 30, "type": "number_literal", "text": "16", "parent": 28, "children": [], "start_point": {"row": 11, "column": 28}, "end_point": {"row": 11, "column": 30}}, {"id": 31, "type": "call_expression", "text": "CHECK_SIZE(pup_header, 32)", "parent": null, "children": [32, 33], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 26}}, {"id": 32, "type": "identifier", "text": "CHECK_SIZE", "parent": 31, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 10}}, {"id": 33, "type": "argument_list", "text": "(pup_header, 32)", "parent": 31, "children": [34, 35], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 26}}, {"id": 34, "type": "identifier", "text": "pup_header", "parent": 33, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 21}}, {"id": 35, "type": "number_literal", "text": "32", "parent": 33, "children": [], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 25}}, {"id": 36, "type": "call_expression", "text": "CHECK_SIZE(pup_segment, 32)", "parent": null, "children": [37, 38], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 27}}, {"id": 37, "type": "identifier", "text": "CHECK_SIZE", "parent": 36, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 10}}, {"id": 38, "type": "argument_list", "text": "(pup_segment, 32)", "parent": 36, "children": [39, 40], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 27}}, {"id": 39, "type": "identifier", "text": "pup_segment", "parent": 38, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 22}}, {"id": 40, "type": "number_literal", "text": "32", "parent": 38, "children": [], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 26}}, {"id": 41, "type": "call_expression", "text": "CHECK_SIZE(pup_block_info, 8)", "parent": null, "children": [42, 43], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 29}}, {"id": 42, "type": "identifier", "text": "CHECK_SIZE", "parent": 41, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 10}}, {"id": 43, "type": "argument_list", "text": "(pup_block_info, 8)", "parent": 41, "children": [44, 45], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 29}}, {"id": 44, "type": "identifier", "text": "pup_block_info", "parent": 43, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 25}}, {"id": 45, "type": "number_literal", "text": "8", "parent": 43, "children": [], "start_point": {"row": 14, "column": 27}, "end_point": {"row": 14, "column": 28}}]}, "node_categories": {"declarations": {"functions": [], "variables": [15], "classes": [], "imports": [0, 1, 3, 4, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [26, 31, 36, 41], "assignments": [], "loops": [], "conditionals": [8, 19, 27, 29, 32, 34, 37, 39, 42, 44], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 11, 14, 22, 23, 24, 25, 30, 35, 40, 45], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <assert.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"ps4.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 9, "text": "#include \"defines.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"pup.h\"\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "#include <assert.h>\n\n#include \"ps4.h\"\n\n#define DEBUG_SOCKET\n#include \"defines.h\"\n\n#include \"pup.h\"\n\nconst uint8_t pup_signature[] = { 0x4F, 0x15, 0x3D, 0x1D };\n\nCHECK_SIZE(pup_file_header, 16);\nCHECK_SIZE(pup_header, 32);\nCHECK_SIZE(pup_segment, 32);\nCHECK_SIZE(pup_block_info, 8);\n"}
43
c
// // ZSInputSource.h // ZSDemo // // Created by zhixiong.sheng on 16/2/22. // Copyright © 2016年 盛志雄. All rights reserved. // #import <Foundation/Foundation.h> @interface ZSInputSource : NSObject - (void)fireInputSourceOnRunLoop:(CFRunLoopRef)runLoopRef; - (void)addToRunLopp:(CFRunLoopRef)runLoopRef; @end
24.92
12
(translation_unit) "//\n// ZSInputSource.h\n// ZSDemo\n//\n// Created by zhixiong.sheng on 16/2/22.\n// Copyright © 2016年 盛志雄. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface ZSInputSource : NSObject\n\n- (void)fireInputSourceOnRunLoop:(CFRunLoopRef)runLoopRef;\n- (void)addToRunLopp:(CFRunLoopRef)runLoopRef;\n@end\n" (comment) "//" (comment) "// ZSInputSource.h" (comment) "// ZSDemo" (comment) "//" (comment) "// Created by zhixiong.sheng on 16/2/22." (comment) "// Copyright © 2016年 盛志雄. All rights reserved.\n//\n\n#imp" (comment) "rt" (preproc_call) "Foundation/Foundation.h>\n\n@interfa" (preproc_directive) "Foundat" (preproc_arg) "on/Foundation.h>\n\n@interf" (ERROR) "e ZSInputSource : NSObject\n\n- (void)fireInputSourceOnRunLoop:(CFRunLoop" (ERROR) "e" (type_identifier) " ZSInputS" (identifier) "urce : NSObje" (:) "t" (identifier) "\n- (void" (unary_expression) "ireInputSourceOnRunLoop:(CFRunLo" (-) "i" (cast_expression) "eInputSourceOnRunLoop:(CFRunLo" (() "e" (type_descriptor) "Inpu" (primitive_type) "Inpu" ()) "t" (identifier) "SourceOnRunLoop:(CFRunLo" (:) "o" (() "p" (declaration) "Ref)runLoopRef;\n- (void)" (type_identifier) "Ref)runLoopR" (ERROR) "e" ()) "e" (identifier) "f;\n- (void" (;) ")" (expression_statement) "ddToRunLopp:(CFRunLoopRef)runLoopRef;\n@end\n" (unary_expression) "ddToRunLopp:(CFRunLo" (-) "d" (cast_expression) "ToRunLopp:(CFRunLo" (() "T" (type_descriptor) "oRun" (primitive_type) "oRun" ()) "L" (identifier) "opp:(CFRunLo" (ERROR) "opRef)runLoopRef;\n@end\n" (:) "o" (() "p" (identifier) "Ref)runLoopR" ()) "e" (identifier) "f;\n@end\n" (;) "" (ERROR) "" (ERROR) "" (expression_statement) "" (identifier) "" (;) ""
54
6
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 24.92, "nodes": 30, "errors": 0, "source_hash": "250ff5280c90c327322b07bff9329240f897821cda149206ea65853beba0dbbd", "categorized_nodes": 16}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "Foundation/Foundation.h>\n\n@interfa", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "Foundat", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "on/Foundation.h>\n\n@interf", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 3, "type": "ERROR", "text": "e ZSInputSource : NSObject\n\n- (void)fireInputSourceOnRunLoop:(CFRunLoop", "parent": null, "children": [4, 5, 6, 7, 8], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 12, "column": 34}}, {"id": 4, "type": "ERROR", "text": "e", "parent": 3, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 5, "type": "type_identifier", "text": " ZSInputS", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "identifier", "text": "urce : NSObje", "parent": 3, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 24}}, {"id": 7, "type": "identifier", "text": "\n- (void", "parent": 3, "children": [], "start_point": {"row": 10, "column": 27}, "end_point": {"row": 10, "column": 35}}, {"id": 8, "type": "unary_expression", "text": "ireInputSourceOnRunLoop:(CFRunLo", "parent": 3, "children": [9, 10], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 32}}, {"id": 9, "type": "-", "text": "i", "parent": 8, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 10, "type": "cast_expression", "text": "eInputSourceOnRunLoop:(CFRunLo", "parent": 8, "children": [11, 13], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 32}}, {"id": 11, "type": "type_descriptor", "text": "Inpu", "parent": 10, "children": [12], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 7}}, {"id": 12, "type": "primitive_type", "text": "Inpu", "parent": 11, "children": [], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 7}}, {"id": 13, "type": "identifier", "text": "SourceOnRunLoop:(CFRunLo", "parent": 10, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 32}}, {"id": 14, "type": "declaration", "text": "Ref)runLoopRef;\n- (void)", "parent": null, "children": [15, 16, 17], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 58}}, {"id": 15, "type": "type_identifier", "text": "Ref)runLoopR", "parent": 14, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 46}}, {"id": 16, "type": "ERROR", "text": "e", "parent": 14, "children": [], "start_point": {"row": 12, "column": 46}, "end_point": {"row": 12, "column": 47}}, {"id": 17, "type": "identifier", "text": "f;\n- (void", "parent": 14, "children": [], "start_point": {"row": 12, "column": 47}, "end_point": {"row": 12, "column": 57}}, {"id": 18, "type": "unary_expression", "text": "ddToRunLopp:(CFRunLo", "parent": null, "children": [19, 20], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 20}}, {"id": 19, "type": "-", "text": "d", "parent": 18, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 20, "type": "cast_expression", "text": "ToRunLopp:(CFRunLo", "parent": 18, "children": [21, 23], "start_point": {"row": 13, "column": 2}, "end_point": {"row": 13, "column": 20}}, {"id": 21, "type": "type_descriptor", "text": "oRun", "parent": 20, "children": [22], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 7}}, {"id": 22, "type": "primitive_type", "text": "oRun", "parent": 21, "children": [], "start_point": {"row": 13, "column": 3}, "end_point": {"row": 13, "column": 7}}, {"id": 23, "type": "identifier", "text": "opp:(CFRunLo", "parent": 20, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 20}}, {"id": 24, "type": "ERROR", "text": "opRef)runLoopRef;\n@end\n", "parent": null, "children": [25, 26], "start_point": {"row": 13, "column": 20}, "end_point": {"row": 13, "column": 45}}, {"id": 25, "type": "identifier", "text": "Ref)runLoopR", "parent": 24, "children": [], "start_point": {"row": 13, "column": 22}, "end_point": {"row": 13, "column": 34}}, {"id": 26, "type": "identifier", "text": "f;\n@end\n", "parent": 24, "children": [], "start_point": {"row": 13, "column": 35}, "end_point": {"row": 13, "column": 45}}, {"id": 27, "type": "ERROR", "text": "", "parent": null, "children": [28], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 28, "type": "ERROR", "text": "", "parent": 27, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 29, "type": "identifier", "text": "", "parent": null, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [14], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [8, 10, 18, 20], "assignments": [], "loops": [], "conditionals": [5, 6, 7, 13, 15, 17, 23, 25, 26, 29], "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// ZSInputSource.h\n// ZSDemo\n//\n// Created by zhixiong.sheng on 16/2/22.\n// Copyright \u00a9 2016\u5e74 \u76db\u5fd7\u96c4. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@interface ZSInputSource : NSObject\n\n- (void)fireInputSourceOnRunLoop:(CFRunLoopRef)runLoopRef;\n- (void)addToRunLopp:(CFRunLoopRef)runLoopRef;\n@end\n"}
44
c
/* * Generated by class-dump 3.3.3 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2010 by <NAME>. */ #import "NSTableViewDataSource-Protocol.h" #import "NSTableViewDelegate-Protocol.h" @class NSButton, NSImage, NSMutableArray, NSSearchField, NSString, NSTableView, NSWindow; @interface AddressHistoryController : NSObject <NSTableViewDataSource, NSTableViewDelegate> { NSTableView *_historyTableView; NSButton *_addToAddressBookButton; NSWindow *_window; NSSearchField *_searchField; NSMutableArray *_historyRecords; NSString *_sortColumn; BOOL _sortIsAscending; NSImage *_addressBookPersonImage; } + (void)initialize; + (id)allocWithZone:(struct _NSZone *)arg1; + (id)sharedInstance; - (id)init; - (void)dealloc; - (id)retain; - (unsigned long long)retainCount; - (void)release; - (id)autorelease; - (void)showAddressHistory; - (void)addToAddressBook:(id)arg1; - (void)deleteFromHistory:(id)arg1; - (void)searchIndex:(id)arg1; - (void)search:(id)arg1; - (void)_cancelSearch:(id)arg1; - (void)windowWillClose:(id)arg1; - (void)openAddressBook:(id)arg1; - (long long)numberOfRowsInTableView:(id)arg1; - (id)tableView:(id)arg1 objectValueForTableColumn:(id)arg2 row:(long long)arg3; - (void)tableView:(id)arg1 willDisplayCell:(id)arg2 forTableColumn:(id)arg3 row:(long long)arg4; - (void)tableViewSelectionDidChange:(id)arg1; - (void)tableView:(id)arg1 didClickTableColumn:(id)arg2; - (void)_sortHistory; - (void)_showColumnSortIndicator; - (id)tableView:(id)arg1 toolTipForCell:(id)arg2 rect:(struct CGRect *)arg3 tableColumn:(id)arg4 row:(long long)arg5 mouseLocation:(struct CGPoint)arg6; @end
35.13
46
(translation_unit) "/*\n * Generated by class-dump 3.3.3 (64 bit).\n *\n * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2010 by <NAME>.\n */\n\n\n\n#import "NSTableViewDataSource-Protocol.h"\n#import "NSTableViewDelegate-Protocol.h"\n\n@class NSButton, NSImage, NSMutableArray, NSSearchField, NSString, NSTableView, NSWindow;\n\n@interface AddressHistoryController : NSObject <NSTableViewDataSource, NSTableViewDelegate>\n{\n NSTableView *_historyTableView;\n NSButton *_addToAddressBookButton;\n NSWindow *_window;\n NSSearchField *_searchField;\n NSMutableArray *_historyRecords;\n NSString *_sortColumn;\n BOOL _sortIsAscending;\n NSImage *_addressBookPersonImage;\n}\n\n+ (void)initialize;\n+ (id)allocWithZone:(struct _NSZone *)arg1;\n+ (id)sharedInstance;\n- (id)init;\n- (void)dealloc;\n- (id)retain;\n- (unsigned long long)retainCount;\n- (void)release;\n- (id)autorelease;\n- (void)showAddressHistory;\n- (void)addToAddressBook:(id)arg1;\n- (void)deleteFromHistory:(id)arg1;\n- (void)searchIndex:(id)arg1;\n- (void)search:(id)arg1;\n- (void)_cancelSearch:(id)arg1;\n- (void)windowWillClose:(id)arg1;\n- (void)openAddressBook:(id)arg1;\n- (long long)numberOfRowsInTableView:(id)arg1;\n- (id)tableView:(id)arg1 objectValueForTableColumn:(id)arg2 row:(long long)arg3;\n- (void)tableView:(id)arg1 willDisplayCell:(id)arg2 forTableColumn:(id)arg3 row:(long long)arg4;\n- (void)tableViewSelectionDidChange:(id)arg1;\n- (void)tableView:(id)arg1 didClickTableColumn:(id)arg2;\n- (void)_sortHistory;\n- (void)_showColumnSortIndicator;\n- (id)tableView:(id)arg1 toolTipForCell:(id)arg2 rect:(struct CGRect *)arg3 tableColumn:(id)arg4 row:(long long)arg5 mouseLocation:(struct CGPoint)arg6;\n\n@end\n\n" (comment) "/*\n * Generated by class-dump 3.3.3 (64 bit).\n *\n * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2010 by <NAME>.\n */" (preproc_call) "#import "NSTableViewDataSource-Protocol.h"\n" (preproc_directive) "#import" (preproc_arg) ""NSTableViewDataSource-Protocol.h"" (preproc_call) "#import "NSTableViewDelegate-Protocol.h"\n" (preproc_directive) "#import" (preproc_arg) ""NSTableViewDelegate-Protocol.h"" (ERROR) "@" (ERROR) "@" (declaration) "class NSButton, NSImage, NSMutableArray, NSSearchField, NSString, NSTableView, NSWindow;" (type_identifier) "class" (identifier) "NSButton" (,) "," (identifier) "NSImage" (,) "," (identifier) "NSMutableArray" (,) "," (identifier) "NSSearchField" (,) "," (identifier) "NSString" (,) "," (identifier) "NSTableView" (,) "," (identifier) "NSWindow" (;) ";" (ERROR) "@interface AddressHistoryController : NSObject <NSTableViewDataSource, NSTableViewDelegate>" (ERROR) "@" (type_identifier) "interface" (identifier) "AddressHistoryController" (ERROR) ": NSObject <NSTableViewDataSource" (:) ":" (identifier) "NSObject" (<) "<" (identifier) "NSTableViewDataSource" (,) "," (identifier) "NSTableViewDelegate" (>) ">" (compound_statement) "{\n NSTableView *_historyTableView;\n NSButton *_addToAddressBookButton;\n NSWindow *_window;\n NSSearchField *_searchField;\n NSMutableArray *_historyRecords;\n NSString *_sortColumn;\n BOOL _sortIsAscending;\n NSImage *_addressBookPersonImage;\n}" ({) "{" (declaration) "NSTableView *_historyTableView;" (type_identifier) "NSTableView" (pointer_declarator) "*_historyTableView" (*) "*" (identifier) "_historyTableView" (;) ";" (declaration) "NSButton *_addToAddressBookButton;" (type_identifier) "NSButton" (pointer_declarator) "*_addToAddressBookButton" (*) "*" (identifier) "_addToAddressBookButton" (;) ";" (declaration) "NSWindow *_window;" (type_identifier) "NSWindow" (pointer_declarator) "*_window" (*) "*" (identifier) "_window" (;) ";" (declaration) "NSSearchField *_searchField;" (type_identifier) "NSSearchField" (pointer_declarator) "*_searchField" (*) "*" (identifier) "_searchField" (;) ";" (declaration) "NSMutableArray *_historyRecords;" (type_identifier) "NSMutableArray" (pointer_declarator) "*_historyRecords" (*) "*" (identifier) "_historyRecords" (;) ";" (declaration) "NSString *_sortColumn;" (type_identifier) "NSString" (pointer_declarator) "*_sortColumn" (*) "*" (identifier) "_sortColumn" (;) ";" (declaration) "BOOL _sortIsAscending;" (type_identifier) "BOOL" (identifier) "_sortIsAscending" (;) ";" (declaration) "NSImage *_addressBookPersonImage;" (type_identifier) "NSImage" (pointer_declarator) "*_addressBookPersonImage" (*) "*" (identifier) "_addressBookPersonImage" (;) ";" (}) "}" (expression_statement) "+ (void)initialize;" (unary_expression) "+ (void)initialize" (+) "+" (cast_expression) "(void)initialize" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "initialize" (;) ";" (ERROR) "+ (id)allocWithZone:(" (unary_expression) "+ (id)allocWithZone" (+) "+" (cast_expression) "(id)allocWithZone" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "allocWithZone" (:) ":" (() "(" (declaration) "struct _NSZone *)arg1;" (struct_specifier) "struct _NSZone" (struct) "struct" (type_identifier) "_NSZone" (pointer_declarator) "*)arg1" (*) "*" (ERROR) ")" ()) ")" (identifier) "arg1" (;) ";" (expression_statement) "+ (id)sharedInstance;" (unary_expression) "+ (id)sharedInstance" (+) "+" (cast_expression) "(id)sharedInstance" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "sharedInstance" (;) ";" (expression_statement) "- (id)init;" (unary_expression) "- (id)init" (-) "-" (cast_expression) "(id)init" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "init" (;) ";" (expression_statement) "- (void)dealloc;" (unary_expression) "- (void)dealloc" (-) "-" (cast_expression) "(void)dealloc" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "dealloc" (;) ";" (expression_statement) "- (id)retain;" (unary_expression) "- (id)retain" (-) "-" (cast_expression) "(id)retain" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "retain" (;) ";" (expression_statement) "- (unsigned long long)retainCount;" (unary_expression) "- (unsigned long long)retainCount" (-) "-" (cast_expression) "(unsigned long long)retainCount" (() "(" (type_descriptor) "unsigned long long" (sized_type_specifier) "unsigned long long" (unsigned) "unsigned" (long) "long" (long) "long" ()) ")" (identifier) "retainCount" (;) ";" (expression_statement) "- (void)release;" (unary_expression) "- (void)release" (-) "-" (cast_expression) "(void)release" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "release" (;) ";" (expression_statement) "- (id)autorelease;" (unary_expression) "- (id)autorelease" (-) "-" (cast_expression) "(id)autorelease" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "autorelease" (;) ";" (expression_statement) "- (void)showAddressHistory;" (unary_expression) "- (void)showAddressHistory" (-) "-" (cast_expression) "(void)showAddressHistory" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "showAddressHistory" (;) ";" (expression_statement) "- (void)addToAddressBook:(id)arg1;" (unary_expression) "- (void)addToAddressBook" (-) "-" (cast_expression) "(void)addToAddressBook" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "addToAddressBook" (ERROR) ":(id)arg1" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg1" (;) ";" (expression_statement) "- (void)deleteFromHistory:(id)arg1;" (unary_expression) "- (void)deleteFromHistory" (-) "-" (cast_expression) "(void)deleteFromHistory" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "deleteFromHistory" (ERROR) ":(id)arg1" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg1" (;) ";" (expression_statement) "- (void)searchIndex:(id)arg1;" (unary_expression) "- (void)searchIndex" (-) "-" (cast_expression) "(void)searchIndex" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "searchIndex" (ERROR) ":(id)arg1" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg1" (;) ";" (expression_statement) "- (void)search:(id)arg1;" (unary_expression) "- (void)search" (-) "-" (cast_expression) "(void)search" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "search" (ERROR) ":(id)arg1" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg1" (;) ";" (expression_statement) "- (void)_cancelSearch:(id)arg1;" (unary_expression) "- (void)_cancelSearch" (-) "-" (cast_expression) "(void)_cancelSearch" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "_cancelSearch" (ERROR) ":(id)arg1" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg1" (;) ";" (expression_statement) "- (void)windowWillClose:(id)arg1;" (unary_expression) "- (void)windowWillClose" (-) "-" (cast_expression) "(void)windowWillClose" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "windowWillClose" (ERROR) ":(id)arg1" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg1" (;) ";" (expression_statement) "- (void)openAddressBook:(id)arg1;" (unary_expression) "- (void)openAddressBook" (-) "-" (cast_expression) "(void)openAddressBook" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "openAddressBook" (ERROR) ":(id)arg1" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg1" (;) ";" (expression_statement) "- (long long)numberOfRowsInTableView:(id)arg1;" (unary_expression) "- (long long)numberOfRowsInTableView" (-) "-" (cast_expression) "(long long)numberOfRowsInTableView" (() "(" (type_descriptor) "long long" (sized_type_specifier) "long long" (long) "long" (long) "long" ()) ")" (identifier) "numberOfRowsInTableView" (ERROR) ":(id)arg1" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg1" (;) ";" (ERROR) "- (id)tableView:(id)arg1 objectValueForTableColumn:(id)arg2 row:(" (unary_expression) "- (id)tableView" (-) "-" (cast_expression) "(id)tableView" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "tableView" (:) ":" (() "(" (identifier) "id" ()) ")" (type_identifier) "arg1" (identifier) "objectValueForTableColumn" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg2" (identifier) "row" (:) ":" (() "(" (declaration) "long long)arg3;" (sized_type_specifier) "long long" (long) "long" (long) "long" (ERROR) ")" ()) ")" (identifier) "arg3" (;) ";" (ERROR) "- (void)tableView:(id)arg1 willDisplayCell:(id)arg2 forTableColumn:(id)arg3 row:(" (unary_expression) "- (void)tableView" (-) "-" (cast_expression) "(void)tableView" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "tableView" (:) ":" (() "(" (identifier) "id" ()) ")" (type_identifier) "arg1" (identifier) "willDisplayCell" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg2" (identifier) "forTableColumn" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg3" (identifier) "row" (:) ":" (() "(" (declaration) "long long)arg4;" (sized_type_specifier) "long long" (long) "long" (long) "long" (ERROR) ")" ()) ")" (identifier) "arg4" (;) ";" (expression_statement) "- (void)tableViewSelectionDidChange:(id)arg1;" (unary_expression) "- (void)tableViewSelectionDidChange" (-) "-" (cast_expression) "(void)tableViewSelectionDidChange" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "tableViewSelectionDidChange" (ERROR) ":(id)arg1" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg1" (;) ";" (ERROR) "- (void)tableView:(id)" (unary_expression) "- (void)tableView" (-) "-" (cast_expression) "(void)tableView" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "tableView" (:) ":" (() "(" (identifier) "id" ()) ")" (declaration) "arg1 didClickTableColumn:(id)arg2;" (type_identifier) "arg1" (identifier) "didClickTableColumn" (ERROR) ":(id)arg2" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg2" (;) ";" (expression_statement) "- (void)_sortHistory;" (unary_expression) "- (void)_sortHistory" (-) "-" (cast_expression) "(void)_sortHistory" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "_sortHistory" (;) ";" (expression_statement) "- (void)_showColumnSortIndicator;" (unary_expression) "- (void)_showColumnSortIndicator" (-) "-" (cast_expression) "(void)_showColumnSortIndicator" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "_showColumnSortIndicator" (;) ";" (ERROR) "- (id)tableView:(id)arg1 toolTipForCell:(id)arg2 rect:(" (unary_expression) "- (id)tableView" (-) "-" (cast_expression) "(id)tableView" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "tableView" (:) ":" (() "(" (identifier) "id" ()) ")" (type_identifier) "arg1" (identifier) "toolTipForCell" (:) ":" (() "(" (identifier) "id" ()) ")" (identifier) "arg2" (identifier) "rect" (:) ":" (() "(" (declaration) "struct CGRect *)arg3" (struct_specifier) "struct CGRect" (struct) "struct" (type_identifier) "CGRect" (pointer_declarator) "*)arg3" (*) "*" (ERROR) ")" ()) ")" (identifier) "arg3" (;) "" (labeled_statement) "tableColumn:(id)arg4" (statement_identifier) "tableColumn" (:) ":" (expression_statement) "(id)arg4" (cast_expression) "(id)arg4" (() "(" (type_descriptor) "id" (type_identifier) "id" ()) ")" (identifier) "arg4" (;) "" (labeled_statement) "row:(long long)arg5" (statement_identifier) "row" (:) ":" (expression_statement) "(long long)arg5" (cast_expression) "(long long)arg5" (() "(" (type_descriptor) "long long" (sized_type_specifier) "long long" (long) "long" (long) "long" ()) ")" (identifier) "arg5" (;) "" (labeled_statement) "mouseLocation:(struct CGPoint)arg6;" (statement_identifier) "mouseLocation" (:) ":" (expression_statement) "(struct CGPoint)arg6;" (cast_expression) "(struct CGPoint)arg6" (() "(" (type_descriptor) "struct CGPoint" (struct_specifier) "struct CGPoint" (struct) "struct" (type_identifier) "CGPoint" ()) ")" (identifier) "arg6" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
533
26
{"language": "c", "success": true, "metadata": {"lines": 46, "avg_line_length": 35.13, "nodes": 327, "errors": 0, "source_hash": "c09e2932771409892e30a99a8dcfbd2e60233988f30b40316b91af2c927e612e", "categorized_nodes": 198}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import \"NSTableViewDataSource-Protocol.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": "\"NSTableViewDataSource-Protocol.h\"", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 42}}, {"id": 3, "type": "preproc_call", "text": "#import \"NSTableViewDelegate-Protocol.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": "\"NSTableViewDelegate-Protocol.h\"", "parent": 3, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 40}}, {"id": 6, "type": "ERROR", "text": "@", "parent": null, "children": [7], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 7, "type": "ERROR", "text": "@", "parent": 6, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 8, "type": "declaration", "text": "class NSButton, NSImage, NSMutableArray, NSSearchField, NSString, NSTableView, NSWindow;", "parent": null, "children": [9, 10, 11, 12, 13, 14, 15], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 89}}, {"id": 9, "type": "identifier", "text": "NSButton", "parent": 8, "children": [], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 15}}, {"id": 10, "type": "identifier", "text": "NSImage", "parent": 8, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 24}}, {"id": 11, "type": "identifier", "text": "NSMutableArray", "parent": 8, "children": [], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 40}}, {"id": 12, "type": "identifier", "text": "NSSearchField", "parent": 8, "children": [], "start_point": {"row": 11, "column": 42}, "end_point": {"row": 11, "column": 55}}, {"id": 13, "type": "identifier", "text": "NSString", "parent": 8, "children": [], "start_point": {"row": 11, "column": 57}, "end_point": {"row": 11, "column": 65}}, {"id": 14, "type": "identifier", "text": "NSTableView", "parent": 8, "children": [], "start_point": {"row": 11, "column": 67}, "end_point": {"row": 11, "column": 78}}, {"id": 15, "type": "identifier", "text": "NSWindow", "parent": 8, "children": [], "start_point": {"row": 11, "column": 80}, "end_point": {"row": 11, "column": 88}}, {"id": 16, "type": "ERROR", "text": "@interface AddressHistoryController : NSObject <NSTableViewDataSource, NSTableViewDelegate>", "parent": null, "children": [17, 18, 19, 20, 24, 25], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 91}}, {"id": 17, "type": "ERROR", "text": "@", "parent": 16, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 18, "type": "type_identifier", "text": "interface", "parent": 16, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 10}}, {"id": 19, "type": "identifier", "text": "AddressHistoryController", "parent": 16, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 35}}, {"id": 20, "type": "ERROR", "text": ": NSObject <NSTableViewDataSource", "parent": 16, "children": [21, 22, 23], "start_point": {"row": 13, "column": 36}, "end_point": {"row": 13, "column": 69}}, {"id": 21, "type": "identifier", "text": "NSObject", "parent": 20, "children": [], "start_point": {"row": 13, "column": 38}, "end_point": {"row": 13, "column": 46}}, {"id": 22, "type": "<", "text": "<", "parent": 20, "children": [], "start_point": {"row": 13, "column": 47}, "end_point": {"row": 13, "column": 48}}, {"id": 23, "type": "identifier", "text": "NSTableViewDataSource", "parent": 20, "children": [], "start_point": {"row": 13, "column": 48}, "end_point": {"row": 13, "column": 69}}, {"id": 24, "type": "identifier", "text": "NSTableViewDelegate", "parent": 16, "children": [], "start_point": {"row": 13, "column": 71}, "end_point": {"row": 13, "column": 90}}, {"id": 25, "type": ">", "text": ">", "parent": 16, "children": [], "start_point": {"row": 13, "column": 90}, "end_point": {"row": 13, "column": 91}}, {"id": 26, "type": "declaration", "text": "NSTableView *_historyTableView;", "parent": null, "children": [27, 28], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 35}}, {"id": 27, "type": "type_identifier", "text": "NSTableView", "parent": 26, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 15}}, {"id": 28, "type": "pointer_declarator", "text": "*_historyTableView", "parent": 26, "children": [29, 30], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 34}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 17}}, {"id": 30, "type": "identifier", "text": "_historyTableView", "parent": 28, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 34}}, {"id": 31, "type": "declaration", "text": "NSButton *_addToAddressBookButton;", "parent": null, "children": [32, 33], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 38}}, {"id": 32, "type": "type_identifier", "text": "NSButton", "parent": 31, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 12}}, {"id": 33, "type": "pointer_declarator", "text": "*_addToAddressBookButton", "parent": 31, "children": [34, 35], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 37}}, {"id": 34, "type": "*", "text": "*", "parent": 33, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 14}}, {"id": 35, "type": "identifier", "text": "_addToAddressBookButton", "parent": 33, "children": [], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 37}}, {"id": 36, "type": "declaration", "text": "NSWindow *_window;", "parent": null, "children": [37, 38], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 22}}, {"id": 37, "type": "type_identifier", "text": "NSWindow", "parent": 36, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 12}}, {"id": 38, "type": "pointer_declarator", "text": "*_window", "parent": 36, "children": [39, 40], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 21}}, {"id": 39, "type": "*", "text": "*", "parent": 38, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 14}}, {"id": 40, "type": "identifier", "text": "_window", "parent": 38, "children": [], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 21}}, {"id": 41, "type": "declaration", "text": "NSSearchField *_searchField;", "parent": null, "children": [42, 43], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 32}}, {"id": 42, "type": "type_identifier", "text": "NSSearchField", "parent": 41, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 17}}, {"id": 43, "type": "pointer_declarator", "text": "*_searchField", "parent": 41, "children": [44, 45], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 31}}, {"id": 44, "type": "*", "text": "*", "parent": 43, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 19}}, {"id": 45, "type": "identifier", "text": "_searchField", "parent": 43, "children": [], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 31}}, {"id": 46, "type": "declaration", "text": "NSMutableArray *_historyRecords;", "parent": null, "children": [47, 48], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 36}}, {"id": 47, "type": "type_identifier", "text": "NSMutableArray", "parent": 46, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 18}}, {"id": 48, "type": "pointer_declarator", "text": "*_historyRecords", "parent": 46, "children": [49, 50], "start_point": {"row": 19, "column": 19}, "end_point": {"row": 19, "column": 35}}, {"id": 49, "type": "*", "text": "*", "parent": 48, "children": [], "start_point": {"row": 19, "column": 19}, "end_point": {"row": 19, "column": 20}}, {"id": 50, "type": "identifier", "text": "_historyRecords", "parent": 48, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 35}}, {"id": 51, "type": "declaration", "text": "NSString *_sortColumn;", "parent": null, "children": [52, 53], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 26}}, {"id": 52, "type": "type_identifier", "text": "NSString", "parent": 51, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 12}}, {"id": 53, "type": "pointer_declarator", "text": "*_sortColumn", "parent": 51, "children": [54, 55], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 25}}, {"id": 54, "type": "*", "text": "*", "parent": 53, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 14}}, {"id": 55, "type": "identifier", "text": "_sortColumn", "parent": 53, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 25}}, {"id": 56, "type": "declaration", "text": "BOOL _sortIsAscending;", "parent": null, "children": [57, 58], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 26}}, {"id": 57, "type": "type_identifier", "text": "BOOL", "parent": 56, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 8}}, {"id": 58, "type": "identifier", "text": "_sortIsAscending", "parent": 56, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 25}}, {"id": 59, "type": "declaration", "text": "NSImage *_addressBookPersonImage;", "parent": null, "children": [60, 61], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 37}}, {"id": 60, "type": "type_identifier", "text": "NSImage", "parent": 59, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 11}}, {"id": 61, "type": "pointer_declarator", "text": "*_addressBookPersonImage", "parent": 59, "children": [62, 63], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 36}}, {"id": 62, "type": "*", "text": "*", "parent": 61, "children": [], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 13}}, {"id": 63, "type": "identifier", "text": "_addressBookPersonImage", "parent": 61, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 36}}, {"id": 64, "type": "unary_expression", "text": "+ (void)initialize", "parent": null, "children": [65, 66], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 18}}, {"id": 65, "type": "+", "text": "+", "parent": 64, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 66, "type": "cast_expression", "text": "(void)initialize", "parent": 64, "children": [67, 69], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 18}}, {"id": 67, "type": "type_descriptor", "text": "void", "parent": 66, "children": [68], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 68, "type": "primitive_type", "text": "void", "parent": 67, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 69, "type": "identifier", "text": "initialize", "parent": 66, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 18}}, {"id": 70, "type": "ERROR", "text": "+ (id)allocWithZone:(", "parent": null, "children": [71], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 21}}, {"id": 71, "type": "unary_expression", "text": "+ (id)allocWithZone", "parent": 70, "children": [72, 73], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 19}}, {"id": 72, "type": "+", "text": "+", "parent": 71, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 73, "type": "cast_expression", "text": "(id)allocWithZone", "parent": 71, "children": [74, 76], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 19}}, {"id": 74, "type": "type_descriptor", "text": "id", "parent": 73, "children": [75], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 5}}, {"id": 75, "type": "type_identifier", "text": "id", "parent": 74, "children": [], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 5}}, {"id": 76, "type": "identifier", "text": "allocWithZone", "parent": 73, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 19}}, {"id": 77, "type": "declaration", "text": "struct _NSZone *)arg1;", "parent": null, "children": [78, 81], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 43}}, {"id": 78, "type": "struct_specifier", "text": "struct _NSZone", "parent": 77, "children": [79, 80], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 35}}, {"id": 79, "type": "struct", "text": "struct", "parent": 78, "children": [], "start_point": {"row": 26, "column": 21}, "end_point": {"row": 26, "column": 27}}, {"id": 80, "type": "type_identifier", "text": "_NSZone", "parent": 78, "children": [], "start_point": {"row": 26, "column": 28}, "end_point": {"row": 26, "column": 35}}, {"id": 81, "type": "pointer_declarator", "text": "*)arg1", "parent": 77, "children": [82, 83], "start_point": {"row": 26, "column": 36}, "end_point": {"row": 26, "column": 42}}, {"id": 82, "type": "*", "text": "*", "parent": 81, "children": [], "start_point": {"row": 26, "column": 36}, "end_point": {"row": 26, "column": 37}}, {"id": 83, "type": "identifier", "text": "arg1", "parent": 81, "children": [], "start_point": {"row": 26, "column": 38}, "end_point": {"row": 26, "column": 42}}, {"id": 84, "type": "unary_expression", "text": "+ (id)sharedInstance", "parent": null, "children": [85, 86], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 20}}, {"id": 85, "type": "+", "text": "+", "parent": 84, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 86, "type": "cast_expression", "text": "(id)sharedInstance", "parent": 84, "children": [87, 89], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 20}}, {"id": 87, "type": "type_descriptor", "text": "id", "parent": 86, "children": [88], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 5}}, {"id": 88, "type": "type_identifier", "text": "id", "parent": 87, "children": [], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 5}}, {"id": 89, "type": "identifier", "text": "sharedInstance", "parent": 86, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 20}}, {"id": 90, "type": "unary_expression", "text": "- (id)init", "parent": null, "children": [91, 92], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 10}}, {"id": 91, "type": "-", "text": "-", "parent": 90, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 92, "type": "cast_expression", "text": "(id)init", "parent": 90, "children": [93, 95], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 10}}, {"id": 93, "type": "type_descriptor", "text": "id", "parent": 92, "children": [94], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 5}}, {"id": 94, "type": "type_identifier", "text": "id", "parent": 93, "children": [], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 5}}, {"id": 95, "type": "identifier", "text": "init", "parent": 92, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 10}}, {"id": 96, "type": "unary_expression", "text": "- (void)dealloc", "parent": null, "children": [97, 98], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 15}}, {"id": 97, "type": "-", "text": "-", "parent": 96, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 98, "type": "cast_expression", "text": "(void)dealloc", "parent": 96, "children": [99, 101], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 15}}, {"id": 99, "type": "type_descriptor", "text": "void", "parent": 98, "children": [100], "start_point": {"row": 29, "column": 3}, "end_point": {"row": 29, "column": 7}}, {"id": 100, "type": "primitive_type", "text": "void", "parent": 99, "children": [], "start_point": {"row": 29, "column": 3}, "end_point": {"row": 29, "column": 7}}, {"id": 101, "type": "identifier", "text": "dealloc", "parent": 98, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 15}}, {"id": 102, "type": "unary_expression", "text": "- (id)retain", "parent": null, "children": [103, 104], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 12}}, {"id": 103, "type": "-", "text": "-", "parent": 102, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 104, "type": "cast_expression", "text": "(id)retain", "parent": 102, "children": [105, 107], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 12}}, {"id": 105, "type": "type_descriptor", "text": "id", "parent": 104, "children": [106], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 30, "column": 5}}, {"id": 106, "type": "type_identifier", "text": "id", "parent": 105, "children": [], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 30, "column": 5}}, {"id": 107, "type": "identifier", "text": "retain", "parent": 104, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 12}}, {"id": 108, "type": "unary_expression", "text": "- (unsigned long long)retainCount", "parent": null, "children": [109, 110], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 33}}, {"id": 109, "type": "-", "text": "-", "parent": 108, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 110, "type": "cast_expression", "text": "(unsigned long long)retainCount", "parent": 108, "children": [111, 116], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 33}}, {"id": 111, "type": "type_descriptor", "text": "unsigned long long", "parent": 110, "children": [112], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 21}}, {"id": 112, "type": "sized_type_specifier", "text": "unsigned long long", "parent": 111, "children": [113, 114, 115], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 21}}, {"id": 113, "type": "unsigned", "text": "unsigned", "parent": 112, "children": [], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 11}}, {"id": 114, "type": "long", "text": "long", "parent": 112, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 16}}, {"id": 115, "type": "long", "text": "long", "parent": 112, "children": [], "start_point": {"row": 31, "column": 17}, "end_point": {"row": 31, "column": 21}}, {"id": 116, "type": "identifier", "text": "retainCount", "parent": 110, "children": [], "start_point": {"row": 31, "column": 22}, "end_point": {"row": 31, "column": 33}}, {"id": 117, "type": "unary_expression", "text": "- (void)release", "parent": null, "children": [118, 119], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 15}}, {"id": 118, "type": "-", "text": "-", "parent": 117, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 1}}, {"id": 119, "type": "cast_expression", "text": "(void)release", "parent": 117, "children": [120, 122], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 15}}, {"id": 120, "type": "type_descriptor", "text": "void", "parent": 119, "children": [121], "start_point": {"row": 32, "column": 3}, "end_point": {"row": 32, "column": 7}}, {"id": 121, "type": "primitive_type", "text": "void", "parent": 120, "children": [], "start_point": {"row": 32, "column": 3}, "end_point": {"row": 32, "column": 7}}, {"id": 122, "type": "identifier", "text": "release", "parent": 119, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 15}}, {"id": 123, "type": "unary_expression", "text": "- (id)autorelease", "parent": null, "children": [124, 125], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 17}}, {"id": 124, "type": "-", "text": "-", "parent": 123, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 125, "type": "cast_expression", "text": "(id)autorelease", "parent": 123, "children": [126, 128], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 17}}, {"id": 126, "type": "type_descriptor", "text": "id", "parent": 125, "children": [127], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 5}}, {"id": 127, "type": "type_identifier", "text": "id", "parent": 126, "children": [], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 5}}, {"id": 128, "type": "identifier", "text": "autorelease", "parent": 125, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 17}}, {"id": 129, "type": "unary_expression", "text": "- (void)showAddressHistory", "parent": null, "children": [130, 131], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 26}}, {"id": 130, "type": "-", "text": "-", "parent": 129, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 131, "type": "cast_expression", "text": "(void)showAddressHistory", "parent": 129, "children": [132, 134], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 26}}, {"id": 132, "type": "type_descriptor", "text": "void", "parent": 131, "children": [133], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 7}}, {"id": 133, "type": "primitive_type", "text": "void", "parent": 132, "children": [], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 7}}, {"id": 134, "type": "identifier", "text": "showAddressHistory", "parent": 131, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 26}}, {"id": 135, "type": "unary_expression", "text": "- (void)addToAddressBook", "parent": null, "children": [136, 137], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 24}}, {"id": 136, "type": "-", "text": "-", "parent": 135, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 137, "type": "cast_expression", "text": "(void)addToAddressBook", "parent": 135, "children": [138, 140], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 24}}, {"id": 138, "type": "type_descriptor", "text": "void", "parent": 137, "children": [139], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 7}}, {"id": 139, "type": "primitive_type", "text": "void", "parent": 138, "children": [], "start_point": {"row": 35, "column": 3}, "end_point": {"row": 35, "column": 7}}, {"id": 140, "type": "identifier", "text": "addToAddressBook", "parent": 137, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 24}}, {"id": 141, "type": "ERROR", "text": ":(id)arg1", "parent": null, "children": [142, 143], "start_point": {"row": 35, "column": 24}, "end_point": {"row": 35, "column": 33}}, {"id": 142, "type": "identifier", "text": "id", "parent": 141, "children": [], "start_point": {"row": 35, "column": 26}, "end_point": {"row": 35, "column": 28}}, {"id": 143, "type": "identifier", "text": "arg1", "parent": 141, "children": [], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 33}}, {"id": 144, "type": "unary_expression", "text": "- (void)deleteFromHistory", "parent": null, "children": [145, 146], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 25}}, {"id": 145, "type": "-", "text": "-", "parent": 144, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 1}}, {"id": 146, "type": "cast_expression", "text": "(void)deleteFromHistory", "parent": 144, "children": [147, 149], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 25}}, {"id": 147, "type": "type_descriptor", "text": "void", "parent": 146, "children": [148], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 7}}, {"id": 148, "type": "primitive_type", "text": "void", "parent": 147, "children": [], "start_point": {"row": 36, "column": 3}, "end_point": {"row": 36, "column": 7}}, {"id": 149, "type": "identifier", "text": "deleteFromHistory", "parent": 146, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 25}}, {"id": 150, "type": "ERROR", "text": ":(id)arg1", "parent": null, "children": [151, 152], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 34}}, {"id": 151, "type": "identifier", "text": "id", "parent": 150, "children": [], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 29}}, {"id": 152, "type": "identifier", "text": "arg1", "parent": 150, "children": [], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 34}}, {"id": 153, "type": "unary_expression", "text": "- (void)searchIndex", "parent": null, "children": [154, 155], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 19}}, {"id": 154, "type": "-", "text": "-", "parent": 153, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 155, "type": "cast_expression", "text": "(void)searchIndex", "parent": 153, "children": [156, 158], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 19}}, {"id": 156, "type": "type_descriptor", "text": "void", "parent": 155, "children": [157], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 7}}, {"id": 157, "type": "primitive_type", "text": "void", "parent": 156, "children": [], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 7}}, {"id": 158, "type": "identifier", "text": "searchIndex", "parent": 155, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 19}}, {"id": 159, "type": "ERROR", "text": ":(id)arg1", "parent": null, "children": [160, 161], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 28}}, {"id": 160, "type": "identifier", "text": "id", "parent": 159, "children": [], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 23}}, {"id": 161, "type": "identifier", "text": "arg1", "parent": 159, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 28}}, {"id": 162, "type": "unary_expression", "text": "- (void)search", "parent": null, "children": [163, 164], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 14}}, {"id": 163, "type": "-", "text": "-", "parent": 162, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 164, "type": "cast_expression", "text": "(void)search", "parent": 162, "children": [165, 167], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 14}}, {"id": 165, "type": "type_descriptor", "text": "void", "parent": 164, "children": [166], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 38, "column": 7}}, {"id": 166, "type": "primitive_type", "text": "void", "parent": 165, "children": [], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 38, "column": 7}}, {"id": 167, "type": "identifier", "text": "search", "parent": 164, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 14}}, {"id": 168, "type": "ERROR", "text": ":(id)arg1", "parent": null, "children": [169, 170], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 23}}, {"id": 169, "type": "identifier", "text": "id", "parent": 168, "children": [], "start_point": {"row": 38, "column": 16}, "end_point": {"row": 38, "column": 18}}, {"id": 170, "type": "identifier", "text": "arg1", "parent": 168, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 23}}, {"id": 171, "type": "unary_expression", "text": "- (void)_cancelSearch", "parent": null, "children": [172, 173], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 21}}, {"id": 172, "type": "-", "text": "-", "parent": 171, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 173, "type": "cast_expression", "text": "(void)_cancelSearch", "parent": 171, "children": [174, 176], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 21}}, {"id": 174, "type": "type_descriptor", "text": "void", "parent": 173, "children": [175], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 7}}, {"id": 175, "type": "primitive_type", "text": "void", "parent": 174, "children": [], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 7}}, {"id": 176, "type": "identifier", "text": "_cancelSearch", "parent": 173, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 21}}, {"id": 177, "type": "ERROR", "text": ":(id)arg1", "parent": null, "children": [178, 179], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 30}}, {"id": 178, "type": "identifier", "text": "id", "parent": 177, "children": [], "start_point": {"row": 39, "column": 23}, "end_point": {"row": 39, "column": 25}}, {"id": 179, "type": "identifier", "text": "arg1", "parent": 177, "children": [], "start_point": {"row": 39, "column": 26}, "end_point": {"row": 39, "column": 30}}, {"id": 180, "type": "unary_expression", "text": "- (void)windowWillClose", "parent": null, "children": [181, 182], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 23}}, {"id": 181, "type": "-", "text": "-", "parent": 180, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 182, "type": "cast_expression", "text": "(void)windowWillClose", "parent": 180, "children": [183, 185], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 23}}, {"id": 183, "type": "type_descriptor", "text": "void", "parent": 182, "children": [184], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 7}}, {"id": 184, "type": "primitive_type", "text": "void", "parent": 183, "children": [], "start_point": {"row": 40, "column": 3}, "end_point": {"row": 40, "column": 7}}, {"id": 185, "type": "identifier", "text": "windowWillClose", "parent": 182, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 23}}, {"id": 186, "type": "ERROR", "text": ":(id)arg1", "parent": null, "children": [187, 188], "start_point": {"row": 40, "column": 23}, "end_point": {"row": 40, "column": 32}}, {"id": 187, "type": "identifier", "text": "id", "parent": 186, "children": [], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 27}}, {"id": 188, "type": "identifier", "text": "arg1", "parent": 186, "children": [], "start_point": {"row": 40, "column": 28}, "end_point": {"row": 40, "column": 32}}, {"id": 189, "type": "unary_expression", "text": "- (void)openAddressBook", "parent": null, "children": [190, 191], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 23}}, {"id": 190, "type": "-", "text": "-", "parent": 189, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 1}}, {"id": 191, "type": "cast_expression", "text": "(void)openAddressBook", "parent": 189, "children": [192, 194], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 23}}, {"id": 192, "type": "type_descriptor", "text": "void", "parent": 191, "children": [193], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 7}}, {"id": 193, "type": "primitive_type", "text": "void", "parent": 192, "children": [], "start_point": {"row": 41, "column": 3}, "end_point": {"row": 41, "column": 7}}, {"id": 194, "type": "identifier", "text": "openAddressBook", "parent": 191, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 23}}, {"id": 195, "type": "ERROR", "text": ":(id)arg1", "parent": null, "children": [196, 197], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 32}}, {"id": 196, "type": "identifier", "text": "id", "parent": 195, "children": [], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 27}}, {"id": 197, "type": "identifier", "text": "arg1", "parent": 195, "children": [], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 32}}, {"id": 198, "type": "unary_expression", "text": "- (long long)numberOfRowsInTableView", "parent": null, "children": [199, 200], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 36}}, {"id": 199, "type": "-", "text": "-", "parent": 198, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 1}}, {"id": 200, "type": "cast_expression", "text": "(long long)numberOfRowsInTableView", "parent": 198, "children": [201, 205], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 36}}, {"id": 201, "type": "type_descriptor", "text": "long long", "parent": 200, "children": [202], "start_point": {"row": 42, "column": 3}, "end_point": {"row": 42, "column": 12}}, {"id": 202, "type": "sized_type_specifier", "text": "long long", "parent": 201, "children": [203, 204], "start_point": {"row": 42, "column": 3}, "end_point": {"row": 42, "column": 12}}, {"id": 203, "type": "long", "text": "long", "parent": 202, "children": [], "start_point": {"row": 42, "column": 3}, "end_point": {"row": 42, "column": 7}}, {"id": 204, "type": "long", "text": "long", "parent": 202, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 12}}, {"id": 205, "type": "identifier", "text": "numberOfRowsInTableView", "parent": 200, "children": [], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 36}}, {"id": 206, "type": "ERROR", "text": ":(id)arg1", "parent": null, "children": [207, 208], "start_point": {"row": 42, "column": 36}, "end_point": {"row": 42, "column": 45}}, {"id": 207, "type": "identifier", "text": "id", "parent": 206, "children": [], "start_point": {"row": 42, "column": 38}, "end_point": {"row": 42, "column": 40}}, {"id": 208, "type": "identifier", "text": "arg1", "parent": 206, "children": [], "start_point": {"row": 42, "column": 41}, "end_point": {"row": 42, "column": 45}}, {"id": 209, "type": "ERROR", "text": "- (id)tableView:(id)arg1 objectValueForTableColumn:(id)arg2 row:(", "parent": null, "children": [210, 216, 217, 218, 219, 220, 221], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 65}}, {"id": 210, "type": "unary_expression", "text": "- (id)tableView", "parent": 209, "children": [211, 212], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 15}}, {"id": 211, "type": "-", "text": "-", "parent": 210, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 1}}, {"id": 212, "type": "cast_expression", "text": "(id)tableView", "parent": 210, "children": [213, 215], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 15}}, {"id": 213, "type": "type_descriptor", "text": "id", "parent": 212, "children": [214], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 5}}, {"id": 214, "type": "type_identifier", "text": "id", "parent": 213, "children": [], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 5}}, {"id": 215, "type": "identifier", "text": "tableView", "parent": 212, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 15}}, {"id": 216, "type": "identifier", "text": "id", "parent": 209, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 19}}, {"id": 217, "type": "type_identifier", "text": "arg1", "parent": 209, "children": [], "start_point": {"row": 43, "column": 20}, "end_point": {"row": 43, "column": 24}}, {"id": 218, "type": "identifier", "text": "objectValueForTableColumn", "parent": 209, "children": [], "start_point": {"row": 43, "column": 25}, "end_point": {"row": 43, "column": 50}}, {"id": 219, "type": "identifier", "text": "id", "parent": 209, "children": [], "start_point": {"row": 43, "column": 52}, "end_point": {"row": 43, "column": 54}}, {"id": 220, "type": "identifier", "text": "arg2", "parent": 209, "children": [], "start_point": {"row": 43, "column": 55}, "end_point": {"row": 43, "column": 59}}, {"id": 221, "type": "identifier", "text": "row", "parent": 209, "children": [], "start_point": {"row": 43, "column": 60}, "end_point": {"row": 43, "column": 63}}, {"id": 222, "type": "declaration", "text": "long long)arg3;", "parent": null, "children": [223, 226], "start_point": {"row": 43, "column": 65}, "end_point": {"row": 43, "column": 80}}, {"id": 223, "type": "sized_type_specifier", "text": "long long", "parent": 222, "children": [224, 225], "start_point": {"row": 43, "column": 65}, "end_point": {"row": 43, "column": 74}}, {"id": 224, "type": "long", "text": "long", "parent": 223, "children": [], "start_point": {"row": 43, "column": 65}, "end_point": {"row": 43, "column": 69}}, {"id": 225, "type": "long", "text": "long", "parent": 223, "children": [], "start_point": {"row": 43, "column": 70}, "end_point": {"row": 43, "column": 74}}, {"id": 226, "type": "identifier", "text": "arg3", "parent": 222, "children": [], "start_point": {"row": 43, "column": 75}, "end_point": {"row": 43, "column": 79}}, {"id": 227, "type": "ERROR", "text": "- (void)tableView:(id)arg1 willDisplayCell:(id)arg2 forTableColumn:(id)arg3 row:(", "parent": null, "children": [228, 234, 235, 236, 237, 238, 239, 240, 241, 242], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 81}}, {"id": 228, "type": "unary_expression", "text": "- (void)tableView", "parent": 227, "children": [229, 230], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 17}}, {"id": 229, "type": "-", "text": "-", "parent": 228, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 230, "type": "cast_expression", "text": "(void)tableView", "parent": 228, "children": [231, 233], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 17}}, {"id": 231, "type": "type_descriptor", "text": "void", "parent": 230, "children": [232], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 7}}, {"id": 232, "type": "primitive_type", "text": "void", "parent": 231, "children": [], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 7}}, {"id": 233, "type": "identifier", "text": "tableView", "parent": 230, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 17}}, {"id": 234, "type": "identifier", "text": "id", "parent": 227, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 21}}, {"id": 235, "type": "type_identifier", "text": "arg1", "parent": 227, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 26}}, {"id": 236, "type": "identifier", "text": "willDisplayCell", "parent": 227, "children": [], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 42}}, {"id": 237, "type": "identifier", "text": "id", "parent": 227, "children": [], "start_point": {"row": 44, "column": 44}, "end_point": {"row": 44, "column": 46}}, {"id": 238, "type": "identifier", "text": "arg2", "parent": 227, "children": [], "start_point": {"row": 44, "column": 47}, "end_point": {"row": 44, "column": 51}}, {"id": 239, "type": "identifier", "text": "forTableColumn", "parent": 227, "children": [], "start_point": {"row": 44, "column": 52}, "end_point": {"row": 44, "column": 66}}, {"id": 240, "type": "identifier", "text": "id", "parent": 227, "children": [], "start_point": {"row": 44, "column": 68}, "end_point": {"row": 44, "column": 70}}, {"id": 241, "type": "identifier", "text": "arg3", "parent": 227, "children": [], "start_point": {"row": 44, "column": 71}, "end_point": {"row": 44, "column": 75}}, {"id": 242, "type": "identifier", "text": "row", "parent": 227, "children": [], "start_point": {"row": 44, "column": 76}, "end_point": {"row": 44, "column": 79}}, {"id": 243, "type": "declaration", "text": "long long)arg4;", "parent": null, "children": [244, 247], "start_point": {"row": 44, "column": 81}, "end_point": {"row": 44, "column": 96}}, {"id": 244, "type": "sized_type_specifier", "text": "long long", "parent": 243, "children": [245, 246], "start_point": {"row": 44, "column": 81}, "end_point": {"row": 44, "column": 90}}, {"id": 245, "type": "long", "text": "long", "parent": 244, "children": [], "start_point": {"row": 44, "column": 81}, "end_point": {"row": 44, "column": 85}}, {"id": 246, "type": "long", "text": "long", "parent": 244, "children": [], "start_point": {"row": 44, "column": 86}, "end_point": {"row": 44, "column": 90}}, {"id": 247, "type": "identifier", "text": "arg4", "parent": 243, "children": [], "start_point": {"row": 44, "column": 91}, "end_point": {"row": 44, "column": 95}}, {"id": 248, "type": "unary_expression", "text": "- (void)tableViewSelectionDidChange", "parent": null, "children": [249, 250], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 35}}, {"id": 249, "type": "-", "text": "-", "parent": 248, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 1}}, {"id": 250, "type": "cast_expression", "text": "(void)tableViewSelectionDidChange", "parent": 248, "children": [251, 253], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 35}}, {"id": 251, "type": "type_descriptor", "text": "void", "parent": 250, "children": [252], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 7}}, {"id": 252, "type": "primitive_type", "text": "void", "parent": 251, "children": [], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 7}}, {"id": 253, "type": "identifier", "text": "tableViewSelectionDidChange", "parent": 250, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 35}}, {"id": 254, "type": "ERROR", "text": ":(id)arg1", "parent": null, "children": [255, 256], "start_point": {"row": 45, "column": 35}, "end_point": {"row": 45, "column": 44}}, {"id": 255, "type": "identifier", "text": "id", "parent": 254, "children": [], "start_point": {"row": 45, "column": 37}, "end_point": {"row": 45, "column": 39}}, {"id": 256, "type": "identifier", "text": "arg1", "parent": 254, "children": [], "start_point": {"row": 45, "column": 40}, "end_point": {"row": 45, "column": 44}}, {"id": 257, "type": "ERROR", "text": "- (void)tableView:(id)", "parent": null, "children": [258, 264], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 22}}, {"id": 258, "type": "unary_expression", "text": "- (void)tableView", "parent": 257, "children": [259, 260], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 17}}, {"id": 259, "type": "-", "text": "-", "parent": 258, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 1}}, {"id": 260, "type": "cast_expression", "text": "(void)tableView", "parent": 258, "children": [261, 263], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 17}}, {"id": 261, "type": "type_descriptor", "text": "void", "parent": 260, "children": [262], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 46, "column": 7}}, {"id": 262, "type": "primitive_type", "text": "void", "parent": 261, "children": [], "start_point": {"row": 46, "column": 3}, "end_point": {"row": 46, "column": 7}}, {"id": 263, "type": "identifier", "text": "tableView", "parent": 260, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 17}}, {"id": 264, "type": "identifier", "text": "id", "parent": 257, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 21}}, {"id": 265, "type": "declaration", "text": "arg1 didClickTableColumn:(id)arg2;", "parent": null, "children": [266, 267, 268], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 56}}, {"id": 266, "type": "type_identifier", "text": "arg1", "parent": 265, "children": [], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 26}}, {"id": 267, "type": "identifier", "text": "didClickTableColumn", "parent": 265, "children": [], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 46}}, {"id": 268, "type": "ERROR", "text": ":(id)arg2", "parent": 265, "children": [269, 270], "start_point": {"row": 46, "column": 46}, "end_point": {"row": 46, "column": 55}}, {"id": 269, "type": "identifier", "text": "id", "parent": 268, "children": [], "start_point": {"row": 46, "column": 48}, "end_point": {"row": 46, "column": 50}}, {"id": 270, "type": "identifier", "text": "arg2", "parent": 268, "children": [], "start_point": {"row": 46, "column": 51}, "end_point": {"row": 46, "column": 55}}, {"id": 271, "type": "unary_expression", "text": "- (void)_sortHistory", "parent": null, "children": [272, 273], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 20}}, {"id": 272, "type": "-", "text": "-", "parent": 271, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 1}}, {"id": 273, "type": "cast_expression", "text": "(void)_sortHistory", "parent": 271, "children": [274, 276], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 20}}, {"id": 274, "type": "type_descriptor", "text": "void", "parent": 273, "children": [275], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 7}}, {"id": 275, "type": "primitive_type", "text": "void", "parent": 274, "children": [], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 7}}, {"id": 276, "type": "identifier", "text": "_sortHistory", "parent": 273, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 20}}, {"id": 277, "type": "unary_expression", "text": "- (void)_showColumnSortIndicator", "parent": null, "children": [278, 279], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 32}}, {"id": 278, "type": "-", "text": "-", "parent": 277, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 1}}, {"id": 279, "type": "cast_expression", "text": "(void)_showColumnSortIndicator", "parent": 277, "children": [280, 282], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 32}}, {"id": 280, "type": "type_descriptor", "text": "void", "parent": 279, "children": [281], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 48, "column": 7}}, {"id": 281, "type": "primitive_type", "text": "void", "parent": 280, "children": [], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 48, "column": 7}}, {"id": 282, "type": "identifier", "text": "_showColumnSortIndicator", "parent": 279, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 32}}, {"id": 283, "type": "ERROR", "text": "- (id)tableView:(id)arg1 toolTipForCell:(id)arg2 rect:(", "parent": null, "children": [284, 290, 291, 292, 293, 294, 295], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 55}}, {"id": 284, "type": "unary_expression", "text": "- (id)tableView", "parent": 283, "children": [285, 286], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 15}}, {"id": 285, "type": "-", "text": "-", "parent": 284, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 1}}, {"id": 286, "type": "cast_expression", "text": "(id)tableView", "parent": 284, "children": [287, 289], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 15}}, {"id": 287, "type": "type_descriptor", "text": "id", "parent": 286, "children": [288], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 5}}, {"id": 288, "type": "type_identifier", "text": "id", "parent": 287, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 5}}, {"id": 289, "type": "identifier", "text": "tableView", "parent": 286, "children": [], "start_point": {"row": 49, "column": 6}, "end_point": {"row": 49, "column": 15}}, {"id": 290, "type": "identifier", "text": "id", "parent": 283, "children": [], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 19}}, {"id": 291, "type": "type_identifier", "text": "arg1", "parent": 283, "children": [], "start_point": {"row": 49, "column": 20}, "end_point": {"row": 49, "column": 24}}, {"id": 292, "type": "identifier", "text": "toolTipForCell", "parent": 283, "children": [], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 39}}, {"id": 293, "type": "identifier", "text": "id", "parent": 283, "children": [], "start_point": {"row": 49, "column": 41}, "end_point": {"row": 49, "column": 43}}, {"id": 294, "type": "identifier", "text": "arg2", "parent": 283, "children": [], "start_point": {"row": 49, "column": 44}, "end_point": {"row": 49, "column": 48}}, {"id": 295, "type": "identifier", "text": "rect", "parent": 283, "children": [], "start_point": {"row": 49, "column": 49}, "end_point": {"row": 49, "column": 53}}, {"id": 296, "type": "declaration", "text": "struct CGRect *)arg3", "parent": null, "children": [297, 300], "start_point": {"row": 49, "column": 55}, "end_point": {"row": 49, "column": 75}}, {"id": 297, "type": "struct_specifier", "text": "struct CGRect", "parent": 296, "children": [298, 299], "start_point": {"row": 49, "column": 55}, "end_point": {"row": 49, "column": 68}}, {"id": 298, "type": "struct", "text": "struct", "parent": 297, "children": [], "start_point": {"row": 49, "column": 55}, "end_point": {"row": 49, "column": 61}}, {"id": 299, "type": "type_identifier", "text": "CGRect", "parent": 297, "children": [], "start_point": {"row": 49, "column": 62}, "end_point": {"row": 49, "column": 68}}, {"id": 300, "type": "pointer_declarator", "text": "*)arg3", "parent": 296, "children": [301, 302], "start_point": {"row": 49, "column": 69}, "end_point": {"row": 49, "column": 75}}, {"id": 301, "type": "*", "text": "*", "parent": 300, "children": [], "start_point": {"row": 49, "column": 69}, "end_point": {"row": 49, "column": 70}}, {"id": 302, "type": "identifier", "text": "arg3", "parent": 300, "children": [], "start_point": {"row": 49, "column": 71}, "end_point": {"row": 49, "column": 75}}, {"id": 303, "type": "labeled_statement", "text": "tableColumn:(id)arg4", "parent": null, "children": [304], "start_point": {"row": 49, "column": 76}, "end_point": {"row": 49, "column": 96}}, {"id": 304, "type": "statement_identifier", "text": "tableColumn", "parent": 303, "children": [], "start_point": {"row": 49, "column": 76}, "end_point": {"row": 49, "column": 87}}, {"id": 305, "type": "cast_expression", "text": "(id)arg4", "parent": 303, "children": [306, 308], "start_point": {"row": 49, "column": 88}, "end_point": {"row": 49, "column": 96}}, {"id": 306, "type": "type_descriptor", "text": "id", "parent": 305, "children": [307], "start_point": {"row": 49, "column": 89}, "end_point": {"row": 49, "column": 91}}, {"id": 307, "type": "type_identifier", "text": "id", "parent": 306, "children": [], "start_point": {"row": 49, "column": 89}, "end_point": {"row": 49, "column": 91}}, {"id": 308, "type": "identifier", "text": "arg4", "parent": 305, "children": [], "start_point": {"row": 49, "column": 92}, "end_point": {"row": 49, "column": 96}}, {"id": 309, "type": "labeled_statement", "text": "row:(long long)arg5", "parent": null, "children": [310], "start_point": {"row": 49, "column": 97}, "end_point": {"row": 49, "column": 116}}, {"id": 310, "type": "statement_identifier", "text": "row", "parent": 309, "children": [], "start_point": {"row": 49, "column": 97}, "end_point": {"row": 49, "column": 100}}, {"id": 311, "type": "cast_expression", "text": "(long long)arg5", "parent": 309, "children": [312, 316], "start_point": {"row": 49, "column": 101}, "end_point": {"row": 49, "column": 116}}, {"id": 312, "type": "type_descriptor", "text": "long long", "parent": 311, "children": [313], "start_point": {"row": 49, "column": 102}, "end_point": {"row": 49, "column": 111}}, {"id": 313, "type": "sized_type_specifier", "text": "long long", "parent": 312, "children": [314, 315], "start_point": {"row": 49, "column": 102}, "end_point": {"row": 49, "column": 111}}, {"id": 314, "type": "long", "text": "long", "parent": 313, "children": [], "start_point": {"row": 49, "column": 102}, "end_point": {"row": 49, "column": 106}}, {"id": 315, "type": "long", "text": "long", "parent": 313, "children": [], "start_point": {"row": 49, "column": 107}, "end_point": {"row": 49, "column": 111}}, {"id": 316, "type": "identifier", "text": "arg5", "parent": 311, "children": [], "start_point": {"row": 49, "column": 112}, "end_point": {"row": 49, "column": 116}}, {"id": 317, "type": "labeled_statement", "text": "mouseLocation:(struct CGPoint)arg6;", "parent": null, "children": [318], "start_point": {"row": 49, "column": 117}, "end_point": {"row": 49, "column": 152}}, {"id": 318, "type": "statement_identifier", "text": "mouseLocation", "parent": 317, "children": [], "start_point": {"row": 49, "column": 117}, "end_point": {"row": 49, "column": 130}}, {"id": 319, "type": "cast_expression", "text": "(struct CGPoint)arg6", "parent": 317, "children": [320, 324], "start_point": {"row": 49, "column": 131}, "end_point": {"row": 49, "column": 151}}, {"id": 320, "type": "type_descriptor", "text": "struct CGPoint", "parent": 319, "children": [321], "start_point": {"row": 49, "column": 132}, "end_point": {"row": 49, "column": 146}}, {"id": 321, "type": "struct_specifier", "text": "struct CGPoint", "parent": 320, "children": [322, 323], "start_point": {"row": 49, "column": 132}, "end_point": {"row": 49, "column": 146}}, {"id": 322, "type": "struct", "text": "struct", "parent": 321, "children": [], "start_point": {"row": 49, "column": 132}, "end_point": {"row": 49, "column": 138}}, {"id": 323, "type": "type_identifier", "text": "CGPoint", "parent": 321, "children": [], "start_point": {"row": 49, "column": 139}, "end_point": {"row": 49, "column": 146}}, {"id": 324, "type": "identifier", "text": "arg6", "parent": 319, "children": [], "start_point": {"row": 49, "column": 147}, "end_point": {"row": 49, "column": 151}}, {"id": 325, "type": "ERROR", "text": "@", "parent": null, "children": [326], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 1}}, {"id": 326, "type": "ERROR", "text": "@", "parent": 325, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [8, 26, 31, 36, 41, 46, 51, 56, 59, 77, 222, 243, 265, 296], "classes": [78, 79, 297, 298, 321, 322], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [64, 66, 71, 73, 84, 86, 90, 92, 96, 98, 102, 104, 108, 110, 117, 119, 123, 125, 129, 131, 135, 137, 144, 146, 153, 155, 162, 164, 171, 173, 180, 182, 189, 191, 198, 200, 210, 212, 228, 230, 248, 250, 258, 260, 271, 273, 277, 279, 284, 286, 305, 311, 319], "assignments": [], "loops": [], "conditionals": [9, 10, 11, 12, 13, 14, 15, 18, 19, 21, 23, 24, 27, 30, 32, 35, 37, 40, 42, 45, 47, 50, 52, 55, 57, 58, 60, 63, 69, 75, 76, 80, 83, 88, 89, 94, 95, 101, 106, 107, 112, 116, 122, 127, 128, 134, 140, 142, 143, 149, 151, 152, 158, 160, 161, 167, 169, 170, 176, 178, 179, 185, 187, 188, 194, 196, 197, 202, 205, 207, 208, 214, 215, 216, 217, 218, 219, 220, 221, 223, 226, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 244, 247, 253, 255, 256, 263, 264, 266, 267, 269, 270, 276, 282, 288, 289, 290, 291, 292, 293, 294, 295, 299, 302, 304, 307, 308, 310, 313, 316, 318, 323, 324], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 3], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 78, "universal_type": "class", "name": "_NSZone", "text_snippet": "struct _NSZone"}, {"node_id": 79, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 297, "universal_type": "class", "name": "CGRect", "text_snippet": "struct CGRect"}, {"node_id": 298, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 321, "universal_type": "class", "name": "CGPoint", "text_snippet": "struct CGPoint"}, {"node_id": 322, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": []}, "original_source_code": "/*\n * Generated by class-dump 3.3.3 (64 bit).\n *\n * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2010 by <NAME>.\n */\n\n\n\n#import \"NSTableViewDataSource-Protocol.h\"\n#import \"NSTableViewDelegate-Protocol.h\"\n\n@class NSButton, NSImage, NSMutableArray, NSSearchField, NSString, NSTableView, NSWindow;\n\n@interface AddressHistoryController : NSObject <NSTableViewDataSource, NSTableViewDelegate>\n{\n NSTableView *_historyTableView;\n NSButton *_addToAddressBookButton;\n NSWindow *_window;\n NSSearchField *_searchField;\n NSMutableArray *_historyRecords;\n NSString *_sortColumn;\n BOOL _sortIsAscending;\n NSImage *_addressBookPersonImage;\n}\n\n+ (void)initialize;\n+ (id)allocWithZone:(struct _NSZone *)arg1;\n+ (id)sharedInstance;\n- (id)init;\n- (void)dealloc;\n- (id)retain;\n- (unsigned long long)retainCount;\n- (void)release;\n- (id)autorelease;\n- (void)showAddressHistory;\n- (void)addToAddressBook:(id)arg1;\n- (void)deleteFromHistory:(id)arg1;\n- (void)searchIndex:(id)arg1;\n- (void)search:(id)arg1;\n- (void)_cancelSearch:(id)arg1;\n- (void)windowWillClose:(id)arg1;\n- (void)openAddressBook:(id)arg1;\n- (long long)numberOfRowsInTableView:(id)arg1;\n- (id)tableView:(id)arg1 objectValueForTableColumn:(id)arg2 row:(long long)arg3;\n- (void)tableView:(id)arg1 willDisplayCell:(id)arg2 forTableColumn:(id)arg3 row:(long long)arg4;\n- (void)tableViewSelectionDidChange:(id)arg1;\n- (void)tableView:(id)arg1 didClickTableColumn:(id)arg2;\n- (void)_sortHistory;\n- (void)_showColumnSortIndicator;\n- (id)tableView:(id)arg1 toolTipForCell:(id)arg2 rect:(struct CGRect *)arg3 tableColumn:(id)arg4 row:(long long)arg5 mouseLocation:(struct CGPoint)arg6;\n\n@end\n\n"}
45
c
/* Copyright 2013 KLab 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. */ #ifndef CKLBNetAPI_h #define CKLBNetAPI_h #include "CKLBLuaTask.h" #include "CKLBHTTPInterface.h" #include "CKLBJsonItem.h" #include "CKLBUtility.h" #include "MultithreadedNetwork.h" // regionを指定しなかった場合のデフォルトregion値(ISO 3166-1) #define DEFAULT_REGION "840" // 北米アメリカ合衆国 //// 指定しそうなデフォルト値をコメントアウトして書いておく。 // #define DEFAULT_REGION "392" // 日本 enum { // メッセージ値定義 NETAPIMSG_CONNECTION_CANCELED = -999, // セッションはキャンセルされた NETAPIMSG_CONNECTION_FAILED = -500, // 接続に失敗した RESERVED = -1, // サーバにアクセスできない/サーバからのパケットを解釈できない NETAPIMSG_SERVER_TIMEOUT = -2, // サーバとの通信がタイムアウトした NETAPIMSG_SERVER_ERROR = 0, NETAPIMSG_REQUEST_SUCCESS = 1, // リクエスト成功ステータス }; // Native側からAPIタスクにコマンドを発行するためのsingleton. // class CKLBNetAPI; /*! * \class CKLBNetAPI * \brief Net API class. * * CKLBNetAPI is responsible Network communications. */ class CKLBNetAPI : public CKLBLuaTask { friend class CKLBTaskFactory<CKLBNetAPI>; private: CKLBNetAPI(); virtual ~CKLBNetAPI(); bool init( CKLBTask* pTask, const char * callback); public: virtual u32 getClassID(); static CKLBNetAPI* create( CKLBTask* pParentTask, const char * callback); void execute(u32 deltaT); void die(); bool initScript(CLuaState& lua); int commandScript(CLuaState& lua); private: CKLBHTTPInterface* m_http; // そのセッションで使用されている接続 u32 m_timeout; // タイムアウト時間 u32 m_timestart; u32 m_http_header_length; bool m_canceled; // セッションがキャンセルされると true になる CKLBJsonItem* m_pRoot; // スクリプトコールバック用 const char * m_callback; // Lua callback function // HTTP通信で追加するヘッダの配列 const char ** m_http_header_array; private: void freeHeader(); void freeJSonResult(); bool lua_callback(int msg, int status, CKLBJsonItem * pRoot); CKLBJsonItem * getJsonTree(const char * json_string, u32 dataLen); bool get_token(CKLBJsonItem * pRoot); public: bool cancel (); }; #endif // CKLBNetAPI_h
25.62
97
(translation_unit) " \n Copyright 2013 KLab 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#ifndef CKLBNetAPI_h \n#define CKLBNetAPI_h \n \n#include "CKLBLuaTask.h" \n#include "CKLBHTTPInterface.h" \n#include "CKLBJsonItem.h" \n#include "CKLBUtility.h" \n#include "MultithreadedNetwork.h" \n \n// regionを指定しなかった場合のデフォルトregion値(ISO 3166-1) \n#define DEFAULT_REGION "840" // 北米アメリカ合衆国 \n \n//// 指定しそうなデフォルト値をコメントアウトして書いておく。 \n// #define DEFAULT_REGION "392" // 日本 \n \n \nenum { \n // メッセージ値定義 \n NETAPIMSG_CONNECTION_CANCELED = -999, // セッションはキャンセルされた \n NETAPIMSG_CONNECTION_FAILED = -500, // 接続に失敗した \n RESERVED = -1, // サーバにアクセスできない/サーバからのパケットを解釈できない \n NETAPIMSG_SERVER_TIMEOUT = -2, // サーバとの通信がタイムアウトした \n NETAPIMSG_SERVER_ERROR = 0, \n NETAPIMSG_REQUEST_SUCCESS = 1, // リクエスト成功ステータス \n}; \n \n// Native側からAPIタスクにコマンドを発行するためのsingleton. \n// \nclass CKLBNetAPI; \n \n/*! \n* \class CKLBNetAPI \n* \brief Net API class. \n* \n* CKLBNetAPI is responsible Network communications. \n*/ \nclass CKLBNetAPI : public CKLBLuaTask \n{ \n friend class CKLBTaskFactory<CKLBNetAPI>; \nprivate: \n CKLBNetAPI(); \n virtual ~CKLBNetAPI(); \n \n bool init( CKLBTask* pTask, \n const char * callback); \npublic: \n virtual u32 getClassID(); \n static CKLBNetAPI* create( CKLBTask* pParentTask, \n const char * callback); \n void execute(u32 deltaT); \n void die(); \n \n bool initScript(CLuaState& lua); \n int commandScript(CLuaState& lua); \nprivate: \n CKLBHTTPInterface* m_http; // そのセッションで使用されている接続 \n u32 m_timeout; // タイムアウト時間 \n u32 m_timestart; \n u32 m_http_header_length; \n bool m_canceled; // セッションがキャンセルされると true になる \n CKLBJsonItem* m_pRoot; \n \n // スクリプトコールバック用 \n const char * m_callback; // Lua callback function \n \n // HTTP通信で追加するヘッダの配列 \n const char ** m_http_header_array; \n \nprivate: \n void freeHeader(); \n void freeJSonResult(); \n \n bool lua_callback(int msg, int status, CKLBJsonItem * pRoot); \n \n CKLBJsonItem * getJsonTree(const char * json_string, u32 dataLen); \n bool get_token(CKLBJsonItem * pRoot); \n \npublic: \n bool cancel (); \n}; \n \n#endif // CKLBNetAPI_h \n" (comment) " \n Copyright 2013 KLab 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" (preproc_ifdef) "fndef CKLBNetAPI_h \n#define CKLBNetAPI_h \n \n#include "CKLBLuaTask.h" \n#include "CKLBHTTPInterface.h" \n#include "CKLBJsonItem.h" \n#include "CKLBUtility.h" \n#include "MultithreadedNetwork.h" \n \n// regionを指定しなかった場合のデフォルトregion値(ISO 3166-1) \n#define DEFAULT_REGION "840" // 北米アメリカ合衆国 \n \n//// 指定しそうなデフォルト値をコメントアウトして書いておく。 \n// #define DEFAULT_REGION "392" // 日本 \n \n \nenum { \n // メッセージ値定義 \n NETAPIMSG_CONNECTION_CANCELED = -999, // セッションはキャンセルされた \n NETAPIMSG_CONNECTION_FAILED = -500, // 接続に失敗した \n RESERVED = -1, // サーバにアクセスできない/サーバからのパケットを解釈できない \n NETAPIMSG_SERVER_TIMEOUT = -2, // サーバとの通信がタイムアウトした \n NETAPIMSG_SERVER_ERROR = 0, \n NETAPIMSG_REQUEST_SUCCESS = 1, // リクエスト成功ステータス \n}; \n \n// Native側からAPIタスクにコマンドを発行するためのsingleton. \n// \nclass CKLBNetAPI; \n \n/*! \n* \class CKLBNetAPI \n* \brief Net API class. \n* \n* CKLBNetAPI is responsible Network communications. \n*/ \nclass CKLBNetAPI : public CKLBLuaTask \n{ \n friend class CKLBTaskFactory<CKLBNetAPI>; \nprivate: \n CKLBNetAPI(); \n virtual ~CKLBNetAPI(); \n \n bool init( CKLBTask* pTask, \n const char * callback); \npublic: \n virtual u32 getClassID(); \n static CKLBNetAPI* create( CKLBTask* pParentTask, \n const char * callback); \n void execute(u32 deltaT); \n void die(); \n \n bool initScript(CLuaState& lua); \n int commandScript(CLuaState& lua); \nprivate: \n CKLBHTTPInterface* m_http; // そのセッションで使用されている接続 \n u32 m_timeout; // タイムアウト時間 \n u32 m_timestart; \n u32 m_http_header_length; \n bool m_canceled; // セッションがキャンセルされると true になる \n CKLBJsonItem* m_pRoot; \n \n // スクリプトコールバック用 \n const char * m_callback; // Lua callback function \n \n // HTTP通信で追加するヘッダの配列 \n const char ** m_http_header_array; \n \nprivate: \n void freeHeader(); \n void freeJSonResult(); \n \n bool lua_callback(int msg, int status, CKLBJsonItem * pRoot); \n \n CKLBJsonItem * getJsonTree(const char * json_string, u32 dataLen); \n bool get_token(CKLBJsonItem * pRoot); \n \npublic: \n bool cancel (); \n}; \n \n#endif // CKLBNetAPI_h \n" (#ifndef) "fndef C" (identifier) "LBNetAPI_h \n" (preproc_def) "efine CKLBNetAPI_h \n \n" (#define) "efine C" (identifier) "LBNetAPI_h \n" (preproc_include) "nclude "CKLBLuaTask.h" \n#i" (#include) "nclude "" (string_literal) "KLBLuaTask.h" \n" (") "K" (string_content) "LBLuaTask.h" " (") "\n" (preproc_include) "nclude "CKLBHTTPInterface.h" \n#i" (#include) "nclude "" (string_literal) "KLBHTTPInterface.h" \n" (") "K" (string_content) "LBHTTPInterface.h" " (") "\n" (preproc_include) "nclude "CKLBJsonItem.h" \n#i" (#include) "nclude "" (string_literal) "KLBJsonItem.h" \n" (") "K" (string_content) "LBJsonItem.h" " (") "\n" (preproc_include) "nclude "CKLBUtility.h" \n#i" (#include) "nclude "" (string_literal) "KLBUtility.h" \n" (") "K" (string_content) "LBUtility.h" " (") "\n" (preproc_include) "nclude "MultithreadedNetwork.h" \n \n" (#include) "nclude "" (string_literal) "ultithreadedNetwork.h" \n" (") "u" (string_content) "ltithreadedNetwork.h" " (") "\n" (comment) " regionを指定しなかった場合のデフォルトregion値(ISO 3166-1) \n#define DEFAULT_REGION "840" // " (preproc_def) "米アメリカ合衆国 \n \n//// 指定しそうなデフォルト値をコメントアウトして書いておく。 \n// #define DEFAUL" (#define) "米アメリカ合衆" (identifier) " \n \n//// 指定しそう" (preproc_arg) "デフォルト値をコメントアウトして書いておく。 \n// #define DEFAU" (comment) "REGION "392" // 日本 \n \n \nenum { \n // メッセージ値定義 \n NETAPIMSG_CONNECTION_CANCELED = -999, //" (comment) "セッションはキャンセルされた \n NETAPIMSG_CONNECTION_FAILED " (enum_specifier) "00, // 接続に失敗した \n RESERVED = -1, // サーバにアクセスできない/サーバからのパケットを解釈できない \n NETAPIMSG_SERVER_TIMEOUT = -2, // サーバとの通信がタイムアウトした \n NETAPIMSG_SERVER_ERROR = 0, \n NETAPIMSG_REQUEST_SUCCESS = 1, // リクエスト成功ステータス \n}; \n \n// Native側からAPIタスクにコマンドを発行するためのsingleton. \n// \nclass CKLBNetAPI; \n \n/*! \n* \class CKLBNetAPI \n* \brief Net API class. \n* \n* CKLBNetAPI is responsible Network communications. \n*/ \nclass CKLBNetAPI : public CKLBLuaTask \n{ \n friend class CKLBTaskFactory<CKLBNetAPI>; \nprivate: \n CKL" (enum) "00, " (enumerator_list) "/ 接続に失敗した \n RESERVED = -1, // サーバにアクセスできない/サーバからのパケットを解釈できない \n NETAPIMSG_SERVER_TIMEOUT = -2, // サーバとの通信がタイムアウトした \n NETAPIMSG_SERVER_ERROR = 0, \n NETAPIMSG_REQUEST_SUCCESS = 1, // リクエスト成功ステータス \n}; \n \n// Native側からAPIタスクにコマンドを発行するためのsingleton. \n// \nclass CKLBNetAPI; \n \n/*! \n* \class CKLBNetAPI \n* \brief Net API class. \n* \n* CKLBNetAPI is responsible Network communications. \n*/ \nclass CKLBNetAPI : public CKLBLuaTask \n{ \n friend class CKLBTaskFactory<CKLBNetAPI>; \nprivate: \n CKL" ({) "/" (comment) "に失敗した \n RESERVED = -1, " (enumerator) " サーバにアクセスできない/サーバからのパケットを解釈できない \n NE" (identifier) " サーバにアクセスできない/サーバからのパケットを解釈でき" (=) "い" (number_literal) "\n NE" (,) "T" (comment) "PIMSG_SERVER_TIMEOUT = -2, // サーバとの通信がタイムアウトし" (enumerator) "\n NETAPIMSG_SERVER_ERROR = 0, \n N" (identifier) "\n NETAPIMSG_SERVER_ERROR " (=) "0" (number_literal) " \n N" (,) "E" (comment) "APIMSG_REQUEST_SUCCESS =" (enumerator) ", // リクエスト成功ステータス " (identifier) ", // リクエ" (=) "ー" (number_literal) "ス " (,) "\n" (comment) "; \n \n// Native側からAPIタスクにコマンドを発行するためのsingleton. \n// \nclass CKLBNetAPI; \n \n/*! \n* \class CKLB" (enumerator) "tAPI \n* \brief Net API class. " (identifier) "tAPI \n* \brief Net API c" (=) "s" (number_literal) ". " (,) "\n" (comment) " \n* CKLBNetAPI is responsible Network communication" (enumerator) " \n*/ \nclass CKLBNetAPI : pub" (identifier) " \n*/ \nclass CKLBNetAPI" (=) "p" (number_literal) "b" (,) "l" (enumerator) "CKLBLuaTask \n{ \n friend class " (identifier) "CKLBLuaTask \n{ \n friend c" (=) "s" (number_literal) " " (,) "C" (comment) "LBTaskFactory<CKLBNetAPI>; \nprivate: \n C" (}) "L" (;) "B" (comment) "PI(); \n virtual ~CKLBNetAPI(); \n \n bool init( CKLBTask* pTask, \n const char " (comment) " cal" (declaration) "back); \npublic: \n" (type_identifier) "back)" (identifier) " \npublic: " (;) "\n" (comment) "tual u32 getClassID(); \n static CKLBNetAPI* create( CKLBTask* pParentTask, \n const char * callback); \n" (function_definition) "oid execute(u32 deltaT); \n void die(); \n \n bool initScript(CLuaState& lua); \n int commandScript(CLuaState& lua); \nprivate: \n CKLBHTTPInterface* m_http; // そのセッションで使用されている接続 \n u32 m_timeout; // タイムアウト時間 \n u32 m_timestart; \n u32 m_http_header_length; \n bool m_canceled; // セッションがキャンセルされると true になる \n CKLBJsonItem* m_pRoot; \n \n // スクリプトコールバック用 \n const char * m_callback; // Lua callback function \n \n // HTTP通信で追加するヘッダの配列 \n const char ** m_http_header_array; \n \nprivate: \n void freeHeader(); \n void freeJSonResult(); \n \n bool lua_callback(int msg, int status, CKLBJsonItem * pRoot); \n \n CKLBJsonItem * getJsonTree(const char * json_string, u32 dataLen); \n bool get_token(CKLBJsonItem * pRoot); \n \npublic: \n bool cancel (); \n}; \n \n#endif // CKLBNetAPI_h \n" (type_identifier) "oid e" (ERROR) "ecute(u32 deltaT); " (identifier) "ecute(u32 " (:) "e" (identifier) "taT); " (identifier) " void die()" (compound_statement) "\n \n bool initScript(CLuaState& lua); \n int commandScript(CLuaState& lua); \nprivate: \n CKLBHTTPInterface* m_http; // そのセッションで使用されている接続 \n u32 m_timeout; // タイムアウト時間 \n u32 m_timestart; \n u32 m_http_header_length; \n bool m_canceled; // セッションがキャンセルされると true になる \n CKLBJsonItem* m_pRoot; \n \n // スクリプトコールバック用 \n const char * m_callback; // Lua callback function \n \n // HTTP通信で追加するヘッダの配列 \n const char ** m_http_header_array; \n \nprivate: \n void freeHeader(); \n void freeJSonResult(); \n \n bool lua_callback(int msg, int status, CKLBJsonItem * pRoot); \n \n CKLBJsonItem * getJsonTree(const char * json_string, u32 dataLen); \n bool get_token(CKLBJsonItem * pRoot); \n \npublic: \n bool cancel (); \n}; \n \n#endif // CKLBNetAPI_h \n" ({) "\n" (declaration) "bool initScr" (type_identifier) "bool i" (identifier) "itScr" (;) "" (expression_statement) "pt(CLuaState& lua); \n int co" (binary_expression) "pt(CLuaState& lua); \n int c" (binary_expression) "pt(CLuaState& lua); \n int " (identifier) "pt(CLuaState& l" (<) "u" (identifier) "a); \n int " (>) "c" (identifier) "" (;) "o" (labeled_statement) "andScript(CLuaState& lua" (statement_identifier) "andScri" (:) "p" (expression_statement) "LuaState& lua" (call_expression) "LuaState& lu" (identifier) "LuaState& " (argument_list) "lu" (() "l" ()) "u" (;) "a" (declaration) "\nprivate: \n CKLBHTTPIn" (type_identifier) "\nprivat" (ERROR) ":" (~) ":" (function_declarator) " \n CKLBHTTPI" (identifier) " \n CKLBHTT" (parameter_list) "PI" (() "P" ()) "I" (;) "n" (declaration) "ce* m_http; // そのセッションで使用されている接続 \n u32 m_timeout; " (primitive_type) "ce* " (function_declarator) "m_http; // そのセッションで使用されている接続 \n u32 m_timeout;" (identifier) "m_ht" (parameter_list) "tp; // そのセッションで使用されている接続 \n u32 m_timeout;" (() "t" (parameter_declaration) "; // そのセッションで使" (type_identifier) "; // その" (pointer_declarator) "セッションで使" (*) "セ" (identifier) "ションで使" (,) "用" (parameter_declaration) " \n u32 m_timeout" (type_qualifier) " \n u3" (const) " \n u3" (primitive_type) " " (pointer_declarator) " m_timeout" (*) " " (identifier) "_timeout" ()) ";" (;) " " (labeled_statement) " タイムアウト時間 \n u32 m_timestart; \n" (statement_identifier) " タイムアウ" (:) "ト" (declaration) "\n u32 m_timestart; \n" (type_identifier) "\n u32 " (ERROR) " " (identifier) " " (function_declarator) "_timestart; " (identifier) "_timestart" (parameter_list) "; " (() ";" ()) " " (;) "\n" (declaration) "2 m_http_header_length; \n bool m_canceled; // セッションがキャンセルされると true になる \n C" (storage_class_specifier) "2 " (static) "2 " (type_identifier) "m_http_hea" (pointer_declarator) "der_length; \n bool m_canceled; // セッションがキャンセルされると true になる \n " (*) "d" (function_declarator) "r_length; \n bool m_canceled; // セッションがキャンセルされると true になる \n " (identifier) "r_leng" (parameter_list) "th; \n bool m_canceled; // セッションがキャンセルされると true になる \n " (() "t" (parameter_declaration) "; \n bool m_cancel" (type_identifier) "; \n bool" (pointer_declarator) " m_cancel" (*) " " (identifier) " m_cancel" (,) "e" (parameter_declaration) "がキャンセルされると true になる \n" (type_qualifier) "がキャンセ" (const) "がキャンセ" (primitive_type) "されると" (pointer_declarator) "true になる \n" (*) "t" (identifier) "ue になる \n" ()) " " (;) "C" (declaration) "JsonItem* m_pRoot; \n \n " (primitive_type) "Json" (function_declarator) "tem* m_pRoot; \n \n" (identifier) "tem* " (parameter_list) "m_pRoot; \n \n" (() "m" (parameter_declaration) "_pRoot; \n " (type_identifier) "_pR" (identifier) "ot; \n " ()) "\n" (;) " " (declaration) "スクリプトコールバック" (primitive_type) "スクリプ" (function_declarator) "コールバッ" (identifier) "コール" (parameter_list) "バッ" (() "バ" ()) "ッ" (;) "ク" (declaration) "onst char * m_callback; // Lua" (primitive_type) "onst" (function_declarator) "char * m_callback; // Lu" (identifier) "char * m" (parameter_list) "_callback; // Lu" (() "_" (parameter_declaration) "callback; // L" (type_identifier) "callback;" (ERROR) " " (&) " " (identifier) "/ L" ()) "u" (;) "a" (declaration) "llback function \n \n // HTTP通信で追加する" (primitive_type) "llb" (function_declarator) "ck function \n \n // HTTP通信で追加す" (identifier) "ck function \n" (parameter_list) " \n // HTTP通信で追加す" (() " " (parameter_declaration) "\n // HTTP通信で追加" (type_identifier) "\n // HTTP" (ERROR) "通" (&) "通" (identifier) "で追加" ()) "す" (;) "る" (labeled_statement) "ダの配列 \n const char ** m_http_header_a" (statement_identifier) "ダの配列 \n " (:) "c" (declaration) "t char ** m_http_header_a" (type_identifier) "t char ** m_htt" (pointer_declarator) "p_header_" (*) "p" (identifier) "eader_" (;) "a" (comment) "ay; \n \nprivate: \n void freeHeader(); \n void freeJSonRes" (declaration) "t(); \n \n bool lua_c" (type_identifier) "t()" (identifier) "bool lua_" (;) "c" (comment) "llback(int msg, int status, " (declaration) "LBJsonItem * pRoot); " (type_identifier) "LBJ" (identifier) "m * pRoot);" (;) " " (declaration) " CKLBJsonItem * getJsonTree(co" (type_identifier) " CK" (identifier) "Item * getJsonTree(c" (;) "o" (declaration) " char * json_string," (primitive_type) " cha" (identifier) "son_string" (;) "," (comment) "u32 dataLen); \n bool get_token(CKLBJsonItem * pRoot); \n \npublic:" (declaration) " bool cancel (); \n}; \n " (type_identifier) " bool cancel" (pointer_declarator) " (); \n}; \n" (*) " " (identifier) "; \n}; \n" (;) " " (comment) "if // CKLBNetAPI_h \n" (declaration) "" (type_qualifier) "" (const) "" (primitive_type) "" (pointer_declarator) "" (*) "" (identifier) "" (;) "" (comment) "" (comment) "" (declaration) "" (type_qualifier) "" (const) "" (primitive_type) "" (pointer_declarator) "" (*) "" (pointer_declarator) "" (*) "" (identifier) "" (;) "" (labeled_statement) "" (statement_identifier) "" (:) "" (declaration) "" (primitive_type) "" (function_declarator) "" (identifier) "" (parameter_list) "" (() "" ()) "" (;) "" (declaration) "" (primitive_type) "" (function_declarator) "" (identifier) "" (parameter_list) "" (() "" ()) "" (;) "" (declaration) "" (primitive_type) "" (function_declarator) "" (identifier) "" (parameter_list) "" (() "" (parameter_declaration) "" (primitive_type) "" (identifier) "" (,) "" (parameter_declaration) "" (primitive_type) "" (identifier) "" (,) "" (parameter_declaration) "" (type_identifier) "" (pointer_declarator) "" (*) "" (identifier) "" ()) "" (;) "" (declaration) "" (type_identifier) "" (pointer_declarator) "" (*) "" (function_declarator) "" (identifier) "" (parameter_list) "" (() "" (parameter_declaration) "" (type_qualifier) "" (const) "" (primitive_type) "" (pointer_declarator) "" (*) "" (identifier) "" (,) "" (parameter_declaration) "" (type_identifier) "" (identifier) "" ()) "" (;) "" (declaration) "" (primitive_type) "" (function_declarator) "" (identifier) "" (parameter_list) "" (() "" (parameter_declaration) "" (type_identifier) "" (pointer_declarator) "" (*) "" (identifier) "" ()) "" (;) "" (labeled_statement) "" (statement_identifier) "" (:) "" (declaration) "" (primitive_type) "" (function_declarator) "" (identifier) "" (parameter_list) "" (() "" ()) "" (;) "" (}) "" (expression_statement) "" (;) "" (#endif) "" (comment) ""
385
5
{"language": "c", "success": true, "metadata": {"lines": 97, "avg_line_length": 25.62, "nodes": 256, "errors": 0, "source_hash": "8dec078b1ce26e83a25fc5493dd68affa05e7e049f7030d3207319893c4859f7", "categorized_nodes": 172}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "fndef CKLBNetAPI_h\r\n#define CKLBNetAPI_h\r\n\r\n#include \"CKLBLuaTask.h\"\r\n#include \"CKLBHTTPInterface.h\"\r\n#include \"CKLBJsonItem.h\"\r\n#include \"CKLBUtility.h\"\r\n#include \"MultithreadedNetwork.h\"\r\n\r\n// region\u3092\u6307\u5b9a\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u306e\u30c7\u30d5\u30a9\u30eb\u30c8region\u5024(ISO 3166-1)\r\n#define DEFAULT_REGION \"840\" // \u5317\u7c73\u30a2\u30e1\u30ea\u30ab\u5408\u8846\u56fd\r\n\r\n//// \u6307\u5b9a\u3057\u305d\u3046\u306a\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u66f8\u3044\u3066\u304a\u304f\u3002\r\n// #define DEFAULT_REGION \"392\" // \u65e5\u672c\r\n\r\n\r\nenum {\r\n\t// \u30e1\u30c3\u30bb\u30fc\u30b8\u5024\u5b9a\u7fa9\r\n\tNETAPIMSG_CONNECTION_CANCELED\t= -999,\t// \u30bb\u30c3\u30b7\u30e7\u30f3\u306f\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u305f\r\n\tNETAPIMSG_CONNECTION_FAILED\t\t= -500,\t// \u63a5\u7d9a\u306b\u5931\u6557\u3057\u305f\r\n\tRESERVED\t\t\t\t\t\t= -1,\t// \u30b5\u30fc\u30d0\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044/\u30b5\u30fc\u30d0\u304b\u3089\u306e\u30d1\u30b1\u30c3\u30c8\u3092\u89e3\u91c8\u3067\u304d\u306a\u3044\r\n\tNETAPIMSG_SERVER_TIMEOUT\t\t= -2,\t// \u30b5\u30fc\u30d0\u3068\u306e\u901a\u4fe1\u304c\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3057\u305f\r\n\tNETAPIMSG_SERVER_ERROR\t\t\t= 0,\r\n\tNETAPIMSG_REQUEST_SUCCESS\t\t= 1,\t// \u30ea\u30af\u30a8\u30b9\u30c8\u6210\u529f\u30b9\u30c6\u30fc\u30bf\u30b9\r\n};\r\n\r\n// Native\u5074\u304b\u3089API\u30bf\u30b9\u30af\u306b\u30b3\u30de\u30f3\u30c9\u3092\u767a\u884c\u3059\u308b\u305f\u3081\u306esingleton.\r\n// \r\nclass CKLBNetAPI;\r\n\r\n/*!\r\n* \\class CKLBNetAPI\r\n* \\brief Net API class.\r\n* \r\n* CKLBNetAPI is responsible Network communications.\r\n*/\r\nclass CKLBNetAPI : public CKLBLuaTask\r\n{\r\n\tfriend class CKLBTaskFactory<CKLBNetAPI>;\r\nprivate:\r\n\tCKLBNetAPI();\r\n\tvirtual ~CKLBNetAPI();\r\n\r\n\tbool init(\tCKLBTask* pTask, \r\n\t\t\t\tconst char * callback);\r\npublic:\r\n\tvirtual u32 getClassID();\r\n\tstatic CKLBNetAPI* create(\tCKLBTask* pParentTask, \r\n\t\t\t\t\t\t\t\tconst char * callback);\r\n\tvoid execute(u32 deltaT);\r\n\tvoid die();\r\n\r\n\tbool initScript(CLuaState& lua);\r\n\tint commandScript(CLuaState& lua);\r\nprivate:\r\n\tCKLBHTTPInterface*\t\tm_http;\t\t// \u305d\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u63a5\u7d9a\r\n\tu32\t\t\t\t\t\tm_timeout;\t// \u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u6642\u9593\r\n\tu32\t\t\t\t\t\tm_timestart;\r\n\tu32\t\t\t\t\t\tm_http_header_length;\r\n\tbool\t\t\t\t\tm_canceled;\t// \u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u308b\u3068 true \u306b\u306a\u308b\r\n\tCKLBJsonItem*\t\t\tm_pRoot;\r\n\r\n\t// \u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u7528\r\n\tconst char\t\t\t*\tm_callback;\t// Lua callback function\r\n\r\n\t// HTTP\u901a\u4fe1\u3067\u8ffd\u52a0\u3059\u308b\u30d8\u30c3\u30c0\u306e\u914d\u5217\r\n\tconst char\t\t\t**\tm_http_header_array;\r\n\r\nprivate:\r\n\tvoid freeHeader();\r\n\tvoid freeJSonResult();\r\n\r\n\tbool lua_callback(int msg, int status, CKLBJsonItem * pRoot);\r\n\r\n\tCKLBJsonItem * getJsonTree(const char * json_string, u32 dataLen);\r\n\tbool get_token(CKLBJsonItem * pRoot);\r\n\r\npublic:\r\n\tbool cancel\t\t();\r\n};\r\n\r\n#endif // CKLBNetAPI_h\r\n", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 25, 51, 54, 255], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 96, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "fndef C", "parent": 0, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 2, "type": "identifier", "text": "LBNetAPI_h\r\n", "parent": 0, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 20}}, {"id": 3, "type": "preproc_def", "text": "efine CKLBNetAPI_h\r\n\r\n", "parent": 0, "children": [4, 5], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 4, "type": "#define", "text": "efine C", "parent": 3, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 5, "type": "identifier", "text": "LBNetAPI_h\r\n", "parent": 3, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 20}}, {"id": 6, "type": "preproc_include", "text": "nclude \"CKLBLuaTask.h\"\r\n#i", "parent": 0, "children": [7, 8], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 7, "type": "#include", "text": "nclude \"", "parent": 6, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 8, "type": "string_literal", "text": "KLBLuaTask.h\"\r\n", "parent": 6, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 24}}, {"id": 9, "type": "preproc_include", "text": "nclude \"CKLBHTTPInterface.h\"\r\n#i", "parent": 0, "children": [10, 11], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 10, "type": "#include", "text": "nclude \"", "parent": 9, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 11, "type": "string_literal", "text": "KLBHTTPInterface.h\"\r\n", "parent": 9, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 30}}, {"id": 12, "type": "preproc_include", "text": "nclude \"CKLBJsonItem.h\"\r\n#i", "parent": 0, "children": [13, 14], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 13, "type": "#include", "text": "nclude \"", "parent": 12, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 14, "type": "string_literal", "text": "KLBJsonItem.h\"\r\n", "parent": 12, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 25}}, {"id": 15, "type": "preproc_include", "text": "nclude \"CKLBUtility.h\"\r\n#i", "parent": 0, "children": [16, 17], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 16, "type": "#include", "text": "nclude \"", "parent": 15, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 17, "type": "string_literal", "text": "KLBUtility.h\"\r\n", "parent": 15, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 24}}, {"id": 18, "type": "preproc_include", "text": "nclude \"MultithreadedNetwork.h\"\r\n\r\n", "parent": 0, "children": [19, 20], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 19, "type": "#include", "text": "nclude \"", "parent": 18, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 20, "type": "string_literal", "text": "ultithreadedNetwork.h\"\r\n", "parent": 18, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 33}}, {"id": 21, "type": "preproc_def", "text": "\u7c73\u30a2\u30e1\u30ea\u30ab\u5408\u8846\u56fd\r\n\r\n//// \u6307\u5b9a\u3057\u305d\u3046\u306a\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u66f8\u3044\u3066\u304a\u304f\u3002\r\n// #define DEFAUL", "parent": 0, "children": [22, 23, 24], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 22, "type": "#define", "text": "\u7c73\u30a2\u30e1\u30ea\u30ab\u5408\u8846", "parent": 21, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 23, "type": "identifier", "text": "\r\n\r\n//// \u6307\u5b9a\u3057\u305d\u3046", "parent": 21, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 22}}, {"id": 24, "type": "preproc_arg", "text": "\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u66f8\u3044\u3066\u304a\u304f\u3002\r\n// #define DEFAU", "parent": 21, "children": [], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 63}}, {"id": 25, "type": "enum_specifier", "text": "00,\t// \u63a5\u7d9a\u306b\u5931\u6557\u3057\u305f\r\n\tRESERVED\t\t\t\t\t\t= -1,\t// \u30b5\u30fc\u30d0\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044/\u30b5\u30fc\u30d0\u304b\u3089\u306e\u30d1\u30b1\u30c3\u30c8\u3092\u89e3\u91c8\u3067\u304d\u306a\u3044\r\n\tNETAPIMSG_SERVER_TIMEOUT\t\t= -2,\t// \u30b5\u30fc\u30d0\u3068\u306e\u901a\u4fe1\u304c\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3057\u305f\r\n\tNETAPIMSG_SERVER_ERROR\t\t\t= 0,\r\n\tNETAPIMSG_REQUEST_SUCCESS\t\t= 1,\t// \u30ea\u30af\u30a8\u30b9\u30c8\u6210\u529f\u30b9\u30c6\u30fc\u30bf\u30b9\r\n};\r\n\r\n// Native\u5074\u304b\u3089API\u30bf\u30b9\u30af\u306b\u30b3\u30de\u30f3\u30c9\u3092\u767a\u884c\u3059\u308b\u305f\u3081\u306esingleton.\r\n// \r\nclass CKLBNetAPI;\r\n\r\n/*!\r\n* \\class CKLBNetAPI\r\n* \\brief Net API class.\r\n* \r\n* CKLBNetAPI is responsible Network communications.\r\n*/\r\nclass CKLBNetAPI : public CKLBLuaTask\r\n{\r\n\tfriend class CKLBTaskFactory<CKLBNetAPI>;\r\nprivate:\r\n\tCKL", "parent": 0, "children": [26, 27], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 26, "type": "enum", "text": "00,\t", "parent": 25, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 4}}, {"id": 27, "type": "enumerator_list", "text": "/ \u63a5\u7d9a\u306b\u5931\u6557\u3057\u305f\r\n\tRESERVED\t\t\t\t\t\t= -1,\t// \u30b5\u30fc\u30d0\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044/\u30b5\u30fc\u30d0\u304b\u3089\u306e\u30d1\u30b1\u30c3\u30c8\u3092\u89e3\u91c8\u3067\u304d\u306a\u3044\r\n\tNETAPIMSG_SERVER_TIMEOUT\t\t= -2,\t// \u30b5\u30fc\u30d0\u3068\u306e\u901a\u4fe1\u304c\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3057\u305f\r\n\tNETAPIMSG_SERVER_ERROR\t\t\t= 0,\r\n\tNETAPIMSG_REQUEST_SUCCESS\t\t= 1,\t// \u30ea\u30af\u30a8\u30b9\u30c8\u6210\u529f\u30b9\u30c6\u30fc\u30bf\u30b9\r\n};\r\n\r\n// Native\u5074\u304b\u3089API\u30bf\u30b9\u30af\u306b\u30b3\u30de\u30f3\u30c9\u3092\u767a\u884c\u3059\u308b\u305f\u3081\u306esingleton.\r\n// \r\nclass CKLBNetAPI;\r\n\r\n/*!\r\n* \\class CKLBNetAPI\r\n* \\brief Net API class.\r\n* \r\n* CKLBNetAPI is responsible Network communications.\r\n*/\r\nclass CKLBNetAPI : public CKLBLuaTask\r\n{\r\n\tfriend class CKLBTaskFactory<CKLBNetAPI>;\r\nprivate:\r\n\tCKL", "parent": 25, "children": [28, 32, 36, 40, 43, 47], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 39, "column": 1}}, {"id": 28, "type": "enumerator", "text": " \u30b5\u30fc\u30d0\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044/\u30b5\u30fc\u30d0\u304b\u3089\u306e\u30d1\u30b1\u30c3\u30c8\u3092\u89e3\u91c8\u3067\u304d\u306a\u3044\r\n\tNE", "parent": 27, "children": [29, 30, 31], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 37}}, {"id": 29, "type": "identifier", "text": " \u30b5\u30fc\u30d0\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044/\u30b5\u30fc\u30d0\u304b\u3089\u306e\u30d1\u30b1\u30c3\u30c8\u3092\u89e3\u91c8\u3067\u304d", "parent": 28, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 30}}, {"id": 30, "type": "=", "text": "\u3044", "parent": 28, "children": [], "start_point": {"row": 33, "column": 31}, "end_point": {"row": 33, "column": 32}}, {"id": 31, "type": "number_literal", "text": "\n\tNE", "parent": 28, "children": [], "start_point": {"row": 33, "column": 33}, "end_point": {"row": 33, "column": 37}}, {"id": 32, "type": "enumerator", "text": "\n\tNETAPIMSG_SERVER_ERROR\t\t\t= 0,\r\n\tN", "parent": 27, "children": [33, 34, 35], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 36}}, {"id": 33, "type": "identifier", "text": "\n\tNETAPIMSG_SERVER_ERROR\t\t\t", "parent": 32, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 28}}, {"id": 34, "type": "=", "text": "0", "parent": 32, "children": [], "start_point": {"row": 34, "column": 30}, "end_point": {"row": 34, "column": 31}}, {"id": 35, "type": "number_literal", "text": "\r\n\tN", "parent": 32, "children": [], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 36}}, {"id": 36, "type": "enumerator", "text": ",\t// \u30ea\u30af\u30a8\u30b9\u30c8\u6210\u529f\u30b9\u30c6\u30fc\u30bf\u30b9\r", "parent": 27, "children": [37, 38, 39], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 19}}, {"id": 37, "type": "identifier", "text": ",\t// \u30ea\u30af\u30a8", "parent": 36, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 9}}, {"id": 38, "type": "=", "text": "\u30fc", "parent": 36, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 16}}, {"id": 39, "type": "number_literal", "text": "\u30b9\r", "parent": 36, "children": [], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 19}}, {"id": 40, "type": "enumerator", "text": "tAPI\r\n* \\brief Net API class.\r", "parent": 27, "children": [41, 42], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 31}}, {"id": 41, "type": "identifier", "text": "tAPI\r\n* \\brief Net API c", "parent": 40, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 25}}, {"id": 42, "type": "=", "text": "s", "parent": 40, "children": [], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 28}}, {"id": 43, "type": "enumerator", "text": "\r\n*/\r\nclass CKLBNetAPI : pub", "parent": 27, "children": [44, 45, 46], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 29}}, {"id": 44, "type": "identifier", "text": "\r\n*/\r\nclass CKLBNetAPI", "parent": 43, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 23}}, {"id": 45, "type": "=", "text": "p", "parent": 43, "children": [], "start_point": {"row": 37, "column": 26}, "end_point": {"row": 37, "column": 27}}, {"id": 46, "type": "number_literal", "text": "b", "parent": 43, "children": [], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 29}}, {"id": 47, "type": "enumerator", "text": "CKLBLuaTask\r\n{\r\n\tfriend class ", "parent": 27, "children": [48, 49, 50], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 31}}, {"id": 48, "type": "identifier", "text": "CKLBLuaTask\r\n{\r\n\tfriend c", "parent": 47, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 26}}, {"id": 49, "type": "=", "text": "s", "parent": 47, "children": [], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 29}}, {"id": 50, "type": "number_literal", "text": " ", "parent": 47, "children": [], "start_point": {"row": 38, "column": 30}, "end_point": {"row": 38, "column": 31}}, {"id": 51, "type": "declaration", "text": "back);\r\npublic:\r\n", "parent": 0, "children": [52, 53], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 17}}, {"id": 52, "type": "type_identifier", "text": "back)", "parent": 51, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 5}}, {"id": 53, "type": "identifier", "text": "\r\npublic:\r", "parent": 51, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 16}}, {"id": 54, "type": "function_definition", "text": "oid execute(u32 deltaT);\r\n\tvoid die();\r\n\r\n\tbool initScript(CLuaState& lua);\r\n\tint commandScript(CLuaState& lua);\r\nprivate:\r\n\tCKLBHTTPInterface*\t\tm_http;\t\t// \u305d\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u63a5\u7d9a\r\n\tu32\t\t\t\t\t\tm_timeout;\t// \u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u6642\u9593\r\n\tu32\t\t\t\t\t\tm_timestart;\r\n\tu32\t\t\t\t\t\tm_http_header_length;\r\n\tbool\t\t\t\t\tm_canceled;\t// \u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u308b\u3068 true \u306b\u306a\u308b\r\n\tCKLBJsonItem*\t\t\tm_pRoot;\r\n\r\n\t// \u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u7528\r\n\tconst char\t\t\t*\tm_callback;\t// Lua callback function\r\n\r\n\t// HTTP\u901a\u4fe1\u3067\u8ffd\u52a0\u3059\u308b\u30d8\u30c3\u30c0\u306e\u914d\u5217\r\n\tconst char\t\t\t**\tm_http_header_array;\r\n\r\nprivate:\r\n\tvoid freeHeader();\r\n\tvoid freeJSonResult();\r\n\r\n\tbool lua_callback(int msg, int status, CKLBJsonItem * pRoot);\r\n\r\n\tCKLBJsonItem * getJsonTree(const char * json_string, u32 dataLen);\r\n\tbool get_token(CKLBJsonItem * pRoot);\r\n\r\npublic:\r\n\tbool cancel\t\t();\r\n};\r\n\r\n#endif // CKLBNetAPI_h\r\n", "parent": 0, "children": [55, 56, 59], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 94, "column": 1}}, {"id": 55, "type": "type_identifier", "text": "oid e", "parent": 54, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 5}}, {"id": 56, "type": "ERROR", "text": "ecute(u32 deltaT);\r", "parent": 54, "children": [57, 58], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 25}}, {"id": 57, "type": "identifier", "text": "ecute(u32 ", "parent": 56, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 16}}, {"id": 58, "type": "identifier", "text": "taT);\r", "parent": 56, "children": [], "start_point": {"row": 51, "column": 19}, "end_point": {"row": 51, "column": 25}}, {"id": 59, "type": "identifier", "text": "\tvoid die()", "parent": 54, "children": [], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 51, "column": 37}}, {"id": 60, "type": "declaration", "text": "bool initScr", "parent": 54, "children": [61, 62], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 13}}, {"id": 61, "type": "type_identifier", "text": "bool i", "parent": 60, "children": [], "start_point": {"row": 53, "column": 1}, "end_point": {"row": 53, "column": 7}}, {"id": 62, "type": "identifier", "text": "itScr", "parent": 60, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 13}}, {"id": 63, "type": "binary_expression", "text": "pt(CLuaState& lua);\r\n\tint c", "parent": 54, "children": [64, 68, 69], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 41}}, {"id": 64, "type": "binary_expression", "text": "pt(CLuaState& lua);\r\n\tint ", "parent": 63, "children": [65, 66, 67], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 40}}, {"id": 65, "type": "identifier", "text": "pt(CLuaState& l", "parent": 64, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 29}}, {"id": 66, "type": "<", "text": "u", "parent": 64, "children": [], "start_point": {"row": 53, "column": 29}, "end_point": {"row": 53, "column": 30}}, {"id": 67, "type": "identifier", "text": "a);\r\n\tint ", "parent": 64, "children": [], "start_point": {"row": 53, "column": 30}, "end_point": {"row": 53, "column": 40}}, {"id": 68, "type": ">", "text": "c", "parent": 63, "children": [], "start_point": {"row": 53, "column": 40}, "end_point": {"row": 53, "column": 41}}, {"id": 69, "type": "identifier", "text": "", "parent": 63, "children": [], "start_point": {"row": 53, "column": 41}, "end_point": {"row": 53, "column": 41}}, {"id": 70, "type": "labeled_statement", "text": "andScript(CLuaState& lua", "parent": 54, "children": [71], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 55, "column": 14}}, {"id": 71, "type": "statement_identifier", "text": "andScri", "parent": 70, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 7}}, {"id": 72, "type": "call_expression", "text": "LuaState& lu", "parent": 70, "children": [73, 74], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 13}}, {"id": 73, "type": "identifier", "text": "LuaState& ", "parent": 72, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 11}}, {"id": 74, "type": "argument_list", "text": "lu", "parent": 72, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 13}}, {"id": 75, "type": "declaration", "text": "\nprivate:\r\n\tCKLBHTTPIn", "parent": 54, "children": [76, 77], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 23}}, {"id": 76, "type": "type_identifier", "text": "\nprivat", "parent": 75, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 8}}, {"id": 77, "type": "function_declarator", "text": "\r\n\tCKLBHTTPI", "parent": 75, "children": [78, 79], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 22}}, {"id": 78, "type": "identifier", "text": "\r\n\tCKLBHTT", "parent": 77, "children": [], "start_point": {"row": 56, "column": 10}, "end_point": {"row": 56, "column": 20}}, {"id": 79, "type": "parameter_list", "text": "PI", "parent": 77, "children": [], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 22}}, {"id": 80, "type": "declaration", "text": "ce*\t\tm_http;\t\t// \u305d\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u63a5\u7d9a\r\n\tu32\t\t\t\t\t\tm_timeout;\t", "parent": 54, "children": [81, 82], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 59, "column": 27}}, {"id": 81, "type": "primitive_type", "text": "ce*\t", "parent": 80, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 5}}, {"id": 82, "type": "function_declarator", "text": "m_http;\t\t// \u305d\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u63a5\u7d9a\r\n\tu32\t\t\t\t\t\tm_timeout;", "parent": 80, "children": [83, 84], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 59, "column": 26}}, {"id": 83, "type": "identifier", "text": "m_ht", "parent": 82, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 10}}, {"id": 84, "type": "parameter_list", "text": "tp;\t\t// \u305d\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u63a5\u7d9a\r\n\tu32\t\t\t\t\t\tm_timeout;", "parent": 82, "children": [85, 90], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 59, "column": 26}}, {"id": 85, "type": "parameter_declaration", "text": ";\t\t// \u305d\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u3067\u4f7f", "parent": 84, "children": [86, 87], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 27}}, {"id": 86, "type": "type_identifier", "text": ";\t\t// \u305d\u306e", "parent": 85, "children": [], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 20}}, {"id": 87, "type": "pointer_declarator", "text": "\u30bb\u30c3\u30b7\u30e7\u30f3\u3067\u4f7f", "parent": 85, "children": [88, 89], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 27}}, {"id": 88, "type": "*", "text": "\u30bb", "parent": 87, "children": [], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 21}}, {"id": 89, "type": "identifier", "text": "\u30b7\u30e7\u30f3\u3067\u4f7f", "parent": 87, "children": [], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 27}}, {"id": 90, "type": "parameter_declaration", "text": "\r\n\tu32\t\t\t\t\t\tm_timeout", "parent": 84, "children": [91, 92, 93], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 25}}, {"id": 91, "type": "type_qualifier", "text": "\r\n\tu3", "parent": 90, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 9}}, {"id": 92, "type": "primitive_type", "text": "\t\t\t\t", "parent": 90, "children": [], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 14}}, {"id": 93, "type": "pointer_declarator", "text": "\tm_timeout", "parent": 90, "children": [94, 95], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 25}}, {"id": 94, "type": "*", "text": "\t", "parent": 93, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 16}}, {"id": 95, "type": "identifier", "text": "_timeout", "parent": 93, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 25}}, {"id": 96, "type": "labeled_statement", "text": " \u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u6642\u9593\r\n\tu32\t\t\t\t\t\tm_timestart;\r\n", "parent": 54, "children": [97, 98], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 61, "column": 26}}, {"id": 97, "type": "statement_identifier", "text": " \u30bf\u30a4\u30e0\u30a2\u30a6", "parent": 96, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 6}}, {"id": 98, "type": "declaration", "text": "\n\tu32\t\t\t\t\t\tm_timestart;\r\n", "parent": 96, "children": [99, 100, 102], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 26}}, {"id": 99, "type": "type_identifier", "text": "\n\tu32\t\t", "parent": 98, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 8}}, {"id": 100, "type": "ERROR", "text": "\t\t\t", "parent": 98, "children": [101], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 12}}, {"id": 101, "type": "identifier", "text": "\t\t\t", "parent": 100, "children": [], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 12}}, {"id": 102, "type": "function_declarator", "text": "_timestart;\r", "parent": 98, "children": [103], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 25}}, {"id": 103, "type": "identifier", "text": "_timestart", "parent": 102, "children": [], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 23}}, {"id": 104, "type": "declaration", "text": "2\t\t\t\t\t\tm_http_header_length;\r\n\tbool\t\t\t\t\tm_canceled;\t// \u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u308b\u3068 true \u306b\u306a\u308b\r\n\tC", "parent": 54, "children": [105, 106, 107], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 63, "column": 31}}, {"id": 105, "type": "storage_class_specifier", "text": "2\t\t\t\t\t", "parent": 104, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 7}}, {"id": 106, "type": "type_identifier", "text": "m_http_hea", "parent": 104, "children": [], "start_point": {"row": 62, "column": 8}, "end_point": {"row": 62, "column": 18}}, {"id": 107, "type": "pointer_declarator", "text": "der_length;\r\n\tbool\t\t\t\t\tm_canceled;\t// \u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u308b\u3068 true \u306b\u306a\u308b\r\n\t", "parent": 104, "children": [108, 109], "start_point": {"row": 62, "column": 18}, "end_point": {"row": 63, "column": 30}}, {"id": 108, "type": "*", "text": "d", "parent": 107, "children": [], "start_point": {"row": 62, "column": 18}, "end_point": {"row": 62, "column": 19}}, {"id": 109, "type": "function_declarator", "text": "r_length;\r\n\tbool\t\t\t\t\tm_canceled;\t// \u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u308b\u3068 true \u306b\u306a\u308b\r\n\t", "parent": 107, "children": [110, 111], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 63, "column": 30}}, {"id": 110, "type": "identifier", "text": "r_leng", "parent": 109, "children": [], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 26}}, {"id": 111, "type": "parameter_list", "text": "th;\r\n\tbool\t\t\t\t\tm_canceled;\t// \u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u308b\u3068 true \u306b\u306a\u308b\r\n\t", "parent": 109, "children": [112, 117], "start_point": {"row": 62, "column": 26}, "end_point": {"row": 63, "column": 30}}, {"id": 112, "type": "parameter_declaration", "text": ";\r\n\tbool\t\t\t\t\tm_cancel", "parent": 111, "children": [113, 114], "start_point": {"row": 62, "column": 28}, "end_point": {"row": 62, "column": 49}}, {"id": 113, "type": "type_identifier", "text": ";\r\n\tbool", "parent": 112, "children": [], "start_point": {"row": 62, "column": 28}, "end_point": {"row": 62, "column": 36}}, {"id": 114, "type": "pointer_declarator", "text": "\t\t\t\t\tm_cancel", "parent": 112, "children": [115, 116], "start_point": {"row": 62, "column": 36}, "end_point": {"row": 62, "column": 49}}, {"id": 115, "type": "*", "text": "\t", "parent": 114, "children": [], "start_point": {"row": 62, "column": 36}, "end_point": {"row": 62, "column": 37}}, {"id": 116, "type": "identifier", "text": "\t\t\tm_cancel", "parent": 114, "children": [], "start_point": {"row": 62, "column": 38}, "end_point": {"row": 62, "column": 49}}, {"id": 117, "type": "parameter_declaration", "text": "\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u308b\u3068 true \u306b\u306a\u308b\r\n", "parent": 111, "children": [118, 119, 120], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 29}}, {"id": 118, "type": "type_qualifier", "text": "\u304c\u30ad\u30e3\u30f3\u30bb", "parent": 117, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 13}}, {"id": 119, "type": "primitive_type", "text": "\u3055\u308c\u308b\u3068", "parent": 117, "children": [], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 18}}, {"id": 120, "type": "pointer_declarator", "text": "true \u306b\u306a\u308b\r\n", "parent": 117, "children": [121, 122], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 29}}, {"id": 121, "type": "*", "text": "t", "parent": 120, "children": [], "start_point": {"row": 63, "column": 19}, "end_point": {"row": 63, "column": 20}}, {"id": 122, "type": "identifier", "text": "ue \u306b\u306a\u308b\r\n", "parent": 120, "children": [], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 29}}, {"id": 123, "type": "declaration", "text": "JsonItem*\t\t\tm_pRoot;\r\n\r\n\t", "parent": 54, "children": [124, 125], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 26}}, {"id": 124, "type": "primitive_type", "text": "Json", "parent": 123, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 5}}, {"id": 125, "type": "function_declarator", "text": "tem*\t\t\tm_pRoot;\r\n\r\n", "parent": 123, "children": [126, 127], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 25}}, {"id": 126, "type": "identifier", "text": "tem*\t\t\t", "parent": 125, "children": [], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 13}}, {"id": 127, "type": "parameter_list", "text": "m_pRoot;\r\n\r\n", "parent": 125, "children": [128], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 25}}, {"id": 128, "type": "parameter_declaration", "text": "_pRoot;\r\n\r", "parent": 127, "children": [129, 130], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 24}}, {"id": 129, "type": "type_identifier", "text": "_pR", "parent": 128, "children": [], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 17}}, {"id": 130, "type": "identifier", "text": "ot;\r\n\r", "parent": 128, "children": [], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 24}}, {"id": 131, "type": "declaration", "text": "\u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30eb\u30d0\u30c3\u30af", "parent": 54, "children": [132, 133], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 12}}, {"id": 132, "type": "primitive_type", "text": "\u30b9\u30af\u30ea\u30d7", "parent": 131, "children": [], "start_point": {"row": 65, "column": 1}, "end_point": {"row": 65, "column": 5}}, {"id": 133, "type": "function_declarator", "text": "\u30b3\u30fc\u30eb\u30d0\u30c3", "parent": 131, "children": [134, 135], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 11}}, {"id": 134, "type": "identifier", "text": "\u30b3\u30fc\u30eb", "parent": 133, "children": [], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 9}}, {"id": 135, "type": "parameter_list", "text": "\u30d0\u30c3", "parent": 133, "children": [], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 11}}, {"id": 136, "type": "declaration", "text": "onst char\t\t\t*\tm_callback;\t// Lua", "parent": 54, "children": [137, 138], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 33}}, {"id": 137, "type": "primitive_type", "text": "onst", "parent": 136, "children": [], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 5}}, {"id": 138, "type": "function_declarator", "text": "char\t\t\t*\tm_callback;\t// Lu", "parent": 136, "children": [139, 140], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 32}}, {"id": 139, "type": "identifier", "text": "char\t\t\t*\tm", "parent": 138, "children": [], "start_point": {"row": 67, "column": 6}, "end_point": {"row": 67, "column": 16}}, {"id": 140, "type": "parameter_list", "text": "_callback;\t// Lu", "parent": 138, "children": [141], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 32}}, {"id": 141, "type": "parameter_declaration", "text": "callback;\t// L", "parent": 140, "children": [142, 143, 145], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 31}}, {"id": 142, "type": "type_identifier", "text": "callback;", "parent": 141, "children": [], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 26}}, {"id": 143, "type": "ERROR", "text": "\t", "parent": 141, "children": [144], "start_point": {"row": 67, "column": 26}, "end_point": {"row": 67, "column": 27}}, {"id": 144, "type": "&", "text": "\t", "parent": 143, "children": [], "start_point": {"row": 67, "column": 26}, "end_point": {"row": 67, "column": 27}}, {"id": 145, "type": "identifier", "text": "/ L", "parent": 141, "children": [], "start_point": {"row": 67, "column": 28}, "end_point": {"row": 67, "column": 31}}, {"id": 146, "type": "declaration", "text": "llback function\r\n\r\n\t// HTTP\u901a\u4fe1\u3067\u8ffd\u52a0\u3059\u308b", "parent": 54, "children": [147, 148], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 35}}, {"id": 147, "type": "primitive_type", "text": "llb", "parent": 146, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 4}}, {"id": 148, "type": "function_declarator", "text": "ck function\r\n\r\n\t// HTTP\u901a\u4fe1\u3067\u8ffd\u52a0\u3059", "parent": 146, "children": [149, 150], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 34}}, {"id": 149, "type": "identifier", "text": "ck function\r\n", "parent": 148, "children": [], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 18}}, {"id": 150, "type": "parameter_list", "text": "\r\n\t// HTTP\u901a\u4fe1\u3067\u8ffd\u52a0\u3059", "parent": 148, "children": [151], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 34}}, {"id": 151, "type": "parameter_declaration", "text": "\n\t// HTTP\u901a\u4fe1\u3067\u8ffd\u52a0", "parent": 150, "children": [152, 153, 155], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 33}}, {"id": 152, "type": "type_identifier", "text": "\n\t// HTTP", "parent": 151, "children": [], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 28}}, {"id": 153, "type": "ERROR", "text": "\u901a", "parent": 151, "children": [154], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 29}}, {"id": 154, "type": "&", "text": "\u901a", "parent": 153, "children": [], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 29}}, {"id": 155, "type": "identifier", "text": "\u3067\u8ffd\u52a0", "parent": 151, "children": [], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 33}}, {"id": 156, "type": "labeled_statement", "text": "\u30c0\u306e\u914d\u5217\r\n\tconst char\t\t\t**\tm_http_header_a", "parent": 54, "children": [157, 158], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 70, "column": 28}}, {"id": 157, "type": "statement_identifier", "text": "\u30c0\u306e\u914d\u5217\r\n\t", "parent": 156, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 7}}, {"id": 158, "type": "declaration", "text": "t char\t\t\t**\tm_http_header_a", "parent": 156, "children": [159, 160], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 28}}, {"id": 159, "type": "type_identifier", "text": "t char\t\t\t**\tm_htt", "parent": 158, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 18}}, {"id": 160, "type": "pointer_declarator", "text": "p_header_", "parent": 158, "children": [161, 162], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 27}}, {"id": 161, "type": "*", "text": "p", "parent": 160, "children": [], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 19}}, {"id": 162, "type": "identifier", "text": "eader_", "parent": 160, "children": [], "start_point": {"row": 70, "column": 21}, "end_point": {"row": 70, "column": 27}}, {"id": 163, "type": "declaration", "text": "t();\r\n\r\n\tbool lua_c", "parent": 54, "children": [164, 165], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 20}}, {"id": 164, "type": "type_identifier", "text": "t()", "parent": 163, "children": [], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 71, "column": 4}}, {"id": 165, "type": "identifier", "text": "bool lua_", "parent": 163, "children": [], "start_point": {"row": 71, "column": 10}, "end_point": {"row": 71, "column": 19}}, {"id": 166, "type": "declaration", "text": "LBJsonItem * pRoot);\r", "parent": 54, "children": [167, 168], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 22}}, {"id": 167, "type": "type_identifier", "text": "LBJ", "parent": 166, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 4}}, {"id": 168, "type": "identifier", "text": "m * pRoot);", "parent": 166, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 21}}, {"id": 169, "type": "declaration", "text": "\tCKLBJsonItem * getJsonTree(co", "parent": 54, "children": [170, 171], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 31}}, {"id": 170, "type": "type_identifier", "text": "\tCK", "parent": 169, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 4}}, {"id": 171, "type": "identifier", "text": "Item * getJsonTree(c", "parent": 169, "children": [], "start_point": {"row": 73, "column": 10}, "end_point": {"row": 73, "column": 30}}, {"id": 172, "type": "declaration", "text": " char * json_string,", "parent": 54, "children": [173, 174], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 21}}, {"id": 173, "type": "primitive_type", "text": " cha", "parent": 172, "children": [], "start_point": {"row": 74, "column": 1}, "end_point": {"row": 74, "column": 5}}, {"id": 174, "type": "identifier", "text": "son_string", "parent": 172, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 20}}, {"id": 175, "type": "declaration", "text": "\tbool cancel\t\t();\r\n};\r\n\r", "parent": 54, "children": [176, 177], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 25}}, {"id": 176, "type": "type_identifier", "text": "\tbool cancel", "parent": 175, "children": [], "start_point": {"row": 75, "column": 1}, "end_point": {"row": 75, "column": 13}}, {"id": 177, "type": "pointer_declarator", "text": "\t\t();\r\n};\r\n", "parent": 175, "children": [178, 179], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 24}}, {"id": 178, "type": "*", "text": "\t", "parent": 177, "children": [], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 14}}, {"id": 179, "type": "identifier", "text": ";\r\n};\r\n", "parent": 177, "children": [], "start_point": {"row": 75, "column": 17}, "end_point": {"row": 75, "column": 24}}, {"id": 180, "type": "declaration", "text": "", "parent": 54, "children": [181, 182, 183], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 27}}, {"id": 181, "type": "type_qualifier", "text": "", "parent": 180, "children": [], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 78, "column": 6}}, {"id": 182, "type": "primitive_type", "text": "", "parent": 180, "children": [], "start_point": {"row": 78, "column": 7}, "end_point": {"row": 78, "column": 11}}, {"id": 183, "type": "pointer_declarator", "text": "", "parent": 180, "children": [184, 185], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 26}}, {"id": 184, "type": "*", "text": "", "parent": 183, "children": [], "start_point": {"row": 78, "column": 14}, "end_point": {"row": 78, "column": 15}}, {"id": 185, "type": "identifier", "text": "", "parent": 183, "children": [], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 26}}, {"id": 186, "type": "declaration", "text": "", "parent": 54, "children": [187, 188, 189], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 37}}, {"id": 187, "type": "type_qualifier", "text": "", "parent": 186, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 6}}, {"id": 188, "type": "primitive_type", "text": "", "parent": 186, "children": [], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 11}}, {"id": 189, "type": "pointer_declarator", "text": "", "parent": 186, "children": [190, 191], "start_point": {"row": 81, "column": 14}, "end_point": {"row": 81, "column": 36}}, {"id": 190, "type": "*", "text": "", "parent": 189, "children": [], "start_point": {"row": 81, "column": 14}, "end_point": {"row": 81, "column": 15}}, {"id": 191, "type": "pointer_declarator", "text": "", "parent": 189, "children": [192, 193], "start_point": {"row": 81, "column": 15}, "end_point": {"row": 81, "column": 36}}, {"id": 192, "type": "*", "text": "", "parent": 191, "children": [], "start_point": {"row": 81, "column": 15}, "end_point": {"row": 81, "column": 16}}, {"id": 193, "type": "identifier", "text": "", "parent": 191, "children": [], "start_point": {"row": 81, "column": 17}, "end_point": {"row": 81, "column": 36}}, {"id": 194, "type": "labeled_statement", "text": "", "parent": 54, "children": [195, 196], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 84, "column": 19}}, {"id": 195, "type": "statement_identifier", "text": "", "parent": 194, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 7}}, {"id": 196, "type": "declaration", "text": "", "parent": 194, "children": [197, 198], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 19}}, {"id": 197, "type": "primitive_type", "text": "", "parent": 196, "children": [], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 5}}, {"id": 198, "type": "function_declarator", "text": "", "parent": 196, "children": [199, 200], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 18}}, {"id": 199, "type": "identifier", "text": "", "parent": 198, "children": [], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 16}}, {"id": 200, "type": "parameter_list", "text": "", "parent": 198, "children": [], "start_point": {"row": 84, "column": 16}, "end_point": {"row": 84, "column": 18}}, {"id": 201, "type": "declaration", "text": "", "parent": 54, "children": [202, 203], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 23}}, {"id": 202, "type": "primitive_type", "text": "", "parent": 201, "children": [], "start_point": {"row": 85, "column": 1}, "end_point": {"row": 85, "column": 5}}, {"id": 203, "type": "function_declarator", "text": "", "parent": 201, "children": [204, 205], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 22}}, {"id": 204, "type": "identifier", "text": "", "parent": 203, "children": [], "start_point": {"row": 85, "column": 6}, "end_point": {"row": 85, "column": 20}}, {"id": 205, "type": "parameter_list", "text": "", "parent": 203, "children": [], "start_point": {"row": 85, "column": 20}, "end_point": {"row": 85, "column": 22}}, {"id": 206, "type": "declaration", "text": "", "parent": 54, "children": [207, 208], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 62}}, {"id": 207, "type": "primitive_type", "text": "", "parent": 206, "children": [], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 87, "column": 5}}, {"id": 208, "type": "function_declarator", "text": "", "parent": 206, "children": [209, 210], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 61}}, {"id": 209, "type": "identifier", "text": "", "parent": 208, "children": [], "start_point": {"row": 87, "column": 6}, "end_point": {"row": 87, "column": 18}}, {"id": 210, "type": "parameter_list", "text": "", "parent": 208, "children": [211, 214, 217], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 61}}, {"id": 211, "type": "parameter_declaration", "text": "", "parent": 210, "children": [212, 213], "start_point": {"row": 87, "column": 19}, "end_point": {"row": 87, "column": 26}}, {"id": 212, "type": "primitive_type", "text": "", "parent": 211, "children": [], "start_point": {"row": 87, "column": 19}, "end_point": {"row": 87, "column": 22}}, {"id": 213, "type": "identifier", "text": "", "parent": 211, "children": [], "start_point": {"row": 87, "column": 23}, "end_point": {"row": 87, "column": 26}}, {"id": 214, "type": "parameter_declaration", "text": "", "parent": 210, "children": [215, 216], "start_point": {"row": 87, "column": 28}, "end_point": {"row": 87, "column": 38}}, {"id": 215, "type": "primitive_type", "text": "", "parent": 214, "children": [], "start_point": {"row": 87, "column": 28}, "end_point": {"row": 87, "column": 31}}, {"id": 216, "type": "identifier", "text": "", "parent": 214, "children": [], "start_point": {"row": 87, "column": 32}, "end_point": {"row": 87, "column": 38}}, {"id": 217, "type": "parameter_declaration", "text": "", "parent": 210, "children": [218, 219], "start_point": {"row": 87, "column": 40}, "end_point": {"row": 87, "column": 60}}, {"id": 218, "type": "type_identifier", "text": "", "parent": 217, "children": [], "start_point": {"row": 87, "column": 40}, "end_point": {"row": 87, "column": 52}}, {"id": 219, "type": "pointer_declarator", "text": "", "parent": 217, "children": [220, 221], "start_point": {"row": 87, "column": 53}, "end_point": {"row": 87, "column": 60}}, {"id": 220, "type": "*", "text": "", "parent": 219, "children": [], "start_point": {"row": 87, "column": 53}, "end_point": {"row": 87, "column": 54}}, {"id": 221, "type": "identifier", "text": "", "parent": 219, "children": [], "start_point": {"row": 87, "column": 55}, "end_point": {"row": 87, "column": 60}}, {"id": 222, "type": "declaration", "text": "", "parent": 54, "children": [223, 224], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 67}}, {"id": 223, "type": "type_identifier", "text": "", "parent": 222, "children": [], "start_point": {"row": 89, "column": 1}, "end_point": {"row": 89, "column": 13}}, {"id": 224, "type": "pointer_declarator", "text": "", "parent": 222, "children": [225, 226], "start_point": {"row": 89, "column": 14}, "end_point": {"row": 89, "column": 66}}, {"id": 225, "type": "*", "text": "", "parent": 224, "children": [], "start_point": {"row": 89, "column": 14}, "end_point": {"row": 89, "column": 15}}, {"id": 226, "type": "function_declarator", "text": "", "parent": 224, "children": [227, 228], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 66}}, {"id": 227, "type": "identifier", "text": "", "parent": 226, "children": [], "start_point": {"row": 89, "column": 16}, "end_point": {"row": 89, "column": 27}}, {"id": 228, "type": "parameter_list", "text": "", "parent": 226, "children": [229, 235], "start_point": {"row": 89, "column": 27}, "end_point": {"row": 89, "column": 66}}, {"id": 229, "type": "parameter_declaration", "text": "", "parent": 228, "children": [230, 231, 232], "start_point": {"row": 89, "column": 28}, "end_point": {"row": 89, "column": 52}}, {"id": 230, "type": "type_qualifier", "text": "", "parent": 229, "children": [], "start_point": {"row": 89, "column": 28}, "end_point": {"row": 89, "column": 33}}, {"id": 231, "type": "primitive_type", "text": "", "parent": 229, "children": [], "start_point": {"row": 89, "column": 34}, "end_point": {"row": 89, "column": 38}}, {"id": 232, "type": "pointer_declarator", "text": "", "parent": 229, "children": [233, 234], "start_point": {"row": 89, "column": 39}, "end_point": {"row": 89, "column": 52}}, {"id": 233, "type": "*", "text": "", "parent": 232, "children": [], "start_point": {"row": 89, "column": 39}, "end_point": {"row": 89, "column": 40}}, {"id": 234, "type": "identifier", "text": "", "parent": 232, "children": [], "start_point": {"row": 89, "column": 41}, "end_point": {"row": 89, "column": 52}}, {"id": 235, "type": "parameter_declaration", "text": "", "parent": 228, "children": [236, 237], "start_point": {"row": 89, "column": 54}, "end_point": {"row": 89, "column": 65}}, {"id": 236, "type": "type_identifier", "text": "", "parent": 235, "children": [], "start_point": {"row": 89, "column": 54}, "end_point": {"row": 89, "column": 57}}, {"id": 237, "type": "identifier", "text": "", "parent": 235, "children": [], "start_point": {"row": 89, "column": 58}, "end_point": {"row": 89, "column": 65}}, {"id": 238, "type": "declaration", "text": "", "parent": 54, "children": [239, 240], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 38}}, {"id": 239, "type": "primitive_type", "text": "", "parent": 238, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 5}}, {"id": 240, "type": "function_declarator", "text": "", "parent": 238, "children": [241, 242], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 37}}, {"id": 241, "type": "identifier", "text": "", "parent": 240, "children": [], "start_point": {"row": 90, "column": 6}, "end_point": {"row": 90, "column": 15}}, {"id": 242, "type": "parameter_list", "text": "", "parent": 240, "children": [243], "start_point": {"row": 90, "column": 15}, "end_point": {"row": 90, "column": 37}}, {"id": 243, "type": "parameter_declaration", "text": "", "parent": 242, "children": [244, 245], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 36}}, {"id": 244, "type": "type_identifier", "text": "", "parent": 243, "children": [], "start_point": {"row": 90, "column": 16}, "end_point": {"row": 90, "column": 28}}, {"id": 245, "type": "pointer_declarator", "text": "", "parent": 243, "children": [246, 247], "start_point": {"row": 90, "column": 29}, "end_point": {"row": 90, "column": 36}}, {"id": 246, "type": "*", "text": "", "parent": 245, "children": [], "start_point": {"row": 90, "column": 29}, "end_point": {"row": 90, "column": 30}}, {"id": 247, "type": "identifier", "text": "", "parent": 245, "children": [], "start_point": {"row": 90, "column": 31}, "end_point": {"row": 90, "column": 36}}, {"id": 248, "type": "labeled_statement", "text": "", "parent": 54, "children": [249, 250], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 93, "column": 17}}, {"id": 249, "type": "statement_identifier", "text": "", "parent": 248, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 6}}, {"id": 250, "type": "declaration", "text": "", "parent": 248, "children": [251, 252], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 17}}, {"id": 251, "type": "primitive_type", "text": "", "parent": 250, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 5}}, {"id": 252, "type": "function_declarator", "text": "", "parent": 250, "children": [253, 254], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 16}}, {"id": 253, "type": "identifier", "text": "", "parent": 252, "children": [], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 12}}, {"id": 254, "type": "parameter_list", "text": "", "parent": 252, "children": [], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 16}}, {"id": 255, "type": "#endif", "text": "", "parent": 0, "children": [], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 6}}]}, "node_categories": {"declarations": {"functions": [54, 77, 82, 102, 109, 125, 133, 138, 148, 198, 203, 208, 226, 240, 252], "variables": [51, 60, 75, 80, 85, 90, 98, 104, 112, 117, 123, 128, 131, 136, 141, 146, 151, 158, 163, 166, 169, 172, 175, 180, 186, 196, 201, 206, 211, 214, 217, 222, 229, 235, 238, 243, 250], "classes": [105], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": [25, 26, 27, 28, 32, 36, 40, 43, 47]}, "statements": {"expressions": [63, 64, 72], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 23, 29, 33, 37, 41, 44, 48, 52, 53, 55, 57, 58, 59, 61, 62, 65, 67, 69, 71, 73, 76, 78, 83, 86, 89, 91, 95, 97, 99, 101, 103, 106, 110, 113, 116, 118, 122, 126, 129, 130, 134, 139, 142, 145, 149, 152, 155, 157, 159, 162, 164, 165, 167, 168, 170, 171, 174, 176, 179, 181, 185, 187, 193, 195, 199, 204, 209, 213, 216, 218, 221, 223, 227, 230, 234, 236, 237, 241, 244, 247, 249, 253, 255], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 31, 35, 39, 46, 50], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 54, "universal_type": "function", "name": "die", "text_snippet": "oid execute(u32 deltaT);\r\n\tvoid die();\r\n\r\n\tbool initScript(CLuaState& lua);\r\n\tint commandScript(CLua"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "\r\n\tCKLBHTTPI"}, {"node_id": 82, "universal_type": "function", "name": "unknown", "text_snippet": "m_http;\t\t// \u305d\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u63a5\u7d9a\r\n\tu32\t\t\t\t\t\tm_timeout;"}, {"node_id": 102, "universal_type": "function", "name": "unknown", "text_snippet": "_timestart;\r"}, {"node_id": 109, "universal_type": "function", "name": "m_canceled;", "text_snippet": "r_length;\r\n\tbool\t\t\t\t\tm_canceled;\t// \u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u308b\u3068 true \u306b\u306a\u308b\r\n\t"}, {"node_id": 125, "universal_type": "function", "name": "unknown", "text_snippet": "tem*\t\t\tm_pRoot;\r\n\r\n"}, {"node_id": 133, "universal_type": "function", "name": "unknown", "text_snippet": "\u30b3\u30fc\u30eb\u30d0\u30c3"}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "char\t\t\t*\tm_callback;\t// Lu"}, {"node_id": 148, "universal_type": "function", "name": "unknown", "text_snippet": "ck function\r\n\r\n\t// HTTP\u901a\u4fe1\u3067\u8ffd\u52a0\u3059"}], "class_declarations": [{"node_id": 105, "universal_type": "class", "name": "unknown", "text_snippet": "2\t\t\t\t\t"}], "import_statements": [{"node_id": 6, "text": "nclude \"CKLBLuaTask.h\"\r\n#i"}, {"node_id": 7, "text": "nclude \""}, {"node_id": 9, "text": "nclude \"CKLBHTTPInterface.h\"\r\n#i"}, {"node_id": 10, "text": "nclude \""}, {"node_id": 12, "text": "nclude \"CKLBJsonItem.h\"\r\n#i"}, {"node_id": 13, "text": "nclude \""}, {"node_id": 15, "text": "nclude \"CKLBUtility.h\"\r\n#i"}, {"node_id": 16, "text": "nclude \""}, {"node_id": 18, "text": "nclude \"MultithreadedNetwork.h\"\r\n\r\n"}, {"node_id": 19, "text": "nclude \""}]}, "original_source_code": "\ufeff/* \r\n Copyright 2013 KLab 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#ifndef CKLBNetAPI_h\r\n#define CKLBNetAPI_h\r\n\r\n#include \"CKLBLuaTask.h\"\r\n#include \"CKLBHTTPInterface.h\"\r\n#include \"CKLBJsonItem.h\"\r\n#include \"CKLBUtility.h\"\r\n#include \"MultithreadedNetwork.h\"\r\n\r\n// region\u3092\u6307\u5b9a\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u306e\u30c7\u30d5\u30a9\u30eb\u30c8region\u5024(ISO 3166-1)\r\n#define DEFAULT_REGION \"840\" // \u5317\u7c73\u30a2\u30e1\u30ea\u30ab\u5408\u8846\u56fd\r\n\r\n//// \u6307\u5b9a\u3057\u305d\u3046\u306a\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u66f8\u3044\u3066\u304a\u304f\u3002\r\n// #define DEFAULT_REGION \"392\" // \u65e5\u672c\r\n\r\n\r\nenum {\r\n\t// \u30e1\u30c3\u30bb\u30fc\u30b8\u5024\u5b9a\u7fa9\r\n\tNETAPIMSG_CONNECTION_CANCELED\t= -999,\t// \u30bb\u30c3\u30b7\u30e7\u30f3\u306f\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u305f\r\n\tNETAPIMSG_CONNECTION_FAILED\t\t= -500,\t// \u63a5\u7d9a\u306b\u5931\u6557\u3057\u305f\r\n\tRESERVED\t\t\t\t\t\t= -1,\t// \u30b5\u30fc\u30d0\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044/\u30b5\u30fc\u30d0\u304b\u3089\u306e\u30d1\u30b1\u30c3\u30c8\u3092\u89e3\u91c8\u3067\u304d\u306a\u3044\r\n\tNETAPIMSG_SERVER_TIMEOUT\t\t= -2,\t// \u30b5\u30fc\u30d0\u3068\u306e\u901a\u4fe1\u304c\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3057\u305f\r\n\tNETAPIMSG_SERVER_ERROR\t\t\t= 0,\r\n\tNETAPIMSG_REQUEST_SUCCESS\t\t= 1,\t// \u30ea\u30af\u30a8\u30b9\u30c8\u6210\u529f\u30b9\u30c6\u30fc\u30bf\u30b9\r\n};\r\n\r\n// Native\u5074\u304b\u3089API\u30bf\u30b9\u30af\u306b\u30b3\u30de\u30f3\u30c9\u3092\u767a\u884c\u3059\u308b\u305f\u3081\u306esingleton.\r\n// \r\nclass CKLBNetAPI;\r\n\r\n/*!\r\n* \\class CKLBNetAPI\r\n* \\brief Net API class.\r\n* \r\n* CKLBNetAPI is responsible Network communications.\r\n*/\r\nclass CKLBNetAPI : public CKLBLuaTask\r\n{\r\n\tfriend class CKLBTaskFactory<CKLBNetAPI>;\r\nprivate:\r\n\tCKLBNetAPI();\r\n\tvirtual ~CKLBNetAPI();\r\n\r\n\tbool init(\tCKLBTask* pTask, \r\n\t\t\t\tconst char * callback);\r\npublic:\r\n\tvirtual u32 getClassID();\r\n\tstatic CKLBNetAPI* create(\tCKLBTask* pParentTask, \r\n\t\t\t\t\t\t\t\tconst char * callback);\r\n\tvoid execute(u32 deltaT);\r\n\tvoid die();\r\n\r\n\tbool initScript(CLuaState& lua);\r\n\tint commandScript(CLuaState& lua);\r\nprivate:\r\n\tCKLBHTTPInterface*\t\tm_http;\t\t// \u305d\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u3067\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u63a5\u7d9a\r\n\tu32\t\t\t\t\t\tm_timeout;\t// \u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u6642\u9593\r\n\tu32\t\t\t\t\t\tm_timestart;\r\n\tu32\t\t\t\t\t\tm_http_header_length;\r\n\tbool\t\t\t\t\tm_canceled;\t// \u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u308b\u3068 true \u306b\u306a\u308b\r\n\tCKLBJsonItem*\t\t\tm_pRoot;\r\n\r\n\t// \u30b9\u30af\u30ea\u30d7\u30c8\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u7528\r\n\tconst char\t\t\t*\tm_callback;\t// Lua callback function\r\n\r\n\t// HTTP\u901a\u4fe1\u3067\u8ffd\u52a0\u3059\u308b\u30d8\u30c3\u30c0\u306e\u914d\u5217\r\n\tconst char\t\t\t**\tm_http_header_array;\r\n\r\nprivate:\r\n\tvoid freeHeader();\r\n\tvoid freeJSonResult();\r\n\r\n\tbool lua_callback(int msg, int status, CKLBJsonItem * pRoot);\r\n\r\n\tCKLBJsonItem * getJsonTree(const char * json_string, u32 dataLen);\r\n\tbool get_token(CKLBJsonItem * pRoot);\r\n\r\npublic:\r\n\tbool cancel\t\t();\r\n};\r\n\r\n#endif // CKLBNetAPI_h\r\n"}
46
c
#pragma once #include "CoreUObject.h" #include "Engine.h" DECLARE_LOG_CATEGORY_EXTERN(CoreUtilityLog, Log, All);
27.25
4
(translation_unit) "#pragma once\n\n#include "CoreUObject.h"\n#include "Engine.h"\n\nDECLARE_LOG_CATEGORY_EXTERN(CoreUtilityLog, Log, All);" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "CoreUObject.h"\n" (#include) "#include" (string_literal) ""CoreUObject.h"" (") """ (string_content) "CoreUObject.h" (") """ (preproc_include) "#include "Engine.h"\n" (#include) "#include" (string_literal) ""Engine.h"" (") """ (string_content) "Engine.h" (") """ (expression_statement) "DECLARE_LOG_CATEGORY_EXTERN(CoreUtilityLog, Log, All);" (call_expression) "DECLARE_LOG_CATEGORY_EXTERN(CoreUtilityLog, Log, All)" (identifier) "DECLARE_LOG_CATEGORY_EXTERN" (argument_list) "(CoreUtilityLog, Log, All)" (() "(" (identifier) "CoreUtilityLog" (,) "," (identifier) "Log" (,) "," (identifier) "All" ()) ")" (;) ";"
28
0
{"language": "c", "success": true, "metadata": {"lines": 4, "avg_line_length": 27.25, "nodes": 15, "errors": 0, "source_hash": "534719f88db0b3434ad9a5f711fee0638f30d6ff284a96a9bf380a24202aadb6", "categorized_nodes": 12}, "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 \"CoreUObject.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": "\"CoreUObject.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 24}}, {"id": 6, "type": "preproc_include", "text": "#include \"Engine.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"Engine.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 19}}, {"id": 9, "type": "call_expression", "text": "DECLARE_LOG_CATEGORY_EXTERN(CoreUtilityLog, Log, All)", "parent": null, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 53}}, {"id": 10, "type": "identifier", "text": "DECLARE_LOG_CATEGORY_EXTERN", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 27}}, {"id": 11, "type": "argument_list", "text": "(CoreUtilityLog, Log, All)", "parent": 9, "children": [12, 13, 14], "start_point": {"row": 5, "column": 27}, "end_point": {"row": 5, "column": 53}}, {"id": 12, "type": "identifier", "text": "CoreUtilityLog", "parent": 11, "children": [], "start_point": {"row": 5, "column": 28}, "end_point": {"row": 5, "column": 42}}, {"id": 13, "type": "identifier", "text": "Log", "parent": 11, "children": [], "start_point": {"row": 5, "column": 44}, "end_point": {"row": 5, "column": 47}}, {"id": 14, "type": "identifier", "text": "All", "parent": 11, "children": [], "start_point": {"row": 5, "column": 49}, "end_point": {"row": 5, "column": 52}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [9], "assignments": [], "loops": [], "conditionals": [10, 12, 13, 14], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"CoreUObject.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"Engine.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include \"CoreUObject.h\"\n#include \"Engine.h\"\n\nDECLARE_LOG_CATEGORY_EXTERN(CoreUtilityLog, Log, All);"}
47
c
#pragma once #include <cstdint> #include <string> typedef unsigned int uint; typedef uint8_t u8; typedef int8_t s8; typedef std::string string;
19.71
7
(translation_unit) "#pragma once\n\n#include <cstdint>\n#include <string>\n\ntypedef unsigned int uint;\n\ntypedef uint8_t u8;\ntypedef int8_t s8;\n\ntypedef std::string string;\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <cstdint>\n" (#include) "#include" (system_lib_string) "<cstdint>" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (type_definition) "typedef unsigned int uint;" (typedef) "typedef" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (type_identifier) "uint" (;) ";" (type_definition) "typedef uint8_t u8;" (typedef) "typedef" (primitive_type) "uint8_t" (type_identifier) "u8" (;) ";" (type_definition) "typedef int8_t s8;" (typedef) "typedef" (primitive_type) "int8_t" (type_identifier) "s8" (;) ";" (type_definition) "typedef std::string string;" (typedef) "typedef" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (type_identifier) "string" (type_identifier) "string" (;) ";"
36
1
{"language": "c", "success": true, "metadata": {"lines": 7, "avg_line_length": 19.71, "nodes": 29, "errors": 0, "source_hash": "dbb3ca5cb8b96bf46f8ed424fb529b6c877db44795e17f1fcbb9d45355861014", "categorized_nodes": 18}, "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 <cstdint>\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": "<cstdint>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <string>\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": "<string>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 17}}, {"id": 9, "type": "type_definition", "text": "typedef unsigned int uint;", "parent": null, "children": [10, 11, 14], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 26}}, {"id": 10, "type": "typedef", "text": "typedef", "parent": 9, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 7}}, {"id": 11, "type": "sized_type_specifier", "text": "unsigned int", "parent": 9, "children": [12, 13], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 20}}, {"id": 12, "type": "unsigned", "text": "unsigned", "parent": 11, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 16}}, {"id": 13, "type": "primitive_type", "text": "int", "parent": 11, "children": [], "start_point": {"row": 5, "column": 17}, "end_point": {"row": 5, "column": 20}}, {"id": 14, "type": "type_identifier", "text": "uint", "parent": 9, "children": [], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 25}}, {"id": 15, "type": "type_definition", "text": "typedef uint8_t u8;", "parent": null, "children": [16, 17, 18], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 19}}, {"id": 16, "type": "typedef", "text": "typedef", "parent": 15, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 17, "type": "primitive_type", "text": "uint8_t", "parent": 15, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 15}}, {"id": 18, "type": "type_identifier", "text": "u8", "parent": 15, "children": [], "start_point": {"row": 7, "column": 16}, "end_point": {"row": 7, "column": 18}}, {"id": 19, "type": "type_definition", "text": "typedef int8_t s8;", "parent": null, "children": [20, 21, 22], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 19}}, {"id": 20, "type": "typedef", "text": "typedef", "parent": 19, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 21, "type": "primitive_type", "text": "int8_t", "parent": 19, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 14}}, {"id": 22, "type": "type_identifier", "text": "s8", "parent": 19, "children": [], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 18}}, {"id": 23, "type": "type_definition", "text": "typedef std::string string;", "parent": null, "children": [24, 25, 26, 28], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 27}}, {"id": 24, "type": "typedef", "text": "typedef", "parent": 23, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 25, "type": "type_identifier", "text": "std", "parent": 23, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 11}}, {"id": 26, "type": "ERROR", "text": "::string", "parent": 23, "children": [27], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 19}}, {"id": 27, "type": "type_identifier", "text": "string", "parent": 26, "children": [], "start_point": {"row": 10, "column": 13}, "end_point": {"row": 10, "column": 19}}, {"id": 28, "type": "type_identifier", "text": "string", "parent": 23, "children": [], "start_point": {"row": 10, "column": 20}, "end_point": {"row": 10, "column": 26}}]}, "node_categories": {"declarations": {"functions": [], "variables": [9, 15, 19, 23], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [11, 14, 18, 22, 25, 27, 28], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <cstdint>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <string>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <cstdint>\n#include <string>\n\ntypedef unsigned int uint;\n\ntypedef uint8_t u8;\ntypedef int8_t s8;\n\ntypedef std::string string;\n"}
48
c
/***************************************************************************** Copyright 2010 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. Copyright 2015-2020 COSEDA Technologies GmbH 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. *****************************************************************************/ /***************************************************************************** sca_lsf_gain.h - linear signal flow gain Original Author: <NAME> / COSEDA Technologies Created on: 05.03.2009 SVN Version : $Revision: 2096 $ SVN last checkin : $Date: 2020-01-28 15:42:55 +0000 (Tue, 28 Jan 2020) $ SVN checkin by : $Author: karsten $ SVN Id : $Id: sca_lsf_gain.h 2096 2020-01-28 15:42:55Z karsten $ *****************************************************************************/ /* LRM clause 4.2.1.7. The class sca_lsf::sca_gain shall implement a primitive module for the LSF MoC that realizes the multiplication of an LSF&nbsp;signal by a constant gain. The primitive shall contribute the following equation to the equation system: y(t) = k*x(t) where k is the constant gain coefficient, x(t is the LSF input signal, and y(t) is the LSF output signal. */ /*****************************************************************************/ #ifndef SCA_LSF_GAIN_H_ #define SCA_LSF_GAIN_H_ namespace sca_lsf { //class sca_gain : public implementation-derived-from sca_core::sca_module class sca_gain: public sca_lsf::sca_module { typedef sca_util::sca_vector<std::pair<double,double> > sca_pwl_pair_vector; public: sca_lsf::sca_in x; // LSF input sca_lsf::sca_out y; // LSF output sca_core::sca_parameter<double> k; // gain coefficient sca_core::sca_parameter<sca_pwl_pair_vector> pwl_k; virtual const char* kind() const; explicit sca_gain(sc_core::sc_module_name, double k_ = 1.0, const sca_pwl_pair_vector& pwl_k_ = sca_pwl_pair_vector()); // begin implementation specific private: virtual void matrix_stamps(); //pwl controlled sources unsigned int pwl_vector_size; //number of values in pwl_value // end implementation specific }; } // namespace sca_lsf #endif /* SCA_LSF_GAIN_H_ */
44.56
59
(translation_unit) "/*****************************************************************************\n\n Copyright 2010\n Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.\n\n Copyright 2015-2020 COSEDA Technologies GmbH\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/*****************************************************************************\n\n sca_lsf_gain.h - linear signal flow gain\n\n Original Author: <NAME> / COSEDA Technologies\n\n Created on: 05.03.2009\n\n SVN Version : $Revision: 2096 $\n SVN last checkin : $Date: 2020-01-28 15:42:55 +0000 (Tue, 28 Jan 2020) $\n SVN checkin by : $Author: karsten $\n SVN Id : $Id: sca_lsf_gain.h 2096 2020-01-28 15:42:55Z karsten $\n\n *****************************************************************************/\n/*\n LRM clause 4.2.1.7.\n The class sca_lsf::sca_gain shall implement a primitive module for the LSF MoC\n that realizes the multiplication of an LSF&nbsp;signal by a constant gain.\n The primitive shall contribute the following equation to the equation system:\n y(t) = k*x(t)\n where k is the constant gain coefficient, x(t is the LSF input signal, and\n y(t) is the LSF output signal.\n */\n\n/*****************************************************************************/\n\n#ifndef SCA_LSF_GAIN_H_\n#define SCA_LSF_GAIN_H_\n\nnamespace sca_lsf\n{\n\n//class sca_gain : public implementation-derived-from sca_core::sca_module\nclass sca_gain: public sca_lsf::sca_module\n{\n typedef sca_util::sca_vector<std::pair<double,double> > sca_pwl_pair_vector;\n\npublic:\n sca_lsf::sca_in x; // LSF input\n\n sca_lsf::sca_out y; // LSF output\n\n sca_core::sca_parameter<double> k; // gain coefficient\n sca_core::sca_parameter<sca_pwl_pair_vector> pwl_k;\n\n\n virtual const char* kind() const;\n\n explicit sca_gain(sc_core::sc_module_name, double k_ = 1.0,\n const sca_pwl_pair_vector& pwl_k_ = sca_pwl_pair_vector());\n\n// begin implementation specific\n\nprivate:\n virtual void matrix_stamps();\n\n //pwl controlled sources\n unsigned int pwl_vector_size; //number of values in pwl_value\n\n// end implementation specific\n\n};\n\n} // namespace sca_lsf\n\n#endif /* SCA_LSF_GAIN_H_ */\n" (comment) "/*****************************************************************************\n\n Copyright 2010\n Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.\n\n Copyright 2015-2020 COSEDA Technologies GmbH\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 *****************************************************************************/" (comment) "/*****************************************************************************\n\n sca_lsf_gain.h - linear signal flow gain\n\n Original Author: <NAME> / COSEDA Technologies\n\n Created on: 05.03.2009\n\n SVN Version : $Revision: 2096 $\n SVN last checkin : $Date: 2020-01-28 15:42:55 +0000 (Tue, 28 Jan 2020) $\n SVN checkin by : $Author: karsten $\n SVN Id : $Id: sca_lsf_gain.h 2096 2020-01-28 15:42:55Z karsten $\n\n *****************************************************************************/" (comment) "/*\n LRM clause 4.2.1.7.\n The class sca_lsf::sca_gain shall implement a primitive module for the LSF MoC\n that realizes the multiplication of an LSF&nbsp;signal by a constant gain.\n The primitive shall contribute the following equation to the equation system:\n y(t) = k*x(t)\n where k is the constant gain coefficient, x(t is the LSF input signal, and\n y(t) is the LSF output signal.\n */" (comment) "/*****************************************************************************/" (preproc_ifdef) "#ifndef SCA_LSF_GAIN_H_\n#define SCA_LSF_GAIN_H_\n\nnamespace sca_lsf\n{\n\n//class sca_gain : public implementation-derived-from sca_core::sca_module\nclass sca_gain: public sca_lsf::sca_module\n{\n typedef sca_util::sca_vector<std::pair<double,double> > sca_pwl_pair_vector;\n\npublic:\n sca_lsf::sca_in x; // LSF input\n\n sca_lsf::sca_out y; // LSF output\n\n sca_core::sca_parameter<double> k; // gain coefficient\n sca_core::sca_parameter<sca_pwl_pair_vector> pwl_k;\n\n\n virtual const char* kind() const;\n\n explicit sca_gain(sc_core::sc_module_name, double k_ = 1.0,\n const sca_pwl_pair_vector& pwl_k_ = sca_pwl_pair_vector());\n\n// begin implementation specific\n\nprivate:\n virtual void matrix_stamps();\n\n //pwl controlled sources\n unsigned int pwl_vector_size; //number of values in pwl_value\n\n// end implementation specific\n\n};\n\n} // namespace sca_lsf\n\n#endif" (#ifndef) "#ifndef" (identifier) "SCA_LSF_GAIN_H_" (preproc_def) "#define SCA_LSF_GAIN_H_\n" (#define) "#define" (identifier) "SCA_LSF_GAIN_H_" (function_definition) "namespace sca_lsf\n{\n\n//class sca_gain : public implementation-derived-from sca_core::sca_module\nclass sca_gain: public sca_lsf::sca_module\n{\n typedef sca_util::sca_vector<std::pair<double,double> > sca_pwl_pair_vector;\n\npublic:\n sca_lsf::sca_in x; // LSF input\n\n sca_lsf::sca_out y; // LSF output\n\n sca_core::sca_parameter<double> k; // gain coefficient\n sca_core::sca_parameter<sca_pwl_pair_vector> pwl_k;\n\n\n virtual const char* kind() const;\n\n explicit sca_gain(sc_core::sc_module_name, double k_ = 1.0,\n const sca_pwl_pair_vector& pwl_k_ = sca_pwl_pair_vector());\n\n// begin implementation specific\n\nprivate:\n virtual void matrix_stamps();\n\n //pwl controlled sources\n unsigned int pwl_vector_size; //number of values in pwl_value\n\n// end implementation specific\n\n};\n\n}" (type_identifier) "namespace" (identifier) "sca_lsf" (compound_statement) "{\n\n//class sca_gain : public implementation-derived-from sca_core::sca_module\nclass sca_gain: public sca_lsf::sca_module\n{\n typedef sca_util::sca_vector<std::pair<double,double> > sca_pwl_pair_vector;\n\npublic:\n sca_lsf::sca_in x; // LSF input\n\n sca_lsf::sca_out y; // LSF output\n\n sca_core::sca_parameter<double> k; // gain coefficient\n sca_core::sca_parameter<sca_pwl_pair_vector> pwl_k;\n\n\n virtual const char* kind() const;\n\n explicit sca_gain(sc_core::sc_module_name, double k_ = 1.0,\n const sca_pwl_pair_vector& pwl_k_ = sca_pwl_pair_vector());\n\n// begin implementation specific\n\nprivate:\n virtual void matrix_stamps();\n\n //pwl controlled sources\n unsigned int pwl_vector_size; //number of values in pwl_value\n\n// end implementation specific\n\n};\n\n}" ({) "{" (comment) "//class sca_gain : public implementation-derived-from sca_core::sca_module" (function_definition) "class sca_gain: public sca_lsf::sca_module\n{\n typedef sca_util::sca_vector<std::pair<double,double> > sca_pwl_pair_vector;\n\npublic:\n sca_lsf::sca_in x; // LSF input\n\n sca_lsf::sca_out y; // LSF output\n\n sca_core::sca_parameter<double> k; // gain coefficient\n sca_core::sca_parameter<sca_pwl_pair_vector> pwl_k;\n\n\n virtual const char* kind() const;\n\n explicit sca_gain(sc_core::sc_module_name, double k_ = 1.0,\n const sca_pwl_pair_vector& pwl_k_ = sca_pwl_pair_vector());\n\n// begin implementation specific\n\nprivate:\n virtual void matrix_stamps();\n\n //pwl controlled sources\n unsigned int pwl_vector_size; //number of values in pwl_value\n\n// end implementation specific\n\n}" (type_identifier) "class" (ERROR) "sca_gain: public sca_lsf::" (identifier) "sca_gain" (:) ":" (identifier) "public" (identifier) "sca_lsf" (:) ":" (:) ":" (identifier) "sca_module" (compound_statement) "{\n typedef sca_util::sca_vector<std::pair<double,double> > sca_pwl_pair_vector;\n\npublic:\n sca_lsf::sca_in x; // LSF input\n\n sca_lsf::sca_out y; // LSF output\n\n sca_core::sca_parameter<double> k; // gain coefficient\n sca_core::sca_parameter<sca_pwl_pair_vector> pwl_k;\n\n\n virtual const char* kind() const;\n\n explicit sca_gain(sc_core::sc_module_name, double k_ = 1.0,\n const sca_pwl_pair_vector& pwl_k_ = sca_pwl_pair_vector());\n\n// begin implementation specific\n\nprivate:\n virtual void matrix_stamps();\n\n //pwl controlled sources\n unsigned int pwl_vector_size; //number of values in pwl_value\n\n// end implementation specific\n\n}" ({) "{" (type_definition) "typedef sca_util::sca_vector<std::pair<double,double> > sca_pwl_pair_vector;" (typedef) "typedef" (type_identifier) "sca_util" (ERROR) "::sca_vector<std::pair<" (:) ":" (:) ":" (type_identifier) "sca_vector" (<) "<" (type_identifier) "std" (:) ":" (:) ":" (type_identifier) "pair" (<) "<" (primitive_type) "double" (,) "," (ERROR) "double> >" (primitive_type) "double" (>) ">" (>) ">" (type_identifier) "sca_pwl_pair_vector" (;) ";" (labeled_statement) "public:\n sca_lsf::sca_in x;" (statement_identifier) "public" (:) ":" (labeled_statement) "sca_lsf::sca_in x;" (statement_identifier) "sca_lsf" (:) ":" (ERROR) ":" (:) ":" (declaration) "sca_in x;" (type_identifier) "sca_in" (identifier) "x" (;) ";" (comment) "// LSF input" (labeled_statement) "sca_lsf::sca_out y;" (statement_identifier) "sca_lsf" (:) ":" (ERROR) ":" (:) ":" (declaration) "sca_out y;" (type_identifier) "sca_out" (identifier) "y" (;) ";" (comment) "// LSF output" (labeled_statement) "sca_core::sca_parameter<double> k;" (statement_identifier) "sca_core" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "sca_parameter<double> k;" (binary_expression) "sca_parameter<double> k" (binary_expression) "sca_parameter<double" (identifier) "sca_parameter" (<) "<" (identifier) "double" (>) ">" (identifier) "k" (;) ";" (comment) "// gain coefficient" (labeled_statement) "sca_core::sca_parameter<sca_pwl_pair_vector> pwl_k;" (statement_identifier) "sca_core" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "sca_parameter<sca_pwl_pair_vector> pwl_k;" (binary_expression) "sca_parameter<sca_pwl_pair_vector> pwl_k" (binary_expression) "sca_parameter<sca_pwl_pair_vector" (identifier) "sca_parameter" (<) "<" (identifier) "sca_pwl_pair_vector" (>) ">" (identifier) "pwl_k" (;) ";" (declaration) "virtual const char* kind() const;" (type_identifier) "virtual" (type_qualifier) "const" (const) "const" (ERROR) "char" (identifier) "char" (pointer_declarator) "* kind() const" (*) "*" (function_declarator) "kind() const" (identifier) "kind" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (;) ";" (declaration) "explicit sca_gain(sc_core::sc_module_name, double k_ = 1.0,\n const sca_pwl_pair_vector& pwl_k_ = sca_pwl_pair_vector());" (type_identifier) "explicit" (init_declarator) "sca_gain(sc_core::sc_module_name, double k_ = 1.0" (function_declarator) "sca_gain(sc_core::sc_module_name, double k_" (identifier) "sca_gain" (parameter_list) "(sc_core::sc_module_name, double k_" (() "(" (parameter_declaration) "sc_core::sc_module_name" (type_identifier) "sc_core" (ERROR) "::" (:) ":" (:) ":" (identifier) "sc_module_name" (,) "," (parameter_declaration) "double k_" (primitive_type) "double" (identifier) "k_" ()) "" (=) "=" (number_literal) "1.0" (,) "," (ERROR) "const sca_pwl_pair_vector&" (identifier) "const" (identifier) "sca_pwl_pair_vector" (&) "&" (init_declarator) "pwl_k_ = sca_pwl_pair_vector()" (identifier) "pwl_k_" (=) "=" (call_expression) "sca_pwl_pair_vector()" (identifier) "sca_pwl_pair_vector" (argument_list) "()" (() "(" ()) ")" (ERROR) ")" ()) ")" (;) ";" (comment) "// begin implementation specific" (labeled_statement) "private:\n virtual void matrix_stamps();" (statement_identifier) "private" (:) ":" (declaration) "virtual void matrix_stamps();" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "matrix_stamps()" (identifier) "matrix_stamps" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//pwl controlled sources" (declaration) "unsigned int pwl_vector_size;" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "pwl_vector_size" (;) ";" (comment) "//number of values in pwl_value" (comment) "// end implementation specific" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace sca_lsf" (#endif) "#endif" (comment) "/* SCA_LSF_GAIN_H_ */"
183
12
{"language": "c", "success": true, "metadata": {"lines": 59, "avg_line_length": 44.56, "nodes": 103, "errors": 0, "source_hash": "bbfd6742c527ef060efb16ff02daca2f3bc44ea37171115e6ad35c468960e6df", "categorized_nodes": 65}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef SCA_LSF_GAIN_H_\n#define SCA_LSF_GAIN_H_\n\nnamespace sca_lsf\n{\n\n//class sca_gain : public implementation-derived-from sca_core::sca_module\nclass sca_gain: public sca_lsf::sca_module\n{\n\ttypedef sca_util::sca_vector<std::pair<double,double> > sca_pwl_pair_vector;\n\npublic:\n\tsca_lsf::sca_in x; // LSF input\n\n\tsca_lsf::sca_out y; // LSF output\n\n\tsca_core::sca_parameter<double> k; // gain coefficient\n\tsca_core::sca_parameter<sca_pwl_pair_vector> pwl_k;\n\n\n\tvirtual const char* kind() const;\n\n\texplicit sca_gain(sc_core::sc_module_name, double k_ = 1.0,\n\t\t\tconst sca_pwl_pair_vector& pwl_k_ = sca_pwl_pair_vector());\n\n// begin implementation specific\n\nprivate:\n\t virtual void matrix_stamps();\n\n\t //pwl controlled sources\n\t unsigned int pwl_vector_size; //number of values in pwl_value\n\n// end implementation specific\n\n};\n\n} // namespace sca_lsf\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 102], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 86, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 7}}, {"id": 2, "type": "identifier", "text": "SCA_LSF_GAIN_H_", "parent": 0, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 23}}, {"id": 3, "type": "preproc_def", "text": "#define SCA_LSF_GAIN_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 49, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 7}}, {"id": 5, "type": "identifier", "text": "SCA_LSF_GAIN_H_", "parent": 3, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 23}}, {"id": 6, "type": "function_definition", "text": "namespace sca_lsf\n{\n\n//class sca_gain : public implementation-derived-from sca_core::sca_module\nclass sca_gain: public sca_lsf::sca_module\n{\n\ttypedef sca_util::sca_vector<std::pair<double,double> > sca_pwl_pair_vector;\n\npublic:\n\tsca_lsf::sca_in x; // LSF input\n\n\tsca_lsf::sca_out y; // LSF output\n\n\tsca_core::sca_parameter<double> k; // gain coefficient\n\tsca_core::sca_parameter<sca_pwl_pair_vector> pwl_k;\n\n\n\tvirtual const char* kind() const;\n\n\texplicit sca_gain(sc_core::sc_module_name, double k_ = 1.0,\n\t\t\tconst sca_pwl_pair_vector& pwl_k_ = sca_pwl_pair_vector());\n\n// begin implementation specific\n\nprivate:\n\t virtual void matrix_stamps();\n\n\t //pwl controlled sources\n\t unsigned int pwl_vector_size; //number of values in pwl_value\n\n// end implementation specific\n\n};\n\n}", "parent": 0, "children": [7, 8], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 84, "column": 1}}, {"id": 7, "type": "type_identifier", "text": "namespace", "parent": 6, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 9}}, {"id": 8, "type": "identifier", "text": "sca_lsf", "parent": 6, "children": [], "start_point": {"row": 50, "column": 10}, "end_point": {"row": 50, "column": 17}}, {"id": 9, "type": "function_definition", "text": "class sca_gain: public sca_lsf::sca_module\n{\n\ttypedef sca_util::sca_vector<std::pair<double,double> > sca_pwl_pair_vector;\n\npublic:\n\tsca_lsf::sca_in x; // LSF input\n\n\tsca_lsf::sca_out y; // LSF output\n\n\tsca_core::sca_parameter<double> k; // gain coefficient\n\tsca_core::sca_parameter<sca_pwl_pair_vector> pwl_k;\n\n\n\tvirtual const char* kind() const;\n\n\texplicit sca_gain(sc_core::sc_module_name, double k_ = 1.0,\n\t\t\tconst sca_pwl_pair_vector& pwl_k_ = sca_pwl_pair_vector());\n\n// begin implementation specific\n\nprivate:\n\t virtual void matrix_stamps();\n\n\t //pwl controlled sources\n\t unsigned int pwl_vector_size; //number of values in pwl_value\n\n// end implementation specific\n\n}", "parent": 6, "children": [10, 13], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 82, "column": 1}}, {"id": 10, "type": "ERROR", "text": "sca_gain: public sca_lsf::", "parent": 9, "children": [11, 12], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 32}}, {"id": 11, "type": "identifier", "text": "sca_gain", "parent": 10, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 14}}, {"id": 12, "type": "identifier", "text": "sca_lsf", "parent": 10, "children": [], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 30}}, {"id": 13, "type": "identifier", "text": "sca_module", "parent": 9, "children": [], "start_point": {"row": 54, "column": 32}, "end_point": {"row": 54, "column": 42}}, {"id": 14, "type": "type_definition", "text": "typedef sca_util::sca_vector<std::pair<double,double> > sca_pwl_pair_vector;", "parent": 9, "children": [15, 16, 17, 23, 24, 28], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 77}}, {"id": 15, "type": "typedef", "text": "typedef", "parent": 14, "children": [], "start_point": {"row": 56, "column": 1}, "end_point": {"row": 56, "column": 8}}, {"id": 16, "type": "type_identifier", "text": "sca_util", "parent": 14, "children": [], "start_point": {"row": 56, "column": 9}, "end_point": {"row": 56, "column": 17}}, {"id": 17, "type": "ERROR", "text": "::sca_vector<std::pair<", "parent": 14, "children": [18, 19, 20, 21, 22], "start_point": {"row": 56, "column": 17}, "end_point": {"row": 56, "column": 40}}, {"id": 18, "type": "type_identifier", "text": "sca_vector", "parent": 17, "children": [], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 29}}, {"id": 19, "type": "<", "text": "<", "parent": 17, "children": [], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 30}}, {"id": 20, "type": "type_identifier", "text": "std", "parent": 17, "children": [], "start_point": {"row": 56, "column": 30}, "end_point": {"row": 56, "column": 33}}, {"id": 21, "type": "type_identifier", "text": "pair", "parent": 17, "children": [], "start_point": {"row": 56, "column": 35}, "end_point": {"row": 56, "column": 39}}, {"id": 22, "type": "<", "text": "<", "parent": 17, "children": [], "start_point": {"row": 56, "column": 39}, "end_point": {"row": 56, "column": 40}}, {"id": 23, "type": "primitive_type", "text": "double", "parent": 14, "children": [], "start_point": {"row": 56, "column": 40}, "end_point": {"row": 56, "column": 46}}, {"id": 24, "type": "ERROR", "text": "double> >", "parent": 14, "children": [25, 26, 27], "start_point": {"row": 56, "column": 47}, "end_point": {"row": 56, "column": 56}}, {"id": 25, "type": "primitive_type", "text": "double", "parent": 24, "children": [], "start_point": {"row": 56, "column": 47}, "end_point": {"row": 56, "column": 53}}, {"id": 26, "type": ">", "text": ">", "parent": 24, "children": [], "start_point": {"row": 56, "column": 53}, "end_point": {"row": 56, "column": 54}}, {"id": 27, "type": ">", "text": ">", "parent": 24, "children": [], "start_point": {"row": 56, "column": 55}, "end_point": {"row": 56, "column": 56}}, {"id": 28, "type": "type_identifier", "text": "sca_pwl_pair_vector", "parent": 14, "children": [], "start_point": {"row": 56, "column": 57}, "end_point": {"row": 56, "column": 76}}, {"id": 29, "type": "labeled_statement", "text": "public:\n\tsca_lsf::sca_in x;", "parent": 9, "children": [30], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 59, "column": 19}}, {"id": 30, "type": "labeled_statement", "text": "sca_lsf::sca_in x;", "parent": 29, "children": [31, 32], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 19}}, {"id": 31, "type": "statement_identifier", "text": "sca_lsf", "parent": 30, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 8}}, {"id": 32, "type": "declaration", "text": "sca_in x;", "parent": 30, "children": [33, 34], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 19}}, {"id": 33, "type": "type_identifier", "text": "sca_in", "parent": 32, "children": [], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 16}}, {"id": 34, "type": "identifier", "text": "x", "parent": 32, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 18}}, {"id": 35, "type": "labeled_statement", "text": "sca_lsf::sca_out y;", "parent": 9, "children": [36, 37], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 20}}, {"id": 36, "type": "statement_identifier", "text": "sca_lsf", "parent": 35, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 8}}, {"id": 37, "type": "declaration", "text": "sca_out y;", "parent": 35, "children": [38, 39], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 20}}, {"id": 38, "type": "type_identifier", "text": "sca_out", "parent": 37, "children": [], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 17}}, {"id": 39, "type": "identifier", "text": "y", "parent": 37, "children": [], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 19}}, {"id": 40, "type": "labeled_statement", "text": "sca_core::sca_parameter<double> k;", "parent": 9, "children": [41], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 35}}, {"id": 41, "type": "statement_identifier", "text": "sca_core", "parent": 40, "children": [], "start_point": {"row": 63, "column": 1}, "end_point": {"row": 63, "column": 9}}, {"id": 42, "type": "binary_expression", "text": "sca_parameter<double> k", "parent": 40, "children": [43, 47, 48], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 34}}, {"id": 43, "type": "binary_expression", "text": "sca_parameter<double", "parent": 42, "children": [44, 45, 46], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 31}}, {"id": 44, "type": "identifier", "text": "sca_parameter", "parent": 43, "children": [], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 24}}, {"id": 45, "type": "<", "text": "<", "parent": 43, "children": [], "start_point": {"row": 63, "column": 24}, "end_point": {"row": 63, "column": 25}}, {"id": 46, "type": "identifier", "text": "double", "parent": 43, "children": [], "start_point": {"row": 63, "column": 25}, "end_point": {"row": 63, "column": 31}}, {"id": 47, "type": ">", "text": ">", "parent": 42, "children": [], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 32}}, {"id": 48, "type": "identifier", "text": "k", "parent": 42, "children": [], "start_point": {"row": 63, "column": 33}, "end_point": {"row": 63, "column": 34}}, {"id": 49, "type": "labeled_statement", "text": "sca_core::sca_parameter<sca_pwl_pair_vector> pwl_k;", "parent": 9, "children": [50], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 52}}, {"id": 50, "type": "statement_identifier", "text": "sca_core", "parent": 49, "children": [], "start_point": {"row": 64, "column": 1}, "end_point": {"row": 64, "column": 9}}, {"id": 51, "type": "binary_expression", "text": "sca_parameter<sca_pwl_pair_vector> pwl_k", "parent": 49, "children": [52, 56, 57], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 51}}, {"id": 52, "type": "binary_expression", "text": "sca_parameter<sca_pwl_pair_vector", "parent": 51, "children": [53, 54, 55], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 44}}, {"id": 53, "type": "identifier", "text": "sca_parameter", "parent": 52, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 24}}, {"id": 54, "type": "<", "text": "<", "parent": 52, "children": [], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 64, "column": 25}}, {"id": 55, "type": "identifier", "text": "sca_pwl_pair_vector", "parent": 52, "children": [], "start_point": {"row": 64, "column": 25}, "end_point": {"row": 64, "column": 44}}, {"id": 56, "type": ">", "text": ">", "parent": 51, "children": [], "start_point": {"row": 64, "column": 44}, "end_point": {"row": 64, "column": 45}}, {"id": 57, "type": "identifier", "text": "pwl_k", "parent": 51, "children": [], "start_point": {"row": 64, "column": 46}, "end_point": {"row": 64, "column": 51}}, {"id": 58, "type": "declaration", "text": "virtual const char* kind() const;", "parent": 9, "children": [59, 60, 62], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 34}}, {"id": 59, "type": "type_identifier", "text": "virtual", "parent": 58, "children": [], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 8}}, {"id": 60, "type": "ERROR", "text": "char", "parent": 58, "children": [61], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 19}}, {"id": 61, "type": "identifier", "text": "char", "parent": 60, "children": [], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 19}}, {"id": 62, "type": "pointer_declarator", "text": "* kind() const", "parent": 58, "children": [63, 64], "start_point": {"row": 67, "column": 19}, "end_point": {"row": 67, "column": 33}}, {"id": 63, "type": "*", "text": "*", "parent": 62, "children": [], "start_point": {"row": 67, "column": 19}, "end_point": {"row": 67, "column": 20}}, {"id": 64, "type": "function_declarator", "text": "kind() const", "parent": 62, "children": [65, 66], "start_point": {"row": 67, "column": 21}, "end_point": {"row": 67, "column": 33}}, {"id": 65, "type": "identifier", "text": "kind", "parent": 64, "children": [], "start_point": {"row": 67, "column": 21}, "end_point": {"row": 67, "column": 25}}, {"id": 66, "type": "parameter_list", "text": "()", "parent": 64, "children": [], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 27}}, {"id": 67, "type": "declaration", "text": "explicit sca_gain(sc_core::sc_module_name, double k_ = 1.0,\n\t\t\tconst sca_pwl_pair_vector& pwl_k_ = sca_pwl_pair_vector());", "parent": 9, "children": [68, 69, 81, 83], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 70, "column": 62}}, {"id": 68, "type": "type_identifier", "text": "explicit", "parent": 67, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 9}}, {"id": 69, "type": "init_declarator", "text": "sca_gain(sc_core::sc_module_name, double k_ = 1.0", "parent": 67, "children": [70, 79, 80], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 59}}, {"id": 70, "type": "function_declarator", "text": "sca_gain(sc_core::sc_module_name, double k_", "parent": 69, "children": [71, 72], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 53}}, {"id": 71, "type": "identifier", "text": "sca_gain", "parent": 70, "children": [], "start_point": {"row": 69, "column": 10}, "end_point": {"row": 69, "column": 18}}, {"id": 72, "type": "parameter_list", "text": "(sc_core::sc_module_name, double k_", "parent": 70, "children": [73, 76], "start_point": {"row": 69, "column": 18}, "end_point": {"row": 69, "column": 53}}, {"id": 73, "type": "parameter_declaration", "text": "sc_core::sc_module_name", "parent": 72, "children": [74, 75], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 42}}, {"id": 74, "type": "type_identifier", "text": "sc_core", "parent": 73, "children": [], "start_point": {"row": 69, "column": 19}, "end_point": {"row": 69, "column": 26}}, {"id": 75, "type": "identifier", "text": "sc_module_name", "parent": 73, "children": [], "start_point": {"row": 69, "column": 28}, "end_point": {"row": 69, "column": 42}}, {"id": 76, "type": "parameter_declaration", "text": "double k_", "parent": 72, "children": [77, 78], "start_point": {"row": 69, "column": 44}, "end_point": {"row": 69, "column": 53}}, {"id": 77, "type": "primitive_type", "text": "double", "parent": 76, "children": [], "start_point": {"row": 69, "column": 44}, "end_point": {"row": 69, "column": 50}}, {"id": 78, "type": "identifier", "text": "k_", "parent": 76, "children": [], "start_point": {"row": 69, "column": 51}, "end_point": {"row": 69, "column": 53}}, {"id": 79, "type": "=", "text": "=", "parent": 69, "children": [], "start_point": {"row": 69, "column": 54}, "end_point": {"row": 69, "column": 55}}, {"id": 80, "type": "number_literal", "text": "1.0", "parent": 69, "children": [], "start_point": {"row": 69, "column": 56}, "end_point": {"row": 69, "column": 59}}, {"id": 81, "type": "ERROR", "text": "const sca_pwl_pair_vector&", "parent": 67, "children": [82], "start_point": {"row": 70, "column": 3}, "end_point": {"row": 70, "column": 29}}, {"id": 82, "type": "identifier", "text": "sca_pwl_pair_vector", "parent": 81, "children": [], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 28}}, {"id": 83, "type": "init_declarator", "text": "pwl_k_ = sca_pwl_pair_vector()", "parent": 67, "children": [84, 85, 86], "start_point": {"row": 70, "column": 30}, "end_point": {"row": 70, "column": 60}}, {"id": 84, "type": "identifier", "text": "pwl_k_", "parent": 83, "children": [], "start_point": {"row": 70, "column": 30}, "end_point": {"row": 70, "column": 36}}, {"id": 85, "type": "=", "text": "=", "parent": 83, "children": [], "start_point": {"row": 70, "column": 37}, "end_point": {"row": 70, "column": 38}}, {"id": 86, "type": "call_expression", "text": "sca_pwl_pair_vector()", "parent": 83, "children": [87, 88], "start_point": {"row": 70, "column": 39}, "end_point": {"row": 70, "column": 60}}, {"id": 87, "type": "identifier", "text": "sca_pwl_pair_vector", "parent": 86, "children": [], "start_point": {"row": 70, "column": 39}, "end_point": {"row": 70, "column": 58}}, {"id": 88, "type": "argument_list", "text": "()", "parent": 86, "children": [], "start_point": {"row": 70, "column": 58}, "end_point": {"row": 70, "column": 60}}, {"id": 89, "type": "labeled_statement", "text": "private:\n\t virtual void matrix_stamps();", "parent": 9, "children": [90], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 75, "column": 31}}, {"id": 90, "type": "declaration", "text": "virtual void matrix_stamps();", "parent": 89, "children": [91, 92, 94], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 31}}, {"id": 91, "type": "type_identifier", "text": "virtual", "parent": 90, "children": [], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 9}}, {"id": 92, "type": "ERROR", "text": "void", "parent": 90, "children": [93], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 75, "column": 14}}, {"id": 93, "type": "identifier", "text": "void", "parent": 92, "children": [], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 75, "column": 14}}, {"id": 94, "type": "function_declarator", "text": "matrix_stamps()", "parent": 90, "children": [95, 96], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 30}}, {"id": 95, "type": "identifier", "text": "matrix_stamps", "parent": 94, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 28}}, {"id": 96, "type": "parameter_list", "text": "()", "parent": 94, "children": [], "start_point": {"row": 75, "column": 28}, "end_point": {"row": 75, "column": 30}}, {"id": 97, "type": "declaration", "text": "unsigned int pwl_vector_size;", "parent": 9, "children": [98, 101], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 31}}, {"id": 98, "type": "sized_type_specifier", "text": "unsigned int", "parent": 97, "children": [99, 100], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 14}}, {"id": 99, "type": "unsigned", "text": "unsigned", "parent": 98, "children": [], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 10}}, {"id": 100, "type": "primitive_type", "text": "int", "parent": 98, "children": [], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 14}}, {"id": 101, "type": "identifier", "text": "pwl_vector_size", "parent": 97, "children": [], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 30}}, {"id": 102, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 6}}]}, "node_categories": {"declarations": {"functions": [6, 9, 64, 70, 94], "variables": [14, 32, 37, 58, 67, 73, 76, 90, 97], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [42, 43, 51, 52, 86], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 7, 8, 11, 12, 13, 16, 18, 20, 21, 28, 31, 33, 34, 36, 38, 39, 41, 44, 46, 48, 50, 53, 55, 57, 59, 61, 65, 68, 71, 74, 75, 78, 82, 84, 87, 91, 93, 95, 98, 101, 102], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [80], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "sca_gain:", "text_snippet": "namespace sca_lsf\n{\n\n//class sca_gain : public implementation-derived-from sca_core::sca_module\nclas"}, {"node_id": 9, "universal_type": "function", "name": "sca_gain:", "text_snippet": "class sca_gain: public sca_lsf::sca_module\n{\n\ttypedef sca_util::sca_vector<std::pair<double,double> "}, {"node_id": 64, "universal_type": "function", "name": "unknown", "text_snippet": "kind() const"}, {"node_id": 70, "universal_type": "function", "name": "unknown", "text_snippet": "sca_gain(sc_core::sc_module_name, double k_"}, {"node_id": 94, "universal_type": "function", "name": "unknown", "text_snippet": "matrix_stamps()"}], "class_declarations": [], "import_statements": []}, "original_source_code": "/*****************************************************************************\n\n Copyright 2010\n Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.\n\n Copyright 2015-2020 COSEDA Technologies GmbH\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/*****************************************************************************\n\n sca_lsf_gain.h - linear signal flow gain\n\n Original Author: <NAME> / COSEDA Technologies\n\n Created on: 05.03.2009\n\n SVN Version : $Revision: 2096 $\n SVN last checkin : $Date: 2020-01-28 15:42:55 +0000 (Tue, 28 Jan 2020) $\n SVN checkin by : $Author: karsten $\n SVN Id : $Id: sca_lsf_gain.h 2096 2020-01-28 15:42:55Z karsten $\n\n *****************************************************************************/\n/*\n LRM clause 4.2.1.7.\n The class sca_lsf::sca_gain shall implement a primitive module for the LSF MoC\n that realizes the multiplication of an LSF&nbsp;signal by a constant gain.\n The primitive shall contribute the following equation to the equation system:\n y(t) = k*x(t)\n where k is the constant gain coefficient, x(t is the LSF input signal, and\n y(t) is the LSF output signal.\n */\n\n/*****************************************************************************/\n\n#ifndef SCA_LSF_GAIN_H_\n#define SCA_LSF_GAIN_H_\n\nnamespace sca_lsf\n{\n\n//class sca_gain : public implementation-derived-from sca_core::sca_module\nclass sca_gain: public sca_lsf::sca_module\n{\n\ttypedef sca_util::sca_vector<std::pair<double,double> > sca_pwl_pair_vector;\n\npublic:\n\tsca_lsf::sca_in x; // LSF input\n\n\tsca_lsf::sca_out y; // LSF output\n\n\tsca_core::sca_parameter<double> k; // gain coefficient\n\tsca_core::sca_parameter<sca_pwl_pair_vector> pwl_k;\n\n\n\tvirtual const char* kind() const;\n\n\texplicit sca_gain(sc_core::sc_module_name, double k_ = 1.0,\n\t\t\tconst sca_pwl_pair_vector& pwl_k_ = sca_pwl_pair_vector());\n\n// begin implementation specific\n\nprivate:\n\t virtual void matrix_stamps();\n\n\t //pwl controlled sources\n\t unsigned int pwl_vector_size; //number of values in pwl_value\n\n// end implementation specific\n\n};\n\n} // namespace sca_lsf\n\n#endif /* SCA_LSF_GAIN_H_ */\n"}
49
c
#ifndef MENU_SETTINGS_H #define MENU_SETTINGS_H #include <SFML/Graphics.hpp> #include "Constants.h" const int MAX_SELECTABLE_COLORS = 12; // --- Functions void settingsMenu(sf::RenderWindow*, GameParams*); void initSettingsMenu(sf::RenderWindow*, GameParams); void drawSettingsMenu(sf::RenderWindow*, GameParams); int handleSettingsMenuInputs(sf::RenderWindow*, sf::Event); void saveParams(GameParams*); #endif
33.25
12
(translation_unit) "#ifndef MENU_SETTINGS_H\n#define MENU_SETTINGS_H\n\n#include <SFML/Graphics.hpp>\n#include "Constants.h"\n\nconst int MAX_SELECTABLE_COLORS = 12;\n\n// --- Functions\nvoid settingsMenu(sf::RenderWindow*, GameParams*);\nvoid initSettingsMenu(sf::RenderWindow*, GameParams);\nvoid drawSettingsMenu(sf::RenderWindow*, GameParams);\nint handleSettingsMenuInputs(sf::RenderWindow*, sf::Event);\nvoid saveParams(GameParams*);\n\n#endif" (preproc_ifdef) "#ifndef MENU_SETTINGS_H\n#define MENU_SETTINGS_H\n\n#include <SFML/Graphics.hpp>\n#include "Constants.h"\n\nconst int MAX_SELECTABLE_COLORS = 12;\n\n// --- Functions\nvoid settingsMenu(sf::RenderWindow*, GameParams*);\nvoid initSettingsMenu(sf::RenderWindow*, GameParams);\nvoid drawSettingsMenu(sf::RenderWindow*, GameParams);\nint handleSettingsMenuInputs(sf::RenderWindow*, sf::Event);\nvoid saveParams(GameParams*);\n\n#endif" (#ifndef) "#ifndef" (identifier) "MENU_SETTINGS_H" (preproc_def) "#define MENU_SETTINGS_H\n" (#define) "#define" (identifier) "MENU_SETTINGS_H" (preproc_include) "#include <SFML/Graphics.hpp>\n" (#include) "#include" (system_lib_string) "<SFML/Graphics.hpp>" (preproc_include) "#include "Constants.h"\n" (#include) "#include" (string_literal) ""Constants.h"" (") """ (string_content) "Constants.h" (") """ (declaration) "const int MAX_SELECTABLE_COLORS = 12;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "MAX_SELECTABLE_COLORS = 12" (identifier) "MAX_SELECTABLE_COLORS" (=) "=" (number_literal) "12" (;) ";" (comment) "// --- Functions" (declaration) "void settingsMenu(sf::RenderWindow*, GameParams*);" (primitive_type) "void" (function_declarator) "settingsMenu(sf::RenderWindow*, GameParams*)" (identifier) "settingsMenu" (parameter_list) "(sf::RenderWindow*, GameParams*)" (() "(" (parameter_declaration) "sf::RenderWindow*" (type_identifier) "sf" (ERROR) "::RenderWindow" (:) ":" (:) ":" (identifier) "RenderWindow" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "GameParams*" (type_identifier) "GameParams" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (declaration) "void initSettingsMenu(sf::RenderWindow*, GameParams);" (primitive_type) "void" (function_declarator) "initSettingsMenu(sf::RenderWindow*, GameParams)" (identifier) "initSettingsMenu" (parameter_list) "(sf::RenderWindow*, GameParams)" (() "(" (parameter_declaration) "sf::RenderWindow*" (type_identifier) "sf" (ERROR) "::RenderWindow" (:) ":" (:) ":" (identifier) "RenderWindow" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "GameParams" (type_identifier) "GameParams" ()) ")" (;) ";" (declaration) "void drawSettingsMenu(sf::RenderWindow*, GameParams);" (primitive_type) "void" (function_declarator) "drawSettingsMenu(sf::RenderWindow*, GameParams)" (identifier) "drawSettingsMenu" (parameter_list) "(sf::RenderWindow*, GameParams)" (() "(" (parameter_declaration) "sf::RenderWindow*" (type_identifier) "sf" (ERROR) "::RenderWindow" (:) ":" (:) ":" (identifier) "RenderWindow" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "GameParams" (type_identifier) "GameParams" ()) ")" (;) ";" (declaration) "int handleSettingsMenuInputs(sf::RenderWindow*, sf::Event);" (primitive_type) "int" (function_declarator) "handleSettingsMenuInputs(sf::RenderWindow*, sf::Event)" (identifier) "handleSettingsMenuInputs" (parameter_list) "(sf::RenderWindow*, sf::Event)" (() "(" (parameter_declaration) "sf::RenderWindow*" (type_identifier) "sf" (ERROR) "::RenderWindow" (:) ":" (:) ":" (identifier) "RenderWindow" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "sf::Event" (type_identifier) "sf" (ERROR) "::" (:) ":" (:) ":" (identifier) "Event" ()) ")" (;) ";" (declaration) "void saveParams(GameParams*);" (primitive_type) "void" (function_declarator) "saveParams(GameParams*)" (identifier) "saveParams" (parameter_list) "(GameParams*)" (() "(" (parameter_declaration) "GameParams*" (type_identifier) "GameParams" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (#endif) "#endif"
121
5
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 33.25, "nodes": 83, "errors": 0, "source_hash": "af8058215e11377c341b835944db9a43ba95be988681d94540090357e99c9fe8", "categorized_nodes": 52}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef MENU_SETTINGS_H\n#define MENU_SETTINGS_H\n\n#include <SFML/Graphics.hpp>\n#include \"Constants.h\"\n\nconst int MAX_SELECTABLE_COLORS = 12;\n\n// --- Functions\nvoid settingsMenu(sf::RenderWindow*, GameParams*);\nvoid initSettingsMenu(sf::RenderWindow*, GameParams);\nvoid drawSettingsMenu(sf::RenderWindow*, GameParams);\nint handleSettingsMenuInputs(sf::RenderWindow*, sf::Event);\nvoid saveParams(GameParams*);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 18, 33, 46, 59, 73, 82], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 15, "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": "MENU_SETTINGS_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 23}}, {"id": 3, "type": "preproc_def", "text": "#define MENU_SETTINGS_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": "MENU_SETTINGS_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 23}}, {"id": 6, "type": "preproc_include", "text": "#include <SFML/Graphics.hpp>\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": "<SFML/Graphics.hpp>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 28}}, {"id": 9, "type": "preproc_include", "text": "#include \"Constants.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": "\"Constants.h\"", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 22}}, {"id": 12, "type": "declaration", "text": "const int MAX_SELECTABLE_COLORS = 12;", "parent": 0, "children": [13, 14], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 37}}, {"id": 13, "type": "primitive_type", "text": "int", "parent": 12, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 9}}, {"id": 14, "type": "init_declarator", "text": "MAX_SELECTABLE_COLORS = 12", "parent": 12, "children": [15, 16, 17], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 36}}, {"id": 15, "type": "identifier", "text": "MAX_SELECTABLE_COLORS", "parent": 14, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 31}}, {"id": 16, "type": "=", "text": "=", "parent": 14, "children": [], "start_point": {"row": 6, "column": 32}, "end_point": {"row": 6, "column": 33}}, {"id": 17, "type": "number_literal", "text": "12", "parent": 14, "children": [], "start_point": {"row": 6, "column": 34}, "end_point": {"row": 6, "column": 36}}, {"id": 18, "type": "declaration", "text": "void settingsMenu(sf::RenderWindow*, GameParams*);", "parent": 0, "children": [19, 20], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 50}}, {"id": 19, "type": "primitive_type", "text": "void", "parent": 18, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 4}}, {"id": 20, "type": "function_declarator", "text": "settingsMenu(sf::RenderWindow*, GameParams*)", "parent": 18, "children": [21, 22], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 49}}, {"id": 21, "type": "identifier", "text": "settingsMenu", "parent": 20, "children": [], "start_point": {"row": 9, "column": 5}, "end_point": {"row": 9, "column": 17}}, {"id": 22, "type": "parameter_list", "text": "(sf::RenderWindow*, GameParams*)", "parent": 20, "children": [23, 29], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 49}}, {"id": 23, "type": "parameter_declaration", "text": "sf::RenderWindow*", "parent": 22, "children": [24, 25, 27], "start_point": {"row": 9, "column": 18}, "end_point": {"row": 9, "column": 35}}, {"id": 24, "type": "type_identifier", "text": "sf", "parent": 23, "children": [], "start_point": {"row": 9, "column": 18}, "end_point": {"row": 9, "column": 20}}, {"id": 25, "type": "ERROR", "text": "::RenderWindow", "parent": 23, "children": [26], "start_point": {"row": 9, "column": 20}, "end_point": {"row": 9, "column": 34}}, {"id": 26, "type": "identifier", "text": "RenderWindow", "parent": 25, "children": [], "start_point": {"row": 9, "column": 22}, "end_point": {"row": 9, "column": 34}}, {"id": 27, "type": "abstract_pointer_declarator", "text": "*", "parent": 23, "children": [28], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 35}}, {"id": 28, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 35}}, {"id": 29, "type": "parameter_declaration", "text": "GameParams*", "parent": 22, "children": [30, 31], "start_point": {"row": 9, "column": 37}, "end_point": {"row": 9, "column": 48}}, {"id": 30, "type": "type_identifier", "text": "GameParams", "parent": 29, "children": [], "start_point": {"row": 9, "column": 37}, "end_point": {"row": 9, "column": 47}}, {"id": 31, "type": "abstract_pointer_declarator", "text": "*", "parent": 29, "children": [32], "start_point": {"row": 9, "column": 47}, "end_point": {"row": 9, "column": 48}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 9, "column": 47}, "end_point": {"row": 9, "column": 48}}, {"id": 33, "type": "declaration", "text": "void initSettingsMenu(sf::RenderWindow*, GameParams);", "parent": 0, "children": [34, 35], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 53}}, {"id": 34, "type": "primitive_type", "text": "void", "parent": 33, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 4}}, {"id": 35, "type": "function_declarator", "text": "initSettingsMenu(sf::RenderWindow*, GameParams)", "parent": 33, "children": [36, 37], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 52}}, {"id": 36, "type": "identifier", "text": "initSettingsMenu", "parent": 35, "children": [], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 21}}, {"id": 37, "type": "parameter_list", "text": "(sf::RenderWindow*, GameParams)", "parent": 35, "children": [38, 44], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 52}}, {"id": 38, "type": "parameter_declaration", "text": "sf::RenderWindow*", "parent": 37, "children": [39, 40, 42], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 39}}, {"id": 39, "type": "type_identifier", "text": "sf", "parent": 38, "children": [], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 24}}, {"id": 40, "type": "ERROR", "text": "::RenderWindow", "parent": 38, "children": [41], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 38}}, {"id": 41, "type": "identifier", "text": "RenderWindow", "parent": 40, "children": [], "start_point": {"row": 10, "column": 26}, "end_point": {"row": 10, "column": 38}}, {"id": 42, "type": "abstract_pointer_declarator", "text": "*", "parent": 38, "children": [43], "start_point": {"row": 10, "column": 38}, "end_point": {"row": 10, "column": 39}}, {"id": 43, "type": "*", "text": "*", "parent": 42, "children": [], "start_point": {"row": 10, "column": 38}, "end_point": {"row": 10, "column": 39}}, {"id": 44, "type": "parameter_declaration", "text": "GameParams", "parent": 37, "children": [45], "start_point": {"row": 10, "column": 41}, "end_point": {"row": 10, "column": 51}}, {"id": 45, "type": "type_identifier", "text": "GameParams", "parent": 44, "children": [], "start_point": {"row": 10, "column": 41}, "end_point": {"row": 10, "column": 51}}, {"id": 46, "type": "declaration", "text": "void drawSettingsMenu(sf::RenderWindow*, GameParams);", "parent": 0, "children": [47, 48], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 53}}, {"id": 47, "type": "primitive_type", "text": "void", "parent": 46, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 4}}, {"id": 48, "type": "function_declarator", "text": "drawSettingsMenu(sf::RenderWindow*, GameParams)", "parent": 46, "children": [49, 50], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 52}}, {"id": 49, "type": "identifier", "text": "drawSettingsMenu", "parent": 48, "children": [], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 21}}, {"id": 50, "type": "parameter_list", "text": "(sf::RenderWindow*, GameParams)", "parent": 48, "children": [51, 57], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 52}}, {"id": 51, "type": "parameter_declaration", "text": "sf::RenderWindow*", "parent": 50, "children": [52, 53, 55], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 39}}, {"id": 52, "type": "type_identifier", "text": "sf", "parent": 51, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 24}}, {"id": 53, "type": "ERROR", "text": "::RenderWindow", "parent": 51, "children": [54], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 38}}, {"id": 54, "type": "identifier", "text": "RenderWindow", "parent": 53, "children": [], "start_point": {"row": 11, "column": 26}, "end_point": {"row": 11, "column": 38}}, {"id": 55, "type": "abstract_pointer_declarator", "text": "*", "parent": 51, "children": [56], "start_point": {"row": 11, "column": 38}, "end_point": {"row": 11, "column": 39}}, {"id": 56, "type": "*", "text": "*", "parent": 55, "children": [], "start_point": {"row": 11, "column": 38}, "end_point": {"row": 11, "column": 39}}, {"id": 57, "type": "parameter_declaration", "text": "GameParams", "parent": 50, "children": [58], "start_point": {"row": 11, "column": 41}, "end_point": {"row": 11, "column": 51}}, {"id": 58, "type": "type_identifier", "text": "GameParams", "parent": 57, "children": [], "start_point": {"row": 11, "column": 41}, "end_point": {"row": 11, "column": 51}}, {"id": 59, "type": "declaration", "text": "int handleSettingsMenuInputs(sf::RenderWindow*, sf::Event);", "parent": 0, "children": [60, 61], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 59}}, {"id": 60, "type": "primitive_type", "text": "int", "parent": 59, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 3}}, {"id": 61, "type": "function_declarator", "text": "handleSettingsMenuInputs(sf::RenderWindow*, sf::Event)", "parent": 59, "children": [62, 63], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 58}}, {"id": 62, "type": "identifier", "text": "handleSettingsMenuInputs", "parent": 61, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 28}}, {"id": 63, "type": "parameter_list", "text": "(sf::RenderWindow*, sf::Event)", "parent": 61, "children": [64, 70], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 58}}, {"id": 64, "type": "parameter_declaration", "text": "sf::RenderWindow*", "parent": 63, "children": [65, 66, 68], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 46}}, {"id": 65, "type": "type_identifier", "text": "sf", "parent": 64, "children": [], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 31}}, {"id": 66, "type": "ERROR", "text": "::RenderWindow", "parent": 64, "children": [67], "start_point": {"row": 12, "column": 31}, "end_point": {"row": 12, "column": 45}}, {"id": 67, "type": "identifier", "text": "RenderWindow", "parent": 66, "children": [], "start_point": {"row": 12, "column": 33}, "end_point": {"row": 12, "column": 45}}, {"id": 68, "type": "abstract_pointer_declarator", "text": "*", "parent": 64, "children": [69], "start_point": {"row": 12, "column": 45}, "end_point": {"row": 12, "column": 46}}, {"id": 69, "type": "*", "text": "*", "parent": 68, "children": [], "start_point": {"row": 12, "column": 45}, "end_point": {"row": 12, "column": 46}}, {"id": 70, "type": "parameter_declaration", "text": "sf::Event", "parent": 63, "children": [71, 72], "start_point": {"row": 12, "column": 48}, "end_point": {"row": 12, "column": 57}}, {"id": 71, "type": "type_identifier", "text": "sf", "parent": 70, "children": [], "start_point": {"row": 12, "column": 48}, "end_point": {"row": 12, "column": 50}}, {"id": 72, "type": "identifier", "text": "Event", "parent": 70, "children": [], "start_point": {"row": 12, "column": 52}, "end_point": {"row": 12, "column": 57}}, {"id": 73, "type": "declaration", "text": "void saveParams(GameParams*);", "parent": 0, "children": [74, 75], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 29}}, {"id": 74, "type": "primitive_type", "text": "void", "parent": 73, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 4}}, {"id": 75, "type": "function_declarator", "text": "saveParams(GameParams*)", "parent": 73, "children": [76, 77], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 28}}, {"id": 76, "type": "identifier", "text": "saveParams", "parent": 75, "children": [], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 15}}, {"id": 77, "type": "parameter_list", "text": "(GameParams*)", "parent": 75, "children": [78], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 28}}, {"id": 78, "type": "parameter_declaration", "text": "GameParams*", "parent": 77, "children": [79, 80], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 27}}, {"id": 79, "type": "type_identifier", "text": "GameParams", "parent": 78, "children": [], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 26}}, {"id": 80, "type": "abstract_pointer_declarator", "text": "*", "parent": 78, "children": [81], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 27}}, {"id": 81, "type": "*", "text": "*", "parent": 80, "children": [], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 27}}, {"id": 82, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 6}}]}, "node_categories": {"declarations": {"functions": [20, 35, 48, 61, 75], "variables": [12, 18, 23, 29, 33, 38, 44, 46, 51, 57, 59, 64, 70, 73, 78], "classes": [], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 15, 21, 24, 26, 30, 36, 39, 41, 45, 49, 52, 54, 58, 62, 65, 67, 71, 72, 76, 79, 82], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 17], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "settingsMenu(sf::RenderWindow*, GameParams*)"}, {"node_id": 35, "universal_type": "function", "name": "unknown", "text_snippet": "initSettingsMenu(sf::RenderWindow*, GameParams)"}, {"node_id": 48, "universal_type": "function", "name": "unknown", "text_snippet": "drawSettingsMenu(sf::RenderWindow*, GameParams)"}, {"node_id": 61, "universal_type": "function", "name": "unknown", "text_snippet": "handleSettingsMenuInputs(sf::RenderWindow*, sf::Event)"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "saveParams(GameParams*)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <SFML/Graphics.hpp>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"Constants.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#ifndef MENU_SETTINGS_H\n#define MENU_SETTINGS_H\n\n#include <SFML/Graphics.hpp>\n#include \"Constants.h\"\n\nconst int MAX_SELECTABLE_COLORS = 12;\n\n// --- Functions\nvoid settingsMenu(sf::RenderWindow*, GameParams*);\nvoid initSettingsMenu(sf::RenderWindow*, GameParams);\nvoid drawSettingsMenu(sf::RenderWindow*, GameParams);\nint handleSettingsMenuInputs(sf::RenderWindow*, sf::Event);\nvoid saveParams(GameParams*);\n\n#endif"}
50
c
// // FinderItem.h // OneWay // // Copyright 2010 <NAME> <http://goto11.net> // #import <Cocoa/Cocoa.h> @class Location; @interface FinderItem : NSObject + (NSString *)labelForNewLocation; + (NSString *)labelForLocation:(Location *)location; @end
19.83
12
(translation_unit) "//\n// FinderItem.h\n// OneWay\n//\n\n// Copyright 2010 <NAME> <http://goto11.net>\n//\n\n#import <Cocoa/Cocoa.h>\n\n@class Location;\n\n@interface FinderItem : NSObject\n\n+ (NSString *)labelForNewLocation;\n\n+ (NSString *)labelForLocation:(Location *)location;\n\n@end\n" (comment) "//" (comment) "// FinderItem.h" (comment) "// OneWay" (comment) "//" (comment) "// Copyright 2010 <NAME> <http://goto11.net>" (comment) "//" (preproc_call) "#import <Cocoa/Cocoa.h>\n" (preproc_directive) "#import" (preproc_arg) "<Cocoa/Cocoa.h>" (ERROR) "@" (ERROR) "@" (declaration) "class Location;" (type_identifier) "class" (identifier) "Location" (;) ";" (ERROR) "@interface FinderItem : NSObject" (ERROR) "@" (type_identifier) "interface" (identifier) "FinderItem" (:) ":" (identifier) "NSObject" (expression_statement) "+ (NSString *)labelForNewLocation;" (unary_expression) "+ (NSString *)labelForNewLocation" (+) "+" (cast_expression) "(NSString *)labelForNewLocation" (() "(" (type_descriptor) "NSString *" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "labelForNewLocation" (;) ";" (ERROR) "+ (NSString *)labelForLocation:(Location *)location;\n\n@end" (binary_expression) "+ (NSString *)labelForLocation:(Location *)location" (unary_expression) "+ (NSString *)labelForLocation" (+) "+" (cast_expression) "(NSString *)labelForLocation" (() "(" (type_descriptor) "NSString *" (type_identifier) "NSString" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "labelForLocation" (ERROR) ":(Location" (:) ":" (() "(" (identifier) "Location" (*) "*" (ERROR) ")" ()) ")" (identifier) "location" (;) ";" (ERROR) "@" (identifier) "end"
57
8
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 19.83, "nodes": 35, "errors": 0, "source_hash": "148ed973b8d9daa17c44ab18670522f29d13f90c83d13a6c2a7592a77f9e6273", "categorized_nodes": 17}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import <Cocoa/Cocoa.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": "<Cocoa/Cocoa.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 Location;", "parent": null, "children": [6], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 16}}, {"id": 6, "type": "identifier", "text": "Location", "parent": 5, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 15}}, {"id": 7, "type": "ERROR", "text": "@interface FinderItem : NSObject", "parent": null, "children": [8, 9, 10, 11], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 32}}, {"id": 8, "type": "ERROR", "text": "@", "parent": 7, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 9, "type": "type_identifier", "text": "interface", "parent": 7, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 10}}, {"id": 10, "type": "identifier", "text": "FinderItem", "parent": 7, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 21}}, {"id": 11, "type": "identifier", "text": "NSObject", "parent": 7, "children": [], "start_point": {"row": 12, "column": 24}, "end_point": {"row": 12, "column": 32}}, {"id": 12, "type": "unary_expression", "text": "+ (NSString *)labelForNewLocation", "parent": null, "children": [13, 14], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 33}}, {"id": 13, "type": "+", "text": "+", "parent": 12, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 14, "type": "cast_expression", "text": "(NSString *)labelForNewLocation", "parent": 12, "children": [15, 19], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 33}}, {"id": 15, "type": "type_descriptor", "text": "NSString *", "parent": 14, "children": [16, 17], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 13}}, {"id": 16, "type": "type_identifier", "text": "NSString", "parent": 15, "children": [], "start_point": {"row": 14, "column": 3}, "end_point": {"row": 14, "column": 11}}, {"id": 17, "type": "abstract_pointer_declarator", "text": "*", "parent": 15, "children": [18], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 13}}, {"id": 18, "type": "*", "text": "*", "parent": 17, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 13}}, {"id": 19, "type": "identifier", "text": "labelForNewLocation", "parent": 14, "children": [], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 33}}, {"id": 20, "type": "ERROR", "text": "+ (NSString *)labelForLocation:(Location *)location;\n\n@end", "parent": null, "children": [21, 34], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 18, "column": 4}}, {"id": 21, "type": "binary_expression", "text": "+ (NSString *)labelForLocation:(Location *)location", "parent": 20, "children": [22, 30, 32, 33], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 51}}, {"id": 22, "type": "unary_expression", "text": "+ (NSString *)labelForLocation", "parent": 21, "children": [23, 24], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 30}}, {"id": 23, "type": "+", "text": "+", "parent": 22, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 24, "type": "cast_expression", "text": "(NSString *)labelForLocation", "parent": 22, "children": [25, 29], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 30}}, {"id": 25, "type": "type_descriptor", "text": "NSString *", "parent": 24, "children": [26, 27], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 13}}, {"id": 26, "type": "type_identifier", "text": "NSString", "parent": 25, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 11}}, {"id": 27, "type": "abstract_pointer_declarator", "text": "*", "parent": 25, "children": [28], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 13}}, {"id": 28, "type": "*", "text": "*", "parent": 27, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 13}}, {"id": 29, "type": "identifier", "text": "labelForLocation", "parent": 24, "children": [], "start_point": {"row": 16, "column": 14}, "end_point": {"row": 16, "column": 30}}, {"id": 30, "type": "ERROR", "text": ":(Location", "parent": 21, "children": [31], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 40}}, {"id": 31, "type": "identifier", "text": "Location", "parent": 30, "children": [], "start_point": {"row": 16, "column": 32}, "end_point": {"row": 16, "column": 40}}, {"id": 32, "type": "*", "text": "*", "parent": 21, "children": [], "start_point": {"row": 16, "column": 41}, "end_point": {"row": 16, "column": 42}}, {"id": 33, "type": "identifier", "text": "location", "parent": 21, "children": [], "start_point": {"row": 16, "column": 43}, "end_point": {"row": 16, "column": 51}}, {"id": 34, "type": "ERROR", "text": "@", "parent": 20, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [5], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [12, 14, 21, 22, 24], "assignments": [], "loops": [], "conditionals": [6, 9, 10, 11, 16, 19, 26, 29, 31, 33], "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// FinderItem.h\n// OneWay\n//\n\n// Copyright 2010 <NAME> <http://goto11.net>\n//\n\n#import <Cocoa/Cocoa.h>\n\n@class Location;\n\n@interface FinderItem : NSObject\n\n+ (NSString *)labelForNewLocation;\n\n+ (NSString *)labelForLocation:(Location *)location;\n\n@end\n"}
51
c
// Copyright(C) 1999-2017 National Technology & Engineering Solutions // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with // NTESS, the U.S. Government retains certain rights in this software. // // 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 NTESS 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 IOSS_Ioss_Sort_h #define IOSS_Ioss_Sort_h #include <cstddef> #include <vector> // This is used instead of the std::sort since we were having issues // with the std::sort on some compiler versions with certain options // enabled (-fopenmp). If this shows up as a hotspot in performance // measurments, then we can use std::sort on most platforms and just // use this version where there are compiler issues. // Using Explicit Template Instantiation with the types: // // std::vector<int>, std::vector<int64_t>, std::vector<std::pair<int64_t,int64_t>> // // Update in Ioss_Sort.C if other types are needed. namespace { const int QSORT_CUTOFF = 12; template <typename INT> void SWAP(INT *V, size_t I, size_t J) { std::swap(V[I], V[J]); } template <typename INT> void order3(INT v[], size_t left, size_t center, size_t right) { if (v[left] > v[center]) { SWAP(v, left, center); } if (v[left] > v[right]) { SWAP(v, left, right); } if (v[center] > v[right]) { SWAP(v, center, right); } } template <typename INT> size_t median3(INT v[], size_t left, size_t right) { size_t center = (left + right) / 2; size_t pl = left; size_t pm = center; size_t pr = right; if (right - left > 40) { size_t s = (right - left) / 8; order3(v, left, left + s, left + 2 * s); order3(v, center - s, center, center + s); order3(v, right - 2 * s, right - s, right); // Now set up to get median of the 3 medians... pl = left + s; pm = center; pr = right - s; } order3(v, pl, pm, pr); SWAP(v, center, right - 1); return right - 1; } template <typename INT> void qsort_int(INT v[], size_t left, size_t right) { size_t pivot; size_t i, j; if (left + QSORT_CUTOFF < right) { pivot = median3(v, left, right); i = left; j = right - 1; for (;;) { while (v[++i] < v[pivot]) { ; } while (v[--j] > v[pivot]) { ; } if (i < j) { SWAP(v, i, j); } else { break; } } SWAP(v, i, right - 1); qsort_int(v, left, i - 1); qsort_int(v, i + 1, right); } } template <typename INT> void isort_int(INT v[], size_t N) { size_t i, j; size_t ndx = 0; INT small; INT tmp; if (N <= 1) { return; } small = v[0]; for (i = 1; i < N; i++) { if (v[i] < small) { small = v[i]; ndx = i; } } /* Put smallest value in slot 0 */ SWAP(v, 0, ndx); for (i = 1; i < N; i++) { tmp = v[i]; for (j = i; tmp < v[j - 1]; j--) { v[j] = v[j - 1]; } v[j] = tmp; } } } // namespace namespace Ioss { template <typename INT> void qsort(std::vector<INT> &v) { if (v.size() <= 1) { return; } qsort_int(v.data(), 0, v.size() - 1); isort_int(v.data(), v.size()); } } // namespace Ioss #endif
31.82
145
(translation_unit) "// Copyright(C) 1999-2017 National Technology & Engineering Solutions\n// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with\n// NTESS, the U.S. Government retains certain rights in this software.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following\n// disclaimer in the documentation and/or other materials provided\n// with the distribution.\n//\n// * Neither the name of NTESS nor the names of its\n// 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#ifndef IOSS_Ioss_Sort_h\n#define IOSS_Ioss_Sort_h\n\n#include <cstddef>\n#include <vector>\n\n// This is used instead of the std::sort since we were having issues\n// with the std::sort on some compiler versions with certain options\n// enabled (-fopenmp). If this shows up as a hotspot in performance\n// measurments, then we can use std::sort on most platforms and just\n// use this version where there are compiler issues.\n\n// Using Explicit Template Instantiation with the types:\n//\n// std::vector<int>, std::vector<int64_t>, std::vector<std::pair<int64_t,int64_t>>\n//\n// Update in Ioss_Sort.C if other types are needed.\n\nnamespace {\n const int QSORT_CUTOFF = 12;\n\n template <typename INT> void SWAP(INT *V, size_t I, size_t J) { std::swap(V[I], V[J]); }\n\n template <typename INT> void order3(INT v[], size_t left, size_t center, size_t right)\n {\n if (v[left] > v[center]) {\n SWAP(v, left, center);\n }\n if (v[left] > v[right]) {\n SWAP(v, left, right);\n }\n if (v[center] > v[right]) {\n SWAP(v, center, right);\n }\n }\n\n template <typename INT> size_t median3(INT v[], size_t left, size_t right)\n {\n size_t center = (left + right) / 2;\n size_t pl = left;\n size_t pm = center;\n size_t pr = right;\n\n if (right - left > 40) {\n size_t s = (right - left) / 8;\n order3(v, left, left + s, left + 2 * s);\n order3(v, center - s, center, center + s);\n order3(v, right - 2 * s, right - s, right);\n\n // Now set up to get median of the 3 medians...\n pl = left + s;\n pm = center;\n pr = right - s;\n }\n order3(v, pl, pm, pr);\n\n SWAP(v, center, right - 1);\n return right - 1;\n }\n\n template <typename INT> void qsort_int(INT v[], size_t left, size_t right)\n {\n size_t pivot;\n size_t i, j;\n\n if (left + QSORT_CUTOFF < right) {\n pivot = median3(v, left, right);\n i = left;\n j = right - 1;\n\n for (;;) {\n while (v[++i] < v[pivot]) {\n ;\n }\n while (v[--j] > v[pivot]) {\n ;\n }\n if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }\n }\n\n SWAP(v, i, right - 1);\n qsort_int(v, left, i - 1);\n qsort_int(v, i + 1, right);\n }\n }\n\n template <typename INT> void isort_int(INT v[], size_t N)\n {\n size_t i, j;\n size_t ndx = 0;\n INT small;\n INT tmp;\n\n if (N <= 1) {\n return;\n }\n small = v[0];\n for (i = 1; i < N; i++) {\n if (v[i] < small) {\n small = v[i];\n ndx = i;\n }\n }\n /* Put smallest value in slot 0 */\n SWAP(v, 0, ndx);\n\n for (i = 1; i < N; i++) {\n tmp = v[i];\n for (j = i; tmp < v[j - 1]; j--) {\n v[j] = v[j - 1];\n }\n v[j] = tmp;\n }\n }\n} // namespace\n\nnamespace Ioss {\n template <typename INT> void qsort(std::vector<INT> &v)\n {\n if (v.size() <= 1) {\n return;\n }\n qsort_int(v.data(), 0, v.size() - 1);\n isort_int(v.data(), v.size());\n }\n} // namespace Ioss\n\n#endif\n" (comment) "// Copyright(C) 1999-2017 National Technology & Engineering Solutions" (comment) "// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with" (comment) "// NTESS, the U.S. Government retains certain rights in this software." (comment) "//" (comment) "// Redistribution and use in source and binary forms, with or without" (comment) "// modification, are permitted provided that the following conditions are" (comment) "// met:" (comment) "//" (comment) "// * Redistributions of source code must retain the above copyright" (comment) "// notice, this list of conditions and the following disclaimer." (comment) "//" (comment) "// * Redistributions in binary form must reproduce the above" (comment) "// copyright notice, this list of conditions and the following" (comment) "// disclaimer in the documentation and/or other materials provided" (comment) "// with the distribution." (comment) "//" (comment) "// * Neither the name of NTESS nor the names of its" (comment) "// contributors may be used to endorse or promote products derived" (comment) "// from this software without specific prior written permission." (comment) "//" (comment) "// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS" (comment) "// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT" (comment) "// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR" (comment) "// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT" (comment) "// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL," (comment) "// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT" (comment) "// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE," (comment) "// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY" (comment) "// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT" (comment) "// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE" (comment) "// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." (preproc_ifdef) "#ifndef IOSS_Ioss_Sort_h\n#define IOSS_Ioss_Sort_h\n\n#include <cstddef>\n#include <vector>\n\n// This is used instead of the std::sort since we were having issues\n// with the std::sort on some compiler versions with certain options\n// enabled (-fopenmp). If this shows up as a hotspot in performance\n// measurments, then we can use std::sort on most platforms and just\n// use this version where there are compiler issues.\n\n// Using Explicit Template Instantiation with the types:\n//\n// std::vector<int>, std::vector<int64_t>, std::vector<std::pair<int64_t,int64_t>>\n//\n// Update in Ioss_Sort.C if other types are needed.\n\nnamespace {\n const int QSORT_CUTOFF = 12;\n\n template <typename INT> void SWAP(INT *V, size_t I, size_t J) { std::swap(V[I], V[J]); }\n\n template <typename INT> void order3(INT v[], size_t left, size_t center, size_t right)\n {\n if (v[left] > v[center]) {\n SWAP(v, left, center);\n }\n if (v[left] > v[right]) {\n SWAP(v, left, right);\n }\n if (v[center] > v[right]) {\n SWAP(v, center, right);\n }\n }\n\n template <typename INT> size_t median3(INT v[], size_t left, size_t right)\n {\n size_t center = (left + right) / 2;\n size_t pl = left;\n size_t pm = center;\n size_t pr = right;\n\n if (right - left > 40) {\n size_t s = (right - left) / 8;\n order3(v, left, left + s, left + 2 * s);\n order3(v, center - s, center, center + s);\n order3(v, right - 2 * s, right - s, right);\n\n // Now set up to get median of the 3 medians...\n pl = left + s;\n pm = center;\n pr = right - s;\n }\n order3(v, pl, pm, pr);\n\n SWAP(v, center, right - 1);\n return right - 1;\n }\n\n template <typename INT> void qsort_int(INT v[], size_t left, size_t right)\n {\n size_t pivot;\n size_t i, j;\n\n if (left + QSORT_CUTOFF < right) {\n pivot = median3(v, left, right);\n i = left;\n j = right - 1;\n\n for (;;) {\n while (v[++i] < v[pivot]) {\n ;\n }\n while (v[--j] > v[pivot]) {\n ;\n }\n if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }\n }\n\n SWAP(v, i, right - 1);\n qsort_int(v, left, i - 1);\n qsort_int(v, i + 1, right);\n }\n }\n\n template <typename INT> void isort_int(INT v[], size_t N)\n {\n size_t i, j;\n size_t ndx = 0;\n INT small;\n INT tmp;\n\n if (N <= 1) {\n return;\n }\n small = v[0];\n for (i = 1; i < N; i++) {\n if (v[i] < small) {\n small = v[i];\n ndx = i;\n }\n }\n /* Put smallest value in slot 0 */\n SWAP(v, 0, ndx);\n\n for (i = 1; i < N; i++) {\n tmp = v[i];\n for (j = i; tmp < v[j - 1]; j--) {\n v[j] = v[j - 1];\n }\n v[j] = tmp;\n }\n }\n} // namespace\n\nnamespace Ioss {\n template <typename INT> void qsort(std::vector<INT> &v)\n {\n if (v.size() <= 1) {\n return;\n }\n qsort_int(v.data(), 0, v.size() - 1);\n isort_int(v.data(), v.size());\n }\n} // namespace Ioss\n\n#endif" (#ifndef) "#ifndef" (identifier) "IOSS_Ioss_Sort_h" (preproc_def) "#define IOSS_Ioss_Sort_h\n" (#define) "#define" (identifier) "IOSS_Ioss_Sort_h" (preproc_include) "#include <cstddef>\n" (#include) "#include" (system_lib_string) "<cstddef>" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (comment) "// This is used instead of the std::sort since we were having issues" (comment) "// with the std::sort on some compiler versions with certain options" (comment) "// enabled (-fopenmp). If this shows up as a hotspot in performance" (comment) "// measurments, then we can use std::sort on most platforms and just" (comment) "// use this version where there are compiler issues." (comment) "// Using Explicit Template Instantiation with the types:" (comment) "//" (comment) "// std::vector<int>, std::vector<int64_t>, std::vector<std::pair<int64_t,int64_t>>" (comment) "//" (comment) "// Update in Ioss_Sort.C if other types are needed." (type_identifier) "namespace" (;) "" (compound_statement) "{\n const int QSORT_CUTOFF = 12;\n\n template <typename INT> void SWAP(INT *V, size_t I, size_t J) { std::swap(V[I], V[J]); }\n\n template <typename INT> void order3(INT v[], size_t left, size_t center, size_t right)\n {\n if (v[left] > v[center]) {\n SWAP(v, left, center);\n }\n if (v[left] > v[right]) {\n SWAP(v, left, right);\n }\n if (v[center] > v[right]) {\n SWAP(v, center, right);\n }\n }\n\n template <typename INT> size_t median3(INT v[], size_t left, size_t right)\n {\n size_t center = (left + right) / 2;\n size_t pl = left;\n size_t pm = center;\n size_t pr = right;\n\n if (right - left > 40) {\n size_t s = (right - left) / 8;\n order3(v, left, left + s, left + 2 * s);\n order3(v, center - s, center, center + s);\n order3(v, right - 2 * s, right - s, right);\n\n // Now set up to get median of the 3 medians...\n pl = left + s;\n pm = center;\n pr = right - s;\n }\n order3(v, pl, pm, pr);\n\n SWAP(v, center, right - 1);\n return right - 1;\n }\n\n template <typename INT> void qsort_int(INT v[], size_t left, size_t right)\n {\n size_t pivot;\n size_t i, j;\n\n if (left + QSORT_CUTOFF < right) {\n pivot = median3(v, left, right);\n i = left;\n j = right - 1;\n\n for (;;) {\n while (v[++i] < v[pivot]) {\n ;\n }\n while (v[--j] > v[pivot]) {\n ;\n }\n if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }\n }\n\n SWAP(v, i, right - 1);\n qsort_int(v, left, i - 1);\n qsort_int(v, i + 1, right);\n }\n }\n\n template <typename INT> void isort_int(INT v[], size_t N)\n {\n size_t i, j;\n size_t ndx = 0;\n INT small;\n INT tmp;\n\n if (N <= 1) {\n return;\n }\n small = v[0];\n for (i = 1; i < N; i++) {\n if (v[i] < small) {\n small = v[i];\n ndx = i;\n }\n }\n /* Put smallest value in slot 0 */\n SWAP(v, 0, ndx);\n\n for (i = 1; i < N; i++) {\n tmp = v[i];\n for (j = i; tmp < v[j - 1]; j--) {\n v[j] = v[j - 1];\n }\n v[j] = tmp;\n }\n }\n}" ({) "{" (declaration) "const int QSORT_CUTOFF = 12;" (type_qualifier) "const" (const) "const" (primitive_type) "int" (init_declarator) "QSORT_CUTOFF = 12" (identifier) "QSORT_CUTOFF" (=) "=" (number_literal) "12" (;) ";" (expression_statement) "template <typename INT> void SWAP(INT *V, size_t I, size_t J)" (binary_expression) "template <typename INT> void SWAP(INT *V, size_t I, size_t J)" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "INT" (identifier) "INT" (>) ">" (ERROR) "void" (identifier) "void" (call_expression) "SWAP(INT *V, size_t I, size_t J)" (identifier) "SWAP" (argument_list) "(INT *V, size_t I, size_t J)" (() "(" (binary_expression) "INT *V" (identifier) "INT" (*) "*" (identifier) "V" (,) "," (identifier) "size_t" (ERROR) "I" (identifier) "I" (,) "," (identifier) "size_t" (ERROR) "J" (identifier) "J" ()) ")" (;) "" (compound_statement) "{ std::swap(V[I], V[J]); }" ({) "{" (labeled_statement) "std::swap(V[I], V[J]);" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "swap(V[I], V[J]);" (call_expression) "swap(V[I], V[J])" (identifier) "swap" (argument_list) "(V[I], V[J])" (() "(" (subscript_expression) "V[I]" (identifier) "V" ([) "[" (identifier) "I" (]) "]" (,) "," (subscript_expression) "V[J]" (identifier) "V" ([) "[" (identifier) "J" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "template <typename INT> void order3(INT v[], size_t left, size_t center, size_t right)" (binary_expression) "template <typename INT> void order3(INT v[], size_t left, size_t center, size_t right)" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "INT" (identifier) "INT" (>) ">" (ERROR) "void" (identifier) "void" (call_expression) "order3(INT v[], size_t left, size_t center, size_t right)" (identifier) "order3" (argument_list) "(INT v[], size_t left, size_t center, size_t right)" (() "(" (identifier) "INT" (ERROR) "v[]" (identifier) "v" ([) "[" (]) "]" (,) "," (identifier) "size_t" (ERROR) "left" (identifier) "left" (,) "," (identifier) "size_t" (ERROR) "center" (identifier) "center" (,) "," (identifier) "size_t" (ERROR) "right" (identifier) "right" ()) ")" (;) "" (compound_statement) "{\n if (v[left] > v[center]) {\n SWAP(v, left, center);\n }\n if (v[left] > v[right]) {\n SWAP(v, left, right);\n }\n if (v[center] > v[right]) {\n SWAP(v, center, right);\n }\n }" ({) "{" (if_statement) "if (v[left] > v[center]) {\n SWAP(v, left, center);\n }" (if) "if" (parenthesized_expression) "(v[left] > v[center])" (() "(" (binary_expression) "v[left] > v[center]" (subscript_expression) "v[left]" (identifier) "v" ([) "[" (identifier) "left" (]) "]" (>) ">" (subscript_expression) "v[center]" (identifier) "v" ([) "[" (identifier) "center" (]) "]" ()) ")" (compound_statement) "{\n SWAP(v, left, center);\n }" ({) "{" (expression_statement) "SWAP(v, left, center);" (call_expression) "SWAP(v, left, center)" (identifier) "SWAP" (argument_list) "(v, left, center)" (() "(" (identifier) "v" (,) "," (identifier) "left" (,) "," (identifier) "center" ()) ")" (;) ";" (}) "}" (if_statement) "if (v[left] > v[right]) {\n SWAP(v, left, right);\n }" (if) "if" (parenthesized_expression) "(v[left] > v[right])" (() "(" (binary_expression) "v[left] > v[right]" (subscript_expression) "v[left]" (identifier) "v" ([) "[" (identifier) "left" (]) "]" (>) ">" (subscript_expression) "v[right]" (identifier) "v" ([) "[" (identifier) "right" (]) "]" ()) ")" (compound_statement) "{\n SWAP(v, left, right);\n }" ({) "{" (expression_statement) "SWAP(v, left, right);" (call_expression) "SWAP(v, left, right)" (identifier) "SWAP" (argument_list) "(v, left, right)" (() "(" (identifier) "v" (,) "," (identifier) "left" (,) "," (identifier) "right" ()) ")" (;) ";" (}) "}" (if_statement) "if (v[center] > v[right]) {\n SWAP(v, center, right);\n }" (if) "if" (parenthesized_expression) "(v[center] > v[right])" (() "(" (binary_expression) "v[center] > v[right]" (subscript_expression) "v[center]" (identifier) "v" ([) "[" (identifier) "center" (]) "]" (>) ">" (subscript_expression) "v[right]" (identifier) "v" ([) "[" (identifier) "right" (]) "]" ()) ")" (compound_statement) "{\n SWAP(v, center, right);\n }" ({) "{" (expression_statement) "SWAP(v, center, right);" (call_expression) "SWAP(v, center, right)" (identifier) "SWAP" (argument_list) "(v, center, right)" (() "(" (identifier) "v" (,) "," (identifier) "center" (,) "," (identifier) "right" ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) "template <typename INT> size_t median3(INT v[], size_t left, size_t right)" (binary_expression) "template <typename INT> size_t median3(INT v[], size_t left, size_t right)" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "INT" (identifier) "INT" (>) ">" (ERROR) "size_t" (identifier) "size_t" (call_expression) "median3(INT v[], size_t left, size_t right)" (identifier) "median3" (argument_list) "(INT v[], size_t left, size_t right)" (() "(" (identifier) "INT" (ERROR) "v[]" (identifier) "v" ([) "[" (]) "]" (,) "," (identifier) "size_t" (ERROR) "left" (identifier) "left" (,) "," (identifier) "size_t" (ERROR) "right" (identifier) "right" ()) ")" (;) "" (compound_statement) "{\n size_t center = (left + right) / 2;\n size_t pl = left;\n size_t pm = center;\n size_t pr = right;\n\n if (right - left > 40) {\n size_t s = (right - left) / 8;\n order3(v, left, left + s, left + 2 * s);\n order3(v, center - s, center, center + s);\n order3(v, right - 2 * s, right - s, right);\n\n // Now set up to get median of the 3 medians...\n pl = left + s;\n pm = center;\n pr = right - s;\n }\n order3(v, pl, pm, pr);\n\n SWAP(v, center, right - 1);\n return right - 1;\n }" ({) "{" (declaration) "size_t center = (left + right) / 2;" (primitive_type) "size_t" (init_declarator) "center = (left + right) / 2" (identifier) "center" (=) "=" (binary_expression) "(left + right) / 2" (parenthesized_expression) "(left + right)" (() "(" (binary_expression) "left + right" (identifier) "left" (+) "+" (identifier) "right" ()) ")" (/) "/" (number_literal) "2" (;) ";" (declaration) "size_t pl = left;" (primitive_type) "size_t" (init_declarator) "pl = left" (identifier) "pl" (=) "=" (identifier) "left" (;) ";" (declaration) "size_t pm = center;" (primitive_type) "size_t" (init_declarator) "pm = center" (identifier) "pm" (=) "=" (identifier) "center" (;) ";" (declaration) "size_t pr = right;" (primitive_type) "size_t" (init_declarator) "pr = right" (identifier) "pr" (=) "=" (identifier) "right" (;) ";" (if_statement) "if (right - left > 40) {\n size_t s = (right - left) / 8;\n order3(v, left, left + s, left + 2 * s);\n order3(v, center - s, center, center + s);\n order3(v, right - 2 * s, right - s, right);\n\n // Now set up to get median of the 3 medians...\n pl = left + s;\n pm = center;\n pr = right - s;\n }" (if) "if" (parenthesized_expression) "(right - left > 40)" (() "(" (binary_expression) "right - left > 40" (binary_expression) "right - left" (identifier) "right" (-) "-" (identifier) "left" (>) ">" (number_literal) "40" ()) ")" (compound_statement) "{\n size_t s = (right - left) / 8;\n order3(v, left, left + s, left + 2 * s);\n order3(v, center - s, center, center + s);\n order3(v, right - 2 * s, right - s, right);\n\n // Now set up to get median of the 3 medians...\n pl = left + s;\n pm = center;\n pr = right - s;\n }" ({) "{" (declaration) "size_t s = (right - left) / 8;" (primitive_type) "size_t" (init_declarator) "s = (right - left) / 8" (identifier) "s" (=) "=" (binary_expression) "(right - left) / 8" (parenthesized_expression) "(right - left)" (() "(" (binary_expression) "right - left" (identifier) "right" (-) "-" (identifier) "left" ()) ")" (/) "/" (number_literal) "8" (;) ";" (expression_statement) "order3(v, left, left + s, left + 2 * s);" (call_expression) "order3(v, left, left + s, left + 2 * s)" (identifier) "order3" (argument_list) "(v, left, left + s, left + 2 * s)" (() "(" (identifier) "v" (,) "," (identifier) "left" (,) "," (binary_expression) "left + s" (identifier) "left" (+) "+" (identifier) "s" (,) "," (binary_expression) "left + 2 * s" (identifier) "left" (+) "+" (binary_expression) "2 * s" (number_literal) "2" (*) "*" (identifier) "s" ()) ")" (;) ";" (expression_statement) "order3(v, center - s, center, center + s);" (call_expression) "order3(v, center - s, center, center + s)" (identifier) "order3" (argument_list) "(v, center - s, center, center + s)" (() "(" (identifier) "v" (,) "," (binary_expression) "center - s" (identifier) "center" (-) "-" (identifier) "s" (,) "," (identifier) "center" (,) "," (binary_expression) "center + s" (identifier) "center" (+) "+" (identifier) "s" ()) ")" (;) ";" (expression_statement) "order3(v, right - 2 * s, right - s, right);" (call_expression) "order3(v, right - 2 * s, right - s, right)" (identifier) "order3" (argument_list) "(v, right - 2 * s, right - s, right)" (() "(" (identifier) "v" (,) "," (binary_expression) "right - 2 * s" (identifier) "right" (-) "-" (binary_expression) "2 * s" (number_literal) "2" (*) "*" (identifier) "s" (,) "," (binary_expression) "right - s" (identifier) "right" (-) "-" (identifier) "s" (,) "," (identifier) "right" ()) ")" (;) ";" (comment) "// Now set up to get median of the 3 medians..." (expression_statement) "pl = left + s;" (assignment_expression) "pl = left + s" (identifier) "pl" (=) "=" (binary_expression) "left + s" (identifier) "left" (+) "+" (identifier) "s" (;) ";" (expression_statement) "pm = center;" (assignment_expression) "pm = center" (identifier) "pm" (=) "=" (identifier) "center" (;) ";" (expression_statement) "pr = right - s;" (assignment_expression) "pr = right - s" (identifier) "pr" (=) "=" (binary_expression) "right - s" (identifier) "right" (-) "-" (identifier) "s" (;) ";" (}) "}" (expression_statement) "order3(v, pl, pm, pr);" (call_expression) "order3(v, pl, pm, pr)" (identifier) "order3" (argument_list) "(v, pl, pm, pr)" (() "(" (identifier) "v" (,) "," (identifier) "pl" (,) "," (identifier) "pm" (,) "," (identifier) "pr" ()) ")" (;) ";" (expression_statement) "SWAP(v, center, right - 1);" (call_expression) "SWAP(v, center, right - 1)" (identifier) "SWAP" (argument_list) "(v, center, right - 1)" (() "(" (identifier) "v" (,) "," (identifier) "center" (,) "," (binary_expression) "right - 1" (identifier) "right" (-) "-" (number_literal) "1" ()) ")" (;) ";" (return_statement) "return right - 1;" (return) "return" (binary_expression) "right - 1" (identifier) "right" (-) "-" (number_literal) "1" (;) ";" (}) "}" (expression_statement) "template <typename INT> void qsort_int(INT v[], size_t left, size_t right)" (binary_expression) "template <typename INT> void qsort_int(INT v[], size_t left, size_t right)" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "INT" (identifier) "INT" (>) ">" (ERROR) "void" (identifier) "void" (call_expression) "qsort_int(INT v[], size_t left, size_t right)" (identifier) "qsort_int" (argument_list) "(INT v[], size_t left, size_t right)" (() "(" (identifier) "INT" (ERROR) "v[]" (identifier) "v" ([) "[" (]) "]" (,) "," (identifier) "size_t" (ERROR) "left" (identifier) "left" (,) "," (identifier) "size_t" (ERROR) "right" (identifier) "right" ()) ")" (;) "" (compound_statement) "{\n size_t pivot;\n size_t i, j;\n\n if (left + QSORT_CUTOFF < right) {\n pivot = median3(v, left, right);\n i = left;\n j = right - 1;\n\n for (;;) {\n while (v[++i] < v[pivot]) {\n ;\n }\n while (v[--j] > v[pivot]) {\n ;\n }\n if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }\n }\n\n SWAP(v, i, right - 1);\n qsort_int(v, left, i - 1);\n qsort_int(v, i + 1, right);\n }\n }" ({) "{" (declaration) "size_t pivot;" (primitive_type) "size_t" (identifier) "pivot" (;) ";" (declaration) "size_t i, j;" (primitive_type) "size_t" (identifier) "i" (,) "," (identifier) "j" (;) ";" (if_statement) "if (left + QSORT_CUTOFF < right) {\n pivot = median3(v, left, right);\n i = left;\n j = right - 1;\n\n for (;;) {\n while (v[++i] < v[pivot]) {\n ;\n }\n while (v[--j] > v[pivot]) {\n ;\n }\n if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }\n }\n\n SWAP(v, i, right - 1);\n qsort_int(v, left, i - 1);\n qsort_int(v, i + 1, right);\n }" (if) "if" (parenthesized_expression) "(left + QSORT_CUTOFF < right)" (() "(" (binary_expression) "left + QSORT_CUTOFF < right" (binary_expression) "left + QSORT_CUTOFF" (identifier) "left" (+) "+" (identifier) "QSORT_CUTOFF" (<) "<" (identifier) "right" ()) ")" (compound_statement) "{\n pivot = median3(v, left, right);\n i = left;\n j = right - 1;\n\n for (;;) {\n while (v[++i] < v[pivot]) {\n ;\n }\n while (v[--j] > v[pivot]) {\n ;\n }\n if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }\n }\n\n SWAP(v, i, right - 1);\n qsort_int(v, left, i - 1);\n qsort_int(v, i + 1, right);\n }" ({) "{" (expression_statement) "pivot = median3(v, left, right);" (assignment_expression) "pivot = median3(v, left, right)" (identifier) "pivot" (=) "=" (call_expression) "median3(v, left, right)" (identifier) "median3" (argument_list) "(v, left, right)" (() "(" (identifier) "v" (,) "," (identifier) "left" (,) "," (identifier) "right" ()) ")" (;) ";" (expression_statement) "i = left;" (assignment_expression) "i = left" (identifier) "i" (=) "=" (identifier) "left" (;) ";" (expression_statement) "j = right - 1;" (assignment_expression) "j = right - 1" (identifier) "j" (=) "=" (binary_expression) "right - 1" (identifier) "right" (-) "-" (number_literal) "1" (;) ";" (for_statement) "for (;;) {\n while (v[++i] < v[pivot]) {\n ;\n }\n while (v[--j] > v[pivot]) {\n ;\n }\n if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }\n }" (for) "for" (() "(" (;) ";" (;) ";" ()) ")" (compound_statement) "{\n while (v[++i] < v[pivot]) {\n ;\n }\n while (v[--j] > v[pivot]) {\n ;\n }\n if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }\n }" ({) "{" (while_statement) "while (v[++i] < v[pivot]) {\n ;\n }" (while) "while" (parenthesized_expression) "(v[++i] < v[pivot])" (() "(" (binary_expression) "v[++i] < v[pivot]" (subscript_expression) "v[++i]" (identifier) "v" ([) "[" (update_expression) "++i" (++) "++" (identifier) "i" (]) "]" (<) "<" (subscript_expression) "v[pivot]" (identifier) "v" ([) "[" (identifier) "pivot" (]) "]" ()) ")" (compound_statement) "{\n ;\n }" ({) "{" (expression_statement) ";" (;) ";" (}) "}" (while_statement) "while (v[--j] > v[pivot]) {\n ;\n }" (while) "while" (parenthesized_expression) "(v[--j] > v[pivot])" (() "(" (binary_expression) "v[--j] > v[pivot]" (subscript_expression) "v[--j]" (identifier) "v" ([) "[" (update_expression) "--j" (--) "--" (identifier) "j" (]) "]" (>) ">" (subscript_expression) "v[pivot]" (identifier) "v" ([) "[" (identifier) "pivot" (]) "]" ()) ")" (compound_statement) "{\n ;\n }" ({) "{" (expression_statement) ";" (;) ";" (}) "}" (if_statement) "if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }" (if) "if" (parenthesized_expression) "(i < j)" (() "(" (binary_expression) "i < j" (identifier) "i" (<) "<" (identifier) "j" ()) ")" (compound_statement) "{\n SWAP(v, i, j);\n }" ({) "{" (expression_statement) "SWAP(v, i, j);" (call_expression) "SWAP(v, i, j)" (identifier) "SWAP" (argument_list) "(v, i, j)" (() "(" (identifier) "v" (,) "," (identifier) "i" (,) "," (identifier) "j" ()) ")" (;) ";" (}) "}" (else_clause) "else {\n break;\n }" (else) "else" (compound_statement) "{\n break;\n }" ({) "{" (break_statement) "break;" (break) "break" (;) ";" (}) "}" (}) "}" (expression_statement) "SWAP(v, i, right - 1);" (call_expression) "SWAP(v, i, right - 1)" (identifier) "SWAP" (argument_list) "(v, i, right - 1)" (() "(" (identifier) "v" (,) "," (identifier) "i" (,) "," (binary_expression) "right - 1" (identifier) "right" (-) "-" (number_literal) "1" ()) ")" (;) ";" (expression_statement) "qsort_int(v, left, i - 1);" (call_expression) "qsort_int(v, left, i - 1)" (identifier) "qsort_int" (argument_list) "(v, left, i - 1)" (() "(" (identifier) "v" (,) "," (identifier) "left" (,) "," (binary_expression) "i - 1" (identifier) "i" (-) "-" (number_literal) "1" ()) ")" (;) ";" (expression_statement) "qsort_int(v, i + 1, right);" (call_expression) "qsort_int(v, i + 1, right)" (identifier) "qsort_int" (argument_list) "(v, i + 1, right)" (() "(" (identifier) "v" (,) "," (binary_expression) "i + 1" (identifier) "i" (+) "+" (number_literal) "1" (,) "," (identifier) "right" ()) ")" (;) ";" (}) "}" (}) "}" (expression_statement) "template <typename INT> void isort_int(INT v[], size_t N)" (binary_expression) "template <typename INT> void isort_int(INT v[], size_t N)" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "INT" (identifier) "INT" (>) ">" (ERROR) "void" (identifier) "void" (call_expression) "isort_int(INT v[], size_t N)" (identifier) "isort_int" (argument_list) "(INT v[], size_t N)" (() "(" (identifier) "INT" (ERROR) "v[]" (identifier) "v" ([) "[" (]) "]" (,) "," (identifier) "size_t" (ERROR) "N" (identifier) "N" ()) ")" (;) "" (compound_statement) "{\n size_t i, j;\n size_t ndx = 0;\n INT small;\n INT tmp;\n\n if (N <= 1) {\n return;\n }\n small = v[0];\n for (i = 1; i < N; i++) {\n if (v[i] < small) {\n small = v[i];\n ndx = i;\n }\n }\n /* Put smallest value in slot 0 */\n SWAP(v, 0, ndx);\n\n for (i = 1; i < N; i++) {\n tmp = v[i];\n for (j = i; tmp < v[j - 1]; j--) {\n v[j] = v[j - 1];\n }\n v[j] = tmp;\n }\n }" ({) "{" (declaration) "size_t i, j;" (primitive_type) "size_t" (identifier) "i" (,) "," (identifier) "j" (;) ";" (declaration) "size_t ndx = 0;" (primitive_type) "size_t" (init_declarator) "ndx = 0" (identifier) "ndx" (=) "=" (number_literal) "0" (;) ";" (declaration) "INT small;" (type_identifier) "INT" (identifier) "small" (;) ";" (declaration) "INT tmp;" (type_identifier) "INT" (identifier) "tmp" (;) ";" (if_statement) "if (N <= 1) {\n return;\n }" (if) "if" (parenthesized_expression) "(N <= 1)" (() "(" (binary_expression) "N <= 1" (identifier) "N" (<=) "<=" (number_literal) "1" ()) ")" (compound_statement) "{\n return;\n }" ({) "{" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (expression_statement) "small = v[0];" (assignment_expression) "small = v[0]" (identifier) "small" (=) "=" (subscript_expression) "v[0]" (identifier) "v" ([) "[" (number_literal) "0" (]) "]" (;) ";" (for_statement) "for (i = 1; i < N; i++) {\n if (v[i] < small) {\n small = v[i];\n ndx = i;\n }\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 if (v[i] < small) {\n small = v[i];\n ndx = i;\n }\n }" ({) "{" (if_statement) "if (v[i] < small) {\n small = v[i];\n ndx = i;\n }" (if) "if" (parenthesized_expression) "(v[i] < small)" (() "(" (binary_expression) "v[i] < small" (subscript_expression) "v[i]" (identifier) "v" ([) "[" (identifier) "i" (]) "]" (<) "<" (identifier) "small" ()) ")" (compound_statement) "{\n small = v[i];\n ndx = i;\n }" ({) "{" (expression_statement) "small = v[i];" (assignment_expression) "small = v[i]" (identifier) "small" (=) "=" (subscript_expression) "v[i]" (identifier) "v" ([) "[" (identifier) "i" (]) "]" (;) ";" (expression_statement) "ndx = i;" (assignment_expression) "ndx = i" (identifier) "ndx" (=) "=" (identifier) "i" (;) ";" (}) "}" (}) "}" (comment) "/* Put smallest value in slot 0 */" (expression_statement) "SWAP(v, 0, ndx);" (call_expression) "SWAP(v, 0, ndx)" (identifier) "SWAP" (argument_list) "(v, 0, ndx)" (() "(" (identifier) "v" (,) "," (number_literal) "0" (,) "," (identifier) "ndx" ()) ")" (;) ";" (for_statement) "for (i = 1; i < N; i++) {\n tmp = v[i];\n for (j = i; tmp < v[j - 1]; j--) {\n v[j] = v[j - 1];\n }\n v[j] = tmp;\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 tmp = v[i];\n for (j = i; tmp < v[j - 1]; j--) {\n v[j] = v[j - 1];\n }\n v[j] = tmp;\n }" ({) "{" (expression_statement) "tmp = v[i];" (assignment_expression) "tmp = v[i]" (identifier) "tmp" (=) "=" (subscript_expression) "v[i]" (identifier) "v" ([) "[" (identifier) "i" (]) "]" (;) ";" (for_statement) "for (j = i; tmp < v[j - 1]; j--) {\n v[j] = v[j - 1];\n }" (for) "for" (() "(" (assignment_expression) "j = i" (identifier) "j" (=) "=" (identifier) "i" (;) ";" (binary_expression) "tmp < v[j - 1]" (identifier) "tmp" (<) "<" (subscript_expression) "v[j - 1]" (identifier) "v" ([) "[" (binary_expression) "j - 1" (identifier) "j" (-) "-" (number_literal) "1" (]) "]" (;) ";" (update_expression) "j--" (identifier) "j" (--) "--" ()) ")" (compound_statement) "{\n v[j] = v[j - 1];\n }" ({) "{" (expression_statement) "v[j] = v[j - 1];" (assignment_expression) "v[j] = v[j - 1]" (subscript_expression) "v[j]" (identifier) "v" ([) "[" (identifier) "j" (]) "]" (=) "=" (subscript_expression) "v[j - 1]" (identifier) "v" ([) "[" (binary_expression) "j - 1" (identifier) "j" (-) "-" (number_literal) "1" (]) "]" (;) ";" (}) "}" (expression_statement) "v[j] = tmp;" (assignment_expression) "v[j] = tmp" (subscript_expression) "v[j]" (identifier) "v" ([) "[" (identifier) "j" (]) "]" (=) "=" (identifier) "tmp" (;) ";" (}) "}" (}) "}" (}) "}" (comment) "// namespace" (function_definition) "namespace Ioss {\n template <typename INT> void qsort(std::vector<INT> &v)\n {\n if (v.size() <= 1) {\n return;\n }\n qsort_int(v.data(), 0, v.size() - 1);\n isort_int(v.data(), v.size());\n }\n}" (type_identifier) "namespace" (identifier) "Ioss" (compound_statement) "{\n template <typename INT> void qsort(std::vector<INT> &v)\n {\n if (v.size() <= 1) {\n return;\n }\n qsort_int(v.data(), 0, v.size() - 1);\n isort_int(v.data(), v.size());\n }\n}" ({) "{" (expression_statement) "template <typename INT> void qsort(std::vector<INT> &v)" (binary_expression) "template <typename INT> void qsort(std::vector<INT> &v)" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "INT" (identifier) "INT" (>) ">" (ERROR) "void" (identifier) "void" (call_expression) "qsort(std::vector<INT> &v)" (identifier) "qsort" (argument_list) "(std::vector<INT> &v)" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (binary_expression) "vector<INT> &v" (binary_expression) "vector<INT" (identifier) "vector" (<) "<" (identifier) "INT" (>) ">" (pointer_expression) "&v" (&) "&" (identifier) "v" ()) ")" (;) "" (compound_statement) "{\n if (v.size() <= 1) {\n return;\n }\n qsort_int(v.data(), 0, v.size() - 1);\n isort_int(v.data(), v.size());\n }" ({) "{" (if_statement) "if (v.size() <= 1) {\n return;\n }" (if) "if" (parenthesized_expression) "(v.size() <= 1)" (() "(" (binary_expression) "v.size() <= 1" (call_expression) "v.size()" (field_expression) "v.size" (identifier) "v" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (<=) "<=" (number_literal) "1" ()) ")" (compound_statement) "{\n return;\n }" ({) "{" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (expression_statement) "qsort_int(v.data(), 0, v.size() - 1);" (call_expression) "qsort_int(v.data(), 0, v.size() - 1)" (identifier) "qsort_int" (argument_list) "(v.data(), 0, v.size() - 1)" (() "(" (call_expression) "v.data()" (field_expression) "v.data" (identifier) "v" (.) "." (field_identifier) "data" (argument_list) "()" (() "(" ()) ")" (,) "," (number_literal) "0" (,) "," (binary_expression) "v.size() - 1" (call_expression) "v.size()" (field_expression) "v.size" (identifier) "v" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" (-) "-" (number_literal) "1" ()) ")" (;) ";" (expression_statement) "isort_int(v.data(), v.size());" (call_expression) "isort_int(v.data(), v.size())" (identifier) "isort_int" (argument_list) "(v.data(), v.size())" (() "(" (call_expression) "v.data()" (field_expression) "v.data" (identifier) "v" (.) "." (field_identifier) "data" (argument_list) "()" (() "(" ()) ")" (,) "," (call_expression) "v.size()" (field_expression) "v.size" (identifier) "v" (.) "." (field_identifier) "size" (argument_list) "()" (() "(" ()) ")" ()) ")" (;) ";" (}) "}" (}) "}" (comment) "// namespace Ioss" (#endif) "#endif"
1,047
28
{"language": "c", "success": true, "metadata": {"lines": 145, "avg_line_length": 31.82, "nodes": 614, "errors": 0, "source_hash": "dc210529ede8a9adf976976dc65553de65cda377b30d8522d1b8fb1f9c32a6c6", "categorized_nodes": 455}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef IOSS_Ioss_Sort_h\n#define IOSS_Ioss_Sort_h\n\n#include <cstddef>\n#include <vector>\n\n// This is used instead of the std::sort since we were having issues\n// with the std::sort on some compiler versions with certain options\n// enabled (-fopenmp). If this shows up as a hotspot in performance\n// measurments, then we can use std::sort on most platforms and just\n// use this version where there are compiler issues.\n\n// Using Explicit Template Instantiation with the types:\n//\n// std::vector<int>, std::vector<int64_t>, std::vector<std::pair<int64_t,int64_t>>\n//\n// Update in Ioss_Sort.C if other types are needed.\n\nnamespace {\n const int QSORT_CUTOFF = 12;\n\n template <typename INT> void SWAP(INT *V, size_t I, size_t J) { std::swap(V[I], V[J]); }\n\n template <typename INT> void order3(INT v[], size_t left, size_t center, size_t right)\n {\n if (v[left] > v[center]) {\n SWAP(v, left, center);\n }\n if (v[left] > v[right]) {\n SWAP(v, left, right);\n }\n if (v[center] > v[right]) {\n SWAP(v, center, right);\n }\n }\n\n template <typename INT> size_t median3(INT v[], size_t left, size_t right)\n {\n size_t center = (left + right) / 2;\n size_t pl = left;\n size_t pm = center;\n size_t pr = right;\n\n if (right - left > 40) {\n size_t s = (right - left) / 8;\n order3(v, left, left + s, left + 2 * s);\n order3(v, center - s, center, center + s);\n order3(v, right - 2 * s, right - s, right);\n\n // Now set up to get median of the 3 medians...\n pl = left + s;\n pm = center;\n pr = right - s;\n }\n order3(v, pl, pm, pr);\n\n SWAP(v, center, right - 1);\n return right - 1;\n }\n\n template <typename INT> void qsort_int(INT v[], size_t left, size_t right)\n {\n size_t pivot;\n size_t i, j;\n\n if (left + QSORT_CUTOFF < right) {\n pivot = median3(v, left, right);\n i = left;\n j = right - 1;\n\n for (;;) {\n while (v[++i] < v[pivot]) {\n ;\n }\n while (v[--j] > v[pivot]) {\n ;\n }\n if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }\n }\n\n SWAP(v, i, right - 1);\n qsort_int(v, left, i - 1);\n qsort_int(v, i + 1, right);\n }\n }\n\n template <typename INT> void isort_int(INT v[], size_t N)\n {\n size_t i, j;\n size_t ndx = 0;\n INT small;\n INT tmp;\n\n if (N <= 1) {\n return;\n }\n small = v[0];\n for (i = 1; i < N; i++) {\n if (v[i] < small) {\n small = v[i];\n ndx = i;\n }\n }\n /* Put smallest value in slot 0 */\n SWAP(v, 0, ndx);\n\n for (i = 1; i < N; i++) {\n tmp = v[i];\n for (j = i; tmp < v[j - 1]; j--) {\n v[j] = v[j - 1];\n }\n v[j] = tmp;\n }\n }\n} // namespace\n\nnamespace Ioss {\n template <typename INT> void qsort(std::vector<INT> &v)\n {\n if (v.size() <= 1) {\n return;\n }\n qsort_int(v.data(), 0, v.size() - 1);\n isort_int(v.data(), v.size());\n }\n} // namespace Ioss\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 546, 613], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 164, "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": "IOSS_Ioss_Sort_h", "parent": 0, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 24}}, {"id": 3, "type": "preproc_def", "text": "#define IOSS_Ioss_Sort_h\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": "IOSS_Ioss_Sort_h", "parent": 3, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 24}}, {"id": 6, "type": "preproc_include", "text": "#include <cstddef>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<cstddef>", "parent": 6, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <vector>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<vector>", "parent": 9, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 17}}, {"id": 12, "type": "type_identifier", "text": "namespace", "parent": 0, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 9}}, {"id": 13, "type": "declaration", "text": "const int QSORT_CUTOFF = 12;", "parent": 0, "children": [14, 15], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 30}}, {"id": 14, "type": "primitive_type", "text": "int", "parent": 13, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 11}}, {"id": 15, "type": "init_declarator", "text": "QSORT_CUTOFF = 12", "parent": 13, "children": [16, 17, 18], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 29}}, {"id": 16, "type": "identifier", "text": "QSORT_CUTOFF", "parent": 15, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 24}}, {"id": 17, "type": "=", "text": "=", "parent": 15, "children": [], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 26}}, {"id": 18, "type": "number_literal", "text": "12", "parent": 15, "children": [], "start_point": {"row": 51, "column": 27}, "end_point": {"row": 51, "column": 29}}, {"id": 19, "type": "binary_expression", "text": "template <typename INT> void SWAP(INT *V, size_t I, size_t J)", "parent": 0, "children": [20, 24, 26, 27, 29], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 63}}, {"id": 20, "type": "binary_expression", "text": "template <typename", "parent": 19, "children": [21, 22, 23], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 20}}, {"id": 21, "type": "identifier", "text": "template", "parent": 20, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 10}}, {"id": 22, "type": "<", "text": "<", "parent": 20, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 12}}, {"id": 23, "type": "identifier", "text": "typename", "parent": 20, "children": [], "start_point": {"row": 53, "column": 12}, "end_point": {"row": 53, "column": 20}}, {"id": 24, "type": "ERROR", "text": "INT", "parent": 19, "children": [25], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 24}}, {"id": 25, "type": "identifier", "text": "INT", "parent": 24, "children": [], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 24}}, {"id": 26, "type": ">", "text": ">", "parent": 19, "children": [], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 25}}, {"id": 27, "type": "ERROR", "text": "void", "parent": 19, "children": [28], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 30}}, {"id": 28, "type": "identifier", "text": "void", "parent": 27, "children": [], "start_point": {"row": 53, "column": 26}, "end_point": {"row": 53, "column": 30}}, {"id": 29, "type": "call_expression", "text": "SWAP(INT *V, size_t I, size_t J)", "parent": 19, "children": [30, 31], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 63}}, {"id": 30, "type": "identifier", "text": "SWAP", "parent": 29, "children": [], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 35}}, {"id": 31, "type": "argument_list", "text": "(INT *V, size_t I, size_t J)", "parent": 29, "children": [32, 36, 37, 39, 40], "start_point": {"row": 53, "column": 35}, "end_point": {"row": 53, "column": 63}}, {"id": 32, "type": "binary_expression", "text": "INT *V", "parent": 31, "children": [33, 34, 35], "start_point": {"row": 53, "column": 36}, "end_point": {"row": 53, "column": 42}}, {"id": 33, "type": "identifier", "text": "INT", "parent": 32, "children": [], "start_point": {"row": 53, "column": 36}, "end_point": {"row": 53, "column": 39}}, {"id": 34, "type": "*", "text": "*", "parent": 32, "children": [], "start_point": {"row": 53, "column": 40}, "end_point": {"row": 53, "column": 41}}, {"id": 35, "type": "identifier", "text": "V", "parent": 32, "children": [], "start_point": {"row": 53, "column": 41}, "end_point": {"row": 53, "column": 42}}, {"id": 36, "type": "identifier", "text": "size_t", "parent": 31, "children": [], "start_point": {"row": 53, "column": 44}, "end_point": {"row": 53, "column": 50}}, {"id": 37, "type": "ERROR", "text": "I", "parent": 31, "children": [38], "start_point": {"row": 53, "column": 51}, "end_point": {"row": 53, "column": 52}}, {"id": 38, "type": "identifier", "text": "I", "parent": 37, "children": [], "start_point": {"row": 53, "column": 51}, "end_point": {"row": 53, "column": 52}}, {"id": 39, "type": "identifier", "text": "size_t", "parent": 31, "children": [], "start_point": {"row": 53, "column": 54}, "end_point": {"row": 53, "column": 60}}, {"id": 40, "type": "ERROR", "text": "J", "parent": 31, "children": [41], "start_point": {"row": 53, "column": 61}, "end_point": {"row": 53, "column": 62}}, {"id": 41, "type": "identifier", "text": "J", "parent": 40, "children": [], "start_point": {"row": 53, "column": 61}, "end_point": {"row": 53, "column": 62}}, {"id": 42, "type": "labeled_statement", "text": "std::swap(V[I], V[J]);", "parent": 0, "children": [43], "start_point": {"row": 53, "column": 66}, "end_point": {"row": 53, "column": 88}}, {"id": 43, "type": "statement_identifier", "text": "std", "parent": 42, "children": [], "start_point": {"row": 53, "column": 66}, "end_point": {"row": 53, "column": 69}}, {"id": 44, "type": "call_expression", "text": "swap(V[I], V[J])", "parent": 42, "children": [45, 46], "start_point": {"row": 53, "column": 71}, "end_point": {"row": 53, "column": 87}}, {"id": 45, "type": "identifier", "text": "swap", "parent": 44, "children": [], "start_point": {"row": 53, "column": 71}, "end_point": {"row": 53, "column": 75}}, {"id": 46, "type": "argument_list", "text": "(V[I], V[J])", "parent": 44, "children": [47, 50], "start_point": {"row": 53, "column": 75}, "end_point": {"row": 53, "column": 87}}, {"id": 47, "type": "subscript_expression", "text": "V[I]", "parent": 46, "children": [48, 49], "start_point": {"row": 53, "column": 76}, "end_point": {"row": 53, "column": 80}}, {"id": 48, "type": "identifier", "text": "V", "parent": 47, "children": [], "start_point": {"row": 53, "column": 76}, "end_point": {"row": 53, "column": 77}}, {"id": 49, "type": "identifier", "text": "I", "parent": 47, "children": [], "start_point": {"row": 53, "column": 78}, "end_point": {"row": 53, "column": 79}}, {"id": 50, "type": "subscript_expression", "text": "V[J]", "parent": 46, "children": [51, 52], "start_point": {"row": 53, "column": 82}, "end_point": {"row": 53, "column": 86}}, {"id": 51, "type": "identifier", "text": "V", "parent": 50, "children": [], "start_point": {"row": 53, "column": 82}, "end_point": {"row": 53, "column": 83}}, {"id": 52, "type": "identifier", "text": "J", "parent": 50, "children": [], "start_point": {"row": 53, "column": 84}, "end_point": {"row": 53, "column": 85}}, {"id": 53, "type": "binary_expression", "text": "template <typename INT> void order3(INT v[], size_t left, size_t center, size_t right)", "parent": 0, "children": [54, 58, 60, 61, 63], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 88}}, {"id": 54, "type": "binary_expression", "text": "template <typename", "parent": 53, "children": [55, 56, 57], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 20}}, {"id": 55, "type": "identifier", "text": "template", "parent": 54, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 10}}, {"id": 56, "type": "<", "text": "<", "parent": 54, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 12}}, {"id": 57, "type": "identifier", "text": "typename", "parent": 54, "children": [], "start_point": {"row": 55, "column": 12}, "end_point": {"row": 55, "column": 20}}, {"id": 58, "type": "ERROR", "text": "INT", "parent": 53, "children": [59], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 24}}, {"id": 59, "type": "identifier", "text": "INT", "parent": 58, "children": [], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 24}}, {"id": 60, "type": ">", "text": ">", "parent": 53, "children": [], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 25}}, {"id": 61, "type": "ERROR", "text": "void", "parent": 53, "children": [62], "start_point": {"row": 55, "column": 26}, "end_point": {"row": 55, "column": 30}}, {"id": 62, "type": "identifier", "text": "void", "parent": 61, "children": [], "start_point": {"row": 55, "column": 26}, "end_point": {"row": 55, "column": 30}}, {"id": 63, "type": "call_expression", "text": "order3(INT v[], size_t left, size_t center, size_t right)", "parent": 53, "children": [64, 65], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 88}}, {"id": 64, "type": "identifier", "text": "order3", "parent": 63, "children": [], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 37}}, {"id": 65, "type": "argument_list", "text": "(INT v[], size_t left, size_t center, size_t right)", "parent": 63, "children": [66, 67, 69, 70, 72, 73, 75, 76], "start_point": {"row": 55, "column": 37}, "end_point": {"row": 55, "column": 88}}, {"id": 66, "type": "identifier", "text": "INT", "parent": 65, "children": [], "start_point": {"row": 55, "column": 38}, "end_point": {"row": 55, "column": 41}}, {"id": 67, "type": "ERROR", "text": "v[]", "parent": 65, "children": [68], "start_point": {"row": 55, "column": 42}, "end_point": {"row": 55, "column": 45}}, {"id": 68, "type": "identifier", "text": "v", "parent": 67, "children": [], "start_point": {"row": 55, "column": 42}, "end_point": {"row": 55, "column": 43}}, {"id": 69, "type": "identifier", "text": "size_t", "parent": 65, "children": [], "start_point": {"row": 55, "column": 47}, "end_point": {"row": 55, "column": 53}}, {"id": 70, "type": "ERROR", "text": "left", "parent": 65, "children": [71], "start_point": {"row": 55, "column": 54}, "end_point": {"row": 55, "column": 58}}, {"id": 71, "type": "identifier", "text": "left", "parent": 70, "children": [], "start_point": {"row": 55, "column": 54}, "end_point": {"row": 55, "column": 58}}, {"id": 72, "type": "identifier", "text": "size_t", "parent": 65, "children": [], "start_point": {"row": 55, "column": 60}, "end_point": {"row": 55, "column": 66}}, {"id": 73, "type": "ERROR", "text": "center", "parent": 65, "children": [74], "start_point": {"row": 55, "column": 67}, "end_point": {"row": 55, "column": 73}}, {"id": 74, "type": "identifier", "text": "center", "parent": 73, "children": [], "start_point": {"row": 55, "column": 67}, "end_point": {"row": 55, "column": 73}}, {"id": 75, "type": "identifier", "text": "size_t", "parent": 65, "children": [], "start_point": {"row": 55, "column": 75}, "end_point": {"row": 55, "column": 81}}, {"id": 76, "type": "ERROR", "text": "right", "parent": 65, "children": [77], "start_point": {"row": 55, "column": 82}, "end_point": {"row": 55, "column": 87}}, {"id": 77, "type": "identifier", "text": "right", "parent": 76, "children": [], "start_point": {"row": 55, "column": 82}, "end_point": {"row": 55, "column": 87}}, {"id": 78, "type": "if_statement", "text": "if (v[left] > v[center]) {\n SWAP(v, left, center);\n }", "parent": 0, "children": [79], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 59, "column": 5}}, {"id": 79, "type": "parenthesized_expression", "text": "(v[left] > v[center])", "parent": 78, "children": [80], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 28}}, {"id": 80, "type": "binary_expression", "text": "v[left] > v[center]", "parent": 79, "children": [81, 84, 85], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 27}}, {"id": 81, "type": "subscript_expression", "text": "v[left]", "parent": 80, "children": [82, 83], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 15}}, {"id": 82, "type": "identifier", "text": "v", "parent": 81, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 9}}, {"id": 83, "type": "identifier", "text": "left", "parent": 81, "children": [], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 14}}, {"id": 84, "type": ">", "text": ">", "parent": 80, "children": [], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 17}}, {"id": 85, "type": "subscript_expression", "text": "v[center]", "parent": 80, "children": [86, 87], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 27}}, {"id": 86, "type": "identifier", "text": "v", "parent": 85, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 19}}, {"id": 87, "type": "identifier", "text": "center", "parent": 85, "children": [], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 26}}, {"id": 88, "type": "call_expression", "text": "SWAP(v, left, center)", "parent": 78, "children": [89, 90], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 27}}, {"id": 89, "type": "identifier", "text": "SWAP", "parent": 88, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 10}}, {"id": 90, "type": "argument_list", "text": "(v, left, center)", "parent": 88, "children": [91, 92, 93], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 27}}, {"id": 91, "type": "identifier", "text": "v", "parent": 90, "children": [], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 12}}, {"id": 92, "type": "identifier", "text": "left", "parent": 90, "children": [], "start_point": {"row": 58, "column": 14}, "end_point": {"row": 58, "column": 18}}, {"id": 93, "type": "identifier", "text": "center", "parent": 90, "children": [], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 26}}, {"id": 94, "type": "if_statement", "text": "if (v[left] > v[right]) {\n SWAP(v, left, right);\n }", "parent": 0, "children": [95], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 62, "column": 5}}, {"id": 95, "type": "parenthesized_expression", "text": "(v[left] > v[right])", "parent": 94, "children": [96], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 27}}, {"id": 96, "type": "binary_expression", "text": "v[left] > v[right]", "parent": 95, "children": [97, 100, 101], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 26}}, {"id": 97, "type": "subscript_expression", "text": "v[left]", "parent": 96, "children": [98, 99], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 15}}, {"id": 98, "type": "identifier", "text": "v", "parent": 97, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 9}}, {"id": 99, "type": "identifier", "text": "left", "parent": 97, "children": [], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 14}}, {"id": 100, "type": ">", "text": ">", "parent": 96, "children": [], "start_point": {"row": 60, "column": 16}, "end_point": {"row": 60, "column": 17}}, {"id": 101, "type": "subscript_expression", "text": "v[right]", "parent": 96, "children": [102, 103], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 26}}, {"id": 102, "type": "identifier", "text": "v", "parent": 101, "children": [], "start_point": {"row": 60, "column": 18}, "end_point": {"row": 60, "column": 19}}, {"id": 103, "type": "identifier", "text": "right", "parent": 101, "children": [], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 25}}, {"id": 104, "type": "call_expression", "text": "SWAP(v, left, right)", "parent": 94, "children": [105, 106], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 26}}, {"id": 105, "type": "identifier", "text": "SWAP", "parent": 104, "children": [], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 10}}, {"id": 106, "type": "argument_list", "text": "(v, left, right)", "parent": 104, "children": [107, 108, 109], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 26}}, {"id": 107, "type": "identifier", "text": "v", "parent": 106, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 12}}, {"id": 108, "type": "identifier", "text": "left", "parent": 106, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 18}}, {"id": 109, "type": "identifier", "text": "right", "parent": 106, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 25}}, {"id": 110, "type": "if_statement", "text": "if (v[center] > v[right]) {\n SWAP(v, center, right);\n }", "parent": 0, "children": [111], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 65, "column": 5}}, {"id": 111, "type": "parenthesized_expression", "text": "(v[center] > v[right])", "parent": 110, "children": [112], "start_point": {"row": 63, "column": 7}, "end_point": {"row": 63, "column": 29}}, {"id": 112, "type": "binary_expression", "text": "v[center] > v[right]", "parent": 111, "children": [113, 116, 117], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 28}}, {"id": 113, "type": "subscript_expression", "text": "v[center]", "parent": 112, "children": [114, 115], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 17}}, {"id": 114, "type": "identifier", "text": "v", "parent": 113, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 9}}, {"id": 115, "type": "identifier", "text": "center", "parent": 113, "children": [], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 16}}, {"id": 116, "type": ">", "text": ">", "parent": 112, "children": [], "start_point": {"row": 63, "column": 18}, "end_point": {"row": 63, "column": 19}}, {"id": 117, "type": "subscript_expression", "text": "v[right]", "parent": 112, "children": [118, 119], "start_point": {"row": 63, "column": 20}, "end_point": {"row": 63, "column": 28}}, {"id": 118, "type": "identifier", "text": "v", "parent": 117, "children": [], "start_point": {"row": 63, "column": 20}, "end_point": {"row": 63, "column": 21}}, {"id": 119, "type": "identifier", "text": "right", "parent": 117, "children": [], "start_point": {"row": 63, "column": 22}, "end_point": {"row": 63, "column": 27}}, {"id": 120, "type": "call_expression", "text": "SWAP(v, center, right)", "parent": 110, "children": [121, 122], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 28}}, {"id": 121, "type": "identifier", "text": "SWAP", "parent": 120, "children": [], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 10}}, {"id": 122, "type": "argument_list", "text": "(v, center, right)", "parent": 120, "children": [123, 124, 125], "start_point": {"row": 64, "column": 10}, "end_point": {"row": 64, "column": 28}}, {"id": 123, "type": "identifier", "text": "v", "parent": 122, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 12}}, {"id": 124, "type": "identifier", "text": "center", "parent": 122, "children": [], "start_point": {"row": 64, "column": 14}, "end_point": {"row": 64, "column": 20}}, {"id": 125, "type": "identifier", "text": "right", "parent": 122, "children": [], "start_point": {"row": 64, "column": 22}, "end_point": {"row": 64, "column": 27}}, {"id": 126, "type": "binary_expression", "text": "template <typename INT> size_t median3(INT v[], size_t left, size_t right)", "parent": 0, "children": [127, 131, 133, 134, 136], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 76}}, {"id": 127, "type": "binary_expression", "text": "template <typename", "parent": 126, "children": [128, 129, 130], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 20}}, {"id": 128, "type": "identifier", "text": "template", "parent": 127, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 10}}, {"id": 129, "type": "<", "text": "<", "parent": 127, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 12}}, {"id": 130, "type": "identifier", "text": "typename", "parent": 127, "children": [], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 20}}, {"id": 131, "type": "ERROR", "text": "INT", "parent": 126, "children": [132], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 24}}, {"id": 132, "type": "identifier", "text": "INT", "parent": 131, "children": [], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 24}}, {"id": 133, "type": ">", "text": ">", "parent": 126, "children": [], "start_point": {"row": 68, "column": 24}, "end_point": {"row": 68, "column": 25}}, {"id": 134, "type": "ERROR", "text": "size_t", "parent": 126, "children": [135], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 32}}, {"id": 135, "type": "identifier", "text": "size_t", "parent": 134, "children": [], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 32}}, {"id": 136, "type": "call_expression", "text": "median3(INT v[], size_t left, size_t right)", "parent": 126, "children": [137, 138], "start_point": {"row": 68, "column": 33}, "end_point": {"row": 68, "column": 76}}, {"id": 137, "type": "identifier", "text": "median3", "parent": 136, "children": [], "start_point": {"row": 68, "column": 33}, "end_point": {"row": 68, "column": 40}}, {"id": 138, "type": "argument_list", "text": "(INT v[], size_t left, size_t right)", "parent": 136, "children": [139, 140, 142, 143, 145, 146], "start_point": {"row": 68, "column": 40}, "end_point": {"row": 68, "column": 76}}, {"id": 139, "type": "identifier", "text": "INT", "parent": 138, "children": [], "start_point": {"row": 68, "column": 41}, "end_point": {"row": 68, "column": 44}}, {"id": 140, "type": "ERROR", "text": "v[]", "parent": 138, "children": [141], "start_point": {"row": 68, "column": 45}, "end_point": {"row": 68, "column": 48}}, {"id": 141, "type": "identifier", "text": "v", "parent": 140, "children": [], "start_point": {"row": 68, "column": 45}, "end_point": {"row": 68, "column": 46}}, {"id": 142, "type": "identifier", "text": "size_t", "parent": 138, "children": [], "start_point": {"row": 68, "column": 50}, "end_point": {"row": 68, "column": 56}}, {"id": 143, "type": "ERROR", "text": "left", "parent": 138, "children": [144], "start_point": {"row": 68, "column": 57}, "end_point": {"row": 68, "column": 61}}, {"id": 144, "type": "identifier", "text": "left", "parent": 143, "children": [], "start_point": {"row": 68, "column": 57}, "end_point": {"row": 68, "column": 61}}, {"id": 145, "type": "identifier", "text": "size_t", "parent": 138, "children": [], "start_point": {"row": 68, "column": 63}, "end_point": {"row": 68, "column": 69}}, {"id": 146, "type": "ERROR", "text": "right", "parent": 138, "children": [147], "start_point": {"row": 68, "column": 70}, "end_point": {"row": 68, "column": 75}}, {"id": 147, "type": "identifier", "text": "right", "parent": 146, "children": [], "start_point": {"row": 68, "column": 70}, "end_point": {"row": 68, "column": 75}}, {"id": 148, "type": "declaration", "text": "size_t center = (left + right) / 2;", "parent": 0, "children": [149, 150], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 39}}, {"id": 149, "type": "primitive_type", "text": "size_t", "parent": 148, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 10}}, {"id": 150, "type": "init_declarator", "text": "center = (left + right) / 2", "parent": 148, "children": [151, 152, 153], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 38}}, {"id": 151, "type": "identifier", "text": "center", "parent": 150, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 17}}, {"id": 152, "type": "=", "text": "=", "parent": 150, "children": [], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 19}}, {"id": 153, "type": "binary_expression", "text": "(left + right) / 2", "parent": 150, "children": [154, 159, 160], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 38}}, {"id": 154, "type": "parenthesized_expression", "text": "(left + right)", "parent": 153, "children": [155], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 34}}, {"id": 155, "type": "binary_expression", "text": "left + right", "parent": 154, "children": [156, 157, 158], "start_point": {"row": 70, "column": 21}, "end_point": {"row": 70, "column": 33}}, {"id": 156, "type": "identifier", "text": "left", "parent": 155, "children": [], "start_point": {"row": 70, "column": 21}, "end_point": {"row": 70, "column": 25}}, {"id": 157, "type": "+", "text": "+", "parent": 155, "children": [], "start_point": {"row": 70, "column": 26}, "end_point": {"row": 70, "column": 27}}, {"id": 158, "type": "identifier", "text": "right", "parent": 155, "children": [], "start_point": {"row": 70, "column": 28}, "end_point": {"row": 70, "column": 33}}, {"id": 159, "type": "/", "text": "/", "parent": 153, "children": [], "start_point": {"row": 70, "column": 35}, "end_point": {"row": 70, "column": 36}}, {"id": 160, "type": "number_literal", "text": "2", "parent": 153, "children": [], "start_point": {"row": 70, "column": 37}, "end_point": {"row": 70, "column": 38}}, {"id": 161, "type": "declaration", "text": "size_t pl = left;", "parent": 0, "children": [162, 163], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 25}}, {"id": 162, "type": "primitive_type", "text": "size_t", "parent": 161, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 10}}, {"id": 163, "type": "init_declarator", "text": "pl = left", "parent": 161, "children": [164, 165, 166], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 24}}, {"id": 164, "type": "identifier", "text": "pl", "parent": 163, "children": [], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 13}}, {"id": 165, "type": "=", "text": "=", "parent": 163, "children": [], "start_point": {"row": 71, "column": 18}, "end_point": {"row": 71, "column": 19}}, {"id": 166, "type": "identifier", "text": "left", "parent": 163, "children": [], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 24}}, {"id": 167, "type": "declaration", "text": "size_t pm = center;", "parent": 0, "children": [168, 169], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 27}}, {"id": 168, "type": "primitive_type", "text": "size_t", "parent": 167, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 10}}, {"id": 169, "type": "init_declarator", "text": "pm = center", "parent": 167, "children": [170, 171, 172], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 26}}, {"id": 170, "type": "identifier", "text": "pm", "parent": 169, "children": [], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 13}}, {"id": 171, "type": "=", "text": "=", "parent": 169, "children": [], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 19}}, {"id": 172, "type": "identifier", "text": "center", "parent": 169, "children": [], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 26}}, {"id": 173, "type": "declaration", "text": "size_t pr = right;", "parent": 0, "children": [174, 175], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 26}}, {"id": 174, "type": "primitive_type", "text": "size_t", "parent": 173, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 10}}, {"id": 175, "type": "init_declarator", "text": "pr = right", "parent": 173, "children": [176, 177, 178], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 25}}, {"id": 176, "type": "identifier", "text": "pr", "parent": 175, "children": [], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 13}}, {"id": 177, "type": "=", "text": "=", "parent": 175, "children": [], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 19}}, {"id": 178, "type": "identifier", "text": "right", "parent": 175, "children": [], "start_point": {"row": 73, "column": 20}, "end_point": {"row": 73, "column": 25}}, {"id": 179, "type": "if_statement", "text": "if (right - left > 40) {\n size_t s = (right - left) / 8;\n order3(v, left, left + s, left + 2 * s);\n order3(v, center - s, center, center + s);\n order3(v, right - 2 * s, right - s, right);\n\n // Now set up to get median of the 3 medians...\n pl = left + s;\n pm = center;\n pr = right - s;\n }", "parent": 0, "children": [180], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 85, "column": 5}}, {"id": 180, "type": "parenthesized_expression", "text": "(right - left > 40)", "parent": 179, "children": [181], "start_point": {"row": 75, "column": 7}, "end_point": {"row": 75, "column": 26}}, {"id": 181, "type": "binary_expression", "text": "right - left > 40", "parent": 180, "children": [182, 186, 187], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 25}}, {"id": 182, "type": "binary_expression", "text": "right - left", "parent": 181, "children": [183, 184, 185], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 20}}, {"id": 183, "type": "identifier", "text": "right", "parent": 182, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 13}}, {"id": 184, "type": "-", "text": "-", "parent": 182, "children": [], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 15}}, {"id": 185, "type": "identifier", "text": "left", "parent": 182, "children": [], "start_point": {"row": 75, "column": 16}, "end_point": {"row": 75, "column": 20}}, {"id": 186, "type": ">", "text": ">", "parent": 181, "children": [], "start_point": {"row": 75, "column": 21}, "end_point": {"row": 75, "column": 22}}, {"id": 187, "type": "number_literal", "text": "40", "parent": 181, "children": [], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 25}}, {"id": 188, "type": "declaration", "text": "size_t s = (right - left) / 8;", "parent": 179, "children": [189, 190], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 36}}, {"id": 189, "type": "primitive_type", "text": "size_t", "parent": 188, "children": [], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 12}}, {"id": 190, "type": "init_declarator", "text": "s = (right - left) / 8", "parent": 188, "children": [191, 192, 193], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 35}}, {"id": 191, "type": "identifier", "text": "s", "parent": 190, "children": [], "start_point": {"row": 76, "column": 13}, "end_point": {"row": 76, "column": 14}}, {"id": 192, "type": "=", "text": "=", "parent": 190, "children": [], "start_point": {"row": 76, "column": 15}, "end_point": {"row": 76, "column": 16}}, {"id": 193, "type": "binary_expression", "text": "(right - left) / 8", "parent": 190, "children": [194, 199, 200], "start_point": {"row": 76, "column": 17}, "end_point": {"row": 76, "column": 35}}, {"id": 194, "type": "parenthesized_expression", "text": "(right - left)", "parent": 193, "children": [195], "start_point": {"row": 76, "column": 17}, "end_point": {"row": 76, "column": 31}}, {"id": 195, "type": "binary_expression", "text": "right - left", "parent": 194, "children": [196, 197, 198], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 30}}, {"id": 196, "type": "identifier", "text": "right", "parent": 195, "children": [], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 23}}, {"id": 197, "type": "-", "text": "-", "parent": 195, "children": [], "start_point": {"row": 76, "column": 24}, "end_point": {"row": 76, "column": 25}}, {"id": 198, "type": "identifier", "text": "left", "parent": 195, "children": [], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 30}}, {"id": 199, "type": "/", "text": "/", "parent": 193, "children": [], "start_point": {"row": 76, "column": 32}, "end_point": {"row": 76, "column": 33}}, {"id": 200, "type": "number_literal", "text": "8", "parent": 193, "children": [], "start_point": {"row": 76, "column": 34}, "end_point": {"row": 76, "column": 35}}, {"id": 201, "type": "call_expression", "text": "order3(v, left, left + s, left + 2 * s)", "parent": 179, "children": [202, 203], "start_point": {"row": 77, "column": 6}, "end_point": {"row": 77, "column": 45}}, {"id": 202, "type": "identifier", "text": "order3", "parent": 201, "children": [], "start_point": {"row": 77, "column": 6}, "end_point": {"row": 77, "column": 12}}, {"id": 203, "type": "argument_list", "text": "(v, left, left + s, left + 2 * s)", "parent": 201, "children": [204, 205, 206, 210], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 45}}, {"id": 204, "type": "identifier", "text": "v", "parent": 203, "children": [], "start_point": {"row": 77, "column": 13}, "end_point": {"row": 77, "column": 14}}, {"id": 205, "type": "identifier", "text": "left", "parent": 203, "children": [], "start_point": {"row": 77, "column": 16}, "end_point": {"row": 77, "column": 20}}, {"id": 206, "type": "binary_expression", "text": "left + s", "parent": 203, "children": [207, 208, 209], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 30}}, {"id": 207, "type": "identifier", "text": "left", "parent": 206, "children": [], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 26}}, {"id": 208, "type": "+", "text": "+", "parent": 206, "children": [], "start_point": {"row": 77, "column": 27}, "end_point": {"row": 77, "column": 28}}, {"id": 209, "type": "identifier", "text": "s", "parent": 206, "children": [], "start_point": {"row": 77, "column": 29}, "end_point": {"row": 77, "column": 30}}, {"id": 210, "type": "binary_expression", "text": "left + 2 * s", "parent": 203, "children": [211, 212, 213], "start_point": {"row": 77, "column": 32}, "end_point": {"row": 77, "column": 44}}, {"id": 211, "type": "identifier", "text": "left", "parent": 210, "children": [], "start_point": {"row": 77, "column": 32}, "end_point": {"row": 77, "column": 36}}, {"id": 212, "type": "+", "text": "+", "parent": 210, "children": [], "start_point": {"row": 77, "column": 37}, "end_point": {"row": 77, "column": 38}}, {"id": 213, "type": "binary_expression", "text": "2 * s", "parent": 210, "children": [214, 215, 216], "start_point": {"row": 77, "column": 39}, "end_point": {"row": 77, "column": 44}}, {"id": 214, "type": "number_literal", "text": "2", "parent": 213, "children": [], "start_point": {"row": 77, "column": 39}, "end_point": {"row": 77, "column": 40}}, {"id": 215, "type": "*", "text": "*", "parent": 213, "children": [], "start_point": {"row": 77, "column": 41}, "end_point": {"row": 77, "column": 42}}, {"id": 216, "type": "identifier", "text": "s", "parent": 213, "children": [], "start_point": {"row": 77, "column": 43}, "end_point": {"row": 77, "column": 44}}, {"id": 217, "type": "call_expression", "text": "order3(v, center - s, center, center + s)", "parent": 179, "children": [218, 219], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 47}}, {"id": 218, "type": "identifier", "text": "order3", "parent": 217, "children": [], "start_point": {"row": 78, "column": 6}, "end_point": {"row": 78, "column": 12}}, {"id": 219, "type": "argument_list", "text": "(v, center - s, center, center + s)", "parent": 217, "children": [220, 221, 225, 226], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 47}}, {"id": 220, "type": "identifier", "text": "v", "parent": 219, "children": [], "start_point": {"row": 78, "column": 13}, "end_point": {"row": 78, "column": 14}}, {"id": 221, "type": "binary_expression", "text": "center - s", "parent": 219, "children": [222, 223, 224], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 26}}, {"id": 222, "type": "identifier", "text": "center", "parent": 221, "children": [], "start_point": {"row": 78, "column": 16}, "end_point": {"row": 78, "column": 22}}, {"id": 223, "type": "-", "text": "-", "parent": 221, "children": [], "start_point": {"row": 78, "column": 23}, "end_point": {"row": 78, "column": 24}}, {"id": 224, "type": "identifier", "text": "s", "parent": 221, "children": [], "start_point": {"row": 78, "column": 25}, "end_point": {"row": 78, "column": 26}}, {"id": 225, "type": "identifier", "text": "center", "parent": 219, "children": [], "start_point": {"row": 78, "column": 28}, "end_point": {"row": 78, "column": 34}}, {"id": 226, "type": "binary_expression", "text": "center + s", "parent": 219, "children": [227, 228, 229], "start_point": {"row": 78, "column": 36}, "end_point": {"row": 78, "column": 46}}, {"id": 227, "type": "identifier", "text": "center", "parent": 226, "children": [], "start_point": {"row": 78, "column": 36}, "end_point": {"row": 78, "column": 42}}, {"id": 228, "type": "+", "text": "+", "parent": 226, "children": [], "start_point": {"row": 78, "column": 43}, "end_point": {"row": 78, "column": 44}}, {"id": 229, "type": "identifier", "text": "s", "parent": 226, "children": [], "start_point": {"row": 78, "column": 45}, "end_point": {"row": 78, "column": 46}}, {"id": 230, "type": "call_expression", "text": "order3(v, right - 2 * s, right - s, right)", "parent": 179, "children": [231, 232], "start_point": {"row": 79, "column": 6}, "end_point": {"row": 79, "column": 48}}, {"id": 231, "type": "identifier", "text": "order3", "parent": 230, "children": [], "start_point": {"row": 79, "column": 6}, "end_point": {"row": 79, "column": 12}}, {"id": 232, "type": "argument_list", "text": "(v, right - 2 * s, right - s, right)", "parent": 230, "children": [233, 234, 241, 245], "start_point": {"row": 79, "column": 12}, "end_point": {"row": 79, "column": 48}}, {"id": 233, "type": "identifier", "text": "v", "parent": 232, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 14}}, {"id": 234, "type": "binary_expression", "text": "right - 2 * s", "parent": 232, "children": [235, 236, 237], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 29}}, {"id": 235, "type": "identifier", "text": "right", "parent": 234, "children": [], "start_point": {"row": 79, "column": 16}, "end_point": {"row": 79, "column": 21}}, {"id": 236, "type": "-", "text": "-", "parent": 234, "children": [], "start_point": {"row": 79, "column": 22}, "end_point": {"row": 79, "column": 23}}, {"id": 237, "type": "binary_expression", "text": "2 * s", "parent": 234, "children": [238, 239, 240], "start_point": {"row": 79, "column": 24}, "end_point": {"row": 79, "column": 29}}, {"id": 238, "type": "number_literal", "text": "2", "parent": 237, "children": [], "start_point": {"row": 79, "column": 24}, "end_point": {"row": 79, "column": 25}}, {"id": 239, "type": "*", "text": "*", "parent": 237, "children": [], "start_point": {"row": 79, "column": 26}, "end_point": {"row": 79, "column": 27}}, {"id": 240, "type": "identifier", "text": "s", "parent": 237, "children": [], "start_point": {"row": 79, "column": 28}, "end_point": {"row": 79, "column": 29}}, {"id": 241, "type": "binary_expression", "text": "right - s", "parent": 232, "children": [242, 243, 244], "start_point": {"row": 79, "column": 31}, "end_point": {"row": 79, "column": 40}}, {"id": 242, "type": "identifier", "text": "right", "parent": 241, "children": [], "start_point": {"row": 79, "column": 31}, "end_point": {"row": 79, "column": 36}}, {"id": 243, "type": "-", "text": "-", "parent": 241, "children": [], "start_point": {"row": 79, "column": 37}, "end_point": {"row": 79, "column": 38}}, {"id": 244, "type": "identifier", "text": "s", "parent": 241, "children": [], "start_point": {"row": 79, "column": 39}, "end_point": {"row": 79, "column": 40}}, {"id": 245, "type": "identifier", "text": "right", "parent": 232, "children": [], "start_point": {"row": 79, "column": 42}, "end_point": {"row": 79, "column": 47}}, {"id": 246, "type": "assignment_expression", "text": "pl = left + s", "parent": 179, "children": [247, 248, 249], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 19}}, {"id": 247, "type": "identifier", "text": "pl", "parent": 246, "children": [], "start_point": {"row": 82, "column": 6}, "end_point": {"row": 82, "column": 8}}, {"id": 248, "type": "=", "text": "=", "parent": 246, "children": [], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 10}}, {"id": 249, "type": "binary_expression", "text": "left + s", "parent": 246, "children": [250, 251, 252], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 19}}, {"id": 250, "type": "identifier", "text": "left", "parent": 249, "children": [], "start_point": {"row": 82, "column": 11}, "end_point": {"row": 82, "column": 15}}, {"id": 251, "type": "+", "text": "+", "parent": 249, "children": [], "start_point": {"row": 82, "column": 16}, "end_point": {"row": 82, "column": 17}}, {"id": 252, "type": "identifier", "text": "s", "parent": 249, "children": [], "start_point": {"row": 82, "column": 18}, "end_point": {"row": 82, "column": 19}}, {"id": 253, "type": "assignment_expression", "text": "pm = center", "parent": 179, "children": [254, 255, 256], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 17}}, {"id": 254, "type": "identifier", "text": "pm", "parent": 253, "children": [], "start_point": {"row": 83, "column": 6}, "end_point": {"row": 83, "column": 8}}, {"id": 255, "type": "=", "text": "=", "parent": 253, "children": [], "start_point": {"row": 83, "column": 9}, "end_point": {"row": 83, "column": 10}}, {"id": 256, "type": "identifier", "text": "center", "parent": 253, "children": [], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 17}}, {"id": 257, "type": "assignment_expression", "text": "pr = right - s", "parent": 179, "children": [258, 259, 260], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 20}}, {"id": 258, "type": "identifier", "text": "pr", "parent": 257, "children": [], "start_point": {"row": 84, "column": 6}, "end_point": {"row": 84, "column": 8}}, {"id": 259, "type": "=", "text": "=", "parent": 257, "children": [], "start_point": {"row": 84, "column": 9}, "end_point": {"row": 84, "column": 10}}, {"id": 260, "type": "binary_expression", "text": "right - s", "parent": 257, "children": [261, 262, 263], "start_point": {"row": 84, "column": 11}, "end_point": {"row": 84, "column": 20}}, {"id": 261, "type": "identifier", "text": "right", "parent": 260, "children": [], "start_point": {"row": 84, "column": 11}, "end_point": {"row": 84, "column": 16}}, {"id": 262, "type": "-", "text": "-", "parent": 260, "children": [], "start_point": {"row": 84, "column": 17}, "end_point": {"row": 84, "column": 18}}, {"id": 263, "type": "identifier", "text": "s", "parent": 260, "children": [], "start_point": {"row": 84, "column": 19}, "end_point": {"row": 84, "column": 20}}, {"id": 264, "type": "call_expression", "text": "order3(v, pl, pm, pr)", "parent": 0, "children": [265, 266], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 25}}, {"id": 265, "type": "identifier", "text": "order3", "parent": 264, "children": [], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 10}}, {"id": 266, "type": "argument_list", "text": "(v, pl, pm, pr)", "parent": 264, "children": [267, 268, 269, 270], "start_point": {"row": 86, "column": 10}, "end_point": {"row": 86, "column": 25}}, {"id": 267, "type": "identifier", "text": "v", "parent": 266, "children": [], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 12}}, {"id": 268, "type": "identifier", "text": "pl", "parent": 266, "children": [], "start_point": {"row": 86, "column": 14}, "end_point": {"row": 86, "column": 16}}, {"id": 269, "type": "identifier", "text": "pm", "parent": 266, "children": [], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 20}}, {"id": 270, "type": "identifier", "text": "pr", "parent": 266, "children": [], "start_point": {"row": 86, "column": 22}, "end_point": {"row": 86, "column": 24}}, {"id": 271, "type": "call_expression", "text": "SWAP(v, center, right - 1)", "parent": 0, "children": [272, 273], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 30}}, {"id": 272, "type": "identifier", "text": "SWAP", "parent": 271, "children": [], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 88, "column": 8}}, {"id": 273, "type": "argument_list", "text": "(v, center, right - 1)", "parent": 271, "children": [274, 275, 276], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 30}}, {"id": 274, "type": "identifier", "text": "v", "parent": 273, "children": [], "start_point": {"row": 88, "column": 9}, "end_point": {"row": 88, "column": 10}}, {"id": 275, "type": "identifier", "text": "center", "parent": 273, "children": [], "start_point": {"row": 88, "column": 12}, "end_point": {"row": 88, "column": 18}}, {"id": 276, "type": "binary_expression", "text": "right - 1", "parent": 273, "children": [277, 278, 279], "start_point": {"row": 88, "column": 20}, "end_point": {"row": 88, "column": 29}}, {"id": 277, "type": "identifier", "text": "right", "parent": 276, "children": [], "start_point": {"row": 88, "column": 20}, "end_point": {"row": 88, "column": 25}}, {"id": 278, "type": "-", "text": "-", "parent": 276, "children": [], "start_point": {"row": 88, "column": 26}, "end_point": {"row": 88, "column": 27}}, {"id": 279, "type": "number_literal", "text": "1", "parent": 276, "children": [], "start_point": {"row": 88, "column": 28}, "end_point": {"row": 88, "column": 29}}, {"id": 280, "type": "return_statement", "text": "return right - 1;", "parent": 0, "children": [281], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 21}}, {"id": 281, "type": "binary_expression", "text": "right - 1", "parent": 280, "children": [282, 283, 284], "start_point": {"row": 89, "column": 11}, "end_point": {"row": 89, "column": 20}}, {"id": 282, "type": "identifier", "text": "right", "parent": 281, "children": [], "start_point": {"row": 89, "column": 11}, "end_point": {"row": 89, "column": 16}}, {"id": 283, "type": "-", "text": "-", "parent": 281, "children": [], "start_point": {"row": 89, "column": 17}, "end_point": {"row": 89, "column": 18}}, {"id": 284, "type": "number_literal", "text": "1", "parent": 281, "children": [], "start_point": {"row": 89, "column": 19}, "end_point": {"row": 89, "column": 20}}, {"id": 285, "type": "binary_expression", "text": "template <typename INT> void qsort_int(INT v[], size_t left, size_t right)", "parent": 0, "children": [286, 290, 292, 293, 295], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 76}}, {"id": 286, "type": "binary_expression", "text": "template <typename", "parent": 285, "children": [287, 288, 289], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 20}}, {"id": 287, "type": "identifier", "text": "template", "parent": 286, "children": [], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 10}}, {"id": 288, "type": "<", "text": "<", "parent": 286, "children": [], "start_point": {"row": 92, "column": 11}, "end_point": {"row": 92, "column": 12}}, {"id": 289, "type": "identifier", "text": "typename", "parent": 286, "children": [], "start_point": {"row": 92, "column": 12}, "end_point": {"row": 92, "column": 20}}, {"id": 290, "type": "ERROR", "text": "INT", "parent": 285, "children": [291], "start_point": {"row": 92, "column": 21}, "end_point": {"row": 92, "column": 24}}, {"id": 291, "type": "identifier", "text": "INT", "parent": 290, "children": [], "start_point": {"row": 92, "column": 21}, "end_point": {"row": 92, "column": 24}}, {"id": 292, "type": ">", "text": ">", "parent": 285, "children": [], "start_point": {"row": 92, "column": 24}, "end_point": {"row": 92, "column": 25}}, {"id": 293, "type": "ERROR", "text": "void", "parent": 285, "children": [294], "start_point": {"row": 92, "column": 26}, "end_point": {"row": 92, "column": 30}}, {"id": 294, "type": "identifier", "text": "void", "parent": 293, "children": [], "start_point": {"row": 92, "column": 26}, "end_point": {"row": 92, "column": 30}}, {"id": 295, "type": "call_expression", "text": "qsort_int(INT v[], size_t left, size_t right)", "parent": 285, "children": [296, 297], "start_point": {"row": 92, "column": 31}, "end_point": {"row": 92, "column": 76}}, {"id": 296, "type": "identifier", "text": "qsort_int", "parent": 295, "children": [], "start_point": {"row": 92, "column": 31}, "end_point": {"row": 92, "column": 40}}, {"id": 297, "type": "argument_list", "text": "(INT v[], size_t left, size_t right)", "parent": 295, "children": [298, 299, 301, 302, 304, 305], "start_point": {"row": 92, "column": 40}, "end_point": {"row": 92, "column": 76}}, {"id": 298, "type": "identifier", "text": "INT", "parent": 297, "children": [], "start_point": {"row": 92, "column": 41}, "end_point": {"row": 92, "column": 44}}, {"id": 299, "type": "ERROR", "text": "v[]", "parent": 297, "children": [300], "start_point": {"row": 92, "column": 45}, "end_point": {"row": 92, "column": 48}}, {"id": 300, "type": "identifier", "text": "v", "parent": 299, "children": [], "start_point": {"row": 92, "column": 45}, "end_point": {"row": 92, "column": 46}}, {"id": 301, "type": "identifier", "text": "size_t", "parent": 297, "children": [], "start_point": {"row": 92, "column": 50}, "end_point": {"row": 92, "column": 56}}, {"id": 302, "type": "ERROR", "text": "left", "parent": 297, "children": [303], "start_point": {"row": 92, "column": 57}, "end_point": {"row": 92, "column": 61}}, {"id": 303, "type": "identifier", "text": "left", "parent": 302, "children": [], "start_point": {"row": 92, "column": 57}, "end_point": {"row": 92, "column": 61}}, {"id": 304, "type": "identifier", "text": "size_t", "parent": 297, "children": [], "start_point": {"row": 92, "column": 63}, "end_point": {"row": 92, "column": 69}}, {"id": 305, "type": "ERROR", "text": "right", "parent": 297, "children": [306], "start_point": {"row": 92, "column": 70}, "end_point": {"row": 92, "column": 75}}, {"id": 306, "type": "identifier", "text": "right", "parent": 305, "children": [], "start_point": {"row": 92, "column": 70}, "end_point": {"row": 92, "column": 75}}, {"id": 307, "type": "declaration", "text": "size_t pivot;", "parent": 0, "children": [308, 309], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 17}}, {"id": 308, "type": "primitive_type", "text": "size_t", "parent": 307, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 10}}, {"id": 309, "type": "identifier", "text": "pivot", "parent": 307, "children": [], "start_point": {"row": 94, "column": 11}, "end_point": {"row": 94, "column": 16}}, {"id": 310, "type": "declaration", "text": "size_t i, j;", "parent": 0, "children": [311, 312, 313], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 16}}, {"id": 311, "type": "primitive_type", "text": "size_t", "parent": 310, "children": [], "start_point": {"row": 95, "column": 4}, "end_point": {"row": 95, "column": 10}}, {"id": 312, "type": "identifier", "text": "i", "parent": 310, "children": [], "start_point": {"row": 95, "column": 11}, "end_point": {"row": 95, "column": 12}}, {"id": 313, "type": "identifier", "text": "j", "parent": 310, "children": [], "start_point": {"row": 95, "column": 14}, "end_point": {"row": 95, "column": 15}}, {"id": 314, "type": "if_statement", "text": "if (left + QSORT_CUTOFF < right) {\n pivot = median3(v, left, right);\n i = left;\n j = right - 1;\n\n for (;;) {\n while (v[++i] < v[pivot]) {\n ;\n }\n while (v[--j] > v[pivot]) {\n ;\n }\n if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }\n }\n\n SWAP(v, i, right - 1);\n qsort_int(v, left, i - 1);\n qsort_int(v, i + 1, right);\n }", "parent": 0, "children": [315], "start_point": {"row": 97, "column": 4}, "end_point": {"row": 120, "column": 5}}, {"id": 315, "type": "parenthesized_expression", "text": "(left + QSORT_CUTOFF < right)", "parent": 314, "children": [316], "start_point": {"row": 97, "column": 7}, "end_point": {"row": 97, "column": 36}}, {"id": 316, "type": "binary_expression", "text": "left + QSORT_CUTOFF < right", "parent": 315, "children": [317, 321, 322], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 35}}, {"id": 317, "type": "binary_expression", "text": "left + QSORT_CUTOFF", "parent": 316, "children": [318, 319, 320], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 27}}, {"id": 318, "type": "identifier", "text": "left", "parent": 317, "children": [], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 12}}, {"id": 319, "type": "+", "text": "+", "parent": 317, "children": [], "start_point": {"row": 97, "column": 13}, "end_point": {"row": 97, "column": 14}}, {"id": 320, "type": "identifier", "text": "QSORT_CUTOFF", "parent": 317, "children": [], "start_point": {"row": 97, "column": 15}, "end_point": {"row": 97, "column": 27}}, {"id": 321, "type": "<", "text": "<", "parent": 316, "children": [], "start_point": {"row": 97, "column": 28}, "end_point": {"row": 97, "column": 29}}, {"id": 322, "type": "identifier", "text": "right", "parent": 316, "children": [], "start_point": {"row": 97, "column": 30}, "end_point": {"row": 97, "column": 35}}, {"id": 323, "type": "assignment_expression", "text": "pivot = median3(v, left, right)", "parent": 314, "children": [324, 325, 326], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 37}}, {"id": 324, "type": "identifier", "text": "pivot", "parent": 323, "children": [], "start_point": {"row": 98, "column": 6}, "end_point": {"row": 98, "column": 11}}, {"id": 325, "type": "=", "text": "=", "parent": 323, "children": [], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 13}}, {"id": 326, "type": "call_expression", "text": "median3(v, left, right)", "parent": 323, "children": [327, 328], "start_point": {"row": 98, "column": 14}, "end_point": {"row": 98, "column": 37}}, {"id": 327, "type": "identifier", "text": "median3", "parent": 326, "children": [], "start_point": {"row": 98, "column": 14}, "end_point": {"row": 98, "column": 21}}, {"id": 328, "type": "argument_list", "text": "(v, left, right)", "parent": 326, "children": [329, 330, 331], "start_point": {"row": 98, "column": 21}, "end_point": {"row": 98, "column": 37}}, {"id": 329, "type": "identifier", "text": "v", "parent": 328, "children": [], "start_point": {"row": 98, "column": 22}, "end_point": {"row": 98, "column": 23}}, {"id": 330, "type": "identifier", "text": "left", "parent": 328, "children": [], "start_point": {"row": 98, "column": 25}, "end_point": {"row": 98, "column": 29}}, {"id": 331, "type": "identifier", "text": "right", "parent": 328, "children": [], "start_point": {"row": 98, "column": 31}, "end_point": {"row": 98, "column": 36}}, {"id": 332, "type": "assignment_expression", "text": "i = left", "parent": 314, "children": [333, 334, 335], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 18}}, {"id": 333, "type": "identifier", "text": "i", "parent": 332, "children": [], "start_point": {"row": 99, "column": 6}, "end_point": {"row": 99, "column": 7}}, {"id": 334, "type": "=", "text": "=", "parent": 332, "children": [], "start_point": {"row": 99, "column": 12}, "end_point": {"row": 99, "column": 13}}, {"id": 335, "type": "identifier", "text": "left", "parent": 332, "children": [], "start_point": {"row": 99, "column": 14}, "end_point": {"row": 99, "column": 18}}, {"id": 336, "type": "assignment_expression", "text": "j = right - 1", "parent": 314, "children": [337, 338, 339], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 23}}, {"id": 337, "type": "identifier", "text": "j", "parent": 336, "children": [], "start_point": {"row": 100, "column": 6}, "end_point": {"row": 100, "column": 7}}, {"id": 338, "type": "=", "text": "=", "parent": 336, "children": [], "start_point": {"row": 100, "column": 12}, "end_point": {"row": 100, "column": 13}}, {"id": 339, "type": "binary_expression", "text": "right - 1", "parent": 336, "children": [340, 341, 342], "start_point": {"row": 100, "column": 14}, "end_point": {"row": 100, "column": 23}}, {"id": 340, "type": "identifier", "text": "right", "parent": 339, "children": [], "start_point": {"row": 100, "column": 14}, "end_point": {"row": 100, "column": 19}}, {"id": 341, "type": "-", "text": "-", "parent": 339, "children": [], "start_point": {"row": 100, "column": 20}, "end_point": {"row": 100, "column": 21}}, {"id": 342, "type": "number_literal", "text": "1", "parent": 339, "children": [], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 23}}, {"id": 343, "type": "for_statement", "text": "for (;;) {\n while (v[++i] < v[pivot]) {\n ;\n }\n while (v[--j] > v[pivot]) {\n ;\n }\n if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }\n }", "parent": 314, "children": [], "start_point": {"row": 102, "column": 6}, "end_point": {"row": 115, "column": 7}}, {"id": 344, "type": "while_statement", "text": "while (v[++i] < v[pivot]) {\n ;\n }", "parent": 343, "children": [345], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 105, "column": 9}}, {"id": 345, "type": "parenthesized_expression", "text": "(v[++i] < v[pivot])", "parent": 344, "children": [346], "start_point": {"row": 103, "column": 14}, "end_point": {"row": 103, "column": 33}}, {"id": 346, "type": "binary_expression", "text": "v[++i] < v[pivot]", "parent": 345, "children": [347, 352, 353], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 32}}, {"id": 347, "type": "subscript_expression", "text": "v[++i]", "parent": 346, "children": [348, 349], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 21}}, {"id": 348, "type": "identifier", "text": "v", "parent": 347, "children": [], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 16}}, {"id": 349, "type": "update_expression", "text": "++i", "parent": 347, "children": [350, 351], "start_point": {"row": 103, "column": 17}, "end_point": {"row": 103, "column": 20}}, {"id": 350, "type": "++", "text": "++", "parent": 349, "children": [], "start_point": {"row": 103, "column": 17}, "end_point": {"row": 103, "column": 19}}, {"id": 351, "type": "identifier", "text": "i", "parent": 349, "children": [], "start_point": {"row": 103, "column": 19}, "end_point": {"row": 103, "column": 20}}, {"id": 352, "type": "<", "text": "<", "parent": 346, "children": [], "start_point": {"row": 103, "column": 22}, "end_point": {"row": 103, "column": 23}}, {"id": 353, "type": "subscript_expression", "text": "v[pivot]", "parent": 346, "children": [354, 355], "start_point": {"row": 103, "column": 24}, "end_point": {"row": 103, "column": 32}}, {"id": 354, "type": "identifier", "text": "v", "parent": 353, "children": [], "start_point": {"row": 103, "column": 24}, "end_point": {"row": 103, "column": 25}}, {"id": 355, "type": "identifier", "text": "pivot", "parent": 353, "children": [], "start_point": {"row": 103, "column": 26}, "end_point": {"row": 103, "column": 31}}, {"id": 356, "type": "while_statement", "text": "while (v[--j] > v[pivot]) {\n ;\n }", "parent": 343, "children": [357], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 108, "column": 9}}, {"id": 357, "type": "parenthesized_expression", "text": "(v[--j] > v[pivot])", "parent": 356, "children": [358], "start_point": {"row": 106, "column": 14}, "end_point": {"row": 106, "column": 33}}, {"id": 358, "type": "binary_expression", "text": "v[--j] > v[pivot]", "parent": 357, "children": [359, 364, 365], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 32}}, {"id": 359, "type": "subscript_expression", "text": "v[--j]", "parent": 358, "children": [360, 361], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 21}}, {"id": 360, "type": "identifier", "text": "v", "parent": 359, "children": [], "start_point": {"row": 106, "column": 15}, "end_point": {"row": 106, "column": 16}}, {"id": 361, "type": "update_expression", "text": "--j", "parent": 359, "children": [362, 363], "start_point": {"row": 106, "column": 17}, "end_point": {"row": 106, "column": 20}}, {"id": 362, "type": "--", "text": "--", "parent": 361, "children": [], "start_point": {"row": 106, "column": 17}, "end_point": {"row": 106, "column": 19}}, {"id": 363, "type": "identifier", "text": "j", "parent": 361, "children": [], "start_point": {"row": 106, "column": 19}, "end_point": {"row": 106, "column": 20}}, {"id": 364, "type": ">", "text": ">", "parent": 358, "children": [], "start_point": {"row": 106, "column": 22}, "end_point": {"row": 106, "column": 23}}, {"id": 365, "type": "subscript_expression", "text": "v[pivot]", "parent": 358, "children": [366, 367], "start_point": {"row": 106, "column": 24}, "end_point": {"row": 106, "column": 32}}, {"id": 366, "type": "identifier", "text": "v", "parent": 365, "children": [], "start_point": {"row": 106, "column": 24}, "end_point": {"row": 106, "column": 25}}, {"id": 367, "type": "identifier", "text": "pivot", "parent": 365, "children": [], "start_point": {"row": 106, "column": 26}, "end_point": {"row": 106, "column": 31}}, {"id": 368, "type": "if_statement", "text": "if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }", "parent": 343, "children": [369, 380], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 114, "column": 9}}, {"id": 369, "type": "parenthesized_expression", "text": "(i < j)", "parent": 368, "children": [370], "start_point": {"row": 109, "column": 11}, "end_point": {"row": 109, "column": 18}}, {"id": 370, "type": "binary_expression", "text": "i < j", "parent": 369, "children": [371, 372, 373], "start_point": {"row": 109, "column": 12}, "end_point": {"row": 109, "column": 17}}, {"id": 371, "type": "identifier", "text": "i", "parent": 370, "children": [], "start_point": {"row": 109, "column": 12}, "end_point": {"row": 109, "column": 13}}, {"id": 372, "type": "<", "text": "<", "parent": 370, "children": [], "start_point": {"row": 109, "column": 14}, "end_point": {"row": 109, "column": 15}}, {"id": 373, "type": "identifier", "text": "j", "parent": 370, "children": [], "start_point": {"row": 109, "column": 16}, "end_point": {"row": 109, "column": 17}}, {"id": 374, "type": "call_expression", "text": "SWAP(v, i, j)", "parent": 368, "children": [375, 376], "start_point": {"row": 110, "column": 10}, "end_point": {"row": 110, "column": 23}}, {"id": 375, "type": "identifier", "text": "SWAP", "parent": 374, "children": [], "start_point": {"row": 110, "column": 10}, "end_point": {"row": 110, "column": 14}}, {"id": 376, "type": "argument_list", "text": "(v, i, j)", "parent": 374, "children": [377, 378, 379], "start_point": {"row": 110, "column": 14}, "end_point": {"row": 110, "column": 23}}, {"id": 377, "type": "identifier", "text": "v", "parent": 376, "children": [], "start_point": {"row": 110, "column": 15}, "end_point": {"row": 110, "column": 16}}, {"id": 378, "type": "identifier", "text": "i", "parent": 376, "children": [], "start_point": {"row": 110, "column": 18}, "end_point": {"row": 110, "column": 19}}, {"id": 379, "type": "identifier", "text": "j", "parent": 376, "children": [], "start_point": {"row": 110, "column": 21}, "end_point": {"row": 110, "column": 22}}, {"id": 380, "type": "else_clause", "text": "else {\n break;\n }", "parent": 368, "children": [], "start_point": {"row": 112, "column": 8}, "end_point": {"row": 114, "column": 9}}, {"id": 381, "type": "break_statement", "text": "break;", "parent": 380, "children": [382], "start_point": {"row": 113, "column": 10}, "end_point": {"row": 113, "column": 16}}, {"id": 382, "type": "break", "text": "break", "parent": 381, "children": [], "start_point": {"row": 113, "column": 10}, "end_point": {"row": 113, "column": 15}}, {"id": 383, "type": "call_expression", "text": "SWAP(v, i, right - 1)", "parent": 314, "children": [384, 385], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 27}}, {"id": 384, "type": "identifier", "text": "SWAP", "parent": 383, "children": [], "start_point": {"row": 117, "column": 6}, "end_point": {"row": 117, "column": 10}}, {"id": 385, "type": "argument_list", "text": "(v, i, right - 1)", "parent": 383, "children": [386, 387, 388], "start_point": {"row": 117, "column": 10}, "end_point": {"row": 117, "column": 27}}, {"id": 386, "type": "identifier", "text": "v", "parent": 385, "children": [], "start_point": {"row": 117, "column": 11}, "end_point": {"row": 117, "column": 12}}, {"id": 387, "type": "identifier", "text": "i", "parent": 385, "children": [], "start_point": {"row": 117, "column": 14}, "end_point": {"row": 117, "column": 15}}, {"id": 388, "type": "binary_expression", "text": "right - 1", "parent": 385, "children": [389, 390, 391], "start_point": {"row": 117, "column": 17}, "end_point": {"row": 117, "column": 26}}, {"id": 389, "type": "identifier", "text": "right", "parent": 388, "children": [], "start_point": {"row": 117, "column": 17}, "end_point": {"row": 117, "column": 22}}, {"id": 390, "type": "-", "text": "-", "parent": 388, "children": [], "start_point": {"row": 117, "column": 23}, "end_point": {"row": 117, "column": 24}}, {"id": 391, "type": "number_literal", "text": "1", "parent": 388, "children": [], "start_point": {"row": 117, "column": 25}, "end_point": {"row": 117, "column": 26}}, {"id": 392, "type": "call_expression", "text": "qsort_int(v, left, i - 1)", "parent": 314, "children": [393, 394], "start_point": {"row": 118, "column": 6}, "end_point": {"row": 118, "column": 31}}, {"id": 393, "type": "identifier", "text": "qsort_int", "parent": 392, "children": [], "start_point": {"row": 118, "column": 6}, "end_point": {"row": 118, "column": 15}}, {"id": 394, "type": "argument_list", "text": "(v, left, i - 1)", "parent": 392, "children": [395, 396, 397], "start_point": {"row": 118, "column": 15}, "end_point": {"row": 118, "column": 31}}, {"id": 395, "type": "identifier", "text": "v", "parent": 394, "children": [], "start_point": {"row": 118, "column": 16}, "end_point": {"row": 118, "column": 17}}, {"id": 396, "type": "identifier", "text": "left", "parent": 394, "children": [], "start_point": {"row": 118, "column": 19}, "end_point": {"row": 118, "column": 23}}, {"id": 397, "type": "binary_expression", "text": "i - 1", "parent": 394, "children": [398, 399, 400], "start_point": {"row": 118, "column": 25}, "end_point": {"row": 118, "column": 30}}, {"id": 398, "type": "identifier", "text": "i", "parent": 397, "children": [], "start_point": {"row": 118, "column": 25}, "end_point": {"row": 118, "column": 26}}, {"id": 399, "type": "-", "text": "-", "parent": 397, "children": [], "start_point": {"row": 118, "column": 27}, "end_point": {"row": 118, "column": 28}}, {"id": 400, "type": "number_literal", "text": "1", "parent": 397, "children": [], "start_point": {"row": 118, "column": 29}, "end_point": {"row": 118, "column": 30}}, {"id": 401, "type": "call_expression", "text": "qsort_int(v, i + 1, right)", "parent": 314, "children": [402, 403], "start_point": {"row": 119, "column": 6}, "end_point": {"row": 119, "column": 32}}, {"id": 402, "type": "identifier", "text": "qsort_int", "parent": 401, "children": [], "start_point": {"row": 119, "column": 6}, "end_point": {"row": 119, "column": 15}}, {"id": 403, "type": "argument_list", "text": "(v, i + 1, right)", "parent": 401, "children": [404, 405, 409], "start_point": {"row": 119, "column": 15}, "end_point": {"row": 119, "column": 32}}, {"id": 404, "type": "identifier", "text": "v", "parent": 403, "children": [], "start_point": {"row": 119, "column": 16}, "end_point": {"row": 119, "column": 17}}, {"id": 405, "type": "binary_expression", "text": "i + 1", "parent": 403, "children": [406, 407, 408], "start_point": {"row": 119, "column": 19}, "end_point": {"row": 119, "column": 24}}, {"id": 406, "type": "identifier", "text": "i", "parent": 405, "children": [], "start_point": {"row": 119, "column": 19}, "end_point": {"row": 119, "column": 20}}, {"id": 407, "type": "+", "text": "+", "parent": 405, "children": [], "start_point": {"row": 119, "column": 21}, "end_point": {"row": 119, "column": 22}}, {"id": 408, "type": "number_literal", "text": "1", "parent": 405, "children": [], "start_point": {"row": 119, "column": 23}, "end_point": {"row": 119, "column": 24}}, {"id": 409, "type": "identifier", "text": "right", "parent": 403, "children": [], "start_point": {"row": 119, "column": 26}, "end_point": {"row": 119, "column": 31}}, {"id": 410, "type": "binary_expression", "text": "template <typename INT> void isort_int(INT v[], size_t N)", "parent": 0, "children": [411, 415, 417, 418, 420], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 59}}, {"id": 411, "type": "binary_expression", "text": "template <typename", "parent": 410, "children": [412, 413, 414], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 20}}, {"id": 412, "type": "identifier", "text": "template", "parent": 411, "children": [], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 10}}, {"id": 413, "type": "<", "text": "<", "parent": 411, "children": [], "start_point": {"row": 123, "column": 11}, "end_point": {"row": 123, "column": 12}}, {"id": 414, "type": "identifier", "text": "typename", "parent": 411, "children": [], "start_point": {"row": 123, "column": 12}, "end_point": {"row": 123, "column": 20}}, {"id": 415, "type": "ERROR", "text": "INT", "parent": 410, "children": [416], "start_point": {"row": 123, "column": 21}, "end_point": {"row": 123, "column": 24}}, {"id": 416, "type": "identifier", "text": "INT", "parent": 415, "children": [], "start_point": {"row": 123, "column": 21}, "end_point": {"row": 123, "column": 24}}, {"id": 417, "type": ">", "text": ">", "parent": 410, "children": [], "start_point": {"row": 123, "column": 24}, "end_point": {"row": 123, "column": 25}}, {"id": 418, "type": "ERROR", "text": "void", "parent": 410, "children": [419], "start_point": {"row": 123, "column": 26}, "end_point": {"row": 123, "column": 30}}, {"id": 419, "type": "identifier", "text": "void", "parent": 418, "children": [], "start_point": {"row": 123, "column": 26}, "end_point": {"row": 123, "column": 30}}, {"id": 420, "type": "call_expression", "text": "isort_int(INT v[], size_t N)", "parent": 410, "children": [421, 422], "start_point": {"row": 123, "column": 31}, "end_point": {"row": 123, "column": 59}}, {"id": 421, "type": "identifier", "text": "isort_int", "parent": 420, "children": [], "start_point": {"row": 123, "column": 31}, "end_point": {"row": 123, "column": 40}}, {"id": 422, "type": "argument_list", "text": "(INT v[], size_t N)", "parent": 420, "children": [423, 424, 426, 427], "start_point": {"row": 123, "column": 40}, "end_point": {"row": 123, "column": 59}}, {"id": 423, "type": "identifier", "text": "INT", "parent": 422, "children": [], "start_point": {"row": 123, "column": 41}, "end_point": {"row": 123, "column": 44}}, {"id": 424, "type": "ERROR", "text": "v[]", "parent": 422, "children": [425], "start_point": {"row": 123, "column": 45}, "end_point": {"row": 123, "column": 48}}, {"id": 425, "type": "identifier", "text": "v", "parent": 424, "children": [], "start_point": {"row": 123, "column": 45}, "end_point": {"row": 123, "column": 46}}, {"id": 426, "type": "identifier", "text": "size_t", "parent": 422, "children": [], "start_point": {"row": 123, "column": 50}, "end_point": {"row": 123, "column": 56}}, {"id": 427, "type": "ERROR", "text": "N", "parent": 422, "children": [428], "start_point": {"row": 123, "column": 57}, "end_point": {"row": 123, "column": 58}}, {"id": 428, "type": "identifier", "text": "N", "parent": 427, "children": [], "start_point": {"row": 123, "column": 57}, "end_point": {"row": 123, "column": 58}}, {"id": 429, "type": "declaration", "text": "size_t i, j;", "parent": 0, "children": [430, 431, 432], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 16}}, {"id": 430, "type": "primitive_type", "text": "size_t", "parent": 429, "children": [], "start_point": {"row": 125, "column": 4}, "end_point": {"row": 125, "column": 10}}, {"id": 431, "type": "identifier", "text": "i", "parent": 429, "children": [], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 125, "column": 12}}, {"id": 432, "type": "identifier", "text": "j", "parent": 429, "children": [], "start_point": {"row": 125, "column": 14}, "end_point": {"row": 125, "column": 15}}, {"id": 433, "type": "declaration", "text": "size_t ndx = 0;", "parent": 0, "children": [434, 435], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 19}}, {"id": 434, "type": "primitive_type", "text": "size_t", "parent": 433, "children": [], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 10}}, {"id": 435, "type": "init_declarator", "text": "ndx = 0", "parent": 433, "children": [436, 437, 438], "start_point": {"row": 126, "column": 11}, "end_point": {"row": 126, "column": 18}}, {"id": 436, "type": "identifier", "text": "ndx", "parent": 435, "children": [], "start_point": {"row": 126, "column": 11}, "end_point": {"row": 126, "column": 14}}, {"id": 437, "type": "=", "text": "=", "parent": 435, "children": [], "start_point": {"row": 126, "column": 15}, "end_point": {"row": 126, "column": 16}}, {"id": 438, "type": "number_literal", "text": "0", "parent": 435, "children": [], "start_point": {"row": 126, "column": 17}, "end_point": {"row": 126, "column": 18}}, {"id": 439, "type": "declaration", "text": "INT small;", "parent": 0, "children": [440, 441], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 17}}, {"id": 440, "type": "type_identifier", "text": "INT", "parent": 439, "children": [], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 7}}, {"id": 441, "type": "identifier", "text": "small", "parent": 439, "children": [], "start_point": {"row": 127, "column": 11}, "end_point": {"row": 127, "column": 16}}, {"id": 442, "type": "declaration", "text": "INT tmp;", "parent": 0, "children": [443, 444], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 15}}, {"id": 443, "type": "type_identifier", "text": "INT", "parent": 442, "children": [], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 7}}, {"id": 444, "type": "identifier", "text": "tmp", "parent": 442, "children": [], "start_point": {"row": 128, "column": 11}, "end_point": {"row": 128, "column": 14}}, {"id": 445, "type": "if_statement", "text": "if (N <= 1) {\n return;\n }", "parent": 0, "children": [446], "start_point": {"row": 130, "column": 4}, "end_point": {"row": 132, "column": 5}}, {"id": 446, "type": "parenthesized_expression", "text": "(N <= 1)", "parent": 445, "children": [447], "start_point": {"row": 130, "column": 7}, "end_point": {"row": 130, "column": 15}}, {"id": 447, "type": "binary_expression", "text": "N <= 1", "parent": 446, "children": [448, 449, 450], "start_point": {"row": 130, "column": 8}, "end_point": {"row": 130, "column": 14}}, {"id": 448, "type": "identifier", "text": "N", "parent": 447, "children": [], "start_point": {"row": 130, "column": 8}, "end_point": {"row": 130, "column": 9}}, {"id": 449, "type": "<=", "text": "<=", "parent": 447, "children": [], "start_point": {"row": 130, "column": 10}, "end_point": {"row": 130, "column": 12}}, {"id": 450, "type": "number_literal", "text": "1", "parent": 447, "children": [], "start_point": {"row": 130, "column": 13}, "end_point": {"row": 130, "column": 14}}, {"id": 451, "type": "return_statement", "text": "return;", "parent": 445, "children": [], "start_point": {"row": 131, "column": 6}, "end_point": {"row": 131, "column": 13}}, {"id": 452, "type": "assignment_expression", "text": "small = v[0]", "parent": 0, "children": [453, 454, 455], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 16}}, {"id": 453, "type": "identifier", "text": "small", "parent": 452, "children": [], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 9}}, {"id": 454, "type": "=", "text": "=", "parent": 452, "children": [], "start_point": {"row": 133, "column": 10}, "end_point": {"row": 133, "column": 11}}, {"id": 455, "type": "subscript_expression", "text": "v[0]", "parent": 452, "children": [456, 457], "start_point": {"row": 133, "column": 12}, "end_point": {"row": 133, "column": 16}}, {"id": 456, "type": "identifier", "text": "v", "parent": 455, "children": [], "start_point": {"row": 133, "column": 12}, "end_point": {"row": 133, "column": 13}}, {"id": 457, "type": "number_literal", "text": "0", "parent": 455, "children": [], "start_point": {"row": 133, "column": 14}, "end_point": {"row": 133, "column": 15}}, {"id": 458, "type": "for_statement", "text": "for (i = 1; i < N; i++) {\n if (v[i] < small) {\n small = v[i];\n ndx = i;\n }\n }", "parent": 0, "children": [459, 463, 467], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 139, "column": 5}}, {"id": 459, "type": "assignment_expression", "text": "i = 1", "parent": 458, "children": [460, 461, 462], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 14}}, {"id": 460, "type": "identifier", "text": "i", "parent": 459, "children": [], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 10}}, {"id": 461, "type": "=", "text": "=", "parent": 459, "children": [], "start_point": {"row": 134, "column": 11}, "end_point": {"row": 134, "column": 12}}, {"id": 462, "type": "number_literal", "text": "1", "parent": 459, "children": [], "start_point": {"row": 134, "column": 13}, "end_point": {"row": 134, "column": 14}}, {"id": 463, "type": "binary_expression", "text": "i < N", "parent": 458, "children": [464, 465, 466], "start_point": {"row": 134, "column": 16}, "end_point": {"row": 134, "column": 21}}, {"id": 464, "type": "identifier", "text": "i", "parent": 463, "children": [], "start_point": {"row": 134, "column": 16}, "end_point": {"row": 134, "column": 17}}, {"id": 465, "type": "<", "text": "<", "parent": 463, "children": [], "start_point": {"row": 134, "column": 18}, "end_point": {"row": 134, "column": 19}}, {"id": 466, "type": "identifier", "text": "N", "parent": 463, "children": [], "start_point": {"row": 134, "column": 20}, "end_point": {"row": 134, "column": 21}}, {"id": 467, "type": "update_expression", "text": "i++", "parent": 458, "children": [468, 469], "start_point": {"row": 134, "column": 23}, "end_point": {"row": 134, "column": 26}}, {"id": 468, "type": "identifier", "text": "i", "parent": 467, "children": [], "start_point": {"row": 134, "column": 23}, "end_point": {"row": 134, "column": 24}}, {"id": 469, "type": "++", "text": "++", "parent": 467, "children": [], "start_point": {"row": 134, "column": 24}, "end_point": {"row": 134, "column": 26}}, {"id": 470, "type": "if_statement", "text": "if (v[i] < small) {\n small = v[i];\n ndx = i;\n }", "parent": 458, "children": [471], "start_point": {"row": 135, "column": 6}, "end_point": {"row": 138, "column": 7}}, {"id": 471, "type": "parenthesized_expression", "text": "(v[i] < small)", "parent": 470, "children": [472], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 23}}, {"id": 472, "type": "binary_expression", "text": "v[i] < small", "parent": 471, "children": [473, 476, 477], "start_point": {"row": 135, "column": 10}, "end_point": {"row": 135, "column": 22}}, {"id": 473, "type": "subscript_expression", "text": "v[i]", "parent": 472, "children": [474, 475], "start_point": {"row": 135, "column": 10}, "end_point": {"row": 135, "column": 14}}, {"id": 474, "type": "identifier", "text": "v", "parent": 473, "children": [], "start_point": {"row": 135, "column": 10}, "end_point": {"row": 135, "column": 11}}, {"id": 475, "type": "identifier", "text": "i", "parent": 473, "children": [], "start_point": {"row": 135, "column": 12}, "end_point": {"row": 135, "column": 13}}, {"id": 476, "type": "<", "text": "<", "parent": 472, "children": [], "start_point": {"row": 135, "column": 15}, "end_point": {"row": 135, "column": 16}}, {"id": 477, "type": "identifier", "text": "small", "parent": 472, "children": [], "start_point": {"row": 135, "column": 17}, "end_point": {"row": 135, "column": 22}}, {"id": 478, "type": "assignment_expression", "text": "small = v[i]", "parent": 470, "children": [479, 480, 481], "start_point": {"row": 136, "column": 8}, "end_point": {"row": 136, "column": 20}}, {"id": 479, "type": "identifier", "text": "small", "parent": 478, "children": [], "start_point": {"row": 136, "column": 8}, "end_point": {"row": 136, "column": 13}}, {"id": 480, "type": "=", "text": "=", "parent": 478, "children": [], "start_point": {"row": 136, "column": 14}, "end_point": {"row": 136, "column": 15}}, {"id": 481, "type": "subscript_expression", "text": "v[i]", "parent": 478, "children": [482, 483], "start_point": {"row": 136, "column": 16}, "end_point": {"row": 136, "column": 20}}, {"id": 482, "type": "identifier", "text": "v", "parent": 481, "children": [], "start_point": {"row": 136, "column": 16}, "end_point": {"row": 136, "column": 17}}, {"id": 483, "type": "identifier", "text": "i", "parent": 481, "children": [], "start_point": {"row": 136, "column": 18}, "end_point": {"row": 136, "column": 19}}, {"id": 484, "type": "assignment_expression", "text": "ndx = i", "parent": 470, "children": [485, 486, 487], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 17}}, {"id": 485, "type": "identifier", "text": "ndx", "parent": 484, "children": [], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 11}}, {"id": 486, "type": "=", "text": "=", "parent": 484, "children": [], "start_point": {"row": 137, "column": 14}, "end_point": {"row": 137, "column": 15}}, {"id": 487, "type": "identifier", "text": "i", "parent": 484, "children": [], "start_point": {"row": 137, "column": 16}, "end_point": {"row": 137, "column": 17}}, {"id": 488, "type": "call_expression", "text": "SWAP(v, 0, ndx)", "parent": 0, "children": [489, 490], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 19}}, {"id": 489, "type": "identifier", "text": "SWAP", "parent": 488, "children": [], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 8}}, {"id": 490, "type": "argument_list", "text": "(v, 0, ndx)", "parent": 488, "children": [491, 492, 493], "start_point": {"row": 141, "column": 8}, "end_point": {"row": 141, "column": 19}}, {"id": 491, "type": "identifier", "text": "v", "parent": 490, "children": [], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 10}}, {"id": 492, "type": "number_literal", "text": "0", "parent": 490, "children": [], "start_point": {"row": 141, "column": 12}, "end_point": {"row": 141, "column": 13}}, {"id": 493, "type": "identifier", "text": "ndx", "parent": 490, "children": [], "start_point": {"row": 141, "column": 15}, "end_point": {"row": 141, "column": 18}}, {"id": 494, "type": "for_statement", "text": "for (i = 1; i < N; i++) {\n tmp = v[i];\n for (j = i; tmp < v[j - 1]; j--) {\n v[j] = v[j - 1];\n }\n v[j] = tmp;\n }", "parent": 0, "children": [495, 499, 503], "start_point": {"row": 143, "column": 4}, "end_point": {"row": 149, "column": 5}}, {"id": 495, "type": "assignment_expression", "text": "i = 1", "parent": 494, "children": [496, 497, 498], "start_point": {"row": 143, "column": 9}, "end_point": {"row": 143, "column": 14}}, {"id": 496, "type": "identifier", "text": "i", "parent": 495, "children": [], "start_point": {"row": 143, "column": 9}, "end_point": {"row": 143, "column": 10}}, {"id": 497, "type": "=", "text": "=", "parent": 495, "children": [], "start_point": {"row": 143, "column": 11}, "end_point": {"row": 143, "column": 12}}, {"id": 498, "type": "number_literal", "text": "1", "parent": 495, "children": [], "start_point": {"row": 143, "column": 13}, "end_point": {"row": 143, "column": 14}}, {"id": 499, "type": "binary_expression", "text": "i < N", "parent": 494, "children": [500, 501, 502], "start_point": {"row": 143, "column": 16}, "end_point": {"row": 143, "column": 21}}, {"id": 500, "type": "identifier", "text": "i", "parent": 499, "children": [], "start_point": {"row": 143, "column": 16}, "end_point": {"row": 143, "column": 17}}, {"id": 501, "type": "<", "text": "<", "parent": 499, "children": [], "start_point": {"row": 143, "column": 18}, "end_point": {"row": 143, "column": 19}}, {"id": 502, "type": "identifier", "text": "N", "parent": 499, "children": [], "start_point": {"row": 143, "column": 20}, "end_point": {"row": 143, "column": 21}}, {"id": 503, "type": "update_expression", "text": "i++", "parent": 494, "children": [504, 505], "start_point": {"row": 143, "column": 23}, "end_point": {"row": 143, "column": 26}}, {"id": 504, "type": "identifier", "text": "i", "parent": 503, "children": [], "start_point": {"row": 143, "column": 23}, "end_point": {"row": 143, "column": 24}}, {"id": 505, "type": "++", "text": "++", "parent": 503, "children": [], "start_point": {"row": 143, "column": 24}, "end_point": {"row": 143, "column": 26}}, {"id": 506, "type": "assignment_expression", "text": "tmp = v[i]", "parent": 494, "children": [507, 508, 509], "start_point": {"row": 144, "column": 6}, "end_point": {"row": 144, "column": 16}}, {"id": 507, "type": "identifier", "text": "tmp", "parent": 506, "children": [], "start_point": {"row": 144, "column": 6}, "end_point": {"row": 144, "column": 9}}, {"id": 508, "type": "=", "text": "=", "parent": 506, "children": [], "start_point": {"row": 144, "column": 10}, "end_point": {"row": 144, "column": 11}}, {"id": 509, "type": "subscript_expression", "text": "v[i]", "parent": 506, "children": [510, 511], "start_point": {"row": 144, "column": 12}, "end_point": {"row": 144, "column": 16}}, {"id": 510, "type": "identifier", "text": "v", "parent": 509, "children": [], "start_point": {"row": 144, "column": 12}, "end_point": {"row": 144, "column": 13}}, {"id": 511, "type": "identifier", "text": "i", "parent": 509, "children": [], "start_point": {"row": 144, "column": 14}, "end_point": {"row": 144, "column": 15}}, {"id": 512, "type": "for_statement", "text": "for (j = i; tmp < v[j - 1]; j--) {\n v[j] = v[j - 1];\n }", "parent": 494, "children": [513, 517, 526], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 147, "column": 7}}, {"id": 513, "type": "assignment_expression", "text": "j = i", "parent": 512, "children": [514, 515, 516], "start_point": {"row": 145, "column": 11}, "end_point": {"row": 145, "column": 16}}, {"id": 514, "type": "identifier", "text": "j", "parent": 513, "children": [], "start_point": {"row": 145, "column": 11}, "end_point": {"row": 145, "column": 12}}, {"id": 515, "type": "=", "text": "=", "parent": 513, "children": [], "start_point": {"row": 145, "column": 13}, "end_point": {"row": 145, "column": 14}}, {"id": 516, "type": "identifier", "text": "i", "parent": 513, "children": [], "start_point": {"row": 145, "column": 15}, "end_point": {"row": 145, "column": 16}}, {"id": 517, "type": "binary_expression", "text": "tmp < v[j - 1]", "parent": 512, "children": [518, 519, 520], "start_point": {"row": 145, "column": 18}, "end_point": {"row": 145, "column": 32}}, {"id": 518, "type": "identifier", "text": "tmp", "parent": 517, "children": [], "start_point": {"row": 145, "column": 18}, "end_point": {"row": 145, "column": 21}}, {"id": 519, "type": "<", "text": "<", "parent": 517, "children": [], "start_point": {"row": 145, "column": 22}, "end_point": {"row": 145, "column": 23}}, {"id": 520, "type": "subscript_expression", "text": "v[j - 1]", "parent": 517, "children": [521, 522], "start_point": {"row": 145, "column": 24}, "end_point": {"row": 145, "column": 32}}, {"id": 521, "type": "identifier", "text": "v", "parent": 520, "children": [], "start_point": {"row": 145, "column": 24}, "end_point": {"row": 145, "column": 25}}, {"id": 522, "type": "binary_expression", "text": "j - 1", "parent": 520, "children": [523, 524, 525], "start_point": {"row": 145, "column": 26}, "end_point": {"row": 145, "column": 31}}, {"id": 523, "type": "identifier", "text": "j", "parent": 522, "children": [], "start_point": {"row": 145, "column": 26}, "end_point": {"row": 145, "column": 27}}, {"id": 524, "type": "-", "text": "-", "parent": 522, "children": [], "start_point": {"row": 145, "column": 28}, "end_point": {"row": 145, "column": 29}}, {"id": 525, "type": "number_literal", "text": "1", "parent": 522, "children": [], "start_point": {"row": 145, "column": 30}, "end_point": {"row": 145, "column": 31}}, {"id": 526, "type": "update_expression", "text": "j--", "parent": 512, "children": [527, 528], "start_point": {"row": 145, "column": 34}, "end_point": {"row": 145, "column": 37}}, {"id": 527, "type": "identifier", "text": "j", "parent": 526, "children": [], "start_point": {"row": 145, "column": 34}, "end_point": {"row": 145, "column": 35}}, {"id": 528, "type": "--", "text": "--", "parent": 526, "children": [], "start_point": {"row": 145, "column": 35}, "end_point": {"row": 145, "column": 37}}, {"id": 529, "type": "assignment_expression", "text": "v[j] = v[j - 1]", "parent": 512, "children": [530, 533, 534], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 23}}, {"id": 530, "type": "subscript_expression", "text": "v[j]", "parent": 529, "children": [531, 532], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 12}}, {"id": 531, "type": "identifier", "text": "v", "parent": 530, "children": [], "start_point": {"row": 146, "column": 8}, "end_point": {"row": 146, "column": 9}}, {"id": 532, "type": "identifier", "text": "j", "parent": 530, "children": [], "start_point": {"row": 146, "column": 10}, "end_point": {"row": 146, "column": 11}}, {"id": 533, "type": "=", "text": "=", "parent": 529, "children": [], "start_point": {"row": 146, "column": 13}, "end_point": {"row": 146, "column": 14}}, {"id": 534, "type": "subscript_expression", "text": "v[j - 1]", "parent": 529, "children": [535, 536], "start_point": {"row": 146, "column": 15}, "end_point": {"row": 146, "column": 23}}, {"id": 535, "type": "identifier", "text": "v", "parent": 534, "children": [], "start_point": {"row": 146, "column": 15}, "end_point": {"row": 146, "column": 16}}, {"id": 536, "type": "binary_expression", "text": "j - 1", "parent": 534, "children": [537, 538, 539], "start_point": {"row": 146, "column": 17}, "end_point": {"row": 146, "column": 22}}, {"id": 537, "type": "identifier", "text": "j", "parent": 536, "children": [], "start_point": {"row": 146, "column": 17}, "end_point": {"row": 146, "column": 18}}, {"id": 538, "type": "-", "text": "-", "parent": 536, "children": [], "start_point": {"row": 146, "column": 19}, "end_point": {"row": 146, "column": 20}}, {"id": 539, "type": "number_literal", "text": "1", "parent": 536, "children": [], "start_point": {"row": 146, "column": 21}, "end_point": {"row": 146, "column": 22}}, {"id": 540, "type": "assignment_expression", "text": "v[j] = tmp", "parent": 494, "children": [541, 544, 545], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 16}}, {"id": 541, "type": "subscript_expression", "text": "v[j]", "parent": 540, "children": [542, 543], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 10}}, {"id": 542, "type": "identifier", "text": "v", "parent": 541, "children": [], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 7}}, {"id": 543, "type": "identifier", "text": "j", "parent": 541, "children": [], "start_point": {"row": 148, "column": 8}, "end_point": {"row": 148, "column": 9}}, {"id": 544, "type": "=", "text": "=", "parent": 540, "children": [], "start_point": {"row": 148, "column": 11}, "end_point": {"row": 148, "column": 12}}, {"id": 545, "type": "identifier", "text": "tmp", "parent": 540, "children": [], "start_point": {"row": 148, "column": 13}, "end_point": {"row": 148, "column": 16}}, {"id": 546, "type": "function_definition", "text": "namespace Ioss {\n template <typename INT> void qsort(std::vector<INT> &v)\n {\n if (v.size() <= 1) {\n return;\n }\n qsort_int(v.data(), 0, v.size() - 1);\n isort_int(v.data(), v.size());\n }\n}", "parent": 0, "children": [547, 548], "start_point": {"row": 153, "column": 0}, "end_point": {"row": 162, "column": 1}}, {"id": 547, "type": "type_identifier", "text": "namespace", "parent": 546, "children": [], "start_point": {"row": 153, "column": 0}, "end_point": {"row": 153, "column": 9}}, {"id": 548, "type": "identifier", "text": "Ioss", "parent": 546, "children": [], "start_point": {"row": 153, "column": 10}, "end_point": {"row": 153, "column": 14}}, {"id": 549, "type": "binary_expression", "text": "template <typename INT> void qsort(std::vector<INT> &v)", "parent": 546, "children": [550, 554, 556, 557, 559], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 154, "column": 57}}, {"id": 550, "type": "binary_expression", "text": "template <typename", "parent": 549, "children": [551, 552, 553], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 154, "column": 20}}, {"id": 551, "type": "identifier", "text": "template", "parent": 550, "children": [], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 154, "column": 10}}, {"id": 552, "type": "<", "text": "<", "parent": 550, "children": [], "start_point": {"row": 154, "column": 11}, "end_point": {"row": 154, "column": 12}}, {"id": 553, "type": "identifier", "text": "typename", "parent": 550, "children": [], "start_point": {"row": 154, "column": 12}, "end_point": {"row": 154, "column": 20}}, {"id": 554, "type": "ERROR", "text": "INT", "parent": 549, "children": [555], "start_point": {"row": 154, "column": 21}, "end_point": {"row": 154, "column": 24}}, {"id": 555, "type": "identifier", "text": "INT", "parent": 554, "children": [], "start_point": {"row": 154, "column": 21}, "end_point": {"row": 154, "column": 24}}, {"id": 556, "type": ">", "text": ">", "parent": 549, "children": [], "start_point": {"row": 154, "column": 24}, "end_point": {"row": 154, "column": 25}}, {"id": 557, "type": "ERROR", "text": "void", "parent": 549, "children": [558], "start_point": {"row": 154, "column": 26}, "end_point": {"row": 154, "column": 30}}, {"id": 558, "type": "identifier", "text": "void", "parent": 557, "children": [], "start_point": {"row": 154, "column": 26}, "end_point": {"row": 154, "column": 30}}, {"id": 559, "type": "call_expression", "text": "qsort(std::vector<INT> &v)", "parent": 549, "children": [560, 561], "start_point": {"row": 154, "column": 31}, "end_point": {"row": 154, "column": 57}}, {"id": 560, "type": "identifier", "text": "qsort", "parent": 559, "children": [], "start_point": {"row": 154, "column": 31}, "end_point": {"row": 154, "column": 36}}, {"id": 561, "type": "argument_list", "text": "(std::vector<INT> &v)", "parent": 559, "children": [562, 564], "start_point": {"row": 154, "column": 36}, "end_point": {"row": 154, "column": 57}}, {"id": 562, "type": "ERROR", "text": "std::", "parent": 561, "children": [563], "start_point": {"row": 154, "column": 37}, "end_point": {"row": 154, "column": 42}}, {"id": 563, "type": "identifier", "text": "std", "parent": 562, "children": [], "start_point": {"row": 154, "column": 37}, "end_point": {"row": 154, "column": 40}}, {"id": 564, "type": "binary_expression", "text": "vector<INT> &v", "parent": 561, "children": [565, 569, 570], "start_point": {"row": 154, "column": 42}, "end_point": {"row": 154, "column": 56}}, {"id": 565, "type": "binary_expression", "text": "vector<INT", "parent": 564, "children": [566, 567, 568], "start_point": {"row": 154, "column": 42}, "end_point": {"row": 154, "column": 52}}, {"id": 566, "type": "identifier", "text": "vector", "parent": 565, "children": [], "start_point": {"row": 154, "column": 42}, "end_point": {"row": 154, "column": 48}}, {"id": 567, "type": "<", "text": "<", "parent": 565, "children": [], "start_point": {"row": 154, "column": 48}, "end_point": {"row": 154, "column": 49}}, {"id": 568, "type": "identifier", "text": "INT", "parent": 565, "children": [], "start_point": {"row": 154, "column": 49}, "end_point": {"row": 154, "column": 52}}, {"id": 569, "type": ">", "text": ">", "parent": 564, "children": [], "start_point": {"row": 154, "column": 52}, "end_point": {"row": 154, "column": 53}}, {"id": 570, "type": "pointer_expression", "text": "&v", "parent": 564, "children": [571], "start_point": {"row": 154, "column": 54}, "end_point": {"row": 154, "column": 56}}, {"id": 571, "type": "identifier", "text": "v", "parent": 570, "children": [], "start_point": {"row": 154, "column": 55}, "end_point": {"row": 154, "column": 56}}, {"id": 572, "type": "if_statement", "text": "if (v.size() <= 1) {\n return;\n }", "parent": 546, "children": [573], "start_point": {"row": 156, "column": 4}, "end_point": {"row": 158, "column": 5}}, {"id": 573, "type": "parenthesized_expression", "text": "(v.size() <= 1)", "parent": 572, "children": [574], "start_point": {"row": 156, "column": 7}, "end_point": {"row": 156, "column": 22}}, {"id": 574, "type": "binary_expression", "text": "v.size() <= 1", "parent": 573, "children": [575, 580, 581], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 21}}, {"id": 575, "type": "call_expression", "text": "v.size()", "parent": 574, "children": [576, 579], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 16}}, {"id": 576, "type": "field_expression", "text": "v.size", "parent": 575, "children": [577, 578], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 14}}, {"id": 577, "type": "identifier", "text": "v", "parent": 576, "children": [], "start_point": {"row": 156, "column": 8}, "end_point": {"row": 156, "column": 9}}, {"id": 578, "type": "field_identifier", "text": "size", "parent": 576, "children": [], "start_point": {"row": 156, "column": 10}, "end_point": {"row": 156, "column": 14}}, {"id": 579, "type": "argument_list", "text": "()", "parent": 575, "children": [], "start_point": {"row": 156, "column": 14}, "end_point": {"row": 156, "column": 16}}, {"id": 580, "type": "<=", "text": "<=", "parent": 574, "children": [], "start_point": {"row": 156, "column": 17}, "end_point": {"row": 156, "column": 19}}, {"id": 581, "type": "number_literal", "text": "1", "parent": 574, "children": [], "start_point": {"row": 156, "column": 20}, "end_point": {"row": 156, "column": 21}}, {"id": 582, "type": "return_statement", "text": "return;", "parent": 572, "children": [], "start_point": {"row": 157, "column": 6}, "end_point": {"row": 157, "column": 13}}, {"id": 583, "type": "call_expression", "text": "qsort_int(v.data(), 0, v.size() - 1)", "parent": 546, "children": [584, 585], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 40}}, {"id": 584, "type": "identifier", "text": "qsort_int", "parent": 583, "children": [], "start_point": {"row": 159, "column": 4}, "end_point": {"row": 159, "column": 13}}, {"id": 585, "type": "argument_list", "text": "(v.data(), 0, v.size() - 1)", "parent": 583, "children": [586, 591, 592], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 159, "column": 40}}, {"id": 586, "type": "call_expression", "text": "v.data()", "parent": 585, "children": [587, 590], "start_point": {"row": 159, "column": 14}, "end_point": {"row": 159, "column": 22}}, {"id": 587, "type": "field_expression", "text": "v.data", "parent": 586, "children": [588, 589], "start_point": {"row": 159, "column": 14}, "end_point": {"row": 159, "column": 20}}, {"id": 588, "type": "identifier", "text": "v", "parent": 587, "children": [], "start_point": {"row": 159, "column": 14}, "end_point": {"row": 159, "column": 15}}, {"id": 589, "type": "field_identifier", "text": "data", "parent": 587, "children": [], "start_point": {"row": 159, "column": 16}, "end_point": {"row": 159, "column": 20}}, {"id": 590, "type": "argument_list", "text": "()", "parent": 586, "children": [], "start_point": {"row": 159, "column": 20}, "end_point": {"row": 159, "column": 22}}, {"id": 591, "type": "number_literal", "text": "0", "parent": 585, "children": [], "start_point": {"row": 159, "column": 24}, "end_point": {"row": 159, "column": 25}}, {"id": 592, "type": "binary_expression", "text": "v.size() - 1", "parent": 585, "children": [593, 598, 599], "start_point": {"row": 159, "column": 27}, "end_point": {"row": 159, "column": 39}}, {"id": 593, "type": "call_expression", "text": "v.size()", "parent": 592, "children": [594, 597], "start_point": {"row": 159, "column": 27}, "end_point": {"row": 159, "column": 35}}, {"id": 594, "type": "field_expression", "text": "v.size", "parent": 593, "children": [595, 596], "start_point": {"row": 159, "column": 27}, "end_point": {"row": 159, "column": 33}}, {"id": 595, "type": "identifier", "text": "v", "parent": 594, "children": [], "start_point": {"row": 159, "column": 27}, "end_point": {"row": 159, "column": 28}}, {"id": 596, "type": "field_identifier", "text": "size", "parent": 594, "children": [], "start_point": {"row": 159, "column": 29}, "end_point": {"row": 159, "column": 33}}, {"id": 597, "type": "argument_list", "text": "()", "parent": 593, "children": [], "start_point": {"row": 159, "column": 33}, "end_point": {"row": 159, "column": 35}}, {"id": 598, "type": "-", "text": "-", "parent": 592, "children": [], "start_point": {"row": 159, "column": 36}, "end_point": {"row": 159, "column": 37}}, {"id": 599, "type": "number_literal", "text": "1", "parent": 592, "children": [], "start_point": {"row": 159, "column": 38}, "end_point": {"row": 159, "column": 39}}, {"id": 600, "type": "call_expression", "text": "isort_int(v.data(), v.size())", "parent": 546, "children": [601, 602], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 33}}, {"id": 601, "type": "identifier", "text": "isort_int", "parent": 600, "children": [], "start_point": {"row": 160, "column": 4}, "end_point": {"row": 160, "column": 13}}, {"id": 602, "type": "argument_list", "text": "(v.data(), v.size())", "parent": 600, "children": [603, 608], "start_point": {"row": 160, "column": 13}, "end_point": {"row": 160, "column": 33}}, {"id": 603, "type": "call_expression", "text": "v.data()", "parent": 602, "children": [604, 607], "start_point": {"row": 160, "column": 14}, "end_point": {"row": 160, "column": 22}}, {"id": 604, "type": "field_expression", "text": "v.data", "parent": 603, "children": [605, 606], "start_point": {"row": 160, "column": 14}, "end_point": {"row": 160, "column": 20}}, {"id": 605, "type": "identifier", "text": "v", "parent": 604, "children": [], "start_point": {"row": 160, "column": 14}, "end_point": {"row": 160, "column": 15}}, {"id": 606, "type": "field_identifier", "text": "data", "parent": 604, "children": [], "start_point": {"row": 160, "column": 16}, "end_point": {"row": 160, "column": 20}}, {"id": 607, "type": "argument_list", "text": "()", "parent": 603, "children": [], "start_point": {"row": 160, "column": 20}, "end_point": {"row": 160, "column": 22}}, {"id": 608, "type": "call_expression", "text": "v.size()", "parent": 602, "children": [609, 612], "start_point": {"row": 160, "column": 24}, "end_point": {"row": 160, "column": 32}}, {"id": 609, "type": "field_expression", "text": "v.size", "parent": 608, "children": [610, 611], "start_point": {"row": 160, "column": 24}, "end_point": {"row": 160, "column": 30}}, {"id": 610, "type": "identifier", "text": "v", "parent": 609, "children": [], "start_point": {"row": 160, "column": 24}, "end_point": {"row": 160, "column": 25}}, {"id": 611, "type": "field_identifier", "text": "size", "parent": 609, "children": [], "start_point": {"row": 160, "column": 26}, "end_point": {"row": 160, "column": 30}}, {"id": 612, "type": "argument_list", "text": "()", "parent": 608, "children": [], "start_point": {"row": 160, "column": 30}, "end_point": {"row": 160, "column": 32}}, {"id": 613, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 164, "column": 6}}]}, "node_categories": {"declarations": {"functions": [546], "variables": [13, 148, 161, 167, 173, 188, 307, 310, 429, 433, 439, 442], "classes": [], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [19, 20, 29, 32, 44, 47, 50, 53, 54, 63, 79, 80, 81, 85, 88, 95, 96, 97, 101, 104, 111, 112, 113, 117, 120, 126, 127, 136, 153, 154, 155, 180, 181, 182, 193, 194, 195, 201, 206, 210, 213, 217, 221, 226, 230, 234, 237, 241, 249, 260, 264, 271, 276, 281, 285, 286, 295, 315, 316, 317, 326, 339, 345, 346, 347, 349, 353, 357, 358, 359, 361, 365, 369, 370, 374, 383, 388, 392, 397, 401, 405, 410, 411, 420, 446, 447, 455, 463, 467, 471, 472, 473, 481, 488, 499, 503, 509, 517, 520, 522, 526, 530, 534, 536, 541, 549, 550, 559, 564, 565, 570, 573, 574, 575, 576, 583, 586, 587, 592, 593, 594, 600, 603, 604, 608, 609], "assignments": [246, 253, 257, 323, 332, 336, 452, 459, 478, 484, 495, 506, 513, 529, 540], "loops": [343, 344, 356, 458, 494, 512], "conditionals": [0, 1, 2, 5, 12, 16, 21, 23, 25, 28, 30, 33, 35, 36, 38, 39, 41, 43, 45, 48, 49, 51, 52, 55, 57, 59, 62, 64, 66, 68, 69, 71, 72, 74, 75, 77, 78, 82, 83, 86, 87, 89, 91, 92, 93, 94, 98, 99, 102, 103, 105, 107, 108, 109, 110, 114, 115, 118, 119, 121, 123, 124, 125, 128, 130, 132, 135, 137, 139, 141, 142, 144, 145, 147, 151, 156, 158, 164, 166, 170, 172, 176, 178, 179, 183, 185, 191, 196, 198, 202, 204, 205, 207, 209, 211, 216, 218, 220, 222, 224, 225, 227, 229, 231, 233, 235, 240, 242, 244, 245, 247, 250, 252, 254, 256, 258, 261, 263, 265, 267, 268, 269, 270, 272, 274, 275, 277, 282, 287, 289, 291, 294, 296, 298, 300, 301, 303, 304, 306, 309, 312, 313, 314, 318, 320, 322, 324, 327, 329, 330, 331, 333, 335, 337, 340, 348, 351, 354, 355, 360, 363, 366, 367, 368, 371, 373, 375, 377, 378, 379, 384, 386, 387, 389, 393, 395, 396, 398, 402, 404, 406, 409, 412, 414, 416, 419, 421, 423, 425, 426, 428, 431, 432, 436, 440, 441, 443, 444, 445, 448, 453, 456, 460, 464, 466, 468, 470, 474, 475, 477, 479, 482, 483, 485, 487, 489, 491, 493, 496, 500, 502, 504, 507, 510, 511, 514, 516, 518, 521, 523, 527, 531, 532, 535, 537, 542, 543, 545, 547, 548, 551, 553, 555, 558, 560, 563, 566, 568, 571, 572, 577, 578, 584, 588, 589, 595, 596, 601, 605, 606, 610, 611, 613], "returns": [280, 451, 582], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 18, 160, 187, 200, 214, 238, 279, 284, 342, 391, 400, 408, 438, 450, 457, 462, 492, 498, 525, 539, 581, 591, 599], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 546, "universal_type": "function", "name": "qsort", "text_snippet": "namespace Ioss {\n template <typename INT> void qsort(std::vector<INT> &v)\n {\n if (v.size() <= 1"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <cstddef>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <vector>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "// Copyright(C) 1999-2017 National Technology & Engineering Solutions\n// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with\n// NTESS, the U.S. Government retains certain rights in this software.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n//\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following\n// disclaimer in the documentation and/or other materials provided\n// with the distribution.\n//\n// * Neither the name of NTESS nor the names of its\n// 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#ifndef IOSS_Ioss_Sort_h\n#define IOSS_Ioss_Sort_h\n\n#include <cstddef>\n#include <vector>\n\n// This is used instead of the std::sort since we were having issues\n// with the std::sort on some compiler versions with certain options\n// enabled (-fopenmp). If this shows up as a hotspot in performance\n// measurments, then we can use std::sort on most platforms and just\n// use this version where there are compiler issues.\n\n// Using Explicit Template Instantiation with the types:\n//\n// std::vector<int>, std::vector<int64_t>, std::vector<std::pair<int64_t,int64_t>>\n//\n// Update in Ioss_Sort.C if other types are needed.\n\nnamespace {\n const int QSORT_CUTOFF = 12;\n\n template <typename INT> void SWAP(INT *V, size_t I, size_t J) { std::swap(V[I], V[J]); }\n\n template <typename INT> void order3(INT v[], size_t left, size_t center, size_t right)\n {\n if (v[left] > v[center]) {\n SWAP(v, left, center);\n }\n if (v[left] > v[right]) {\n SWAP(v, left, right);\n }\n if (v[center] > v[right]) {\n SWAP(v, center, right);\n }\n }\n\n template <typename INT> size_t median3(INT v[], size_t left, size_t right)\n {\n size_t center = (left + right) / 2;\n size_t pl = left;\n size_t pm = center;\n size_t pr = right;\n\n if (right - left > 40) {\n size_t s = (right - left) / 8;\n order3(v, left, left + s, left + 2 * s);\n order3(v, center - s, center, center + s);\n order3(v, right - 2 * s, right - s, right);\n\n // Now set up to get median of the 3 medians...\n pl = left + s;\n pm = center;\n pr = right - s;\n }\n order3(v, pl, pm, pr);\n\n SWAP(v, center, right - 1);\n return right - 1;\n }\n\n template <typename INT> void qsort_int(INT v[], size_t left, size_t right)\n {\n size_t pivot;\n size_t i, j;\n\n if (left + QSORT_CUTOFF < right) {\n pivot = median3(v, left, right);\n i = left;\n j = right - 1;\n\n for (;;) {\n while (v[++i] < v[pivot]) {\n ;\n }\n while (v[--j] > v[pivot]) {\n ;\n }\n if (i < j) {\n SWAP(v, i, j);\n }\n else {\n break;\n }\n }\n\n SWAP(v, i, right - 1);\n qsort_int(v, left, i - 1);\n qsort_int(v, i + 1, right);\n }\n }\n\n template <typename INT> void isort_int(INT v[], size_t N)\n {\n size_t i, j;\n size_t ndx = 0;\n INT small;\n INT tmp;\n\n if (N <= 1) {\n return;\n }\n small = v[0];\n for (i = 1; i < N; i++) {\n if (v[i] < small) {\n small = v[i];\n ndx = i;\n }\n }\n /* Put smallest value in slot 0 */\n SWAP(v, 0, ndx);\n\n for (i = 1; i < N; i++) {\n tmp = v[i];\n for (j = i; tmp < v[j - 1]; j--) {\n v[j] = v[j - 1];\n }\n v[j] = tmp;\n }\n }\n} // namespace\n\nnamespace Ioss {\n template <typename INT> void qsort(std::vector<INT> &v)\n {\n if (v.size() <= 1) {\n return;\n }\n qsort_int(v.data(), 0, v.size() - 1);\n isort_int(v.data(), v.size());\n }\n} // namespace Ioss\n\n#endif\n"}
52
c
#include <stdio.h> #include "machdefs.h" #include "util.h" #include "tsp.h" static int receive_dominos (CC_SFILE *s), parseargs (int ac, char **av); static void usage (char *f); static int graphid = 1; static int sendgraph = 0; static int stopboss = 0; static int getdominos = 0; static char *hostname = (char *) NULL; int main (int ac, char **av) { CC_SFILE *s = (CC_SFILE *) NULL; int rval = 0; rval = parseargs (ac, av); if (rval) return 0; CCutil_printlabel (); s = CCutil_snet_open (hostname, CCtsp_DOMINO_PORT); if (!s) { fprintf (stderr, "CCutil_snet_open failed\n"); rval = 1; goto CLEANUP; } if (stopboss) { printf ("stop the boss\n"); fflush (stdout); rval = CCutil_swrite_char (s, CCtsp_DOMINO_EXIT); CCcheck_rval (rval, "CCutil_swrite_char failed (EXIT)"); } else if (sendgraph) { printf ("Send graph id = %d\n", graphid); fflush (stdout); rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH); CCcheck_rval (rval, "CCutil_swrite_char failed (GRAPH)"); rval = CCutil_swrite_int (s, graphid); CCcheck_rval (rval, "CCutil_swrite_int failed"); rval = CCutil_swrite_int (s, 2*graphid); CCcheck_rval (rval, "CCutil_swrite_int failed"); rval = CCutil_swrite_int (s, 3*graphid); CCcheck_rval (rval, "CCutil_swrite_int failed"); } else if (getdominos) { printf ("get the domino list\n"); fflush (stdout); rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND); CCcheck_rval (rval, "CCutil_swrite_char failed (SEND)"); rval = receive_dominos (s); CCcheck_rval (rval, "receive_dominos failed"); } else { printf ("Nothing to do.\n"); fflush (stdout); } CLEANUP: if (s) CCutil_sclose (s); return rval; } static int parseargs (int ac, char **av) { int c; int boptind = 1; char *boptarg = (char *) NULL; while ((c = CCutil_bix_getopt (ac, av, "xg:d", &boptind, &boptarg)) != EOF) { switch (c) { case 'x': stopboss = 1; break; case 'g': sendgraph = 1; graphid = atoi(boptarg); break; case 'd': getdominos = 1; break; default: usage (av[0]); return 1; } } if (boptind >= ac) { usage (av[0]); return 1; } hostname = av[boptind++]; if (boptind != ac) { usage (av[0]); return 1; } return 0; } static int receive_dominos (CC_SFILE *s) { int rval = 0; int i, count; int *list = (int *) NULL; rval = CCutil_sread_int (s, &count); CCcheck_rval (rval, "CCutil_sread_int failed (count)"); list = CC_SAFE_MALLOC (count, int); CCcheck_NULL (list, "out memory for list"); for (i = 0; i < count; i++) { rval = CCutil_sread_int (s, &list[i]); CCcheck_rval (rval, "CCutil_sread_int failed (list)"); } printf ("Dom List: %d\n", count); for (i = 0; i < count; i++) { printf ("%d ", list[i]); } printf ("\n"); fflush (stdout); CLEANUP: CC_IFFREE (list, int); return rval; } static void usage (char *f) { fprintf (stderr, "Usage: %s [-see below-] hostname\n", f); fprintf (stderr, " -d tells the boss to send dominos\n"); fprintf (stderr, " -g # sends graph is id #\n"); fprintf (stderr, " -x tells the boss to exit\n"); }
31.36
115
(translation_unit) "#include <stdio.h>\n#include "machdefs.h"\n#include "util.h"\n#include "tsp.h"\n\nstatic int\n receive_dominos (CC_SFILE *s),\n parseargs (int ac, char **av);\n\nstatic void\n usage (char *f);\n\nstatic int graphid = 1;\nstatic int sendgraph = 0;\nstatic int stopboss = 0;\nstatic int getdominos = 0;\nstatic char *hostname = (char *) NULL;\n\nint main (int ac, char **av)\n{\n CC_SFILE *s = (CC_SFILE *) NULL;\n int rval = 0;\n\n rval = parseargs (ac, av);\n if (rval) return 0;\n\n CCutil_printlabel ();\n\n s = CCutil_snet_open (hostname, CCtsp_DOMINO_PORT);\n if (!s) {\n fprintf (stderr, "CCutil_snet_open failed\n");\n rval = 1; goto CLEANUP;\n }\n\n if (stopboss) {\n printf ("stop the boss\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_EXIT);\n CCcheck_rval (rval, "CCutil_swrite_char failed (EXIT)");\n } else if (sendgraph) {\n printf ("Send graph id = %d\n", graphid); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH);\n CCcheck_rval (rval, "CCutil_swrite_char failed (GRAPH)");\n rval = CCutil_swrite_int (s, graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 2*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 3*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n } else if (getdominos) {\n printf ("get the domino list\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, "CCutil_swrite_char failed (SEND)");\n rval = receive_dominos (s);\n CCcheck_rval (rval, "receive_dominos failed");\n } else {\n printf ("Nothing to do.\n"); fflush (stdout);\n }\n\nCLEANUP:\n\n if (s) CCutil_sclose (s);\n return rval;\n}\n\nstatic int parseargs (int ac, char **av)\n{\n int c; \n int boptind = 1;\n char *boptarg = (char *) NULL;\n\n while ((c = CCutil_bix_getopt (ac, av, "xg:d", &boptind, &boptarg)) != EOF) {\n switch (c) { \n case 'x':\n stopboss = 1;\n break;\n case 'g': \n sendgraph = 1;\n graphid = atoi(boptarg);\n break; \n case 'd': \n getdominos = 1;\n break;\n default:\n usage (av[0]);\n return 1;\n }\n }\n\n if (boptind >= ac) {\n usage (av[0]);\n return 1;\n }\n hostname = av[boptind++];\n if (boptind != ac) {\n usage (av[0]);\n return 1;\n }\n\n return 0;\n}\n\nstatic int receive_dominos (CC_SFILE *s)\n{\n int rval = 0;\n int i, count;\n int *list = (int *) NULL;\n\n rval = CCutil_sread_int (s, &count);\n CCcheck_rval (rval, "CCutil_sread_int failed (count)");\n\n list = CC_SAFE_MALLOC (count, int);\n CCcheck_NULL (list, "out memory for list");\n\n for (i = 0; i < count; i++) {\n rval = CCutil_sread_int (s, &list[i]);\n CCcheck_rval (rval, "CCutil_sread_int failed (list)");\n }\n\n printf ("Dom List: %d\n", count);\n for (i = 0; i < count; i++) {\n printf ("%d ", list[i]);\n }\n printf ("\n"); fflush (stdout);\n\nCLEANUP:\n\n CC_IFFREE (list, int);\n return rval;\n}\n\nstatic void usage (char *f)\n{\n fprintf (stderr, "Usage: %s [-see below-] hostname\n", f);\n fprintf (stderr, " -d tells the boss to send dominos\n");\n fprintf (stderr, " -g # sends graph is id #\n");\n fprintf (stderr, " -x tells the boss to exit\n");\n}\n" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include "machdefs.h"\n" (#include) "#include" (string_literal) ""machdefs.h"" (") """ (string_content) "machdefs.h" (") """ (preproc_include) "#include "util.h"\n" (#include) "#include" (string_literal) ""util.h"" (") """ (string_content) "util.h" (") """ (preproc_include) "#include "tsp.h"\n" (#include) "#include" (string_literal) ""tsp.h"" (") """ (string_content) "tsp.h" (") """ (declaration) "static int\n receive_dominos (CC_SFILE *s),\n parseargs (int ac, char **av);" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "receive_dominos (CC_SFILE *s)" (identifier) "receive_dominos" (parameter_list) "(CC_SFILE *s)" (() "(" (parameter_declaration) "CC_SFILE *s" (type_identifier) "CC_SFILE" (pointer_declarator) "*s" (*) "*" (identifier) "s" ()) ")" (,) "," (function_declarator) "parseargs (int ac, char **av)" (identifier) "parseargs" (parameter_list) "(int ac, char **av)" (() "(" (parameter_declaration) "int ac" (primitive_type) "int" (identifier) "ac" (,) "," (parameter_declaration) "char **av" (primitive_type) "char" (pointer_declarator) "**av" (*) "*" (pointer_declarator) "*av" (*) "*" (identifier) "av" ()) ")" (;) ";" (declaration) "static void\n usage (char *f);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "usage (char *f)" (identifier) "usage" (parameter_list) "(char *f)" (() "(" (parameter_declaration) "char *f" (primitive_type) "char" (pointer_declarator) "*f" (*) "*" (identifier) "f" ()) ")" (;) ";" (declaration) "static int graphid = 1;" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (init_declarator) "graphid = 1" (identifier) "graphid" (=) "=" (number_literal) "1" (;) ";" (declaration) "static int sendgraph = 0;" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (init_declarator) "sendgraph = 0" (identifier) "sendgraph" (=) "=" (number_literal) "0" (;) ";" (declaration) "static int stopboss = 0;" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (init_declarator) "stopboss = 0" (identifier) "stopboss" (=) "=" (number_literal) "0" (;) ";" (declaration) "static int getdominos = 0;" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (init_declarator) "getdominos = 0" (identifier) "getdominos" (=) "=" (number_literal) "0" (;) ";" (declaration) "static char *hostname = (char *) NULL;" (storage_class_specifier) "static" (static) "static" (primitive_type) "char" (init_declarator) "*hostname = (char *) NULL" (pointer_declarator) "*hostname" (*) "*" (identifier) "hostname" (=) "=" (cast_expression) "(char *) NULL" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (null) "NULL" (NULL) "NULL" (;) ";" (function_definition) "int main (int ac, char **av)\n{\n CC_SFILE *s = (CC_SFILE *) NULL;\n int rval = 0;\n\n rval = parseargs (ac, av);\n if (rval) return 0;\n\n CCutil_printlabel ();\n\n s = CCutil_snet_open (hostname, CCtsp_DOMINO_PORT);\n if (!s) {\n fprintf (stderr, "CCutil_snet_open failed\n");\n rval = 1; goto CLEANUP;\n }\n\n if (stopboss) {\n printf ("stop the boss\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_EXIT);\n CCcheck_rval (rval, "CCutil_swrite_char failed (EXIT)");\n } else if (sendgraph) {\n printf ("Send graph id = %d\n", graphid); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH);\n CCcheck_rval (rval, "CCutil_swrite_char failed (GRAPH)");\n rval = CCutil_swrite_int (s, graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 2*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 3*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n } else if (getdominos) {\n printf ("get the domino list\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, "CCutil_swrite_char failed (SEND)");\n rval = receive_dominos (s);\n CCcheck_rval (rval, "receive_dominos failed");\n } else {\n printf ("Nothing to do.\n"); fflush (stdout);\n }\n\nCLEANUP:\n\n if (s) CCutil_sclose (s);\n return rval;\n}" (primitive_type) "int" (function_declarator) "main (int ac, char **av)" (identifier) "main" (parameter_list) "(int ac, char **av)" (() "(" (parameter_declaration) "int ac" (primitive_type) "int" (identifier) "ac" (,) "," (parameter_declaration) "char **av" (primitive_type) "char" (pointer_declarator) "**av" (*) "*" (pointer_declarator) "*av" (*) "*" (identifier) "av" ()) ")" (compound_statement) "{\n CC_SFILE *s = (CC_SFILE *) NULL;\n int rval = 0;\n\n rval = parseargs (ac, av);\n if (rval) return 0;\n\n CCutil_printlabel ();\n\n s = CCutil_snet_open (hostname, CCtsp_DOMINO_PORT);\n if (!s) {\n fprintf (stderr, "CCutil_snet_open failed\n");\n rval = 1; goto CLEANUP;\n }\n\n if (stopboss) {\n printf ("stop the boss\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_EXIT);\n CCcheck_rval (rval, "CCutil_swrite_char failed (EXIT)");\n } else if (sendgraph) {\n printf ("Send graph id = %d\n", graphid); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH);\n CCcheck_rval (rval, "CCutil_swrite_char failed (GRAPH)");\n rval = CCutil_swrite_int (s, graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 2*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 3*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n } else if (getdominos) {\n printf ("get the domino list\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, "CCutil_swrite_char failed (SEND)");\n rval = receive_dominos (s);\n CCcheck_rval (rval, "receive_dominos failed");\n } else {\n printf ("Nothing to do.\n"); fflush (stdout);\n }\n\nCLEANUP:\n\n if (s) CCutil_sclose (s);\n return rval;\n}" ({) "{" (declaration) "CC_SFILE *s = (CC_SFILE *) NULL;" (type_identifier) "CC_SFILE" (init_declarator) "*s = (CC_SFILE *) NULL" (pointer_declarator) "*s" (*) "*" (identifier) "s" (=) "=" (cast_expression) "(CC_SFILE *) NULL" (() "(" (type_descriptor) "CC_SFILE *" (type_identifier) "CC_SFILE" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (null) "NULL" (NULL) "NULL" (;) ";" (declaration) "int rval = 0;" (primitive_type) "int" (init_declarator) "rval = 0" (identifier) "rval" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "rval = parseargs (ac, av);" (assignment_expression) "rval = parseargs (ac, av)" (identifier) "rval" (=) "=" (call_expression) "parseargs (ac, av)" (identifier) "parseargs" (argument_list) "(ac, av)" (() "(" (identifier) "ac" (,) "," (identifier) "av" ()) ")" (;) ";" (if_statement) "if (rval) return 0;" (if) "if" (parenthesized_expression) "(rval)" (() "(" (identifier) "rval" ()) ")" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (expression_statement) "CCutil_printlabel ();" (call_expression) "CCutil_printlabel ()" (identifier) "CCutil_printlabel" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "s = CCutil_snet_open (hostname, CCtsp_DOMINO_PORT);" (assignment_expression) "s = CCutil_snet_open (hostname, CCtsp_DOMINO_PORT)" (identifier) "s" (=) "=" (call_expression) "CCutil_snet_open (hostname, CCtsp_DOMINO_PORT)" (identifier) "CCutil_snet_open" (argument_list) "(hostname, CCtsp_DOMINO_PORT)" (() "(" (identifier) "hostname" (,) "," (identifier) "CCtsp_DOMINO_PORT" ()) ")" (;) ";" (if_statement) "if (!s) {\n fprintf (stderr, "CCutil_snet_open failed\n");\n rval = 1; goto CLEANUP;\n }" (if) "if" (parenthesized_expression) "(!s)" (() "(" (unary_expression) "!s" (!) "!" (identifier) "s" ()) ")" (compound_statement) "{\n fprintf (stderr, "CCutil_snet_open failed\n");\n rval = 1; goto CLEANUP;\n }" ({) "{" (expression_statement) "fprintf (stderr, "CCutil_snet_open failed\n");" (call_expression) "fprintf (stderr, "CCutil_snet_open failed\n")" (identifier) "fprintf" (argument_list) "(stderr, "CCutil_snet_open failed\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) ""CCutil_snet_open failed\n"" (") """ (string_content) "CCutil_snet_open failed" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "rval = 1;" (assignment_expression) "rval = 1" (identifier) "rval" (=) "=" (number_literal) "1" (;) ";" (goto_statement) "goto CLEANUP;" (goto) "goto" (statement_identifier) "CLEANUP" (;) ";" (}) "}" (if_statement) "if (stopboss) {\n printf ("stop the boss\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_EXIT);\n CCcheck_rval (rval, "CCutil_swrite_char failed (EXIT)");\n } else if (sendgraph) {\n printf ("Send graph id = %d\n", graphid); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH);\n CCcheck_rval (rval, "CCutil_swrite_char failed (GRAPH)");\n rval = CCutil_swrite_int (s, graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 2*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 3*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n } else if (getdominos) {\n printf ("get the domino list\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, "CCutil_swrite_char failed (SEND)");\n rval = receive_dominos (s);\n CCcheck_rval (rval, "receive_dominos failed");\n } else {\n printf ("Nothing to do.\n"); fflush (stdout);\n }" (if) "if" (parenthesized_expression) "(stopboss)" (() "(" (identifier) "stopboss" ()) ")" (compound_statement) "{\n printf ("stop the boss\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_EXIT);\n CCcheck_rval (rval, "CCutil_swrite_char failed (EXIT)");\n }" ({) "{" (expression_statement) "printf ("stop the boss\n");" (call_expression) "printf ("stop the boss\n")" (identifier) "printf" (argument_list) "("stop the boss\n")" (() "(" (string_literal) ""stop the boss\n"" (") """ (string_content) "stop the boss" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fflush (stdout);" (call_expression) "fflush (stdout)" (identifier) "fflush" (argument_list) "(stdout)" (() "(" (identifier) "stdout" ()) ")" (;) ";" (expression_statement) "rval = CCutil_swrite_char (s, CCtsp_DOMINO_EXIT);" (assignment_expression) "rval = CCutil_swrite_char (s, CCtsp_DOMINO_EXIT)" (identifier) "rval" (=) "=" (call_expression) "CCutil_swrite_char (s, CCtsp_DOMINO_EXIT)" (identifier) "CCutil_swrite_char" (argument_list) "(s, CCtsp_DOMINO_EXIT)" (() "(" (identifier) "s" (,) "," (identifier) "CCtsp_DOMINO_EXIT" ()) ")" (;) ";" (expression_statement) "CCcheck_rval (rval, "CCutil_swrite_char failed (EXIT)");" (call_expression) "CCcheck_rval (rval, "CCutil_swrite_char failed (EXIT)")" (identifier) "CCcheck_rval" (argument_list) "(rval, "CCutil_swrite_char failed (EXIT)")" (() "(" (identifier) "rval" (,) "," (string_literal) ""CCutil_swrite_char failed (EXIT)"" (") """ (string_content) "CCutil_swrite_char failed (EXIT)" (") """ ()) ")" (;) ";" (}) "}" (else_clause) "else if (sendgraph) {\n printf ("Send graph id = %d\n", graphid); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH);\n CCcheck_rval (rval, "CCutil_swrite_char failed (GRAPH)");\n rval = CCutil_swrite_int (s, graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 2*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 3*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n } else if (getdominos) {\n printf ("get the domino list\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, "CCutil_swrite_char failed (SEND)");\n rval = receive_dominos (s);\n CCcheck_rval (rval, "receive_dominos failed");\n } else {\n printf ("Nothing to do.\n"); fflush (stdout);\n }" (else) "else" (if_statement) "if (sendgraph) {\n printf ("Send graph id = %d\n", graphid); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH);\n CCcheck_rval (rval, "CCutil_swrite_char failed (GRAPH)");\n rval = CCutil_swrite_int (s, graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 2*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 3*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n } else if (getdominos) {\n printf ("get the domino list\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, "CCutil_swrite_char failed (SEND)");\n rval = receive_dominos (s);\n CCcheck_rval (rval, "receive_dominos failed");\n } else {\n printf ("Nothing to do.\n"); fflush (stdout);\n }" (if) "if" (parenthesized_expression) "(sendgraph)" (() "(" (identifier) "sendgraph" ()) ")" (compound_statement) "{\n printf ("Send graph id = %d\n", graphid); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH);\n CCcheck_rval (rval, "CCutil_swrite_char failed (GRAPH)");\n rval = CCutil_swrite_int (s, graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 2*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n rval = CCutil_swrite_int (s, 3*graphid);\n CCcheck_rval (rval, "CCutil_swrite_int failed");\n }" ({) "{" (expression_statement) "printf ("Send graph id = %d\n", graphid);" (call_expression) "printf ("Send graph id = %d\n", graphid)" (identifier) "printf" (argument_list) "("Send graph id = %d\n", graphid)" (() "(" (string_literal) ""Send graph id = %d\n"" (") """ (string_content) "Send graph id = %d" (escape_sequence) "\n" (") """ (,) "," (identifier) "graphid" ()) ")" (;) ";" (expression_statement) "fflush (stdout);" (call_expression) "fflush (stdout)" (identifier) "fflush" (argument_list) "(stdout)" (() "(" (identifier) "stdout" ()) ")" (;) ";" (expression_statement) "rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH);" (assignment_expression) "rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH)" (identifier) "rval" (=) "=" (call_expression) "CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH)" (identifier) "CCutil_swrite_char" (argument_list) "(s, CCtsp_DOMINO_GRAPH)" (() "(" (identifier) "s" (,) "," (identifier) "CCtsp_DOMINO_GRAPH" ()) ")" (;) ";" (expression_statement) "CCcheck_rval (rval, "CCutil_swrite_char failed (GRAPH)");" (call_expression) "CCcheck_rval (rval, "CCutil_swrite_char failed (GRAPH)")" (identifier) "CCcheck_rval" (argument_list) "(rval, "CCutil_swrite_char failed (GRAPH)")" (() "(" (identifier) "rval" (,) "," (string_literal) ""CCutil_swrite_char failed (GRAPH)"" (") """ (string_content) "CCutil_swrite_char failed (GRAPH)" (") """ ()) ")" (;) ";" (expression_statement) "rval = CCutil_swrite_int (s, graphid);" (assignment_expression) "rval = CCutil_swrite_int (s, graphid)" (identifier) "rval" (=) "=" (call_expression) "CCutil_swrite_int (s, graphid)" (identifier) "CCutil_swrite_int" (argument_list) "(s, graphid)" (() "(" (identifier) "s" (,) "," (identifier) "graphid" ()) ")" (;) ";" (expression_statement) "CCcheck_rval (rval, "CCutil_swrite_int failed");" (call_expression) "CCcheck_rval (rval, "CCutil_swrite_int failed")" (identifier) "CCcheck_rval" (argument_list) "(rval, "CCutil_swrite_int failed")" (() "(" (identifier) "rval" (,) "," (string_literal) ""CCutil_swrite_int failed"" (") """ (string_content) "CCutil_swrite_int failed" (") """ ()) ")" (;) ";" (expression_statement) "rval = CCutil_swrite_int (s, 2*graphid);" (assignment_expression) "rval = CCutil_swrite_int (s, 2*graphid)" (identifier) "rval" (=) "=" (call_expression) "CCutil_swrite_int (s, 2*graphid)" (identifier) "CCutil_swrite_int" (argument_list) "(s, 2*graphid)" (() "(" (identifier) "s" (,) "," (binary_expression) "2*graphid" (number_literal) "2" (*) "*" (identifier) "graphid" ()) ")" (;) ";" (expression_statement) "CCcheck_rval (rval, "CCutil_swrite_int failed");" (call_expression) "CCcheck_rval (rval, "CCutil_swrite_int failed")" (identifier) "CCcheck_rval" (argument_list) "(rval, "CCutil_swrite_int failed")" (() "(" (identifier) "rval" (,) "," (string_literal) ""CCutil_swrite_int failed"" (") """ (string_content) "CCutil_swrite_int failed" (") """ ()) ")" (;) ";" (expression_statement) "rval = CCutil_swrite_int (s, 3*graphid);" (assignment_expression) "rval = CCutil_swrite_int (s, 3*graphid)" (identifier) "rval" (=) "=" (call_expression) "CCutil_swrite_int (s, 3*graphid)" (identifier) "CCutil_swrite_int" (argument_list) "(s, 3*graphid)" (() "(" (identifier) "s" (,) "," (binary_expression) "3*graphid" (number_literal) "3" (*) "*" (identifier) "graphid" ()) ")" (;) ";" (expression_statement) "CCcheck_rval (rval, "CCutil_swrite_int failed");" (call_expression) "CCcheck_rval (rval, "CCutil_swrite_int failed")" (identifier) "CCcheck_rval" (argument_list) "(rval, "CCutil_swrite_int failed")" (() "(" (identifier) "rval" (,) "," (string_literal) ""CCutil_swrite_int failed"" (") """ (string_content) "CCutil_swrite_int failed" (") """ ()) ")" (;) ";" (}) "}" (else_clause) "else if (getdominos) {\n printf ("get the domino list\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, "CCutil_swrite_char failed (SEND)");\n rval = receive_dominos (s);\n CCcheck_rval (rval, "receive_dominos failed");\n } else {\n printf ("Nothing to do.\n"); fflush (stdout);\n }" (else) "else" (if_statement) "if (getdominos) {\n printf ("get the domino list\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, "CCutil_swrite_char failed (SEND)");\n rval = receive_dominos (s);\n CCcheck_rval (rval, "receive_dominos failed");\n } else {\n printf ("Nothing to do.\n"); fflush (stdout);\n }" (if) "if" (parenthesized_expression) "(getdominos)" (() "(" (identifier) "getdominos" ()) ")" (compound_statement) "{\n printf ("get the domino list\n"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, "CCutil_swrite_char failed (SEND)");\n rval = receive_dominos (s);\n CCcheck_rval (rval, "receive_dominos failed");\n }" ({) "{" (expression_statement) "printf ("get the domino list\n");" (call_expression) "printf ("get the domino list\n")" (identifier) "printf" (argument_list) "("get the domino list\n")" (() "(" (string_literal) ""get the domino list\n"" (") """ (string_content) "get the domino list" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fflush (stdout);" (call_expression) "fflush (stdout)" (identifier) "fflush" (argument_list) "(stdout)" (() "(" (identifier) "stdout" ()) ")" (;) ";" (expression_statement) "rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);" (assignment_expression) "rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND)" (identifier) "rval" (=) "=" (call_expression) "CCutil_swrite_char (s, CCtsp_DOMINO_SEND)" (identifier) "CCutil_swrite_char" (argument_list) "(s, CCtsp_DOMINO_SEND)" (() "(" (identifier) "s" (,) "," (identifier) "CCtsp_DOMINO_SEND" ()) ")" (;) ";" (expression_statement) "CCcheck_rval (rval, "CCutil_swrite_char failed (SEND)");" (call_expression) "CCcheck_rval (rval, "CCutil_swrite_char failed (SEND)")" (identifier) "CCcheck_rval" (argument_list) "(rval, "CCutil_swrite_char failed (SEND)")" (() "(" (identifier) "rval" (,) "," (string_literal) ""CCutil_swrite_char failed (SEND)"" (") """ (string_content) "CCutil_swrite_char failed (SEND)" (") """ ()) ")" (;) ";" (expression_statement) "rval = receive_dominos (s);" (assignment_expression) "rval = receive_dominos (s)" (identifier) "rval" (=) "=" (call_expression) "receive_dominos (s)" (identifier) "receive_dominos" (argument_list) "(s)" (() "(" (identifier) "s" ()) ")" (;) ";" (expression_statement) "CCcheck_rval (rval, "receive_dominos failed");" (call_expression) "CCcheck_rval (rval, "receive_dominos failed")" (identifier) "CCcheck_rval" (argument_list) "(rval, "receive_dominos failed")" (() "(" (identifier) "rval" (,) "," (string_literal) ""receive_dominos failed"" (") """ (string_content) "receive_dominos failed" (") """ ()) ")" (;) ";" (}) "}" (else_clause) "else {\n printf ("Nothing to do.\n"); fflush (stdout);\n }" (else) "else" (compound_statement) "{\n printf ("Nothing to do.\n"); fflush (stdout);\n }" ({) "{" (expression_statement) "printf ("Nothing to do.\n");" (call_expression) "printf ("Nothing to do.\n")" (identifier) "printf" (argument_list) "("Nothing to do.\n")" (() "(" (string_literal) ""Nothing to do.\n"" (") """ (string_content) "Nothing to do." (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fflush (stdout);" (call_expression) "fflush (stdout)" (identifier) "fflush" (argument_list) "(stdout)" (() "(" (identifier) "stdout" ()) ")" (;) ";" (}) "}" (labeled_statement) "CLEANUP:\n\n if (s) CCutil_sclose (s);" (statement_identifier) "CLEANUP" (:) ":" (if_statement) "if (s) CCutil_sclose (s);" (if) "if" (parenthesized_expression) "(s)" (() "(" (identifier) "s" ()) ")" (expression_statement) "CCutil_sclose (s);" (call_expression) "CCutil_sclose (s)" (identifier) "CCutil_sclose" (argument_list) "(s)" (() "(" (identifier) "s" ()) ")" (;) ";" (return_statement) "return rval;" (return) "return" (identifier) "rval" (;) ";" (}) "}" (function_definition) "static int parseargs (int ac, char **av)\n{\n int c; \n int boptind = 1;\n char *boptarg = (char *) NULL;\n\n while ((c = CCutil_bix_getopt (ac, av, "xg:d", &boptind, &boptarg)) != EOF) {\n switch (c) { \n case 'x':\n stopboss = 1;\n break;\n case 'g': \n sendgraph = 1;\n graphid = atoi(boptarg);\n break; \n case 'd': \n getdominos = 1;\n break;\n default:\n usage (av[0]);\n return 1;\n }\n }\n\n if (boptind >= ac) {\n usage (av[0]);\n return 1;\n }\n hostname = av[boptind++];\n if (boptind != ac) {\n usage (av[0]);\n return 1;\n }\n\n return 0;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "parseargs (int ac, char **av)" (identifier) "parseargs" (parameter_list) "(int ac, char **av)" (() "(" (parameter_declaration) "int ac" (primitive_type) "int" (identifier) "ac" (,) "," (parameter_declaration) "char **av" (primitive_type) "char" (pointer_declarator) "**av" (*) "*" (pointer_declarator) "*av" (*) "*" (identifier) "av" ()) ")" (compound_statement) "{\n int c; \n int boptind = 1;\n char *boptarg = (char *) NULL;\n\n while ((c = CCutil_bix_getopt (ac, av, "xg:d", &boptind, &boptarg)) != EOF) {\n switch (c) { \n case 'x':\n stopboss = 1;\n break;\n case 'g': \n sendgraph = 1;\n graphid = atoi(boptarg);\n break; \n case 'd': \n getdominos = 1;\n break;\n default:\n usage (av[0]);\n return 1;\n }\n }\n\n if (boptind >= ac) {\n usage (av[0]);\n return 1;\n }\n hostname = av[boptind++];\n if (boptind != ac) {\n usage (av[0]);\n return 1;\n }\n\n return 0;\n}" ({) "{" (declaration) "int c;" (primitive_type) "int" (identifier) "c" (;) ";" (declaration) "int boptind = 1;" (primitive_type) "int" (init_declarator) "boptind = 1" (identifier) "boptind" (=) "=" (number_literal) "1" (;) ";" (declaration) "char *boptarg = (char *) NULL;" (primitive_type) "char" (init_declarator) "*boptarg = (char *) NULL" (pointer_declarator) "*boptarg" (*) "*" (identifier) "boptarg" (=) "=" (cast_expression) "(char *) NULL" (() "(" (type_descriptor) "char *" (primitive_type) "char" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (null) "NULL" (NULL) "NULL" (;) ";" (while_statement) "while ((c = CCutil_bix_getopt (ac, av, "xg:d", &boptind, &boptarg)) != EOF) {\n switch (c) { \n case 'x':\n stopboss = 1;\n break;\n case 'g': \n sendgraph = 1;\n graphid = atoi(boptarg);\n break; \n case 'd': \n getdominos = 1;\n break;\n default:\n usage (av[0]);\n return 1;\n }\n }" (while) "while" (parenthesized_expression) "((c = CCutil_bix_getopt (ac, av, "xg:d", &boptind, &boptarg)) != EOF)" (() "(" (binary_expression) "(c = CCutil_bix_getopt (ac, av, "xg:d", &boptind, &boptarg)) != EOF" (parenthesized_expression) "(c = CCutil_bix_getopt (ac, av, "xg:d", &boptind, &boptarg))" (() "(" (assignment_expression) "c = CCutil_bix_getopt (ac, av, "xg:d", &boptind, &boptarg)" (identifier) "c" (=) "=" (call_expression) "CCutil_bix_getopt (ac, av, "xg:d", &boptind, &boptarg)" (identifier) "CCutil_bix_getopt" (argument_list) "(ac, av, "xg:d", &boptind, &boptarg)" (() "(" (identifier) "ac" (,) "," (identifier) "av" (,) "," (string_literal) ""xg:d"" (") """ (string_content) "xg:d" (") """ (,) "," (pointer_expression) "&boptind" (&) "&" (identifier) "boptind" (,) "," (pointer_expression) "&boptarg" (&) "&" (identifier) "boptarg" ()) ")" ()) ")" (!=) "!=" (identifier) "EOF" ()) ")" (compound_statement) "{\n switch (c) { \n case 'x':\n stopboss = 1;\n break;\n case 'g': \n sendgraph = 1;\n graphid = atoi(boptarg);\n break; \n case 'd': \n getdominos = 1;\n break;\n default:\n usage (av[0]);\n return 1;\n }\n }" ({) "{" (switch_statement) "switch (c) { \n case 'x':\n stopboss = 1;\n break;\n case 'g': \n sendgraph = 1;\n graphid = atoi(boptarg);\n break; \n case 'd': \n getdominos = 1;\n break;\n default:\n usage (av[0]);\n return 1;\n }" (switch) "switch" (parenthesized_expression) "(c)" (() "(" (identifier) "c" ()) ")" (compound_statement) "{ \n case 'x':\n stopboss = 1;\n break;\n case 'g': \n sendgraph = 1;\n graphid = atoi(boptarg);\n break; \n case 'd': \n getdominos = 1;\n break;\n default:\n usage (av[0]);\n return 1;\n }" ({) "{" (case_statement) "case 'x':\n stopboss = 1;\n break;" (case) "case" (char_literal) "'x'" (') "'" (character) "x" (') "'" (:) ":" (expression_statement) "stopboss = 1;" (assignment_expression) "stopboss = 1" (identifier) "stopboss" (=) "=" (number_literal) "1" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 'g': \n sendgraph = 1;\n graphid = atoi(boptarg);\n break;" (case) "case" (char_literal) "'g'" (') "'" (character) "g" (') "'" (:) ":" (expression_statement) "sendgraph = 1;" (assignment_expression) "sendgraph = 1" (identifier) "sendgraph" (=) "=" (number_literal) "1" (;) ";" (expression_statement) "graphid = atoi(boptarg);" (assignment_expression) "graphid = atoi(boptarg)" (identifier) "graphid" (=) "=" (call_expression) "atoi(boptarg)" (identifier) "atoi" (argument_list) "(boptarg)" (() "(" (identifier) "boptarg" ()) ")" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "case 'd': \n getdominos = 1;\n break;" (case) "case" (char_literal) "'d'" (') "'" (character) "d" (') "'" (:) ":" (expression_statement) "getdominos = 1;" (assignment_expression) "getdominos = 1" (identifier) "getdominos" (=) "=" (number_literal) "1" (;) ";" (break_statement) "break;" (break) "break" (;) ";" (case_statement) "default:\n usage (av[0]);\n return 1;" (default) "default" (:) ":" (expression_statement) "usage (av[0]);" (call_expression) "usage (av[0])" (identifier) "usage" (argument_list) "(av[0])" (() "(" (subscript_expression) "av[0]" (identifier) "av" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (}) "}" (if_statement) "if (boptind >= ac) {\n usage (av[0]);\n return 1;\n }" (if) "if" (parenthesized_expression) "(boptind >= ac)" (() "(" (binary_expression) "boptind >= ac" (identifier) "boptind" (>=) ">=" (identifier) "ac" ()) ")" (compound_statement) "{\n usage (av[0]);\n return 1;\n }" ({) "{" (expression_statement) "usage (av[0]);" (call_expression) "usage (av[0])" (identifier) "usage" (argument_list) "(av[0])" (() "(" (subscript_expression) "av[0]" (identifier) "av" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (expression_statement) "hostname = av[boptind++];" (assignment_expression) "hostname = av[boptind++]" (identifier) "hostname" (=) "=" (subscript_expression) "av[boptind++]" (identifier) "av" ([) "[" (update_expression) "boptind++" (identifier) "boptind" (++) "++" (]) "]" (;) ";" (if_statement) "if (boptind != ac) {\n usage (av[0]);\n return 1;\n }" (if) "if" (parenthesized_expression) "(boptind != ac)" (() "(" (binary_expression) "boptind != ac" (identifier) "boptind" (!=) "!=" (identifier) "ac" ()) ")" (compound_statement) "{\n usage (av[0]);\n return 1;\n }" ({) "{" (expression_statement) "usage (av[0]);" (call_expression) "usage (av[0])" (identifier) "usage" (argument_list) "(av[0])" (() "(" (subscript_expression) "av[0]" (identifier) "av" ([) "[" (number_literal) "0" (]) "]" ()) ")" (;) ";" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (function_definition) "static int receive_dominos (CC_SFILE *s)\n{\n int rval = 0;\n int i, count;\n int *list = (int *) NULL;\n\n rval = CCutil_sread_int (s, &count);\n CCcheck_rval (rval, "CCutil_sread_int failed (count)");\n\n list = CC_SAFE_MALLOC (count, int);\n CCcheck_NULL (list, "out memory for list");\n\n for (i = 0; i < count; i++) {\n rval = CCutil_sread_int (s, &list[i]);\n CCcheck_rval (rval, "CCutil_sread_int failed (list)");\n }\n\n printf ("Dom List: %d\n", count);\n for (i = 0; i < count; i++) {\n printf ("%d ", list[i]);\n }\n printf ("\n"); fflush (stdout);\n\nCLEANUP:\n\n CC_IFFREE (list, int);\n return rval;\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "int" (function_declarator) "receive_dominos (CC_SFILE *s)" (identifier) "receive_dominos" (parameter_list) "(CC_SFILE *s)" (() "(" (parameter_declaration) "CC_SFILE *s" (type_identifier) "CC_SFILE" (pointer_declarator) "*s" (*) "*" (identifier) "s" ()) ")" (compound_statement) "{\n int rval = 0;\n int i, count;\n int *list = (int *) NULL;\n\n rval = CCutil_sread_int (s, &count);\n CCcheck_rval (rval, "CCutil_sread_int failed (count)");\n\n list = CC_SAFE_MALLOC (count, int);\n CCcheck_NULL (list, "out memory for list");\n\n for (i = 0; i < count; i++) {\n rval = CCutil_sread_int (s, &list[i]);\n CCcheck_rval (rval, "CCutil_sread_int failed (list)");\n }\n\n printf ("Dom List: %d\n", count);\n for (i = 0; i < count; i++) {\n printf ("%d ", list[i]);\n }\n printf ("\n"); fflush (stdout);\n\nCLEANUP:\n\n CC_IFFREE (list, int);\n return rval;\n}" ({) "{" (declaration) "int rval = 0;" (primitive_type) "int" (init_declarator) "rval = 0" (identifier) "rval" (=) "=" (number_literal) "0" (;) ";" (declaration) "int i, count;" (primitive_type) "int" (identifier) "i" (,) "," (identifier) "count" (;) ";" (declaration) "int *list = (int *) NULL;" (primitive_type) "int" (init_declarator) "*list = (int *) NULL" (pointer_declarator) "*list" (*) "*" (identifier) "list" (=) "=" (cast_expression) "(int *) NULL" (() "(" (type_descriptor) "int *" (primitive_type) "int" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (null) "NULL" (NULL) "NULL" (;) ";" (expression_statement) "rval = CCutil_sread_int (s, &count);" (assignment_expression) "rval = CCutil_sread_int (s, &count)" (identifier) "rval" (=) "=" (call_expression) "CCutil_sread_int (s, &count)" (identifier) "CCutil_sread_int" (argument_list) "(s, &count)" (() "(" (identifier) "s" (,) "," (pointer_expression) "&count" (&) "&" (identifier) "count" ()) ")" (;) ";" (expression_statement) "CCcheck_rval (rval, "CCutil_sread_int failed (count)");" (call_expression) "CCcheck_rval (rval, "CCutil_sread_int failed (count)")" (identifier) "CCcheck_rval" (argument_list) "(rval, "CCutil_sread_int failed (count)")" (() "(" (identifier) "rval" (,) "," (string_literal) ""CCutil_sread_int failed (count)"" (") """ (string_content) "CCutil_sread_int failed (count)" (") """ ()) ")" (;) ";" (expression_statement) "list = CC_SAFE_MALLOC (count, int);" (assignment_expression) "list = CC_SAFE_MALLOC (count, int)" (identifier) "list" (=) "=" (call_expression) "CC_SAFE_MALLOC (count, int)" (identifier) "CC_SAFE_MALLOC" (argument_list) "(count, int)" (() "(" (identifier) "count" (,) "," (identifier) "int" ()) ")" (;) ";" (expression_statement) "CCcheck_NULL (list, "out memory for list");" (call_expression) "CCcheck_NULL (list, "out memory for list")" (identifier) "CCcheck_NULL" (argument_list) "(list, "out memory for list")" (() "(" (identifier) "list" (,) "," (string_literal) ""out memory for list"" (") """ (string_content) "out memory for list" (") """ ()) ")" (;) ";" (for_statement) "for (i = 0; i < count; i++) {\n rval = CCutil_sread_int (s, &list[i]);\n CCcheck_rval (rval, "CCutil_sread_int failed (list)");\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 rval = CCutil_sread_int (s, &list[i]);\n CCcheck_rval (rval, "CCutil_sread_int failed (list)");\n }" ({) "{" (expression_statement) "rval = CCutil_sread_int (s, &list[i]);" (assignment_expression) "rval = CCutil_sread_int (s, &list[i])" (identifier) "rval" (=) "=" (call_expression) "CCutil_sread_int (s, &list[i])" (identifier) "CCutil_sread_int" (argument_list) "(s, &list[i])" (() "(" (identifier) "s" (,) "," (pointer_expression) "&list[i]" (&) "&" (subscript_expression) "list[i]" (identifier) "list" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (expression_statement) "CCcheck_rval (rval, "CCutil_sread_int failed (list)");" (call_expression) "CCcheck_rval (rval, "CCutil_sread_int failed (list)")" (identifier) "CCcheck_rval" (argument_list) "(rval, "CCutil_sread_int failed (list)")" (() "(" (identifier) "rval" (,) "," (string_literal) ""CCutil_sread_int failed (list)"" (") """ (string_content) "CCutil_sread_int failed (list)" (") """ ()) ")" (;) ";" (}) "}" (expression_statement) "printf ("Dom List: %d\n", count);" (call_expression) "printf ("Dom List: %d\n", count)" (identifier) "printf" (argument_list) "("Dom List: %d\n", count)" (() "(" (string_literal) ""Dom List: %d\n"" (") """ (string_content) "Dom List: %d" (escape_sequence) "\n" (") """ (,) "," (identifier) "count" ()) ")" (;) ";" (for_statement) "for (i = 0; i < count; i++) {\n printf ("%d ", list[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 printf ("%d ", list[i]);\n }" ({) "{" (expression_statement) "printf ("%d ", list[i]);" (call_expression) "printf ("%d ", list[i])" (identifier) "printf" (argument_list) "("%d ", list[i])" (() "(" (string_literal) ""%d "" (") """ (string_content) "%d " (") """ (,) "," (subscript_expression) "list[i]" (identifier) "list" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "printf ("\n");" (call_expression) "printf ("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fflush (stdout);" (call_expression) "fflush (stdout)" (identifier) "fflush" (argument_list) "(stdout)" (() "(" (identifier) "stdout" ()) ")" (;) ";" (labeled_statement) "CLEANUP:\n\n CC_IFFREE (list, int);" (statement_identifier) "CLEANUP" (:) ":" (expression_statement) "CC_IFFREE (list, int);" (call_expression) "CC_IFFREE (list, int)" (identifier) "CC_IFFREE" (argument_list) "(list, int)" (() "(" (identifier) "list" (,) "," (identifier) "int" ()) ")" (;) ";" (return_statement) "return rval;" (return) "return" (identifier) "rval" (;) ";" (}) "}" (function_definition) "static void usage (char *f)\n{\n fprintf (stderr, "Usage: %s [-see below-] hostname\n", f);\n fprintf (stderr, " -d tells the boss to send dominos\n");\n fprintf (stderr, " -g # sends graph is id #\n");\n fprintf (stderr, " -x tells the boss to exit\n");\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "usage (char *f)" (identifier) "usage" (parameter_list) "(char *f)" (() "(" (parameter_declaration) "char *f" (primitive_type) "char" (pointer_declarator) "*f" (*) "*" (identifier) "f" ()) ")" (compound_statement) "{\n fprintf (stderr, "Usage: %s [-see below-] hostname\n", f);\n fprintf (stderr, " -d tells the boss to send dominos\n");\n fprintf (stderr, " -g # sends graph is id #\n");\n fprintf (stderr, " -x tells the boss to exit\n");\n}" ({) "{" (expression_statement) "fprintf (stderr, "Usage: %s [-see below-] hostname\n", f);" (call_expression) "fprintf (stderr, "Usage: %s [-see below-] hostname\n", f)" (identifier) "fprintf" (argument_list) "(stderr, "Usage: %s [-see below-] hostname\n", f)" (() "(" (identifier) "stderr" (,) "," (string_literal) ""Usage: %s [-see below-] hostname\n"" (") """ (string_content) "Usage: %s [-see below-] hostname" (escape_sequence) "\n" (") """ (,) "," (identifier) "f" ()) ")" (;) ";" (expression_statement) "fprintf (stderr, " -d tells the boss to send dominos\n");" (call_expression) "fprintf (stderr, " -d tells the boss to send dominos\n")" (identifier) "fprintf" (argument_list) "(stderr, " -d tells the boss to send dominos\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) "" -d tells the boss to send dominos\n"" (") """ (string_content) " -d tells the boss to send dominos" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fprintf (stderr, " -g # sends graph is id #\n");" (call_expression) "fprintf (stderr, " -g # sends graph is id #\n")" (identifier) "fprintf" (argument_list) "(stderr, " -g # sends graph is id #\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) "" -g # sends graph is id #\n"" (") """ (string_content) " -g # sends graph is id #" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (expression_statement) "fprintf (stderr, " -x tells the boss to exit\n");" (call_expression) "fprintf (stderr, " -x tells the boss to exit\n")" (identifier) "fprintf" (argument_list) "(stderr, " -x tells the boss to exit\n")" (() "(" (identifier) "stderr" (,) "," (string_literal) "" -x tells the boss to exit\n"" (") """ (string_content) " -x tells the boss to exit" (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}"
1,135
0
{"language": "c", "success": true, "metadata": {"lines": 115, "avg_line_length": 31.36, "nodes": 635, "errors": 0, "source_hash": "5eca273853f46c3eaa307e83efda80ae0843f561aa2da788f69c0b2e992b215c", "categorized_nodes": 416}, "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 \"machdefs.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": "\"machdefs.h\"", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 21}}, {"id": 6, "type": "preproc_include", "text": "#include \"util.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": "\"util.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include \"tsp.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": "\"tsp.h\"", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 16}}, {"id": 12, "type": "declaration", "text": "static int\n receive_dominos (CC_SFILE *s),\n parseargs (int ac, char **av);", "parent": null, "children": [13, 14, 22], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 7, "column": 34}}, {"id": 13, "type": "primitive_type", "text": "int", "parent": 12, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 10}}, {"id": 14, "type": "function_declarator", "text": "receive_dominos (CC_SFILE *s)", "parent": 12, "children": [15, 16], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 33}}, {"id": 15, "type": "identifier", "text": "receive_dominos", "parent": 14, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 19}}, {"id": 16, "type": "parameter_list", "text": "(CC_SFILE *s)", "parent": 14, "children": [17], "start_point": {"row": 6, "column": 20}, "end_point": {"row": 6, "column": 33}}, {"id": 17, "type": "parameter_declaration", "text": "CC_SFILE *s", "parent": 16, "children": [18, 19], "start_point": {"row": 6, "column": 21}, "end_point": {"row": 6, "column": 32}}, {"id": 18, "type": "type_identifier", "text": "CC_SFILE", "parent": 17, "children": [], "start_point": {"row": 6, "column": 21}, "end_point": {"row": 6, "column": 29}}, {"id": 19, "type": "pointer_declarator", "text": "*s", "parent": 17, "children": [20, 21], "start_point": {"row": 6, "column": 30}, "end_point": {"row": 6, "column": 32}}, {"id": 20, "type": "*", "text": "*", "parent": 19, "children": [], "start_point": {"row": 6, "column": 30}, "end_point": {"row": 6, "column": 31}}, {"id": 21, "type": "identifier", "text": "s", "parent": 19, "children": [], "start_point": {"row": 6, "column": 31}, "end_point": {"row": 6, "column": 32}}, {"id": 22, "type": "function_declarator", "text": "parseargs (int ac, char **av)", "parent": 12, "children": [23, 24], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 33}}, {"id": 23, "type": "identifier", "text": "parseargs", "parent": 22, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 13}}, {"id": 24, "type": "parameter_list", "text": "(int ac, char **av)", "parent": 22, "children": [25, 28], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 33}}, {"id": 25, "type": "parameter_declaration", "text": "int ac", "parent": 24, "children": [26, 27], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 21}}, {"id": 26, "type": "primitive_type", "text": "int", "parent": 25, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 18}}, {"id": 27, "type": "identifier", "text": "ac", "parent": 25, "children": [], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 21}}, {"id": 28, "type": "parameter_declaration", "text": "char **av", "parent": 24, "children": [29, 30], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 32}}, {"id": 29, "type": "primitive_type", "text": "char", "parent": 28, "children": [], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 27}}, {"id": 30, "type": "pointer_declarator", "text": "**av", "parent": 28, "children": [31, 32], "start_point": {"row": 7, "column": 28}, "end_point": {"row": 7, "column": 32}}, {"id": 31, "type": "*", "text": "*", "parent": 30, "children": [], "start_point": {"row": 7, "column": 28}, "end_point": {"row": 7, "column": 29}}, {"id": 32, "type": "pointer_declarator", "text": "*av", "parent": 30, "children": [33, 34], "start_point": {"row": 7, "column": 29}, "end_point": {"row": 7, "column": 32}}, {"id": 33, "type": "*", "text": "*", "parent": 32, "children": [], "start_point": {"row": 7, "column": 29}, "end_point": {"row": 7, "column": 30}}, {"id": 34, "type": "identifier", "text": "av", "parent": 32, "children": [], "start_point": {"row": 7, "column": 30}, "end_point": {"row": 7, "column": 32}}, {"id": 35, "type": "declaration", "text": "static void\n usage (char *f);", "parent": null, "children": [36, 37], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 20}}, {"id": 36, "type": "primitive_type", "text": "void", "parent": 35, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 11}}, {"id": 37, "type": "function_declarator", "text": "usage (char *f)", "parent": 35, "children": [38, 39], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 19}}, {"id": 38, "type": "identifier", "text": "usage", "parent": 37, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 9}}, {"id": 39, "type": "parameter_list", "text": "(char *f)", "parent": 37, "children": [40], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 19}}, {"id": 40, "type": "parameter_declaration", "text": "char *f", "parent": 39, "children": [41, 42], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 18}}, {"id": 41, "type": "primitive_type", "text": "char", "parent": 40, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 15}}, {"id": 42, "type": "pointer_declarator", "text": "*f", "parent": 40, "children": [43, 44], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 18}}, {"id": 43, "type": "*", "text": "*", "parent": 42, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 17}}, {"id": 44, "type": "identifier", "text": "f", "parent": 42, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 18}}, {"id": 45, "type": "declaration", "text": "static int graphid = 1;", "parent": null, "children": [46, 47], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 23}}, {"id": 46, "type": "primitive_type", "text": "int", "parent": 45, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 10}}, {"id": 47, "type": "init_declarator", "text": "graphid = 1", "parent": 45, "children": [48, 49, 50], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 22}}, {"id": 48, "type": "identifier", "text": "graphid", "parent": 47, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 18}}, {"id": 49, "type": "=", "text": "=", "parent": 47, "children": [], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 20}}, {"id": 50, "type": "number_literal", "text": "1", "parent": 47, "children": [], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 22}}, {"id": 51, "type": "declaration", "text": "static int sendgraph = 0;", "parent": null, "children": [52, 53], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 25}}, {"id": 52, "type": "primitive_type", "text": "int", "parent": 51, "children": [], "start_point": {"row": 13, "column": 7}, "end_point": {"row": 13, "column": 10}}, {"id": 53, "type": "init_declarator", "text": "sendgraph = 0", "parent": 51, "children": [54, 55, 56], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 24}}, {"id": 54, "type": "identifier", "text": "sendgraph", "parent": 53, "children": [], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 20}}, {"id": 55, "type": "=", "text": "=", "parent": 53, "children": [], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 22}}, {"id": 56, "type": "number_literal", "text": "0", "parent": 53, "children": [], "start_point": {"row": 13, "column": 23}, "end_point": {"row": 13, "column": 24}}, {"id": 57, "type": "declaration", "text": "static int stopboss = 0;", "parent": null, "children": [58, 59], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 24}}, {"id": 58, "type": "primitive_type", "text": "int", "parent": 57, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 10}}, {"id": 59, "type": "init_declarator", "text": "stopboss = 0", "parent": 57, "children": [60, 61, 62], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 23}}, {"id": 60, "type": "identifier", "text": "stopboss", "parent": 59, "children": [], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 19}}, {"id": 61, "type": "=", "text": "=", "parent": 59, "children": [], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 21}}, {"id": 62, "type": "number_literal", "text": "0", "parent": 59, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 23}}, {"id": 63, "type": "declaration", "text": "static int getdominos = 0;", "parent": null, "children": [64, 65], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 26}}, {"id": 64, "type": "primitive_type", "text": "int", "parent": 63, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 10}}, {"id": 65, "type": "init_declarator", "text": "getdominos = 0", "parent": 63, "children": [66, 67, 68], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 25}}, {"id": 66, "type": "identifier", "text": "getdominos", "parent": 65, "children": [], "start_point": {"row": 15, "column": 11}, "end_point": {"row": 15, "column": 21}}, {"id": 67, "type": "=", "text": "=", "parent": 65, "children": [], "start_point": {"row": 15, "column": 22}, "end_point": {"row": 15, "column": 23}}, {"id": 68, "type": "number_literal", "text": "0", "parent": 65, "children": [], "start_point": {"row": 15, "column": 24}, "end_point": {"row": 15, "column": 25}}, {"id": 69, "type": "declaration", "text": "static char *hostname = (char *) NULL;", "parent": null, "children": [70, 71], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 38}}, {"id": 70, "type": "primitive_type", "text": "char", "parent": 69, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 11}}, {"id": 71, "type": "init_declarator", "text": "*hostname = (char *) NULL", "parent": 69, "children": [72, 75, 76], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 37}}, {"id": 72, "type": "pointer_declarator", "text": "*hostname", "parent": 71, "children": [73, 74], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 21}}, {"id": 73, "type": "*", "text": "*", "parent": 72, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 13}}, {"id": 74, "type": "identifier", "text": "hostname", "parent": 72, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 21}}, {"id": 75, "type": "=", "text": "=", "parent": 71, "children": [], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 23}}, {"id": 76, "type": "cast_expression", "text": "(char *) NULL", "parent": 71, "children": [77, 81], "start_point": {"row": 16, "column": 24}, "end_point": {"row": 16, "column": 37}}, {"id": 77, "type": "type_descriptor", "text": "char *", "parent": 76, "children": [78, 79], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 31}}, {"id": 78, "type": "primitive_type", "text": "char", "parent": 77, "children": [], "start_point": {"row": 16, "column": 25}, "end_point": {"row": 16, "column": 29}}, {"id": 79, "type": "abstract_pointer_declarator", "text": "*", "parent": 77, "children": [80], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 31}}, {"id": 80, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 31}}, {"id": 81, "type": "null", "text": "NULL", "parent": 76, "children": [82], "start_point": {"row": 16, "column": 33}, "end_point": {"row": 16, "column": 37}}, {"id": 82, "type": "NULL", "text": "NULL", "parent": 81, "children": [], "start_point": {"row": 16, "column": 33}, "end_point": {"row": 16, "column": 37}}, {"id": 83, "type": "function_definition", "text": "int main (int ac, char **av)\n{\n CC_SFILE *s = (CC_SFILE *) NULL;\n int rval = 0;\n\n rval = parseargs (ac, av);\n if (rval) return 0;\n\n CCutil_printlabel ();\n\n s = CCutil_snet_open (hostname, CCtsp_DOMINO_PORT);\n if (!s) {\n fprintf (stderr, \"CCutil_snet_open failed\\n\");\n rval = 1; goto CLEANUP;\n }\n\n if (stopboss) {\n printf (\"stop the boss\\n\"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_EXIT);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (EXIT)\");\n } else if (sendgraph) {\n printf (\"Send graph id = %d\\n\", graphid); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (GRAPH)\");\n rval = CCutil_swrite_int (s, graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n rval = CCutil_swrite_int (s, 2*graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n rval = CCutil_swrite_int (s, 3*graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n } else if (getdominos) {\n printf (\"get the domino list\\n\"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (SEND)\");\n rval = receive_dominos (s);\n CCcheck_rval (rval, \"receive_dominos failed\");\n } else {\n printf (\"Nothing to do.\\n\"); fflush (stdout);\n }\n\nCLEANUP:\n\n if (s) CCutil_sclose (s);\n return rval;\n}", "parent": null, "children": [84, 85], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 62, "column": 1}}, {"id": 84, "type": "primitive_type", "text": "int", "parent": 83, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 3}}, {"id": 85, "type": "function_declarator", "text": "main (int ac, char **av)", "parent": 83, "children": [86, 87], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 28}}, {"id": 86, "type": "identifier", "text": "main", "parent": 85, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 8}}, {"id": 87, "type": "parameter_list", "text": "(int ac, char **av)", "parent": 85, "children": [88, 91], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 28}}, {"id": 88, "type": "parameter_declaration", "text": "int ac", "parent": 87, "children": [89, 90], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 16}}, {"id": 89, "type": "primitive_type", "text": "int", "parent": 88, "children": [], "start_point": {"row": 18, "column": 10}, "end_point": {"row": 18, "column": 13}}, {"id": 90, "type": "identifier", "text": "ac", "parent": 88, "children": [], "start_point": {"row": 18, "column": 14}, "end_point": {"row": 18, "column": 16}}, {"id": 91, "type": "parameter_declaration", "text": "char **av", "parent": 87, "children": [92, 93], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 27}}, {"id": 92, "type": "primitive_type", "text": "char", "parent": 91, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 22}}, {"id": 93, "type": "pointer_declarator", "text": "**av", "parent": 91, "children": [94, 95], "start_point": {"row": 18, "column": 23}, "end_point": {"row": 18, "column": 27}}, {"id": 94, "type": "*", "text": "*", "parent": 93, "children": [], "start_point": {"row": 18, "column": 23}, "end_point": {"row": 18, "column": 24}}, {"id": 95, "type": "pointer_declarator", "text": "*av", "parent": 93, "children": [96, 97], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 27}}, {"id": 96, "type": "*", "text": "*", "parent": 95, "children": [], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 25}}, {"id": 97, "type": "identifier", "text": "av", "parent": 95, "children": [], "start_point": {"row": 18, "column": 25}, "end_point": {"row": 18, "column": 27}}, {"id": 98, "type": "declaration", "text": "CC_SFILE *s = (CC_SFILE *) NULL;", "parent": 83, "children": [99, 100], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 36}}, {"id": 99, "type": "type_identifier", "text": "CC_SFILE", "parent": 98, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 12}}, {"id": 100, "type": "init_declarator", "text": "*s = (CC_SFILE *) NULL", "parent": 98, "children": [101, 104, 105], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 35}}, {"id": 101, "type": "pointer_declarator", "text": "*s", "parent": 100, "children": [102, 103], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 15}}, {"id": 102, "type": "*", "text": "*", "parent": 101, "children": [], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 14}}, {"id": 103, "type": "identifier", "text": "s", "parent": 101, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 15}}, {"id": 104, "type": "=", "text": "=", "parent": 100, "children": [], "start_point": {"row": 20, "column": 16}, "end_point": {"row": 20, "column": 17}}, {"id": 105, "type": "cast_expression", "text": "(CC_SFILE *) NULL", "parent": 100, "children": [106, 110], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 35}}, {"id": 106, "type": "type_descriptor", "text": "CC_SFILE *", "parent": 105, "children": [107, 108], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 29}}, {"id": 107, "type": "type_identifier", "text": "CC_SFILE", "parent": 106, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 27}}, {"id": 108, "type": "abstract_pointer_declarator", "text": "*", "parent": 106, "children": [109], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 29}}, {"id": 109, "type": "*", "text": "*", "parent": 108, "children": [], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 29}}, {"id": 110, "type": "null", "text": "NULL", "parent": 105, "children": [111], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 35}}, {"id": 111, "type": "NULL", "text": "NULL", "parent": 110, "children": [], "start_point": {"row": 20, "column": 31}, "end_point": {"row": 20, "column": 35}}, {"id": 112, "type": "declaration", "text": "int rval = 0;", "parent": 83, "children": [113, 114], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 17}}, {"id": 113, "type": "primitive_type", "text": "int", "parent": 112, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 7}}, {"id": 114, "type": "init_declarator", "text": "rval = 0", "parent": 112, "children": [115, 116, 117], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 16}}, {"id": 115, "type": "identifier", "text": "rval", "parent": 114, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 12}}, {"id": 116, "type": "=", "text": "=", "parent": 114, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 14}}, {"id": 117, "type": "number_literal", "text": "0", "parent": 114, "children": [], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 16}}, {"id": 118, "type": "assignment_expression", "text": "rval = parseargs (ac, av)", "parent": 83, "children": [119, 120, 121], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 29}}, {"id": 119, "type": "identifier", "text": "rval", "parent": 118, "children": [], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 8}}, {"id": 120, "type": "=", "text": "=", "parent": 118, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 10}}, {"id": 121, "type": "call_expression", "text": "parseargs (ac, av)", "parent": 118, "children": [122, 123], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 29}}, {"id": 122, "type": "identifier", "text": "parseargs", "parent": 121, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 20}}, {"id": 123, "type": "argument_list", "text": "(ac, av)", "parent": 121, "children": [124, 125], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 29}}, {"id": 124, "type": "identifier", "text": "ac", "parent": 123, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 24}}, {"id": 125, "type": "identifier", "text": "av", "parent": 123, "children": [], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 28}}, {"id": 126, "type": "if_statement", "text": "if (rval) return 0;", "parent": 83, "children": [127, 129], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 23}}, {"id": 127, "type": "parenthesized_expression", "text": "(rval)", "parent": 126, "children": [128], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 13}}, {"id": 128, "type": "identifier", "text": "rval", "parent": 127, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 12}}, {"id": 129, "type": "return_statement", "text": "return 0;", "parent": 126, "children": [130], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 23}}, {"id": 130, "type": "number_literal", "text": "0", "parent": 129, "children": [], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 24, "column": 22}}, {"id": 131, "type": "call_expression", "text": "CCutil_printlabel ()", "parent": 83, "children": [132, 133], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 24}}, {"id": 132, "type": "identifier", "text": "CCutil_printlabel", "parent": 131, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 21}}, {"id": 133, "type": "argument_list", "text": "()", "parent": 131, "children": [], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 24}}, {"id": 134, "type": "assignment_expression", "text": "s = CCutil_snet_open (hostname, CCtsp_DOMINO_PORT)", "parent": 83, "children": [135, 136, 137], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 54}}, {"id": 135, "type": "identifier", "text": "s", "parent": 134, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 5}}, {"id": 136, "type": "=", "text": "=", "parent": 134, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 7}}, {"id": 137, "type": "call_expression", "text": "CCutil_snet_open (hostname, CCtsp_DOMINO_PORT)", "parent": 134, "children": [138, 139], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 54}}, {"id": 138, "type": "identifier", "text": "CCutil_snet_open", "parent": 137, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 24}}, {"id": 139, "type": "argument_list", "text": "(hostname, CCtsp_DOMINO_PORT)", "parent": 137, "children": [140, 141], "start_point": {"row": 28, "column": 25}, "end_point": {"row": 28, "column": 54}}, {"id": 140, "type": "identifier", "text": "hostname", "parent": 139, "children": [], "start_point": {"row": 28, "column": 26}, "end_point": {"row": 28, "column": 34}}, {"id": 141, "type": "identifier", "text": "CCtsp_DOMINO_PORT", "parent": 139, "children": [], "start_point": {"row": 28, "column": 36}, "end_point": {"row": 28, "column": 53}}, {"id": 142, "type": "if_statement", "text": "if (!s) {\n fprintf (stderr, \"CCutil_snet_open failed\\n\");\n rval = 1; goto CLEANUP;\n }", "parent": 83, "children": [143], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 32, "column": 5}}, {"id": 143, "type": "parenthesized_expression", "text": "(!s)", "parent": 142, "children": [144], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 11}}, {"id": 144, "type": "unary_expression", "text": "!s", "parent": 143, "children": [145, 146], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 10}}, {"id": 145, "type": "!", "text": "!", "parent": 144, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 9}}, {"id": 146, "type": "identifier", "text": "s", "parent": 144, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 10}}, {"id": 147, "type": "call_expression", "text": "fprintf (stderr, \"CCutil_snet_open failed\\n\")", "parent": 142, "children": [148, 149], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 53}}, {"id": 148, "type": "identifier", "text": "fprintf", "parent": 147, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 15}}, {"id": 149, "type": "argument_list", "text": "(stderr, \"CCutil_snet_open failed\\n\")", "parent": 147, "children": [150, 151], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 53}}, {"id": 150, "type": "identifier", "text": "stderr", "parent": 149, "children": [], "start_point": {"row": 30, "column": 17}, "end_point": {"row": 30, "column": 23}}, {"id": 151, "type": "string_literal", "text": "\"CCutil_snet_open failed\\n\"", "parent": 149, "children": [152], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 52}}, {"id": 152, "type": "escape_sequence", "text": "\\n", "parent": 151, "children": [], "start_point": {"row": 30, "column": 49}, "end_point": {"row": 30, "column": 51}}, {"id": 153, "type": "assignment_expression", "text": "rval = 1", "parent": 142, "children": [154, 155, 156], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 16}}, {"id": 154, "type": "identifier", "text": "rval", "parent": 153, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 12}}, {"id": 155, "type": "=", "text": "=", "parent": 153, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 14}}, {"id": 156, "type": "number_literal", "text": "1", "parent": 153, "children": [], "start_point": {"row": 31, "column": 15}, "end_point": {"row": 31, "column": 16}}, {"id": 157, "type": "goto_statement", "text": "goto CLEANUP;", "parent": 142, "children": [158, 159], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 32}}, {"id": 158, "type": "goto", "text": "goto", "parent": 157, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 23}}, {"id": 159, "type": "statement_identifier", "text": "CLEANUP", "parent": 157, "children": [], "start_point": {"row": 31, "column": 24}, "end_point": {"row": 31, "column": 31}}, {"id": 160, "type": "if_statement", "text": "if (stopboss) {\n printf (\"stop the boss\\n\"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_EXIT);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (EXIT)\");\n } else if (sendgraph) {\n printf (\"Send graph id = %d\\n\", graphid); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (GRAPH)\");\n rval = CCutil_swrite_int (s, graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n rval = CCutil_swrite_int (s, 2*graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n rval = CCutil_swrite_int (s, 3*graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n } else if (getdominos) {\n printf (\"get the domino list\\n\"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (SEND)\");\n rval = receive_dominos (s);\n CCcheck_rval (rval, \"receive_dominos failed\");\n } else {\n printf (\"Nothing to do.\\n\"); fflush (stdout);\n }", "parent": 83, "children": [161, 185], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 56, "column": 5}}, {"id": 161, "type": "parenthesized_expression", "text": "(stopboss)", "parent": 160, "children": [162], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 17}}, {"id": 162, "type": "identifier", "text": "stopboss", "parent": 161, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 16}}, {"id": 163, "type": "call_expression", "text": "printf (\"stop the boss\\n\")", "parent": 160, "children": [164, 165], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 34}}, {"id": 164, "type": "identifier", "text": "printf", "parent": 163, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 14}}, {"id": 165, "type": "argument_list", "text": "(\"stop the boss\\n\")", "parent": 163, "children": [166], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 34}}, {"id": 166, "type": "string_literal", "text": "\"stop the boss\\n\"", "parent": 165, "children": [167], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 33}}, {"id": 167, "type": "escape_sequence", "text": "\\n", "parent": 166, "children": [], "start_point": {"row": 35, "column": 30}, "end_point": {"row": 35, "column": 32}}, {"id": 168, "type": "call_expression", "text": "fflush (stdout)", "parent": 160, "children": [169, 170], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 52}}, {"id": 169, "type": "identifier", "text": "fflush", "parent": 168, "children": [], "start_point": {"row": 35, "column": 37}, "end_point": {"row": 35, "column": 43}}, {"id": 170, "type": "argument_list", "text": "(stdout)", "parent": 168, "children": [171], "start_point": {"row": 35, "column": 44}, "end_point": {"row": 35, "column": 52}}, {"id": 171, "type": "identifier", "text": "stdout", "parent": 170, "children": [], "start_point": {"row": 35, "column": 45}, "end_point": {"row": 35, "column": 51}}, {"id": 172, "type": "assignment_expression", "text": "rval = CCutil_swrite_char (s, CCtsp_DOMINO_EXIT)", "parent": 160, "children": [173, 174, 175], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 56}}, {"id": 173, "type": "identifier", "text": "rval", "parent": 172, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 12}}, {"id": 174, "type": "=", "text": "=", "parent": 172, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 14}}, {"id": 175, "type": "call_expression", "text": "CCutil_swrite_char (s, CCtsp_DOMINO_EXIT)", "parent": 172, "children": [176, 177], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 56}}, {"id": 176, "type": "identifier", "text": "CCutil_swrite_char", "parent": 175, "children": [], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 33}}, {"id": 177, "type": "argument_list", "text": "(s, CCtsp_DOMINO_EXIT)", "parent": 175, "children": [178, 179], "start_point": {"row": 36, "column": 34}, "end_point": {"row": 36, "column": 56}}, {"id": 178, "type": "identifier", "text": "s", "parent": 177, "children": [], "start_point": {"row": 36, "column": 35}, "end_point": {"row": 36, "column": 36}}, {"id": 179, "type": "identifier", "text": "CCtsp_DOMINO_EXIT", "parent": 177, "children": [], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 55}}, {"id": 180, "type": "call_expression", "text": "CCcheck_rval (rval, \"CCutil_swrite_char failed (EXIT)\")", "parent": 160, "children": [181, 182], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 63}}, {"id": 181, "type": "identifier", "text": "CCcheck_rval", "parent": 180, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 20}}, {"id": 182, "type": "argument_list", "text": "(rval, \"CCutil_swrite_char failed (EXIT)\")", "parent": 180, "children": [183, 184], "start_point": {"row": 37, "column": 21}, "end_point": {"row": 37, "column": 63}}, {"id": 183, "type": "identifier", "text": "rval", "parent": 182, "children": [], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 26}}, {"id": 184, "type": "string_literal", "text": "\"CCutil_swrite_char failed (EXIT)\"", "parent": 182, "children": [], "start_point": {"row": 37, "column": 28}, "end_point": {"row": 37, "column": 62}}, {"id": 185, "type": "else_clause", "text": "else if (sendgraph) {\n printf (\"Send graph id = %d\\n\", graphid); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (GRAPH)\");\n rval = CCutil_swrite_int (s, graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n rval = CCutil_swrite_int (s, 2*graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n rval = CCutil_swrite_int (s, 3*graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n } else if (getdominos) {\n printf (\"get the domino list\\n\"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (SEND)\");\n rval = receive_dominos (s);\n CCcheck_rval (rval, \"receive_dominos failed\");\n } else {\n printf (\"Nothing to do.\\n\"); fflush (stdout);\n }", "parent": 160, "children": [186], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 56, "column": 5}}, {"id": 186, "type": "if_statement", "text": "if (sendgraph) {\n printf (\"Send graph id = %d\\n\", graphid); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (GRAPH)\");\n rval = CCutil_swrite_int (s, graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n rval = CCutil_swrite_int (s, 2*graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n rval = CCutil_swrite_int (s, 3*graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n } else if (getdominos) {\n printf (\"get the domino list\\n\"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (SEND)\");\n rval = receive_dominos (s);\n CCcheck_rval (rval, \"receive_dominos failed\");\n } else {\n printf (\"Nothing to do.\\n\"); fflush (stdout);\n }", "parent": 185, "children": [187, 257], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 56, "column": 5}}, {"id": 187, "type": "parenthesized_expression", "text": "(sendgraph)", "parent": 186, "children": [188], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 25}}, {"id": 188, "type": "identifier", "text": "sendgraph", "parent": 187, "children": [], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 24}}, {"id": 189, "type": "call_expression", "text": "printf (\"Send graph id = %d\\n\", graphid)", "parent": 186, "children": [190, 191], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 48}}, {"id": 190, "type": "identifier", "text": "printf", "parent": 189, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 14}}, {"id": 191, "type": "argument_list", "text": "(\"Send graph id = %d\\n\", graphid)", "parent": 189, "children": [192, 194], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 48}}, {"id": 192, "type": "string_literal", "text": "\"Send graph id = %d\\n\"", "parent": 191, "children": [193], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 38}}, {"id": 193, "type": "escape_sequence", "text": "\\n", "parent": 192, "children": [], "start_point": {"row": 39, "column": 35}, "end_point": {"row": 39, "column": 37}}, {"id": 194, "type": "identifier", "text": "graphid", "parent": 191, "children": [], "start_point": {"row": 39, "column": 40}, "end_point": {"row": 39, "column": 47}}, {"id": 195, "type": "call_expression", "text": "fflush (stdout)", "parent": 186, "children": [196, 197], "start_point": {"row": 39, "column": 51}, "end_point": {"row": 39, "column": 66}}, {"id": 196, "type": "identifier", "text": "fflush", "parent": 195, "children": [], "start_point": {"row": 39, "column": 51}, "end_point": {"row": 39, "column": 57}}, {"id": 197, "type": "argument_list", "text": "(stdout)", "parent": 195, "children": [198], "start_point": {"row": 39, "column": 58}, "end_point": {"row": 39, "column": 66}}, {"id": 198, "type": "identifier", "text": "stdout", "parent": 197, "children": [], "start_point": {"row": 39, "column": 59}, "end_point": {"row": 39, "column": 65}}, {"id": 199, "type": "assignment_expression", "text": "rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH)", "parent": 186, "children": [200, 201, 202], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 57}}, {"id": 200, "type": "identifier", "text": "rval", "parent": 199, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 12}}, {"id": 201, "type": "=", "text": "=", "parent": 199, "children": [], "start_point": {"row": 40, "column": 13}, "end_point": {"row": 40, "column": 14}}, {"id": 202, "type": "call_expression", "text": "CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH)", "parent": 199, "children": [203, 204], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 57}}, {"id": 203, "type": "identifier", "text": "CCutil_swrite_char", "parent": 202, "children": [], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 33}}, {"id": 204, "type": "argument_list", "text": "(s, CCtsp_DOMINO_GRAPH)", "parent": 202, "children": [205, 206], "start_point": {"row": 40, "column": 34}, "end_point": {"row": 40, "column": 57}}, {"id": 205, "type": "identifier", "text": "s", "parent": 204, "children": [], "start_point": {"row": 40, "column": 35}, "end_point": {"row": 40, "column": 36}}, {"id": 206, "type": "identifier", "text": "CCtsp_DOMINO_GRAPH", "parent": 204, "children": [], "start_point": {"row": 40, "column": 38}, "end_point": {"row": 40, "column": 56}}, {"id": 207, "type": "call_expression", "text": "CCcheck_rval (rval, \"CCutil_swrite_char failed (GRAPH)\")", "parent": 186, "children": [208, 209], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 64}}, {"id": 208, "type": "identifier", "text": "CCcheck_rval", "parent": 207, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 20}}, {"id": 209, "type": "argument_list", "text": "(rval, \"CCutil_swrite_char failed (GRAPH)\")", "parent": 207, "children": [210, 211], "start_point": {"row": 41, "column": 21}, "end_point": {"row": 41, "column": 64}}, {"id": 210, "type": "identifier", "text": "rval", "parent": 209, "children": [], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 26}}, {"id": 211, "type": "string_literal", "text": "\"CCutil_swrite_char failed (GRAPH)\"", "parent": 209, "children": [], "start_point": {"row": 41, "column": 28}, "end_point": {"row": 41, "column": 63}}, {"id": 212, "type": "assignment_expression", "text": "rval = CCutil_swrite_int (s, graphid)", "parent": 186, "children": [213, 214, 215], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 45}}, {"id": 213, "type": "identifier", "text": "rval", "parent": 212, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 12}}, {"id": 214, "type": "=", "text": "=", "parent": 212, "children": [], "start_point": {"row": 42, "column": 13}, "end_point": {"row": 42, "column": 14}}, {"id": 215, "type": "call_expression", "text": "CCutil_swrite_int (s, graphid)", "parent": 212, "children": [216, 217], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 45}}, {"id": 216, "type": "identifier", "text": "CCutil_swrite_int", "parent": 215, "children": [], "start_point": {"row": 42, "column": 15}, "end_point": {"row": 42, "column": 32}}, {"id": 217, "type": "argument_list", "text": "(s, graphid)", "parent": 215, "children": [218, 219], "start_point": {"row": 42, "column": 33}, "end_point": {"row": 42, "column": 45}}, {"id": 218, "type": "identifier", "text": "s", "parent": 217, "children": [], "start_point": {"row": 42, "column": 34}, "end_point": {"row": 42, "column": 35}}, {"id": 219, "type": "identifier", "text": "graphid", "parent": 217, "children": [], "start_point": {"row": 42, "column": 37}, "end_point": {"row": 42, "column": 44}}, {"id": 220, "type": "call_expression", "text": "CCcheck_rval (rval, \"CCutil_swrite_int failed\")", "parent": 186, "children": [221, 222], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 55}}, {"id": 221, "type": "identifier", "text": "CCcheck_rval", "parent": 220, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 20}}, {"id": 222, "type": "argument_list", "text": "(rval, \"CCutil_swrite_int failed\")", "parent": 220, "children": [223, 224], "start_point": {"row": 43, "column": 21}, "end_point": {"row": 43, "column": 55}}, {"id": 223, "type": "identifier", "text": "rval", "parent": 222, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 26}}, {"id": 224, "type": "string_literal", "text": "\"CCutil_swrite_int failed\"", "parent": 222, "children": [], "start_point": {"row": 43, "column": 28}, "end_point": {"row": 43, "column": 54}}, {"id": 225, "type": "assignment_expression", "text": "rval = CCutil_swrite_int (s, 2*graphid)", "parent": 186, "children": [226, 227, 228], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 47}}, {"id": 226, "type": "identifier", "text": "rval", "parent": 225, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 12}}, {"id": 227, "type": "=", "text": "=", "parent": 225, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 14}}, {"id": 228, "type": "call_expression", "text": "CCutil_swrite_int (s, 2*graphid)", "parent": 225, "children": [229, 230], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 47}}, {"id": 229, "type": "identifier", "text": "CCutil_swrite_int", "parent": 228, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 32}}, {"id": 230, "type": "argument_list", "text": "(s, 2*graphid)", "parent": 228, "children": [231, 232], "start_point": {"row": 44, "column": 33}, "end_point": {"row": 44, "column": 47}}, {"id": 231, "type": "identifier", "text": "s", "parent": 230, "children": [], "start_point": {"row": 44, "column": 34}, "end_point": {"row": 44, "column": 35}}, {"id": 232, "type": "binary_expression", "text": "2*graphid", "parent": 230, "children": [233, 234, 235], "start_point": {"row": 44, "column": 37}, "end_point": {"row": 44, "column": 46}}, {"id": 233, "type": "number_literal", "text": "2", "parent": 232, "children": [], "start_point": {"row": 44, "column": 37}, "end_point": {"row": 44, "column": 38}}, {"id": 234, "type": "*", "text": "*", "parent": 232, "children": [], "start_point": {"row": 44, "column": 38}, "end_point": {"row": 44, "column": 39}}, {"id": 235, "type": "identifier", "text": "graphid", "parent": 232, "children": [], "start_point": {"row": 44, "column": 39}, "end_point": {"row": 44, "column": 46}}, {"id": 236, "type": "call_expression", "text": "CCcheck_rval (rval, \"CCutil_swrite_int failed\")", "parent": 186, "children": [237, 238], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 55}}, {"id": 237, "type": "identifier", "text": "CCcheck_rval", "parent": 236, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 20}}, {"id": 238, "type": "argument_list", "text": "(rval, \"CCutil_swrite_int failed\")", "parent": 236, "children": [239, 240], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 55}}, {"id": 239, "type": "identifier", "text": "rval", "parent": 238, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 26}}, {"id": 240, "type": "string_literal", "text": "\"CCutil_swrite_int failed\"", "parent": 238, "children": [], "start_point": {"row": 45, "column": 28}, "end_point": {"row": 45, "column": 54}}, {"id": 241, "type": "assignment_expression", "text": "rval = CCutil_swrite_int (s, 3*graphid)", "parent": 186, "children": [242, 243, 244], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 47}}, {"id": 242, "type": "identifier", "text": "rval", "parent": 241, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 12}}, {"id": 243, "type": "=", "text": "=", "parent": 241, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 14}}, {"id": 244, "type": "call_expression", "text": "CCutil_swrite_int (s, 3*graphid)", "parent": 241, "children": [245, 246], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 47}}, {"id": 245, "type": "identifier", "text": "CCutil_swrite_int", "parent": 244, "children": [], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 32}}, {"id": 246, "type": "argument_list", "text": "(s, 3*graphid)", "parent": 244, "children": [247, 248], "start_point": {"row": 46, "column": 33}, "end_point": {"row": 46, "column": 47}}, {"id": 247, "type": "identifier", "text": "s", "parent": 246, "children": [], "start_point": {"row": 46, "column": 34}, "end_point": {"row": 46, "column": 35}}, {"id": 248, "type": "binary_expression", "text": "3*graphid", "parent": 246, "children": [249, 250, 251], "start_point": {"row": 46, "column": 37}, "end_point": {"row": 46, "column": 46}}, {"id": 249, "type": "number_literal", "text": "3", "parent": 248, "children": [], "start_point": {"row": 46, "column": 37}, "end_point": {"row": 46, "column": 38}}, {"id": 250, "type": "*", "text": "*", "parent": 248, "children": [], "start_point": {"row": 46, "column": 38}, "end_point": {"row": 46, "column": 39}}, {"id": 251, "type": "identifier", "text": "graphid", "parent": 248, "children": [], "start_point": {"row": 46, "column": 39}, "end_point": {"row": 46, "column": 46}}, {"id": 252, "type": "call_expression", "text": "CCcheck_rval (rval, \"CCutil_swrite_int failed\")", "parent": 186, "children": [253, 254], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 55}}, {"id": 253, "type": "identifier", "text": "CCcheck_rval", "parent": 252, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 20}}, {"id": 254, "type": "argument_list", "text": "(rval, \"CCutil_swrite_int failed\")", "parent": 252, "children": [255, 256], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 55}}, {"id": 255, "type": "identifier", "text": "rval", "parent": 254, "children": [], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 26}}, {"id": 256, "type": "string_literal", "text": "\"CCutil_swrite_int failed\"", "parent": 254, "children": [], "start_point": {"row": 47, "column": 28}, "end_point": {"row": 47, "column": 54}}, {"id": 257, "type": "else_clause", "text": "else if (getdominos) {\n printf (\"get the domino list\\n\"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (SEND)\");\n rval = receive_dominos (s);\n CCcheck_rval (rval, \"receive_dominos failed\");\n } else {\n printf (\"Nothing to do.\\n\"); fflush (stdout);\n }", "parent": 186, "children": [258], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 56, "column": 5}}, {"id": 258, "type": "if_statement", "text": "if (getdominos) {\n printf (\"get the domino list\\n\"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (SEND)\");\n rval = receive_dominos (s);\n CCcheck_rval (rval, \"receive_dominos failed\");\n } else {\n printf (\"Nothing to do.\\n\"); fflush (stdout);\n }", "parent": 257, "children": [259, 295], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 56, "column": 5}}, {"id": 259, "type": "parenthesized_expression", "text": "(getdominos)", "parent": 258, "children": [260], "start_point": {"row": 48, "column": 14}, "end_point": {"row": 48, "column": 26}}, {"id": 260, "type": "identifier", "text": "getdominos", "parent": 259, "children": [], "start_point": {"row": 48, "column": 15}, "end_point": {"row": 48, "column": 25}}, {"id": 261, "type": "call_expression", "text": "printf (\"get the domino list\\n\")", "parent": 258, "children": [262, 263], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 40}}, {"id": 262, "type": "identifier", "text": "printf", "parent": 261, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 14}}, {"id": 263, "type": "argument_list", "text": "(\"get the domino list\\n\")", "parent": 261, "children": [264], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 40}}, {"id": 264, "type": "string_literal", "text": "\"get the domino list\\n\"", "parent": 263, "children": [265], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 39}}, {"id": 265, "type": "escape_sequence", "text": "\\n", "parent": 264, "children": [], "start_point": {"row": 49, "column": 36}, "end_point": {"row": 49, "column": 38}}, {"id": 266, "type": "call_expression", "text": "fflush (stdout)", "parent": 258, "children": [267, 268], "start_point": {"row": 49, "column": 43}, "end_point": {"row": 49, "column": 58}}, {"id": 267, "type": "identifier", "text": "fflush", "parent": 266, "children": [], "start_point": {"row": 49, "column": 43}, "end_point": {"row": 49, "column": 49}}, {"id": 268, "type": "argument_list", "text": "(stdout)", "parent": 266, "children": [269], "start_point": {"row": 49, "column": 50}, "end_point": {"row": 49, "column": 58}}, {"id": 269, "type": "identifier", "text": "stdout", "parent": 268, "children": [], "start_point": {"row": 49, "column": 51}, "end_point": {"row": 49, "column": 57}}, {"id": 270, "type": "assignment_expression", "text": "rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND)", "parent": 258, "children": [271, 272, 273], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 56}}, {"id": 271, "type": "identifier", "text": "rval", "parent": 270, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 12}}, {"id": 272, "type": "=", "text": "=", "parent": 270, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 14}}, {"id": 273, "type": "call_expression", "text": "CCutil_swrite_char (s, CCtsp_DOMINO_SEND)", "parent": 270, "children": [274, 275], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 56}}, {"id": 274, "type": "identifier", "text": "CCutil_swrite_char", "parent": 273, "children": [], "start_point": {"row": 50, "column": 15}, "end_point": {"row": 50, "column": 33}}, {"id": 275, "type": "argument_list", "text": "(s, CCtsp_DOMINO_SEND)", "parent": 273, "children": [276, 277], "start_point": {"row": 50, "column": 34}, "end_point": {"row": 50, "column": 56}}, {"id": 276, "type": "identifier", "text": "s", "parent": 275, "children": [], "start_point": {"row": 50, "column": 35}, "end_point": {"row": 50, "column": 36}}, {"id": 277, "type": "identifier", "text": "CCtsp_DOMINO_SEND", "parent": 275, "children": [], "start_point": {"row": 50, "column": 38}, "end_point": {"row": 50, "column": 55}}, {"id": 278, "type": "call_expression", "text": "CCcheck_rval (rval, \"CCutil_swrite_char failed (SEND)\")", "parent": 258, "children": [279, 280], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 63}}, {"id": 279, "type": "identifier", "text": "CCcheck_rval", "parent": 278, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 20}}, {"id": 280, "type": "argument_list", "text": "(rval, \"CCutil_swrite_char failed (SEND)\")", "parent": 278, "children": [281, 282], "start_point": {"row": 51, "column": 21}, "end_point": {"row": 51, "column": 63}}, {"id": 281, "type": "identifier", "text": "rval", "parent": 280, "children": [], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 26}}, {"id": 282, "type": "string_literal", "text": "\"CCutil_swrite_char failed (SEND)\"", "parent": 280, "children": [], "start_point": {"row": 51, "column": 28}, "end_point": {"row": 51, "column": 62}}, {"id": 283, "type": "assignment_expression", "text": "rval = receive_dominos (s)", "parent": 258, "children": [284, 285, 286], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 34}}, {"id": 284, "type": "identifier", "text": "rval", "parent": 283, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 12}}, {"id": 285, "type": "=", "text": "=", "parent": 283, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 14}}, {"id": 286, "type": "call_expression", "text": "receive_dominos (s)", "parent": 283, "children": [287, 288], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 34}}, {"id": 287, "type": "identifier", "text": "receive_dominos", "parent": 286, "children": [], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 30}}, {"id": 288, "type": "argument_list", "text": "(s)", "parent": 286, "children": [289], "start_point": {"row": 52, "column": 31}, "end_point": {"row": 52, "column": 34}}, {"id": 289, "type": "identifier", "text": "s", "parent": 288, "children": [], "start_point": {"row": 52, "column": 32}, "end_point": {"row": 52, "column": 33}}, {"id": 290, "type": "call_expression", "text": "CCcheck_rval (rval, \"receive_dominos failed\")", "parent": 258, "children": [291, 292], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 53}}, {"id": 291, "type": "identifier", "text": "CCcheck_rval", "parent": 290, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 20}}, {"id": 292, "type": "argument_list", "text": "(rval, \"receive_dominos failed\")", "parent": 290, "children": [293, 294], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 53}}, {"id": 293, "type": "identifier", "text": "rval", "parent": 292, "children": [], "start_point": {"row": 53, "column": 22}, "end_point": {"row": 53, "column": 26}}, {"id": 294, "type": "string_literal", "text": "\"receive_dominos failed\"", "parent": 292, "children": [], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 52}}, {"id": 295, "type": "else_clause", "text": "else {\n printf (\"Nothing to do.\\n\"); fflush (stdout);\n }", "parent": 258, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 56, "column": 5}}, {"id": 296, "type": "call_expression", "text": "printf (\"Nothing to do.\\n\")", "parent": 295, "children": [297, 298], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 35}}, {"id": 297, "type": "identifier", "text": "printf", "parent": 296, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 14}}, {"id": 298, "type": "argument_list", "text": "(\"Nothing to do.\\n\")", "parent": 296, "children": [299], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 35}}, {"id": 299, "type": "string_literal", "text": "\"Nothing to do.\\n\"", "parent": 298, "children": [300], "start_point": {"row": 55, "column": 16}, "end_point": {"row": 55, "column": 34}}, {"id": 300, "type": "escape_sequence", "text": "\\n", "parent": 299, "children": [], "start_point": {"row": 55, "column": 31}, "end_point": {"row": 55, "column": 33}}, {"id": 301, "type": "call_expression", "text": "fflush (stdout)", "parent": 295, "children": [302, 303], "start_point": {"row": 55, "column": 37}, "end_point": {"row": 55, "column": 52}}, {"id": 302, "type": "identifier", "text": "fflush", "parent": 301, "children": [], "start_point": {"row": 55, "column": 37}, "end_point": {"row": 55, "column": 43}}, {"id": 303, "type": "argument_list", "text": "(stdout)", "parent": 301, "children": [304], "start_point": {"row": 55, "column": 44}, "end_point": {"row": 55, "column": 52}}, {"id": 304, "type": "identifier", "text": "stdout", "parent": 303, "children": [], "start_point": {"row": 55, "column": 45}, "end_point": {"row": 55, "column": 51}}, {"id": 305, "type": "labeled_statement", "text": "CLEANUP:\n\n if (s) CCutil_sclose (s);", "parent": 83, "children": [306, 307], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 60, "column": 29}}, {"id": 306, "type": "statement_identifier", "text": "CLEANUP", "parent": 305, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 7}}, {"id": 307, "type": "if_statement", "text": "if (s) CCutil_sclose (s);", "parent": 305, "children": [308], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 29}}, {"id": 308, "type": "parenthesized_expression", "text": "(s)", "parent": 307, "children": [309], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 10}}, {"id": 309, "type": "identifier", "text": "s", "parent": 308, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 9}}, {"id": 310, "type": "call_expression", "text": "CCutil_sclose (s)", "parent": 307, "children": [311, 312], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 28}}, {"id": 311, "type": "identifier", "text": "CCutil_sclose", "parent": 310, "children": [], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 24}}, {"id": 312, "type": "argument_list", "text": "(s)", "parent": 310, "children": [313], "start_point": {"row": 60, "column": 25}, "end_point": {"row": 60, "column": 28}}, {"id": 313, "type": "identifier", "text": "s", "parent": 312, "children": [], "start_point": {"row": 60, "column": 26}, "end_point": {"row": 60, "column": 27}}, {"id": 314, "type": "return_statement", "text": "return rval;", "parent": 83, "children": [315], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 16}}, {"id": 315, "type": "identifier", "text": "rval", "parent": 314, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 15}}, {"id": 316, "type": "function_definition", "text": "static int parseargs (int ac, char **av)\n{\n int c; \n int boptind = 1;\n char *boptarg = (char *) NULL;\n\n while ((c = CCutil_bix_getopt (ac, av, \"xg:d\", &boptind, &boptarg)) != EOF) {\n switch (c) { \n case 'x':\n stopboss = 1;\n break;\n case 'g': \n sendgraph = 1;\n graphid = atoi(boptarg);\n break; \n case 'd': \n getdominos = 1;\n break;\n default:\n usage (av[0]);\n return 1;\n }\n }\n\n if (boptind >= ac) {\n usage (av[0]);\n return 1;\n }\n hostname = av[boptind++];\n if (boptind != ac) {\n usage (av[0]);\n return 1;\n }\n\n return 0;\n}", "parent": null, "children": [317, 318], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 99, "column": 1}}, {"id": 317, "type": "primitive_type", "text": "int", "parent": 316, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 10}}, {"id": 318, "type": "function_declarator", "text": "parseargs (int ac, char **av)", "parent": 316, "children": [319, 320], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 40}}, {"id": 319, "type": "identifier", "text": "parseargs", "parent": 318, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 20}}, {"id": 320, "type": "parameter_list", "text": "(int ac, char **av)", "parent": 318, "children": [321, 324], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 64, "column": 40}}, {"id": 321, "type": "parameter_declaration", "text": "int ac", "parent": 320, "children": [322, 323], "start_point": {"row": 64, "column": 22}, "end_point": {"row": 64, "column": 28}}, {"id": 322, "type": "primitive_type", "text": "int", "parent": 321, "children": [], "start_point": {"row": 64, "column": 22}, "end_point": {"row": 64, "column": 25}}, {"id": 323, "type": "identifier", "text": "ac", "parent": 321, "children": [], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 28}}, {"id": 324, "type": "parameter_declaration", "text": "char **av", "parent": 320, "children": [325, 326], "start_point": {"row": 64, "column": 30}, "end_point": {"row": 64, "column": 39}}, {"id": 325, "type": "primitive_type", "text": "char", "parent": 324, "children": [], "start_point": {"row": 64, "column": 30}, "end_point": {"row": 64, "column": 34}}, {"id": 326, "type": "pointer_declarator", "text": "**av", "parent": 324, "children": [327, 328], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 39}}, {"id": 327, "type": "*", "text": "*", "parent": 326, "children": [], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 36}}, {"id": 328, "type": "pointer_declarator", "text": "*av", "parent": 326, "children": [329, 330], "start_point": {"row": 64, "column": 36}, "end_point": {"row": 64, "column": 39}}, {"id": 329, "type": "*", "text": "*", "parent": 328, "children": [], "start_point": {"row": 64, "column": 36}, "end_point": {"row": 64, "column": 37}}, {"id": 330, "type": "identifier", "text": "av", "parent": 328, "children": [], "start_point": {"row": 64, "column": 37}, "end_point": {"row": 64, "column": 39}}, {"id": 331, "type": "declaration", "text": "int c;", "parent": 316, "children": [332, 333], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 10}}, {"id": 332, "type": "primitive_type", "text": "int", "parent": 331, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 7}}, {"id": 333, "type": "identifier", "text": "c", "parent": 331, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 9}}, {"id": 334, "type": "declaration", "text": "int boptind = 1;", "parent": 316, "children": [335, 336], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 20}}, {"id": 335, "type": "primitive_type", "text": "int", "parent": 334, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 7}}, {"id": 336, "type": "init_declarator", "text": "boptind = 1", "parent": 334, "children": [337, 338, 339], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 19}}, {"id": 337, "type": "identifier", "text": "boptind", "parent": 336, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 15}}, {"id": 338, "type": "=", "text": "=", "parent": 336, "children": [], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 17}}, {"id": 339, "type": "number_literal", "text": "1", "parent": 336, "children": [], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 19}}, {"id": 340, "type": "declaration", "text": "char *boptarg = (char *) NULL;", "parent": 316, "children": [341, 342], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 34}}, {"id": 341, "type": "primitive_type", "text": "char", "parent": 340, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 8}}, {"id": 342, "type": "init_declarator", "text": "*boptarg = (char *) NULL", "parent": 340, "children": [343, 346, 347], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 33}}, {"id": 343, "type": "pointer_declarator", "text": "*boptarg", "parent": 342, "children": [344, 345], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 17}}, {"id": 344, "type": "*", "text": "*", "parent": 343, "children": [], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 10}}, {"id": 345, "type": "identifier", "text": "boptarg", "parent": 343, "children": [], "start_point": {"row": 68, "column": 10}, "end_point": {"row": 68, "column": 17}}, {"id": 346, "type": "=", "text": "=", "parent": 342, "children": [], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 19}}, {"id": 347, "type": "cast_expression", "text": "(char *) NULL", "parent": 342, "children": [348, 352], "start_point": {"row": 68, "column": 20}, "end_point": {"row": 68, "column": 33}}, {"id": 348, "type": "type_descriptor", "text": "char *", "parent": 347, "children": [349, 350], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 27}}, {"id": 349, "type": "primitive_type", "text": "char", "parent": 348, "children": [], "start_point": {"row": 68, "column": 21}, "end_point": {"row": 68, "column": 25}}, {"id": 350, "type": "abstract_pointer_declarator", "text": "*", "parent": 348, "children": [351], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 27}}, {"id": 351, "type": "*", "text": "*", "parent": 350, "children": [], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 27}}, {"id": 352, "type": "null", "text": "NULL", "parent": 347, "children": [353], "start_point": {"row": 68, "column": 29}, "end_point": {"row": 68, "column": 33}}, {"id": 353, "type": "NULL", "text": "NULL", "parent": 352, "children": [], "start_point": {"row": 68, "column": 29}, "end_point": {"row": 68, "column": 33}}, {"id": 354, "type": "while_statement", "text": "while ((c = CCutil_bix_getopt (ac, av, \"xg:d\", &boptind, &boptarg)) != EOF) {\n switch (c) { \n case 'x':\n stopboss = 1;\n break;\n case 'g': \n sendgraph = 1;\n graphid = atoi(boptarg);\n break; \n case 'd': \n getdominos = 1;\n break;\n default:\n usage (av[0]);\n return 1;\n }\n }", "parent": 316, "children": [355], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 86, "column": 5}}, {"id": 355, "type": "parenthesized_expression", "text": "((c = CCutil_bix_getopt (ac, av, \"xg:d\", &boptind, &boptarg)) != EOF)", "parent": 354, "children": [356], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 79}}, {"id": 356, "type": "binary_expression", "text": "(c = CCutil_bix_getopt (ac, av, \"xg:d\", &boptind, &boptarg)) != EOF", "parent": 355, "children": [357, 371, 372], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 78}}, {"id": 357, "type": "parenthesized_expression", "text": "(c = CCutil_bix_getopt (ac, av, \"xg:d\", &boptind, &boptarg))", "parent": 356, "children": [358], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 71}}, {"id": 358, "type": "assignment_expression", "text": "c = CCutil_bix_getopt (ac, av, \"xg:d\", &boptind, &boptarg)", "parent": 357, "children": [359, 360, 361], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 70}}, {"id": 359, "type": "identifier", "text": "c", "parent": 358, "children": [], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 13}}, {"id": 360, "type": "=", "text": "=", "parent": 358, "children": [], "start_point": {"row": 70, "column": 14}, "end_point": {"row": 70, "column": 15}}, {"id": 361, "type": "call_expression", "text": "CCutil_bix_getopt (ac, av, \"xg:d\", &boptind, &boptarg)", "parent": 358, "children": [362, 363], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 70}}, {"id": 362, "type": "identifier", "text": "CCutil_bix_getopt", "parent": 361, "children": [], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 33}}, {"id": 363, "type": "argument_list", "text": "(ac, av, \"xg:d\", &boptind, &boptarg)", "parent": 361, "children": [364, 365, 366, 367, 369], "start_point": {"row": 70, "column": 34}, "end_point": {"row": 70, "column": 70}}, {"id": 364, "type": "identifier", "text": "ac", "parent": 363, "children": [], "start_point": {"row": 70, "column": 35}, "end_point": {"row": 70, "column": 37}}, {"id": 365, "type": "identifier", "text": "av", "parent": 363, "children": [], "start_point": {"row": 70, "column": 39}, "end_point": {"row": 70, "column": 41}}, {"id": 366, "type": "string_literal", "text": "\"xg:d\"", "parent": 363, "children": [], "start_point": {"row": 70, "column": 43}, "end_point": {"row": 70, "column": 49}}, {"id": 367, "type": "pointer_expression", "text": "&boptind", "parent": 363, "children": [368], "start_point": {"row": 70, "column": 51}, "end_point": {"row": 70, "column": 59}}, {"id": 368, "type": "identifier", "text": "boptind", "parent": 367, "children": [], "start_point": {"row": 70, "column": 52}, "end_point": {"row": 70, "column": 59}}, {"id": 369, "type": "pointer_expression", "text": "&boptarg", "parent": 363, "children": [370], "start_point": {"row": 70, "column": 61}, "end_point": {"row": 70, "column": 69}}, {"id": 370, "type": "identifier", "text": "boptarg", "parent": 369, "children": [], "start_point": {"row": 70, "column": 62}, "end_point": {"row": 70, "column": 69}}, {"id": 371, "type": "!=", "text": "!=", "parent": 356, "children": [], "start_point": {"row": 70, "column": 72}, "end_point": {"row": 70, "column": 74}}, {"id": 372, "type": "identifier", "text": "EOF", "parent": 356, "children": [], "start_point": {"row": 70, "column": 75}, "end_point": {"row": 70, "column": 78}}, {"id": 373, "type": "switch_statement", "text": "switch (c) { \n case 'x':\n stopboss = 1;\n break;\n case 'g': \n sendgraph = 1;\n graphid = atoi(boptarg);\n break; \n case 'd': \n getdominos = 1;\n break;\n default:\n usage (av[0]);\n return 1;\n }", "parent": 354, "children": [374, 375], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 85, "column": 9}}, {"id": 374, "type": "switch", "text": "switch", "parent": 373, "children": [], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 14}}, {"id": 375, "type": "parenthesized_expression", "text": "(c)", "parent": 373, "children": [376], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 18}}, {"id": 376, "type": "identifier", "text": "c", "parent": 375, "children": [], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 17}}, {"id": 377, "type": "case_statement", "text": "case 'x':\n stopboss = 1;\n break;", "parent": 373, "children": [378, 379, 387], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 74, "column": 18}}, {"id": 378, "type": "case", "text": "case", "parent": 377, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 12}}, {"id": 379, "type": "char_literal", "text": "'x'", "parent": 377, "children": [380, 381, 382], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 16}}, {"id": 380, "type": "'", "text": "'", "parent": 379, "children": [], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 14}}, {"id": 381, "type": "character", "text": "x", "parent": 379, "children": [], "start_point": {"row": 72, "column": 14}, "end_point": {"row": 72, "column": 15}}, {"id": 382, "type": "'", "text": "'", "parent": 379, "children": [], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 16}}, {"id": 383, "type": "assignment_expression", "text": "stopboss = 1", "parent": 377, "children": [384, 385, 386], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 24}}, {"id": 384, "type": "identifier", "text": "stopboss", "parent": 383, "children": [], "start_point": {"row": 73, "column": 12}, "end_point": {"row": 73, "column": 20}}, {"id": 385, "type": "=", "text": "=", "parent": 383, "children": [], "start_point": {"row": 73, "column": 21}, "end_point": {"row": 73, "column": 22}}, {"id": 386, "type": "number_literal", "text": "1", "parent": 383, "children": [], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 24}}, {"id": 387, "type": "break_statement", "text": "break;", "parent": 377, "children": [388], "start_point": {"row": 74, "column": 12}, "end_point": {"row": 74, "column": 18}}, {"id": 388, "type": "break", "text": "break", "parent": 387, "children": [], "start_point": {"row": 74, "column": 12}, "end_point": {"row": 74, "column": 17}}, {"id": 389, "type": "case_statement", "text": "case 'g': \n sendgraph = 1;\n graphid = atoi(boptarg);\n break;", "parent": 373, "children": [390, 391, 406], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 78, "column": 18}}, {"id": 390, "type": "case", "text": "case", "parent": 389, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 12}}, {"id": 391, "type": "char_literal", "text": "'g'", "parent": 389, "children": [392, 393, 394], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 16}}, {"id": 392, "type": "'", "text": "'", "parent": 391, "children": [], "start_point": {"row": 75, "column": 13}, "end_point": {"row": 75, "column": 14}}, {"id": 393, "type": "character", "text": "g", "parent": 391, "children": [], "start_point": {"row": 75, "column": 14}, "end_point": {"row": 75, "column": 15}}, {"id": 394, "type": "'", "text": "'", "parent": 391, "children": [], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 16}}, {"id": 395, "type": "assignment_expression", "text": "sendgraph = 1", "parent": 389, "children": [396, 397, 398], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 25}}, {"id": 396, "type": "identifier", "text": "sendgraph", "parent": 395, "children": [], "start_point": {"row": 76, "column": 12}, "end_point": {"row": 76, "column": 21}}, {"id": 397, "type": "=", "text": "=", "parent": 395, "children": [], "start_point": {"row": 76, "column": 22}, "end_point": {"row": 76, "column": 23}}, {"id": 398, "type": "number_literal", "text": "1", "parent": 395, "children": [], "start_point": {"row": 76, "column": 24}, "end_point": {"row": 76, "column": 25}}, {"id": 399, "type": "assignment_expression", "text": "graphid = atoi(boptarg)", "parent": 389, "children": [400, 401, 402], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 35}}, {"id": 400, "type": "identifier", "text": "graphid", "parent": 399, "children": [], "start_point": {"row": 77, "column": 12}, "end_point": {"row": 77, "column": 19}}, {"id": 401, "type": "=", "text": "=", "parent": 399, "children": [], "start_point": {"row": 77, "column": 20}, "end_point": {"row": 77, "column": 21}}, {"id": 402, "type": "call_expression", "text": "atoi(boptarg)", "parent": 399, "children": [403, 404], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 35}}, {"id": 403, "type": "identifier", "text": "atoi", "parent": 402, "children": [], "start_point": {"row": 77, "column": 22}, "end_point": {"row": 77, "column": 26}}, {"id": 404, "type": "argument_list", "text": "(boptarg)", "parent": 402, "children": [405], "start_point": {"row": 77, "column": 26}, "end_point": {"row": 77, "column": 35}}, {"id": 405, "type": "identifier", "text": "boptarg", "parent": 404, "children": [], "start_point": {"row": 77, "column": 27}, "end_point": {"row": 77, "column": 34}}, {"id": 406, "type": "break_statement", "text": "break;", "parent": 389, "children": [407], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 18}}, {"id": 407, "type": "break", "text": "break", "parent": 406, "children": [], "start_point": {"row": 78, "column": 12}, "end_point": {"row": 78, "column": 17}}, {"id": 408, "type": "case_statement", "text": "case 'd': \n getdominos = 1;\n break;", "parent": 373, "children": [409, 410, 418], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 81, "column": 18}}, {"id": 409, "type": "case", "text": "case", "parent": 408, "children": [], "start_point": {"row": 79, "column": 8}, "end_point": {"row": 79, "column": 12}}, {"id": 410, "type": "char_literal", "text": "'d'", "parent": 408, "children": [411, 412, 413], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 16}}, {"id": 411, "type": "'", "text": "'", "parent": 410, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 14}}, {"id": 412, "type": "character", "text": "d", "parent": 410, "children": [], "start_point": {"row": 79, "column": 14}, "end_point": {"row": 79, "column": 15}}, {"id": 413, "type": "'", "text": "'", "parent": 410, "children": [], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 16}}, {"id": 414, "type": "assignment_expression", "text": "getdominos = 1", "parent": 408, "children": [415, 416, 417], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 26}}, {"id": 415, "type": "identifier", "text": "getdominos", "parent": 414, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 22}}, {"id": 416, "type": "=", "text": "=", "parent": 414, "children": [], "start_point": {"row": 80, "column": 23}, "end_point": {"row": 80, "column": 24}}, {"id": 417, "type": "number_literal", "text": "1", "parent": 414, "children": [], "start_point": {"row": 80, "column": 25}, "end_point": {"row": 80, "column": 26}}, {"id": 418, "type": "break_statement", "text": "break;", "parent": 408, "children": [419], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 18}}, {"id": 419, "type": "break", "text": "break", "parent": 418, "children": [], "start_point": {"row": 81, "column": 12}, "end_point": {"row": 81, "column": 17}}, {"id": 420, "type": "case_statement", "text": "default:\n usage (av[0]);\n return 1;", "parent": 373, "children": [421, 428], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 84, "column": 21}}, {"id": 421, "type": "default", "text": "default", "parent": 420, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 15}}, {"id": 422, "type": "call_expression", "text": "usage (av[0])", "parent": 420, "children": [423, 424], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 25}}, {"id": 423, "type": "identifier", "text": "usage", "parent": 422, "children": [], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 17}}, {"id": 424, "type": "argument_list", "text": "(av[0])", "parent": 422, "children": [425], "start_point": {"row": 83, "column": 18}, "end_point": {"row": 83, "column": 25}}, {"id": 425, "type": "subscript_expression", "text": "av[0]", "parent": 424, "children": [426, 427], "start_point": {"row": 83, "column": 19}, "end_point": {"row": 83, "column": 24}}, {"id": 426, "type": "identifier", "text": "av", "parent": 425, "children": [], "start_point": {"row": 83, "column": 19}, "end_point": {"row": 83, "column": 21}}, {"id": 427, "type": "number_literal", "text": "0", "parent": 425, "children": [], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 23}}, {"id": 428, "type": "return_statement", "text": "return 1;", "parent": 420, "children": [429], "start_point": {"row": 84, "column": 12}, "end_point": {"row": 84, "column": 21}}, {"id": 429, "type": "number_literal", "text": "1", "parent": 428, "children": [], "start_point": {"row": 84, "column": 19}, "end_point": {"row": 84, "column": 20}}, {"id": 430, "type": "if_statement", "text": "if (boptind >= ac) {\n usage (av[0]);\n return 1;\n }", "parent": 316, "children": [431], "start_point": {"row": 88, "column": 4}, "end_point": {"row": 91, "column": 5}}, {"id": 431, "type": "parenthesized_expression", "text": "(boptind >= ac)", "parent": 430, "children": [432], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 22}}, {"id": 432, "type": "binary_expression", "text": "boptind >= ac", "parent": 431, "children": [433, 434, 435], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 21}}, {"id": 433, "type": "identifier", "text": "boptind", "parent": 432, "children": [], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 15}}, {"id": 434, "type": ">=", "text": ">=", "parent": 432, "children": [], "start_point": {"row": 88, "column": 16}, "end_point": {"row": 88, "column": 18}}, {"id": 435, "type": "identifier", "text": "ac", "parent": 432, "children": [], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 21}}, {"id": 436, "type": "call_expression", "text": "usage (av[0])", "parent": 430, "children": [437, 438], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 21}}, {"id": 437, "type": "identifier", "text": "usage", "parent": 436, "children": [], "start_point": {"row": 89, "column": 8}, "end_point": {"row": 89, "column": 13}}, {"id": 438, "type": "argument_list", "text": "(av[0])", "parent": 436, "children": [439], "start_point": {"row": 89, "column": 14}, "end_point": {"row": 89, "column": 21}}, {"id": 439, "type": "subscript_expression", "text": "av[0]", "parent": 438, "children": [440, 441], "start_point": {"row": 89, "column": 15}, "end_point": {"row": 89, "column": 20}}, {"id": 440, "type": "identifier", "text": "av", "parent": 439, "children": [], "start_point": {"row": 89, "column": 15}, "end_point": {"row": 89, "column": 17}}, {"id": 441, "type": "number_literal", "text": "0", "parent": 439, "children": [], "start_point": {"row": 89, "column": 18}, "end_point": {"row": 89, "column": 19}}, {"id": 442, "type": "return_statement", "text": "return 1;", "parent": 430, "children": [443], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 17}}, {"id": 443, "type": "number_literal", "text": "1", "parent": 442, "children": [], "start_point": {"row": 90, "column": 15}, "end_point": {"row": 90, "column": 16}}, {"id": 444, "type": "assignment_expression", "text": "hostname = av[boptind++]", "parent": 316, "children": [445, 446, 447], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 28}}, {"id": 445, "type": "identifier", "text": "hostname", "parent": 444, "children": [], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 12}}, {"id": 446, "type": "=", "text": "=", "parent": 444, "children": [], "start_point": {"row": 92, "column": 13}, "end_point": {"row": 92, "column": 14}}, {"id": 447, "type": "subscript_expression", "text": "av[boptind++]", "parent": 444, "children": [448, 449], "start_point": {"row": 92, "column": 15}, "end_point": {"row": 92, "column": 28}}, {"id": 448, "type": "identifier", "text": "av", "parent": 447, "children": [], "start_point": {"row": 92, "column": 15}, "end_point": {"row": 92, "column": 17}}, {"id": 449, "type": "update_expression", "text": "boptind++", "parent": 447, "children": [450, 451], "start_point": {"row": 92, "column": 18}, "end_point": {"row": 92, "column": 27}}, {"id": 450, "type": "identifier", "text": "boptind", "parent": 449, "children": [], "start_point": {"row": 92, "column": 18}, "end_point": {"row": 92, "column": 25}}, {"id": 451, "type": "++", "text": "++", "parent": 449, "children": [], "start_point": {"row": 92, "column": 25}, "end_point": {"row": 92, "column": 27}}, {"id": 452, "type": "if_statement", "text": "if (boptind != ac) {\n usage (av[0]);\n return 1;\n }", "parent": 316, "children": [453], "start_point": {"row": 93, "column": 4}, "end_point": {"row": 96, "column": 5}}, {"id": 453, "type": "parenthesized_expression", "text": "(boptind != ac)", "parent": 452, "children": [454], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 22}}, {"id": 454, "type": "binary_expression", "text": "boptind != ac", "parent": 453, "children": [455, 456, 457], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 21}}, {"id": 455, "type": "identifier", "text": "boptind", "parent": 454, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 15}}, {"id": 456, "type": "!=", "text": "!=", "parent": 454, "children": [], "start_point": {"row": 93, "column": 16}, "end_point": {"row": 93, "column": 18}}, {"id": 457, "type": "identifier", "text": "ac", "parent": 454, "children": [], "start_point": {"row": 93, "column": 19}, "end_point": {"row": 93, "column": 21}}, {"id": 458, "type": "call_expression", "text": "usage (av[0])", "parent": 452, "children": [459, 460], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 21}}, {"id": 459, "type": "identifier", "text": "usage", "parent": 458, "children": [], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 13}}, {"id": 460, "type": "argument_list", "text": "(av[0])", "parent": 458, "children": [461], "start_point": {"row": 94, "column": 14}, "end_point": {"row": 94, "column": 21}}, {"id": 461, "type": "subscript_expression", "text": "av[0]", "parent": 460, "children": [462, 463], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 20}}, {"id": 462, "type": "identifier", "text": "av", "parent": 461, "children": [], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 17}}, {"id": 463, "type": "number_literal", "text": "0", "parent": 461, "children": [], "start_point": {"row": 94, "column": 18}, "end_point": {"row": 94, "column": 19}}, {"id": 464, "type": "return_statement", "text": "return 1;", "parent": 452, "children": [465], "start_point": {"row": 95, "column": 8}, "end_point": {"row": 95, "column": 17}}, {"id": 465, "type": "number_literal", "text": "1", "parent": 464, "children": [], "start_point": {"row": 95, "column": 15}, "end_point": {"row": 95, "column": 16}}, {"id": 466, "type": "return_statement", "text": "return 0;", "parent": 316, "children": [467], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 13}}, {"id": 467, "type": "number_literal", "text": "0", "parent": 466, "children": [], "start_point": {"row": 98, "column": 11}, "end_point": {"row": 98, "column": 12}}, {"id": 468, "type": "function_definition", "text": "static int receive_dominos (CC_SFILE *s)\n{\n int rval = 0;\n int i, count;\n int *list = (int *) NULL;\n\n rval = CCutil_sread_int (s, &count);\n CCcheck_rval (rval, \"CCutil_sread_int failed (count)\");\n\n list = CC_SAFE_MALLOC (count, int);\n CCcheck_NULL (list, \"out memory for list\");\n\n for (i = 0; i < count; i++) {\n rval = CCutil_sread_int (s, &list[i]);\n CCcheck_rval (rval, \"CCutil_sread_int failed (list)\");\n }\n\n printf (\"Dom List: %d\\n\", count);\n for (i = 0; i < count; i++) {\n printf (\"%d \", list[i]);\n }\n printf (\"\\n\"); fflush (stdout);\n\nCLEANUP:\n\n CC_IFFREE (list, int);\n return rval;\n}", "parent": null, "children": [469, 470], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 128, "column": 1}}, {"id": 469, "type": "primitive_type", "text": "int", "parent": 468, "children": [], "start_point": {"row": 101, "column": 7}, "end_point": {"row": 101, "column": 10}}, {"id": 470, "type": "function_declarator", "text": "receive_dominos (CC_SFILE *s)", "parent": 468, "children": [471, 472], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 40}}, {"id": 471, "type": "identifier", "text": "receive_dominos", "parent": 470, "children": [], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 26}}, {"id": 472, "type": "parameter_list", "text": "(CC_SFILE *s)", "parent": 470, "children": [473], "start_point": {"row": 101, "column": 27}, "end_point": {"row": 101, "column": 40}}, {"id": 473, "type": "parameter_declaration", "text": "CC_SFILE *s", "parent": 472, "children": [474, 475], "start_point": {"row": 101, "column": 28}, "end_point": {"row": 101, "column": 39}}, {"id": 474, "type": "type_identifier", "text": "CC_SFILE", "parent": 473, "children": [], "start_point": {"row": 101, "column": 28}, "end_point": {"row": 101, "column": 36}}, {"id": 475, "type": "pointer_declarator", "text": "*s", "parent": 473, "children": [476, 477], "start_point": {"row": 101, "column": 37}, "end_point": {"row": 101, "column": 39}}, {"id": 476, "type": "*", "text": "*", "parent": 475, "children": [], "start_point": {"row": 101, "column": 37}, "end_point": {"row": 101, "column": 38}}, {"id": 477, "type": "identifier", "text": "s", "parent": 475, "children": [], "start_point": {"row": 101, "column": 38}, "end_point": {"row": 101, "column": 39}}, {"id": 478, "type": "declaration", "text": "int rval = 0;", "parent": 468, "children": [479, 480], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 17}}, {"id": 479, "type": "primitive_type", "text": "int", "parent": 478, "children": [], "start_point": {"row": 103, "column": 4}, "end_point": {"row": 103, "column": 7}}, {"id": 480, "type": "init_declarator", "text": "rval = 0", "parent": 478, "children": [481, 482, 483], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 16}}, {"id": 481, "type": "identifier", "text": "rval", "parent": 480, "children": [], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 12}}, {"id": 482, "type": "=", "text": "=", "parent": 480, "children": [], "start_point": {"row": 103, "column": 13}, "end_point": {"row": 103, "column": 14}}, {"id": 483, "type": "number_literal", "text": "0", "parent": 480, "children": [], "start_point": {"row": 103, "column": 15}, "end_point": {"row": 103, "column": 16}}, {"id": 484, "type": "declaration", "text": "int i, count;", "parent": 468, "children": [485, 486, 487], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 17}}, {"id": 485, "type": "primitive_type", "text": "int", "parent": 484, "children": [], "start_point": {"row": 104, "column": 4}, "end_point": {"row": 104, "column": 7}}, {"id": 486, "type": "identifier", "text": "i", "parent": 484, "children": [], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 9}}, {"id": 487, "type": "identifier", "text": "count", "parent": 484, "children": [], "start_point": {"row": 104, "column": 11}, "end_point": {"row": 104, "column": 16}}, {"id": 488, "type": "declaration", "text": "int *list = (int *) NULL;", "parent": 468, "children": [489, 490], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 29}}, {"id": 489, "type": "primitive_type", "text": "int", "parent": 488, "children": [], "start_point": {"row": 105, "column": 4}, "end_point": {"row": 105, "column": 7}}, {"id": 490, "type": "init_declarator", "text": "*list = (int *) NULL", "parent": 488, "children": [491, 494, 495], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 28}}, {"id": 491, "type": "pointer_declarator", "text": "*list", "parent": 490, "children": [492, 493], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 13}}, {"id": 492, "type": "*", "text": "*", "parent": 491, "children": [], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 9}}, {"id": 493, "type": "identifier", "text": "list", "parent": 491, "children": [], "start_point": {"row": 105, "column": 9}, "end_point": {"row": 105, "column": 13}}, {"id": 494, "type": "=", "text": "=", "parent": 490, "children": [], "start_point": {"row": 105, "column": 14}, "end_point": {"row": 105, "column": 15}}, {"id": 495, "type": "cast_expression", "text": "(int *) NULL", "parent": 490, "children": [496, 500], "start_point": {"row": 105, "column": 16}, "end_point": {"row": 105, "column": 28}}, {"id": 496, "type": "type_descriptor", "text": "int *", "parent": 495, "children": [497, 498], "start_point": {"row": 105, "column": 17}, "end_point": {"row": 105, "column": 22}}, {"id": 497, "type": "primitive_type", "text": "int", "parent": 496, "children": [], "start_point": {"row": 105, "column": 17}, "end_point": {"row": 105, "column": 20}}, {"id": 498, "type": "abstract_pointer_declarator", "text": "*", "parent": 496, "children": [499], "start_point": {"row": 105, "column": 21}, "end_point": {"row": 105, "column": 22}}, {"id": 499, "type": "*", "text": "*", "parent": 498, "children": [], "start_point": {"row": 105, "column": 21}, "end_point": {"row": 105, "column": 22}}, {"id": 500, "type": "null", "text": "NULL", "parent": 495, "children": [501], "start_point": {"row": 105, "column": 24}, "end_point": {"row": 105, "column": 28}}, {"id": 501, "type": "NULL", "text": "NULL", "parent": 500, "children": [], "start_point": {"row": 105, "column": 24}, "end_point": {"row": 105, "column": 28}}, {"id": 502, "type": "assignment_expression", "text": "rval = CCutil_sread_int (s, &count)", "parent": 468, "children": [503, 504, 505], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 39}}, {"id": 503, "type": "identifier", "text": "rval", "parent": 502, "children": [], "start_point": {"row": 107, "column": 4}, "end_point": {"row": 107, "column": 8}}, {"id": 504, "type": "=", "text": "=", "parent": 502, "children": [], "start_point": {"row": 107, "column": 9}, "end_point": {"row": 107, "column": 10}}, {"id": 505, "type": "call_expression", "text": "CCutil_sread_int (s, &count)", "parent": 502, "children": [506, 507], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 39}}, {"id": 506, "type": "identifier", "text": "CCutil_sread_int", "parent": 505, "children": [], "start_point": {"row": 107, "column": 11}, "end_point": {"row": 107, "column": 27}}, {"id": 507, "type": "argument_list", "text": "(s, &count)", "parent": 505, "children": [508, 509], "start_point": {"row": 107, "column": 28}, "end_point": {"row": 107, "column": 39}}, {"id": 508, "type": "identifier", "text": "s", "parent": 507, "children": [], "start_point": {"row": 107, "column": 29}, "end_point": {"row": 107, "column": 30}}, {"id": 509, "type": "pointer_expression", "text": "&count", "parent": 507, "children": [510], "start_point": {"row": 107, "column": 32}, "end_point": {"row": 107, "column": 38}}, {"id": 510, "type": "identifier", "text": "count", "parent": 509, "children": [], "start_point": {"row": 107, "column": 33}, "end_point": {"row": 107, "column": 38}}, {"id": 511, "type": "call_expression", "text": "CCcheck_rval (rval, \"CCutil_sread_int failed (count)\")", "parent": 468, "children": [512, 513], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 58}}, {"id": 512, "type": "identifier", "text": "CCcheck_rval", "parent": 511, "children": [], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 16}}, {"id": 513, "type": "argument_list", "text": "(rval, \"CCutil_sread_int failed (count)\")", "parent": 511, "children": [514, 515], "start_point": {"row": 108, "column": 17}, "end_point": {"row": 108, "column": 58}}, {"id": 514, "type": "identifier", "text": "rval", "parent": 513, "children": [], "start_point": {"row": 108, "column": 18}, "end_point": {"row": 108, "column": 22}}, {"id": 515, "type": "string_literal", "text": "\"CCutil_sread_int failed (count)\"", "parent": 513, "children": [], "start_point": {"row": 108, "column": 24}, "end_point": {"row": 108, "column": 57}}, {"id": 516, "type": "assignment_expression", "text": "list = CC_SAFE_MALLOC (count, int)", "parent": 468, "children": [517, 518, 519], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 38}}, {"id": 517, "type": "identifier", "text": "list", "parent": 516, "children": [], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 8}}, {"id": 518, "type": "=", "text": "=", "parent": 516, "children": [], "start_point": {"row": 110, "column": 9}, "end_point": {"row": 110, "column": 10}}, {"id": 519, "type": "call_expression", "text": "CC_SAFE_MALLOC (count, int)", "parent": 516, "children": [520, 521], "start_point": {"row": 110, "column": 11}, "end_point": {"row": 110, "column": 38}}, {"id": 520, "type": "identifier", "text": "CC_SAFE_MALLOC", "parent": 519, "children": [], "start_point": {"row": 110, "column": 11}, "end_point": {"row": 110, "column": 25}}, {"id": 521, "type": "argument_list", "text": "(count, int)", "parent": 519, "children": [522, 523], "start_point": {"row": 110, "column": 26}, "end_point": {"row": 110, "column": 38}}, {"id": 522, "type": "identifier", "text": "count", "parent": 521, "children": [], "start_point": {"row": 110, "column": 27}, "end_point": {"row": 110, "column": 32}}, {"id": 523, "type": "identifier", "text": "int", "parent": 521, "children": [], "start_point": {"row": 110, "column": 34}, "end_point": {"row": 110, "column": 37}}, {"id": 524, "type": "call_expression", "text": "CCcheck_NULL (list, \"out memory for list\")", "parent": 468, "children": [525, 526], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 46}}, {"id": 525, "type": "identifier", "text": "CCcheck_NULL", "parent": 524, "children": [], "start_point": {"row": 111, "column": 4}, "end_point": {"row": 111, "column": 16}}, {"id": 526, "type": "argument_list", "text": "(list, \"out memory for list\")", "parent": 524, "children": [527, 528], "start_point": {"row": 111, "column": 17}, "end_point": {"row": 111, "column": 46}}, {"id": 527, "type": "identifier", "text": "list", "parent": 526, "children": [], "start_point": {"row": 111, "column": 18}, "end_point": {"row": 111, "column": 22}}, {"id": 528, "type": "string_literal", "text": "\"out memory for list\"", "parent": 526, "children": [], "start_point": {"row": 111, "column": 24}, "end_point": {"row": 111, "column": 45}}, {"id": 529, "type": "for_statement", "text": "for (i = 0; i < count; i++) {\n rval = CCutil_sread_int (s, &list[i]);\n CCcheck_rval (rval, \"CCutil_sread_int failed (list)\");\n }", "parent": 468, "children": [530, 534, 538], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 116, "column": 5}}, {"id": 530, "type": "assignment_expression", "text": "i = 0", "parent": 529, "children": [531, 532, 533], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 14}}, {"id": 531, "type": "identifier", "text": "i", "parent": 530, "children": [], "start_point": {"row": 113, "column": 9}, "end_point": {"row": 113, "column": 10}}, {"id": 532, "type": "=", "text": "=", "parent": 530, "children": [], "start_point": {"row": 113, "column": 11}, "end_point": {"row": 113, "column": 12}}, {"id": 533, "type": "number_literal", "text": "0", "parent": 530, "children": [], "start_point": {"row": 113, "column": 13}, "end_point": {"row": 113, "column": 14}}, {"id": 534, "type": "binary_expression", "text": "i < count", "parent": 529, "children": [535, 536, 537], "start_point": {"row": 113, "column": 16}, "end_point": {"row": 113, "column": 25}}, {"id": 535, "type": "identifier", "text": "i", "parent": 534, "children": [], "start_point": {"row": 113, "column": 16}, "end_point": {"row": 113, "column": 17}}, {"id": 536, "type": "<", "text": "<", "parent": 534, "children": [], "start_point": {"row": 113, "column": 18}, "end_point": {"row": 113, "column": 19}}, {"id": 537, "type": "identifier", "text": "count", "parent": 534, "children": [], "start_point": {"row": 113, "column": 20}, "end_point": {"row": 113, "column": 25}}, {"id": 538, "type": "update_expression", "text": "i++", "parent": 529, "children": [539, 540], "start_point": {"row": 113, "column": 27}, "end_point": {"row": 113, "column": 30}}, {"id": 539, "type": "identifier", "text": "i", "parent": 538, "children": [], "start_point": {"row": 113, "column": 27}, "end_point": {"row": 113, "column": 28}}, {"id": 540, "type": "++", "text": "++", "parent": 538, "children": [], "start_point": {"row": 113, "column": 28}, "end_point": {"row": 113, "column": 30}}, {"id": 541, "type": "assignment_expression", "text": "rval = CCutil_sread_int (s, &list[i])", "parent": 529, "children": [542, 543, 544], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 45}}, {"id": 542, "type": "identifier", "text": "rval", "parent": 541, "children": [], "start_point": {"row": 114, "column": 8}, "end_point": {"row": 114, "column": 12}}, {"id": 543, "type": "=", "text": "=", "parent": 541, "children": [], "start_point": {"row": 114, "column": 13}, "end_point": {"row": 114, "column": 14}}, {"id": 544, "type": "call_expression", "text": "CCutil_sread_int (s, &list[i])", "parent": 541, "children": [545, 546], "start_point": {"row": 114, "column": 15}, "end_point": {"row": 114, "column": 45}}, {"id": 545, "type": "identifier", "text": "CCutil_sread_int", "parent": 544, "children": [], "start_point": {"row": 114, "column": 15}, "end_point": {"row": 114, "column": 31}}, {"id": 546, "type": "argument_list", "text": "(s, &list[i])", "parent": 544, "children": [547, 548], "start_point": {"row": 114, "column": 32}, "end_point": {"row": 114, "column": 45}}, {"id": 547, "type": "identifier", "text": "s", "parent": 546, "children": [], "start_point": {"row": 114, "column": 33}, "end_point": {"row": 114, "column": 34}}, {"id": 548, "type": "pointer_expression", "text": "&list[i]", "parent": 546, "children": [549], "start_point": {"row": 114, "column": 36}, "end_point": {"row": 114, "column": 44}}, {"id": 549, "type": "subscript_expression", "text": "list[i]", "parent": 548, "children": [550, 551], "start_point": {"row": 114, "column": 37}, "end_point": {"row": 114, "column": 44}}, {"id": 550, "type": "identifier", "text": "list", "parent": 549, "children": [], "start_point": {"row": 114, "column": 37}, "end_point": {"row": 114, "column": 41}}, {"id": 551, "type": "identifier", "text": "i", "parent": 549, "children": [], "start_point": {"row": 114, "column": 42}, "end_point": {"row": 114, "column": 43}}, {"id": 552, "type": "call_expression", "text": "CCcheck_rval (rval, \"CCutil_sread_int failed (list)\")", "parent": 529, "children": [553, 554], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 61}}, {"id": 553, "type": "identifier", "text": "CCcheck_rval", "parent": 552, "children": [], "start_point": {"row": 115, "column": 8}, "end_point": {"row": 115, "column": 20}}, {"id": 554, "type": "argument_list", "text": "(rval, \"CCutil_sread_int failed (list)\")", "parent": 552, "children": [555, 556], "start_point": {"row": 115, "column": 21}, "end_point": {"row": 115, "column": 61}}, {"id": 555, "type": "identifier", "text": "rval", "parent": 554, "children": [], "start_point": {"row": 115, "column": 22}, "end_point": {"row": 115, "column": 26}}, {"id": 556, "type": "string_literal", "text": "\"CCutil_sread_int failed (list)\"", "parent": 554, "children": [], "start_point": {"row": 115, "column": 28}, "end_point": {"row": 115, "column": 60}}, {"id": 557, "type": "call_expression", "text": "printf (\"Dom List: %d\\n\", count)", "parent": 468, "children": [558, 559], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 36}}, {"id": 558, "type": "identifier", "text": "printf", "parent": 557, "children": [], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 10}}, {"id": 559, "type": "argument_list", "text": "(\"Dom List: %d\\n\", count)", "parent": 557, "children": [560, 562], "start_point": {"row": 118, "column": 11}, "end_point": {"row": 118, "column": 36}}, {"id": 560, "type": "string_literal", "text": "\"Dom List: %d\\n\"", "parent": 559, "children": [561], "start_point": {"row": 118, "column": 12}, "end_point": {"row": 118, "column": 28}}, {"id": 561, "type": "escape_sequence", "text": "\\n", "parent": 560, "children": [], "start_point": {"row": 118, "column": 25}, "end_point": {"row": 118, "column": 27}}, {"id": 562, "type": "identifier", "text": "count", "parent": 559, "children": [], "start_point": {"row": 118, "column": 30}, "end_point": {"row": 118, "column": 35}}, {"id": 563, "type": "for_statement", "text": "for (i = 0; i < count; i++) {\n printf (\"%d \", list[i]);\n }", "parent": 468, "children": [564, 568, 572], "start_point": {"row": 119, "column": 4}, "end_point": {"row": 121, "column": 5}}, {"id": 564, "type": "assignment_expression", "text": "i = 0", "parent": 563, "children": [565, 566, 567], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 14}}, {"id": 565, "type": "identifier", "text": "i", "parent": 564, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 10}}, {"id": 566, "type": "=", "text": "=", "parent": 564, "children": [], "start_point": {"row": 119, "column": 11}, "end_point": {"row": 119, "column": 12}}, {"id": 567, "type": "number_literal", "text": "0", "parent": 564, "children": [], "start_point": {"row": 119, "column": 13}, "end_point": {"row": 119, "column": 14}}, {"id": 568, "type": "binary_expression", "text": "i < count", "parent": 563, "children": [569, 570, 571], "start_point": {"row": 119, "column": 16}, "end_point": {"row": 119, "column": 25}}, {"id": 569, "type": "identifier", "text": "i", "parent": 568, "children": [], "start_point": {"row": 119, "column": 16}, "end_point": {"row": 119, "column": 17}}, {"id": 570, "type": "<", "text": "<", "parent": 568, "children": [], "start_point": {"row": 119, "column": 18}, "end_point": {"row": 119, "column": 19}}, {"id": 571, "type": "identifier", "text": "count", "parent": 568, "children": [], "start_point": {"row": 119, "column": 20}, "end_point": {"row": 119, "column": 25}}, {"id": 572, "type": "update_expression", "text": "i++", "parent": 563, "children": [573, 574], "start_point": {"row": 119, "column": 27}, "end_point": {"row": 119, "column": 30}}, {"id": 573, "type": "identifier", "text": "i", "parent": 572, "children": [], "start_point": {"row": 119, "column": 27}, "end_point": {"row": 119, "column": 28}}, {"id": 574, "type": "++", "text": "++", "parent": 572, "children": [], "start_point": {"row": 119, "column": 28}, "end_point": {"row": 119, "column": 30}}, {"id": 575, "type": "call_expression", "text": "printf (\"%d \", list[i])", "parent": 563, "children": [576, 577], "start_point": {"row": 120, "column": 8}, "end_point": {"row": 120, "column": 31}}, {"id": 576, "type": "identifier", "text": "printf", "parent": 575, "children": [], "start_point": {"row": 120, "column": 8}, "end_point": {"row": 120, "column": 14}}, {"id": 577, "type": "argument_list", "text": "(\"%d \", list[i])", "parent": 575, "children": [578, 579], "start_point": {"row": 120, "column": 15}, "end_point": {"row": 120, "column": 31}}, {"id": 578, "type": "string_literal", "text": "\"%d \"", "parent": 577, "children": [], "start_point": {"row": 120, "column": 16}, "end_point": {"row": 120, "column": 21}}, {"id": 579, "type": "subscript_expression", "text": "list[i]", "parent": 577, "children": [580, 581], "start_point": {"row": 120, "column": 23}, "end_point": {"row": 120, "column": 30}}, {"id": 580, "type": "identifier", "text": "list", "parent": 579, "children": [], "start_point": {"row": 120, "column": 23}, "end_point": {"row": 120, "column": 27}}, {"id": 581, "type": "identifier", "text": "i", "parent": 579, "children": [], "start_point": {"row": 120, "column": 28}, "end_point": {"row": 120, "column": 29}}, {"id": 582, "type": "call_expression", "text": "printf (\"\\n\")", "parent": 468, "children": [583, 584], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 17}}, {"id": 583, "type": "identifier", "text": "printf", "parent": 582, "children": [], "start_point": {"row": 122, "column": 4}, "end_point": {"row": 122, "column": 10}}, {"id": 584, "type": "argument_list", "text": "(\"\\n\")", "parent": 582, "children": [585], "start_point": {"row": 122, "column": 11}, "end_point": {"row": 122, "column": 17}}, {"id": 585, "type": "string_literal", "text": "\"\\n\"", "parent": 584, "children": [586], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 16}}, {"id": 586, "type": "escape_sequence", "text": "\\n", "parent": 585, "children": [], "start_point": {"row": 122, "column": 13}, "end_point": {"row": 122, "column": 15}}, {"id": 587, "type": "call_expression", "text": "fflush (stdout)", "parent": 468, "children": [588, 589], "start_point": {"row": 122, "column": 19}, "end_point": {"row": 122, "column": 34}}, {"id": 588, "type": "identifier", "text": "fflush", "parent": 587, "children": [], "start_point": {"row": 122, "column": 19}, "end_point": {"row": 122, "column": 25}}, {"id": 589, "type": "argument_list", "text": "(stdout)", "parent": 587, "children": [590], "start_point": {"row": 122, "column": 26}, "end_point": {"row": 122, "column": 34}}, {"id": 590, "type": "identifier", "text": "stdout", "parent": 589, "children": [], "start_point": {"row": 122, "column": 27}, "end_point": {"row": 122, "column": 33}}, {"id": 591, "type": "labeled_statement", "text": "CLEANUP:\n\n CC_IFFREE (list, int);", "parent": 468, "children": [592], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 126, "column": 26}}, {"id": 592, "type": "statement_identifier", "text": "CLEANUP", "parent": 591, "children": [], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 124, "column": 7}}, {"id": 593, "type": "call_expression", "text": "CC_IFFREE (list, int)", "parent": 591, "children": [594, 595], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 25}}, {"id": 594, "type": "identifier", "text": "CC_IFFREE", "parent": 593, "children": [], "start_point": {"row": 126, "column": 4}, "end_point": {"row": 126, "column": 13}}, {"id": 595, "type": "argument_list", "text": "(list, int)", "parent": 593, "children": [596, 597], "start_point": {"row": 126, "column": 14}, "end_point": {"row": 126, "column": 25}}, {"id": 596, "type": "identifier", "text": "list", "parent": 595, "children": [], "start_point": {"row": 126, "column": 15}, "end_point": {"row": 126, "column": 19}}, {"id": 597, "type": "identifier", "text": "int", "parent": 595, "children": [], "start_point": {"row": 126, "column": 21}, "end_point": {"row": 126, "column": 24}}, {"id": 598, "type": "return_statement", "text": "return rval;", "parent": 468, "children": [599], "start_point": {"row": 127, "column": 4}, "end_point": {"row": 127, "column": 16}}, {"id": 599, "type": "identifier", "text": "rval", "parent": 598, "children": [], "start_point": {"row": 127, "column": 11}, "end_point": {"row": 127, "column": 15}}, {"id": 600, "type": "function_definition", "text": "static void usage (char *f)\n{\n fprintf (stderr, \"Usage: %s [-see below-] hostname\\n\", f);\n fprintf (stderr, \" -d tells the boss to send dominos\\n\");\n fprintf (stderr, \" -g # sends graph is id #\\n\");\n fprintf (stderr, \" -x tells the boss to exit\\n\");\n}", "parent": null, "children": [601, 602], "start_point": {"row": 130, "column": 0}, "end_point": {"row": 136, "column": 1}}, {"id": 601, "type": "primitive_type", "text": "void", "parent": 600, "children": [], "start_point": {"row": 130, "column": 7}, "end_point": {"row": 130, "column": 11}}, {"id": 602, "type": "function_declarator", "text": "usage (char *f)", "parent": 600, "children": [603, 604], "start_point": {"row": 130, "column": 12}, "end_point": {"row": 130, "column": 27}}, {"id": 603, "type": "identifier", "text": "usage", "parent": 602, "children": [], "start_point": {"row": 130, "column": 12}, "end_point": {"row": 130, "column": 17}}, {"id": 604, "type": "parameter_list", "text": "(char *f)", "parent": 602, "children": [605], "start_point": {"row": 130, "column": 18}, "end_point": {"row": 130, "column": 27}}, {"id": 605, "type": "parameter_declaration", "text": "char *f", "parent": 604, "children": [606, 607], "start_point": {"row": 130, "column": 19}, "end_point": {"row": 130, "column": 26}}, {"id": 606, "type": "primitive_type", "text": "char", "parent": 605, "children": [], "start_point": {"row": 130, "column": 19}, "end_point": {"row": 130, "column": 23}}, {"id": 607, "type": "pointer_declarator", "text": "*f", "parent": 605, "children": [608, 609], "start_point": {"row": 130, "column": 24}, "end_point": {"row": 130, "column": 26}}, {"id": 608, "type": "*", "text": "*", "parent": 607, "children": [], "start_point": {"row": 130, "column": 24}, "end_point": {"row": 130, "column": 25}}, {"id": 609, "type": "identifier", "text": "f", "parent": 607, "children": [], "start_point": {"row": 130, "column": 25}, "end_point": {"row": 130, "column": 26}}, {"id": 610, "type": "call_expression", "text": "fprintf (stderr, \"Usage: %s [-see below-] hostname\\n\", f)", "parent": 600, "children": [611, 612], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 61}}, {"id": 611, "type": "identifier", "text": "fprintf", "parent": 610, "children": [], "start_point": {"row": 132, "column": 4}, "end_point": {"row": 132, "column": 11}}, {"id": 612, "type": "argument_list", "text": "(stderr, \"Usage: %s [-see below-] hostname\\n\", f)", "parent": 610, "children": [613, 614, 616], "start_point": {"row": 132, "column": 12}, "end_point": {"row": 132, "column": 61}}, {"id": 613, "type": "identifier", "text": "stderr", "parent": 612, "children": [], "start_point": {"row": 132, "column": 13}, "end_point": {"row": 132, "column": 19}}, {"id": 614, "type": "string_literal", "text": "\"Usage: %s [-see below-] hostname\\n\"", "parent": 612, "children": [615], "start_point": {"row": 132, "column": 21}, "end_point": {"row": 132, "column": 57}}, {"id": 615, "type": "escape_sequence", "text": "\\n", "parent": 614, "children": [], "start_point": {"row": 132, "column": 54}, "end_point": {"row": 132, "column": 56}}, {"id": 616, "type": "identifier", "text": "f", "parent": 612, "children": [], "start_point": {"row": 132, "column": 59}, "end_point": {"row": 132, "column": 60}}, {"id": 617, "type": "call_expression", "text": "fprintf (stderr, \" -d tells the boss to send dominos\\n\")", "parent": 600, "children": [618, 619], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 64}}, {"id": 618, "type": "identifier", "text": "fprintf", "parent": 617, "children": [], "start_point": {"row": 133, "column": 4}, "end_point": {"row": 133, "column": 11}}, {"id": 619, "type": "argument_list", "text": "(stderr, \" -d tells the boss to send dominos\\n\")", "parent": 617, "children": [620, 621], "start_point": {"row": 133, "column": 12}, "end_point": {"row": 133, "column": 64}}, {"id": 620, "type": "identifier", "text": "stderr", "parent": 619, "children": [], "start_point": {"row": 133, "column": 13}, "end_point": {"row": 133, "column": 19}}, {"id": 621, "type": "string_literal", "text": "\" -d tells the boss to send dominos\\n\"", "parent": 619, "children": [622], "start_point": {"row": 133, "column": 21}, "end_point": {"row": 133, "column": 63}}, {"id": 622, "type": "escape_sequence", "text": "\\n", "parent": 621, "children": [], "start_point": {"row": 133, "column": 60}, "end_point": {"row": 133, "column": 62}}, {"id": 623, "type": "call_expression", "text": "fprintf (stderr, \" -g # sends graph is id #\\n\")", "parent": 600, "children": [624, 625], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 53}}, {"id": 624, "type": "identifier", "text": "fprintf", "parent": 623, "children": [], "start_point": {"row": 134, "column": 4}, "end_point": {"row": 134, "column": 11}}, {"id": 625, "type": "argument_list", "text": "(stderr, \" -g # sends graph is id #\\n\")", "parent": 623, "children": [626, 627], "start_point": {"row": 134, "column": 12}, "end_point": {"row": 134, "column": 53}}, {"id": 626, "type": "identifier", "text": "stderr", "parent": 625, "children": [], "start_point": {"row": 134, "column": 13}, "end_point": {"row": 134, "column": 19}}, {"id": 627, "type": "string_literal", "text": "\" -g # sends graph is id #\\n\"", "parent": 625, "children": [628], "start_point": {"row": 134, "column": 21}, "end_point": {"row": 134, "column": 52}}, {"id": 628, "type": "escape_sequence", "text": "\\n", "parent": 627, "children": [], "start_point": {"row": 134, "column": 49}, "end_point": {"row": 134, "column": 51}}, {"id": 629, "type": "call_expression", "text": "fprintf (stderr, \" -x tells the boss to exit\\n\")", "parent": 600, "children": [630, 631], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 56}}, {"id": 630, "type": "identifier", "text": "fprintf", "parent": 629, "children": [], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 11}}, {"id": 631, "type": "argument_list", "text": "(stderr, \" -x tells the boss to exit\\n\")", "parent": 629, "children": [632, 633], "start_point": {"row": 135, "column": 12}, "end_point": {"row": 135, "column": 56}}, {"id": 632, "type": "identifier", "text": "stderr", "parent": 631, "children": [], "start_point": {"row": 135, "column": 13}, "end_point": {"row": 135, "column": 19}}, {"id": 633, "type": "string_literal", "text": "\" -x tells the boss to exit\\n\"", "parent": 631, "children": [634], "start_point": {"row": 135, "column": 21}, "end_point": {"row": 135, "column": 55}}, {"id": 634, "type": "escape_sequence", "text": "\\n", "parent": 633, "children": [], "start_point": {"row": 135, "column": 52}, "end_point": {"row": 135, "column": 54}}]}, "node_categories": {"declarations": {"functions": [14, 22, 37, 83, 85, 316, 318, 468, 470, 600, 602], "variables": [12, 17, 25, 28, 35, 40, 45, 51, 57, 63, 69, 88, 91, 98, 112, 321, 324, 331, 334, 340, 473, 478, 484, 488, 605], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [76, 105, 121, 127, 131, 137, 143, 144, 147, 161, 163, 168, 175, 180, 187, 189, 195, 202, 207, 215, 220, 228, 232, 236, 244, 248, 252, 259, 261, 266, 273, 278, 286, 290, 296, 301, 308, 310, 347, 355, 356, 357, 361, 367, 369, 375, 402, 422, 425, 431, 432, 436, 439, 447, 449, 453, 454, 458, 461, 495, 505, 509, 511, 519, 524, 534, 538, 544, 548, 549, 552, 557, 568, 572, 575, 579, 582, 587, 593, 610, 617, 623, 629], "assignments": [118, 134, 153, 172, 199, 212, 225, 241, 270, 283, 358, 383, 395, 399, 414, 444, 502, 516, 530, 541, 564], "loops": [354, 529, 563], "conditionals": [15, 18, 21, 23, 27, 34, 38, 44, 48, 54, 60, 66, 74, 86, 90, 97, 99, 103, 107, 115, 119, 122, 124, 125, 126, 128, 132, 135, 138, 140, 141, 142, 146, 148, 150, 154, 159, 160, 162, 164, 169, 171, 173, 176, 178, 179, 181, 183, 186, 188, 190, 194, 196, 198, 200, 203, 205, 206, 208, 210, 213, 216, 218, 219, 221, 223, 226, 229, 231, 235, 237, 239, 242, 245, 247, 251, 253, 255, 258, 260, 262, 267, 269, 271, 274, 276, 277, 279, 281, 284, 287, 289, 291, 293, 297, 302, 304, 306, 307, 309, 311, 313, 315, 319, 323, 330, 333, 337, 345, 359, 362, 364, 365, 368, 370, 372, 373, 374, 376, 377, 378, 384, 389, 390, 396, 400, 403, 405, 408, 409, 415, 420, 423, 426, 430, 433, 435, 437, 440, 445, 448, 450, 452, 455, 457, 459, 462, 471, 474, 477, 481, 486, 487, 493, 503, 506, 508, 510, 512, 514, 517, 520, 522, 523, 525, 527, 531, 535, 537, 539, 542, 545, 547, 550, 551, 553, 555, 558, 562, 565, 569, 571, 573, 576, 580, 581, 583, 588, 590, 592, 594, 596, 597, 599, 603, 609, 611, 613, 616, 618, 620, 624, 626, 630, 632], "returns": [129, 314, 428, 442, 464, 466, 598], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 50, 56, 62, 68, 117, 130, 151, 156, 166, 184, 192, 211, 224, 233, 240, 249, 256, 264, 282, 294, 299, 339, 366, 379, 386, 391, 398, 410, 417, 427, 429, 441, 443, 463, 465, 467, 483, 515, 528, 533, 556, 560, 567, 578, 585, 614, 621, 627, 633], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 14, "universal_type": "function", "name": "unknown", "text_snippet": "receive_dominos (CC_SFILE *s)"}, {"node_id": 22, "universal_type": "function", "name": "unknown", "text_snippet": "parseargs (int ac, char **av)"}, {"node_id": 37, "universal_type": "function", "name": "unknown", "text_snippet": "usage (char *f)"}, {"node_id": 83, "universal_type": "function", "name": "main", "text_snippet": "int main (int ac, char **av)\n{\n CC_SFILE *s = (CC_SFILE *) NULL;\n int rval = 0;\n\n rval = pa"}, {"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "main (int ac, char **av)"}, {"node_id": 316, "universal_type": "function", "name": "parseargs", "text_snippet": "static int parseargs (int ac, char **av)\n{\n int c; "}, {"node_id": 318, "universal_type": "function", "name": "unknown", "text_snippet": "parseargs (int ac, char **av)"}, {"node_id": 468, "universal_type": "function", "name": "receive_dominos", "text_snippet": "static int receive_dominos (CC_SFILE *s)\n{\n int rval = 0;\n int i, count;\n int *list = (int "}, {"node_id": 470, "universal_type": "function", "name": "unknown", "text_snippet": "receive_dominos (CC_SFILE *s)"}, {"node_id": 600, "universal_type": "function", "name": "usage", "text_snippet": "static void usage (char *f)\n{\n fprintf (stderr, \"Usage: %s [-see below-] hostname\\n\", f);\n fpr"}, {"node_id": 602, "universal_type": "function", "name": "unknown", "text_snippet": "usage (char *f)"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include \"machdefs.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"util.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"tsp.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n#include \"machdefs.h\"\n#include \"util.h\"\n#include \"tsp.h\"\n\nstatic int\n receive_dominos (CC_SFILE *s),\n parseargs (int ac, char **av);\n\nstatic void\n usage (char *f);\n\nstatic int graphid = 1;\nstatic int sendgraph = 0;\nstatic int stopboss = 0;\nstatic int getdominos = 0;\nstatic char *hostname = (char *) NULL;\n\nint main (int ac, char **av)\n{\n CC_SFILE *s = (CC_SFILE *) NULL;\n int rval = 0;\n\n rval = parseargs (ac, av);\n if (rval) return 0;\n\n CCutil_printlabel ();\n\n s = CCutil_snet_open (hostname, CCtsp_DOMINO_PORT);\n if (!s) {\n fprintf (stderr, \"CCutil_snet_open failed\\n\");\n rval = 1; goto CLEANUP;\n }\n\n if (stopboss) {\n printf (\"stop the boss\\n\"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_EXIT);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (EXIT)\");\n } else if (sendgraph) {\n printf (\"Send graph id = %d\\n\", graphid); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_GRAPH);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (GRAPH)\");\n rval = CCutil_swrite_int (s, graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n rval = CCutil_swrite_int (s, 2*graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n rval = CCutil_swrite_int (s, 3*graphid);\n CCcheck_rval (rval, \"CCutil_swrite_int failed\");\n } else if (getdominos) {\n printf (\"get the domino list\\n\"); fflush (stdout);\n rval = CCutil_swrite_char (s, CCtsp_DOMINO_SEND);\n CCcheck_rval (rval, \"CCutil_swrite_char failed (SEND)\");\n rval = receive_dominos (s);\n CCcheck_rval (rval, \"receive_dominos failed\");\n } else {\n printf (\"Nothing to do.\\n\"); fflush (stdout);\n }\n\nCLEANUP:\n\n if (s) CCutil_sclose (s);\n return rval;\n}\n\nstatic int parseargs (int ac, char **av)\n{\n int c; \n int boptind = 1;\n char *boptarg = (char *) NULL;\n\n while ((c = CCutil_bix_getopt (ac, av, \"xg:d\", &boptind, &boptarg)) != EOF) {\n switch (c) { \n case 'x':\n stopboss = 1;\n break;\n case 'g': \n sendgraph = 1;\n graphid = atoi(boptarg);\n break; \n case 'd': \n getdominos = 1;\n break;\n default:\n usage (av[0]);\n return 1;\n }\n }\n\n if (boptind >= ac) {\n usage (av[0]);\n return 1;\n }\n hostname = av[boptind++];\n if (boptind != ac) {\n usage (av[0]);\n return 1;\n }\n\n return 0;\n}\n\nstatic int receive_dominos (CC_SFILE *s)\n{\n int rval = 0;\n int i, count;\n int *list = (int *) NULL;\n\n rval = CCutil_sread_int (s, &count);\n CCcheck_rval (rval, \"CCutil_sread_int failed (count)\");\n\n list = CC_SAFE_MALLOC (count, int);\n CCcheck_NULL (list, \"out memory for list\");\n\n for (i = 0; i < count; i++) {\n rval = CCutil_sread_int (s, &list[i]);\n CCcheck_rval (rval, \"CCutil_sread_int failed (list)\");\n }\n\n printf (\"Dom List: %d\\n\", count);\n for (i = 0; i < count; i++) {\n printf (\"%d \", list[i]);\n }\n printf (\"\\n\"); fflush (stdout);\n\nCLEANUP:\n\n CC_IFFREE (list, int);\n return rval;\n}\n\nstatic void usage (char *f)\n{\n fprintf (stderr, \"Usage: %s [-see below-] hostname\\n\", f);\n fprintf (stderr, \" -d tells the boss to send dominos\\n\");\n fprintf (stderr, \" -g # sends graph is id #\\n\");\n fprintf (stderr, \" -x tells the boss to exit\\n\");\n}\n"}
53
c
#include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> #include <linux/device.h> #include <linux/slab.h> #include <linux/fs.h> #include <linux/mm.h> #include <linux/interrupt.h> #include <linux/vmalloc.h> #include <linux/platform_device.h> #include <linux/miscdevice.h> #include <linux/wait.h> #include <linux/spinlock.h> #include <linux/ctype.h> #include <linux/semaphore.h> #include <asm/uaccess.h> #include <asm/io.h> #include <linux/workqueue.h> #include <linux/switch.h> #include <linux/delay.h> #include <linux/device.h> #include <linux/kdev_t.h> #include <linux/fs.h> #include <linux/cdev.h> #include <asm/uaccess.h> #include <linux/kthread.h> #include <linux/input.h> #include <linux/wakelock.h> #include <linux/time.h> #include <linux/string.h> #include <mach/mt_typedefs.h> #include <mach/mt_reg_base.h> #include <mach/irqs.h> #include <accdet_custom_def.h> #include <accdet_custom.h> #include <mach/reg_accdet.h> /******************************************************************************* costom API *******************************************************************************/ /******************************************************************************* HAL API *******************************************************************************/ int dump_register(void); void mt_accdet_remove(void); void mt_accdet_suspend(void); void mt_accdet_resume(void); void mt_accdet_pm_restore_noirq(void); int mt_accdet_unlocked_ioctl(unsigned int cmd, unsigned long arg); //int mt_accdet_store_call_state(const char *buf, size_t count); //int accdet_get_pin_reg_state(void); int mt_accdet_probe(void); int accdet_get_cable_type(void); struct file_operations *accdet_ops(void);
30.72
54
(translation_unit) "#include <linux/kernel.h>\n#include <linux/module.h>\n#include <linux/init.h>\n#include <linux/device.h>\n#include <linux/slab.h>\n#include <linux/fs.h>\n#include <linux/mm.h>\n#include <linux/interrupt.h>\n#include <linux/vmalloc.h>\n#include <linux/platform_device.h>\n#include <linux/miscdevice.h>\n#include <linux/wait.h>\n#include <linux/spinlock.h>\n#include <linux/ctype.h>\n\n#include <linux/semaphore.h>\n#include <asm/uaccess.h>\n#include <asm/io.h>\n#include <linux/workqueue.h>\n#include <linux/switch.h>\n#include <linux/delay.h>\n\n#include <linux/device.h>\n#include <linux/kdev_t.h>\n#include <linux/fs.h>\n#include <linux/cdev.h>\n#include <asm/uaccess.h>\n#include <linux/kthread.h>\n#include <linux/input.h>\n#include <linux/wakelock.h>\n#include <linux/time.h>\n\n#include <linux/string.h>\n\n#include <mach/mt_typedefs.h>\n#include <mach/mt_reg_base.h>\n#include <mach/irqs.h>\n#include <accdet_custom_def.h>\n#include <accdet_custom.h>\n#include <mach/reg_accdet.h>\n\n\n/*******************************************************************************\ncostom API\n*******************************************************************************/\n/*******************************************************************************\nHAL API\n*******************************************************************************/\n\nint dump_register(void);\nvoid mt_accdet_remove(void);\nvoid mt_accdet_suspend(void);\nvoid mt_accdet_resume(void);\nvoid mt_accdet_pm_restore_noirq(void);\nint mt_accdet_unlocked_ioctl(unsigned int cmd, unsigned long arg);\n//int mt_accdet_store_call_state(const char *buf, size_t count);\n//int accdet_get_pin_reg_state(void);\nint mt_accdet_probe(void);\nint accdet_get_cable_type(void);\nstruct file_operations *accdet_ops(void);\n\n\n\n\n\n\n\n\n" (preproc_include) "#include <linux/kernel.h>\n" (#include) "#include" (system_lib_string) "<linux/kernel.h>" (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/device.h>\n" (#include) "#include" (system_lib_string) "<linux/device.h>" (preproc_include) "#include <linux/slab.h>\n" (#include) "#include" (system_lib_string) "<linux/slab.h>" (preproc_include) "#include <linux/fs.h>\n" (#include) "#include" (system_lib_string) "<linux/fs.h>" (preproc_include) "#include <linux/mm.h>\n" (#include) "#include" (system_lib_string) "<linux/mm.h>" (preproc_include) "#include <linux/interrupt.h>\n" (#include) "#include" (system_lib_string) "<linux/interrupt.h>" (preproc_include) "#include <linux/vmalloc.h>\n" (#include) "#include" (system_lib_string) "<linux/vmalloc.h>" (preproc_include) "#include <linux/platform_device.h>\n" (#include) "#include" (system_lib_string) "<linux/platform_device.h>" (preproc_include) "#include <linux/miscdevice.h>\n" (#include) "#include" (system_lib_string) "<linux/miscdevice.h>" (preproc_include) "#include <linux/wait.h>\n" (#include) "#include" (system_lib_string) "<linux/wait.h>" (preproc_include) "#include <linux/spinlock.h>\n" (#include) "#include" (system_lib_string) "<linux/spinlock.h>" (preproc_include) "#include <linux/ctype.h>\n" (#include) "#include" (system_lib_string) "<linux/ctype.h>" (preproc_include) "#include <linux/semaphore.h>\n" (#include) "#include" (system_lib_string) "<linux/semaphore.h>" (preproc_include) "#include <asm/uaccess.h>\n" (#include) "#include" (system_lib_string) "<asm/uaccess.h>" (preproc_include) "#include <asm/io.h>\n" (#include) "#include" (system_lib_string) "<asm/io.h>" (preproc_include) "#include <linux/workqueue.h>\n" (#include) "#include" (system_lib_string) "<linux/workqueue.h>" (preproc_include) "#include <linux/switch.h>\n" (#include) "#include" (system_lib_string) "<linux/switch.h>" (preproc_include) "#include <linux/delay.h>\n" (#include) "#include" (system_lib_string) "<linux/delay.h>" (preproc_include) "#include <linux/device.h>\n" (#include) "#include" (system_lib_string) "<linux/device.h>" (preproc_include) "#include <linux/kdev_t.h>\n" (#include) "#include" (system_lib_string) "<linux/kdev_t.h>" (preproc_include) "#include <linux/fs.h>\n" (#include) "#include" (system_lib_string) "<linux/fs.h>" (preproc_include) "#include <linux/cdev.h>\n" (#include) "#include" (system_lib_string) "<linux/cdev.h>" (preproc_include) "#include <asm/uaccess.h>\n" (#include) "#include" (system_lib_string) "<asm/uaccess.h>" (preproc_include) "#include <linux/kthread.h>\n" (#include) "#include" (system_lib_string) "<linux/kthread.h>" (preproc_include) "#include <linux/input.h>\n" (#include) "#include" (system_lib_string) "<linux/input.h>" (preproc_include) "#include <linux/wakelock.h>\n" (#include) "#include" (system_lib_string) "<linux/wakelock.h>" (preproc_include) "#include <linux/time.h>\n" (#include) "#include" (system_lib_string) "<linux/time.h>" (preproc_include) "#include <linux/string.h>\n" (#include) "#include" (system_lib_string) "<linux/string.h>" (preproc_include) "#include <mach/mt_typedefs.h>\n" (#include) "#include" (system_lib_string) "<mach/mt_typedefs.h>" (preproc_include) "#include <mach/mt_reg_base.h>\n" (#include) "#include" (system_lib_string) "<mach/mt_reg_base.h>" (preproc_include) "#include <mach/irqs.h>\n" (#include) "#include" (system_lib_string) "<mach/irqs.h>" (preproc_include) "#include <accdet_custom_def.h>\n" (#include) "#include" (system_lib_string) "<accdet_custom_def.h>" (preproc_include) "#include <accdet_custom.h>\n" (#include) "#include" (system_lib_string) "<accdet_custom.h>" (preproc_include) "#include <mach/reg_accdet.h>\n" (#include) "#include" (system_lib_string) "<mach/reg_accdet.h>" (comment) "/*******************************************************************************\ncostom API\n*******************************************************************************/" (comment) "/*******************************************************************************\nHAL API\n*******************************************************************************/" (declaration) "int dump_register(void);" (primitive_type) "int" (function_declarator) "dump_register(void)" (identifier) "dump_register" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void mt_accdet_remove(void);" (primitive_type) "void" (function_declarator) "mt_accdet_remove(void)" (identifier) "mt_accdet_remove" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void mt_accdet_suspend(void);" (primitive_type) "void" (function_declarator) "mt_accdet_suspend(void)" (identifier) "mt_accdet_suspend" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void mt_accdet_resume(void);" (primitive_type) "void" (function_declarator) "mt_accdet_resume(void)" (identifier) "mt_accdet_resume" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "void mt_accdet_pm_restore_noirq(void);" (primitive_type) "void" (function_declarator) "mt_accdet_pm_restore_noirq(void)" (identifier) "mt_accdet_pm_restore_noirq" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "int mt_accdet_unlocked_ioctl(unsigned int cmd, unsigned long arg);" (primitive_type) "int" (function_declarator) "mt_accdet_unlocked_ioctl(unsigned int cmd, unsigned long arg)" (identifier) "mt_accdet_unlocked_ioctl" (parameter_list) "(unsigned int cmd, unsigned long arg)" (() "(" (parameter_declaration) "unsigned int cmd" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "cmd" (,) "," (parameter_declaration) "unsigned long arg" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (identifier) "arg" ()) ")" (;) ";" (comment) "//int mt_accdet_store_call_state(const char *buf, size_t count);" (comment) "//int accdet_get_pin_reg_state(void);" (declaration) "int mt_accdet_probe(void);" (primitive_type) "int" (function_declarator) "mt_accdet_probe(void)" (identifier) "mt_accdet_probe" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "int accdet_get_cable_type(void);" (primitive_type) "int" (function_declarator) "accdet_get_cable_type(void)" (identifier) "accdet_get_cable_type" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "struct file_operations *accdet_ops(void);" (struct_specifier) "struct file_operations" (struct) "struct" (type_identifier) "file_operations" (pointer_declarator) "*accdet_ops(void)" (*) "*" (function_declarator) "accdet_ops(void)" (identifier) "accdet_ops" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";"
216
0
{"language": "c", "success": true, "metadata": {"lines": 54, "avg_line_length": 30.72, "nodes": 183, "errors": 0, "source_hash": "663810de0fd0352ff3c07e101368fb0a24a06a944cb5145c6cd79276ec6c720f", "categorized_nodes": 152}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <linux/kernel.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": "<linux/kernel.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 25}}, {"id": 3, "type": "preproc_include", "text": "#include <linux/module.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": "<linux/module.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include <linux/init.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": "<linux/init.h>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 23}}, {"id": 9, "type": "preproc_include", "text": "#include <linux/device.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": "<linux/device.h>", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 25}}, {"id": 12, "type": "preproc_include", "text": "#include <linux/slab.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": "<linux/slab.h>", "parent": 12, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 23}}, {"id": 15, "type": "preproc_include", "text": "#include <linux/fs.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": "<linux/fs.h>", "parent": 15, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 21}}, {"id": 18, "type": "preproc_include", "text": "#include <linux/mm.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": "<linux/mm.h>", "parent": 18, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 21}}, {"id": 21, "type": "preproc_include", "text": "#include <linux/interrupt.h>\n", "parent": null, "children": [22, 23], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<linux/interrupt.h>", "parent": 21, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 28}}, {"id": 24, "type": "preproc_include", "text": "#include <linux/vmalloc.h>\n", "parent": null, "children": [25, 26], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<linux/vmalloc.h>", "parent": 24, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 26}}, {"id": 27, "type": "preproc_include", "text": "#include <linux/platform_device.h>\n", "parent": null, "children": [28, 29], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 29, "type": "system_lib_string", "text": "<linux/platform_device.h>", "parent": 27, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 34}}, {"id": 30, "type": "preproc_include", "text": "#include <linux/miscdevice.h>\n", "parent": null, "children": [31, 32], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 32, "type": "system_lib_string", "text": "<linux/miscdevice.h>", "parent": 30, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 29}}, {"id": 33, "type": "preproc_include", "text": "#include <linux/wait.h>\n", "parent": null, "children": [34, 35], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 35, "type": "system_lib_string", "text": "<linux/wait.h>", "parent": 33, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 23}}, {"id": 36, "type": "preproc_include", "text": "#include <linux/spinlock.h>\n", "parent": null, "children": [37, 38], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 38, "type": "system_lib_string", "text": "<linux/spinlock.h>", "parent": 36, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 27}}, {"id": 39, "type": "preproc_include", "text": "#include <linux/ctype.h>\n", "parent": null, "children": [40, 41], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 41, "type": "system_lib_string", "text": "<linux/ctype.h>", "parent": 39, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 24}}, {"id": 42, "type": "preproc_include", "text": "#include <linux/semaphore.h>\n", "parent": null, "children": [43, 44], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 43, "type": "#include", "text": "#include", "parent": 42, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 44, "type": "system_lib_string", "text": "<linux/semaphore.h>", "parent": 42, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 28}}, {"id": 45, "type": "preproc_include", "text": "#include <asm/uaccess.h>\n", "parent": null, "children": [46, 47], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 46, "type": "#include", "text": "#include", "parent": 45, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 47, "type": "system_lib_string", "text": "<asm/uaccess.h>", "parent": 45, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 24}}, {"id": 48, "type": "preproc_include", "text": "#include <asm/io.h>\n", "parent": null, "children": [49, 50], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 49, "type": "#include", "text": "#include", "parent": 48, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 50, "type": "system_lib_string", "text": "<asm/io.h>", "parent": 48, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 19}}, {"id": 51, "type": "preproc_include", "text": "#include <linux/workqueue.h>\n", "parent": null, "children": [52, 53], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 52, "type": "#include", "text": "#include", "parent": 51, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 53, "type": "system_lib_string", "text": "<linux/workqueue.h>", "parent": 51, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 28}}, {"id": 54, "type": "preproc_include", "text": "#include <linux/switch.h>\n", "parent": null, "children": [55, 56], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 55, "type": "#include", "text": "#include", "parent": 54, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 56, "type": "system_lib_string", "text": "<linux/switch.h>", "parent": 54, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 25}}, {"id": 57, "type": "preproc_include", "text": "#include <linux/delay.h>\n", "parent": null, "children": [58, 59], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 58, "type": "#include", "text": "#include", "parent": 57, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 59, "type": "system_lib_string", "text": "<linux/delay.h>", "parent": 57, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 24}}, {"id": 60, "type": "preproc_include", "text": "#include <linux/device.h>\n", "parent": null, "children": [61, 62], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 61, "type": "#include", "text": "#include", "parent": 60, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 62, "type": "system_lib_string", "text": "<linux/device.h>", "parent": 60, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 25}}, {"id": 63, "type": "preproc_include", "text": "#include <linux/kdev_t.h>\n", "parent": null, "children": [64, 65], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 64, "type": "#include", "text": "#include", "parent": 63, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 8}}, {"id": 65, "type": "system_lib_string", "text": "<linux/kdev_t.h>", "parent": 63, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 25}}, {"id": 66, "type": "preproc_include", "text": "#include <linux/fs.h>\n", "parent": null, "children": [67, 68], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 67, "type": "#include", "text": "#include", "parent": 66, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 68, "type": "system_lib_string", "text": "<linux/fs.h>", "parent": 66, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 21}}, {"id": 69, "type": "preproc_include", "text": "#include <linux/cdev.h>\n", "parent": null, "children": [70, 71], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 70, "type": "#include", "text": "#include", "parent": 69, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 8}}, {"id": 71, "type": "system_lib_string", "text": "<linux/cdev.h>", "parent": 69, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 23}}, {"id": 72, "type": "preproc_include", "text": "#include <asm/uaccess.h>\n", "parent": null, "children": [73, 74], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 0}}, {"id": 73, "type": "#include", "text": "#include", "parent": 72, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 8}}, {"id": 74, "type": "system_lib_string", "text": "<asm/uaccess.h>", "parent": 72, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 24}}, {"id": 75, "type": "preproc_include", "text": "#include <linux/kthread.h>\n", "parent": null, "children": [76, 77], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 76, "type": "#include", "text": "#include", "parent": 75, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 77, "type": "system_lib_string", "text": "<linux/kthread.h>", "parent": 75, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 26}}, {"id": 78, "type": "preproc_include", "text": "#include <linux/input.h>\n", "parent": null, "children": [79, 80], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 79, "type": "#include", "text": "#include", "parent": 78, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 80, "type": "system_lib_string", "text": "<linux/input.h>", "parent": 78, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 24}}, {"id": 81, "type": "preproc_include", "text": "#include <linux/wakelock.h>\n", "parent": null, "children": [82, 83], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 82, "type": "#include", "text": "#include", "parent": 81, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 83, "type": "system_lib_string", "text": "<linux/wakelock.h>", "parent": 81, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 27}}, {"id": 84, "type": "preproc_include", "text": "#include <linux/time.h>\n", "parent": null, "children": [85, 86], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 85, "type": "#include", "text": "#include", "parent": 84, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 8}}, {"id": 86, "type": "system_lib_string", "text": "<linux/time.h>", "parent": 84, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 23}}, {"id": 87, "type": "preproc_include", "text": "#include <linux/string.h>\n", "parent": null, "children": [88, 89], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 88, "type": "#include", "text": "#include", "parent": 87, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 8}}, {"id": 89, "type": "system_lib_string", "text": "<linux/string.h>", "parent": 87, "children": [], "start_point": {"row": 32, "column": 9}, "end_point": {"row": 32, "column": 25}}, {"id": 90, "type": "preproc_include", "text": "#include <mach/mt_typedefs.h>\n", "parent": null, "children": [91, 92], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 91, "type": "#include", "text": "#include", "parent": 90, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 92, "type": "system_lib_string", "text": "<mach/mt_typedefs.h>", "parent": 90, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 29}}, {"id": 93, "type": "preproc_include", "text": "#include <mach/mt_reg_base.h>\n", "parent": null, "children": [94, 95], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 94, "type": "#include", "text": "#include", "parent": 93, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 8}}, {"id": 95, "type": "system_lib_string", "text": "<mach/mt_reg_base.h>", "parent": 93, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 29}}, {"id": 96, "type": "preproc_include", "text": "#include <mach/irqs.h>\n", "parent": null, "children": [97, 98], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 97, "type": "#include", "text": "#include", "parent": 96, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 8}}, {"id": 98, "type": "system_lib_string", "text": "<mach/irqs.h>", "parent": 96, "children": [], "start_point": {"row": 36, "column": 9}, "end_point": {"row": 36, "column": 22}}, {"id": 99, "type": "preproc_include", "text": "#include <accdet_custom_def.h>\n", "parent": null, "children": [100, 101], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 100, "type": "#include", "text": "#include", "parent": 99, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 8}}, {"id": 101, "type": "system_lib_string", "text": "<accdet_custom_def.h>", "parent": 99, "children": [], "start_point": {"row": 37, "column": 9}, "end_point": {"row": 37, "column": 30}}, {"id": 102, "type": "preproc_include", "text": "#include <accdet_custom.h>\n", "parent": null, "children": [103, 104], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 103, "type": "#include", "text": "#include", "parent": 102, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 8}}, {"id": 104, "type": "system_lib_string", "text": "<accdet_custom.h>", "parent": 102, "children": [], "start_point": {"row": 38, "column": 9}, "end_point": {"row": 38, "column": 26}}, {"id": 105, "type": "preproc_include", "text": "#include <mach/reg_accdet.h>\n", "parent": null, "children": [106, 107], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 106, "type": "#include", "text": "#include", "parent": 105, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 8}}, {"id": 107, "type": "system_lib_string", "text": "<mach/reg_accdet.h>", "parent": 105, "children": [], "start_point": {"row": 39, "column": 9}, "end_point": {"row": 39, "column": 28}}, {"id": 108, "type": "declaration", "text": "int dump_register(void);", "parent": null, "children": [109, 110], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 24}}, {"id": 109, "type": "primitive_type", "text": "int", "parent": 108, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 3}}, {"id": 110, "type": "function_declarator", "text": "dump_register(void)", "parent": 108, "children": [111, 112], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 23}}, {"id": 111, "type": "identifier", "text": "dump_register", "parent": 110, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 17}}, {"id": 112, "type": "parameter_list", "text": "(void)", "parent": 110, "children": [113], "start_point": {"row": 49, "column": 17}, "end_point": {"row": 49, "column": 23}}, {"id": 113, "type": "parameter_declaration", "text": "void", "parent": 112, "children": [114], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 22}}, {"id": 114, "type": "primitive_type", "text": "void", "parent": 113, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 22}}, {"id": 115, "type": "declaration", "text": "void mt_accdet_remove(void);", "parent": null, "children": [116, 117], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 28}}, {"id": 116, "type": "primitive_type", "text": "void", "parent": 115, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 4}}, {"id": 117, "type": "function_declarator", "text": "mt_accdet_remove(void)", "parent": 115, "children": [118, 119], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 27}}, {"id": 118, "type": "identifier", "text": "mt_accdet_remove", "parent": 117, "children": [], "start_point": {"row": 50, "column": 5}, "end_point": {"row": 50, "column": 21}}, {"id": 119, "type": "parameter_list", "text": "(void)", "parent": 117, "children": [120], "start_point": {"row": 50, "column": 21}, "end_point": {"row": 50, "column": 27}}, {"id": 120, "type": "parameter_declaration", "text": "void", "parent": 119, "children": [121], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 26}}, {"id": 121, "type": "primitive_type", "text": "void", "parent": 120, "children": [], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 26}}, {"id": 122, "type": "declaration", "text": "void mt_accdet_suspend(void);", "parent": null, "children": [123, 124], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 29}}, {"id": 123, "type": "primitive_type", "text": "void", "parent": 122, "children": [], "start_point": {"row": 51, "column": 0}, "end_point": {"row": 51, "column": 4}}, {"id": 124, "type": "function_declarator", "text": "mt_accdet_suspend(void)", "parent": 122, "children": [125, 126], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 28}}, {"id": 125, "type": "identifier", "text": "mt_accdet_suspend", "parent": 124, "children": [], "start_point": {"row": 51, "column": 5}, "end_point": {"row": 51, "column": 22}}, {"id": 126, "type": "parameter_list", "text": "(void)", "parent": 124, "children": [127], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 28}}, {"id": 127, "type": "parameter_declaration", "text": "void", "parent": 126, "children": [128], "start_point": {"row": 51, "column": 23}, "end_point": {"row": 51, "column": 27}}, {"id": 128, "type": "primitive_type", "text": "void", "parent": 127, "children": [], "start_point": {"row": 51, "column": 23}, "end_point": {"row": 51, "column": 27}}, {"id": 129, "type": "declaration", "text": "void mt_accdet_resume(void);", "parent": null, "children": [130, 131], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 28}}, {"id": 130, "type": "primitive_type", "text": "void", "parent": 129, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 4}}, {"id": 131, "type": "function_declarator", "text": "mt_accdet_resume(void)", "parent": 129, "children": [132, 133], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 27}}, {"id": 132, "type": "identifier", "text": "mt_accdet_resume", "parent": 131, "children": [], "start_point": {"row": 52, "column": 5}, "end_point": {"row": 52, "column": 21}}, {"id": 133, "type": "parameter_list", "text": "(void)", "parent": 131, "children": [134], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 27}}, {"id": 134, "type": "parameter_declaration", "text": "void", "parent": 133, "children": [135], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 26}}, {"id": 135, "type": "primitive_type", "text": "void", "parent": 134, "children": [], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 26}}, {"id": 136, "type": "declaration", "text": "void mt_accdet_pm_restore_noirq(void);", "parent": null, "children": [137, 138], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 38}}, {"id": 137, "type": "primitive_type", "text": "void", "parent": 136, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 4}}, {"id": 138, "type": "function_declarator", "text": "mt_accdet_pm_restore_noirq(void)", "parent": 136, "children": [139, 140], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 37}}, {"id": 139, "type": "identifier", "text": "mt_accdet_pm_restore_noirq", "parent": 138, "children": [], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 31}}, {"id": 140, "type": "parameter_list", "text": "(void)", "parent": 138, "children": [141], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 37}}, {"id": 141, "type": "parameter_declaration", "text": "void", "parent": 140, "children": [142], "start_point": {"row": 53, "column": 32}, "end_point": {"row": 53, "column": 36}}, {"id": 142, "type": "primitive_type", "text": "void", "parent": 141, "children": [], "start_point": {"row": 53, "column": 32}, "end_point": {"row": 53, "column": 36}}, {"id": 143, "type": "declaration", "text": "int mt_accdet_unlocked_ioctl(unsigned int cmd, unsigned long arg);", "parent": null, "children": [144, 145], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 66}}, {"id": 144, "type": "primitive_type", "text": "int", "parent": 143, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 3}}, {"id": 145, "type": "function_declarator", "text": "mt_accdet_unlocked_ioctl(unsigned int cmd, unsigned long arg)", "parent": 143, "children": [146, 147], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 65}}, {"id": 146, "type": "identifier", "text": "mt_accdet_unlocked_ioctl", "parent": 145, "children": [], "start_point": {"row": 54, "column": 4}, "end_point": {"row": 54, "column": 28}}, {"id": 147, "type": "parameter_list", "text": "(unsigned int cmd, unsigned long arg)", "parent": 145, "children": [148, 153], "start_point": {"row": 54, "column": 28}, "end_point": {"row": 54, "column": 65}}, {"id": 148, "type": "parameter_declaration", "text": "unsigned int cmd", "parent": 147, "children": [149, 152], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 45}}, {"id": 149, "type": "sized_type_specifier", "text": "unsigned int", "parent": 148, "children": [150, 151], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 41}}, {"id": 150, "type": "unsigned", "text": "unsigned", "parent": 149, "children": [], "start_point": {"row": 54, "column": 29}, "end_point": {"row": 54, "column": 37}}, {"id": 151, "type": "primitive_type", "text": "int", "parent": 149, "children": [], "start_point": {"row": 54, "column": 38}, "end_point": {"row": 54, "column": 41}}, {"id": 152, "type": "identifier", "text": "cmd", "parent": 148, "children": [], "start_point": {"row": 54, "column": 42}, "end_point": {"row": 54, "column": 45}}, {"id": 153, "type": "parameter_declaration", "text": "unsigned long arg", "parent": 147, "children": [154, 157], "start_point": {"row": 54, "column": 47}, "end_point": {"row": 54, "column": 64}}, {"id": 154, "type": "sized_type_specifier", "text": "unsigned long", "parent": 153, "children": [155, 156], "start_point": {"row": 54, "column": 47}, "end_point": {"row": 54, "column": 60}}, {"id": 155, "type": "unsigned", "text": "unsigned", "parent": 154, "children": [], "start_point": {"row": 54, "column": 47}, "end_point": {"row": 54, "column": 55}}, {"id": 156, "type": "long", "text": "long", "parent": 154, "children": [], "start_point": {"row": 54, "column": 56}, "end_point": {"row": 54, "column": 60}}, {"id": 157, "type": "identifier", "text": "arg", "parent": 153, "children": [], "start_point": {"row": 54, "column": 61}, "end_point": {"row": 54, "column": 64}}, {"id": 158, "type": "declaration", "text": "int mt_accdet_probe(void);", "parent": null, "children": [159, 160], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 26}}, {"id": 159, "type": "primitive_type", "text": "int", "parent": 158, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 3}}, {"id": 160, "type": "function_declarator", "text": "mt_accdet_probe(void)", "parent": 158, "children": [161, 162], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 25}}, {"id": 161, "type": "identifier", "text": "mt_accdet_probe", "parent": 160, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 19}}, {"id": 162, "type": "parameter_list", "text": "(void)", "parent": 160, "children": [163], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 25}}, {"id": 163, "type": "parameter_declaration", "text": "void", "parent": 162, "children": [164], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 24}}, {"id": 164, "type": "primitive_type", "text": "void", "parent": 163, "children": [], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 24}}, {"id": 165, "type": "declaration", "text": "int accdet_get_cable_type(void);", "parent": null, "children": [166, 167], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 32}}, {"id": 166, "type": "primitive_type", "text": "int", "parent": 165, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 3}}, {"id": 167, "type": "function_declarator", "text": "accdet_get_cable_type(void)", "parent": 165, "children": [168, 169], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 31}}, {"id": 168, "type": "identifier", "text": "accdet_get_cable_type", "parent": 167, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 25}}, {"id": 169, "type": "parameter_list", "text": "(void)", "parent": 167, "children": [170], "start_point": {"row": 58, "column": 25}, "end_point": {"row": 58, "column": 31}}, {"id": 170, "type": "parameter_declaration", "text": "void", "parent": 169, "children": [171], "start_point": {"row": 58, "column": 26}, "end_point": {"row": 58, "column": 30}}, {"id": 171, "type": "primitive_type", "text": "void", "parent": 170, "children": [], "start_point": {"row": 58, "column": 26}, "end_point": {"row": 58, "column": 30}}, {"id": 172, "type": "declaration", "text": "struct file_operations *accdet_ops(void);", "parent": null, "children": [173, 176], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 41}}, {"id": 173, "type": "struct_specifier", "text": "struct file_operations", "parent": 172, "children": [174, 175], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 22}}, {"id": 174, "type": "struct", "text": "struct", "parent": 173, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 6}}, {"id": 175, "type": "type_identifier", "text": "file_operations", "parent": 173, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 22}}, {"id": 176, "type": "pointer_declarator", "text": "*accdet_ops(void)", "parent": 172, "children": [177, 178], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 40}}, {"id": 177, "type": "*", "text": "*", "parent": 176, "children": [], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 24}}, {"id": 178, "type": "function_declarator", "text": "accdet_ops(void)", "parent": 176, "children": [179, 180], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 40}}, {"id": 179, "type": "identifier", "text": "accdet_ops", "parent": 178, "children": [], "start_point": {"row": 59, "column": 24}, "end_point": {"row": 59, "column": 34}}, {"id": 180, "type": "parameter_list", "text": "(void)", "parent": 178, "children": [181], "start_point": {"row": 59, "column": 34}, "end_point": {"row": 59, "column": 40}}, {"id": 181, "type": "parameter_declaration", "text": "void", "parent": 180, "children": [182], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 39}}, {"id": 182, "type": "primitive_type", "text": "void", "parent": 181, "children": [], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 39}}]}, "node_categories": {"declarations": {"functions": [110, 117, 124, 131, 138, 145, 160, 167, 178], "variables": [108, 113, 115, 120, 122, 127, 129, 134, 136, 141, 143, 148, 153, 158, 163, 165, 170, 172, 181], "classes": [173, 174], "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, 39, 40, 42, 43, 45, 46, 48, 49, 51, 52, 54, 55, 57, 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], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [111, 118, 125, 132, 139, 146, 149, 152, 154, 157, 161, 168, 175, 179], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98, 101, 104, 107], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 110, "universal_type": "function", "name": "unknown", "text_snippet": "dump_register(void)"}, {"node_id": 117, "universal_type": "function", "name": "unknown", "text_snippet": "mt_accdet_remove(void)"}, {"node_id": 124, "universal_type": "function", "name": "unknown", "text_snippet": "mt_accdet_suspend(void)"}, {"node_id": 131, "universal_type": "function", "name": "unknown", "text_snippet": "mt_accdet_resume(void)"}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "mt_accdet_pm_restore_noirq(void)"}, {"node_id": 145, "universal_type": "function", "name": "cmd,", "text_snippet": "mt_accdet_unlocked_ioctl(unsigned int cmd, unsigned long arg)"}, {"node_id": 160, "universal_type": "function", "name": "unknown", "text_snippet": "mt_accdet_probe(void)"}, {"node_id": 167, "universal_type": "function", "name": "unknown", "text_snippet": "accdet_get_cable_type(void)"}, {"node_id": 178, "universal_type": "function", "name": "unknown", "text_snippet": "accdet_ops(void)"}], "class_declarations": [{"node_id": 173, "universal_type": "class", "name": "file_operations", "text_snippet": "struct file_operations"}, {"node_id": 174, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <linux/kernel.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <linux/module.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <linux/init.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <linux/device.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <linux/slab.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <linux/fs.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <linux/mm.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <linux/interrupt.h>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <linux/vmalloc.h>\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include <linux/platform_device.h>\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include <linux/miscdevice.h>\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include <linux/wait.h>\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include <linux/spinlock.h>\n"}, {"node_id": 37, "text": "#include"}, {"node_id": 39, "text": "#include <linux/ctype.h>\n"}, {"node_id": 40, "text": "#include"}, {"node_id": 42, "text": "#include <linux/semaphore.h>\n"}, {"node_id": 43, "text": "#include"}, {"node_id": 45, "text": "#include <asm/uaccess.h>\n"}, {"node_id": 46, "text": "#include"}, {"node_id": 48, "text": "#include <asm/io.h>\n"}, {"node_id": 49, "text": "#include"}, {"node_id": 51, "text": "#include <linux/workqueue.h>\n"}, {"node_id": 52, "text": "#include"}, {"node_id": 54, "text": "#include <linux/switch.h>\n"}, {"node_id": 55, "text": "#include"}, {"node_id": 57, "text": "#include <linux/delay.h>\n"}, {"node_id": 58, "text": "#include"}, {"node_id": 60, "text": "#include <linux/device.h>\n"}, {"node_id": 61, "text": "#include"}, {"node_id": 63, "text": "#include <linux/kdev_t.h>\n"}, {"node_id": 64, "text": "#include"}, {"node_id": 66, "text": "#include <linux/fs.h>\n"}, {"node_id": 67, "text": "#include"}, {"node_id": 69, "text": "#include <linux/cdev.h>\n"}, {"node_id": 70, "text": "#include"}, {"node_id": 72, "text": "#include <asm/uaccess.h>\n"}, {"node_id": 73, "text": "#include"}, {"node_id": 75, "text": "#include <linux/kthread.h>\n"}, {"node_id": 76, "text": "#include"}, {"node_id": 78, "text": "#include <linux/input.h>\n"}, {"node_id": 79, "text": "#include"}, {"node_id": 81, "text": "#include <linux/wakelock.h>\n"}, {"node_id": 82, "text": "#include"}, {"node_id": 84, "text": "#include <linux/time.h>\n"}, {"node_id": 85, "text": "#include"}, {"node_id": 87, "text": "#include <linux/string.h>\n"}, {"node_id": 88, "text": "#include"}, {"node_id": 90, "text": "#include <mach/mt_typedefs.h>\n"}, {"node_id": 91, "text": "#include"}, {"node_id": 93, "text": "#include <mach/mt_reg_base.h>\n"}, {"node_id": 94, "text": "#include"}, {"node_id": 96, "text": "#include <mach/irqs.h>\n"}, {"node_id": 97, "text": "#include"}, {"node_id": 99, "text": "#include <accdet_custom_def.h>\n"}, {"node_id": 100, "text": "#include"}, {"node_id": 102, "text": "#include <accdet_custom.h>\n"}, {"node_id": 103, "text": "#include"}, {"node_id": 105, "text": "#include <mach/reg_accdet.h>\n"}, {"node_id": 106, "text": "#include"}]}, "original_source_code": "#include <linux/kernel.h>\n#include <linux/module.h>\n#include <linux/init.h>\n#include <linux/device.h>\n#include <linux/slab.h>\n#include <linux/fs.h>\n#include <linux/mm.h>\n#include <linux/interrupt.h>\n#include <linux/vmalloc.h>\n#include <linux/platform_device.h>\n#include <linux/miscdevice.h>\n#include <linux/wait.h>\n#include <linux/spinlock.h>\n#include <linux/ctype.h>\n\n#include <linux/semaphore.h>\n#include <asm/uaccess.h>\n#include <asm/io.h>\n#include <linux/workqueue.h>\n#include <linux/switch.h>\n#include <linux/delay.h>\n\n#include <linux/device.h>\n#include <linux/kdev_t.h>\n#include <linux/fs.h>\n#include <linux/cdev.h>\n#include <asm/uaccess.h>\n#include <linux/kthread.h>\n#include <linux/input.h>\n#include <linux/wakelock.h>\n#include <linux/time.h>\n\n#include <linux/string.h>\n\n#include <mach/mt_typedefs.h>\n#include <mach/mt_reg_base.h>\n#include <mach/irqs.h>\n#include <accdet_custom_def.h>\n#include <accdet_custom.h>\n#include <mach/reg_accdet.h>\n\n\n/*******************************************************************************\ncostom API\n*******************************************************************************/\n/*******************************************************************************\nHAL API\n*******************************************************************************/\n\nint dump_register(void);\nvoid mt_accdet_remove(void);\nvoid mt_accdet_suspend(void);\nvoid mt_accdet_resume(void);\nvoid mt_accdet_pm_restore_noirq(void);\nint mt_accdet_unlocked_ioctl(unsigned int cmd, unsigned long arg);\n//int mt_accdet_store_call_state(const char *buf, size_t count);\n//int accdet_get_pin_reg_state(void);\nint mt_accdet_probe(void);\nint accdet_get_cable_type(void);\nstruct file_operations *accdet_ops(void);\n\n\n\n\n\n\n\n\n"}
54
c
#ifndef SIMPLESTREAMER_H #define SIMPLESTREAMER_H #include "../../src/sio_client.h" #include <functional> #include <iostream> #include <thread> #include <mutex> #include <condition_variable> #include <string> class SimpleStreamer { private: std::mutex _lock; std::condition_variable_any _cond; bool _connect_finish = false; bool _connected = false; sio::client h; std::string url; void on_connected() { _lock.lock(); _cond.notify_all(); _connect_finish = true; _connected = true; _lock.unlock(); }; void on_close(sio::client::close_reason const& reason) { _connected = false; }; void on_fail() { _lock.lock(); _cond.notify_all(); _connect_finish = true; _connected = false; _lock.unlock(); }; public: SimpleStreamer() { }; bool connect(std::string url) { h.set_open_listener(std::bind(&SimpleStreamer::on_connected,this)); h.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1)); h.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this)); h.connect(url); _lock.lock(); if(!_connect_finish) { _cond.wait(_lock); } _lock.unlock(); return _connected; }; void close() { h.sync_close(); h.clear_con_listeners(); }; bool sendBuffer(std::string name, char* buff, int length) { if(_connected) { h.socket()->emit(name, std::make_shared<std::string>(buff, length)); } return _connected; }; bool sendMessage(std::string name, std::string message) { if(_connected) { h.socket()->emit(name, message); } return _connected; }; bool isConnected() { return _connected; }; }; #endif
18.47
83
(translation_unit) "#ifndef SIMPLESTREAMER_H\n#define SIMPLESTREAMER_H\n\n#include "../../src/sio_client.h"\n\n#include <functional>\n#include <iostream>\n#include <thread>\n#include <mutex>\n#include <condition_variable>\n#include <string>\n\nclass SimpleStreamer\n{\n\nprivate:\n\n std::mutex _lock;\n std::condition_variable_any _cond;\n bool _connect_finish = false;\n bool _connected = false;\n\n sio::client h;\n std::string url;\n\n void on_connected()\n {\n _lock.lock();\n _cond.notify_all();\n _connect_finish = true;\n _connected = true;\n _lock.unlock();\n\n };\n\n void on_close(sio::client::close_reason const& reason)\n {\n _connected = false;\n };\n\n void on_fail()\n {\n _lock.lock();\n _cond.notify_all();\n _connect_finish = true;\n _connected = false;\n _lock.unlock();\n };\n\npublic:\n\n SimpleStreamer()\n {\n };\n\n bool connect(std::string url)\n {\n h.set_open_listener(std::bind(&SimpleStreamer::on_connected,this));\n h.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1));\n h.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this));\n h.connect(url);\n _lock.lock();\n if(!_connect_finish)\n {\n _cond.wait(_lock);\n }\n _lock.unlock();\n return _connected;\n };\n\n void close()\n {\n h.sync_close();\n h.clear_con_listeners();\n };\n\n bool sendBuffer(std::string name, char* buff, int length)\n {\n if(_connected)\n {\n h.socket()->emit(name, std::make_shared<std::string>(buff, length));\n }\n return _connected;\n };\n\n bool sendMessage(std::string name, std::string message)\n {\n if(_connected)\n {\n h.socket()->emit(name, message);\n }\n return _connected;\n };\n\n bool isConnected()\n {\n return _connected;\n };\n\n};\n\n#endif\n" (preproc_ifdef) "#ifndef SIMPLESTREAMER_H\n#define SIMPLESTREAMER_H\n\n#include "../../src/sio_client.h"\n\n#include <functional>\n#include <iostream>\n#include <thread>\n#include <mutex>\n#include <condition_variable>\n#include <string>\n\nclass SimpleStreamer\n{\n\nprivate:\n\n std::mutex _lock;\n std::condition_variable_any _cond;\n bool _connect_finish = false;\n bool _connected = false;\n\n sio::client h;\n std::string url;\n\n void on_connected()\n {\n _lock.lock();\n _cond.notify_all();\n _connect_finish = true;\n _connected = true;\n _lock.unlock();\n\n };\n\n void on_close(sio::client::close_reason const& reason)\n {\n _connected = false;\n };\n\n void on_fail()\n {\n _lock.lock();\n _cond.notify_all();\n _connect_finish = true;\n _connected = false;\n _lock.unlock();\n };\n\npublic:\n\n SimpleStreamer()\n {\n };\n\n bool connect(std::string url)\n {\n h.set_open_listener(std::bind(&SimpleStreamer::on_connected,this));\n h.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1));\n h.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this));\n h.connect(url);\n _lock.lock();\n if(!_connect_finish)\n {\n _cond.wait(_lock);\n }\n _lock.unlock();\n return _connected;\n };\n\n void close()\n {\n h.sync_close();\n h.clear_con_listeners();\n };\n\n bool sendBuffer(std::string name, char* buff, int length)\n {\n if(_connected)\n {\n h.socket()->emit(name, std::make_shared<std::string>(buff, length));\n }\n return _connected;\n };\n\n bool sendMessage(std::string name, std::string message)\n {\n if(_connected)\n {\n h.socket()->emit(name, message);\n }\n return _connected;\n };\n\n bool isConnected()\n {\n return _connected;\n };\n\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "SIMPLESTREAMER_H" (preproc_def) "#define SIMPLESTREAMER_H\n" (#define) "#define" (identifier) "SIMPLESTREAMER_H" (preproc_include) "#include "../../src/sio_client.h"\n" (#include) "#include" (string_literal) ""../../src/sio_client.h"" (") """ (string_content) "../../src/sio_client.h" (") """ (preproc_include) "#include <functional>\n" (#include) "#include" (system_lib_string) "<functional>" (preproc_include) "#include <iostream>\n" (#include) "#include" (system_lib_string) "<iostream>" (preproc_include) "#include <thread>\n" (#include) "#include" (system_lib_string) "<thread>" (preproc_include) "#include <mutex>\n" (#include) "#include" (system_lib_string) "<mutex>" (preproc_include) "#include <condition_variable>\n" (#include) "#include" (system_lib_string) "<condition_variable>" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (function_definition) "class SimpleStreamer\n{\n\nprivate:\n\n std::mutex _lock;\n std::condition_variable_any _cond;\n bool _connect_finish = false;\n bool _connected = false;\n\n sio::client h;\n std::string url;\n\n void on_connected()\n {\n _lock.lock();\n _cond.notify_all();\n _connect_finish = true;\n _connected = true;\n _lock.unlock();\n\n };\n\n void on_close(sio::client::close_reason const& reason)\n {\n _connected = false;\n };\n\n void on_fail()\n {\n _lock.lock();\n _cond.notify_all();\n _connect_finish = true;\n _connected = false;\n _lock.unlock();\n };\n\npublic:\n\n SimpleStreamer()\n {\n };\n\n bool connect(std::string url)\n {\n h.set_open_listener(std::bind(&SimpleStreamer::on_connected,this));\n h.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1));\n h.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this));\n h.connect(url);\n _lock.lock();\n if(!_connect_finish)\n {\n _cond.wait(_lock);\n }\n _lock.unlock();\n return _connected;\n };\n\n void close()\n {\n h.sync_close();\n h.clear_con_listeners();\n };\n\n bool sendBuffer(std::string name, char* buff, int length)\n {\n if(_connected)\n {\n h.socket()->emit(name, std::make_shared<std::string>(buff, length));\n }\n return _connected;\n };\n\n bool sendMessage(std::string name, std::string message)\n {\n if(_connected)\n {\n h.socket()->emit(name, message);\n }\n return _connected;\n };\n\n bool isConnected()\n {\n return _connected;\n };\n\n}" (type_identifier) "class" (identifier) "SimpleStreamer" (compound_statement) "{\n\nprivate:\n\n std::mutex _lock;\n std::condition_variable_any _cond;\n bool _connect_finish = false;\n bool _connected = false;\n\n sio::client h;\n std::string url;\n\n void on_connected()\n {\n _lock.lock();\n _cond.notify_all();\n _connect_finish = true;\n _connected = true;\n _lock.unlock();\n\n };\n\n void on_close(sio::client::close_reason const& reason)\n {\n _connected = false;\n };\n\n void on_fail()\n {\n _lock.lock();\n _cond.notify_all();\n _connect_finish = true;\n _connected = false;\n _lock.unlock();\n };\n\npublic:\n\n SimpleStreamer()\n {\n };\n\n bool connect(std::string url)\n {\n h.set_open_listener(std::bind(&SimpleStreamer::on_connected,this));\n h.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1));\n h.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this));\n h.connect(url);\n _lock.lock();\n if(!_connect_finish)\n {\n _cond.wait(_lock);\n }\n _lock.unlock();\n return _connected;\n };\n\n void close()\n {\n h.sync_close();\n h.clear_con_listeners();\n };\n\n bool sendBuffer(std::string name, char* buff, int length)\n {\n if(_connected)\n {\n h.socket()->emit(name, std::make_shared<std::string>(buff, length));\n }\n return _connected;\n };\n\n bool sendMessage(std::string name, std::string message)\n {\n if(_connected)\n {\n h.socket()->emit(name, message);\n }\n return _connected;\n };\n\n bool isConnected()\n {\n return _connected;\n };\n\n}" ({) "{" (labeled_statement) "private:\n\n std::mutex _lock;" (statement_identifier) "private" (:) ":" (labeled_statement) "std::mutex _lock;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "mutex _lock;" (type_identifier) "mutex" (identifier) "_lock" (;) ";" (labeled_statement) "std::condition_variable_any _cond;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "condition_variable_any _cond;" (type_identifier) "condition_variable_any" (identifier) "_cond" (;) ";" (declaration) "bool _connect_finish = false;" (primitive_type) "bool" (init_declarator) "_connect_finish = false" (identifier) "_connect_finish" (=) "=" (false) "false" (;) ";" (declaration) "bool _connected = false;" (primitive_type) "bool" (init_declarator) "_connected = false" (identifier) "_connected" (=) "=" (false) "false" (;) ";" (labeled_statement) "sio::client h;" (statement_identifier) "sio" (:) ":" (ERROR) ":" (:) ":" (declaration) "client h;" (type_identifier) "client" (identifier) "h" (;) ";" (labeled_statement) "std::string url;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string url;" (type_identifier) "string" (identifier) "url" (;) ";" (function_definition) "void on_connected()\n {\n _lock.lock();\n _cond.notify_all();\n _connect_finish = true;\n _connected = true;\n _lock.unlock();\n\n }" (primitive_type) "void" (function_declarator) "on_connected()" (identifier) "on_connected" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n _lock.lock();\n _cond.notify_all();\n _connect_finish = true;\n _connected = true;\n _lock.unlock();\n\n }" ({) "{" (expression_statement) "_lock.lock();" (call_expression) "_lock.lock()" (field_expression) "_lock.lock" (identifier) "_lock" (.) "." (field_identifier) "lock" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "_cond.notify_all();" (call_expression) "_cond.notify_all()" (field_expression) "_cond.notify_all" (identifier) "_cond" (.) "." (field_identifier) "notify_all" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "_connect_finish = true;" (assignment_expression) "_connect_finish = true" (identifier) "_connect_finish" (=) "=" (true) "true" (;) ";" (expression_statement) "_connected = true;" (assignment_expression) "_connected = true" (identifier) "_connected" (=) "=" (true) "true" (;) ";" (expression_statement) "_lock.unlock();" (call_expression) "_lock.unlock()" (field_expression) "_lock.unlock" (identifier) "_lock" (.) "." (field_identifier) "unlock" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "void on_close(sio::client::close_reason const& reason)\n {\n _connected = false;\n }" (primitive_type) "void" (function_declarator) "on_close(sio::client::close_reason const& reason)" (identifier) "on_close" (parameter_list) "(sio::client::close_reason const& reason)" (() "(" (parameter_declaration) "sio::client::close_reason const& reason" (type_identifier) "sio" (ERROR) "::client::close_reason const&" (:) ":" (:) ":" (identifier) "client" (:) ":" (:) ":" (identifier) "close_reason" (identifier) "const" (&) "&" (identifier) "reason" ()) ")" (compound_statement) "{\n _connected = false;\n }" ({) "{" (expression_statement) "_connected = false;" (assignment_expression) "_connected = false" (identifier) "_connected" (=) "=" (false) "false" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "void on_fail()\n {\n _lock.lock();\n _cond.notify_all();\n _connect_finish = true;\n _connected = false;\n _lock.unlock();\n }" (primitive_type) "void" (function_declarator) "on_fail()" (identifier) "on_fail" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n _lock.lock();\n _cond.notify_all();\n _connect_finish = true;\n _connected = false;\n _lock.unlock();\n }" ({) "{" (expression_statement) "_lock.lock();" (call_expression) "_lock.lock()" (field_expression) "_lock.lock" (identifier) "_lock" (.) "." (field_identifier) "lock" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "_cond.notify_all();" (call_expression) "_cond.notify_all()" (field_expression) "_cond.notify_all" (identifier) "_cond" (.) "." (field_identifier) "notify_all" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "_connect_finish = true;" (assignment_expression) "_connect_finish = true" (identifier) "_connect_finish" (=) "=" (true) "true" (;) ";" (expression_statement) "_connected = false;" (assignment_expression) "_connected = false" (identifier) "_connected" (=) "=" (false) "false" (;) ";" (expression_statement) "_lock.unlock();" (call_expression) "_lock.unlock()" (field_expression) "_lock.unlock" (identifier) "_lock" (.) "." (field_identifier) "unlock" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (labeled_statement) "public:\n\n SimpleStreamer()" (statement_identifier) "public" (:) ":" (expression_statement) "SimpleStreamer()" (call_expression) "SimpleStreamer()" (identifier) "SimpleStreamer" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{\n }" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "bool connect(std::string url)\n {\n h.set_open_listener(std::bind(&SimpleStreamer::on_connected,this));\n h.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1));\n h.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this));\n h.connect(url);\n _lock.lock();\n if(!_connect_finish)\n {\n _cond.wait(_lock);\n }\n _lock.unlock();\n return _connected;\n }" (primitive_type) "bool" (function_declarator) "connect(std::string url)" (identifier) "connect" (parameter_list) "(std::string url)" (() "(" (parameter_declaration) "std::string url" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (identifier) "url" ()) ")" (compound_statement) "{\n h.set_open_listener(std::bind(&SimpleStreamer::on_connected,this));\n h.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1));\n h.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this));\n h.connect(url);\n _lock.lock();\n if(!_connect_finish)\n {\n _cond.wait(_lock);\n }\n _lock.unlock();\n return _connected;\n }" ({) "{" (expression_statement) "h.set_open_listener(std::bind(&SimpleStreamer::on_connected,this));" (call_expression) "h.set_open_listener(std::bind(&SimpleStreamer::on_connected,this))" (field_expression) "h.set_open_listener" (identifier) "h" (.) "." (field_identifier) "set_open_listener" (argument_list) "(std::bind(&SimpleStreamer::on_connected,this))" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (call_expression) "bind(&SimpleStreamer::on_connected,this)" (identifier) "bind" (argument_list) "(&SimpleStreamer::on_connected,this)" (() "(" (pointer_expression) "&SimpleStreamer" (&) "&" (identifier) "SimpleStreamer" (ERROR) "::on_connected" (:) ":" (:) ":" (identifier) "on_connected" (,) "," (identifier) "this" ()) ")" ()) ")" (;) ";" (expression_statement) "h.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1));" (call_expression) "h.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1))" (field_expression) "h.set_close_listener" (identifier) "h" (.) "." (field_identifier) "set_close_listener" (argument_list) "(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1))" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (call_expression) "bind(&SimpleStreamer::on_close,this, std::placeholders::_1)" (identifier) "bind" (argument_list) "(&SimpleStreamer::on_close,this, std::placeholders::_1)" (() "(" (pointer_expression) "&SimpleStreamer" (&) "&" (identifier) "SimpleStreamer" (ERROR) "::on_close" (:) ":" (:) ":" (identifier) "on_close" (,) "," (identifier) "this" (,) "," (ERROR) "std::placeholders::" (identifier) "std" (:) ":" (:) ":" (identifier) "placeholders" (:) ":" (:) ":" (identifier) "_1" ()) ")" ()) ")" (;) ";" (expression_statement) "h.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this));" (call_expression) "h.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this))" (field_expression) "h.set_fail_listener" (identifier) "h" (.) "." (field_identifier) "set_fail_listener" (argument_list) "(std::bind(&SimpleStreamer::on_fail,this))" (() "(" (ERROR) "std::" (identifier) "std" (:) ":" (:) ":" (call_expression) "bind(&SimpleStreamer::on_fail,this)" (identifier) "bind" (argument_list) "(&SimpleStreamer::on_fail,this)" (() "(" (pointer_expression) "&SimpleStreamer" (&) "&" (identifier) "SimpleStreamer" (ERROR) "::on_fail" (:) ":" (:) ":" (identifier) "on_fail" (,) "," (identifier) "this" ()) ")" ()) ")" (;) ";" (expression_statement) "h.connect(url);" (call_expression) "h.connect(url)" (field_expression) "h.connect" (identifier) "h" (.) "." (field_identifier) "connect" (argument_list) "(url)" (() "(" (identifier) "url" ()) ")" (;) ";" (expression_statement) "_lock.lock();" (call_expression) "_lock.lock()" (field_expression) "_lock.lock" (identifier) "_lock" (.) "." (field_identifier) "lock" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if(!_connect_finish)\n {\n _cond.wait(_lock);\n }" (if) "if" (parenthesized_expression) "(!_connect_finish)" (() "(" (unary_expression) "!_connect_finish" (!) "!" (identifier) "_connect_finish" ()) ")" (compound_statement) "{\n _cond.wait(_lock);\n }" ({) "{" (expression_statement) "_cond.wait(_lock);" (call_expression) "_cond.wait(_lock)" (field_expression) "_cond.wait" (identifier) "_cond" (.) "." (field_identifier) "wait" (argument_list) "(_lock)" (() "(" (identifier) "_lock" ()) ")" (;) ";" (}) "}" (expression_statement) "_lock.unlock();" (call_expression) "_lock.unlock()" (field_expression) "_lock.unlock" (identifier) "_lock" (.) "." (field_identifier) "unlock" (argument_list) "()" (() "(" ()) ")" (;) ";" (return_statement) "return _connected;" (return) "return" (identifier) "_connected" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "void close()\n {\n h.sync_close();\n h.clear_con_listeners();\n }" (primitive_type) "void" (function_declarator) "close()" (identifier) "close" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n h.sync_close();\n h.clear_con_listeners();\n }" ({) "{" (expression_statement) "h.sync_close();" (call_expression) "h.sync_close()" (field_expression) "h.sync_close" (identifier) "h" (.) "." (field_identifier) "sync_close" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "h.clear_con_listeners();" (call_expression) "h.clear_con_listeners()" (field_expression) "h.clear_con_listeners" (identifier) "h" (.) "." (field_identifier) "clear_con_listeners" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "bool sendBuffer(std::string name, char* buff, int length)\n {\n if(_connected)\n {\n h.socket()->emit(name, std::make_shared<std::string>(buff, length));\n }\n return _connected;\n }" (primitive_type) "bool" (function_declarator) "sendBuffer(std::string name, char* buff, int length)" (identifier) "sendBuffer" (parameter_list) "(std::string name, char* buff, int length)" (() "(" (parameter_declaration) "std::string name" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (identifier) "name" (,) "," (parameter_declaration) "char* buff" (primitive_type) "char" (pointer_declarator) "* buff" (*) "*" (identifier) "buff" (,) "," (parameter_declaration) "int length" (primitive_type) "int" (identifier) "length" ()) ")" (compound_statement) "{\n if(_connected)\n {\n h.socket()->emit(name, std::make_shared<std::string>(buff, length));\n }\n return _connected;\n }" ({) "{" (if_statement) "if(_connected)\n {\n h.socket()->emit(name, std::make_shared<std::string>(buff, length));\n }" (if) "if" (parenthesized_expression) "(_connected)" (() "(" (identifier) "_connected" ()) ")" (compound_statement) "{\n h.socket()->emit(name, std::make_shared<std::string>(buff, length));\n }" ({) "{" (expression_statement) "h.socket()->emit(name, std::make_shared<std::string>(buff, length));" (call_expression) "h.socket()->emit(name, std::make_shared<std::string>(buff, length))" (field_expression) "h.socket()->emit" (call_expression) "h.socket()" (field_expression) "h.socket" (identifier) "h" (.) "." (field_identifier) "socket" (argument_list) "()" (() "(" ()) ")" (->) "->" (field_identifier) "emit" (argument_list) "(name, std::make_shared<std::string>(buff, length))" (() "(" (identifier) "name" (,) "," (ERROR) "std::make_shared<std::" (identifier) "std" (:) ":" (:) ":" (binary_expression) "make_shared<std" (identifier) "make_shared" (<) "<" (identifier) "std" (:) ":" (:) ":" (binary_expression) "string>(buff, length)" (identifier) "string" (>) ">" (parenthesized_expression) "(buff, length)" (() "(" (comma_expression) "buff, length" (identifier) "buff" (,) "," (identifier) "length" ()) ")" ()) ")" (;) ";" (}) "}" (return_statement) "return _connected;" (return) "return" (identifier) "_connected" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "bool sendMessage(std::string name, std::string message)\n {\n if(_connected)\n {\n h.socket()->emit(name, message);\n }\n return _connected;\n }" (primitive_type) "bool" (function_declarator) "sendMessage(std::string name, std::string message)" (identifier) "sendMessage" (parameter_list) "(std::string name, std::string message)" (() "(" (parameter_declaration) "std::string name" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (identifier) "name" (,) "," (parameter_declaration) "std::string message" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (identifier) "message" ()) ")" (compound_statement) "{\n if(_connected)\n {\n h.socket()->emit(name, message);\n }\n return _connected;\n }" ({) "{" (if_statement) "if(_connected)\n {\n h.socket()->emit(name, message);\n }" (if) "if" (parenthesized_expression) "(_connected)" (() "(" (identifier) "_connected" ()) ")" (compound_statement) "{\n h.socket()->emit(name, message);\n }" ({) "{" (expression_statement) "h.socket()->emit(name, message);" (call_expression) "h.socket()->emit(name, message)" (field_expression) "h.socket()->emit" (call_expression) "h.socket()" (field_expression) "h.socket" (identifier) "h" (.) "." (field_identifier) "socket" (argument_list) "()" (() "(" ()) ")" (->) "->" (field_identifier) "emit" (argument_list) "(name, message)" (() "(" (identifier) "name" (,) "," (identifier) "message" ()) ")" (;) ";" (}) "}" (return_statement) "return _connected;" (return) "return" (identifier) "_connected" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "bool isConnected()\n {\n return _connected;\n }" (primitive_type) "bool" (function_declarator) "isConnected()" (identifier) "isConnected" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return _connected;\n }" ({) "{" (return_statement) "return _connected;" (return) "return" (identifier) "_connected" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif"
604
17
{"language": "c", "success": true, "metadata": {"lines": 83, "avg_line_length": 18.47, "nodes": 325, "errors": 0, "source_hash": "5f4bb3f459384c684d49c698a5e18ace60083ed411490d832f21dced61252215", "categorized_nodes": 240}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef SIMPLESTREAMER_H\n#define SIMPLESTREAMER_H\n\n#include \"../../src/sio_client.h\"\n\n#include <functional>\n#include <iostream>\n#include <thread>\n#include <mutex>\n#include <condition_variable>\n#include <string>\n\nclass SimpleStreamer\n{\n\nprivate:\n\n std::mutex _lock;\n std::condition_variable_any _cond;\n bool _connect_finish = false;\n bool _connected = false;\n\n sio::client h;\n std::string url;\n\n void on_connected()\n {\n\t_lock.lock();\n\t_cond.notify_all();\n\t_connect_finish = true;\n\t_connected = true;\n\t_lock.unlock();\n\n };\n\n void on_close(sio::client::close_reason const& reason)\n {\n\t_connected = false;\n };\n\n void on_fail()\n {\n\t_lock.lock();\n\t_cond.notify_all();\n\t_connect_finish = true;\n\t_connected = false;\n\t_lock.unlock();\n };\n\npublic:\n\n SimpleStreamer()\n {\n };\n\n bool connect(std::string url)\n {\n\th.set_open_listener(std::bind(&SimpleStreamer::on_connected,this));\n\th.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1));\n\th.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this));\n\th.connect(url);\n\t_lock.lock();\n\tif(!_connect_finish)\n\t {\n\t\t_cond.wait(_lock);\n\t }\n\t_lock.unlock();\n\treturn _connected;\n };\n\n void close()\n {\n\th.sync_close();\n\th.clear_con_listeners();\n };\n\n bool sendBuffer(std::string name, char* buff, int length)\n {\n\tif(_connected)\n\t {\n\t\th.socket()->emit(name, std::make_shared<std::string>(buff, length));\n\t }\n\treturn _connected;\n };\n\n bool sendMessage(std::string name, std::string message)\n {\n\tif(_connected)\n\t {\n\t\th.socket()->emit(name, message);\n\t }\n\treturn _connected;\n };\n\n bool isConnected()\n {\n\treturn _connected;\n };\n\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 324], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 101, "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": "SIMPLESTREAMER_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 24}}, {"id": 3, "type": "preproc_def", "text": "#define SIMPLESTREAMER_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": "SIMPLESTREAMER_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 24}}, {"id": 6, "type": "preproc_include", "text": "#include \"../../src/sio_client.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": "\"../../src/sio_client.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 33}}, {"id": 9, "type": "preproc_include", "text": "#include <functional>\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": "<functional>", "parent": 9, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 21}}, {"id": 12, "type": "preproc_include", "text": "#include <iostream>\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": "<iostream>", "parent": 12, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include <thread>\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": "<thread>", "parent": 15, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 17}}, {"id": 18, "type": "preproc_include", "text": "#include <mutex>\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": "<mutex>", "parent": 18, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 16}}, {"id": 21, "type": "preproc_include", "text": "#include <condition_variable>\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": "<condition_variable>", "parent": 21, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 29}}, {"id": 24, "type": "preproc_include", "text": "#include <string>\n", "parent": 0, "children": [25, 26], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<string>", "parent": 24, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 17}}, {"id": 27, "type": "function_definition", "text": "class SimpleStreamer\n{\n\nprivate:\n\n std::mutex _lock;\n std::condition_variable_any _cond;\n bool _connect_finish = false;\n bool _connected = false;\n\n sio::client h;\n std::string url;\n\n void on_connected()\n {\n\t_lock.lock();\n\t_cond.notify_all();\n\t_connect_finish = true;\n\t_connected = true;\n\t_lock.unlock();\n\n };\n\n void on_close(sio::client::close_reason const& reason)\n {\n\t_connected = false;\n };\n\n void on_fail()\n {\n\t_lock.lock();\n\t_cond.notify_all();\n\t_connect_finish = true;\n\t_connected = false;\n\t_lock.unlock();\n };\n\npublic:\n\n SimpleStreamer()\n {\n };\n\n bool connect(std::string url)\n {\n\th.set_open_listener(std::bind(&SimpleStreamer::on_connected,this));\n\th.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1));\n\th.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this));\n\th.connect(url);\n\t_lock.lock();\n\tif(!_connect_finish)\n\t {\n\t\t_cond.wait(_lock);\n\t }\n\t_lock.unlock();\n\treturn _connected;\n };\n\n void close()\n {\n\th.sync_close();\n\th.clear_con_listeners();\n };\n\n bool sendBuffer(std::string name, char* buff, int length)\n {\n\tif(_connected)\n\t {\n\t\th.socket()->emit(name, std::make_shared<std::string>(buff, length));\n\t }\n\treturn _connected;\n };\n\n bool sendMessage(std::string name, std::string message)\n {\n\tif(_connected)\n\t {\n\t\th.socket()->emit(name, message);\n\t }\n\treturn _connected;\n };\n\n bool isConnected()\n {\n\treturn _connected;\n };\n\n}", "parent": 0, "children": [28], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 99, "column": 1}}, {"id": 28, "type": "identifier", "text": "SimpleStreamer", "parent": 27, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 20}}, {"id": 29, "type": "labeled_statement", "text": "private:\n\n std::mutex _lock;", "parent": 27, "children": [30], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 17, "column": 19}}, {"id": 30, "type": "labeled_statement", "text": "std::mutex _lock;", "parent": 29, "children": [31, 32], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 19}}, {"id": 31, "type": "statement_identifier", "text": "std", "parent": 30, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 5}}, {"id": 32, "type": "declaration", "text": "mutex _lock;", "parent": 30, "children": [33, 34], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 19}}, {"id": 33, "type": "type_identifier", "text": "mutex", "parent": 32, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 12}}, {"id": 34, "type": "identifier", "text": "_lock", "parent": 32, "children": [], "start_point": {"row": 17, "column": 13}, "end_point": {"row": 17, "column": 18}}, {"id": 35, "type": "labeled_statement", "text": "std::condition_variable_any _cond;", "parent": 27, "children": [36, 37], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 36}}, {"id": 36, "type": "statement_identifier", "text": "std", "parent": 35, "children": [], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 5}}, {"id": 37, "type": "declaration", "text": "condition_variable_any _cond;", "parent": 35, "children": [38, 39], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 36}}, {"id": 38, "type": "type_identifier", "text": "condition_variable_any", "parent": 37, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 29}}, {"id": 39, "type": "identifier", "text": "_cond", "parent": 37, "children": [], "start_point": {"row": 18, "column": 30}, "end_point": {"row": 18, "column": 35}}, {"id": 40, "type": "declaration", "text": "bool _connect_finish = false;", "parent": 27, "children": [41, 42], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 31}}, {"id": 41, "type": "primitive_type", "text": "bool", "parent": 40, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 6}}, {"id": 42, "type": "init_declarator", "text": "_connect_finish = false", "parent": 40, "children": [43, 44, 45], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 30}}, {"id": 43, "type": "identifier", "text": "_connect_finish", "parent": 42, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 22}}, {"id": 44, "type": "=", "text": "=", "parent": 42, "children": [], "start_point": {"row": 19, "column": 23}, "end_point": {"row": 19, "column": 24}}, {"id": 45, "type": "false", "text": "false", "parent": 42, "children": [], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 30}}, {"id": 46, "type": "declaration", "text": "bool _connected = false;", "parent": 27, "children": [47, 48], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 26}}, {"id": 47, "type": "primitive_type", "text": "bool", "parent": 46, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 6}}, {"id": 48, "type": "init_declarator", "text": "_connected = false", "parent": 46, "children": [49, 50, 51], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 25}}, {"id": 49, "type": "identifier", "text": "_connected", "parent": 48, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 17}}, {"id": 50, "type": "=", "text": "=", "parent": 48, "children": [], "start_point": {"row": 20, "column": 18}, "end_point": {"row": 20, "column": 19}}, {"id": 51, "type": "false", "text": "false", "parent": 48, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 25}}, {"id": 52, "type": "labeled_statement", "text": "sio::client h;", "parent": 27, "children": [53, 54], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 16}}, {"id": 53, "type": "statement_identifier", "text": "sio", "parent": 52, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 5}}, {"id": 54, "type": "declaration", "text": "client h;", "parent": 52, "children": [55, 56], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 16}}, {"id": 55, "type": "type_identifier", "text": "client", "parent": 54, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 13}}, {"id": 56, "type": "identifier", "text": "h", "parent": 54, "children": [], "start_point": {"row": 22, "column": 14}, "end_point": {"row": 22, "column": 15}}, {"id": 57, "type": "labeled_statement", "text": "std::string url;", "parent": 27, "children": [58, 59], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 18}}, {"id": 58, "type": "statement_identifier", "text": "std", "parent": 57, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 5}}, {"id": 59, "type": "declaration", "text": "string url;", "parent": 57, "children": [60, 61], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 18}}, {"id": 60, "type": "type_identifier", "text": "string", "parent": 59, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 13}}, {"id": 61, "type": "identifier", "text": "url", "parent": 59, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 17}}, {"id": 62, "type": "function_definition", "text": "void on_connected()\n {\n\t_lock.lock();\n\t_cond.notify_all();\n\t_connect_finish = true;\n\t_connected = true;\n\t_lock.unlock();\n\n }", "parent": 27, "children": [63, 64], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 33, "column": 3}}, {"id": 63, "type": "primitive_type", "text": "void", "parent": 62, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 6}}, {"id": 64, "type": "function_declarator", "text": "on_connected()", "parent": 62, "children": [65, 66], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 21}}, {"id": 65, "type": "identifier", "text": "on_connected", "parent": 64, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 19}}, {"id": 66, "type": "parameter_list", "text": "()", "parent": 64, "children": [], "start_point": {"row": 25, "column": 19}, "end_point": {"row": 25, "column": 21}}, {"id": 67, "type": "call_expression", "text": "_lock.lock()", "parent": 62, "children": [68, 71], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 13}}, {"id": 68, "type": "field_expression", "text": "_lock.lock", "parent": 67, "children": [69, 70], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 11}}, {"id": 69, "type": "identifier", "text": "_lock", "parent": 68, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 6}}, {"id": 70, "type": "field_identifier", "text": "lock", "parent": 68, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 11}}, {"id": 71, "type": "argument_list", "text": "()", "parent": 67, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 13}}, {"id": 72, "type": "call_expression", "text": "_cond.notify_all()", "parent": 62, "children": [73, 76], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 19}}, {"id": 73, "type": "field_expression", "text": "_cond.notify_all", "parent": 72, "children": [74, 75], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 17}}, {"id": 74, "type": "identifier", "text": "_cond", "parent": 73, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 6}}, {"id": 75, "type": "field_identifier", "text": "notify_all", "parent": 73, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 17}}, {"id": 76, "type": "argument_list", "text": "()", "parent": 72, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 19}}, {"id": 77, "type": "assignment_expression", "text": "_connect_finish = true", "parent": 62, "children": [78, 79, 80], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 23}}, {"id": 78, "type": "identifier", "text": "_connect_finish", "parent": 77, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 16}}, {"id": 79, "type": "=", "text": "=", "parent": 77, "children": [], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 18}}, {"id": 80, "type": "true", "text": "true", "parent": 77, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 23}}, {"id": 81, "type": "assignment_expression", "text": "_connected = true", "parent": 62, "children": [82, 83, 84], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 18}}, {"id": 82, "type": "identifier", "text": "_connected", "parent": 81, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 11}}, {"id": 83, "type": "=", "text": "=", "parent": 81, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 13}}, {"id": 84, "type": "true", "text": "true", "parent": 81, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 18}}, {"id": 85, "type": "call_expression", "text": "_lock.unlock()", "parent": 62, "children": [86, 89], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 15}}, {"id": 86, "type": "field_expression", "text": "_lock.unlock", "parent": 85, "children": [87, 88], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 13}}, {"id": 87, "type": "identifier", "text": "_lock", "parent": 86, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 6}}, {"id": 88, "type": "field_identifier", "text": "unlock", "parent": 86, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 13}}, {"id": 89, "type": "argument_list", "text": "()", "parent": 85, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 15}}, {"id": 90, "type": "function_definition", "text": "void on_close(sio::client::close_reason const& reason)\n {\n\t_connected = false;\n }", "parent": 27, "children": [91, 92], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 38, "column": 3}}, {"id": 91, "type": "primitive_type", "text": "void", "parent": 90, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 6}}, {"id": 92, "type": "function_declarator", "text": "on_close(sio::client::close_reason const& reason)", "parent": 90, "children": [93, 94], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 56}}, {"id": 93, "type": "identifier", "text": "on_close", "parent": 92, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 15}}, {"id": 94, "type": "parameter_list", "text": "(sio::client::close_reason const& reason)", "parent": 92, "children": [95], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 56}}, {"id": 95, "type": "parameter_declaration", "text": "sio::client::close_reason const& reason", "parent": 94, "children": [96, 97, 100], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 55}}, {"id": 96, "type": "type_identifier", "text": "sio", "parent": 95, "children": [], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 19}}, {"id": 97, "type": "ERROR", "text": "::client::close_reason const&", "parent": 95, "children": [98, 99], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 48}}, {"id": 98, "type": "identifier", "text": "client", "parent": 97, "children": [], "start_point": {"row": 35, "column": 21}, "end_point": {"row": 35, "column": 27}}, {"id": 99, "type": "identifier", "text": "close_reason", "parent": 97, "children": [], "start_point": {"row": 35, "column": 29}, "end_point": {"row": 35, "column": 41}}, {"id": 100, "type": "identifier", "text": "reason", "parent": 95, "children": [], "start_point": {"row": 35, "column": 49}, "end_point": {"row": 35, "column": 55}}, {"id": 101, "type": "assignment_expression", "text": "_connected = false", "parent": 90, "children": [102, 103, 104], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 19}}, {"id": 102, "type": "identifier", "text": "_connected", "parent": 101, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 11}}, {"id": 103, "type": "=", "text": "=", "parent": 101, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 13}}, {"id": 104, "type": "false", "text": "false", "parent": 101, "children": [], "start_point": {"row": 37, "column": 14}, "end_point": {"row": 37, "column": 19}}, {"id": 105, "type": "function_definition", "text": "void on_fail()\n {\n\t_lock.lock();\n\t_cond.notify_all();\n\t_connect_finish = true;\n\t_connected = false;\n\t_lock.unlock();\n }", "parent": 27, "children": [106, 107], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 47, "column": 3}}, {"id": 106, "type": "primitive_type", "text": "void", "parent": 105, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 6}}, {"id": 107, "type": "function_declarator", "text": "on_fail()", "parent": 105, "children": [108, 109], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 16}}, {"id": 108, "type": "identifier", "text": "on_fail", "parent": 107, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 14}}, {"id": 109, "type": "parameter_list", "text": "()", "parent": 107, "children": [], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 16}}, {"id": 110, "type": "call_expression", "text": "_lock.lock()", "parent": 105, "children": [111, 114], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 13}}, {"id": 111, "type": "field_expression", "text": "_lock.lock", "parent": 110, "children": [112, 113], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 11}}, {"id": 112, "type": "identifier", "text": "_lock", "parent": 111, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 6}}, {"id": 113, "type": "field_identifier", "text": "lock", "parent": 111, "children": [], "start_point": {"row": 42, "column": 7}, "end_point": {"row": 42, "column": 11}}, {"id": 114, "type": "argument_list", "text": "()", "parent": 110, "children": [], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 13}}, {"id": 115, "type": "call_expression", "text": "_cond.notify_all()", "parent": 105, "children": [116, 119], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 19}}, {"id": 116, "type": "field_expression", "text": "_cond.notify_all", "parent": 115, "children": [117, 118], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 17}}, {"id": 117, "type": "identifier", "text": "_cond", "parent": 116, "children": [], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 6}}, {"id": 118, "type": "field_identifier", "text": "notify_all", "parent": 116, "children": [], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 17}}, {"id": 119, "type": "argument_list", "text": "()", "parent": 115, "children": [], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 19}}, {"id": 120, "type": "assignment_expression", "text": "_connect_finish = true", "parent": 105, "children": [121, 122, 123], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 23}}, {"id": 121, "type": "identifier", "text": "_connect_finish", "parent": 120, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 16}}, {"id": 122, "type": "=", "text": "=", "parent": 120, "children": [], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 18}}, {"id": 123, "type": "true", "text": "true", "parent": 120, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 23}}, {"id": 124, "type": "assignment_expression", "text": "_connected = false", "parent": 105, "children": [125, 126, 127], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 19}}, {"id": 125, "type": "identifier", "text": "_connected", "parent": 124, "children": [], "start_point": {"row": 45, "column": 1}, "end_point": {"row": 45, "column": 11}}, {"id": 126, "type": "=", "text": "=", "parent": 124, "children": [], "start_point": {"row": 45, "column": 12}, "end_point": {"row": 45, "column": 13}}, {"id": 127, "type": "false", "text": "false", "parent": 124, "children": [], "start_point": {"row": 45, "column": 14}, "end_point": {"row": 45, "column": 19}}, {"id": 128, "type": "call_expression", "text": "_lock.unlock()", "parent": 105, "children": [129, 132], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 15}}, {"id": 129, "type": "field_expression", "text": "_lock.unlock", "parent": 128, "children": [130, 131], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 13}}, {"id": 130, "type": "identifier", "text": "_lock", "parent": 129, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 6}}, {"id": 131, "type": "field_identifier", "text": "unlock", "parent": 129, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 13}}, {"id": 132, "type": "argument_list", "text": "()", "parent": 128, "children": [], "start_point": {"row": 46, "column": 13}, "end_point": {"row": 46, "column": 15}}, {"id": 133, "type": "labeled_statement", "text": "public:\n\n SimpleStreamer()", "parent": 27, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 51, "column": 18}}, {"id": 134, "type": "call_expression", "text": "SimpleStreamer()", "parent": 133, "children": [135, 136], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 18}}, {"id": 135, "type": "identifier", "text": "SimpleStreamer", "parent": 134, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 16}}, {"id": 136, "type": "argument_list", "text": "()", "parent": 134, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 18}}, {"id": 137, "type": "function_definition", "text": "bool connect(std::string url)\n {\n\th.set_open_listener(std::bind(&SimpleStreamer::on_connected,this));\n\th.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1));\n\th.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this));\n\th.connect(url);\n\t_lock.lock();\n\tif(!_connect_finish)\n\t {\n\t\t_cond.wait(_lock);\n\t }\n\t_lock.unlock();\n\treturn _connected;\n }", "parent": 27, "children": [138, 139], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 68, "column": 3}}, {"id": 138, "type": "primitive_type", "text": "bool", "parent": 137, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 6}}, {"id": 139, "type": "function_declarator", "text": "connect(std::string url)", "parent": 137, "children": [140, 141], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 31}}, {"id": 140, "type": "identifier", "text": "connect", "parent": 139, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 14}}, {"id": 141, "type": "parameter_list", "text": "(std::string url)", "parent": 139, "children": [142], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 31}}, {"id": 142, "type": "parameter_declaration", "text": "std::string url", "parent": 141, "children": [143, 144, 146], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 30}}, {"id": 143, "type": "type_identifier", "text": "std", "parent": 142, "children": [], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 18}}, {"id": 144, "type": "ERROR", "text": "::string", "parent": 142, "children": [145], "start_point": {"row": 55, "column": 18}, "end_point": {"row": 55, "column": 26}}, {"id": 145, "type": "identifier", "text": "string", "parent": 144, "children": [], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 26}}, {"id": 146, "type": "identifier", "text": "url", "parent": 142, "children": [], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 55, "column": 30}}, {"id": 147, "type": "call_expression", "text": "h.set_open_listener(std::bind(&SimpleStreamer::on_connected,this))", "parent": 137, "children": [148, 151], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 67}}, {"id": 148, "type": "field_expression", "text": "h.set_open_listener", "parent": 147, "children": [149, 150], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 20}}, {"id": 149, "type": "identifier", "text": "h", "parent": 148, "children": [], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 57, "column": 2}}, {"id": 150, "type": "field_identifier", "text": "set_open_listener", "parent": 148, "children": [], "start_point": {"row": 57, "column": 3}, "end_point": {"row": 57, "column": 20}}, {"id": 151, "type": "argument_list", "text": "(std::bind(&SimpleStreamer::on_connected,this))", "parent": 147, "children": [152, 154], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 67}}, {"id": 152, "type": "ERROR", "text": "std::", "parent": 151, "children": [153], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 57, "column": 26}}, {"id": 153, "type": "identifier", "text": "std", "parent": 152, "children": [], "start_point": {"row": 57, "column": 21}, "end_point": {"row": 57, "column": 24}}, {"id": 154, "type": "call_expression", "text": "bind(&SimpleStreamer::on_connected,this)", "parent": 151, "children": [155, 156], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 66}}, {"id": 155, "type": "identifier", "text": "bind", "parent": 154, "children": [], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 30}}, {"id": 156, "type": "argument_list", "text": "(&SimpleStreamer::on_connected,this)", "parent": 154, "children": [157, 159, 161], "start_point": {"row": 57, "column": 30}, "end_point": {"row": 57, "column": 66}}, {"id": 157, "type": "pointer_expression", "text": "&SimpleStreamer", "parent": 156, "children": [158], "start_point": {"row": 57, "column": 31}, "end_point": {"row": 57, "column": 46}}, {"id": 158, "type": "identifier", "text": "SimpleStreamer", "parent": 157, "children": [], "start_point": {"row": 57, "column": 32}, "end_point": {"row": 57, "column": 46}}, {"id": 159, "type": "ERROR", "text": "::on_connected", "parent": 156, "children": [160], "start_point": {"row": 57, "column": 46}, "end_point": {"row": 57, "column": 60}}, {"id": 160, "type": "identifier", "text": "on_connected", "parent": 159, "children": [], "start_point": {"row": 57, "column": 48}, "end_point": {"row": 57, "column": 60}}, {"id": 161, "type": "identifier", "text": "this", "parent": 156, "children": [], "start_point": {"row": 57, "column": 61}, "end_point": {"row": 57, "column": 65}}, {"id": 162, "type": "call_expression", "text": "h.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1))", "parent": 137, "children": [163, 166], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 87}}, {"id": 163, "type": "field_expression", "text": "h.set_close_listener", "parent": 162, "children": [164, 165], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 21}}, {"id": 164, "type": "identifier", "text": "h", "parent": 163, "children": [], "start_point": {"row": 58, "column": 1}, "end_point": {"row": 58, "column": 2}}, {"id": 165, "type": "field_identifier", "text": "set_close_listener", "parent": 163, "children": [], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 21}}, {"id": 166, "type": "argument_list", "text": "(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1))", "parent": 162, "children": [167, 169], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 87}}, {"id": 167, "type": "ERROR", "text": "std::", "parent": 166, "children": [168], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 27}}, {"id": 168, "type": "identifier", "text": "std", "parent": 167, "children": [], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 25}}, {"id": 169, "type": "call_expression", "text": "bind(&SimpleStreamer::on_close,this, std::placeholders::_1)", "parent": 166, "children": [170, 171], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 86}}, {"id": 170, "type": "identifier", "text": "bind", "parent": 169, "children": [], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 31}}, {"id": 171, "type": "argument_list", "text": "(&SimpleStreamer::on_close,this, std::placeholders::_1)", "parent": 169, "children": [172, 174, 176, 177, 180], "start_point": {"row": 58, "column": 31}, "end_point": {"row": 58, "column": 86}}, {"id": 172, "type": "pointer_expression", "text": "&SimpleStreamer", "parent": 171, "children": [173], "start_point": {"row": 58, "column": 32}, "end_point": {"row": 58, "column": 47}}, {"id": 173, "type": "identifier", "text": "SimpleStreamer", "parent": 172, "children": [], "start_point": {"row": 58, "column": 33}, "end_point": {"row": 58, "column": 47}}, {"id": 174, "type": "ERROR", "text": "::on_close", "parent": 171, "children": [175], "start_point": {"row": 58, "column": 47}, "end_point": {"row": 58, "column": 57}}, {"id": 175, "type": "identifier", "text": "on_close", "parent": 174, "children": [], "start_point": {"row": 58, "column": 49}, "end_point": {"row": 58, "column": 57}}, {"id": 176, "type": "identifier", "text": "this", "parent": 171, "children": [], "start_point": {"row": 58, "column": 58}, "end_point": {"row": 58, "column": 62}}, {"id": 177, "type": "ERROR", "text": "std::placeholders::", "parent": 171, "children": [178, 179], "start_point": {"row": 58, "column": 64}, "end_point": {"row": 58, "column": 83}}, {"id": 178, "type": "identifier", "text": "std", "parent": 177, "children": [], "start_point": {"row": 58, "column": 64}, "end_point": {"row": 58, "column": 67}}, {"id": 179, "type": "identifier", "text": "placeholders", "parent": 177, "children": [], "start_point": {"row": 58, "column": 69}, "end_point": {"row": 58, "column": 81}}, {"id": 180, "type": "identifier", "text": "_1", "parent": 171, "children": [], "start_point": {"row": 58, "column": 83}, "end_point": {"row": 58, "column": 85}}, {"id": 181, "type": "call_expression", "text": "h.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this))", "parent": 137, "children": [182, 185], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 62}}, {"id": 182, "type": "field_expression", "text": "h.set_fail_listener", "parent": 181, "children": [183, 184], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 20}}, {"id": 183, "type": "identifier", "text": "h", "parent": 182, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 2}}, {"id": 184, "type": "field_identifier", "text": "set_fail_listener", "parent": 182, "children": [], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 20}}, {"id": 185, "type": "argument_list", "text": "(std::bind(&SimpleStreamer::on_fail,this))", "parent": 181, "children": [186, 188], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 62}}, {"id": 186, "type": "ERROR", "text": "std::", "parent": 185, "children": [187], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 26}}, {"id": 187, "type": "identifier", "text": "std", "parent": 186, "children": [], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 24}}, {"id": 188, "type": "call_expression", "text": "bind(&SimpleStreamer::on_fail,this)", "parent": 185, "children": [189, 190], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 61}}, {"id": 189, "type": "identifier", "text": "bind", "parent": 188, "children": [], "start_point": {"row": 59, "column": 26}, "end_point": {"row": 59, "column": 30}}, {"id": 190, "type": "argument_list", "text": "(&SimpleStreamer::on_fail,this)", "parent": 188, "children": [191, 193, 195], "start_point": {"row": 59, "column": 30}, "end_point": {"row": 59, "column": 61}}, {"id": 191, "type": "pointer_expression", "text": "&SimpleStreamer", "parent": 190, "children": [192], "start_point": {"row": 59, "column": 31}, "end_point": {"row": 59, "column": 46}}, {"id": 192, "type": "identifier", "text": "SimpleStreamer", "parent": 191, "children": [], "start_point": {"row": 59, "column": 32}, "end_point": {"row": 59, "column": 46}}, {"id": 193, "type": "ERROR", "text": "::on_fail", "parent": 190, "children": [194], "start_point": {"row": 59, "column": 46}, "end_point": {"row": 59, "column": 55}}, {"id": 194, "type": "identifier", "text": "on_fail", "parent": 193, "children": [], "start_point": {"row": 59, "column": 48}, "end_point": {"row": 59, "column": 55}}, {"id": 195, "type": "identifier", "text": "this", "parent": 190, "children": [], "start_point": {"row": 59, "column": 56}, "end_point": {"row": 59, "column": 60}}, {"id": 196, "type": "call_expression", "text": "h.connect(url)", "parent": 137, "children": [197, 200], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 15}}, {"id": 197, "type": "field_expression", "text": "h.connect", "parent": 196, "children": [198, 199], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 10}}, {"id": 198, "type": "identifier", "text": "h", "parent": 197, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 2}}, {"id": 199, "type": "field_identifier", "text": "connect", "parent": 197, "children": [], "start_point": {"row": 60, "column": 3}, "end_point": {"row": 60, "column": 10}}, {"id": 200, "type": "argument_list", "text": "(url)", "parent": 196, "children": [201], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 15}}, {"id": 201, "type": "identifier", "text": "url", "parent": 200, "children": [], "start_point": {"row": 60, "column": 11}, "end_point": {"row": 60, "column": 14}}, {"id": 202, "type": "call_expression", "text": "_lock.lock()", "parent": 137, "children": [203, 206], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 13}}, {"id": 203, "type": "field_expression", "text": "_lock.lock", "parent": 202, "children": [204, 205], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 11}}, {"id": 204, "type": "identifier", "text": "_lock", "parent": 203, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 6}}, {"id": 205, "type": "field_identifier", "text": "lock", "parent": 203, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 11}}, {"id": 206, "type": "argument_list", "text": "()", "parent": 202, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 13}}, {"id": 207, "type": "if_statement", "text": "if(!_connect_finish)\n\t {\n\t\t_cond.wait(_lock);\n\t }", "parent": 137, "children": [208], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 65, "column": 4}}, {"id": 208, "type": "parenthesized_expression", "text": "(!_connect_finish)", "parent": 207, "children": [209], "start_point": {"row": 62, "column": 3}, "end_point": {"row": 62, "column": 21}}, {"id": 209, "type": "unary_expression", "text": "!_connect_finish", "parent": 208, "children": [210, 211], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 20}}, {"id": 210, "type": "!", "text": "!", "parent": 209, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 5}}, {"id": 211, "type": "identifier", "text": "_connect_finish", "parent": 209, "children": [], "start_point": {"row": 62, "column": 5}, "end_point": {"row": 62, "column": 20}}, {"id": 212, "type": "call_expression", "text": "_cond.wait(_lock)", "parent": 207, "children": [213, 216], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 19}}, {"id": 213, "type": "field_expression", "text": "_cond.wait", "parent": 212, "children": [214, 215], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 12}}, {"id": 214, "type": "identifier", "text": "_cond", "parent": 213, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 7}}, {"id": 215, "type": "field_identifier", "text": "wait", "parent": 213, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 12}}, {"id": 216, "type": "argument_list", "text": "(_lock)", "parent": 212, "children": [217], "start_point": {"row": 64, "column": 12}, "end_point": {"row": 64, "column": 19}}, {"id": 217, "type": "identifier", "text": "_lock", "parent": 216, "children": [], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 18}}, {"id": 218, "type": "call_expression", "text": "_lock.unlock()", "parent": 137, "children": [219, 222], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 15}}, {"id": 219, "type": "field_expression", "text": "_lock.unlock", "parent": 218, "children": [220, 221], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 13}}, {"id": 220, "type": "identifier", "text": "_lock", "parent": 219, "children": [], "start_point": {"row": 66, "column": 1}, "end_point": {"row": 66, "column": 6}}, {"id": 221, "type": "field_identifier", "text": "unlock", "parent": 219, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 13}}, {"id": 222, "type": "argument_list", "text": "()", "parent": 218, "children": [], "start_point": {"row": 66, "column": 13}, "end_point": {"row": 66, "column": 15}}, {"id": 223, "type": "return_statement", "text": "return _connected;", "parent": 137, "children": [224], "start_point": {"row": 67, "column": 1}, "end_point": {"row": 67, "column": 19}}, {"id": 224, "type": "identifier", "text": "_connected", "parent": 223, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 18}}, {"id": 225, "type": "function_definition", "text": "void close()\n {\n\th.sync_close();\n\th.clear_con_listeners();\n }", "parent": 27, "children": [226, 227], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 74, "column": 3}}, {"id": 226, "type": "primitive_type", "text": "void", "parent": 225, "children": [], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 6}}, {"id": 227, "type": "function_declarator", "text": "close()", "parent": 225, "children": [228, 229], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 14}}, {"id": 228, "type": "identifier", "text": "close", "parent": 227, "children": [], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 12}}, {"id": 229, "type": "parameter_list", "text": "()", "parent": 227, "children": [], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 14}}, {"id": 230, "type": "call_expression", "text": "h.sync_close()", "parent": 225, "children": [231, 234], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 15}}, {"id": 231, "type": "field_expression", "text": "h.sync_close", "parent": 230, "children": [232, 233], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 13}}, {"id": 232, "type": "identifier", "text": "h", "parent": 231, "children": [], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 72, "column": 2}}, {"id": 233, "type": "field_identifier", "text": "sync_close", "parent": 231, "children": [], "start_point": {"row": 72, "column": 3}, "end_point": {"row": 72, "column": 13}}, {"id": 234, "type": "argument_list", "text": "()", "parent": 230, "children": [], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 15}}, {"id": 235, "type": "call_expression", "text": "h.clear_con_listeners()", "parent": 225, "children": [236, 239], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 24}}, {"id": 236, "type": "field_expression", "text": "h.clear_con_listeners", "parent": 235, "children": [237, 238], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 22}}, {"id": 237, "type": "identifier", "text": "h", "parent": 236, "children": [], "start_point": {"row": 73, "column": 1}, "end_point": {"row": 73, "column": 2}}, {"id": 238, "type": "field_identifier", "text": "clear_con_listeners", "parent": 236, "children": [], "start_point": {"row": 73, "column": 3}, "end_point": {"row": 73, "column": 22}}, {"id": 239, "type": "argument_list", "text": "()", "parent": 235, "children": [], "start_point": {"row": 73, "column": 22}, "end_point": {"row": 73, "column": 24}}, {"id": 240, "type": "function_definition", "text": "bool sendBuffer(std::string name, char* buff, int length)\n {\n\tif(_connected)\n\t {\n\t\th.socket()->emit(name, std::make_shared<std::string>(buff, length));\n\t }\n\treturn _connected;\n }", "parent": 27, "children": [241, 242], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 83, "column": 3}}, {"id": 241, "type": "primitive_type", "text": "bool", "parent": 240, "children": [], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 6}}, {"id": 242, "type": "function_declarator", "text": "sendBuffer(std::string name, char* buff, int length)", "parent": 240, "children": [243, 244], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 59}}, {"id": 243, "type": "identifier", "text": "sendBuffer", "parent": 242, "children": [], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 17}}, {"id": 244, "type": "parameter_list", "text": "(std::string name, char* buff, int length)", "parent": 242, "children": [245, 250, 255], "start_point": {"row": 76, "column": 17}, "end_point": {"row": 76, "column": 59}}, {"id": 245, "type": "parameter_declaration", "text": "std::string name", "parent": 244, "children": [246, 247, 249], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 34}}, {"id": 246, "type": "type_identifier", "text": "std", "parent": 245, "children": [], "start_point": {"row": 76, "column": 18}, "end_point": {"row": 76, "column": 21}}, {"id": 247, "type": "ERROR", "text": "::string", "parent": 245, "children": [248], "start_point": {"row": 76, "column": 21}, "end_point": {"row": 76, "column": 29}}, {"id": 248, "type": "identifier", "text": "string", "parent": 247, "children": [], "start_point": {"row": 76, "column": 23}, "end_point": {"row": 76, "column": 29}}, {"id": 249, "type": "identifier", "text": "name", "parent": 245, "children": [], "start_point": {"row": 76, "column": 30}, "end_point": {"row": 76, "column": 34}}, {"id": 250, "type": "parameter_declaration", "text": "char* buff", "parent": 244, "children": [251, 252], "start_point": {"row": 76, "column": 36}, "end_point": {"row": 76, "column": 46}}, {"id": 251, "type": "primitive_type", "text": "char", "parent": 250, "children": [], "start_point": {"row": 76, "column": 36}, "end_point": {"row": 76, "column": 40}}, {"id": 252, "type": "pointer_declarator", "text": "* buff", "parent": 250, "children": [253, 254], "start_point": {"row": 76, "column": 40}, "end_point": {"row": 76, "column": 46}}, {"id": 253, "type": "*", "text": "*", "parent": 252, "children": [], "start_point": {"row": 76, "column": 40}, "end_point": {"row": 76, "column": 41}}, {"id": 254, "type": "identifier", "text": "buff", "parent": 252, "children": [], "start_point": {"row": 76, "column": 42}, "end_point": {"row": 76, "column": 46}}, {"id": 255, "type": "parameter_declaration", "text": "int length", "parent": 244, "children": [256, 257], "start_point": {"row": 76, "column": 48}, "end_point": {"row": 76, "column": 58}}, {"id": 256, "type": "primitive_type", "text": "int", "parent": 255, "children": [], "start_point": {"row": 76, "column": 48}, "end_point": {"row": 76, "column": 51}}, {"id": 257, "type": "identifier", "text": "length", "parent": 255, "children": [], "start_point": {"row": 76, "column": 52}, "end_point": {"row": 76, "column": 58}}, {"id": 258, "type": "if_statement", "text": "if(_connected)\n\t {\n\t\th.socket()->emit(name, std::make_shared<std::string>(buff, length));\n\t }", "parent": 240, "children": [259], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 81, "column": 4}}, {"id": 259, "type": "parenthesized_expression", "text": "(_connected)", "parent": 258, "children": [260], "start_point": {"row": 78, "column": 3}, "end_point": {"row": 78, "column": 15}}, {"id": 260, "type": "identifier", "text": "_connected", "parent": 259, "children": [], "start_point": {"row": 78, "column": 4}, "end_point": {"row": 78, "column": 14}}, {"id": 261, "type": "call_expression", "text": "h.socket()->emit(name, std::make_shared<std::string>(buff, length))", "parent": 258, "children": [262, 269], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 69}}, {"id": 262, "type": "field_expression", "text": "h.socket()->emit", "parent": 261, "children": [263, 268], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 18}}, {"id": 263, "type": "call_expression", "text": "h.socket()", "parent": 262, "children": [264, 267], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 12}}, {"id": 264, "type": "field_expression", "text": "h.socket", "parent": 263, "children": [265, 266], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 10}}, {"id": 265, "type": "identifier", "text": "h", "parent": 264, "children": [], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 3}}, {"id": 266, "type": "field_identifier", "text": "socket", "parent": 264, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 10}}, {"id": 267, "type": "argument_list", "text": "()", "parent": 263, "children": [], "start_point": {"row": 80, "column": 10}, "end_point": {"row": 80, "column": 12}}, {"id": 268, "type": "field_identifier", "text": "emit", "parent": 262, "children": [], "start_point": {"row": 80, "column": 14}, "end_point": {"row": 80, "column": 18}}, {"id": 269, "type": "argument_list", "text": "(name, std::make_shared<std::string>(buff, length))", "parent": 261, "children": [270, 271, 277], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 69}}, {"id": 270, "type": "identifier", "text": "name", "parent": 269, "children": [], "start_point": {"row": 80, "column": 19}, "end_point": {"row": 80, "column": 23}}, {"id": 271, "type": "ERROR", "text": "std::make_shared<std::", "parent": 269, "children": [272, 273], "start_point": {"row": 80, "column": 25}, "end_point": {"row": 80, "column": 47}}, {"id": 272, "type": "identifier", "text": "std", "parent": 271, "children": [], "start_point": {"row": 80, "column": 25}, "end_point": {"row": 80, "column": 28}}, {"id": 273, "type": "binary_expression", "text": "make_shared<std", "parent": 271, "children": [274, 275, 276], "start_point": {"row": 80, "column": 30}, "end_point": {"row": 80, "column": 45}}, {"id": 274, "type": "identifier", "text": "make_shared", "parent": 273, "children": [], "start_point": {"row": 80, "column": 30}, "end_point": {"row": 80, "column": 41}}, {"id": 275, "type": "<", "text": "<", "parent": 273, "children": [], "start_point": {"row": 80, "column": 41}, "end_point": {"row": 80, "column": 42}}, {"id": 276, "type": "identifier", "text": "std", "parent": 273, "children": [], "start_point": {"row": 80, "column": 42}, "end_point": {"row": 80, "column": 45}}, {"id": 277, "type": "binary_expression", "text": "string>(buff, length)", "parent": 269, "children": [278, 279, 280], "start_point": {"row": 80, "column": 47}, "end_point": {"row": 80, "column": 68}}, {"id": 278, "type": "identifier", "text": "string", "parent": 277, "children": [], "start_point": {"row": 80, "column": 47}, "end_point": {"row": 80, "column": 53}}, {"id": 279, "type": ">", "text": ">", "parent": 277, "children": [], "start_point": {"row": 80, "column": 53}, "end_point": {"row": 80, "column": 54}}, {"id": 280, "type": "parenthesized_expression", "text": "(buff, length)", "parent": 277, "children": [281], "start_point": {"row": 80, "column": 54}, "end_point": {"row": 80, "column": 68}}, {"id": 281, "type": "comma_expression", "text": "buff, length", "parent": 280, "children": [282, 283], "start_point": {"row": 80, "column": 55}, "end_point": {"row": 80, "column": 67}}, {"id": 282, "type": "identifier", "text": "buff", "parent": 281, "children": [], "start_point": {"row": 80, "column": 55}, "end_point": {"row": 80, "column": 59}}, {"id": 283, "type": "identifier", "text": "length", "parent": 281, "children": [], "start_point": {"row": 80, "column": 61}, "end_point": {"row": 80, "column": 67}}, {"id": 284, "type": "return_statement", "text": "return _connected;", "parent": 240, "children": [285], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 19}}, {"id": 285, "type": "identifier", "text": "_connected", "parent": 284, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 18}}, {"id": 286, "type": "function_definition", "text": "bool sendMessage(std::string name, std::string message)\n {\n\tif(_connected)\n\t {\n\t\th.socket()->emit(name, message);\n\t }\n\treturn _connected;\n }", "parent": 27, "children": [287, 288], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 92, "column": 3}}, {"id": 287, "type": "primitive_type", "text": "bool", "parent": 286, "children": [], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 6}}, {"id": 288, "type": "function_declarator", "text": "sendMessage(std::string name, std::string message)", "parent": 286, "children": [289, 290], "start_point": {"row": 85, "column": 7}, "end_point": {"row": 85, "column": 57}}, {"id": 289, "type": "identifier", "text": "sendMessage", "parent": 288, "children": [], "start_point": {"row": 85, "column": 7}, "end_point": {"row": 85, "column": 18}}, {"id": 290, "type": "parameter_list", "text": "(std::string name, std::string message)", "parent": 288, "children": [291, 296], "start_point": {"row": 85, "column": 18}, "end_point": {"row": 85, "column": 57}}, {"id": 291, "type": "parameter_declaration", "text": "std::string name", "parent": 290, "children": [292, 293, 295], "start_point": {"row": 85, "column": 19}, "end_point": {"row": 85, "column": 35}}, {"id": 292, "type": "type_identifier", "text": "std", "parent": 291, "children": [], "start_point": {"row": 85, "column": 19}, "end_point": {"row": 85, "column": 22}}, {"id": 293, "type": "ERROR", "text": "::string", "parent": 291, "children": [294], "start_point": {"row": 85, "column": 22}, "end_point": {"row": 85, "column": 30}}, {"id": 294, "type": "identifier", "text": "string", "parent": 293, "children": [], "start_point": {"row": 85, "column": 24}, "end_point": {"row": 85, "column": 30}}, {"id": 295, "type": "identifier", "text": "name", "parent": 291, "children": [], "start_point": {"row": 85, "column": 31}, "end_point": {"row": 85, "column": 35}}, {"id": 296, "type": "parameter_declaration", "text": "std::string message", "parent": 290, "children": [297, 298, 300], "start_point": {"row": 85, "column": 37}, "end_point": {"row": 85, "column": 56}}, {"id": 297, "type": "type_identifier", "text": "std", "parent": 296, "children": [], "start_point": {"row": 85, "column": 37}, "end_point": {"row": 85, "column": 40}}, {"id": 298, "type": "ERROR", "text": "::string", "parent": 296, "children": [299], "start_point": {"row": 85, "column": 40}, "end_point": {"row": 85, "column": 48}}, {"id": 299, "type": "identifier", "text": "string", "parent": 298, "children": [], "start_point": {"row": 85, "column": 42}, "end_point": {"row": 85, "column": 48}}, {"id": 300, "type": "identifier", "text": "message", "parent": 296, "children": [], "start_point": {"row": 85, "column": 49}, "end_point": {"row": 85, "column": 56}}, {"id": 301, "type": "if_statement", "text": "if(_connected)\n\t {\n\t\th.socket()->emit(name, message);\n\t }", "parent": 286, "children": [302], "start_point": {"row": 87, "column": 1}, "end_point": {"row": 90, "column": 4}}, {"id": 302, "type": "parenthesized_expression", "text": "(_connected)", "parent": 301, "children": [303], "start_point": {"row": 87, "column": 3}, "end_point": {"row": 87, "column": 15}}, {"id": 303, "type": "identifier", "text": "_connected", "parent": 302, "children": [], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 14}}, {"id": 304, "type": "call_expression", "text": "h.socket()->emit(name, message)", "parent": 301, "children": [305, 312], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 33}}, {"id": 305, "type": "field_expression", "text": "h.socket()->emit", "parent": 304, "children": [306, 311], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 18}}, {"id": 306, "type": "call_expression", "text": "h.socket()", "parent": 305, "children": [307, 310], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 12}}, {"id": 307, "type": "field_expression", "text": "h.socket", "parent": 306, "children": [308, 309], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 10}}, {"id": 308, "type": "identifier", "text": "h", "parent": 307, "children": [], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 3}}, {"id": 309, "type": "field_identifier", "text": "socket", "parent": 307, "children": [], "start_point": {"row": 89, "column": 4}, "end_point": {"row": 89, "column": 10}}, {"id": 310, "type": "argument_list", "text": "()", "parent": 306, "children": [], "start_point": {"row": 89, "column": 10}, "end_point": {"row": 89, "column": 12}}, {"id": 311, "type": "field_identifier", "text": "emit", "parent": 305, "children": [], "start_point": {"row": 89, "column": 14}, "end_point": {"row": 89, "column": 18}}, {"id": 312, "type": "argument_list", "text": "(name, message)", "parent": 304, "children": [313, 314], "start_point": {"row": 89, "column": 18}, "end_point": {"row": 89, "column": 33}}, {"id": 313, "type": "identifier", "text": "name", "parent": 312, "children": [], "start_point": {"row": 89, "column": 19}, "end_point": {"row": 89, "column": 23}}, {"id": 314, "type": "identifier", "text": "message", "parent": 312, "children": [], "start_point": {"row": 89, "column": 25}, "end_point": {"row": 89, "column": 32}}, {"id": 315, "type": "return_statement", "text": "return _connected;", "parent": 286, "children": [316], "start_point": {"row": 91, "column": 1}, "end_point": {"row": 91, "column": 19}}, {"id": 316, "type": "identifier", "text": "_connected", "parent": 315, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 18}}, {"id": 317, "type": "function_definition", "text": "bool isConnected()\n {\n\treturn _connected;\n }", "parent": 27, "children": [318, 319], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 97, "column": 3}}, {"id": 318, "type": "primitive_type", "text": "bool", "parent": 317, "children": [], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 6}}, {"id": 319, "type": "function_declarator", "text": "isConnected()", "parent": 317, "children": [320, 321], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 20}}, {"id": 320, "type": "identifier", "text": "isConnected", "parent": 319, "children": [], "start_point": {"row": 94, "column": 7}, "end_point": {"row": 94, "column": 18}}, {"id": 321, "type": "parameter_list", "text": "()", "parent": 319, "children": [], "start_point": {"row": 94, "column": 18}, "end_point": {"row": 94, "column": 20}}, {"id": 322, "type": "return_statement", "text": "return _connected;", "parent": 317, "children": [323], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 19}}, {"id": 323, "type": "identifier", "text": "_connected", "parent": 322, "children": [], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 18}}, {"id": 324, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 6}}]}, "node_categories": {"declarations": {"functions": [27, 62, 64, 90, 92, 105, 107, 137, 139, 225, 227, 240, 242, 286, 288, 317, 319], "variables": [32, 37, 40, 46, 54, 59, 95, 142, 245, 250, 255, 291, 296], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25], "modules": [], "enums": []}, "statements": {"expressions": [67, 68, 72, 73, 85, 86, 110, 111, 115, 116, 128, 129, 134, 147, 148, 154, 157, 162, 163, 169, 172, 181, 182, 188, 191, 196, 197, 202, 203, 208, 209, 212, 213, 218, 219, 230, 231, 235, 236, 259, 261, 262, 263, 264, 273, 277, 280, 281, 302, 304, 305, 306, 307], "assignments": [77, 81, 101, 120, 124], "loops": [], "conditionals": [0, 1, 2, 5, 28, 31, 33, 34, 36, 38, 39, 43, 49, 53, 55, 56, 58, 60, 61, 65, 69, 70, 74, 75, 78, 82, 87, 88, 93, 96, 98, 99, 100, 102, 108, 112, 113, 117, 118, 121, 125, 130, 131, 135, 140, 143, 145, 146, 149, 150, 153, 155, 158, 160, 161, 164, 165, 168, 170, 173, 175, 176, 178, 179, 180, 183, 184, 187, 189, 192, 194, 195, 198, 199, 201, 204, 205, 207, 211, 214, 215, 217, 220, 221, 224, 228, 232, 233, 237, 238, 243, 246, 248, 249, 254, 257, 258, 260, 265, 266, 268, 270, 272, 274, 276, 278, 282, 283, 285, 289, 292, 294, 295, 297, 299, 300, 301, 303, 308, 309, 311, 313, 314, 316, 320, 323, 324], "returns": [223, 284, 315, 322], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 27, "universal_type": "function", "name": "SimpleStreamer", "text_snippet": "class SimpleStreamer\n{\n\nprivate:\n\n std::mutex _lock;\n std::condition_variable_any _cond;\n bool _c"}, {"node_id": 62, "universal_type": "function", "name": "on_connected", "text_snippet": "void on_connected()\n {\n\t_lock.lock();\n\t_cond.notify_all();\n\t_connect_finish = true;\n\t_connected = t"}, {"node_id": 64, "universal_type": "function", "name": "unknown", "text_snippet": "on_connected()"}, {"node_id": 90, "universal_type": "function", "name": "on_close", "text_snippet": "void on_close(sio::client::close_reason const& reason)\n {\n\t_connected = false;\n }"}, {"node_id": 92, "universal_type": "function", "name": "unknown", "text_snippet": "on_close(sio::client::close_reason const& reason)"}, {"node_id": 105, "universal_type": "function", "name": "on_fail", "text_snippet": "void on_fail()\n {\n\t_lock.lock();\n\t_cond.notify_all();\n\t_connect_finish = true;\n\t_connected = false;"}, {"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "on_fail()"}, {"node_id": 137, "universal_type": "function", "name": "connect", "text_snippet": "bool connect(std::string url)\n {\n\th.set_open_listener(std::bind(&SimpleStreamer::on_connected,this)"}, {"node_id": 139, "universal_type": "function", "name": "unknown", "text_snippet": "connect(std::string url)"}, {"node_id": 225, "universal_type": "function", "name": "close", "text_snippet": "void close()\n {\n\th.sync_close();\n\th.clear_con_listeners();\n }"}, {"node_id": 227, "universal_type": "function", "name": "unknown", "text_snippet": "close()"}, {"node_id": 240, "universal_type": "function", "name": "sendBuffer", "text_snippet": "bool sendBuffer(std::string name, char* buff, int length)\n {\n\tif(_connected)\n\t {\n\t\th.socket()->emi"}, {"node_id": 242, "universal_type": "function", "name": "length)", "text_snippet": "sendBuffer(std::string name, char* buff, int length)"}, {"node_id": 286, "universal_type": "function", "name": "sendMessage", "text_snippet": "bool sendMessage(std::string name, std::string message)\n {\n\tif(_connected)\n\t {\n\t\th.socket()->emit("}, {"node_id": 288, "universal_type": "function", "name": "unknown", "text_snippet": "sendMessage(std::string name, std::string message)"}, {"node_id": 317, "universal_type": "function", "name": "isConnected", "text_snippet": "bool isConnected()\n {\n\treturn _connected;\n }"}, {"node_id": 319, "universal_type": "function", "name": "unknown", "text_snippet": "isConnected()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"../../src/sio_client.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <functional>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <iostream>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <thread>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <mutex>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <condition_variable>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <string>\n"}, {"node_id": 25, "text": "#include"}]}, "original_source_code": "#ifndef SIMPLESTREAMER_H\n#define SIMPLESTREAMER_H\n\n#include \"../../src/sio_client.h\"\n\n#include <functional>\n#include <iostream>\n#include <thread>\n#include <mutex>\n#include <condition_variable>\n#include <string>\n\nclass SimpleStreamer\n{\n\nprivate:\n\n std::mutex _lock;\n std::condition_variable_any _cond;\n bool _connect_finish = false;\n bool _connected = false;\n\n sio::client h;\n std::string url;\n\n void on_connected()\n {\n\t_lock.lock();\n\t_cond.notify_all();\n\t_connect_finish = true;\n\t_connected = true;\n\t_lock.unlock();\n\n };\n\n void on_close(sio::client::close_reason const& reason)\n {\n\t_connected = false;\n };\n\n void on_fail()\n {\n\t_lock.lock();\n\t_cond.notify_all();\n\t_connect_finish = true;\n\t_connected = false;\n\t_lock.unlock();\n };\n\npublic:\n\n SimpleStreamer()\n {\n };\n\n bool connect(std::string url)\n {\n\th.set_open_listener(std::bind(&SimpleStreamer::on_connected,this));\n\th.set_close_listener(std::bind(&SimpleStreamer::on_close,this, std::placeholders::_1));\n\th.set_fail_listener(std::bind(&SimpleStreamer::on_fail,this));\n\th.connect(url);\n\t_lock.lock();\n\tif(!_connect_finish)\n\t {\n\t\t_cond.wait(_lock);\n\t }\n\t_lock.unlock();\n\treturn _connected;\n };\n\n void close()\n {\n\th.sync_close();\n\th.clear_con_listeners();\n };\n\n bool sendBuffer(std::string name, char* buff, int length)\n {\n\tif(_connected)\n\t {\n\t\th.socket()->emit(name, std::make_shared<std::string>(buff, length));\n\t }\n\treturn _connected;\n };\n\n bool sendMessage(std::string name, std::string message)\n {\n\tif(_connected)\n\t {\n\t\th.socket()->emit(name, message);\n\t }\n\treturn _connected;\n };\n\n bool isConnected()\n {\n\treturn _connected;\n };\n\n};\n\n#endif\n"}
55
c
// Copyright 2016 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ARC_NETWORKD_IP_HELPER_H_ #define ARC_NETWORKD_IP_HELPER_H_ #include <netinet/in.h> #include <sys/socket.h> #include <memory> #include <string> #include <base/files/scoped_file.h> #include <base/macros.h> #include <base/memory/weak_ptr.h> #include <base/message_loop/message_loop.h> #include <brillo/daemons/daemon.h> #include "arc-networkd/arc_ip_config.h" #include "arc-networkd/ipc.pb.h" #include "arc-networkd/options.h" using MessageLoopForIO = base::MessageLoopForIO; namespace arc_networkd { // Main loop for the IP helper process. // This object is used in the subprocess. class IpHelper : public brillo::Daemon, public base::MessageLoopForIO::Watcher { public: explicit IpHelper(const Options& opt, base::ScopedFD control_fd); protected: // Overrides Daemon init callback. int OnInit() override; // Overrides MessageLoopForIO callbacks for new data on |control_fd_|. void OnFileCanReadWithoutBlocking(int fd) override; void OnFileCanWriteWithoutBlocking(int fd) override {} // Runs every |kContainerRetryDelaySeconds| until the ARC container comes // up. void InitialSetup(); // Handle |pending_command_|. void HandleCommand(); // Helper function to extract raw IPv6 address from a protobuf string. const struct in6_addr& ExtractAddr6(const std::string& in); // Validate interface name string. bool ValidateIfname(const std::string& in); private: base::ScopedFD control_fd_; MessageLoopForIO::FileDescriptorWatcher control_watcher_; int con_init_tries_{0}; bool init_done_{false}; IpHelperMessage pending_command_; std::unique_ptr<ArcIpConfig> arc_ip_config_; base::WeakPtrFactory<IpHelper> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(IpHelper); }; } // namespace arc_networkd #endif // ARC_NETWORKD_IP_HELPER_H_
37.25
51
(translation_unit) "// Copyright 2016 The Chromium OS Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef ARC_NETWORKD_IP_HELPER_H_\n#define ARC_NETWORKD_IP_HELPER_H_\n\n#include <netinet/in.h>\n#include <sys/socket.h>\n\n#include <memory>\n#include <string>\n\n#include <base/files/scoped_file.h>\n#include <base/macros.h>\n#include <base/memory/weak_ptr.h>\n#include <base/message_loop/message_loop.h>\n#include <brillo/daemons/daemon.h>\n\n#include "arc-networkd/arc_ip_config.h"\n#include "arc-networkd/ipc.pb.h"\n#include "arc-networkd/options.h"\n\nusing MessageLoopForIO = base::MessageLoopForIO;\n\nnamespace arc_networkd {\n\n// Main loop for the IP helper process.\n// This object is used in the subprocess.\nclass IpHelper : public brillo::Daemon, public base::MessageLoopForIO::Watcher {\n public:\n explicit IpHelper(const Options& opt, base::ScopedFD control_fd);\n\n protected:\n // Overrides Daemon init callback.\n int OnInit() override;\n\n // Overrides MessageLoopForIO callbacks for new data on |control_fd_|.\n void OnFileCanReadWithoutBlocking(int fd) override;\n void OnFileCanWriteWithoutBlocking(int fd) override {}\n\n // Runs every |kContainerRetryDelaySeconds| until the ARC container comes\n // up.\n void InitialSetup();\n\n // Handle |pending_command_|.\n void HandleCommand();\n\n // Helper function to extract raw IPv6 address from a protobuf string.\n const struct in6_addr& ExtractAddr6(const std::string& in);\n\n // Validate interface name string.\n bool ValidateIfname(const std::string& in);\n\n private:\n base::ScopedFD control_fd_;\n MessageLoopForIO::FileDescriptorWatcher control_watcher_;\n\n int con_init_tries_{0};\n bool init_done_{false};\n\n IpHelperMessage pending_command_;\n std::unique_ptr<ArcIpConfig> arc_ip_config_;\n\n base::WeakPtrFactory<IpHelper> weak_factory_{this};\n\n DISALLOW_COPY_AND_ASSIGN(IpHelper);\n};\n\n} // namespace arc_networkd\n\n#endif // ARC_NETWORKD_IP_HELPER_H_\n" (comment) "// Copyright 2016 The Chromium OS Authors. All rights reserved." (comment) "// Use of this source code is governed by a BSD-style license that can be" (comment) "// found in the LICENSE file." (preproc_ifdef) "#ifndef ARC_NETWORKD_IP_HELPER_H_\n#define ARC_NETWORKD_IP_HELPER_H_\n\n#include <netinet/in.h>\n#include <sys/socket.h>\n\n#include <memory>\n#include <string>\n\n#include <base/files/scoped_file.h>\n#include <base/macros.h>\n#include <base/memory/weak_ptr.h>\n#include <base/message_loop/message_loop.h>\n#include <brillo/daemons/daemon.h>\n\n#include "arc-networkd/arc_ip_config.h"\n#include "arc-networkd/ipc.pb.h"\n#include "arc-networkd/options.h"\n\nusing MessageLoopForIO = base::MessageLoopForIO;\n\nnamespace arc_networkd {\n\n// Main loop for the IP helper process.\n// This object is used in the subprocess.\nclass IpHelper : public brillo::Daemon, public base::MessageLoopForIO::Watcher {\n public:\n explicit IpHelper(const Options& opt, base::ScopedFD control_fd);\n\n protected:\n // Overrides Daemon init callback.\n int OnInit() override;\n\n // Overrides MessageLoopForIO callbacks for new data on |control_fd_|.\n void OnFileCanReadWithoutBlocking(int fd) override;\n void OnFileCanWriteWithoutBlocking(int fd) override {}\n\n // Runs every |kContainerRetryDelaySeconds| until the ARC container comes\n // up.\n void InitialSetup();\n\n // Handle |pending_command_|.\n void HandleCommand();\n\n // Helper function to extract raw IPv6 address from a protobuf string.\n const struct in6_addr& ExtractAddr6(const std::string& in);\n\n // Validate interface name string.\n bool ValidateIfname(const std::string& in);\n\n private:\n base::ScopedFD control_fd_;\n MessageLoopForIO::FileDescriptorWatcher control_watcher_;\n\n int con_init_tries_{0};\n bool init_done_{false};\n\n IpHelperMessage pending_command_;\n std::unique_ptr<ArcIpConfig> arc_ip_config_;\n\n base::WeakPtrFactory<IpHelper> weak_factory_{this};\n\n DISALLOW_COPY_AND_ASSIGN(IpHelper);\n};\n\n} // namespace arc_networkd\n\n#endif" (#ifndef) "#ifndef" (identifier) "ARC_NETWORKD_IP_HELPER_H_" (preproc_def) "#define ARC_NETWORKD_IP_HELPER_H_\n" (#define) "#define" (identifier) "ARC_NETWORKD_IP_HELPER_H_" (preproc_include) "#include <netinet/in.h>\n" (#include) "#include" (system_lib_string) "<netinet/in.h>" (preproc_include) "#include <sys/socket.h>\n" (#include) "#include" (system_lib_string) "<sys/socket.h>" (preproc_include) "#include <memory>\n" (#include) "#include" (system_lib_string) "<memory>" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (preproc_include) "#include <base/files/scoped_file.h>\n" (#include) "#include" (system_lib_string) "<base/files/scoped_file.h>" (preproc_include) "#include <base/macros.h>\n" (#include) "#include" (system_lib_string) "<base/macros.h>" (preproc_include) "#include <base/memory/weak_ptr.h>\n" (#include) "#include" (system_lib_string) "<base/memory/weak_ptr.h>" (preproc_include) "#include <base/message_loop/message_loop.h>\n" (#include) "#include" (system_lib_string) "<base/message_loop/message_loop.h>" (preproc_include) "#include <brillo/daemons/daemon.h>\n" (#include) "#include" (system_lib_string) "<brillo/daemons/daemon.h>" (preproc_include) "#include "arc-networkd/arc_ip_config.h"\n" (#include) "#include" (string_literal) ""arc-networkd/arc_ip_config.h"" (") """ (string_content) "arc-networkd/arc_ip_config.h" (") """ (preproc_include) "#include "arc-networkd/ipc.pb.h"\n" (#include) "#include" (string_literal) ""arc-networkd/ipc.pb.h"" (") """ (string_content) "arc-networkd/ipc.pb.h" (") """ (preproc_include) "#include "arc-networkd/options.h"\n" (#include) "#include" (string_literal) ""arc-networkd/options.h"" (") """ (string_content) "arc-networkd/options.h" (") """ (declaration) "using MessageLoopForIO = base::MessageLoopForIO;" (type_identifier) "using" (init_declarator) "MessageLoopForIO = base::MessageLoopForIO" (identifier) "MessageLoopForIO" (=) "=" (ERROR) "base::" (identifier) "base" (:) ":" (:) ":" (identifier) "MessageLoopForIO" (;) ";" (function_definition) "namespace arc_networkd {\n\n// Main loop for the IP helper process.\n// This object is used in the subprocess.\nclass IpHelper : public brillo::Daemon, public base::MessageLoopForIO::Watcher {\n public:\n explicit IpHelper(const Options& opt, base::ScopedFD control_fd);\n\n protected:\n // Overrides Daemon init callback.\n int OnInit() override;\n\n // Overrides MessageLoopForIO callbacks for new data on |control_fd_|.\n void OnFileCanReadWithoutBlocking(int fd) override;\n void OnFileCanWriteWithoutBlocking(int fd) override {}\n\n // Runs every |kContainerRetryDelaySeconds| until the ARC container comes\n // up.\n void InitialSetup();\n\n // Handle |pending_command_|.\n void HandleCommand();\n\n // Helper function to extract raw IPv6 address from a protobuf string.\n const struct in6_addr& ExtractAddr6(const std::string& in);\n\n // Validate interface name string.\n bool ValidateIfname(const std::string& in);\n\n private:\n base::ScopedFD control_fd_;\n MessageLoopForIO::FileDescriptorWatcher control_watcher_;\n\n int con_init_tries_{0};\n bool init_done_{false};\n\n IpHelperMessage pending_command_;\n std::unique_ptr<ArcIpConfig> arc_ip_config_;\n\n base::WeakPtrFactory<IpHelper> weak_factory_{this};\n\n DISALLOW_COPY_AND_ASSIGN(IpHelper);\n};\n\n}" (type_identifier) "namespace" (identifier) "arc_networkd" (compound_statement) "{\n\n// Main loop for the IP helper process.\n// This object is used in the subprocess.\nclass IpHelper : public brillo::Daemon, public base::MessageLoopForIO::Watcher {\n public:\n explicit IpHelper(const Options& opt, base::ScopedFD control_fd);\n\n protected:\n // Overrides Daemon init callback.\n int OnInit() override;\n\n // Overrides MessageLoopForIO callbacks for new data on |control_fd_|.\n void OnFileCanReadWithoutBlocking(int fd) override;\n void OnFileCanWriteWithoutBlocking(int fd) override {}\n\n // Runs every |kContainerRetryDelaySeconds| until the ARC container comes\n // up.\n void InitialSetup();\n\n // Handle |pending_command_|.\n void HandleCommand();\n\n // Helper function to extract raw IPv6 address from a protobuf string.\n const struct in6_addr& ExtractAddr6(const std::string& in);\n\n // Validate interface name string.\n bool ValidateIfname(const std::string& in);\n\n private:\n base::ScopedFD control_fd_;\n MessageLoopForIO::FileDescriptorWatcher control_watcher_;\n\n int con_init_tries_{0};\n bool init_done_{false};\n\n IpHelperMessage pending_command_;\n std::unique_ptr<ArcIpConfig> arc_ip_config_;\n\n base::WeakPtrFactory<IpHelper> weak_factory_{this};\n\n DISALLOW_COPY_AND_ASSIGN(IpHelper);\n};\n\n}" ({) "{" (comment) "// Main loop for the IP helper process." (comment) "// This object is used in the subprocess." (declaration) "class IpHelper : public brillo::Daemon, public base::MessageLoopForIO::Watcher {\n public:\n explicit IpHelper(const Options& opt, base::ScopedFD control_fd);" (type_identifier) "class" (identifier) "IpHelper" (ERROR) ": public brillo::Daemon" (:) ":" (identifier) "public" (identifier) "brillo" (:) ":" (:) ":" (identifier) "Daemon" (,) "," (ERROR) "public base::MessageLoopForIO::Watcher {\n public:\n explicit" (identifier) "public" (identifier) "base" (:) ":" (:) ":" (identifier) "MessageLoopForIO" (:) ":" (:) ":" (identifier) "Watcher" ({) "{" (identifier) "public" (:) ":" (identifier) "explicit" (function_declarator) "IpHelper(const Options& opt, base::ScopedFD control_fd)" (identifier) "IpHelper" (parameter_list) "(const Options& opt, base::ScopedFD control_fd)" (() "(" (parameter_declaration) "const Options& opt" (type_qualifier) "const" (const) "const" (type_identifier) "Options" (ERROR) "&" (&) "&" (identifier) "opt" (,) "," (parameter_declaration) "base::ScopedFD control_fd" (type_identifier) "base" (ERROR) "::ScopedFD" (:) ":" (:) ":" (identifier) "ScopedFD" (identifier) "control_fd" ()) ")" (;) ";" (labeled_statement) "protected:\n // Overrides Daemon init callback.\n int OnInit() override;" (statement_identifier) "protected" (:) ":" (comment) "// Overrides Daemon init callback." (ERROR) "int OnInit() override" (primitive_type) "int" (function_declarator) "OnInit() override" (identifier) "OnInit" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (comment) "// Overrides MessageLoopForIO callbacks for new data on |control_fd_|." (ERROR) "void OnFileCanReadWithoutBlocking(int fd) override" (primitive_type) "void" (function_declarator) "OnFileCanReadWithoutBlocking(int fd) override" (identifier) "OnFileCanReadWithoutBlocking" (parameter_list) "(int fd)" (() "(" (parameter_declaration) "int fd" (primitive_type) "int" (identifier) "fd" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (function_definition) "void OnFileCanWriteWithoutBlocking(int fd) override {}" (primitive_type) "void" (function_declarator) "OnFileCanWriteWithoutBlocking(int fd) override" (identifier) "OnFileCanWriteWithoutBlocking" (parameter_list) "(int fd)" (() "(" (parameter_declaration) "int fd" (primitive_type) "int" (identifier) "fd" ()) ")" (identifier) "override" (compound_statement) "{}" ({) "{" (}) "}" (comment) "// Runs every |kContainerRetryDelaySeconds| until the ARC container comes" (comment) "// up." (declaration) "void InitialSetup();" (primitive_type) "void" (function_declarator) "InitialSetup()" (identifier) "InitialSetup" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Handle |pending_command_|." (declaration) "void HandleCommand();" (primitive_type) "void" (function_declarator) "HandleCommand()" (identifier) "HandleCommand" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Helper function to extract raw IPv6 address from a protobuf string." (declaration) "const struct in6_addr& ExtractAddr6(const std::string& in);" (type_qualifier) "const" (const) "const" (struct_specifier) "struct in6_addr" (struct) "struct" (type_identifier) "in6_addr" (ERROR) "&" (&) "&" (function_declarator) "ExtractAddr6(const std::string& in)" (identifier) "ExtractAddr6" (parameter_list) "(const std::string& in)" (() "(" (parameter_declaration) "const std::string& in" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "in" ()) ")" (;) ";" (comment) "// Validate interface name string." (declaration) "bool ValidateIfname(const std::string& in);" (primitive_type) "bool" (function_declarator) "ValidateIfname(const std::string& in)" (identifier) "ValidateIfname" (parameter_list) "(const std::string& in)" (() "(" (parameter_declaration) "const std::string& in" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "in" ()) ")" (;) ";" (labeled_statement) "private:\n base::ScopedFD control_fd_;" (statement_identifier) "private" (:) ":" (labeled_statement) "base::ScopedFD control_fd_;" (statement_identifier) "base" (:) ":" (ERROR) ":" (:) ":" (declaration) "ScopedFD control_fd_;" (type_identifier) "ScopedFD" (identifier) "control_fd_" (;) ";" (labeled_statement) "MessageLoopForIO::FileDescriptorWatcher control_watcher_;" (statement_identifier) "MessageLoopForIO" (:) ":" (ERROR) ":" (:) ":" (declaration) "FileDescriptorWatcher control_watcher_;" (type_identifier) "FileDescriptorWatcher" (identifier) "control_watcher_" (;) ";" (function_definition) "int con_init_tries_{0}" (primitive_type) "int" (identifier) "con_init_tries_" (compound_statement) "{0}" ({) "{" (ERROR) "0" (number_literal) "0" (}) "}" (expression_statement) ";" (;) ";" (function_definition) "bool init_done_{false};\n\n IpHelperMessage pending_command_;\n std::unique_ptr<ArcIpConfig> arc_ip_config_;\n\n base::WeakPtrFactory<IpHelper> weak_factory_{this};\n\n DISALLOW_COPY_AND_ASSIGN(IpHelper);\n}" (primitive_type) "bool" (identifier) "init_done_" (compound_statement) "{false};\n\n IpHelperMessage pending_command_;\n std::unique_ptr<ArcIpConfig> arc_ip_config_;\n\n base::WeakPtrFactory<IpHelper> weak_factory_{this};\n\n DISALLOW_COPY_AND_ASSIGN(IpHelper);\n}" ({) "{" (expression_statement) "false};" (false) "false" (ERROR) "}" (}) "}" (;) ";" (declaration) "IpHelperMessage pending_command_;" (type_identifier) "IpHelperMessage" (identifier) "pending_command_" (;) ";" (labeled_statement) "std::unique_ptr<ArcIpConfig> arc_ip_config_;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "unique_ptr<ArcIpConfig> arc_ip_config_;" (binary_expression) "unique_ptr<ArcIpConfig> arc_ip_config_" (binary_expression) "unique_ptr<ArcIpConfig" (identifier) "unique_ptr" (<) "<" (identifier) "ArcIpConfig" (>) ">" (identifier) "arc_ip_config_" (;) ";" (labeled_statement) "base::WeakPtrFactory<IpHelper> weak_factory_{this}" (statement_identifier) "base" (:) ":" (ERROR) ":WeakPtrFactory<IpHelper> weak_factory_" (:) ":" (binary_expression) "WeakPtrFactory<IpHelper> weak_factory_" (binary_expression) "WeakPtrFactory<IpHelper" (identifier) "WeakPtrFactory" (<) "<" (identifier) "IpHelper" (>) ">" (identifier) "weak_factory_" (compound_statement) "{this}" ({) "{" (ERROR) "this" (identifier) "this" (}) "}" (expression_statement) ";" (;) ";" (expression_statement) "DISALLOW_COPY_AND_ASSIGN(IpHelper);" (call_expression) "DISALLOW_COPY_AND_ASSIGN(IpHelper)" (identifier) "DISALLOW_COPY_AND_ASSIGN" (argument_list) "(IpHelper)" (() "(" (identifier) "IpHelper" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace arc_networkd" (#endif) "#endif" (comment) "// ARC_NETWORKD_IP_HELPER_H_"
316
17
{"language": "c", "success": true, "metadata": {"lines": 51, "avg_line_length": 37.25, "nodes": 180, "errors": 0, "source_hash": "c7b47c1ba63b5fa1fe778c0a00d8ac1b7efb67315364aba45018dc46a0d07f43", "categorized_nodes": 135}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef ARC_NETWORKD_IP_HELPER_H_\n#define ARC_NETWORKD_IP_HELPER_H_\n\n#include <netinet/in.h>\n#include <sys/socket.h>\n\n#include <memory>\n#include <string>\n\n#include <base/files/scoped_file.h>\n#include <base/macros.h>\n#include <base/memory/weak_ptr.h>\n#include <base/message_loop/message_loop.h>\n#include <brillo/daemons/daemon.h>\n\n#include \"arc-networkd/arc_ip_config.h\"\n#include \"arc-networkd/ipc.pb.h\"\n#include \"arc-networkd/options.h\"\n\nusing MessageLoopForIO = base::MessageLoopForIO;\n\nnamespace arc_networkd {\n\n// Main loop for the IP helper process.\n// This object is used in the subprocess.\nclass IpHelper : public brillo::Daemon, public base::MessageLoopForIO::Watcher {\n public:\n explicit IpHelper(const Options& opt, base::ScopedFD control_fd);\n\n protected:\n // Overrides Daemon init callback.\n int OnInit() override;\n\n // Overrides MessageLoopForIO callbacks for new data on |control_fd_|.\n void OnFileCanReadWithoutBlocking(int fd) override;\n void OnFileCanWriteWithoutBlocking(int fd) override {}\n\n // Runs every |kContainerRetryDelaySeconds| until the ARC container comes\n // up.\n void InitialSetup();\n\n // Handle |pending_command_|.\n void HandleCommand();\n\n // Helper function to extract raw IPv6 address from a protobuf string.\n const struct in6_addr& ExtractAddr6(const std::string& in);\n\n // Validate interface name string.\n bool ValidateIfname(const std::string& in);\n\n private:\n base::ScopedFD control_fd_;\n MessageLoopForIO::FileDescriptorWatcher control_watcher_;\n\n int con_init_tries_{0};\n bool init_done_{false};\n\n IpHelperMessage pending_command_;\n std::unique_ptr<ArcIpConfig> arc_ip_config_;\n\n base::WeakPtrFactory<IpHelper> weak_factory_{this};\n\n DISALLOW_COPY_AND_ASSIGN(IpHelper);\n};\n\n} // namespace arc_networkd\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 50, 179], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 71, "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": "ARC_NETWORKD_IP_HELPER_H_", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 33}}, {"id": 3, "type": "preproc_def", "text": "#define ARC_NETWORKD_IP_HELPER_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": "ARC_NETWORKD_IP_HELPER_H_", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 33}}, {"id": 6, "type": "preproc_include", "text": "#include <netinet/in.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<netinet/in.h>", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 23}}, {"id": 9, "type": "preproc_include", "text": "#include <sys/socket.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": "system_lib_string", "text": "<sys/socket.h>", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 23}}, {"id": 12, "type": "preproc_include", "text": "#include <memory>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<memory>", "parent": 12, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 17}}, {"id": 15, "type": "preproc_include", "text": "#include <string>\n", "parent": 0, "children": [16, 17], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<string>", "parent": 15, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 17}}, {"id": 18, "type": "preproc_include", "text": "#include <base/files/scoped_file.h>\n", "parent": 0, "children": [19, 20], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<base/files/scoped_file.h>", "parent": 18, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 35}}, {"id": 21, "type": "preproc_include", "text": "#include <base/macros.h>\n", "parent": 0, "children": [22, 23], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 23, "type": "system_lib_string", "text": "<base/macros.h>", "parent": 21, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 24}}, {"id": 24, "type": "preproc_include", "text": "#include <base/memory/weak_ptr.h>\n", "parent": 0, "children": [25, 26], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 26, "type": "system_lib_string", "text": "<base/memory/weak_ptr.h>", "parent": 24, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 33}}, {"id": 27, "type": "preproc_include", "text": "#include <base/message_loop/message_loop.h>\n", "parent": 0, "children": [28, 29], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 29, "type": "system_lib_string", "text": "<base/message_loop/message_loop.h>", "parent": 27, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 43}}, {"id": 30, "type": "preproc_include", "text": "#include <brillo/daemons/daemon.h>\n", "parent": 0, "children": [31, 32], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 32, "type": "system_lib_string", "text": "<brillo/daemons/daemon.h>", "parent": 30, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 34}}, {"id": 33, "type": "preproc_include", "text": "#include \"arc-networkd/arc_ip_config.h\"\n", "parent": 0, "children": [34, 35], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"arc-networkd/arc_ip_config.h\"", "parent": 33, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 39}}, {"id": 36, "type": "preproc_include", "text": "#include \"arc-networkd/ipc.pb.h\"\n", "parent": 0, "children": [37, 38], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 38, "type": "string_literal", "text": "\"arc-networkd/ipc.pb.h\"", "parent": 36, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 32}}, {"id": 39, "type": "preproc_include", "text": "#include \"arc-networkd/options.h\"\n", "parent": 0, "children": [40, 41], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 41, "type": "string_literal", "text": "\"arc-networkd/options.h\"", "parent": 39, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 33}}, {"id": 42, "type": "declaration", "text": "using MessageLoopForIO = base::MessageLoopForIO;", "parent": 0, "children": [43, 44], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 48}}, {"id": 43, "type": "type_identifier", "text": "using", "parent": 42, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 5}}, {"id": 44, "type": "init_declarator", "text": "MessageLoopForIO = base::MessageLoopForIO", "parent": 42, "children": [45, 46, 47, 49], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 47}}, {"id": 45, "type": "identifier", "text": "MessageLoopForIO", "parent": 44, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 22}}, {"id": 46, "type": "=", "text": "=", "parent": 44, "children": [], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 24}}, {"id": 47, "type": "ERROR", "text": "base::", "parent": 44, "children": [48], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 31}}, {"id": 48, "type": "identifier", "text": "base", "parent": 47, "children": [], "start_point": {"row": 23, "column": 25}, "end_point": {"row": 23, "column": 29}}, {"id": 49, "type": "identifier", "text": "MessageLoopForIO", "parent": 44, "children": [], "start_point": {"row": 23, "column": 31}, "end_point": {"row": 23, "column": 47}}, {"id": 50, "type": "function_definition", "text": "namespace arc_networkd {\n\n// Main loop for the IP helper process.\n// This object is used in the subprocess.\nclass IpHelper : public brillo::Daemon, public base::MessageLoopForIO::Watcher {\n public:\n explicit IpHelper(const Options& opt, base::ScopedFD control_fd);\n\n protected:\n // Overrides Daemon init callback.\n int OnInit() override;\n\n // Overrides MessageLoopForIO callbacks for new data on |control_fd_|.\n void OnFileCanReadWithoutBlocking(int fd) override;\n void OnFileCanWriteWithoutBlocking(int fd) override {}\n\n // Runs every |kContainerRetryDelaySeconds| until the ARC container comes\n // up.\n void InitialSetup();\n\n // Handle |pending_command_|.\n void HandleCommand();\n\n // Helper function to extract raw IPv6 address from a protobuf string.\n const struct in6_addr& ExtractAddr6(const std::string& in);\n\n // Validate interface name string.\n bool ValidateIfname(const std::string& in);\n\n private:\n base::ScopedFD control_fd_;\n MessageLoopForIO::FileDescriptorWatcher control_watcher_;\n\n int con_init_tries_{0};\n bool init_done_{false};\n\n IpHelperMessage pending_command_;\n std::unique_ptr<ArcIpConfig> arc_ip_config_;\n\n base::WeakPtrFactory<IpHelper> weak_factory_{this};\n\n DISALLOW_COPY_AND_ASSIGN(IpHelper);\n};\n\n}", "parent": 0, "children": [51, 52], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 69, "column": 1}}, {"id": 51, "type": "type_identifier", "text": "namespace", "parent": 50, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 9}}, {"id": 52, "type": "identifier", "text": "arc_networkd", "parent": 50, "children": [], "start_point": {"row": 25, "column": 10}, "end_point": {"row": 25, "column": 22}}, {"id": 53, "type": "declaration", "text": "class IpHelper : public brillo::Daemon, public base::MessageLoopForIO::Watcher {\n public:\n explicit IpHelper(const Options& opt, base::ScopedFD control_fd);", "parent": 50, "children": [54, 55, 58, 63], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 31, "column": 67}}, {"id": 54, "type": "identifier", "text": "IpHelper", "parent": 53, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 14}}, {"id": 55, "type": "ERROR", "text": ": public brillo::Daemon", "parent": 53, "children": [56, 57], "start_point": {"row": 29, "column": 15}, "end_point": {"row": 29, "column": 38}}, {"id": 56, "type": "identifier", "text": "brillo", "parent": 55, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 30}}, {"id": 57, "type": "identifier", "text": "Daemon", "parent": 55, "children": [], "start_point": {"row": 29, "column": 32}, "end_point": {"row": 29, "column": 38}}, {"id": 58, "type": "ERROR", "text": "public base::MessageLoopForIO::Watcher {\n public:\n explicit", "parent": 53, "children": [59, 60, 61, 62], "start_point": {"row": 29, "column": 40}, "end_point": {"row": 31, "column": 10}}, {"id": 59, "type": "identifier", "text": "base", "parent": 58, "children": [], "start_point": {"row": 29, "column": 47}, "end_point": {"row": 29, "column": 51}}, {"id": 60, "type": "identifier", "text": "MessageLoopForIO", "parent": 58, "children": [], "start_point": {"row": 29, "column": 53}, "end_point": {"row": 29, "column": 69}}, {"id": 61, "type": "identifier", "text": "Watcher", "parent": 58, "children": [], "start_point": {"row": 29, "column": 71}, "end_point": {"row": 29, "column": 78}}, {"id": 62, "type": "identifier", "text": "explicit", "parent": 58, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 10}}, {"id": 63, "type": "function_declarator", "text": "IpHelper(const Options& opt, base::ScopedFD control_fd)", "parent": 53, "children": [64, 65], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 66}}, {"id": 64, "type": "identifier", "text": "IpHelper", "parent": 63, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 19}}, {"id": 65, "type": "parameter_list", "text": "(const Options& opt, base::ScopedFD control_fd)", "parent": 63, "children": [66, 69], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 66}}, {"id": 66, "type": "parameter_declaration", "text": "const Options& opt", "parent": 65, "children": [67, 68], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 38}}, {"id": 67, "type": "type_identifier", "text": "Options", "parent": 66, "children": [], "start_point": {"row": 31, "column": 26}, "end_point": {"row": 31, "column": 33}}, {"id": 68, "type": "identifier", "text": "opt", "parent": 66, "children": [], "start_point": {"row": 31, "column": 35}, "end_point": {"row": 31, "column": 38}}, {"id": 69, "type": "parameter_declaration", "text": "base::ScopedFD control_fd", "parent": 65, "children": [70, 71, 73], "start_point": {"row": 31, "column": 40}, "end_point": {"row": 31, "column": 65}}, {"id": 70, "type": "type_identifier", "text": "base", "parent": 69, "children": [], "start_point": {"row": 31, "column": 40}, "end_point": {"row": 31, "column": 44}}, {"id": 71, "type": "ERROR", "text": "::ScopedFD", "parent": 69, "children": [72], "start_point": {"row": 31, "column": 44}, "end_point": {"row": 31, "column": 54}}, {"id": 72, "type": "identifier", "text": "ScopedFD", "parent": 71, "children": [], "start_point": {"row": 31, "column": 46}, "end_point": {"row": 31, "column": 54}}, {"id": 73, "type": "identifier", "text": "control_fd", "parent": 69, "children": [], "start_point": {"row": 31, "column": 55}, "end_point": {"row": 31, "column": 65}}, {"id": 74, "type": "labeled_statement", "text": "protected:\n // Overrides Daemon init callback.\n int OnInit() override;", "parent": 50, "children": [75], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 35, "column": 24}}, {"id": 75, "type": "ERROR", "text": "int OnInit() override", "parent": 74, "children": [76, 77], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 23}}, {"id": 76, "type": "primitive_type", "text": "int", "parent": 75, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 5}}, {"id": 77, "type": "function_declarator", "text": "OnInit() override", "parent": 75, "children": [78, 79, 80], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 23}}, {"id": 78, "type": "identifier", "text": "OnInit", "parent": 77, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 12}}, {"id": 79, "type": "parameter_list", "text": "()", "parent": 77, "children": [], "start_point": {"row": 35, "column": 12}, "end_point": {"row": 35, "column": 14}}, {"id": 80, "type": "identifier", "text": "override", "parent": 77, "children": [], "start_point": {"row": 35, "column": 15}, "end_point": {"row": 35, "column": 23}}, {"id": 81, "type": "ERROR", "text": "void OnFileCanReadWithoutBlocking(int fd) override", "parent": 50, "children": [82, 83], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 52}}, {"id": 82, "type": "primitive_type", "text": "void", "parent": 81, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 6}}, {"id": 83, "type": "function_declarator", "text": "OnFileCanReadWithoutBlocking(int fd) override", "parent": 81, "children": [84, 85, 89], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 52}}, {"id": 84, "type": "identifier", "text": "OnFileCanReadWithoutBlocking", "parent": 83, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 35}}, {"id": 85, "type": "parameter_list", "text": "(int fd)", "parent": 83, "children": [86], "start_point": {"row": 38, "column": 35}, "end_point": {"row": 38, "column": 43}}, {"id": 86, "type": "parameter_declaration", "text": "int fd", "parent": 85, "children": [87, 88], "start_point": {"row": 38, "column": 36}, "end_point": {"row": 38, "column": 42}}, {"id": 87, "type": "primitive_type", "text": "int", "parent": 86, "children": [], "start_point": {"row": 38, "column": 36}, "end_point": {"row": 38, "column": 39}}, {"id": 88, "type": "identifier", "text": "fd", "parent": 86, "children": [], "start_point": {"row": 38, "column": 40}, "end_point": {"row": 38, "column": 42}}, {"id": 89, "type": "identifier", "text": "override", "parent": 83, "children": [], "start_point": {"row": 38, "column": 44}, "end_point": {"row": 38, "column": 52}}, {"id": 90, "type": "function_definition", "text": "void OnFileCanWriteWithoutBlocking(int fd) override {}", "parent": 50, "children": [91, 92], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 56}}, {"id": 91, "type": "primitive_type", "text": "void", "parent": 90, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 6}}, {"id": 92, "type": "function_declarator", "text": "OnFileCanWriteWithoutBlocking(int fd) override", "parent": 90, "children": [93, 94, 98], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 53}}, {"id": 93, "type": "identifier", "text": "OnFileCanWriteWithoutBlocking", "parent": 92, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 36}}, {"id": 94, "type": "parameter_list", "text": "(int fd)", "parent": 92, "children": [95], "start_point": {"row": 39, "column": 36}, "end_point": {"row": 39, "column": 44}}, {"id": 95, "type": "parameter_declaration", "text": "int fd", "parent": 94, "children": [96, 97], "start_point": {"row": 39, "column": 37}, "end_point": {"row": 39, "column": 43}}, {"id": 96, "type": "primitive_type", "text": "int", "parent": 95, "children": [], "start_point": {"row": 39, "column": 37}, "end_point": {"row": 39, "column": 40}}, {"id": 97, "type": "identifier", "text": "fd", "parent": 95, "children": [], "start_point": {"row": 39, "column": 41}, "end_point": {"row": 39, "column": 43}}, {"id": 98, "type": "identifier", "text": "override", "parent": 92, "children": [], "start_point": {"row": 39, "column": 45}, "end_point": {"row": 39, "column": 53}}, {"id": 99, "type": "declaration", "text": "void InitialSetup();", "parent": 50, "children": [100, 101], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 22}}, {"id": 100, "type": "primitive_type", "text": "void", "parent": 99, "children": [], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 43, "column": 6}}, {"id": 101, "type": "function_declarator", "text": "InitialSetup()", "parent": 99, "children": [102, 103], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 21}}, {"id": 102, "type": "identifier", "text": "InitialSetup", "parent": 101, "children": [], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 19}}, {"id": 103, "type": "parameter_list", "text": "()", "parent": 101, "children": [], "start_point": {"row": 43, "column": 19}, "end_point": {"row": 43, "column": 21}}, {"id": 104, "type": "declaration", "text": "void HandleCommand();", "parent": 50, "children": [105, 106], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 23}}, {"id": 105, "type": "primitive_type", "text": "void", "parent": 104, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 6}}, {"id": 106, "type": "function_declarator", "text": "HandleCommand()", "parent": 104, "children": [107, 108], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 22}}, {"id": 107, "type": "identifier", "text": "HandleCommand", "parent": 106, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 20}}, {"id": 108, "type": "parameter_list", "text": "()", "parent": 106, "children": [], "start_point": {"row": 46, "column": 20}, "end_point": {"row": 46, "column": 22}}, {"id": 109, "type": "declaration", "text": "const struct in6_addr& ExtractAddr6(const std::string& in);", "parent": 50, "children": [110, 113], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 61}}, {"id": 110, "type": "struct_specifier", "text": "struct in6_addr", "parent": 109, "children": [111, 112], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 23}}, {"id": 111, "type": "struct", "text": "struct", "parent": 110, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 14}}, {"id": 112, "type": "type_identifier", "text": "in6_addr", "parent": 110, "children": [], "start_point": {"row": 49, "column": 15}, "end_point": {"row": 49, "column": 23}}, {"id": 113, "type": "function_declarator", "text": "ExtractAddr6(const std::string& in)", "parent": 109, "children": [114, 115], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 60}}, {"id": 114, "type": "identifier", "text": "ExtractAddr6", "parent": 113, "children": [], "start_point": {"row": 49, "column": 25}, "end_point": {"row": 49, "column": 37}}, {"id": 115, "type": "parameter_list", "text": "(const std::string& in)", "parent": 113, "children": [116], "start_point": {"row": 49, "column": 37}, "end_point": {"row": 49, "column": 60}}, {"id": 116, "type": "parameter_declaration", "text": "const std::string& in", "parent": 115, "children": [117, 118, 120], "start_point": {"row": 49, "column": 38}, "end_point": {"row": 49, "column": 59}}, {"id": 117, "type": "type_identifier", "text": "std", "parent": 116, "children": [], "start_point": {"row": 49, "column": 44}, "end_point": {"row": 49, "column": 47}}, {"id": 118, "type": "ERROR", "text": "::string&", "parent": 116, "children": [119], "start_point": {"row": 49, "column": 47}, "end_point": {"row": 49, "column": 56}}, {"id": 119, "type": "identifier", "text": "string", "parent": 118, "children": [], "start_point": {"row": 49, "column": 49}, "end_point": {"row": 49, "column": 55}}, {"id": 120, "type": "identifier", "text": "in", "parent": 116, "children": [], "start_point": {"row": 49, "column": 57}, "end_point": {"row": 49, "column": 59}}, {"id": 121, "type": "declaration", "text": "bool ValidateIfname(const std::string& in);", "parent": 50, "children": [122, 123], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 45}}, {"id": 122, "type": "primitive_type", "text": "bool", "parent": 121, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 6}}, {"id": 123, "type": "function_declarator", "text": "ValidateIfname(const std::string& in)", "parent": 121, "children": [124, 125], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 44}}, {"id": 124, "type": "identifier", "text": "ValidateIfname", "parent": 123, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 21}}, {"id": 125, "type": "parameter_list", "text": "(const std::string& in)", "parent": 123, "children": [126], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 44}}, {"id": 126, "type": "parameter_declaration", "text": "const std::string& in", "parent": 125, "children": [127, 128, 130], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 43}}, {"id": 127, "type": "type_identifier", "text": "std", "parent": 126, "children": [], "start_point": {"row": 52, "column": 28}, "end_point": {"row": 52, "column": 31}}, {"id": 128, "type": "ERROR", "text": "::string&", "parent": 126, "children": [129], "start_point": {"row": 52, "column": 31}, "end_point": {"row": 52, "column": 40}}, {"id": 129, "type": "identifier", "text": "string", "parent": 128, "children": [], "start_point": {"row": 52, "column": 33}, "end_point": {"row": 52, "column": 39}}, {"id": 130, "type": "identifier", "text": "in", "parent": 126, "children": [], "start_point": {"row": 52, "column": 41}, "end_point": {"row": 52, "column": 43}}, {"id": 131, "type": "labeled_statement", "text": "private:\n base::ScopedFD control_fd_;", "parent": 50, "children": [132], "start_point": {"row": 54, "column": 1}, "end_point": {"row": 55, "column": 29}}, {"id": 132, "type": "labeled_statement", "text": "base::ScopedFD control_fd_;", "parent": 131, "children": [133, 134], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 29}}, {"id": 133, "type": "statement_identifier", "text": "base", "parent": 132, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 6}}, {"id": 134, "type": "declaration", "text": "ScopedFD control_fd_;", "parent": 132, "children": [135, 136], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 29}}, {"id": 135, "type": "type_identifier", "text": "ScopedFD", "parent": 134, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 16}}, {"id": 136, "type": "identifier", "text": "control_fd_", "parent": 134, "children": [], "start_point": {"row": 55, "column": 17}, "end_point": {"row": 55, "column": 28}}, {"id": 137, "type": "labeled_statement", "text": "MessageLoopForIO::FileDescriptorWatcher control_watcher_;", "parent": 50, "children": [138, 139], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 59}}, {"id": 138, "type": "statement_identifier", "text": "MessageLoopForIO", "parent": 137, "children": [], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 18}}, {"id": 139, "type": "declaration", "text": "FileDescriptorWatcher control_watcher_;", "parent": 137, "children": [140, 141], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 59}}, {"id": 140, "type": "type_identifier", "text": "FileDescriptorWatcher", "parent": 139, "children": [], "start_point": {"row": 56, "column": 20}, "end_point": {"row": 56, "column": 41}}, {"id": 141, "type": "identifier", "text": "control_watcher_", "parent": 139, "children": [], "start_point": {"row": 56, "column": 42}, "end_point": {"row": 56, "column": 58}}, {"id": 142, "type": "function_definition", "text": "int con_init_tries_{0}", "parent": 50, "children": [143, 144], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 24}}, {"id": 143, "type": "primitive_type", "text": "int", "parent": 142, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 5}}, {"id": 144, "type": "identifier", "text": "con_init_tries_", "parent": 142, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 21}}, {"id": 145, "type": "ERROR", "text": "0", "parent": 142, "children": [146], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 23}}, {"id": 146, "type": "number_literal", "text": "0", "parent": 145, "children": [], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 23}}, {"id": 147, "type": "function_definition", "text": "bool init_done_{false};\n\n IpHelperMessage pending_command_;\n std::unique_ptr<ArcIpConfig> arc_ip_config_;\n\n base::WeakPtrFactory<IpHelper> weak_factory_{this};\n\n DISALLOW_COPY_AND_ASSIGN(IpHelper);\n}", "parent": 50, "children": [148, 149], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 67, "column": 1}}, {"id": 148, "type": "primitive_type", "text": "bool", "parent": 147, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 6}}, {"id": 149, "type": "identifier", "text": "init_done_", "parent": 147, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 17}}, {"id": 150, "type": "false", "text": "false", "parent": 147, "children": [], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 23}}, {"id": 151, "type": "declaration", "text": "IpHelperMessage pending_command_;", "parent": 147, "children": [152, 153], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 35}}, {"id": 152, "type": "type_identifier", "text": "IpHelperMessage", "parent": 151, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 17}}, {"id": 153, "type": "identifier", "text": "pending_command_", "parent": 151, "children": [], "start_point": {"row": 61, "column": 18}, "end_point": {"row": 61, "column": 34}}, {"id": 154, "type": "labeled_statement", "text": "std::unique_ptr<ArcIpConfig> arc_ip_config_;", "parent": 147, "children": [155], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 46}}, {"id": 155, "type": "statement_identifier", "text": "std", "parent": 154, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 5}}, {"id": 156, "type": "binary_expression", "text": "unique_ptr<ArcIpConfig> arc_ip_config_", "parent": 154, "children": [157, 161, 162], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 45}}, {"id": 157, "type": "binary_expression", "text": "unique_ptr<ArcIpConfig", "parent": 156, "children": [158, 159, 160], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 29}}, {"id": 158, "type": "identifier", "text": "unique_ptr", "parent": 157, "children": [], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 17}}, {"id": 159, "type": "<", "text": "<", "parent": 157, "children": [], "start_point": {"row": 62, "column": 17}, "end_point": {"row": 62, "column": 18}}, {"id": 160, "type": "identifier", "text": "ArcIpConfig", "parent": 157, "children": [], "start_point": {"row": 62, "column": 18}, "end_point": {"row": 62, "column": 29}}, {"id": 161, "type": ">", "text": ">", "parent": 156, "children": [], "start_point": {"row": 62, "column": 29}, "end_point": {"row": 62, "column": 30}}, {"id": 162, "type": "identifier", "text": "arc_ip_config_", "parent": 156, "children": [], "start_point": {"row": 62, "column": 31}, "end_point": {"row": 62, "column": 45}}, {"id": 163, "type": "labeled_statement", "text": "base::WeakPtrFactory<IpHelper> weak_factory_{this}", "parent": 147, "children": [164, 165], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 52}}, {"id": 164, "type": "statement_identifier", "text": "base", "parent": 163, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 6}}, {"id": 165, "type": "ERROR", "text": ":WeakPtrFactory<IpHelper> weak_factory_", "parent": 163, "children": [166], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 46}}, {"id": 166, "type": "binary_expression", "text": "WeakPtrFactory<IpHelper> weak_factory_", "parent": 165, "children": [167, 171, 172], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 46}}, {"id": 167, "type": "binary_expression", "text": "WeakPtrFactory<IpHelper", "parent": 166, "children": [168, 169, 170], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 31}}, {"id": 168, "type": "identifier", "text": "WeakPtrFactory", "parent": 167, "children": [], "start_point": {"row": 64, "column": 8}, "end_point": {"row": 64, "column": 22}}, {"id": 169, "type": "<", "text": "<", "parent": 167, "children": [], "start_point": {"row": 64, "column": 22}, "end_point": {"row": 64, "column": 23}}, {"id": 170, "type": "identifier", "text": "IpHelper", "parent": 167, "children": [], "start_point": {"row": 64, "column": 23}, "end_point": {"row": 64, "column": 31}}, {"id": 171, "type": ">", "text": ">", "parent": 166, "children": [], "start_point": {"row": 64, "column": 31}, "end_point": {"row": 64, "column": 32}}, {"id": 172, "type": "identifier", "text": "weak_factory_", "parent": 166, "children": [], "start_point": {"row": 64, "column": 33}, "end_point": {"row": 64, "column": 46}}, {"id": 173, "type": "ERROR", "text": "this", "parent": 163, "children": [174], "start_point": {"row": 64, "column": 47}, "end_point": {"row": 64, "column": 51}}, {"id": 174, "type": "identifier", "text": "this", "parent": 173, "children": [], "start_point": {"row": 64, "column": 47}, "end_point": {"row": 64, "column": 51}}, {"id": 175, "type": "call_expression", "text": "DISALLOW_COPY_AND_ASSIGN(IpHelper)", "parent": 147, "children": [176, 177], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 36}}, {"id": 176, "type": "identifier", "text": "DISALLOW_COPY_AND_ASSIGN", "parent": 175, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 26}}, {"id": 177, "type": "argument_list", "text": "(IpHelper)", "parent": 175, "children": [178], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 36}}, {"id": 178, "type": "identifier", "text": "IpHelper", "parent": 177, "children": [], "start_point": {"row": 66, "column": 27}, "end_point": {"row": 66, "column": 35}}, {"id": 179, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 6}}]}, "node_categories": {"declarations": {"functions": [50, 63, 77, 83, 90, 92, 101, 106, 113, 123, 142, 147], "variables": [42, 53, 66, 69, 86, 95, 99, 104, 109, 116, 121, 126, 134, 139, 151], "classes": [110, 111], "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], "modules": [], "enums": []}, "statements": {"expressions": [156, 157, 166, 167, 175], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 43, 45, 48, 49, 51, 52, 54, 56, 57, 59, 60, 61, 62, 64, 67, 68, 70, 72, 73, 78, 80, 84, 88, 89, 93, 97, 98, 102, 107, 112, 114, 117, 119, 120, 124, 127, 129, 130, 133, 135, 136, 138, 140, 141, 144, 149, 152, 153, 155, 158, 160, 162, 164, 168, 170, 172, 174, 176, 178, 179], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 146], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 50, "universal_type": "function", "name": "IpHelper", "text_snippet": "namespace arc_networkd {\n\n// Main loop for the IP helper process.\n// This object is used in the subp"}, {"node_id": 63, "universal_type": "function", "name": "unknown", "text_snippet": "IpHelper(const Options& opt, base::ScopedFD control_fd)"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "OnInit() override"}, {"node_id": 83, "universal_type": "function", "name": "unknown", "text_snippet": "OnFileCanReadWithoutBlocking(int fd) override"}, {"node_id": 90, "universal_type": "function", "name": "OnFileCanWriteWithoutBlocking", "text_snippet": "void OnFileCanWriteWithoutBlocking(int fd) override {}"}, {"node_id": 92, "universal_type": "function", "name": "unknown", "text_snippet": "OnFileCanWriteWithoutBlocking(int fd) override"}, {"node_id": 101, "universal_type": "function", "name": "unknown", "text_snippet": "InitialSetup()"}, {"node_id": 106, "universal_type": "function", "name": "unknown", "text_snippet": "HandleCommand()"}, {"node_id": 113, "universal_type": "function", "name": "unknown", "text_snippet": "ExtractAddr6(const std::string& in)"}, {"node_id": 123, "universal_type": "function", "name": "unknown", "text_snippet": "ValidateIfname(const std::string& in)"}, {"node_id": 142, "universal_type": "function", "name": "con_init_tries_{0}", "text_snippet": "int con_init_tries_{0}"}, {"node_id": 147, "universal_type": "function", "name": "init_done_{false};", "text_snippet": "bool init_done_{false};\n\n IpHelperMessage pending_command_;\n std::unique_ptr<ArcIpConfig> arc_ip_c"}], "class_declarations": [{"node_id": 110, "universal_type": "class", "name": "in6_addr", "text_snippet": "struct in6_addr"}, {"node_id": 111, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <netinet/in.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 <memory>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <string>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <base/files/scoped_file.h>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <base/macros.h>\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include <base/memory/weak_ptr.h>\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include <base/message_loop/message_loop.h>\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include <brillo/daemons/daemon.h>\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"arc-networkd/arc_ip_config.h\"\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include \"arc-networkd/ipc.pb.h\"\n"}, {"node_id": 37, "text": "#include"}, {"node_id": 39, "text": "#include \"arc-networkd/options.h\"\n"}, {"node_id": 40, "text": "#include"}]}, "original_source_code": "// Copyright 2016 The Chromium OS Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef ARC_NETWORKD_IP_HELPER_H_\n#define ARC_NETWORKD_IP_HELPER_H_\n\n#include <netinet/in.h>\n#include <sys/socket.h>\n\n#include <memory>\n#include <string>\n\n#include <base/files/scoped_file.h>\n#include <base/macros.h>\n#include <base/memory/weak_ptr.h>\n#include <base/message_loop/message_loop.h>\n#include <brillo/daemons/daemon.h>\n\n#include \"arc-networkd/arc_ip_config.h\"\n#include \"arc-networkd/ipc.pb.h\"\n#include \"arc-networkd/options.h\"\n\nusing MessageLoopForIO = base::MessageLoopForIO;\n\nnamespace arc_networkd {\n\n// Main loop for the IP helper process.\n// This object is used in the subprocess.\nclass IpHelper : public brillo::Daemon, public base::MessageLoopForIO::Watcher {\n public:\n explicit IpHelper(const Options& opt, base::ScopedFD control_fd);\n\n protected:\n // Overrides Daemon init callback.\n int OnInit() override;\n\n // Overrides MessageLoopForIO callbacks for new data on |control_fd_|.\n void OnFileCanReadWithoutBlocking(int fd) override;\n void OnFileCanWriteWithoutBlocking(int fd) override {}\n\n // Runs every |kContainerRetryDelaySeconds| until the ARC container comes\n // up.\n void InitialSetup();\n\n // Handle |pending_command_|.\n void HandleCommand();\n\n // Helper function to extract raw IPv6 address from a protobuf string.\n const struct in6_addr& ExtractAddr6(const std::string& in);\n\n // Validate interface name string.\n bool ValidateIfname(const std::string& in);\n\n private:\n base::ScopedFD control_fd_;\n MessageLoopForIO::FileDescriptorWatcher control_watcher_;\n\n int con_init_tries_{0};\n bool init_done_{false};\n\n IpHelperMessage pending_command_;\n std::unique_ptr<ArcIpConfig> arc_ip_config_;\n\n base::WeakPtrFactory<IpHelper> weak_factory_{this};\n\n DISALLOW_COPY_AND_ASSIGN(IpHelper);\n};\n\n} // namespace arc_networkd\n\n#endif // ARC_NETWORKD_IP_HELPER_H_\n"}
56
c
#include <stdio.h> int Array3D[2][3][3] = {{{1,2,3},{2,3,4},{4,5,6}}, {{1,2,3},{2,3,4},{4,5,6}}}; int main(void){ int i , j, b; for(i=0; i<2;i++){ for(j=0; j<3; j++){ for(b=0; b<3; b++) printf("%d", Array3D[i][j][b]); } printf("\n"); } printf("\n"); }
22.07
15
(translation_unit) "#include <stdio.h>\nint Array3D[2][3][3] = {{{1,2,3},{2,3,4},{4,5,6}},\n {{1,2,3},{2,3,4},{4,5,6}}};\n\n\nint main(void){\n int i , j, b;\n for(i=0; i<2;i++){\n for(j=0; j<3; j++){\n for(b=0; b<3; b++)\n printf("%d", Array3D[i][j][b]);\n }\n printf("\n");\n }\n printf("\n");\n}" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (declaration) "int Array3D[2][3][3] = {{{1,2,3},{2,3,4},{4,5,6}},\n {{1,2,3},{2,3,4},{4,5,6}}};" (primitive_type) "int" (init_declarator) "Array3D[2][3][3] = {{{1,2,3},{2,3,4},{4,5,6}},\n {{1,2,3},{2,3,4},{4,5,6}}}" (array_declarator) "Array3D[2][3][3]" (array_declarator) "Array3D[2][3]" (array_declarator) "Array3D[2]" (identifier) "Array3D" ([) "[" (number_literal) "2" (]) "]" ([) "[" (number_literal) "3" (]) "]" ([) "[" (number_literal) "3" (]) "]" (=) "=" (initializer_list) "{{{1,2,3},{2,3,4},{4,5,6}},\n {{1,2,3},{2,3,4},{4,5,6}}}" ({) "{" (initializer_list) "{{1,2,3},{2,3,4},{4,5,6}}" ({) "{" (initializer_list) "{1,2,3}" ({) "{" (number_literal) "1" (,) "," (number_literal) "2" (,) "," (number_literal) "3" (}) "}" (,) "," (initializer_list) "{2,3,4}" ({) "{" (number_literal) "2" (,) "," (number_literal) "3" (,) "," (number_literal) "4" (}) "}" (,) "," (initializer_list) "{4,5,6}" ({) "{" (number_literal) "4" (,) "," (number_literal) "5" (,) "," (number_literal) "6" (}) "}" (}) "}" (,) "," (initializer_list) "{{1,2,3},{2,3,4},{4,5,6}}" ({) "{" (initializer_list) "{1,2,3}" ({) "{" (number_literal) "1" (,) "," (number_literal) "2" (,) "," (number_literal) "3" (}) "}" (,) "," (initializer_list) "{2,3,4}" ({) "{" (number_literal) "2" (,) "," (number_literal) "3" (,) "," (number_literal) "4" (}) "}" (,) "," (initializer_list) "{4,5,6}" ({) "{" (number_literal) "4" (,) "," (number_literal) "5" (,) "," (number_literal) "6" (}) "}" (}) "}" (}) "}" (;) ";" (function_definition) "int main(void){\n int i , j, b;\n for(i=0; i<2;i++){\n for(j=0; j<3; j++){\n for(b=0; b<3; b++)\n printf("%d", Array3D[i][j][b]);\n }\n printf("\n");\n }\n printf("\n");\n}" (primitive_type) "int" (function_declarator) "main(void)" (identifier) "main" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n int i , j, b;\n for(i=0; i<2;i++){\n for(j=0; j<3; j++){\n for(b=0; b<3; b++)\n printf("%d", Array3D[i][j][b]);\n }\n printf("\n");\n }\n printf("\n");\n}" ({) "{" (declaration) "int i , j, b;" (primitive_type) "int" (identifier) "i" (,) "," (identifier) "j" (,) "," (identifier) "b" (;) ";" (for_statement) "for(i=0; i<2;i++){\n for(j=0; j<3; j++){\n for(b=0; b<3; b++)\n printf("%d", Array3D[i][j][b]);\n }\n printf("\n");\n }" (for) "for" (() "(" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<2" (identifier) "i" (<) "<" (number_literal) "2" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n for(j=0; j<3; j++){\n for(b=0; b<3; b++)\n printf("%d", Array3D[i][j][b]);\n }\n printf("\n");\n }" ({) "{" (for_statement) "for(j=0; j<3; j++){\n for(b=0; b<3; b++)\n printf("%d", Array3D[i][j][b]);\n }" (for) "for" (() "(" (assignment_expression) "j=0" (identifier) "j" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "j<3" (identifier) "j" (<) "<" (number_literal) "3" (;) ";" (update_expression) "j++" (identifier) "j" (++) "++" ()) ")" (compound_statement) "{\n for(b=0; b<3; b++)\n printf("%d", Array3D[i][j][b]);\n }" ({) "{" (for_statement) "for(b=0; b<3; b++)\n printf("%d", Array3D[i][j][b]);" (for) "for" (() "(" (assignment_expression) "b=0" (identifier) "b" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "b<3" (identifier) "b" (<) "<" (number_literal) "3" (;) ";" (update_expression) "b++" (identifier) "b" (++) "++" ()) ")" (expression_statement) "printf("%d", Array3D[i][j][b]);" (call_expression) "printf("%d", Array3D[i][j][b])" (identifier) "printf" (argument_list) "("%d", Array3D[i][j][b])" (() "(" (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (subscript_expression) "Array3D[i][j][b]" (subscript_expression) "Array3D[i][j]" (subscript_expression) "Array3D[i]" (identifier) "Array3D" ([) "[" (identifier) "i" (]) "]" ([) "[" (identifier) "j" (]) "]" ([) "[" (identifier) "b" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}"
208
0
{"language": "c", "success": true, "metadata": {"lines": 15, "avg_line_length": 22.07, "nodes": 110, "errors": 0, "source_hash": "fa5b30033c4501ca532b48cdf58f110ff1b681d12ef5536bf353823282b5bd50", "categorized_nodes": 77}, "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": "declaration", "text": "int Array3D[2][3][3] = {{{1,2,3},{2,3,4},{4,5,6}},\n {{1,2,3},{2,3,4},{4,5,6}}};", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 52}}, {"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": "init_declarator", "text": "Array3D[2][3][3] = {{{1,2,3},{2,3,4},{4,5,6}},\n {{1,2,3},{2,3,4},{4,5,6}}}", "parent": 3, "children": [6, 13, 14], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 2, "column": 51}}, {"id": 6, "type": "array_declarator", "text": "Array3D[2][3][3]", "parent": 5, "children": [7, 12], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 20}}, {"id": 7, "type": "array_declarator", "text": "Array3D[2][3]", "parent": 6, "children": [8, 11], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 17}}, {"id": 8, "type": "array_declarator", "text": "Array3D[2]", "parent": 7, "children": [9, 10], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 14}}, {"id": 9, "type": "identifier", "text": "Array3D", "parent": 8, "children": [], "start_point": {"row": 1, "column": 4}, "end_point": {"row": 1, "column": 11}}, {"id": 10, "type": "number_literal", "text": "2", "parent": 8, "children": [], "start_point": {"row": 1, "column": 12}, "end_point": {"row": 1, "column": 13}}, {"id": 11, "type": "number_literal", "text": "3", "parent": 7, "children": [], "start_point": {"row": 1, "column": 15}, "end_point": {"row": 1, "column": 16}}, {"id": 12, "type": "number_literal", "text": "3", "parent": 6, "children": [], "start_point": {"row": 1, "column": 18}, "end_point": {"row": 1, "column": 19}}, {"id": 13, "type": "=", "text": "=", "parent": 5, "children": [], "start_point": {"row": 1, "column": 21}, "end_point": {"row": 1, "column": 22}}, {"id": 14, "type": "initializer_list", "text": "{{{1,2,3},{2,3,4},{4,5,6}},\n {{1,2,3},{2,3,4},{4,5,6}}}", "parent": 5, "children": [15, 28], "start_point": {"row": 1, "column": 23}, "end_point": {"row": 2, "column": 51}}, {"id": 15, "type": "initializer_list", "text": "{{1,2,3},{2,3,4},{4,5,6}}", "parent": 14, "children": [16, 20, 24], "start_point": {"row": 1, "column": 24}, "end_point": {"row": 1, "column": 49}}, {"id": 16, "type": "initializer_list", "text": "{1,2,3}", "parent": 15, "children": [17, 18, 19], "start_point": {"row": 1, "column": 25}, "end_point": {"row": 1, "column": 32}}, {"id": 17, "type": "number_literal", "text": "1", "parent": 16, "children": [], "start_point": {"row": 1, "column": 26}, "end_point": {"row": 1, "column": 27}}, {"id": 18, "type": "number_literal", "text": "2", "parent": 16, "children": [], "start_point": {"row": 1, "column": 28}, "end_point": {"row": 1, "column": 29}}, {"id": 19, "type": "number_literal", "text": "3", "parent": 16, "children": [], "start_point": {"row": 1, "column": 30}, "end_point": {"row": 1, "column": 31}}, {"id": 20, "type": "initializer_list", "text": "{2,3,4}", "parent": 15, "children": [21, 22, 23], "start_point": {"row": 1, "column": 33}, "end_point": {"row": 1, "column": 40}}, {"id": 21, "type": "number_literal", "text": "2", "parent": 20, "children": [], "start_point": {"row": 1, "column": 34}, "end_point": {"row": 1, "column": 35}}, {"id": 22, "type": "number_literal", "text": "3", "parent": 20, "children": [], "start_point": {"row": 1, "column": 36}, "end_point": {"row": 1, "column": 37}}, {"id": 23, "type": "number_literal", "text": "4", "parent": 20, "children": [], "start_point": {"row": 1, "column": 38}, "end_point": {"row": 1, "column": 39}}, {"id": 24, "type": "initializer_list", "text": "{4,5,6}", "parent": 15, "children": [25, 26, 27], "start_point": {"row": 1, "column": 41}, "end_point": {"row": 1, "column": 48}}, {"id": 25, "type": "number_literal", "text": "4", "parent": 24, "children": [], "start_point": {"row": 1, "column": 42}, "end_point": {"row": 1, "column": 43}}, {"id": 26, "type": "number_literal", "text": "5", "parent": 24, "children": [], "start_point": {"row": 1, "column": 44}, "end_point": {"row": 1, "column": 45}}, {"id": 27, "type": "number_literal", "text": "6", "parent": 24, "children": [], "start_point": {"row": 1, "column": 46}, "end_point": {"row": 1, "column": 47}}, {"id": 28, "type": "initializer_list", "text": "{{1,2,3},{2,3,4},{4,5,6}}", "parent": 14, "children": [29, 33, 37], "start_point": {"row": 2, "column": 25}, "end_point": {"row": 2, "column": 50}}, {"id": 29, "type": "initializer_list", "text": "{1,2,3}", "parent": 28, "children": [30, 31, 32], "start_point": {"row": 2, "column": 26}, "end_point": {"row": 2, "column": 33}}, {"id": 30, "type": "number_literal", "text": "1", "parent": 29, "children": [], "start_point": {"row": 2, "column": 27}, "end_point": {"row": 2, "column": 28}}, {"id": 31, "type": "number_literal", "text": "2", "parent": 29, "children": [], "start_point": {"row": 2, "column": 29}, "end_point": {"row": 2, "column": 30}}, {"id": 32, "type": "number_literal", "text": "3", "parent": 29, "children": [], "start_point": {"row": 2, "column": 31}, "end_point": {"row": 2, "column": 32}}, {"id": 33, "type": "initializer_list", "text": "{2,3,4}", "parent": 28, "children": [34, 35, 36], "start_point": {"row": 2, "column": 34}, "end_point": {"row": 2, "column": 41}}, {"id": 34, "type": "number_literal", "text": "2", "parent": 33, "children": [], "start_point": {"row": 2, "column": 35}, "end_point": {"row": 2, "column": 36}}, {"id": 35, "type": "number_literal", "text": "3", "parent": 33, "children": [], "start_point": {"row": 2, "column": 37}, "end_point": {"row": 2, "column": 38}}, {"id": 36, "type": "number_literal", "text": "4", "parent": 33, "children": [], "start_point": {"row": 2, "column": 39}, "end_point": {"row": 2, "column": 40}}, {"id": 37, "type": "initializer_list", "text": "{4,5,6}", "parent": 28, "children": [38, 39, 40], "start_point": {"row": 2, "column": 42}, "end_point": {"row": 2, "column": 49}}, {"id": 38, "type": "number_literal", "text": "4", "parent": 37, "children": [], "start_point": {"row": 2, "column": 43}, "end_point": {"row": 2, "column": 44}}, {"id": 39, "type": "number_literal", "text": "5", "parent": 37, "children": [], "start_point": {"row": 2, "column": 45}, "end_point": {"row": 2, "column": 46}}, {"id": 40, "type": "number_literal", "text": "6", "parent": 37, "children": [], "start_point": {"row": 2, "column": 47}, "end_point": {"row": 2, "column": 48}}, {"id": 41, "type": "function_definition", "text": "int main(void){\n int i , j, b;\n for(i=0; i<2;i++){\n for(j=0; j<3; j++){\n for(b=0; b<3; b++)\n printf(\"%d\", Array3D[i][j][b]);\n }\n printf(\"\\n\");\n }\n printf(\"\\n\");\n}", "parent": null, "children": [42, 43], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 42, "type": "primitive_type", "text": "int", "parent": 41, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 3}}, {"id": 43, "type": "function_declarator", "text": "main(void)", "parent": 41, "children": [44, 45], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 14}}, {"id": 44, "type": "identifier", "text": "main", "parent": 43, "children": [], "start_point": {"row": 5, "column": 4}, "end_point": {"row": 5, "column": 8}}, {"id": 45, "type": "parameter_list", "text": "(void)", "parent": 43, "children": [46], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 14}}, {"id": 46, "type": "parameter_declaration", "text": "void", "parent": 45, "children": [47], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 13}}, {"id": 47, "type": "primitive_type", "text": "void", "parent": 46, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 13}}, {"id": 48, "type": "declaration", "text": "int i , j, b;", "parent": 41, "children": [49, 50, 51, 52], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 17}}, {"id": 49, "type": "primitive_type", "text": "int", "parent": 48, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 7}}, {"id": 50, "type": "identifier", "text": "i", "parent": 48, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 9}}, {"id": 51, "type": "identifier", "text": "j", "parent": 48, "children": [], "start_point": {"row": 6, "column": 12}, "end_point": {"row": 6, "column": 13}}, {"id": 52, "type": "identifier", "text": "b", "parent": 48, "children": [], "start_point": {"row": 6, "column": 15}, "end_point": {"row": 6, "column": 16}}, {"id": 53, "type": "for_statement", "text": "for(i=0; i<2;i++){\n for(j=0; j<3; j++){\n for(b=0; b<3; b++)\n printf(\"%d\", Array3D[i][j][b]);\n }\n printf(\"\\n\");\n }", "parent": 41, "children": [54, 58, 62], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 13, "column": 5}}, {"id": 54, "type": "assignment_expression", "text": "i=0", "parent": 53, "children": [55, 56, 57], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 11}}, {"id": 55, "type": "identifier", "text": "i", "parent": 54, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 9}}, {"id": 56, "type": "=", "text": "=", "parent": 54, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 10}}, {"id": 57, "type": "number_literal", "text": "0", "parent": 54, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 11}}, {"id": 58, "type": "binary_expression", "text": "i<2", "parent": 53, "children": [59, 60, 61], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 16}}, {"id": 59, "type": "identifier", "text": "i", "parent": 58, "children": [], "start_point": {"row": 7, "column": 13}, "end_point": {"row": 7, "column": 14}}, {"id": 60, "type": "<", "text": "<", "parent": 58, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 15}}, {"id": 61, "type": "number_literal", "text": "2", "parent": 58, "children": [], "start_point": {"row": 7, "column": 15}, "end_point": {"row": 7, "column": 16}}, {"id": 62, "type": "update_expression", "text": "i++", "parent": 53, "children": [63, 64], "start_point": {"row": 7, "column": 17}, "end_point": {"row": 7, "column": 20}}, {"id": 63, "type": "identifier", "text": "i", "parent": 62, "children": [], "start_point": {"row": 7, "column": 17}, "end_point": {"row": 7, "column": 18}}, {"id": 64, "type": "++", "text": "++", "parent": 62, "children": [], "start_point": {"row": 7, "column": 18}, "end_point": {"row": 7, "column": 20}}, {"id": 65, "type": "for_statement", "text": "for(j=0; j<3; j++){\n for(b=0; b<3; b++)\n printf(\"%d\", Array3D[i][j][b]);\n }", "parent": 53, "children": [66, 70, 74], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 11, "column": 9}}, {"id": 66, "type": "assignment_expression", "text": "j=0", "parent": 65, "children": [67, 68, 69], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 15}}, {"id": 67, "type": "identifier", "text": "j", "parent": 66, "children": [], "start_point": {"row": 8, "column": 12}, "end_point": {"row": 8, "column": 13}}, {"id": 68, "type": "=", "text": "=", "parent": 66, "children": [], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 14}}, {"id": 69, "type": "number_literal", "text": "0", "parent": 66, "children": [], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 15}}, {"id": 70, "type": "binary_expression", "text": "j<3", "parent": 65, "children": [71, 72, 73], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 20}}, {"id": 71, "type": "identifier", "text": "j", "parent": 70, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 18}}, {"id": 72, "type": "<", "text": "<", "parent": 70, "children": [], "start_point": {"row": 8, "column": 18}, "end_point": {"row": 8, "column": 19}}, {"id": 73, "type": "number_literal", "text": "3", "parent": 70, "children": [], "start_point": {"row": 8, "column": 19}, "end_point": {"row": 8, "column": 20}}, {"id": 74, "type": "update_expression", "text": "j++", "parent": 65, "children": [75, 76], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 25}}, {"id": 75, "type": "identifier", "text": "j", "parent": 74, "children": [], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 23}}, {"id": 76, "type": "++", "text": "++", "parent": 74, "children": [], "start_point": {"row": 8, "column": 23}, "end_point": {"row": 8, "column": 25}}, {"id": 77, "type": "for_statement", "text": "for(b=0; b<3; b++)\n printf(\"%d\", Array3D[i][j][b]);", "parent": 65, "children": [78, 82, 86], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 10, "column": 47}}, {"id": 78, "type": "assignment_expression", "text": "b=0", "parent": 77, "children": [79, 80, 81], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 19}}, {"id": 79, "type": "identifier", "text": "b", "parent": 78, "children": [], "start_point": {"row": 9, "column": 16}, "end_point": {"row": 9, "column": 17}}, {"id": 80, "type": "=", "text": "=", "parent": 78, "children": [], "start_point": {"row": 9, "column": 17}, "end_point": {"row": 9, "column": 18}}, {"id": 81, "type": "number_literal", "text": "0", "parent": 78, "children": [], "start_point": {"row": 9, "column": 18}, "end_point": {"row": 9, "column": 19}}, {"id": 82, "type": "binary_expression", "text": "b<3", "parent": 77, "children": [83, 84, 85], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 24}}, {"id": 83, "type": "identifier", "text": "b", "parent": 82, "children": [], "start_point": {"row": 9, "column": 21}, "end_point": {"row": 9, "column": 22}}, {"id": 84, "type": "<", "text": "<", "parent": 82, "children": [], "start_point": {"row": 9, "column": 22}, "end_point": {"row": 9, "column": 23}}, {"id": 85, "type": "number_literal", "text": "3", "parent": 82, "children": [], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 24}}, {"id": 86, "type": "update_expression", "text": "b++", "parent": 77, "children": [87, 88], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 9, "column": 29}}, {"id": 87, "type": "identifier", "text": "b", "parent": 86, "children": [], "start_point": {"row": 9, "column": 26}, "end_point": {"row": 9, "column": 27}}, {"id": 88, "type": "++", "text": "++", "parent": 86, "children": [], "start_point": {"row": 9, "column": 27}, "end_point": {"row": 9, "column": 29}}, {"id": 89, "type": "call_expression", "text": "printf(\"%d\", Array3D[i][j][b])", "parent": 77, "children": [90, 91], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 46}}, {"id": 90, "type": "identifier", "text": "printf", "parent": 89, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 22}}, {"id": 91, "type": "argument_list", "text": "(\"%d\", Array3D[i][j][b])", "parent": 89, "children": [92, 93], "start_point": {"row": 10, "column": 22}, "end_point": {"row": 10, "column": 46}}, {"id": 92, "type": "string_literal", "text": "\"%d\"", "parent": 91, "children": [], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 27}}, {"id": 93, "type": "subscript_expression", "text": "Array3D[i][j][b]", "parent": 91, "children": [94, 99], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 45}}, {"id": 94, "type": "subscript_expression", "text": "Array3D[i][j]", "parent": 93, "children": [95, 98], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 42}}, {"id": 95, "type": "subscript_expression", "text": "Array3D[i]", "parent": 94, "children": [96, 97], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 39}}, {"id": 96, "type": "identifier", "text": "Array3D", "parent": 95, "children": [], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 36}}, {"id": 97, "type": "identifier", "text": "i", "parent": 95, "children": [], "start_point": {"row": 10, "column": 37}, "end_point": {"row": 10, "column": 38}}, {"id": 98, "type": "identifier", "text": "j", "parent": 94, "children": [], "start_point": {"row": 10, "column": 40}, "end_point": {"row": 10, "column": 41}}, {"id": 99, "type": "identifier", "text": "b", "parent": 93, "children": [], "start_point": {"row": 10, "column": 43}, "end_point": {"row": 10, "column": 44}}, {"id": 100, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 53, "children": [101, 102], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 20}}, {"id": 101, "type": "identifier", "text": "printf", "parent": 100, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 14}}, {"id": 102, "type": "argument_list", "text": "(\"\\n\")", "parent": 100, "children": [103], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 20}}, {"id": 103, "type": "string_literal", "text": "\"\\n\"", "parent": 102, "children": [104], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 19}}, {"id": 104, "type": "escape_sequence", "text": "\\n", "parent": 103, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 18}}, {"id": 105, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 41, "children": [106, 107], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 16}}, {"id": 106, "type": "identifier", "text": "printf", "parent": 105, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 10}}, {"id": 107, "type": "argument_list", "text": "(\"\\n\")", "parent": 105, "children": [108], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 16}}, {"id": 108, "type": "string_literal", "text": "\"\\n\"", "parent": 107, "children": [109], "start_point": {"row": 14, "column": 11}, "end_point": {"row": 14, "column": 15}}, {"id": 109, "type": "escape_sequence", "text": "\\n", "parent": 108, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 14}}]}, "node_categories": {"declarations": {"functions": [41, 43], "variables": [3, 46, 48], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [58, 62, 70, 74, 82, 86, 89, 93, 94, 95, 100, 105], "assignments": [54, 66, 78], "loops": [53, 65, 77], "conditionals": [9, 44, 50, 51, 52, 55, 59, 63, 67, 71, 75, 79, 83, 87, 90, 96, 97, 98, 99, 101, 106], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 10, 11, 12, 17, 18, 19, 21, 22, 23, 25, 26, 27, 30, 31, 32, 34, 35, 36, 38, 39, 40, 57, 61, 69, 73, 81, 85, 92, 103, 108], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 41, "universal_type": "function", "name": "main", "text_snippet": "int main(void){\n int i , j, b;\n for(i=0; i<2;i++){\n for(j=0; j<3; j++){\n for"}, {"node_id": 43, "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"}]}, "original_source_code": "#include <stdio.h>\nint Array3D[2][3][3] = {{{1,2,3},{2,3,4},{4,5,6}},\n {{1,2,3},{2,3,4},{4,5,6}}};\n\n\nint main(void){\n int i , j, b;\n for(i=0; i<2;i++){\n for(j=0; j<3; j++){\n for(b=0; b<3; b++)\n printf(\"%d\", Array3D[i][j][b]);\n }\n printf(\"\\n\");\n }\n printf(\"\\n\");\n}"}
57
c
// // DQMineViewController.h // DQStudy // // Created by youdingquan on 16/5/1. // Copyright © 2016年 youdingquan. All rights reserved. // #import <UIKit/UIKit.h> @interface DQMineViewController : UIViewController @end
21.2
10
(translation_unit) "//\n// DQMineViewController.h\n// DQStudy\n//\n// Created by youdingquan on 16/5/1.\n// Copyright © 2016年 youdingquan. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface DQMineViewController : UIViewController\n\n@end\n" (comment) "//" (comment) "// DQMineViewController.h" (comment) "// DQStudy" (comment) "//" (comment) "// Created by youdingquan on 16/5/1." (comment) "// Copyright © 2016年 youdingquan. 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 DQMineViewController : UIViewController\n\n@end\n" (ERROR) "t" (type_identifier) "erface DQ" (identifier) "ineViewController : " (:) "I" (identifier) "iewController\n\n@" (ERROR) "d" (identifier) "\n"
19
3
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 21.2, "nodes": 10, "errors": 0, "source_hash": "154743a87afee464d2f597c65cdc857ee49ab3ee7fd153210efcede1bed6498f", "categorized_nodes": 5}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "port <UIKit/UIKit.h>\n\n@i", "parent": null, "children": [1, 2], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "port <U", "parent": 0, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "Kit/UIKit.h>\n\n@", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 23}}, {"id": 3, "type": "ERROR", "text": "terface DQMineViewController : UIViewController\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 DQ", "parent": 3, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 10}}, {"id": 6, "type": "identifier", "text": "ineViewController : ", "parent": 3, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 31}}, {"id": 7, "type": "identifier", "text": "iewController\n\n@", "parent": 3, "children": [], "start_point": {"row": 10, "column": 34}, "end_point": {"row": 10, "column": 50}}, {"id": 8, "type": "ERROR", "text": "d", "parent": 3, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 9, "type": "identifier", "text": "\n", "parent": 3, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [5, 6, 7, 9], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// DQMineViewController.h\n// DQStudy\n//\n// Created by youdingquan on 16/5/1.\n// Copyright \u00a9 2016\u5e74 youdingquan. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface DQMineViewController : UIViewController\n\n@end\n"}
58
c
#ifndef SAPITRELLO_CSOPORT_11_TERMINAL_H #define SAPITRELLO_CSOPORT_11_TERMINAL_H #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include "instance.h" void terminalLoop(); #endif //SAPITRELLO_CSOPORT_11_TERMINAL_H
26.22
9
(translation_unit) "#ifndef SAPITRELLO_CSOPORT_11_TERMINAL_H\n#define SAPITRELLO_CSOPORT_11_TERMINAL_H\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <ctype.h>\n\n#include "instance.h"\n\nvoid terminalLoop();\n\n#endif //SAPITRELLO_CSOPORT_11_TERMINAL_H\n" (preproc_ifdef) "#ifndef SAPITRELLO_CSOPORT_11_TERMINAL_H\n#define SAPITRELLO_CSOPORT_11_TERMINAL_H\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <ctype.h>\n\n#include "instance.h"\n\nvoid terminalLoop();\n\n#endif" (#ifndef) "#ifndef" (identifier) "SAPITRELLO_CSOPORT_11_TERMINAL_H" (preproc_def) "#define SAPITRELLO_CSOPORT_11_TERMINAL_H\n" (#define) "#define" (identifier) "SAPITRELLO_CSOPORT_11_TERMINAL_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>" (preproc_include) "#include <ctype.h>\n" (#include) "#include" (system_lib_string) "<ctype.h>" (preproc_include) "#include "instance.h"\n" (#include) "#include" (string_literal) ""instance.h"" (") """ (string_content) "instance.h" (") """ (declaration) "void terminalLoop();" (primitive_type) "void" (function_declarator) "terminalLoop()" (identifier) "terminalLoop" (parameter_list) "()" (() "(" ()) ")" (;) ";" (#endif) "#endif" (comment) "//SAPITRELLO_CSOPORT_11_TERMINAL_H"
35
0
{"language": "c", "success": true, "metadata": {"lines": 9, "avg_line_length": 26.22, "nodes": 27, "errors": 0, "source_hash": "ea6760a8d2fdb5a7ad214dfaef2375ca972b445892eeb8c6f449ce1a1f65e978", "categorized_nodes": 23}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef SAPITRELLO_CSOPORT_11_TERMINAL_H\n#define SAPITRELLO_CSOPORT_11_TERMINAL_H\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <ctype.h>\n\n#include \"instance.h\"\n\nvoid terminalLoop();\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 26], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 12, "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": "SAPITRELLO_CSOPORT_11_TERMINAL_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 40}}, {"id": 3, "type": "preproc_def", "text": "#define SAPITRELLO_CSOPORT_11_TERMINAL_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": "SAPITRELLO_CSOPORT_11_TERMINAL_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 40}}, {"id": 6, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<stdio.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <stdlib.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": "<stdlib.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include <string.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": "<string.h>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 19}}, {"id": 15, "type": "preproc_include", "text": "#include <ctype.h>\n", "parent": 0, "children": [16, 17], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<ctype.h>", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 18}}, {"id": 18, "type": "preproc_include", "text": "#include \"instance.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": "string_literal", "text": "\"instance.h\"", "parent": 18, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 21}}, {"id": 21, "type": "declaration", "text": "void terminalLoop();", "parent": 0, "children": [22, 23], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 20}}, {"id": 22, "type": "primitive_type", "text": "void", "parent": 21, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 4}}, {"id": 23, "type": "function_declarator", "text": "terminalLoop()", "parent": 21, "children": [24, 25], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 19}}, {"id": 24, "type": "identifier", "text": "terminalLoop", "parent": 23, "children": [], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 17}}, {"id": 25, "type": "parameter_list", "text": "()", "parent": 23, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 19}}, {"id": 26, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 6}}]}, "node_categories": {"declarations": {"functions": [23], "variables": [21], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 24, 26], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [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": "terminalLoop()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <stdio.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <stdlib.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <string.h>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <ctype.h>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"instance.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "#ifndef SAPITRELLO_CSOPORT_11_TERMINAL_H\n#define SAPITRELLO_CSOPORT_11_TERMINAL_H\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <ctype.h>\n\n#include \"instance.h\"\n\nvoid terminalLoop();\n\n#endif //SAPITRELLO_CSOPORT_11_TERMINAL_H\n"}
59
c
// // Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20). // // Copyright (C) 1997-2019 <NAME>. // #import "NSObject-Protocol.h" @class CARNetworkPathMonitor; @protocol CARNetworkPathMonitorObserver <NSObject> - (void)networkPathMonitorDidChangeNetworkPath:(CARNetworkPathMonitor *)arg1; - (void)networkPathMonitor:(CARNetworkPathMonitor *)arg1 didChangeNetworkReachable:(_Bool)arg2; @end
40.45
11
(translation_unit) "//\n// Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20).\n//\n// Copyright (C) 1997-2019 <NAME>.\n//\n\n#import "NSObject-Protocol.h"\n\n@class CARNetworkPathMonitor;\n\n@protocol CARNetworkPathMonitorObserver <NSObject>\n- (void)networkPathMonitorDidChangeNetworkPath:(CARNetworkPathMonitor *)arg1;\n- (void)networkPathMonitor:(CARNetworkPathMonitor *)arg1 didChangeNetworkReachable:(_Bool)arg2;\n@end\n\n" (comment) "//" (comment) "// Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20)." (comment) "//" (comment) "// Copyright (C) 1997-2019 <NAME>." (comment) "//" (preproc_call) "#import "NSObject-Protocol.h"\n" (preproc_directive) "#import" (preproc_arg) ""NSObject-Protocol.h"" (ERROR) "@" (ERROR) "@" (declaration) "class CARNetworkPathMonitor;" (type_identifier) "class" (identifier) "CARNetworkPathMonitor" (;) ";" (ERROR) "@protocol CARNetworkPathMonitorObserver <NSObject>\n- (void)networkPathMonitorDidChangeNetworkPath:(CARNetworkPathMonitor *)arg1" (ERROR) "@" (type_identifier) "protocol" (identifier) "CARNetworkPathMonitorObserver" (<) "<" (identifier) "NSObject" (>) ">" (unary_expression) "- (void)networkPathMonitorDidChangeNetworkPath" (-) "-" (cast_expression) "(void)networkPathMonitorDidChangeNetworkPath" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "networkPathMonitorDidChangeNetworkPath" (:) ":" (() "(" (binary_expression) "CARNetworkPathMonitor *)arg1" (identifier) "CARNetworkPathMonitor" (*) "*" (ERROR) ")" ()) ")" (identifier) "arg1" (expression_statement) ";" (;) ";" (ERROR) "- (void)networkPathMonitor:(CARNetworkPathMonitor *)arg1 didChangeNetworkReachable:(_Bool)" (binary_expression) "- (void)networkPathMonitor:(CARNetworkPathMonitor *)arg1 didChangeNetworkReachable" (unary_expression) "- (void)networkPathMonitor" (-) "-" (cast_expression) "(void)networkPathMonitor" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "networkPathMonitor" (ERROR) ":(CARNetworkPathMonitor" (:) ":" (() "(" (identifier) "CARNetworkPathMonitor" (*) "*" (ERROR) ")arg1" ()) ")" (identifier) "arg1" (identifier) "didChangeNetworkReachable" (:) ":" (() "(" (identifier) "_Bool" ()) ")" (expression_statement) "arg2;" (identifier) "arg2" (;) ";" (ERROR) "@" (ERROR) "@" (expression_statement) "end" (identifier) "end" (;) ""
71
10
{"language": "c", "success": true, "metadata": {"lines": 11, "avg_line_length": 40.45, "nodes": 42, "errors": 0, "source_hash": "6b0f2e02b6679a2c9952a911d47c42896991d2270b002fb766705b2ef23d50d1", "categorized_nodes": 21}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#import \"NSObject-Protocol.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 1, "type": "preproc_directive", "text": "#import", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 2, "type": "preproc_arg", "text": "\"NSObject-Protocol.h\"", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 29}}, {"id": 3, "type": "ERROR", "text": "@", "parent": null, "children": [4], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 4, "type": "ERROR", "text": "@", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 5, "type": "declaration", "text": "class CARNetworkPathMonitor;", "parent": null, "children": [6], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 29}}, {"id": 6, "type": "identifier", "text": "CARNetworkPathMonitor", "parent": 5, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 28}}, {"id": 7, "type": "ERROR", "text": "@protocol CARNetworkPathMonitorObserver <NSObject>\n- (void)networkPathMonitorDidChangeNetworkPath:(CARNetworkPathMonitor *)arg1", "parent": null, "children": [8, 9, 10, 11, 12, 13, 14, 20], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 76}}, {"id": 8, "type": "ERROR", "text": "@", "parent": 7, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 1}}, {"id": 9, "type": "type_identifier", "text": "protocol", "parent": 7, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 9}}, {"id": 10, "type": "identifier", "text": "CARNetworkPathMonitorObserver", "parent": 7, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 39}}, {"id": 11, "type": "<", "text": "<", "parent": 7, "children": [], "start_point": {"row": 10, "column": 40}, "end_point": {"row": 10, "column": 41}}, {"id": 12, "type": "identifier", "text": "NSObject", "parent": 7, "children": [], "start_point": {"row": 10, "column": 41}, "end_point": {"row": 10, "column": 49}}, {"id": 13, "type": ">", "text": ">", "parent": 7, "children": [], "start_point": {"row": 10, "column": 49}, "end_point": {"row": 10, "column": 50}}, {"id": 14, "type": "unary_expression", "text": "- (void)networkPathMonitorDidChangeNetworkPath", "parent": 7, "children": [15, 16], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 46}}, {"id": 15, "type": "-", "text": "-", "parent": 14, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 1}}, {"id": 16, "type": "cast_expression", "text": "(void)networkPathMonitorDidChangeNetworkPath", "parent": 14, "children": [17, 19], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 11, "column": 46}}, {"id": 17, "type": "type_descriptor", "text": "void", "parent": 16, "children": [18], "start_point": {"row": 11, "column": 3}, "end_point": {"row": 11, "column": 7}}, {"id": 18, "type": "primitive_type", "text": "void", "parent": 17, "children": [], "start_point": {"row": 11, "column": 3}, "end_point": {"row": 11, "column": 7}}, {"id": 19, "type": "identifier", "text": "networkPathMonitorDidChangeNetworkPath", "parent": 16, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 46}}, {"id": 20, "type": "binary_expression", "text": "CARNetworkPathMonitor *)arg1", "parent": 7, "children": [21, 22, 23], "start_point": {"row": 11, "column": 48}, "end_point": {"row": 11, "column": 76}}, {"id": 21, "type": "identifier", "text": "CARNetworkPathMonitor", "parent": 20, "children": [], "start_point": {"row": 11, "column": 48}, "end_point": {"row": 11, "column": 69}}, {"id": 22, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 11, "column": 70}, "end_point": {"row": 11, "column": 71}}, {"id": 23, "type": "identifier", "text": "arg1", "parent": 20, "children": [], "start_point": {"row": 11, "column": 72}, "end_point": {"row": 11, "column": 76}}, {"id": 24, "type": "ERROR", "text": "- (void)networkPathMonitor:(CARNetworkPathMonitor *)arg1 didChangeNetworkReachable:(_Bool)", "parent": null, "children": [25, 38], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 90}}, {"id": 25, "type": "binary_expression", "text": "- (void)networkPathMonitor:(CARNetworkPathMonitor *)arg1 didChangeNetworkReachable", "parent": 24, "children": [26, 32, 34, 35, 37], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 82}}, {"id": 26, "type": "unary_expression", "text": "- (void)networkPathMonitor", "parent": 25, "children": [27, 28], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 26}}, {"id": 27, "type": "-", "text": "-", "parent": 26, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 28, "type": "cast_expression", "text": "(void)networkPathMonitor", "parent": 26, "children": [29, 31], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 26}}, {"id": 29, "type": "type_descriptor", "text": "void", "parent": 28, "children": [30], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 7}}, {"id": 30, "type": "primitive_type", "text": "void", "parent": 29, "children": [], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 7}}, {"id": 31, "type": "identifier", "text": "networkPathMonitor", "parent": 28, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 26}}, {"id": 32, "type": "ERROR", "text": ":(CARNetworkPathMonitor", "parent": 25, "children": [33], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 49}}, {"id": 33, "type": "identifier", "text": "CARNetworkPathMonitor", "parent": 32, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 49}}, {"id": 34, "type": "*", "text": "*", "parent": 25, "children": [], "start_point": {"row": 12, "column": 50}, "end_point": {"row": 12, "column": 51}}, {"id": 35, "type": "ERROR", "text": ")arg1", "parent": 25, "children": [36], "start_point": {"row": 12, "column": 51}, "end_point": {"row": 12, "column": 56}}, {"id": 36, "type": "identifier", "text": "arg1", "parent": 35, "children": [], "start_point": {"row": 12, "column": 52}, "end_point": {"row": 12, "column": 56}}, {"id": 37, "type": "identifier", "text": "didChangeNetworkReachable", "parent": 25, "children": [], "start_point": {"row": 12, "column": 57}, "end_point": {"row": 12, "column": 82}}, {"id": 38, "type": "identifier", "text": "_Bool", "parent": 24, "children": [], "start_point": {"row": 12, "column": 84}, "end_point": {"row": 12, "column": 89}}, {"id": 39, "type": "identifier", "text": "arg2", "parent": null, "children": [], "start_point": {"row": 12, "column": 90}, "end_point": {"row": 12, "column": 94}}, {"id": 40, "type": "ERROR", "text": "@", "parent": null, "children": [41], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 41, "type": "ERROR", "text": "@", "parent": 40, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 1}}]}, "node_categories": {"declarations": {"functions": [], "variables": [5], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [14, 16, 20, 25, 26, 28], "assignments": [], "loops": [], "conditionals": [6, 9, 10, 12, 19, 21, 23, 31, 33, 36, 37, 38, 39], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20).\n//\n// Copyright (C) 1997-2019 <NAME>.\n//\n\n#import \"NSObject-Protocol.h\"\n\n@class CARNetworkPathMonitor;\n\n@protocol CARNetworkPathMonitorObserver <NSObject>\n- (void)networkPathMonitorDidChangeNetworkPath:(CARNetworkPathMonitor *)arg1;\n- (void)networkPathMonitor:(CARNetworkPathMonitor *)arg1 didChangeNetworkReachable:(_Bool)arg2;\n@end\n\n"}
60
c
/* * Copyright (c) 2020 Teknic, 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. */ /** \file EthernetTcpServer.h **/ #ifndef __ETHERNETTCPSERVER_H__ #define __ETHERNETTCPSERVER_H__ #include "EthernetTcp.h" #include "EthernetManager.h" #include "EthernetTcpClient.h" namespace ClearCore { /** \brief ClearCore TCP server class. This class manages an instance of a TCP server and manages interactions with multiple Ethernet TCP client connections. For more detailed information on the ClearCore Ethernet system, check out the \ref EthernetMain informational page. **/ class EthernetTcpServer : public EthernetTcp { public: /** \brief Construct a TCP server. \param[in] port The local port to listen for incoming TCP connections on. **/ explicit EthernetTcpServer(uint16_t port); /** \brief Set up the server to begin listening for incoming TCP connections **/ void Begin(); /** \brief Return a reference to a client that has incoming data. Returns a reference to a client that has incoming data available to read. The server will continue to manage the client. \return Returns a TCP client that has incoming data available to read. \note The server will continue to track the client's reference. **/ EthernetTcpClient Available(); /** \brief Return a client with an active connection. Returns a client with an active connection. The server will only return an active client once, and then the server will no longer manage the client's connection. \return Returns a TCP client with an active connection. \note The server will no longer track the client's reference. **/ EthernetTcpClient Accept(); /** \brief Send data to all clients managed by the server. Send a TCP packet to each client managed by the server with the contents of the provided buffer as the packet's payload. \param[in] buff A pointer to the beginning of the data to send. \param[in] size The maximum number of bytes to send. \return The number of bytes written to each client. \note The contents of the supplied buffer represents the payload in an outgoing TCP packet. **/ uint32_t Send(const uint8_t *buff, uint32_t size) override; /** \brief Send data to all clients managed by the server. Send a TCP packet to each client managed by the server with a character as the payload. \param[in] charToSend A character to send to the clients. \return The number of bytes written to each client. **/ uint32_t Send(uint8_t charToSend) { return EthernetTcp::Send(charToSend); } /** \brief Send data to all clients managed by the server. Send a TCP packet to each client managed by the server with a string of characters as the payload. \param[in] nullTermStr A string to send to the clients. \return The number of bytes written to each client. **/ uint32_t Send(const char *nullTermStr) { return EthernetTcp::Send(nullTermStr); } using EthernetTcp::LocalPort; /** \brief Is the server ready to accept a client? \return Return true if the server is ready to accept clients. **/ bool Ready(); private: bool m_initialized; // The server's listening port. uint16_t m_serverPort; // TCP state for connected clients. TcpData *m_tcpDataClient[CLIENT_MAX]; }; // EthernetTcpServer } // ClearCore namespace #endif // !__ETHERNETTCPSERVER_H__
40.73
112
(translation_unit) "/*\n * Copyright (c) 2020 Teknic, Inc.\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/**\n \file EthernetTcpServer.h\n**/\n\n#ifndef __ETHERNETTCPSERVER_H__\n#define __ETHERNETTCPSERVER_H__\n\n#include "EthernetTcp.h"\n#include "EthernetManager.h"\n#include "EthernetTcpClient.h"\n\nnamespace ClearCore {\n\n/**\n \brief ClearCore TCP server class.\n\n This class manages an instance of a TCP server and manages interactions\n with multiple Ethernet TCP client connections.\n\n For more detailed information on the ClearCore Ethernet system, check out\n the \ref EthernetMain informational page.\n**/\nclass EthernetTcpServer : public EthernetTcp {\n\npublic:\n /**\n \brief Construct a TCP server.\n\n \param[in] port The local port to listen for incoming TCP connections\n on.\n **/\n explicit EthernetTcpServer(uint16_t port);\n\n /**\n \brief Set up the server to begin listening for incoming TCP connections\n **/\n void Begin();\n\n /**\n \brief Return a reference to a client that has incoming data.\n\n Returns a reference to a client that has incoming data available to\n read. The server will continue to manage the client.\n\n \return Returns a TCP client that has incoming data available to read.\n\n \note The server will continue to track the client's reference.\n **/\n EthernetTcpClient Available();\n\n /**\n \brief Return a client with an active connection.\n\n Returns a client with an active connection. The server will only return\n an active client once, and then the server will no longer manage the\n client's connection.\n\n \return Returns a TCP client with an active connection.\n\n \note The server will no longer track the client's reference.\n **/\n EthernetTcpClient Accept();\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with the\n contents of the provided buffer as the packet's payload.\n\n \param[in] buff A pointer to the beginning of the data to send.\n \param[in] size The maximum number of bytes to send.\n\n \return The number of bytes written to each client.\n \note The contents of the supplied buffer represents the payload in an\n outgoing TCP packet.\n **/\n uint32_t Send(const uint8_t *buff, uint32_t size) override;\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n character as the payload.\n\n \param[in] charToSend A character to send to the clients.\n\n \return The number of bytes written to each client.\n **/\n uint32_t Send(uint8_t charToSend) {\n return EthernetTcp::Send(charToSend);\n }\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n string of characters as the payload.\n\n \param[in] nullTermStr A string to send to the clients.\n\n \return The number of bytes written to each client.\n **/\n uint32_t Send(const char *nullTermStr) {\n return EthernetTcp::Send(nullTermStr);\n }\n\n using EthernetTcp::LocalPort;\n\n /**\n \brief Is the server ready to accept a client?\n\n \return Return true if the server is ready to accept clients.\n **/\n bool Ready();\n\nprivate:\n bool m_initialized;\n\n // The server's listening port.\n uint16_t m_serverPort;\n\n // TCP state for connected clients.\n TcpData *m_tcpDataClient[CLIENT_MAX];\n\n}; // EthernetTcpServer\n\n} // ClearCore namespace\n\n#endif // !__ETHERNETTCPSERVER_H__" (comment) "/*\n * Copyright (c) 2020 Teknic, Inc.\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 */" (comment) "/**\n \file EthernetTcpServer.h\n**/" (preproc_ifdef) "#ifndef __ETHERNETTCPSERVER_H__\n#define __ETHERNETTCPSERVER_H__\n\n#include "EthernetTcp.h"\n#include "EthernetManager.h"\n#include "EthernetTcpClient.h"\n\nnamespace ClearCore {\n\n/**\n \brief ClearCore TCP server class.\n\n This class manages an instance of a TCP server and manages interactions\n with multiple Ethernet TCP client connections.\n\n For more detailed information on the ClearCore Ethernet system, check out\n the \ref EthernetMain informational page.\n**/\nclass EthernetTcpServer : public EthernetTcp {\n\npublic:\n /**\n \brief Construct a TCP server.\n\n \param[in] port The local port to listen for incoming TCP connections\n on.\n **/\n explicit EthernetTcpServer(uint16_t port);\n\n /**\n \brief Set up the server to begin listening for incoming TCP connections\n **/\n void Begin();\n\n /**\n \brief Return a reference to a client that has incoming data.\n\n Returns a reference to a client that has incoming data available to\n read. The server will continue to manage the client.\n\n \return Returns a TCP client that has incoming data available to read.\n\n \note The server will continue to track the client's reference.\n **/\n EthernetTcpClient Available();\n\n /**\n \brief Return a client with an active connection.\n\n Returns a client with an active connection. The server will only return\n an active client once, and then the server will no longer manage the\n client's connection.\n\n \return Returns a TCP client with an active connection.\n\n \note The server will no longer track the client's reference.\n **/\n EthernetTcpClient Accept();\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with the\n contents of the provided buffer as the packet's payload.\n\n \param[in] buff A pointer to the beginning of the data to send.\n \param[in] size The maximum number of bytes to send.\n\n \return The number of bytes written to each client.\n \note The contents of the supplied buffer represents the payload in an\n outgoing TCP packet.\n **/\n uint32_t Send(const uint8_t *buff, uint32_t size) override;\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n character as the payload.\n\n \param[in] charToSend A character to send to the clients.\n\n \return The number of bytes written to each client.\n **/\n uint32_t Send(uint8_t charToSend) {\n return EthernetTcp::Send(charToSend);\n }\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n string of characters as the payload.\n\n \param[in] nullTermStr A string to send to the clients.\n\n \return The number of bytes written to each client.\n **/\n uint32_t Send(const char *nullTermStr) {\n return EthernetTcp::Send(nullTermStr);\n }\n\n using EthernetTcp::LocalPort;\n\n /**\n \brief Is the server ready to accept a client?\n\n \return Return true if the server is ready to accept clients.\n **/\n bool Ready();\n\nprivate:\n bool m_initialized;\n\n // The server's listening port.\n uint16_t m_serverPort;\n\n // TCP state for connected clients.\n TcpData *m_tcpDataClient[CLIENT_MAX];\n\n}; // EthernetTcpServer\n\n} // ClearCore namespace\n\n#endif" (#ifndef) "#ifndef" (identifier) "__ETHERNETTCPSERVER_H__" (preproc_def) "#define __ETHERNETTCPSERVER_H__\n" (#define) "#define" (identifier) "__ETHERNETTCPSERVER_H__" (preproc_include) "#include "EthernetTcp.h"\n" (#include) "#include" (string_literal) ""EthernetTcp.h"" (") """ (string_content) "EthernetTcp.h" (") """ (preproc_include) "#include "EthernetManager.h"\n" (#include) "#include" (string_literal) ""EthernetManager.h"" (") """ (string_content) "EthernetManager.h" (") """ (preproc_include) "#include "EthernetTcpClient.h"\n" (#include) "#include" (string_literal) ""EthernetTcpClient.h"" (") """ (string_content) "EthernetTcpClient.h" (") """ (function_definition) "namespace ClearCore {\n\n/**\n \brief ClearCore TCP server class.\n\n This class manages an instance of a TCP server and manages interactions\n with multiple Ethernet TCP client connections.\n\n For more detailed information on the ClearCore Ethernet system, check out\n the \ref EthernetMain informational page.\n**/\nclass EthernetTcpServer : public EthernetTcp {\n\npublic:\n /**\n \brief Construct a TCP server.\n\n \param[in] port The local port to listen for incoming TCP connections\n on.\n **/\n explicit EthernetTcpServer(uint16_t port);\n\n /**\n \brief Set up the server to begin listening for incoming TCP connections\n **/\n void Begin();\n\n /**\n \brief Return a reference to a client that has incoming data.\n\n Returns a reference to a client that has incoming data available to\n read. The server will continue to manage the client.\n\n \return Returns a TCP client that has incoming data available to read.\n\n \note The server will continue to track the client's reference.\n **/\n EthernetTcpClient Available();\n\n /**\n \brief Return a client with an active connection.\n\n Returns a client with an active connection. The server will only return\n an active client once, and then the server will no longer manage the\n client's connection.\n\n \return Returns a TCP client with an active connection.\n\n \note The server will no longer track the client's reference.\n **/\n EthernetTcpClient Accept();\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with the\n contents of the provided buffer as the packet's payload.\n\n \param[in] buff A pointer to the beginning of the data to send.\n \param[in] size The maximum number of bytes to send.\n\n \return The number of bytes written to each client.\n \note The contents of the supplied buffer represents the payload in an\n outgoing TCP packet.\n **/\n uint32_t Send(const uint8_t *buff, uint32_t size) override;\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n character as the payload.\n\n \param[in] charToSend A character to send to the clients.\n\n \return The number of bytes written to each client.\n **/\n uint32_t Send(uint8_t charToSend) {\n return EthernetTcp::Send(charToSend);\n }\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n string of characters as the payload.\n\n \param[in] nullTermStr A string to send to the clients.\n\n \return The number of bytes written to each client.\n **/\n uint32_t Send(const char *nullTermStr) {\n return EthernetTcp::Send(nullTermStr);\n }\n\n using EthernetTcp::LocalPort;\n\n /**\n \brief Is the server ready to accept a client?\n\n \return Return true if the server is ready to accept clients.\n **/\n bool Ready();\n\nprivate:\n bool m_initialized;\n\n // The server's listening port.\n uint16_t m_serverPort;\n\n // TCP state for connected clients.\n TcpData *m_tcpDataClient[CLIENT_MAX];\n\n}; // EthernetTcpServer\n\n}" (type_identifier) "namespace" (identifier) "ClearCore" (compound_statement) "{\n\n/**\n \brief ClearCore TCP server class.\n\n This class manages an instance of a TCP server and manages interactions\n with multiple Ethernet TCP client connections.\n\n For more detailed information on the ClearCore Ethernet system, check out\n the \ref EthernetMain informational page.\n**/\nclass EthernetTcpServer : public EthernetTcp {\n\npublic:\n /**\n \brief Construct a TCP server.\n\n \param[in] port The local port to listen for incoming TCP connections\n on.\n **/\n explicit EthernetTcpServer(uint16_t port);\n\n /**\n \brief Set up the server to begin listening for incoming TCP connections\n **/\n void Begin();\n\n /**\n \brief Return a reference to a client that has incoming data.\n\n Returns a reference to a client that has incoming data available to\n read. The server will continue to manage the client.\n\n \return Returns a TCP client that has incoming data available to read.\n\n \note The server will continue to track the client's reference.\n **/\n EthernetTcpClient Available();\n\n /**\n \brief Return a client with an active connection.\n\n Returns a client with an active connection. The server will only return\n an active client once, and then the server will no longer manage the\n client's connection.\n\n \return Returns a TCP client with an active connection.\n\n \note The server will no longer track the client's reference.\n **/\n EthernetTcpClient Accept();\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with the\n contents of the provided buffer as the packet's payload.\n\n \param[in] buff A pointer to the beginning of the data to send.\n \param[in] size The maximum number of bytes to send.\n\n \return The number of bytes written to each client.\n \note The contents of the supplied buffer represents the payload in an\n outgoing TCP packet.\n **/\n uint32_t Send(const uint8_t *buff, uint32_t size) override;\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n character as the payload.\n\n \param[in] charToSend A character to send to the clients.\n\n \return The number of bytes written to each client.\n **/\n uint32_t Send(uint8_t charToSend) {\n return EthernetTcp::Send(charToSend);\n }\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n string of characters as the payload.\n\n \param[in] nullTermStr A string to send to the clients.\n\n \return The number of bytes written to each client.\n **/\n uint32_t Send(const char *nullTermStr) {\n return EthernetTcp::Send(nullTermStr);\n }\n\n using EthernetTcp::LocalPort;\n\n /**\n \brief Is the server ready to accept a client?\n\n \return Return true if the server is ready to accept clients.\n **/\n bool Ready();\n\nprivate:\n bool m_initialized;\n\n // The server's listening port.\n uint16_t m_serverPort;\n\n // TCP state for connected clients.\n TcpData *m_tcpDataClient[CLIENT_MAX];\n\n}; // EthernetTcpServer\n\n}" ({) "{" (comment) "/**\n \brief ClearCore TCP server class.\n\n This class manages an instance of a TCP server and manages interactions\n with multiple Ethernet TCP client connections.\n\n For more detailed information on the ClearCore Ethernet system, check out\n the \ref EthernetMain informational page.\n**/" (function_definition) "class EthernetTcpServer : public EthernetTcp {\n\npublic:\n /**\n \brief Construct a TCP server.\n\n \param[in] port The local port to listen for incoming TCP connections\n on.\n **/\n explicit EthernetTcpServer(uint16_t port);\n\n /**\n \brief Set up the server to begin listening for incoming TCP connections\n **/\n void Begin();\n\n /**\n \brief Return a reference to a client that has incoming data.\n\n Returns a reference to a client that has incoming data available to\n read. The server will continue to manage the client.\n\n \return Returns a TCP client that has incoming data available to read.\n\n \note The server will continue to track the client's reference.\n **/\n EthernetTcpClient Available();\n\n /**\n \brief Return a client with an active connection.\n\n Returns a client with an active connection. The server will only return\n an active client once, and then the server will no longer manage the\n client's connection.\n\n \return Returns a TCP client with an active connection.\n\n \note The server will no longer track the client's reference.\n **/\n EthernetTcpClient Accept();\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with the\n contents of the provided buffer as the packet's payload.\n\n \param[in] buff A pointer to the beginning of the data to send.\n \param[in] size The maximum number of bytes to send.\n\n \return The number of bytes written to each client.\n \note The contents of the supplied buffer represents the payload in an\n outgoing TCP packet.\n **/\n uint32_t Send(const uint8_t *buff, uint32_t size) override;\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n character as the payload.\n\n \param[in] charToSend A character to send to the clients.\n\n \return The number of bytes written to each client.\n **/\n uint32_t Send(uint8_t charToSend) {\n return EthernetTcp::Send(charToSend);\n }\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n string of characters as the payload.\n\n \param[in] nullTermStr A string to send to the clients.\n\n \return The number of bytes written to each client.\n **/\n uint32_t Send(const char *nullTermStr) {\n return EthernetTcp::Send(nullTermStr);\n }\n\n using EthernetTcp::LocalPort;\n\n /**\n \brief Is the server ready to accept a client?\n\n \return Return true if the server is ready to accept clients.\n **/\n bool Ready();\n\nprivate:\n bool m_initialized;\n\n // The server's listening port.\n uint16_t m_serverPort;\n\n // TCP state for connected clients.\n TcpData *m_tcpDataClient[CLIENT_MAX];\n\n}" (type_identifier) "class" (identifier) "EthernetTcpServer" (ERROR) ": public EthernetTcp" (:) ":" (identifier) "public" (identifier) "EthernetTcp" (compound_statement) "{\n\npublic:\n /**\n \brief Construct a TCP server.\n\n \param[in] port The local port to listen for incoming TCP connections\n on.\n **/\n explicit EthernetTcpServer(uint16_t port);\n\n /**\n \brief Set up the server to begin listening for incoming TCP connections\n **/\n void Begin();\n\n /**\n \brief Return a reference to a client that has incoming data.\n\n Returns a reference to a client that has incoming data available to\n read. The server will continue to manage the client.\n\n \return Returns a TCP client that has incoming data available to read.\n\n \note The server will continue to track the client's reference.\n **/\n EthernetTcpClient Available();\n\n /**\n \brief Return a client with an active connection.\n\n Returns a client with an active connection. The server will only return\n an active client once, and then the server will no longer manage the\n client's connection.\n\n \return Returns a TCP client with an active connection.\n\n \note The server will no longer track the client's reference.\n **/\n EthernetTcpClient Accept();\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with the\n contents of the provided buffer as the packet's payload.\n\n \param[in] buff A pointer to the beginning of the data to send.\n \param[in] size The maximum number of bytes to send.\n\n \return The number of bytes written to each client.\n \note The contents of the supplied buffer represents the payload in an\n outgoing TCP packet.\n **/\n uint32_t Send(const uint8_t *buff, uint32_t size) override;\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n character as the payload.\n\n \param[in] charToSend A character to send to the clients.\n\n \return The number of bytes written to each client.\n **/\n uint32_t Send(uint8_t charToSend) {\n return EthernetTcp::Send(charToSend);\n }\n\n /**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n string of characters as the payload.\n\n \param[in] nullTermStr A string to send to the clients.\n\n \return The number of bytes written to each client.\n **/\n uint32_t Send(const char *nullTermStr) {\n return EthernetTcp::Send(nullTermStr);\n }\n\n using EthernetTcp::LocalPort;\n\n /**\n \brief Is the server ready to accept a client?\n\n \return Return true if the server is ready to accept clients.\n **/\n bool Ready();\n\nprivate:\n bool m_initialized;\n\n // The server's listening port.\n uint16_t m_serverPort;\n\n // TCP state for connected clients.\n TcpData *m_tcpDataClient[CLIENT_MAX];\n\n}" ({) "{" (labeled_statement) "public:\n /**\n \brief Construct a TCP server.\n\n \param[in] port The local port to listen for incoming TCP connections\n on.\n **/\n explicit EthernetTcpServer(uint16_t port);" (statement_identifier) "public" (:) ":" (comment) "/**\n \brief Construct a TCP server.\n\n \param[in] port The local port to listen for incoming TCP connections\n on.\n **/" (declaration) "explicit EthernetTcpServer(uint16_t port);" (type_identifier) "explicit" (function_declarator) "EthernetTcpServer(uint16_t port)" (identifier) "EthernetTcpServer" (parameter_list) "(uint16_t port)" (() "(" (parameter_declaration) "uint16_t port" (primitive_type) "uint16_t" (identifier) "port" ()) ")" (;) ";" (comment) "/**\n \brief Set up the server to begin listening for incoming TCP connections\n **/" (declaration) "void Begin();" (primitive_type) "void" (function_declarator) "Begin()" (identifier) "Begin" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/**\n \brief Return a reference to a client that has incoming data.\n\n Returns a reference to a client that has incoming data available to\n read. The server will continue to manage the client.\n\n \return Returns a TCP client that has incoming data available to read.\n\n \note The server will continue to track the client's reference.\n **/" (declaration) "EthernetTcpClient Available();" (type_identifier) "EthernetTcpClient" (function_declarator) "Available()" (identifier) "Available" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/**\n \brief Return a client with an active connection.\n\n Returns a client with an active connection. The server will only return\n an active client once, and then the server will no longer manage the\n client's connection.\n\n \return Returns a TCP client with an active connection.\n\n \note The server will no longer track the client's reference.\n **/" (declaration) "EthernetTcpClient Accept();" (type_identifier) "EthernetTcpClient" (function_declarator) "Accept()" (identifier) "Accept" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with the\n contents of the provided buffer as the packet's payload.\n\n \param[in] buff A pointer to the beginning of the data to send.\n \param[in] size The maximum number of bytes to send.\n\n \return The number of bytes written to each client.\n \note The contents of the supplied buffer represents the payload in an\n outgoing TCP packet.\n **/" (ERROR) "uint32_t Send(const uint8_t *buff, uint32_t size) override" (primitive_type) "uint32_t" (function_declarator) "Send(const uint8_t *buff, uint32_t size) override" (identifier) "Send" (parameter_list) "(const uint8_t *buff, uint32_t size)" (() "(" (parameter_declaration) "const uint8_t *buff" (type_qualifier) "const" (const) "const" (primitive_type) "uint8_t" (pointer_declarator) "*buff" (*) "*" (identifier) "buff" (,) "," (parameter_declaration) "uint32_t size" (primitive_type) "uint32_t" (identifier) "size" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (comment) "/**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n character as the payload.\n\n \param[in] charToSend A character to send to the clients.\n\n \return The number of bytes written to each client.\n **/" (function_definition) "uint32_t Send(uint8_t charToSend) {\n return EthernetTcp::Send(charToSend);\n }" (primitive_type) "uint32_t" (function_declarator) "Send(uint8_t charToSend)" (identifier) "Send" (parameter_list) "(uint8_t charToSend)" (() "(" (parameter_declaration) "uint8_t charToSend" (primitive_type) "uint8_t" (identifier) "charToSend" ()) ")" (compound_statement) "{\n return EthernetTcp::Send(charToSend);\n }" ({) "{" (return_statement) "return EthernetTcp::Send(charToSend);" (return) "return" (ERROR) "EthernetTcp::" (identifier) "EthernetTcp" (:) ":" (:) ":" (call_expression) "Send(charToSend)" (identifier) "Send" (argument_list) "(charToSend)" (() "(" (identifier) "charToSend" ()) ")" (;) ";" (}) "}" (comment) "/**\n \brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n string of characters as the payload.\n\n \param[in] nullTermStr A string to send to the clients.\n\n \return The number of bytes written to each client.\n **/" (function_definition) "uint32_t Send(const char *nullTermStr) {\n return EthernetTcp::Send(nullTermStr);\n }" (primitive_type) "uint32_t" (function_declarator) "Send(const char *nullTermStr)" (identifier) "Send" (parameter_list) "(const char *nullTermStr)" (() "(" (parameter_declaration) "const char *nullTermStr" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*nullTermStr" (*) "*" (identifier) "nullTermStr" ()) ")" (compound_statement) "{\n return EthernetTcp::Send(nullTermStr);\n }" ({) "{" (return_statement) "return EthernetTcp::Send(nullTermStr);" (return) "return" (ERROR) "EthernetTcp::" (identifier) "EthernetTcp" (:) ":" (:) ":" (call_expression) "Send(nullTermStr)" (identifier) "Send" (argument_list) "(nullTermStr)" (() "(" (identifier) "nullTermStr" ()) ")" (;) ";" (}) "}" (declaration) "using EthernetTcp::LocalPort;" (type_identifier) "using" (identifier) "EthernetTcp" (ERROR) "::LocalPort" (:) ":" (:) ":" (identifier) "LocalPort" (;) ";" (comment) "/**\n \brief Is the server ready to accept a client?\n\n \return Return true if the server is ready to accept clients.\n **/" (declaration) "bool Ready();" (primitive_type) "bool" (function_declarator) "Ready()" (identifier) "Ready" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "private:\n bool m_initialized;" (statement_identifier) "private" (:) ":" (declaration) "bool m_initialized;" (primitive_type) "bool" (identifier) "m_initialized" (;) ";" (comment) "// The server's listening port." (declaration) "uint16_t m_serverPort;" (primitive_type) "uint16_t" (identifier) "m_serverPort" (;) ";" (comment) "// TCP state for connected clients." (declaration) "TcpData *m_tcpDataClient[CLIENT_MAX];" (type_identifier) "TcpData" (pointer_declarator) "*m_tcpDataClient[CLIENT_MAX]" (*) "*" (array_declarator) "m_tcpDataClient[CLIENT_MAX]" (identifier) "m_tcpDataClient" ([) "[" (identifier) "CLIENT_MAX" (]) "]" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "// EthernetTcpServer" (}) "}" (comment) "// ClearCore namespace" (#endif) "#endif" (comment) "// !__ETHERNETTCPSERVER_H__"
212
5
{"language": "c", "success": true, "metadata": {"lines": 112, "avg_line_length": 40.73, "nodes": 117, "errors": 0, "source_hash": "e5d885a6ad60bd56dd1f6fc5050c286afa480ee32a634eef83e8dca76375771c", "categorized_nodes": 79}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __ETHERNETTCPSERVER_H__\n#define __ETHERNETTCPSERVER_H__\n\n#include \"EthernetTcp.h\"\n#include \"EthernetManager.h\"\n#include \"EthernetTcpClient.h\"\n\nnamespace ClearCore {\n\n/**\n \\brief ClearCore TCP server class.\n\n This class manages an instance of a TCP server and manages interactions\n with multiple Ethernet TCP client connections.\n\n For more detailed information on the ClearCore Ethernet system, check out\n the \\ref EthernetMain informational page.\n**/\nclass EthernetTcpServer : public EthernetTcp {\n\npublic:\n /**\n \\brief Construct a TCP server.\n\n \\param[in] port The local port to listen for incoming TCP connections\n on.\n **/\n explicit EthernetTcpServer(uint16_t port);\n\n /**\n \\brief Set up the server to begin listening for incoming TCP connections\n **/\n void Begin();\n\n /**\n \\brief Return a reference to a client that has incoming data.\n\n Returns a reference to a client that has incoming data available to\n read. The server will continue to manage the client.\n\n \\return Returns a TCP client that has incoming data available to read.\n\n \\note The server will continue to track the client's reference.\n **/\n EthernetTcpClient Available();\n\n /**\n \\brief Return a client with an active connection.\n\n Returns a client with an active connection. The server will only return\n an active client once, and then the server will no longer manage the\n client's connection.\n\n \\return Returns a TCP client with an active connection.\n\n \\note The server will no longer track the client's reference.\n **/\n EthernetTcpClient Accept();\n\n /**\n \\brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with the\n contents of the provided buffer as the packet's payload.\n\n \\param[in] buff A pointer to the beginning of the data to send.\n \\param[in] size The maximum number of bytes to send.\n\n \\return The number of bytes written to each client.\n \\note The contents of the supplied buffer represents the payload in an\n outgoing TCP packet.\n **/\n uint32_t Send(const uint8_t *buff, uint32_t size) override;\n\n /**\n \\brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n character as the payload.\n\n \\param[in] charToSend A character to send to the clients.\n\n \\return The number of bytes written to each client.\n **/\n uint32_t Send(uint8_t charToSend) {\n return EthernetTcp::Send(charToSend);\n }\n\n /**\n \\brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n string of characters as the payload.\n\n \\param[in] nullTermStr A string to send to the clients.\n\n \\return The number of bytes written to each client.\n **/\n uint32_t Send(const char *nullTermStr) {\n return EthernetTcp::Send(nullTermStr);\n }\n\n using EthernetTcp::LocalPort;\n\n /**\n \\brief Is the server ready to accept a client?\n\n \\return Return true if the server is ready to accept clients.\n **/\n bool Ready();\n\nprivate:\n bool m_initialized;\n\n // The server's listening port.\n uint16_t m_serverPort;\n\n // TCP state for connected clients.\n TcpData *m_tcpDataClient[CLIENT_MAX];\n\n}; // EthernetTcpServer\n\n} // ClearCore namespace\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 116], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 150, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 7}}, {"id": 2, "type": "identifier", "text": "__ETHERNETTCPSERVER_H__", "parent": 0, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 31}}, {"id": 3, "type": "preproc_def", "text": "#define __ETHERNETTCPSERVER_H__\n", "parent": 0, "children": [4, 5], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 5, "type": "identifier", "text": "__ETHERNETTCPSERVER_H__", "parent": 3, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 31}}, {"id": 6, "type": "preproc_include", "text": "#include \"EthernetTcp.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"EthernetTcp.h\"", "parent": 6, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 24}}, {"id": 9, "type": "preproc_include", "text": "#include \"EthernetManager.h\"\n", "parent": 0, "children": [10, 11], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 8}}, {"id": 11, "type": "string_literal", "text": "\"EthernetManager.h\"", "parent": 9, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 28}}, {"id": 12, "type": "preproc_include", "text": "#include \"EthernetTcpClient.h\"\n", "parent": 0, "children": [13, 14], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 8}}, {"id": 14, "type": "string_literal", "text": "\"EthernetTcpClient.h\"", "parent": 12, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 30}}, {"id": 15, "type": "function_definition", "text": "namespace ClearCore {\n\n/**\n \\brief ClearCore TCP server class.\n\n This class manages an instance of a TCP server and manages interactions\n with multiple Ethernet TCP client connections.\n\n For more detailed information on the ClearCore Ethernet system, check out\n the \\ref EthernetMain informational page.\n**/\nclass EthernetTcpServer : public EthernetTcp {\n\npublic:\n /**\n \\brief Construct a TCP server.\n\n \\param[in] port The local port to listen for incoming TCP connections\n on.\n **/\n explicit EthernetTcpServer(uint16_t port);\n\n /**\n \\brief Set up the server to begin listening for incoming TCP connections\n **/\n void Begin();\n\n /**\n \\brief Return a reference to a client that has incoming data.\n\n Returns a reference to a client that has incoming data available to\n read. The server will continue to manage the client.\n\n \\return Returns a TCP client that has incoming data available to read.\n\n \\note The server will continue to track the client's reference.\n **/\n EthernetTcpClient Available();\n\n /**\n \\brief Return a client with an active connection.\n\n Returns a client with an active connection. The server will only return\n an active client once, and then the server will no longer manage the\n client's connection.\n\n \\return Returns a TCP client with an active connection.\n\n \\note The server will no longer track the client's reference.\n **/\n EthernetTcpClient Accept();\n\n /**\n \\brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with the\n contents of the provided buffer as the packet's payload.\n\n \\param[in] buff A pointer to the beginning of the data to send.\n \\param[in] size The maximum number of bytes to send.\n\n \\return The number of bytes written to each client.\n \\note The contents of the supplied buffer represents the payload in an\n outgoing TCP packet.\n **/\n uint32_t Send(const uint8_t *buff, uint32_t size) override;\n\n /**\n \\brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n character as the payload.\n\n \\param[in] charToSend A character to send to the clients.\n\n \\return The number of bytes written to each client.\n **/\n uint32_t Send(uint8_t charToSend) {\n return EthernetTcp::Send(charToSend);\n }\n\n /**\n \\brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n string of characters as the payload.\n\n \\param[in] nullTermStr A string to send to the clients.\n\n \\return The number of bytes written to each client.\n **/\n uint32_t Send(const char *nullTermStr) {\n return EthernetTcp::Send(nullTermStr);\n }\n\n using EthernetTcp::LocalPort;\n\n /**\n \\brief Is the server ready to accept a client?\n\n \\return Return true if the server is ready to accept clients.\n **/\n bool Ready();\n\nprivate:\n bool m_initialized;\n\n // The server's listening port.\n uint16_t m_serverPort;\n\n // TCP state for connected clients.\n TcpData *m_tcpDataClient[CLIENT_MAX];\n\n}; // EthernetTcpServer\n\n}", "parent": 0, "children": [16, 17], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 148, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 9}}, {"id": 17, "type": "identifier", "text": "ClearCore", "parent": 15, "children": [], "start_point": {"row": 33, "column": 10}, "end_point": {"row": 33, "column": 19}}, {"id": 18, "type": "function_definition", "text": "class EthernetTcpServer : public EthernetTcp {\n\npublic:\n /**\n \\brief Construct a TCP server.\n\n \\param[in] port The local port to listen for incoming TCP connections\n on.\n **/\n explicit EthernetTcpServer(uint16_t port);\n\n /**\n \\brief Set up the server to begin listening for incoming TCP connections\n **/\n void Begin();\n\n /**\n \\brief Return a reference to a client that has incoming data.\n\n Returns a reference to a client that has incoming data available to\n read. The server will continue to manage the client.\n\n \\return Returns a TCP client that has incoming data available to read.\n\n \\note The server will continue to track the client's reference.\n **/\n EthernetTcpClient Available();\n\n /**\n \\brief Return a client with an active connection.\n\n Returns a client with an active connection. The server will only return\n an active client once, and then the server will no longer manage the\n client's connection.\n\n \\return Returns a TCP client with an active connection.\n\n \\note The server will no longer track the client's reference.\n **/\n EthernetTcpClient Accept();\n\n /**\n \\brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with the\n contents of the provided buffer as the packet's payload.\n\n \\param[in] buff A pointer to the beginning of the data to send.\n \\param[in] size The maximum number of bytes to send.\n\n \\return The number of bytes written to each client.\n \\note The contents of the supplied buffer represents the payload in an\n outgoing TCP packet.\n **/\n uint32_t Send(const uint8_t *buff, uint32_t size) override;\n\n /**\n \\brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n character as the payload.\n\n \\param[in] charToSend A character to send to the clients.\n\n \\return The number of bytes written to each client.\n **/\n uint32_t Send(uint8_t charToSend) {\n return EthernetTcp::Send(charToSend);\n }\n\n /**\n \\brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n string of characters as the payload.\n\n \\param[in] nullTermStr A string to send to the clients.\n\n \\return The number of bytes written to each client.\n **/\n uint32_t Send(const char *nullTermStr) {\n return EthernetTcp::Send(nullTermStr);\n }\n\n using EthernetTcp::LocalPort;\n\n /**\n \\brief Is the server ready to accept a client?\n\n \\return Return true if the server is ready to accept clients.\n **/\n bool Ready();\n\nprivate:\n bool m_initialized;\n\n // The server's listening port.\n uint16_t m_serverPort;\n\n // TCP state for connected clients.\n TcpData *m_tcpDataClient[CLIENT_MAX];\n\n}", "parent": 15, "children": [19, 20], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 146, "column": 1}}, {"id": 19, "type": "identifier", "text": "EthernetTcpServer", "parent": 18, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 23}}, {"id": 20, "type": "ERROR", "text": ": public EthernetTcp", "parent": 18, "children": [21], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 44}}, {"id": 21, "type": "identifier", "text": "EthernetTcp", "parent": 20, "children": [], "start_point": {"row": 44, "column": 33}, "end_point": {"row": 44, "column": 44}}, {"id": 22, "type": "labeled_statement", "text": "public:\n /**\n \\brief Construct a TCP server.\n\n \\param[in] port The local port to listen for incoming TCP connections\n on.\n **/\n explicit EthernetTcpServer(uint16_t port);", "parent": 18, "children": [23], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 53, "column": 46}}, {"id": 23, "type": "declaration", "text": "explicit EthernetTcpServer(uint16_t port);", "parent": 22, "children": [24, 25], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 46}}, {"id": 24, "type": "type_identifier", "text": "explicit", "parent": 23, "children": [], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 12}}, {"id": 25, "type": "function_declarator", "text": "EthernetTcpServer(uint16_t port)", "parent": 23, "children": [26, 27], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 45}}, {"id": 26, "type": "identifier", "text": "EthernetTcpServer", "parent": 25, "children": [], "start_point": {"row": 53, "column": 13}, "end_point": {"row": 53, "column": 30}}, {"id": 27, "type": "parameter_list", "text": "(uint16_t port)", "parent": 25, "children": [28], "start_point": {"row": 53, "column": 30}, "end_point": {"row": 53, "column": 45}}, {"id": 28, "type": "parameter_declaration", "text": "uint16_t port", "parent": 27, "children": [29, 30], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 44}}, {"id": 29, "type": "primitive_type", "text": "uint16_t", "parent": 28, "children": [], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 39}}, {"id": 30, "type": "identifier", "text": "port", "parent": 28, "children": [], "start_point": {"row": 53, "column": 40}, "end_point": {"row": 53, "column": 44}}, {"id": 31, "type": "declaration", "text": "void Begin();", "parent": 18, "children": [32, 33], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 17}}, {"id": 32, "type": "primitive_type", "text": "void", "parent": 31, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 8}}, {"id": 33, "type": "function_declarator", "text": "Begin()", "parent": 31, "children": [34, 35], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 16}}, {"id": 34, "type": "identifier", "text": "Begin", "parent": 33, "children": [], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 14}}, {"id": 35, "type": "parameter_list", "text": "()", "parent": 33, "children": [], "start_point": {"row": 58, "column": 14}, "end_point": {"row": 58, "column": 16}}, {"id": 36, "type": "declaration", "text": "EthernetTcpClient Available();", "parent": 18, "children": [37, 38], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 34}}, {"id": 37, "type": "type_identifier", "text": "EthernetTcpClient", "parent": 36, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 21}}, {"id": 38, "type": "function_declarator", "text": "Available()", "parent": 36, "children": [39, 40], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 33}}, {"id": 39, "type": "identifier", "text": "Available", "parent": 38, "children": [], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 31}}, {"id": 40, "type": "parameter_list", "text": "()", "parent": 38, "children": [], "start_point": {"row": 70, "column": 31}, "end_point": {"row": 70, "column": 33}}, {"id": 41, "type": "declaration", "text": "EthernetTcpClient Accept();", "parent": 18, "children": [42, 43], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 31}}, {"id": 42, "type": "type_identifier", "text": "EthernetTcpClient", "parent": 41, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 21}}, {"id": 43, "type": "function_declarator", "text": "Accept()", "parent": 41, "children": [44, 45], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 30}}, {"id": 44, "type": "identifier", "text": "Accept", "parent": 43, "children": [], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 83, "column": 28}}, {"id": 45, "type": "parameter_list", "text": "()", "parent": 43, "children": [], "start_point": {"row": 83, "column": 28}, "end_point": {"row": 83, "column": 30}}, {"id": 46, "type": "ERROR", "text": "uint32_t Send(const uint8_t *buff, uint32_t size) override", "parent": 18, "children": [47, 48], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 62}}, {"id": 47, "type": "primitive_type", "text": "uint32_t", "parent": 46, "children": [], "start_point": {"row": 98, "column": 4}, "end_point": {"row": 98, "column": 12}}, {"id": 48, "type": "function_declarator", "text": "Send(const uint8_t *buff, uint32_t size) override", "parent": 46, "children": [49, 50, 59], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 62}}, {"id": 49, "type": "identifier", "text": "Send", "parent": 48, "children": [], "start_point": {"row": 98, "column": 13}, "end_point": {"row": 98, "column": 17}}, {"id": 50, "type": "parameter_list", "text": "(const uint8_t *buff, uint32_t size)", "parent": 48, "children": [51, 56], "start_point": {"row": 98, "column": 17}, "end_point": {"row": 98, "column": 53}}, {"id": 51, "type": "parameter_declaration", "text": "const uint8_t *buff", "parent": 50, "children": [52, 53], "start_point": {"row": 98, "column": 18}, "end_point": {"row": 98, "column": 37}}, {"id": 52, "type": "primitive_type", "text": "uint8_t", "parent": 51, "children": [], "start_point": {"row": 98, "column": 24}, "end_point": {"row": 98, "column": 31}}, {"id": 53, "type": "pointer_declarator", "text": "*buff", "parent": 51, "children": [54, 55], "start_point": {"row": 98, "column": 32}, "end_point": {"row": 98, "column": 37}}, {"id": 54, "type": "*", "text": "*", "parent": 53, "children": [], "start_point": {"row": 98, "column": 32}, "end_point": {"row": 98, "column": 33}}, {"id": 55, "type": "identifier", "text": "buff", "parent": 53, "children": [], "start_point": {"row": 98, "column": 33}, "end_point": {"row": 98, "column": 37}}, {"id": 56, "type": "parameter_declaration", "text": "uint32_t size", "parent": 50, "children": [57, 58], "start_point": {"row": 98, "column": 39}, "end_point": {"row": 98, "column": 52}}, {"id": 57, "type": "primitive_type", "text": "uint32_t", "parent": 56, "children": [], "start_point": {"row": 98, "column": 39}, "end_point": {"row": 98, "column": 47}}, {"id": 58, "type": "identifier", "text": "size", "parent": 56, "children": [], "start_point": {"row": 98, "column": 48}, "end_point": {"row": 98, "column": 52}}, {"id": 59, "type": "identifier", "text": "override", "parent": 48, "children": [], "start_point": {"row": 98, "column": 54}, "end_point": {"row": 98, "column": 62}}, {"id": 60, "type": "function_definition", "text": "uint32_t Send(uint8_t charToSend) {\n return EthernetTcp::Send(charToSend);\n }", "parent": 18, "children": [61, 62], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 112, "column": 5}}, {"id": 61, "type": "primitive_type", "text": "uint32_t", "parent": 60, "children": [], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 12}}, {"id": 62, "type": "function_declarator", "text": "Send(uint8_t charToSend)", "parent": 60, "children": [63, 64], "start_point": {"row": 110, "column": 13}, "end_point": {"row": 110, "column": 37}}, {"id": 63, "type": "identifier", "text": "Send", "parent": 62, "children": [], "start_point": {"row": 110, "column": 13}, "end_point": {"row": 110, "column": 17}}, {"id": 64, "type": "parameter_list", "text": "(uint8_t charToSend)", "parent": 62, "children": [65], "start_point": {"row": 110, "column": 17}, "end_point": {"row": 110, "column": 37}}, {"id": 65, "type": "parameter_declaration", "text": "uint8_t charToSend", "parent": 64, "children": [66, 67], "start_point": {"row": 110, "column": 18}, "end_point": {"row": 110, "column": 36}}, {"id": 66, "type": "primitive_type", "text": "uint8_t", "parent": 65, "children": [], "start_point": {"row": 110, "column": 18}, "end_point": {"row": 110, "column": 25}}, {"id": 67, "type": "identifier", "text": "charToSend", "parent": 65, "children": [], "start_point": {"row": 110, "column": 26}, "end_point": {"row": 110, "column": 36}}, {"id": 68, "type": "return_statement", "text": "return EthernetTcp::Send(charToSend);", "parent": 60, "children": [69, 71], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 45}}, {"id": 69, "type": "ERROR", "text": "EthernetTcp::", "parent": 68, "children": [70], "start_point": {"row": 111, "column": 15}, "end_point": {"row": 111, "column": 28}}, {"id": 70, "type": "identifier", "text": "EthernetTcp", "parent": 69, "children": [], "start_point": {"row": 111, "column": 15}, "end_point": {"row": 111, "column": 26}}, {"id": 71, "type": "call_expression", "text": "Send(charToSend)", "parent": 68, "children": [72, 73], "start_point": {"row": 111, "column": 28}, "end_point": {"row": 111, "column": 44}}, {"id": 72, "type": "identifier", "text": "Send", "parent": 71, "children": [], "start_point": {"row": 111, "column": 28}, "end_point": {"row": 111, "column": 32}}, {"id": 73, "type": "argument_list", "text": "(charToSend)", "parent": 71, "children": [74], "start_point": {"row": 111, "column": 32}, "end_point": {"row": 111, "column": 44}}, {"id": 74, "type": "identifier", "text": "charToSend", "parent": 73, "children": [], "start_point": {"row": 111, "column": 33}, "end_point": {"row": 111, "column": 43}}, {"id": 75, "type": "function_definition", "text": "uint32_t Send(const char *nullTermStr) {\n return EthernetTcp::Send(nullTermStr);\n }", "parent": 18, "children": [76, 77], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 126, "column": 5}}, {"id": 76, "type": "primitive_type", "text": "uint32_t", "parent": 75, "children": [], "start_point": {"row": 124, "column": 4}, "end_point": {"row": 124, "column": 12}}, {"id": 77, "type": "function_declarator", "text": "Send(const char *nullTermStr)", "parent": 75, "children": [78, 79], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 42}}, {"id": 78, "type": "identifier", "text": "Send", "parent": 77, "children": [], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 17}}, {"id": 79, "type": "parameter_list", "text": "(const char *nullTermStr)", "parent": 77, "children": [80], "start_point": {"row": 124, "column": 17}, "end_point": {"row": 124, "column": 42}}, {"id": 80, "type": "parameter_declaration", "text": "const char *nullTermStr", "parent": 79, "children": [81, 82], "start_point": {"row": 124, "column": 18}, "end_point": {"row": 124, "column": 41}}, {"id": 81, "type": "primitive_type", "text": "char", "parent": 80, "children": [], "start_point": {"row": 124, "column": 24}, "end_point": {"row": 124, "column": 28}}, {"id": 82, "type": "pointer_declarator", "text": "*nullTermStr", "parent": 80, "children": [83, 84], "start_point": {"row": 124, "column": 29}, "end_point": {"row": 124, "column": 41}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 124, "column": 29}, "end_point": {"row": 124, "column": 30}}, {"id": 84, "type": "identifier", "text": "nullTermStr", "parent": 82, "children": [], "start_point": {"row": 124, "column": 30}, "end_point": {"row": 124, "column": 41}}, {"id": 85, "type": "return_statement", "text": "return EthernetTcp::Send(nullTermStr);", "parent": 75, "children": [86, 88], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 46}}, {"id": 86, "type": "ERROR", "text": "EthernetTcp::", "parent": 85, "children": [87], "start_point": {"row": 125, "column": 15}, "end_point": {"row": 125, "column": 28}}, {"id": 87, "type": "identifier", "text": "EthernetTcp", "parent": 86, "children": [], "start_point": {"row": 125, "column": 15}, "end_point": {"row": 125, "column": 26}}, {"id": 88, "type": "call_expression", "text": "Send(nullTermStr)", "parent": 85, "children": [89, 90], "start_point": {"row": 125, "column": 28}, "end_point": {"row": 125, "column": 45}}, {"id": 89, "type": "identifier", "text": "Send", "parent": 88, "children": [], "start_point": {"row": 125, "column": 28}, "end_point": {"row": 125, "column": 32}}, {"id": 90, "type": "argument_list", "text": "(nullTermStr)", "parent": 88, "children": [91], "start_point": {"row": 125, "column": 32}, "end_point": {"row": 125, "column": 45}}, {"id": 91, "type": "identifier", "text": "nullTermStr", "parent": 90, "children": [], "start_point": {"row": 125, "column": 33}, "end_point": {"row": 125, "column": 44}}, {"id": 92, "type": "declaration", "text": "using EthernetTcp::LocalPort;", "parent": 18, "children": [93, 94, 95], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 33}}, {"id": 93, "type": "type_identifier", "text": "using", "parent": 92, "children": [], "start_point": {"row": 128, "column": 4}, "end_point": {"row": 128, "column": 9}}, {"id": 94, "type": "identifier", "text": "EthernetTcp", "parent": 92, "children": [], "start_point": {"row": 128, "column": 10}, "end_point": {"row": 128, "column": 21}}, {"id": 95, "type": "ERROR", "text": "::LocalPort", "parent": 92, "children": [96], "start_point": {"row": 128, "column": 21}, "end_point": {"row": 128, "column": 32}}, {"id": 96, "type": "identifier", "text": "LocalPort", "parent": 95, "children": [], "start_point": {"row": 128, "column": 23}, "end_point": {"row": 128, "column": 32}}, {"id": 97, "type": "declaration", "text": "bool Ready();", "parent": 18, "children": [98, 99], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 17}}, {"id": 98, "type": "primitive_type", "text": "bool", "parent": 97, "children": [], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 8}}, {"id": 99, "type": "function_declarator", "text": "Ready()", "parent": 97, "children": [100, 101], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 16}}, {"id": 100, "type": "identifier", "text": "Ready", "parent": 99, "children": [], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 14}}, {"id": 101, "type": "parameter_list", "text": "()", "parent": 99, "children": [], "start_point": {"row": 135, "column": 14}, "end_point": {"row": 135, "column": 16}}, {"id": 102, "type": "labeled_statement", "text": "private:\n bool m_initialized;", "parent": 18, "children": [103], "start_point": {"row": 137, "column": 0}, "end_point": {"row": 138, "column": 23}}, {"id": 103, "type": "declaration", "text": "bool m_initialized;", "parent": 102, "children": [104, 105], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 23}}, {"id": 104, "type": "primitive_type", "text": "bool", "parent": 103, "children": [], "start_point": {"row": 138, "column": 4}, "end_point": {"row": 138, "column": 8}}, {"id": 105, "type": "identifier", "text": "m_initialized", "parent": 103, "children": [], "start_point": {"row": 138, "column": 9}, "end_point": {"row": 138, "column": 22}}, {"id": 106, "type": "declaration", "text": "uint16_t m_serverPort;", "parent": 18, "children": [107, 108], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 26}}, {"id": 107, "type": "primitive_type", "text": "uint16_t", "parent": 106, "children": [], "start_point": {"row": 141, "column": 4}, "end_point": {"row": 141, "column": 12}}, {"id": 108, "type": "identifier", "text": "m_serverPort", "parent": 106, "children": [], "start_point": {"row": 141, "column": 13}, "end_point": {"row": 141, "column": 25}}, {"id": 109, "type": "declaration", "text": "TcpData *m_tcpDataClient[CLIENT_MAX];", "parent": 18, "children": [110, 111], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 41}}, {"id": 110, "type": "type_identifier", "text": "TcpData", "parent": 109, "children": [], "start_point": {"row": 144, "column": 4}, "end_point": {"row": 144, "column": 11}}, {"id": 111, "type": "pointer_declarator", "text": "*m_tcpDataClient[CLIENT_MAX]", "parent": 109, "children": [112, 113], "start_point": {"row": 144, "column": 12}, "end_point": {"row": 144, "column": 40}}, {"id": 112, "type": "*", "text": "*", "parent": 111, "children": [], "start_point": {"row": 144, "column": 12}, "end_point": {"row": 144, "column": 13}}, {"id": 113, "type": "array_declarator", "text": "m_tcpDataClient[CLIENT_MAX]", "parent": 111, "children": [114, 115], "start_point": {"row": 144, "column": 13}, "end_point": {"row": 144, "column": 40}}, {"id": 114, "type": "identifier", "text": "m_tcpDataClient", "parent": 113, "children": [], "start_point": {"row": 144, "column": 13}, "end_point": {"row": 144, "column": 28}}, {"id": 115, "type": "identifier", "text": "CLIENT_MAX", "parent": 113, "children": [], "start_point": {"row": 144, "column": 29}, "end_point": {"row": 144, "column": 39}}, {"id": 116, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 150, "column": 0}, "end_point": {"row": 150, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 18, 25, 33, 38, 43, 48, 60, 62, 75, 77, 99], "variables": [23, 28, 31, 36, 41, 51, 56, 65, 80, 92, 97, 103, 106, 109], "classes": [], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [71, 88], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 16, 17, 19, 21, 24, 26, 30, 34, 37, 39, 42, 44, 49, 55, 58, 59, 63, 67, 70, 72, 74, 78, 84, 87, 89, 91, 93, 94, 96, 100, 105, 108, 110, 114, 115, 116], "returns": [68, 85], "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": "manages", "text_snippet": "namespace ClearCore {\n\n/**\n \\brief ClearCore TCP server class.\n\n This class manages an instanc"}, {"node_id": 18, "universal_type": "function", "name": "EthernetTcpServer", "text_snippet": "class EthernetTcpServer : public EthernetTcp {\n\npublic:\n /**\n \\brief Construct a TCP serve"}, {"node_id": 25, "universal_type": "function", "name": "unknown", "text_snippet": "EthernetTcpServer(uint16_t port)"}, {"node_id": 33, "universal_type": "function", "name": "unknown", "text_snippet": "Begin()"}, {"node_id": 38, "universal_type": "function", "name": "unknown", "text_snippet": "Available()"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "Accept()"}, {"node_id": 48, "universal_type": "function", "name": "unknown", "text_snippet": "Send(const uint8_t *buff, uint32_t size) override"}, {"node_id": 60, "universal_type": "function", "name": "unknown", "text_snippet": "uint32_t Send(uint8_t charToSend) {\n return EthernetTcp::Send(charToSend);\n }"}, {"node_id": 62, "universal_type": "function", "name": "unknown", "text_snippet": "Send(uint8_t charToSend)"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "uint32_t Send(const char *nullTermStr) {\n return EthernetTcp::Send(nullTermStr);\n }"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "Send(const char *nullTermStr)"}, {"node_id": 99, "universal_type": "function", "name": "unknown", "text_snippet": "Ready()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"EthernetTcp.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"EthernetManager.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"EthernetTcpClient.h\"\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "/*\n * Copyright (c) 2020 Teknic, Inc.\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/**\n \\file EthernetTcpServer.h\n**/\n\n#ifndef __ETHERNETTCPSERVER_H__\n#define __ETHERNETTCPSERVER_H__\n\n#include \"EthernetTcp.h\"\n#include \"EthernetManager.h\"\n#include \"EthernetTcpClient.h\"\n\nnamespace ClearCore {\n\n/**\n \\brief ClearCore TCP server class.\n\n This class manages an instance of a TCP server and manages interactions\n with multiple Ethernet TCP client connections.\n\n For more detailed information on the ClearCore Ethernet system, check out\n the \\ref EthernetMain informational page.\n**/\nclass EthernetTcpServer : public EthernetTcp {\n\npublic:\n /**\n \\brief Construct a TCP server.\n\n \\param[in] port The local port to listen for incoming TCP connections\n on.\n **/\n explicit EthernetTcpServer(uint16_t port);\n\n /**\n \\brief Set up the server to begin listening for incoming TCP connections\n **/\n void Begin();\n\n /**\n \\brief Return a reference to a client that has incoming data.\n\n Returns a reference to a client that has incoming data available to\n read. The server will continue to manage the client.\n\n \\return Returns a TCP client that has incoming data available to read.\n\n \\note The server will continue to track the client's reference.\n **/\n EthernetTcpClient Available();\n\n /**\n \\brief Return a client with an active connection.\n\n Returns a client with an active connection. The server will only return\n an active client once, and then the server will no longer manage the\n client's connection.\n\n \\return Returns a TCP client with an active connection.\n\n \\note The server will no longer track the client's reference.\n **/\n EthernetTcpClient Accept();\n\n /**\n \\brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with the\n contents of the provided buffer as the packet's payload.\n\n \\param[in] buff A pointer to the beginning of the data to send.\n \\param[in] size The maximum number of bytes to send.\n\n \\return The number of bytes written to each client.\n \\note The contents of the supplied buffer represents the payload in an\n outgoing TCP packet.\n **/\n uint32_t Send(const uint8_t *buff, uint32_t size) override;\n\n /**\n \\brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n character as the payload.\n\n \\param[in] charToSend A character to send to the clients.\n\n \\return The number of bytes written to each client.\n **/\n uint32_t Send(uint8_t charToSend) {\n return EthernetTcp::Send(charToSend);\n }\n\n /**\n \\brief Send data to all clients managed by the server.\n\n Send a TCP packet to each client managed by the server with a\n string of characters as the payload.\n\n \\param[in] nullTermStr A string to send to the clients.\n\n \\return The number of bytes written to each client.\n **/\n uint32_t Send(const char *nullTermStr) {\n return EthernetTcp::Send(nullTermStr);\n }\n\n using EthernetTcp::LocalPort;\n\n /**\n \\brief Is the server ready to accept a client?\n\n \\return Return true if the server is ready to accept clients.\n **/\n bool Ready();\n\nprivate:\n bool m_initialized;\n\n // The server's listening port.\n uint16_t m_serverPort;\n\n // TCP state for connected clients.\n TcpData *m_tcpDataClient[CLIENT_MAX];\n\n}; // EthernetTcpServer\n\n} // ClearCore namespace\n\n#endif // !__ETHERNETTCPSERVER_H__"}
61
c
/* -*- mode: C -*- */ /* IGraph library. Copyright (C) 2012 <NAME> <<EMAIL>> 334 Harvard st, Cambridge MA, 02139 USA 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. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include <igraph.h> int main() { const igraph_real_t edges[] = { 0,1, 0,2, 1,6, 2,6, 1,3, 1,4, 1,5, 3,2, 4,2, 5,2 }; igraph_t g; igraph_vector_t edgev; igraph_vector_ptr_t resvertices, resedges; igraph_vector_long_t predecessors, inbound_edges; int vcount, i; igraph_vector_view(&edgev, edges, sizeof(edges)/sizeof(igraph_real_t)); vcount=igraph_vector_max(&edgev)+1; igraph_create(&g, &edgev, vcount, IGRAPH_DIRECTED); igraph_vector_ptr_init(&resvertices, vcount); igraph_vector_ptr_init(&resedges, vcount); igraph_vector_long_init(&predecessors, 0); igraph_vector_long_init(&inbound_edges, 0); for (i=0; i<vcount; i++) { igraph_vector_t *v1=malloc(sizeof(igraph_vector_t)); igraph_vector_t *v2=malloc(sizeof(igraph_vector_t)); if (!v1 || !v2) { exit(2); } igraph_vector_init(v1, 0); igraph_vector_init(v2, 0); VECTOR(resvertices)[i] = v1; VECTOR(resedges)[i] = v2; } igraph_get_shortest_paths(&g, &resvertices, &resedges, /*from=*/ 0, /*to=*/ igraph_vss_all(), /*mode=*/ IGRAPH_OUT, &predecessors, &inbound_edges); for (i=0; i<vcount; i++) { igraph_vector_t *v1=VECTOR(resvertices)[i]; igraph_vector_t *v2=VECTOR(resedges)[i]; printf("%i V: ", i); igraph_vector_print(v1); printf("%i E: ", i); igraph_vector_print(v2); } printf("pred: "); igraph_vector_long_print(&predecessors); printf("inbe: "); igraph_vector_long_print(&inbound_edges); igraph_vector_long_destroy(&inbound_edges); igraph_vector_long_destroy(&predecessors); for (i=0; i<vcount; i++) { igraph_vector_t *v1=VECTOR(resvertices)[i]; igraph_vector_t *v2=VECTOR(resedges)[i]; igraph_vector_destroy(v1); igraph_vector_destroy(v2); igraph_free(v1); igraph_free(v2); } igraph_vector_ptr_destroy(&resedges); igraph_vector_ptr_destroy(&resvertices); igraph_destroy(&g); return 0; }
34.92
77
(translation_unit) "/* -*- mode: C -*- */\n/* \n IGraph library.\n Copyright (C) 2012 <NAME> <<EMAIL>>\n 334 Harvard st, Cambridge MA, 02139 USA\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 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,\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, write to the Free Software\n Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA \n 02110-1301 USA\n\n*/\n\n#include <igraph.h>\n\nint main() {\n const igraph_real_t edges[] = { 0,1, 0,2, 1,6, 2,6, 1,3, 1,4, 1,5,\n 3,2, 4,2, 5,2 };\n igraph_t g;\n igraph_vector_t edgev;\n igraph_vector_ptr_t resvertices, resedges;\n igraph_vector_long_t predecessors, inbound_edges;\n int vcount, i;\n \n igraph_vector_view(&edgev, edges, sizeof(edges)/sizeof(igraph_real_t));\n vcount=igraph_vector_max(&edgev)+1;\n igraph_create(&g, &edgev, vcount, IGRAPH_DIRECTED);\n \n igraph_vector_ptr_init(&resvertices, vcount);\n igraph_vector_ptr_init(&resedges, vcount);\n igraph_vector_long_init(&predecessors, 0);\n igraph_vector_long_init(&inbound_edges, 0);\n \n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=malloc(sizeof(igraph_vector_t));\n igraph_vector_t *v2=malloc(sizeof(igraph_vector_t));\n if (!v1 || !v2) { \n exit(2);\n }\n igraph_vector_init(v1, 0);\n igraph_vector_init(v2, 0);\n VECTOR(resvertices)[i] = v1;\n VECTOR(resedges)[i] = v2;\n }\n\n igraph_get_shortest_paths(&g, &resvertices, &resedges, /*from=*/ 0, \n /*to=*/ igraph_vss_all(), /*mode=*/ IGRAPH_OUT,\n &predecessors, &inbound_edges);\n\n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n printf("%i V: ", i); igraph_vector_print(v1);\n printf("%i E: ", i); igraph_vector_print(v2);\n }\n printf("pred: "); igraph_vector_long_print(&predecessors);\n printf("inbe: "); igraph_vector_long_print(&inbound_edges);\n\n igraph_vector_long_destroy(&inbound_edges);\n igraph_vector_long_destroy(&predecessors);\n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n igraph_vector_destroy(v1);\n igraph_vector_destroy(v2);\n igraph_free(v1);\n igraph_free(v2);\n }\n igraph_vector_ptr_destroy(&resedges);\n igraph_vector_ptr_destroy(&resvertices);\n igraph_destroy(&g);\n\n return 0;\n}\n" (comment) "/* -*- mode: C -*- */" (comment) "/* \n IGraph library.\n Copyright (C) 2012 <NAME> <<EMAIL>>\n 334 Harvard st, Cambridge MA, 02139 USA\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 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,\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, write to the Free Software\n Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA \n 02110-1301 USA\n\n*/" (preproc_include) "#include <igraph.h>\n" (#include) "#include" (system_lib_string) "<igraph.h>" (function_definition) "int main() {\n const igraph_real_t edges[] = { 0,1, 0,2, 1,6, 2,6, 1,3, 1,4, 1,5,\n 3,2, 4,2, 5,2 };\n igraph_t g;\n igraph_vector_t edgev;\n igraph_vector_ptr_t resvertices, resedges;\n igraph_vector_long_t predecessors, inbound_edges;\n int vcount, i;\n \n igraph_vector_view(&edgev, edges, sizeof(edges)/sizeof(igraph_real_t));\n vcount=igraph_vector_max(&edgev)+1;\n igraph_create(&g, &edgev, vcount, IGRAPH_DIRECTED);\n \n igraph_vector_ptr_init(&resvertices, vcount);\n igraph_vector_ptr_init(&resedges, vcount);\n igraph_vector_long_init(&predecessors, 0);\n igraph_vector_long_init(&inbound_edges, 0);\n \n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=malloc(sizeof(igraph_vector_t));\n igraph_vector_t *v2=malloc(sizeof(igraph_vector_t));\n if (!v1 || !v2) { \n exit(2);\n }\n igraph_vector_init(v1, 0);\n igraph_vector_init(v2, 0);\n VECTOR(resvertices)[i] = v1;\n VECTOR(resedges)[i] = v2;\n }\n\n igraph_get_shortest_paths(&g, &resvertices, &resedges, /*from=*/ 0, \n /*to=*/ igraph_vss_all(), /*mode=*/ IGRAPH_OUT,\n &predecessors, &inbound_edges);\n\n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n printf("%i V: ", i); igraph_vector_print(v1);\n printf("%i E: ", i); igraph_vector_print(v2);\n }\n printf("pred: "); igraph_vector_long_print(&predecessors);\n printf("inbe: "); igraph_vector_long_print(&inbound_edges);\n\n igraph_vector_long_destroy(&inbound_edges);\n igraph_vector_long_destroy(&predecessors);\n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n igraph_vector_destroy(v1);\n igraph_vector_destroy(v2);\n igraph_free(v1);\n igraph_free(v2);\n }\n igraph_vector_ptr_destroy(&resedges);\n igraph_vector_ptr_destroy(&resvertices);\n igraph_destroy(&g);\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n const igraph_real_t edges[] = { 0,1, 0,2, 1,6, 2,6, 1,3, 1,4, 1,5,\n 3,2, 4,2, 5,2 };\n igraph_t g;\n igraph_vector_t edgev;\n igraph_vector_ptr_t resvertices, resedges;\n igraph_vector_long_t predecessors, inbound_edges;\n int vcount, i;\n \n igraph_vector_view(&edgev, edges, sizeof(edges)/sizeof(igraph_real_t));\n vcount=igraph_vector_max(&edgev)+1;\n igraph_create(&g, &edgev, vcount, IGRAPH_DIRECTED);\n \n igraph_vector_ptr_init(&resvertices, vcount);\n igraph_vector_ptr_init(&resedges, vcount);\n igraph_vector_long_init(&predecessors, 0);\n igraph_vector_long_init(&inbound_edges, 0);\n \n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=malloc(sizeof(igraph_vector_t));\n igraph_vector_t *v2=malloc(sizeof(igraph_vector_t));\n if (!v1 || !v2) { \n exit(2);\n }\n igraph_vector_init(v1, 0);\n igraph_vector_init(v2, 0);\n VECTOR(resvertices)[i] = v1;\n VECTOR(resedges)[i] = v2;\n }\n\n igraph_get_shortest_paths(&g, &resvertices, &resedges, /*from=*/ 0, \n /*to=*/ igraph_vss_all(), /*mode=*/ IGRAPH_OUT,\n &predecessors, &inbound_edges);\n\n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n printf("%i V: ", i); igraph_vector_print(v1);\n printf("%i E: ", i); igraph_vector_print(v2);\n }\n printf("pred: "); igraph_vector_long_print(&predecessors);\n printf("inbe: "); igraph_vector_long_print(&inbound_edges);\n\n igraph_vector_long_destroy(&inbound_edges);\n igraph_vector_long_destroy(&predecessors);\n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n igraph_vector_destroy(v1);\n igraph_vector_destroy(v2);\n igraph_free(v1);\n igraph_free(v2);\n }\n igraph_vector_ptr_destroy(&resedges);\n igraph_vector_ptr_destroy(&resvertices);\n igraph_destroy(&g);\n\n return 0;\n}" ({) "{" (declaration) "const igraph_real_t edges[] = { 0,1, 0,2, 1,6, 2,6, 1,3, 1,4, 1,5,\n 3,2, 4,2, 5,2 };" (type_qualifier) "const" (const) "const" (type_identifier) "igraph_real_t" (init_declarator) "edges[] = { 0,1, 0,2, 1,6, 2,6, 1,3, 1,4, 1,5,\n 3,2, 4,2, 5,2 }" (array_declarator) "edges[]" (identifier) "edges" ([) "[" (]) "]" (=) "=" (initializer_list) "{ 0,1, 0,2, 1,6, 2,6, 1,3, 1,4, 1,5,\n 3,2, 4,2, 5,2 }" ({) "{" (number_literal) "0" (,) "," (number_literal) "1" (,) "," (number_literal) "0" (,) "," (number_literal) "2" (,) "," (number_literal) "1" (,) "," (number_literal) "6" (,) "," (number_literal) "2" (,) "," (number_literal) "6" (,) "," (number_literal) "1" (,) "," (number_literal) "3" (,) "," (number_literal) "1" (,) "," (number_literal) "4" (,) "," (number_literal) "1" (,) "," (number_literal) "5" (,) "," (number_literal) "3" (,) "," (number_literal) "2" (,) "," (number_literal) "4" (,) "," (number_literal) "2" (,) "," (number_literal) "5" (,) "," (number_literal) "2" (}) "}" (;) ";" (declaration) "igraph_t g;" (type_identifier) "igraph_t" (identifier) "g" (;) ";" (declaration) "igraph_vector_t edgev;" (type_identifier) "igraph_vector_t" (identifier) "edgev" (;) ";" (declaration) "igraph_vector_ptr_t resvertices, resedges;" (type_identifier) "igraph_vector_ptr_t" (identifier) "resvertices" (,) "," (identifier) "resedges" (;) ";" (declaration) "igraph_vector_long_t predecessors, inbound_edges;" (type_identifier) "igraph_vector_long_t" (identifier) "predecessors" (,) "," (identifier) "inbound_edges" (;) ";" (declaration) "int vcount, i;" (primitive_type) "int" (identifier) "vcount" (,) "," (identifier) "i" (;) ";" (expression_statement) "igraph_vector_view(&edgev, edges, sizeof(edges)/sizeof(igraph_real_t));" (call_expression) "igraph_vector_view(&edgev, edges, sizeof(edges)/sizeof(igraph_real_t))" (identifier) "igraph_vector_view" (argument_list) "(&edgev, edges, sizeof(edges)/sizeof(igraph_real_t))" (() "(" (pointer_expression) "&edgev" (&) "&" (identifier) "edgev" (,) "," (identifier) "edges" (,) "," (binary_expression) "sizeof(edges)/sizeof(igraph_real_t)" (sizeof_expression) "sizeof(edges)" (sizeof) "sizeof" (parenthesized_expression) "(edges)" (() "(" (identifier) "edges" ()) ")" (/) "/" (sizeof_expression) "sizeof(igraph_real_t)" (sizeof) "sizeof" (parenthesized_expression) "(igraph_real_t)" (() "(" (identifier) "igraph_real_t" ()) ")" ()) ")" (;) ";" (expression_statement) "vcount=igraph_vector_max(&edgev)+1;" (assignment_expression) "vcount=igraph_vector_max(&edgev)+1" (identifier) "vcount" (=) "=" (binary_expression) "igraph_vector_max(&edgev)+1" (call_expression) "igraph_vector_max(&edgev)" (identifier) "igraph_vector_max" (argument_list) "(&edgev)" (() "(" (pointer_expression) "&edgev" (&) "&" (identifier) "edgev" ()) ")" (+) "+" (number_literal) "1" (;) ";" (expression_statement) "igraph_create(&g, &edgev, vcount, IGRAPH_DIRECTED);" (call_expression) "igraph_create(&g, &edgev, vcount, IGRAPH_DIRECTED)" (identifier) "igraph_create" (argument_list) "(&g, &edgev, vcount, IGRAPH_DIRECTED)" (() "(" (pointer_expression) "&g" (&) "&" (identifier) "g" (,) "," (pointer_expression) "&edgev" (&) "&" (identifier) "edgev" (,) "," (identifier) "vcount" (,) "," (identifier) "IGRAPH_DIRECTED" ()) ")" (;) ";" (expression_statement) "igraph_vector_ptr_init(&resvertices, vcount);" (call_expression) "igraph_vector_ptr_init(&resvertices, vcount)" (identifier) "igraph_vector_ptr_init" (argument_list) "(&resvertices, vcount)" (() "(" (pointer_expression) "&resvertices" (&) "&" (identifier) "resvertices" (,) "," (identifier) "vcount" ()) ")" (;) ";" (expression_statement) "igraph_vector_ptr_init(&resedges, vcount);" (call_expression) "igraph_vector_ptr_init(&resedges, vcount)" (identifier) "igraph_vector_ptr_init" (argument_list) "(&resedges, vcount)" (() "(" (pointer_expression) "&resedges" (&) "&" (identifier) "resedges" (,) "," (identifier) "vcount" ()) ")" (;) ";" (expression_statement) "igraph_vector_long_init(&predecessors, 0);" (call_expression) "igraph_vector_long_init(&predecessors, 0)" (identifier) "igraph_vector_long_init" (argument_list) "(&predecessors, 0)" (() "(" (pointer_expression) "&predecessors" (&) "&" (identifier) "predecessors" (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "igraph_vector_long_init(&inbound_edges, 0);" (call_expression) "igraph_vector_long_init(&inbound_edges, 0)" (identifier) "igraph_vector_long_init" (argument_list) "(&inbound_edges, 0)" (() "(" (pointer_expression) "&inbound_edges" (&) "&" (identifier) "inbound_edges" (,) "," (number_literal) "0" ()) ")" (;) ";" (for_statement) "for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=malloc(sizeof(igraph_vector_t));\n igraph_vector_t *v2=malloc(sizeof(igraph_vector_t));\n if (!v1 || !v2) { \n exit(2);\n }\n igraph_vector_init(v1, 0);\n igraph_vector_init(v2, 0);\n VECTOR(resvertices)[i] = v1;\n VECTOR(resedges)[i] = v2;\n }" (for) "for" (() "(" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<vcount" (identifier) "i" (<) "<" (identifier) "vcount" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n igraph_vector_t *v1=malloc(sizeof(igraph_vector_t));\n igraph_vector_t *v2=malloc(sizeof(igraph_vector_t));\n if (!v1 || !v2) { \n exit(2);\n }\n igraph_vector_init(v1, 0);\n igraph_vector_init(v2, 0);\n VECTOR(resvertices)[i] = v1;\n VECTOR(resedges)[i] = v2;\n }" ({) "{" (declaration) "igraph_vector_t *v1=malloc(sizeof(igraph_vector_t));" (type_identifier) "igraph_vector_t" (init_declarator) "*v1=malloc(sizeof(igraph_vector_t))" (pointer_declarator) "*v1" (*) "*" (identifier) "v1" (=) "=" (call_expression) "malloc(sizeof(igraph_vector_t))" (identifier) "malloc" (argument_list) "(sizeof(igraph_vector_t))" (() "(" (sizeof_expression) "sizeof(igraph_vector_t)" (sizeof) "sizeof" (parenthesized_expression) "(igraph_vector_t)" (() "(" (identifier) "igraph_vector_t" ()) ")" ()) ")" (;) ";" (declaration) "igraph_vector_t *v2=malloc(sizeof(igraph_vector_t));" (type_identifier) "igraph_vector_t" (init_declarator) "*v2=malloc(sizeof(igraph_vector_t))" (pointer_declarator) "*v2" (*) "*" (identifier) "v2" (=) "=" (call_expression) "malloc(sizeof(igraph_vector_t))" (identifier) "malloc" (argument_list) "(sizeof(igraph_vector_t))" (() "(" (sizeof_expression) "sizeof(igraph_vector_t)" (sizeof) "sizeof" (parenthesized_expression) "(igraph_vector_t)" (() "(" (identifier) "igraph_vector_t" ()) ")" ()) ")" (;) ";" (if_statement) "if (!v1 || !v2) { \n exit(2);\n }" (if) "if" (parenthesized_expression) "(!v1 || !v2)" (() "(" (binary_expression) "!v1 || !v2" (unary_expression) "!v1" (!) "!" (identifier) "v1" (||) "||" (unary_expression) "!v2" (!) "!" (identifier) "v2" ()) ")" (compound_statement) "{ \n exit(2);\n }" ({) "{" (expression_statement) "exit(2);" (call_expression) "exit(2)" (identifier) "exit" (argument_list) "(2)" (() "(" (number_literal) "2" ()) ")" (;) ";" (}) "}" (expression_statement) "igraph_vector_init(v1, 0);" (call_expression) "igraph_vector_init(v1, 0)" (identifier) "igraph_vector_init" (argument_list) "(v1, 0)" (() "(" (identifier) "v1" (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "igraph_vector_init(v2, 0);" (call_expression) "igraph_vector_init(v2, 0)" (identifier) "igraph_vector_init" (argument_list) "(v2, 0)" (() "(" (identifier) "v2" (,) "," (number_literal) "0" ()) ")" (;) ";" (expression_statement) "VECTOR(resvertices)[i] = v1;" (assignment_expression) "VECTOR(resvertices)[i] = v1" (subscript_expression) "VECTOR(resvertices)[i]" (call_expression) "VECTOR(resvertices)" (identifier) "VECTOR" (argument_list) "(resvertices)" (() "(" (identifier) "resvertices" ()) ")" ([) "[" (identifier) "i" (]) "]" (=) "=" (identifier) "v1" (;) ";" (expression_statement) "VECTOR(resedges)[i] = v2;" (assignment_expression) "VECTOR(resedges)[i] = v2" (subscript_expression) "VECTOR(resedges)[i]" (call_expression) "VECTOR(resedges)" (identifier) "VECTOR" (argument_list) "(resedges)" (() "(" (identifier) "resedges" ()) ")" ([) "[" (identifier) "i" (]) "]" (=) "=" (identifier) "v2" (;) ";" (}) "}" (expression_statement) "igraph_get_shortest_paths(&g, &resvertices, &resedges, /*from=*/ 0, \n /*to=*/ igraph_vss_all(), /*mode=*/ IGRAPH_OUT,\n &predecessors, &inbound_edges);" (call_expression) "igraph_get_shortest_paths(&g, &resvertices, &resedges, /*from=*/ 0, \n /*to=*/ igraph_vss_all(), /*mode=*/ IGRAPH_OUT,\n &predecessors, &inbound_edges)" (identifier) "igraph_get_shortest_paths" (argument_list) "(&g, &resvertices, &resedges, /*from=*/ 0, \n /*to=*/ igraph_vss_all(), /*mode=*/ IGRAPH_OUT,\n &predecessors, &inbound_edges)" (() "(" (pointer_expression) "&g" (&) "&" (identifier) "g" (,) "," (pointer_expression) "&resvertices" (&) "&" (identifier) "resvertices" (,) "," (pointer_expression) "&resedges" (&) "&" (identifier) "resedges" (,) "," (comment) "/*from=*/" (number_literal) "0" (,) "," (comment) "/*to=*/" (call_expression) "igraph_vss_all()" (identifier) "igraph_vss_all" (argument_list) "()" (() "(" ()) ")" (,) "," (comment) "/*mode=*/" (identifier) "IGRAPH_OUT" (,) "," (pointer_expression) "&predecessors" (&) "&" (identifier) "predecessors" (,) "," (pointer_expression) "&inbound_edges" (&) "&" (identifier) "inbound_edges" ()) ")" (;) ";" (for_statement) "for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n printf("%i V: ", i); igraph_vector_print(v1);\n printf("%i E: ", i); igraph_vector_print(v2);\n }" (for) "for" (() "(" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<vcount" (identifier) "i" (<) "<" (identifier) "vcount" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n printf("%i V: ", i); igraph_vector_print(v1);\n printf("%i E: ", i); igraph_vector_print(v2);\n }" ({) "{" (declaration) "igraph_vector_t *v1=VECTOR(resvertices)[i];" (type_identifier) "igraph_vector_t" (init_declarator) "*v1=VECTOR(resvertices)[i]" (pointer_declarator) "*v1" (*) "*" (identifier) "v1" (=) "=" (subscript_expression) "VECTOR(resvertices)[i]" (call_expression) "VECTOR(resvertices)" (identifier) "VECTOR" (argument_list) "(resvertices)" (() "(" (identifier) "resvertices" ()) ")" ([) "[" (identifier) "i" (]) "]" (;) ";" (declaration) "igraph_vector_t *v2=VECTOR(resedges)[i];" (type_identifier) "igraph_vector_t" (init_declarator) "*v2=VECTOR(resedges)[i]" (pointer_declarator) "*v2" (*) "*" (identifier) "v2" (=) "=" (subscript_expression) "VECTOR(resedges)[i]" (call_expression) "VECTOR(resedges)" (identifier) "VECTOR" (argument_list) "(resedges)" (() "(" (identifier) "resedges" ()) ")" ([) "[" (identifier) "i" (]) "]" (;) ";" (expression_statement) "printf("%i V: ", i);" (call_expression) "printf("%i V: ", i)" (identifier) "printf" (argument_list) "("%i V: ", i)" (() "(" (string_literal) ""%i V: "" (") """ (string_content) "%i V: " (") """ (,) "," (identifier) "i" ()) ")" (;) ";" (expression_statement) "igraph_vector_print(v1);" (call_expression) "igraph_vector_print(v1)" (identifier) "igraph_vector_print" (argument_list) "(v1)" (() "(" (identifier) "v1" ()) ")" (;) ";" (expression_statement) "printf("%i E: ", i);" (call_expression) "printf("%i E: ", i)" (identifier) "printf" (argument_list) "("%i E: ", i)" (() "(" (string_literal) ""%i E: "" (") """ (string_content) "%i E: " (") """ (,) "," (identifier) "i" ()) ")" (;) ";" (expression_statement) "igraph_vector_print(v2);" (call_expression) "igraph_vector_print(v2)" (identifier) "igraph_vector_print" (argument_list) "(v2)" (() "(" (identifier) "v2" ()) ")" (;) ";" (}) "}" (expression_statement) "printf("pred: ");" (call_expression) "printf("pred: ")" (identifier) "printf" (argument_list) "("pred: ")" (() "(" (string_literal) ""pred: "" (") """ (string_content) "pred: " (") """ ()) ")" (;) ";" (expression_statement) "igraph_vector_long_print(&predecessors);" (call_expression) "igraph_vector_long_print(&predecessors)" (identifier) "igraph_vector_long_print" (argument_list) "(&predecessors)" (() "(" (pointer_expression) "&predecessors" (&) "&" (identifier) "predecessors" ()) ")" (;) ";" (expression_statement) "printf("inbe: ");" (call_expression) "printf("inbe: ")" (identifier) "printf" (argument_list) "("inbe: ")" (() "(" (string_literal) ""inbe: "" (") """ (string_content) "inbe: " (") """ ()) ")" (;) ";" (expression_statement) "igraph_vector_long_print(&inbound_edges);" (call_expression) "igraph_vector_long_print(&inbound_edges)" (identifier) "igraph_vector_long_print" (argument_list) "(&inbound_edges)" (() "(" (pointer_expression) "&inbound_edges" (&) "&" (identifier) "inbound_edges" ()) ")" (;) ";" (expression_statement) "igraph_vector_long_destroy(&inbound_edges);" (call_expression) "igraph_vector_long_destroy(&inbound_edges)" (identifier) "igraph_vector_long_destroy" (argument_list) "(&inbound_edges)" (() "(" (pointer_expression) "&inbound_edges" (&) "&" (identifier) "inbound_edges" ()) ")" (;) ";" (expression_statement) "igraph_vector_long_destroy(&predecessors);" (call_expression) "igraph_vector_long_destroy(&predecessors)" (identifier) "igraph_vector_long_destroy" (argument_list) "(&predecessors)" (() "(" (pointer_expression) "&predecessors" (&) "&" (identifier) "predecessors" ()) ")" (;) ";" (for_statement) "for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n igraph_vector_destroy(v1);\n igraph_vector_destroy(v2);\n igraph_free(v1);\n igraph_free(v2);\n }" (for) "for" (() "(" (assignment_expression) "i=0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i<vcount" (identifier) "i" (<) "<" (identifier) "vcount" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n igraph_vector_destroy(v1);\n igraph_vector_destroy(v2);\n igraph_free(v1);\n igraph_free(v2);\n }" ({) "{" (declaration) "igraph_vector_t *v1=VECTOR(resvertices)[i];" (type_identifier) "igraph_vector_t" (init_declarator) "*v1=VECTOR(resvertices)[i]" (pointer_declarator) "*v1" (*) "*" (identifier) "v1" (=) "=" (subscript_expression) "VECTOR(resvertices)[i]" (call_expression) "VECTOR(resvertices)" (identifier) "VECTOR" (argument_list) "(resvertices)" (() "(" (identifier) "resvertices" ()) ")" ([) "[" (identifier) "i" (]) "]" (;) ";" (declaration) "igraph_vector_t *v2=VECTOR(resedges)[i];" (type_identifier) "igraph_vector_t" (init_declarator) "*v2=VECTOR(resedges)[i]" (pointer_declarator) "*v2" (*) "*" (identifier) "v2" (=) "=" (subscript_expression) "VECTOR(resedges)[i]" (call_expression) "VECTOR(resedges)" (identifier) "VECTOR" (argument_list) "(resedges)" (() "(" (identifier) "resedges" ()) ")" ([) "[" (identifier) "i" (]) "]" (;) ";" (expression_statement) "igraph_vector_destroy(v1);" (call_expression) "igraph_vector_destroy(v1)" (identifier) "igraph_vector_destroy" (argument_list) "(v1)" (() "(" (identifier) "v1" ()) ")" (;) ";" (expression_statement) "igraph_vector_destroy(v2);" (call_expression) "igraph_vector_destroy(v2)" (identifier) "igraph_vector_destroy" (argument_list) "(v2)" (() "(" (identifier) "v2" ()) ")" (;) ";" (expression_statement) "igraph_free(v1);" (call_expression) "igraph_free(v1)" (identifier) "igraph_free" (argument_list) "(v1)" (() "(" (identifier) "v1" ()) ")" (;) ";" (expression_statement) "igraph_free(v2);" (call_expression) "igraph_free(v2)" (identifier) "igraph_free" (argument_list) "(v2)" (() "(" (identifier) "v2" ()) ")" (;) ";" (}) "}" (expression_statement) "igraph_vector_ptr_destroy(&resedges);" (call_expression) "igraph_vector_ptr_destroy(&resedges)" (identifier) "igraph_vector_ptr_destroy" (argument_list) "(&resedges)" (() "(" (pointer_expression) "&resedges" (&) "&" (identifier) "resedges" ()) ")" (;) ";" (expression_statement) "igraph_vector_ptr_destroy(&resvertices);" (call_expression) "igraph_vector_ptr_destroy(&resvertices)" (identifier) "igraph_vector_ptr_destroy" (argument_list) "(&resvertices)" (() "(" (pointer_expression) "&resvertices" (&) "&" (identifier) "resvertices" ()) ")" (;) ";" (expression_statement) "igraph_destroy(&g);" (call_expression) "igraph_destroy(&g)" (identifier) "igraph_destroy" (argument_list) "(&g)" (() "(" (pointer_expression) "&g" (&) "&" (identifier) "g" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
657
0
{"language": "c", "success": true, "metadata": {"lines": 77, "avg_line_length": 34.92, "nodes": 364, "errors": 0, "source_hash": "594339a4eecf7fe84f86740254ae107fb28e45138327f3e9a4d2ed5150dda859", "categorized_nodes": 279}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <igraph.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": "system_lib_string", "text": "<igraph.h>", "parent": 0, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 19}}, {"id": 3, "type": "function_definition", "text": "int main() {\n const igraph_real_t edges[] = { 0,1, 0,2, 1,6, 2,6, 1,3, 1,4, 1,5,\n\t\t\t\t 3,2, 4,2, 5,2 };\n igraph_t g;\n igraph_vector_t edgev;\n igraph_vector_ptr_t resvertices, resedges;\n igraph_vector_long_t predecessors, inbound_edges;\n int vcount, i;\n \n igraph_vector_view(&edgev, edges, sizeof(edges)/sizeof(igraph_real_t));\n vcount=igraph_vector_max(&edgev)+1;\n igraph_create(&g, &edgev, vcount, IGRAPH_DIRECTED);\n \n igraph_vector_ptr_init(&resvertices, vcount);\n igraph_vector_ptr_init(&resedges, vcount);\n igraph_vector_long_init(&predecessors, 0);\n igraph_vector_long_init(&inbound_edges, 0);\n \n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=malloc(sizeof(igraph_vector_t));\n igraph_vector_t *v2=malloc(sizeof(igraph_vector_t));\n if (!v1 || !v2) { \n exit(2);\n }\n igraph_vector_init(v1, 0);\n igraph_vector_init(v2, 0);\n VECTOR(resvertices)[i] = v1;\n VECTOR(resedges)[i] = v2;\n }\n\n igraph_get_shortest_paths(&g, &resvertices, &resedges, /*from=*/ 0, \n\t\t\t /*to=*/ igraph_vss_all(), /*mode=*/ IGRAPH_OUT,\n\t\t\t &predecessors, &inbound_edges);\n\n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n printf(\"%i V: \", i); igraph_vector_print(v1);\n printf(\"%i E: \", i); igraph_vector_print(v2);\n }\n printf(\"pred: \"); igraph_vector_long_print(&predecessors);\n printf(\"inbe: \"); igraph_vector_long_print(&inbound_edges);\n\n igraph_vector_long_destroy(&inbound_edges);\n igraph_vector_long_destroy(&predecessors);\n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n igraph_vector_destroy(v1);\n igraph_vector_destroy(v2);\n igraph_free(v1);\n igraph_free(v2);\n }\n igraph_vector_ptr_destroy(&resedges);\n igraph_vector_ptr_destroy(&resvertices);\n igraph_destroy(&g);\n\n return 0;\n}", "parent": null, "children": [4, 5], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 83, "column": 1}}, {"id": 4, "type": "primitive_type", "text": "int", "parent": 3, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 3}}, {"id": 5, "type": "function_declarator", "text": "main()", "parent": 3, "children": [6, 7], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 10}}, {"id": 6, "type": "identifier", "text": "main", "parent": 5, "children": [], "start_point": {"row": 25, "column": 4}, "end_point": {"row": 25, "column": 8}}, {"id": 7, "type": "parameter_list", "text": "()", "parent": 5, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 10}}, {"id": 8, "type": "declaration", "text": "const igraph_real_t edges[] = { 0,1, 0,2, 1,6, 2,6, 1,3, 1,4, 1,5,\n\t\t\t\t 3,2, 4,2, 5,2 };", "parent": 3, "children": [9, 10], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 27, "column": 22}}, {"id": 9, "type": "type_identifier", "text": "igraph_real_t", "parent": 8, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 21}}, {"id": 10, "type": "init_declarator", "text": "edges[] = { 0,1, 0,2, 1,6, 2,6, 1,3, 1,4, 1,5,\n\t\t\t\t 3,2, 4,2, 5,2 }", "parent": 8, "children": [11, 13, 14], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 27, "column": 21}}, {"id": 11, "type": "array_declarator", "text": "edges[]", "parent": 10, "children": [12], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 29}}, {"id": 12, "type": "identifier", "text": "edges", "parent": 11, "children": [], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 26, "column": 27}}, {"id": 13, "type": "=", "text": "=", "parent": 10, "children": [], "start_point": {"row": 26, "column": 30}, "end_point": {"row": 26, "column": 31}}, {"id": 14, "type": "initializer_list", "text": "{ 0,1, 0,2, 1,6, 2,6, 1,3, 1,4, 1,5,\n\t\t\t\t 3,2, 4,2, 5,2 }", "parent": 10, "children": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34], "start_point": {"row": 26, "column": 32}, "end_point": {"row": 27, "column": 21}}, {"id": 15, "type": "number_literal", "text": "0", "parent": 14, "children": [], "start_point": {"row": 26, "column": 34}, "end_point": {"row": 26, "column": 35}}, {"id": 16, "type": "number_literal", "text": "1", "parent": 14, "children": [], "start_point": {"row": 26, "column": 36}, "end_point": {"row": 26, "column": 37}}, {"id": 17, "type": "number_literal", "text": "0", "parent": 14, "children": [], "start_point": {"row": 26, "column": 39}, "end_point": {"row": 26, "column": 40}}, {"id": 18, "type": "number_literal", "text": "2", "parent": 14, "children": [], "start_point": {"row": 26, "column": 41}, "end_point": {"row": 26, "column": 42}}, {"id": 19, "type": "number_literal", "text": "1", "parent": 14, "children": [], "start_point": {"row": 26, "column": 44}, "end_point": {"row": 26, "column": 45}}, {"id": 20, "type": "number_literal", "text": "6", "parent": 14, "children": [], "start_point": {"row": 26, "column": 46}, "end_point": {"row": 26, "column": 47}}, {"id": 21, "type": "number_literal", "text": "2", "parent": 14, "children": [], "start_point": {"row": 26, "column": 49}, "end_point": {"row": 26, "column": 50}}, {"id": 22, "type": "number_literal", "text": "6", "parent": 14, "children": [], "start_point": {"row": 26, "column": 51}, "end_point": {"row": 26, "column": 52}}, {"id": 23, "type": "number_literal", "text": "1", "parent": 14, "children": [], "start_point": {"row": 26, "column": 54}, "end_point": {"row": 26, "column": 55}}, {"id": 24, "type": "number_literal", "text": "3", "parent": 14, "children": [], "start_point": {"row": 26, "column": 56}, "end_point": {"row": 26, "column": 57}}, {"id": 25, "type": "number_literal", "text": "1", "parent": 14, "children": [], "start_point": {"row": 26, "column": 59}, "end_point": {"row": 26, "column": 60}}, {"id": 26, "type": "number_literal", "text": "4", "parent": 14, "children": [], "start_point": {"row": 26, "column": 61}, "end_point": {"row": 26, "column": 62}}, {"id": 27, "type": "number_literal", "text": "1", "parent": 14, "children": [], "start_point": {"row": 26, "column": 64}, "end_point": {"row": 26, "column": 65}}, {"id": 28, "type": "number_literal", "text": "5", "parent": 14, "children": [], "start_point": {"row": 26, "column": 66}, "end_point": {"row": 26, "column": 67}}, {"id": 29, "type": "number_literal", "text": "3", "parent": 14, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 7}}, {"id": 30, "type": "number_literal", "text": "2", "parent": 14, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 9}}, {"id": 31, "type": "number_literal", "text": "4", "parent": 14, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 12}}, {"id": 32, "type": "number_literal", "text": "2", "parent": 14, "children": [], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 14}}, {"id": 33, "type": "number_literal", "text": "5", "parent": 14, "children": [], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 17}}, {"id": 34, "type": "number_literal", "text": "2", "parent": 14, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 19}}, {"id": 35, "type": "declaration", "text": "igraph_t g;", "parent": 3, "children": [36, 37], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 13}}, {"id": 36, "type": "type_identifier", "text": "igraph_t", "parent": 35, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 10}}, {"id": 37, "type": "identifier", "text": "g", "parent": 35, "children": [], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 12}}, {"id": 38, "type": "declaration", "text": "igraph_vector_t edgev;", "parent": 3, "children": [39, 40], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 24}}, {"id": 39, "type": "type_identifier", "text": "igraph_vector_t", "parent": 38, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 17}}, {"id": 40, "type": "identifier", "text": "edgev", "parent": 38, "children": [], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 23}}, {"id": 41, "type": "declaration", "text": "igraph_vector_ptr_t resvertices, resedges;", "parent": 3, "children": [42, 43, 44], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 44}}, {"id": 42, "type": "type_identifier", "text": "igraph_vector_ptr_t", "parent": 41, "children": [], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 21}}, {"id": 43, "type": "identifier", "text": "resvertices", "parent": 41, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 33}}, {"id": 44, "type": "identifier", "text": "resedges", "parent": 41, "children": [], "start_point": {"row": 30, "column": 35}, "end_point": {"row": 30, "column": 43}}, {"id": 45, "type": "declaration", "text": "igraph_vector_long_t predecessors, inbound_edges;", "parent": 3, "children": [46, 47, 48], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 51}}, {"id": 46, "type": "type_identifier", "text": "igraph_vector_long_t", "parent": 45, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 22}}, {"id": 47, "type": "identifier", "text": "predecessors", "parent": 45, "children": [], "start_point": {"row": 31, "column": 23}, "end_point": {"row": 31, "column": 35}}, {"id": 48, "type": "identifier", "text": "inbound_edges", "parent": 45, "children": [], "start_point": {"row": 31, "column": 37}, "end_point": {"row": 31, "column": 50}}, {"id": 49, "type": "declaration", "text": "int vcount, i;", "parent": 3, "children": [50, 51, 52], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 16}}, {"id": 50, "type": "primitive_type", "text": "int", "parent": 49, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 5}}, {"id": 51, "type": "identifier", "text": "vcount", "parent": 49, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 12}}, {"id": 52, "type": "identifier", "text": "i", "parent": 49, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 15}}, {"id": 53, "type": "call_expression", "text": "igraph_vector_view(&edgev, edges, sizeof(edges)/sizeof(igraph_real_t))", "parent": 3, "children": [54, 55], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 72}}, {"id": 54, "type": "identifier", "text": "igraph_vector_view", "parent": 53, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 20}}, {"id": 55, "type": "argument_list", "text": "(&edgev, edges, sizeof(edges)/sizeof(igraph_real_t))", "parent": 53, "children": [56, 58, 59], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 72}}, {"id": 56, "type": "pointer_expression", "text": "&edgev", "parent": 55, "children": [57], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 27}}, {"id": 57, "type": "identifier", "text": "edgev", "parent": 56, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 27}}, {"id": 58, "type": "identifier", "text": "edges", "parent": 55, "children": [], "start_point": {"row": 34, "column": 29}, "end_point": {"row": 34, "column": 34}}, {"id": 59, "type": "binary_expression", "text": "sizeof(edges)/sizeof(igraph_real_t)", "parent": 55, "children": [60, 63, 64], "start_point": {"row": 34, "column": 36}, "end_point": {"row": 34, "column": 71}}, {"id": 60, "type": "sizeof_expression", "text": "sizeof(edges)", "parent": 59, "children": [61], "start_point": {"row": 34, "column": 36}, "end_point": {"row": 34, "column": 49}}, {"id": 61, "type": "parenthesized_expression", "text": "(edges)", "parent": 60, "children": [62], "start_point": {"row": 34, "column": 42}, "end_point": {"row": 34, "column": 49}}, {"id": 62, "type": "identifier", "text": "edges", "parent": 61, "children": [], "start_point": {"row": 34, "column": 43}, "end_point": {"row": 34, "column": 48}}, {"id": 63, "type": "/", "text": "/", "parent": 59, "children": [], "start_point": {"row": 34, "column": 49}, "end_point": {"row": 34, "column": 50}}, {"id": 64, "type": "sizeof_expression", "text": "sizeof(igraph_real_t)", "parent": 59, "children": [65], "start_point": {"row": 34, "column": 50}, "end_point": {"row": 34, "column": 71}}, {"id": 65, "type": "parenthesized_expression", "text": "(igraph_real_t)", "parent": 64, "children": [66], "start_point": {"row": 34, "column": 56}, "end_point": {"row": 34, "column": 71}}, {"id": 66, "type": "identifier", "text": "igraph_real_t", "parent": 65, "children": [], "start_point": {"row": 34, "column": 57}, "end_point": {"row": 34, "column": 70}}, {"id": 67, "type": "assignment_expression", "text": "vcount=igraph_vector_max(&edgev)+1", "parent": 3, "children": [68, 69, 70], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 36}}, {"id": 68, "type": "identifier", "text": "vcount", "parent": 67, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 8}}, {"id": 69, "type": "=", "text": "=", "parent": 67, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 9}}, {"id": 70, "type": "binary_expression", "text": "igraph_vector_max(&edgev)+1", "parent": 67, "children": [71, 76, 77], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 36}}, {"id": 71, "type": "call_expression", "text": "igraph_vector_max(&edgev)", "parent": 70, "children": [72, 73], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 34}}, {"id": 72, "type": "identifier", "text": "igraph_vector_max", "parent": 71, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 26}}, {"id": 73, "type": "argument_list", "text": "(&edgev)", "parent": 71, "children": [74], "start_point": {"row": 35, "column": 26}, "end_point": {"row": 35, "column": 34}}, {"id": 74, "type": "pointer_expression", "text": "&edgev", "parent": 73, "children": [75], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 33}}, {"id": 75, "type": "identifier", "text": "edgev", "parent": 74, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 33}}, {"id": 76, "type": "+", "text": "+", "parent": 70, "children": [], "start_point": {"row": 35, "column": 34}, "end_point": {"row": 35, "column": 35}}, {"id": 77, "type": "number_literal", "text": "1", "parent": 70, "children": [], "start_point": {"row": 35, "column": 35}, "end_point": {"row": 35, "column": 36}}, {"id": 78, "type": "call_expression", "text": "igraph_create(&g, &edgev, vcount, IGRAPH_DIRECTED)", "parent": 3, "children": [79, 80], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 52}}, {"id": 79, "type": "identifier", "text": "igraph_create", "parent": 78, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 15}}, {"id": 80, "type": "argument_list", "text": "(&g, &edgev, vcount, IGRAPH_DIRECTED)", "parent": 78, "children": [81, 83, 85, 86], "start_point": {"row": 36, "column": 15}, "end_point": {"row": 36, "column": 52}}, {"id": 81, "type": "pointer_expression", "text": "&g", "parent": 80, "children": [82], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 18}}, {"id": 82, "type": "identifier", "text": "g", "parent": 81, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 18}}, {"id": 83, "type": "pointer_expression", "text": "&edgev", "parent": 80, "children": [84], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 26}}, {"id": 84, "type": "identifier", "text": "edgev", "parent": 83, "children": [], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 26}}, {"id": 85, "type": "identifier", "text": "vcount", "parent": 80, "children": [], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 34}}, {"id": 86, "type": "identifier", "text": "IGRAPH_DIRECTED", "parent": 80, "children": [], "start_point": {"row": 36, "column": 36}, "end_point": {"row": 36, "column": 51}}, {"id": 87, "type": "call_expression", "text": "igraph_vector_ptr_init(&resvertices, vcount)", "parent": 3, "children": [88, 89], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 46}}, {"id": 88, "type": "identifier", "text": "igraph_vector_ptr_init", "parent": 87, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 24}}, {"id": 89, "type": "argument_list", "text": "(&resvertices, vcount)", "parent": 87, "children": [90, 92], "start_point": {"row": 38, "column": 24}, "end_point": {"row": 38, "column": 46}}, {"id": 90, "type": "pointer_expression", "text": "&resvertices", "parent": 89, "children": [91], "start_point": {"row": 38, "column": 25}, "end_point": {"row": 38, "column": 37}}, {"id": 91, "type": "identifier", "text": "resvertices", "parent": 90, "children": [], "start_point": {"row": 38, "column": 26}, "end_point": {"row": 38, "column": 37}}, {"id": 92, "type": "identifier", "text": "vcount", "parent": 89, "children": [], "start_point": {"row": 38, "column": 39}, "end_point": {"row": 38, "column": 45}}, {"id": 93, "type": "call_expression", "text": "igraph_vector_ptr_init(&resedges, vcount)", "parent": 3, "children": [94, 95], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 43}}, {"id": 94, "type": "identifier", "text": "igraph_vector_ptr_init", "parent": 93, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 24}}, {"id": 95, "type": "argument_list", "text": "(&resedges, vcount)", "parent": 93, "children": [96, 98], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 43}}, {"id": 96, "type": "pointer_expression", "text": "&resedges", "parent": 95, "children": [97], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 34}}, {"id": 97, "type": "identifier", "text": "resedges", "parent": 96, "children": [], "start_point": {"row": 39, "column": 26}, "end_point": {"row": 39, "column": 34}}, {"id": 98, "type": "identifier", "text": "vcount", "parent": 95, "children": [], "start_point": {"row": 39, "column": 36}, "end_point": {"row": 39, "column": 42}}, {"id": 99, "type": "call_expression", "text": "igraph_vector_long_init(&predecessors, 0)", "parent": 3, "children": [100, 101], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 43}}, {"id": 100, "type": "identifier", "text": "igraph_vector_long_init", "parent": 99, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 25}}, {"id": 101, "type": "argument_list", "text": "(&predecessors, 0)", "parent": 99, "children": [102, 104], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 43}}, {"id": 102, "type": "pointer_expression", "text": "&predecessors", "parent": 101, "children": [103], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 39}}, {"id": 103, "type": "identifier", "text": "predecessors", "parent": 102, "children": [], "start_point": {"row": 40, "column": 27}, "end_point": {"row": 40, "column": 39}}, {"id": 104, "type": "number_literal", "text": "0", "parent": 101, "children": [], "start_point": {"row": 40, "column": 41}, "end_point": {"row": 40, "column": 42}}, {"id": 105, "type": "call_expression", "text": "igraph_vector_long_init(&inbound_edges, 0)", "parent": 3, "children": [106, 107], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 44}}, {"id": 106, "type": "identifier", "text": "igraph_vector_long_init", "parent": 105, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 25}}, {"id": 107, "type": "argument_list", "text": "(&inbound_edges, 0)", "parent": 105, "children": [108, 110], "start_point": {"row": 41, "column": 25}, "end_point": {"row": 41, "column": 44}}, {"id": 108, "type": "pointer_expression", "text": "&inbound_edges", "parent": 107, "children": [109], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 40}}, {"id": 109, "type": "identifier", "text": "inbound_edges", "parent": 108, "children": [], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 40}}, {"id": 110, "type": "number_literal", "text": "0", "parent": 107, "children": [], "start_point": {"row": 41, "column": 42}, "end_point": {"row": 41, "column": 43}}, {"id": 111, "type": "for_statement", "text": "for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=malloc(sizeof(igraph_vector_t));\n igraph_vector_t *v2=malloc(sizeof(igraph_vector_t));\n if (!v1 || !v2) { \n exit(2);\n }\n igraph_vector_init(v1, 0);\n igraph_vector_init(v2, 0);\n VECTOR(resvertices)[i] = v1;\n VECTOR(resedges)[i] = v2;\n }", "parent": 3, "children": [112, 116, 120], "start_point": {"row": 43, "column": 2}, "end_point": {"row": 53, "column": 3}}, {"id": 112, "type": "assignment_expression", "text": "i=0", "parent": 111, "children": [113, 114, 115], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 10}}, {"id": 113, "type": "identifier", "text": "i", "parent": 112, "children": [], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 8}}, {"id": 114, "type": "=", "text": "=", "parent": 112, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 9}}, {"id": 115, "type": "number_literal", "text": "0", "parent": 112, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 10}}, {"id": 116, "type": "binary_expression", "text": "i<vcount", "parent": 111, "children": [117, 118, 119], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 20}}, {"id": 117, "type": "identifier", "text": "i", "parent": 116, "children": [], "start_point": {"row": 43, "column": 12}, "end_point": {"row": 43, "column": 13}}, {"id": 118, "type": "<", "text": "<", "parent": 116, "children": [], "start_point": {"row": 43, "column": 13}, "end_point": {"row": 43, "column": 14}}, {"id": 119, "type": "identifier", "text": "vcount", "parent": 116, "children": [], "start_point": {"row": 43, "column": 14}, "end_point": {"row": 43, "column": 20}}, {"id": 120, "type": "update_expression", "text": "i++", "parent": 111, "children": [121, 122], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 25}}, {"id": 121, "type": "identifier", "text": "i", "parent": 120, "children": [], "start_point": {"row": 43, "column": 22}, "end_point": {"row": 43, "column": 23}}, {"id": 122, "type": "++", "text": "++", "parent": 120, "children": [], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 25}}, {"id": 123, "type": "declaration", "text": "igraph_vector_t *v1=malloc(sizeof(igraph_vector_t));", "parent": 111, "children": [124, 125], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 56}}, {"id": 124, "type": "type_identifier", "text": "igraph_vector_t", "parent": 123, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 19}}, {"id": 125, "type": "init_declarator", "text": "*v1=malloc(sizeof(igraph_vector_t))", "parent": 123, "children": [126, 129, 130], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 55}}, {"id": 126, "type": "pointer_declarator", "text": "*v1", "parent": 125, "children": [127, 128], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 23}}, {"id": 127, "type": "*", "text": "*", "parent": 126, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 21}}, {"id": 128, "type": "identifier", "text": "v1", "parent": 126, "children": [], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 23}}, {"id": 129, "type": "=", "text": "=", "parent": 125, "children": [], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 24}}, {"id": 130, "type": "call_expression", "text": "malloc(sizeof(igraph_vector_t))", "parent": 125, "children": [131, 132], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 55}}, {"id": 131, "type": "identifier", "text": "malloc", "parent": 130, "children": [], "start_point": {"row": 44, "column": 24}, "end_point": {"row": 44, "column": 30}}, {"id": 132, "type": "argument_list", "text": "(sizeof(igraph_vector_t))", "parent": 130, "children": [133], "start_point": {"row": 44, "column": 30}, "end_point": {"row": 44, "column": 55}}, {"id": 133, "type": "sizeof_expression", "text": "sizeof(igraph_vector_t)", "parent": 132, "children": [134], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 54}}, {"id": 134, "type": "parenthesized_expression", "text": "(igraph_vector_t)", "parent": 133, "children": [135], "start_point": {"row": 44, "column": 37}, "end_point": {"row": 44, "column": 54}}, {"id": 135, "type": "identifier", "text": "igraph_vector_t", "parent": 134, "children": [], "start_point": {"row": 44, "column": 38}, "end_point": {"row": 44, "column": 53}}, {"id": 136, "type": "declaration", "text": "igraph_vector_t *v2=malloc(sizeof(igraph_vector_t));", "parent": 111, "children": [137, 138], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 56}}, {"id": 137, "type": "type_identifier", "text": "igraph_vector_t", "parent": 136, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 19}}, {"id": 138, "type": "init_declarator", "text": "*v2=malloc(sizeof(igraph_vector_t))", "parent": 136, "children": [139, 142, 143], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 55}}, {"id": 139, "type": "pointer_declarator", "text": "*v2", "parent": 138, "children": [140, 141], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 23}}, {"id": 140, "type": "*", "text": "*", "parent": 139, "children": [], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 21}}, {"id": 141, "type": "identifier", "text": "v2", "parent": 139, "children": [], "start_point": {"row": 45, "column": 21}, "end_point": {"row": 45, "column": 23}}, {"id": 142, "type": "=", "text": "=", "parent": 138, "children": [], "start_point": {"row": 45, "column": 23}, "end_point": {"row": 45, "column": 24}}, {"id": 143, "type": "call_expression", "text": "malloc(sizeof(igraph_vector_t))", "parent": 138, "children": [144, 145], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 55}}, {"id": 144, "type": "identifier", "text": "malloc", "parent": 143, "children": [], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 30}}, {"id": 145, "type": "argument_list", "text": "(sizeof(igraph_vector_t))", "parent": 143, "children": [146], "start_point": {"row": 45, "column": 30}, "end_point": {"row": 45, "column": 55}}, {"id": 146, "type": "sizeof_expression", "text": "sizeof(igraph_vector_t)", "parent": 145, "children": [147], "start_point": {"row": 45, "column": 31}, "end_point": {"row": 45, "column": 54}}, {"id": 147, "type": "parenthesized_expression", "text": "(igraph_vector_t)", "parent": 146, "children": [148], "start_point": {"row": 45, "column": 37}, "end_point": {"row": 45, "column": 54}}, {"id": 148, "type": "identifier", "text": "igraph_vector_t", "parent": 147, "children": [], "start_point": {"row": 45, "column": 38}, "end_point": {"row": 45, "column": 53}}, {"id": 149, "type": "if_statement", "text": "if (!v1 || !v2) { \n exit(2);\n }", "parent": 111, "children": [150], "start_point": {"row": 46, "column": 4}, "end_point": {"row": 48, "column": 5}}, {"id": 150, "type": "parenthesized_expression", "text": "(!v1 || !v2)", "parent": 149, "children": [151], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 19}}, {"id": 151, "type": "binary_expression", "text": "!v1 || !v2", "parent": 150, "children": [152, 155, 156], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 18}}, {"id": 152, "type": "unary_expression", "text": "!v1", "parent": 151, "children": [153, 154], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 11}}, {"id": 153, "type": "!", "text": "!", "parent": 152, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 9}}, {"id": 154, "type": "identifier", "text": "v1", "parent": 152, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 11}}, {"id": 155, "type": "||", "text": "||", "parent": 151, "children": [], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 14}}, {"id": 156, "type": "unary_expression", "text": "!v2", "parent": 151, "children": [157, 158], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 18}}, {"id": 157, "type": "!", "text": "!", "parent": 156, "children": [], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 16}}, {"id": 158, "type": "identifier", "text": "v2", "parent": 156, "children": [], "start_point": {"row": 46, "column": 16}, "end_point": {"row": 46, "column": 18}}, {"id": 159, "type": "call_expression", "text": "exit(2)", "parent": 149, "children": [160, 161], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 13}}, {"id": 160, "type": "identifier", "text": "exit", "parent": 159, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 10}}, {"id": 161, "type": "argument_list", "text": "(2)", "parent": 159, "children": [162], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 13}}, {"id": 162, "type": "number_literal", "text": "2", "parent": 161, "children": [], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 12}}, {"id": 163, "type": "call_expression", "text": "igraph_vector_init(v1, 0)", "parent": 111, "children": [164, 165], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 29}}, {"id": 164, "type": "identifier", "text": "igraph_vector_init", "parent": 163, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 22}}, {"id": 165, "type": "argument_list", "text": "(v1, 0)", "parent": 163, "children": [166, 167], "start_point": {"row": 49, "column": 22}, "end_point": {"row": 49, "column": 29}}, {"id": 166, "type": "identifier", "text": "v1", "parent": 165, "children": [], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 25}}, {"id": 167, "type": "number_literal", "text": "0", "parent": 165, "children": [], "start_point": {"row": 49, "column": 27}, "end_point": {"row": 49, "column": 28}}, {"id": 168, "type": "call_expression", "text": "igraph_vector_init(v2, 0)", "parent": 111, "children": [169, 170], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 29}}, {"id": 169, "type": "identifier", "text": "igraph_vector_init", "parent": 168, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 22}}, {"id": 170, "type": "argument_list", "text": "(v2, 0)", "parent": 168, "children": [171, 172], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 29}}, {"id": 171, "type": "identifier", "text": "v2", "parent": 170, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 25}}, {"id": 172, "type": "number_literal", "text": "0", "parent": 170, "children": [], "start_point": {"row": 50, "column": 27}, "end_point": {"row": 50, "column": 28}}, {"id": 173, "type": "assignment_expression", "text": "VECTOR(resvertices)[i] = v1", "parent": 111, "children": [174, 180, 181], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 31}}, {"id": 174, "type": "subscript_expression", "text": "VECTOR(resvertices)[i]", "parent": 173, "children": [175, 179], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 26}}, {"id": 175, "type": "call_expression", "text": "VECTOR(resvertices)", "parent": 174, "children": [176, 177], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 23}}, {"id": 176, "type": "identifier", "text": "VECTOR", "parent": 175, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 10}}, {"id": 177, "type": "argument_list", "text": "(resvertices)", "parent": 175, "children": [178], "start_point": {"row": 51, "column": 10}, "end_point": {"row": 51, "column": 23}}, {"id": 178, "type": "identifier", "text": "resvertices", "parent": 177, "children": [], "start_point": {"row": 51, "column": 11}, "end_point": {"row": 51, "column": 22}}, {"id": 179, "type": "identifier", "text": "i", "parent": 174, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 25}}, {"id": 180, "type": "=", "text": "=", "parent": 173, "children": [], "start_point": {"row": 51, "column": 27}, "end_point": {"row": 51, "column": 28}}, {"id": 181, "type": "identifier", "text": "v1", "parent": 173, "children": [], "start_point": {"row": 51, "column": 29}, "end_point": {"row": 51, "column": 31}}, {"id": 182, "type": "assignment_expression", "text": "VECTOR(resedges)[i] = v2", "parent": 111, "children": [183, 189, 190], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 28}}, {"id": 183, "type": "subscript_expression", "text": "VECTOR(resedges)[i]", "parent": 182, "children": [184, 188], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 23}}, {"id": 184, "type": "call_expression", "text": "VECTOR(resedges)", "parent": 183, "children": [185, 186], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 20}}, {"id": 185, "type": "identifier", "text": "VECTOR", "parent": 184, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 10}}, {"id": 186, "type": "argument_list", "text": "(resedges)", "parent": 184, "children": [187], "start_point": {"row": 52, "column": 10}, "end_point": {"row": 52, "column": 20}}, {"id": 187, "type": "identifier", "text": "resedges", "parent": 186, "children": [], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 19}}, {"id": 188, "type": "identifier", "text": "i", "parent": 183, "children": [], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 22}}, {"id": 189, "type": "=", "text": "=", "parent": 182, "children": [], "start_point": {"row": 52, "column": 24}, "end_point": {"row": 52, "column": 25}}, {"id": 190, "type": "identifier", "text": "v2", "parent": 182, "children": [], "start_point": {"row": 52, "column": 26}, "end_point": {"row": 52, "column": 28}}, {"id": 191, "type": "call_expression", "text": "igraph_get_shortest_paths(&g, &resvertices, &resedges, /*from=*/ 0, \n\t\t\t /*to=*/ igraph_vss_all(), /*mode=*/ IGRAPH_OUT,\n\t\t\t &predecessors, &inbound_edges)", "parent": 3, "children": [192, 193], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 57, "column": 37}}, {"id": 192, "type": "identifier", "text": "igraph_get_shortest_paths", "parent": 191, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 27}}, {"id": 193, "type": "argument_list", "text": "(&g, &resvertices, &resedges, /*from=*/ 0, \n\t\t\t /*to=*/ igraph_vss_all(), /*mode=*/ IGRAPH_OUT,\n\t\t\t &predecessors, &inbound_edges)", "parent": 191, "children": [194, 196, 198, 200, 201, 204, 205, 207], "start_point": {"row": 55, "column": 27}, "end_point": {"row": 57, "column": 37}}, {"id": 194, "type": "pointer_expression", "text": "&g", "parent": 193, "children": [195], "start_point": {"row": 55, "column": 28}, "end_point": {"row": 55, "column": 30}}, {"id": 195, "type": "identifier", "text": "g", "parent": 194, "children": [], "start_point": {"row": 55, "column": 29}, "end_point": {"row": 55, "column": 30}}, {"id": 196, "type": "pointer_expression", "text": "&resvertices", "parent": 193, "children": [197], "start_point": {"row": 55, "column": 32}, "end_point": {"row": 55, "column": 44}}, {"id": 197, "type": "identifier", "text": "resvertices", "parent": 196, "children": [], "start_point": {"row": 55, "column": 33}, "end_point": {"row": 55, "column": 44}}, {"id": 198, "type": "pointer_expression", "text": "&resedges", "parent": 193, "children": [199], "start_point": {"row": 55, "column": 46}, "end_point": {"row": 55, "column": 55}}, {"id": 199, "type": "identifier", "text": "resedges", "parent": 198, "children": [], "start_point": {"row": 55, "column": 47}, "end_point": {"row": 55, "column": 55}}, {"id": 200, "type": "number_literal", "text": "0", "parent": 193, "children": [], "start_point": {"row": 55, "column": 67}, "end_point": {"row": 55, "column": 68}}, {"id": 201, "type": "call_expression", "text": "igraph_vss_all()", "parent": 193, "children": [202, 203], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 31}}, {"id": 202, "type": "identifier", "text": "igraph_vss_all", "parent": 201, "children": [], "start_point": {"row": 56, "column": 15}, "end_point": {"row": 56, "column": 29}}, {"id": 203, "type": "argument_list", "text": "()", "parent": 201, "children": [], "start_point": {"row": 56, "column": 29}, "end_point": {"row": 56, "column": 31}}, {"id": 204, "type": "identifier", "text": "IGRAPH_OUT", "parent": 193, "children": [], "start_point": {"row": 56, "column": 43}, "end_point": {"row": 56, "column": 53}}, {"id": 205, "type": "pointer_expression", "text": "&predecessors", "parent": 193, "children": [206], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 20}}, {"id": 206, "type": "identifier", "text": "predecessors", "parent": 205, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 20}}, {"id": 207, "type": "pointer_expression", "text": "&inbound_edges", "parent": 193, "children": [208], "start_point": {"row": 57, "column": 22}, "end_point": {"row": 57, "column": 36}}, {"id": 208, "type": "identifier", "text": "inbound_edges", "parent": 207, "children": [], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 36}}, {"id": 209, "type": "for_statement", "text": "for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n printf(\"%i V: \", i); igraph_vector_print(v1);\n printf(\"%i E: \", i); igraph_vector_print(v2);\n }", "parent": 3, "children": [210, 214, 218], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 64, "column": 3}}, {"id": 210, "type": "assignment_expression", "text": "i=0", "parent": 209, "children": [211, 212, 213], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 10}}, {"id": 211, "type": "identifier", "text": "i", "parent": 210, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 8}}, {"id": 212, "type": "=", "text": "=", "parent": 210, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 9}}, {"id": 213, "type": "number_literal", "text": "0", "parent": 210, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 10}}, {"id": 214, "type": "binary_expression", "text": "i<vcount", "parent": 209, "children": [215, 216, 217], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 20}}, {"id": 215, "type": "identifier", "text": "i", "parent": 214, "children": [], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 13}}, {"id": 216, "type": "<", "text": "<", "parent": 214, "children": [], "start_point": {"row": 59, "column": 13}, "end_point": {"row": 59, "column": 14}}, {"id": 217, "type": "identifier", "text": "vcount", "parent": 214, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 20}}, {"id": 218, "type": "update_expression", "text": "i++", "parent": 209, "children": [219, 220], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 25}}, {"id": 219, "type": "identifier", "text": "i", "parent": 218, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 23}}, {"id": 220, "type": "++", "text": "++", "parent": 218, "children": [], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 25}}, {"id": 221, "type": "declaration", "text": "igraph_vector_t *v1=VECTOR(resvertices)[i];", "parent": 209, "children": [222, 223], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 47}}, {"id": 222, "type": "type_identifier", "text": "igraph_vector_t", "parent": 221, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 19}}, {"id": 223, "type": "init_declarator", "text": "*v1=VECTOR(resvertices)[i]", "parent": 221, "children": [224, 227, 228], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 46}}, {"id": 224, "type": "pointer_declarator", "text": "*v1", "parent": 223, "children": [225, 226], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 23}}, {"id": 225, "type": "*", "text": "*", "parent": 224, "children": [], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 60, "column": 21}}, {"id": 226, "type": "identifier", "text": "v1", "parent": 224, "children": [], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 23}}, {"id": 227, "type": "=", "text": "=", "parent": 223, "children": [], "start_point": {"row": 60, "column": 23}, "end_point": {"row": 60, "column": 24}}, {"id": 228, "type": "subscript_expression", "text": "VECTOR(resvertices)[i]", "parent": 223, "children": [229, 233], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 46}}, {"id": 229, "type": "call_expression", "text": "VECTOR(resvertices)", "parent": 228, "children": [230, 231], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 43}}, {"id": 230, "type": "identifier", "text": "VECTOR", "parent": 229, "children": [], "start_point": {"row": 60, "column": 24}, "end_point": {"row": 60, "column": 30}}, {"id": 231, "type": "argument_list", "text": "(resvertices)", "parent": 229, "children": [232], "start_point": {"row": 60, "column": 30}, "end_point": {"row": 60, "column": 43}}, {"id": 232, "type": "identifier", "text": "resvertices", "parent": 231, "children": [], "start_point": {"row": 60, "column": 31}, "end_point": {"row": 60, "column": 42}}, {"id": 233, "type": "identifier", "text": "i", "parent": 228, "children": [], "start_point": {"row": 60, "column": 44}, "end_point": {"row": 60, "column": 45}}, {"id": 234, "type": "declaration", "text": "igraph_vector_t *v2=VECTOR(resedges)[i];", "parent": 209, "children": [235, 236], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 44}}, {"id": 235, "type": "type_identifier", "text": "igraph_vector_t", "parent": 234, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 19}}, {"id": 236, "type": "init_declarator", "text": "*v2=VECTOR(resedges)[i]", "parent": 234, "children": [237, 240, 241], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 43}}, {"id": 237, "type": "pointer_declarator", "text": "*v2", "parent": 236, "children": [238, 239], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 23}}, {"id": 238, "type": "*", "text": "*", "parent": 237, "children": [], "start_point": {"row": 61, "column": 20}, "end_point": {"row": 61, "column": 21}}, {"id": 239, "type": "identifier", "text": "v2", "parent": 237, "children": [], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 23}}, {"id": 240, "type": "=", "text": "=", "parent": 236, "children": [], "start_point": {"row": 61, "column": 23}, "end_point": {"row": 61, "column": 24}}, {"id": 241, "type": "subscript_expression", "text": "VECTOR(resedges)[i]", "parent": 236, "children": [242, 246], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 43}}, {"id": 242, "type": "call_expression", "text": "VECTOR(resedges)", "parent": 241, "children": [243, 244], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 40}}, {"id": 243, "type": "identifier", "text": "VECTOR", "parent": 242, "children": [], "start_point": {"row": 61, "column": 24}, "end_point": {"row": 61, "column": 30}}, {"id": 244, "type": "argument_list", "text": "(resedges)", "parent": 242, "children": [245], "start_point": {"row": 61, "column": 30}, "end_point": {"row": 61, "column": 40}}, {"id": 245, "type": "identifier", "text": "resedges", "parent": 244, "children": [], "start_point": {"row": 61, "column": 31}, "end_point": {"row": 61, "column": 39}}, {"id": 246, "type": "identifier", "text": "i", "parent": 241, "children": [], "start_point": {"row": 61, "column": 41}, "end_point": {"row": 61, "column": 42}}, {"id": 247, "type": "call_expression", "text": "printf(\"%i V: \", i)", "parent": 209, "children": [248, 249], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 23}}, {"id": 248, "type": "identifier", "text": "printf", "parent": 247, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 10}}, {"id": 249, "type": "argument_list", "text": "(\"%i V: \", i)", "parent": 247, "children": [250, 251], "start_point": {"row": 62, "column": 10}, "end_point": {"row": 62, "column": 23}}, {"id": 250, "type": "string_literal", "text": "\"%i V: \"", "parent": 249, "children": [], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 19}}, {"id": 251, "type": "identifier", "text": "i", "parent": 249, "children": [], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 22}}, {"id": 252, "type": "call_expression", "text": "igraph_vector_print(v1)", "parent": 209, "children": [253, 254], "start_point": {"row": 62, "column": 25}, "end_point": {"row": 62, "column": 48}}, {"id": 253, "type": "identifier", "text": "igraph_vector_print", "parent": 252, "children": [], "start_point": {"row": 62, "column": 25}, "end_point": {"row": 62, "column": 44}}, {"id": 254, "type": "argument_list", "text": "(v1)", "parent": 252, "children": [255], "start_point": {"row": 62, "column": 44}, "end_point": {"row": 62, "column": 48}}, {"id": 255, "type": "identifier", "text": "v1", "parent": 254, "children": [], "start_point": {"row": 62, "column": 45}, "end_point": {"row": 62, "column": 47}}, {"id": 256, "type": "call_expression", "text": "printf(\"%i E: \", i)", "parent": 209, "children": [257, 258], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 23}}, {"id": 257, "type": "identifier", "text": "printf", "parent": 256, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 10}}, {"id": 258, "type": "argument_list", "text": "(\"%i E: \", i)", "parent": 256, "children": [259, 260], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 23}}, {"id": 259, "type": "string_literal", "text": "\"%i E: \"", "parent": 258, "children": [], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 19}}, {"id": 260, "type": "identifier", "text": "i", "parent": 258, "children": [], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 22}}, {"id": 261, "type": "call_expression", "text": "igraph_vector_print(v2)", "parent": 209, "children": [262, 263], "start_point": {"row": 63, "column": 25}, "end_point": {"row": 63, "column": 48}}, {"id": 262, "type": "identifier", "text": "igraph_vector_print", "parent": 261, "children": [], "start_point": {"row": 63, "column": 25}, "end_point": {"row": 63, "column": 44}}, {"id": 263, "type": "argument_list", "text": "(v2)", "parent": 261, "children": [264], "start_point": {"row": 63, "column": 44}, "end_point": {"row": 63, "column": 48}}, {"id": 264, "type": "identifier", "text": "v2", "parent": 263, "children": [], "start_point": {"row": 63, "column": 45}, "end_point": {"row": 63, "column": 47}}, {"id": 265, "type": "call_expression", "text": "printf(\"pred: \")", "parent": 3, "children": [266, 267], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 18}}, {"id": 266, "type": "identifier", "text": "printf", "parent": 265, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 8}}, {"id": 267, "type": "argument_list", "text": "(\"pred: \")", "parent": 265, "children": [268], "start_point": {"row": 65, "column": 8}, "end_point": {"row": 65, "column": 18}}, {"id": 268, "type": "string_literal", "text": "\"pred: \"", "parent": 267, "children": [], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 17}}, {"id": 269, "type": "call_expression", "text": "igraph_vector_long_print(&predecessors)", "parent": 3, "children": [270, 271], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 59}}, {"id": 270, "type": "identifier", "text": "igraph_vector_long_print", "parent": 269, "children": [], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 44}}, {"id": 271, "type": "argument_list", "text": "(&predecessors)", "parent": 269, "children": [272], "start_point": {"row": 65, "column": 44}, "end_point": {"row": 65, "column": 59}}, {"id": 272, "type": "pointer_expression", "text": "&predecessors", "parent": 271, "children": [273], "start_point": {"row": 65, "column": 45}, "end_point": {"row": 65, "column": 58}}, {"id": 273, "type": "identifier", "text": "predecessors", "parent": 272, "children": [], "start_point": {"row": 65, "column": 46}, "end_point": {"row": 65, "column": 58}}, {"id": 274, "type": "call_expression", "text": "printf(\"inbe: \")", "parent": 3, "children": [275, 276], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 18}}, {"id": 275, "type": "identifier", "text": "printf", "parent": 274, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 8}}, {"id": 276, "type": "argument_list", "text": "(\"inbe: \")", "parent": 274, "children": [277], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 18}}, {"id": 277, "type": "string_literal", "text": "\"inbe: \"", "parent": 276, "children": [], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 17}}, {"id": 278, "type": "call_expression", "text": "igraph_vector_long_print(&inbound_edges)", "parent": 3, "children": [279, 280], "start_point": {"row": 66, "column": 20}, "end_point": {"row": 66, "column": 60}}, {"id": 279, "type": "identifier", "text": "igraph_vector_long_print", "parent": 278, "children": [], "start_point": {"row": 66, "column": 20}, "end_point": {"row": 66, "column": 44}}, {"id": 280, "type": "argument_list", "text": "(&inbound_edges)", "parent": 278, "children": [281], "start_point": {"row": 66, "column": 44}, "end_point": {"row": 66, "column": 60}}, {"id": 281, "type": "pointer_expression", "text": "&inbound_edges", "parent": 280, "children": [282], "start_point": {"row": 66, "column": 45}, "end_point": {"row": 66, "column": 59}}, {"id": 282, "type": "identifier", "text": "inbound_edges", "parent": 281, "children": [], "start_point": {"row": 66, "column": 46}, "end_point": {"row": 66, "column": 59}}, {"id": 283, "type": "call_expression", "text": "igraph_vector_long_destroy(&inbound_edges)", "parent": 3, "children": [284, 285], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 44}}, {"id": 284, "type": "identifier", "text": "igraph_vector_long_destroy", "parent": 283, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 28}}, {"id": 285, "type": "argument_list", "text": "(&inbound_edges)", "parent": 283, "children": [286], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 44}}, {"id": 286, "type": "pointer_expression", "text": "&inbound_edges", "parent": 285, "children": [287], "start_point": {"row": 68, "column": 29}, "end_point": {"row": 68, "column": 43}}, {"id": 287, "type": "identifier", "text": "inbound_edges", "parent": 286, "children": [], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 43}}, {"id": 288, "type": "call_expression", "text": "igraph_vector_long_destroy(&predecessors)", "parent": 3, "children": [289, 290], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 43}}, {"id": 289, "type": "identifier", "text": "igraph_vector_long_destroy", "parent": 288, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 28}}, {"id": 290, "type": "argument_list", "text": "(&predecessors)", "parent": 288, "children": [291], "start_point": {"row": 69, "column": 28}, "end_point": {"row": 69, "column": 43}}, {"id": 291, "type": "pointer_expression", "text": "&predecessors", "parent": 290, "children": [292], "start_point": {"row": 69, "column": 29}, "end_point": {"row": 69, "column": 42}}, {"id": 292, "type": "identifier", "text": "predecessors", "parent": 291, "children": [], "start_point": {"row": 69, "column": 30}, "end_point": {"row": 69, "column": 42}}, {"id": 293, "type": "for_statement", "text": "for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n igraph_vector_destroy(v1);\n igraph_vector_destroy(v2);\n igraph_free(v1);\n igraph_free(v2);\n }", "parent": 3, "children": [294, 298, 302], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 77, "column": 3}}, {"id": 294, "type": "assignment_expression", "text": "i=0", "parent": 293, "children": [295, 296, 297], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 10}}, {"id": 295, "type": "identifier", "text": "i", "parent": 294, "children": [], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 8}}, {"id": 296, "type": "=", "text": "=", "parent": 294, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 9}}, {"id": 297, "type": "number_literal", "text": "0", "parent": 294, "children": [], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 10}}, {"id": 298, "type": "binary_expression", "text": "i<vcount", "parent": 293, "children": [299, 300, 301], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 20}}, {"id": 299, "type": "identifier", "text": "i", "parent": 298, "children": [], "start_point": {"row": 70, "column": 12}, "end_point": {"row": 70, "column": 13}}, {"id": 300, "type": "<", "text": "<", "parent": 298, "children": [], "start_point": {"row": 70, "column": 13}, "end_point": {"row": 70, "column": 14}}, {"id": 301, "type": "identifier", "text": "vcount", "parent": 298, "children": [], "start_point": {"row": 70, "column": 14}, "end_point": {"row": 70, "column": 20}}, {"id": 302, "type": "update_expression", "text": "i++", "parent": 293, "children": [303, 304], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 25}}, {"id": 303, "type": "identifier", "text": "i", "parent": 302, "children": [], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 23}}, {"id": 304, "type": "++", "text": "++", "parent": 302, "children": [], "start_point": {"row": 70, "column": 23}, "end_point": {"row": 70, "column": 25}}, {"id": 305, "type": "declaration", "text": "igraph_vector_t *v1=VECTOR(resvertices)[i];", "parent": 293, "children": [306, 307], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 47}}, {"id": 306, "type": "type_identifier", "text": "igraph_vector_t", "parent": 305, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 19}}, {"id": 307, "type": "init_declarator", "text": "*v1=VECTOR(resvertices)[i]", "parent": 305, "children": [308, 311, 312], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 46}}, {"id": 308, "type": "pointer_declarator", "text": "*v1", "parent": 307, "children": [309, 310], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 23}}, {"id": 309, "type": "*", "text": "*", "parent": 308, "children": [], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 21}}, {"id": 310, "type": "identifier", "text": "v1", "parent": 308, "children": [], "start_point": {"row": 71, "column": 21}, "end_point": {"row": 71, "column": 23}}, {"id": 311, "type": "=", "text": "=", "parent": 307, "children": [], "start_point": {"row": 71, "column": 23}, "end_point": {"row": 71, "column": 24}}, {"id": 312, "type": "subscript_expression", "text": "VECTOR(resvertices)[i]", "parent": 307, "children": [313, 317], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 46}}, {"id": 313, "type": "call_expression", "text": "VECTOR(resvertices)", "parent": 312, "children": [314, 315], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 43}}, {"id": 314, "type": "identifier", "text": "VECTOR", "parent": 313, "children": [], "start_point": {"row": 71, "column": 24}, "end_point": {"row": 71, "column": 30}}, {"id": 315, "type": "argument_list", "text": "(resvertices)", "parent": 313, "children": [316], "start_point": {"row": 71, "column": 30}, "end_point": {"row": 71, "column": 43}}, {"id": 316, "type": "identifier", "text": "resvertices", "parent": 315, "children": [], "start_point": {"row": 71, "column": 31}, "end_point": {"row": 71, "column": 42}}, {"id": 317, "type": "identifier", "text": "i", "parent": 312, "children": [], "start_point": {"row": 71, "column": 44}, "end_point": {"row": 71, "column": 45}}, {"id": 318, "type": "declaration", "text": "igraph_vector_t *v2=VECTOR(resedges)[i];", "parent": 293, "children": [319, 320], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 44}}, {"id": 319, "type": "type_identifier", "text": "igraph_vector_t", "parent": 318, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 19}}, {"id": 320, "type": "init_declarator", "text": "*v2=VECTOR(resedges)[i]", "parent": 318, "children": [321, 324, 325], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 43}}, {"id": 321, "type": "pointer_declarator", "text": "*v2", "parent": 320, "children": [322, 323], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 23}}, {"id": 322, "type": "*", "text": "*", "parent": 321, "children": [], "start_point": {"row": 72, "column": 20}, "end_point": {"row": 72, "column": 21}}, {"id": 323, "type": "identifier", "text": "v2", "parent": 321, "children": [], "start_point": {"row": 72, "column": 21}, "end_point": {"row": 72, "column": 23}}, {"id": 324, "type": "=", "text": "=", "parent": 320, "children": [], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 24}}, {"id": 325, "type": "subscript_expression", "text": "VECTOR(resedges)[i]", "parent": 320, "children": [326, 330], "start_point": {"row": 72, "column": 24}, "end_point": {"row": 72, "column": 43}}, {"id": 326, "type": "call_expression", "text": "VECTOR(resedges)", "parent": 325, "children": [327, 328], "start_point": {"row": 72, "column": 24}, "end_point": {"row": 72, "column": 40}}, {"id": 327, "type": "identifier", "text": "VECTOR", "parent": 326, "children": [], "start_point": {"row": 72, "column": 24}, "end_point": {"row": 72, "column": 30}}, {"id": 328, "type": "argument_list", "text": "(resedges)", "parent": 326, "children": [329], "start_point": {"row": 72, "column": 30}, "end_point": {"row": 72, "column": 40}}, {"id": 329, "type": "identifier", "text": "resedges", "parent": 328, "children": [], "start_point": {"row": 72, "column": 31}, "end_point": {"row": 72, "column": 39}}, {"id": 330, "type": "identifier", "text": "i", "parent": 325, "children": [], "start_point": {"row": 72, "column": 41}, "end_point": {"row": 72, "column": 42}}, {"id": 331, "type": "call_expression", "text": "igraph_vector_destroy(v1)", "parent": 293, "children": [332, 333], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 29}}, {"id": 332, "type": "identifier", "text": "igraph_vector_destroy", "parent": 331, "children": [], "start_point": {"row": 73, "column": 4}, "end_point": {"row": 73, "column": 25}}, {"id": 333, "type": "argument_list", "text": "(v1)", "parent": 331, "children": [334], "start_point": {"row": 73, "column": 25}, "end_point": {"row": 73, "column": 29}}, {"id": 334, "type": "identifier", "text": "v1", "parent": 333, "children": [], "start_point": {"row": 73, "column": 26}, "end_point": {"row": 73, "column": 28}}, {"id": 335, "type": "call_expression", "text": "igraph_vector_destroy(v2)", "parent": 293, "children": [336, 337], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 29}}, {"id": 336, "type": "identifier", "text": "igraph_vector_destroy", "parent": 335, "children": [], "start_point": {"row": 74, "column": 4}, "end_point": {"row": 74, "column": 25}}, {"id": 337, "type": "argument_list", "text": "(v2)", "parent": 335, "children": [338], "start_point": {"row": 74, "column": 25}, "end_point": {"row": 74, "column": 29}}, {"id": 338, "type": "identifier", "text": "v2", "parent": 337, "children": [], "start_point": {"row": 74, "column": 26}, "end_point": {"row": 74, "column": 28}}, {"id": 339, "type": "call_expression", "text": "igraph_free(v1)", "parent": 293, "children": [340, 341], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 19}}, {"id": 340, "type": "identifier", "text": "igraph_free", "parent": 339, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 15}}, {"id": 341, "type": "argument_list", "text": "(v1)", "parent": 339, "children": [342], "start_point": {"row": 75, "column": 15}, "end_point": {"row": 75, "column": 19}}, {"id": 342, "type": "identifier", "text": "v1", "parent": 341, "children": [], "start_point": {"row": 75, "column": 16}, "end_point": {"row": 75, "column": 18}}, {"id": 343, "type": "call_expression", "text": "igraph_free(v2)", "parent": 293, "children": [344, 345], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 19}}, {"id": 344, "type": "identifier", "text": "igraph_free", "parent": 343, "children": [], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 15}}, {"id": 345, "type": "argument_list", "text": "(v2)", "parent": 343, "children": [346], "start_point": {"row": 76, "column": 15}, "end_point": {"row": 76, "column": 19}}, {"id": 346, "type": "identifier", "text": "v2", "parent": 345, "children": [], "start_point": {"row": 76, "column": 16}, "end_point": {"row": 76, "column": 18}}, {"id": 347, "type": "call_expression", "text": "igraph_vector_ptr_destroy(&resedges)", "parent": 3, "children": [348, 349], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 38}}, {"id": 348, "type": "identifier", "text": "igraph_vector_ptr_destroy", "parent": 347, "children": [], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 27}}, {"id": 349, "type": "argument_list", "text": "(&resedges)", "parent": 347, "children": [350], "start_point": {"row": 78, "column": 27}, "end_point": {"row": 78, "column": 38}}, {"id": 350, "type": "pointer_expression", "text": "&resedges", "parent": 349, "children": [351], "start_point": {"row": 78, "column": 28}, "end_point": {"row": 78, "column": 37}}, {"id": 351, "type": "identifier", "text": "resedges", "parent": 350, "children": [], "start_point": {"row": 78, "column": 29}, "end_point": {"row": 78, "column": 37}}, {"id": 352, "type": "call_expression", "text": "igraph_vector_ptr_destroy(&resvertices)", "parent": 3, "children": [353, 354], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 41}}, {"id": 353, "type": "identifier", "text": "igraph_vector_ptr_destroy", "parent": 352, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 27}}, {"id": 354, "type": "argument_list", "text": "(&resvertices)", "parent": 352, "children": [355], "start_point": {"row": 79, "column": 27}, "end_point": {"row": 79, "column": 41}}, {"id": 355, "type": "pointer_expression", "text": "&resvertices", "parent": 354, "children": [356], "start_point": {"row": 79, "column": 28}, "end_point": {"row": 79, "column": 40}}, {"id": 356, "type": "identifier", "text": "resvertices", "parent": 355, "children": [], "start_point": {"row": 79, "column": 29}, "end_point": {"row": 79, "column": 40}}, {"id": 357, "type": "call_expression", "text": "igraph_destroy(&g)", "parent": 3, "children": [358, 359], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 20}}, {"id": 358, "type": "identifier", "text": "igraph_destroy", "parent": 357, "children": [], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 16}}, {"id": 359, "type": "argument_list", "text": "(&g)", "parent": 357, "children": [360], "start_point": {"row": 80, "column": 16}, "end_point": {"row": 80, "column": 20}}, {"id": 360, "type": "pointer_expression", "text": "&g", "parent": 359, "children": [361], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 19}}, {"id": 361, "type": "identifier", "text": "g", "parent": 360, "children": [], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 19}}, {"id": 362, "type": "return_statement", "text": "return 0;", "parent": 3, "children": [363], "start_point": {"row": 82, "column": 2}, "end_point": {"row": 82, "column": 11}}, {"id": 363, "type": "number_literal", "text": "0", "parent": 362, "children": [], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 10}}]}, "node_categories": {"declarations": {"functions": [3, 5], "variables": [8, 35, 38, 41, 45, 49, 123, 136, 221, 234, 305, 318], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [53, 56, 59, 60, 61, 64, 65, 70, 71, 74, 78, 81, 83, 87, 90, 93, 96, 99, 102, 105, 108, 116, 120, 130, 133, 134, 143, 146, 147, 150, 151, 152, 156, 159, 163, 168, 174, 175, 183, 184, 191, 194, 196, 198, 201, 205, 207, 214, 218, 228, 229, 241, 242, 247, 252, 256, 261, 265, 269, 272, 274, 278, 281, 283, 286, 288, 291, 298, 302, 312, 313, 325, 326, 331, 335, 339, 343, 347, 350, 352, 355, 357, 360], "assignments": [67, 112, 173, 182, 210, 294], "loops": [111, 209, 293], "conditionals": [6, 9, 12, 36, 37, 39, 40, 42, 43, 44, 46, 47, 48, 51, 52, 54, 57, 58, 62, 66, 68, 72, 75, 79, 82, 84, 85, 86, 88, 91, 92, 94, 97, 98, 100, 103, 106, 109, 113, 117, 119, 121, 124, 128, 131, 135, 137, 141, 144, 148, 149, 154, 158, 160, 164, 166, 169, 171, 176, 178, 179, 181, 185, 187, 188, 190, 192, 195, 197, 199, 202, 204, 206, 208, 211, 215, 217, 219, 222, 226, 230, 232, 233, 235, 239, 243, 245, 246, 248, 251, 253, 255, 257, 260, 262, 264, 266, 270, 273, 275, 279, 282, 284, 287, 289, 292, 295, 299, 301, 303, 306, 310, 314, 316, 317, 319, 323, 327, 329, 330, 332, 334, 336, 338, 340, 342, 344, 346, 348, 351, 353, 356, 358, 361], "returns": [362], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 77, 104, 110, 115, 162, 167, 172, 200, 213, 250, 259, 268, 277, 297, 363], "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 const igraph_real_t edges[] = { 0,1, 0,2, 1,6, 2,6, 1,3, 1,4, 1,5,\n\t\t\t\t 3,2, 4,2, 5,"}, {"node_id": 5, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <igraph.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/* -*- mode: C -*- */\n/* \n IGraph library.\n Copyright (C) 2012 <NAME> <<EMAIL>>\n 334 Harvard st, Cambridge MA, 02139 USA\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 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,\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, write to the Free Software\n Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA \n 02110-1301 USA\n\n*/\n\n#include <igraph.h>\n\nint main() {\n const igraph_real_t edges[] = { 0,1, 0,2, 1,6, 2,6, 1,3, 1,4, 1,5,\n\t\t\t\t 3,2, 4,2, 5,2 };\n igraph_t g;\n igraph_vector_t edgev;\n igraph_vector_ptr_t resvertices, resedges;\n igraph_vector_long_t predecessors, inbound_edges;\n int vcount, i;\n \n igraph_vector_view(&edgev, edges, sizeof(edges)/sizeof(igraph_real_t));\n vcount=igraph_vector_max(&edgev)+1;\n igraph_create(&g, &edgev, vcount, IGRAPH_DIRECTED);\n \n igraph_vector_ptr_init(&resvertices, vcount);\n igraph_vector_ptr_init(&resedges, vcount);\n igraph_vector_long_init(&predecessors, 0);\n igraph_vector_long_init(&inbound_edges, 0);\n \n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=malloc(sizeof(igraph_vector_t));\n igraph_vector_t *v2=malloc(sizeof(igraph_vector_t));\n if (!v1 || !v2) { \n exit(2);\n }\n igraph_vector_init(v1, 0);\n igraph_vector_init(v2, 0);\n VECTOR(resvertices)[i] = v1;\n VECTOR(resedges)[i] = v2;\n }\n\n igraph_get_shortest_paths(&g, &resvertices, &resedges, /*from=*/ 0, \n\t\t\t /*to=*/ igraph_vss_all(), /*mode=*/ IGRAPH_OUT,\n\t\t\t &predecessors, &inbound_edges);\n\n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n printf(\"%i V: \", i); igraph_vector_print(v1);\n printf(\"%i E: \", i); igraph_vector_print(v2);\n }\n printf(\"pred: \"); igraph_vector_long_print(&predecessors);\n printf(\"inbe: \"); igraph_vector_long_print(&inbound_edges);\n\n igraph_vector_long_destroy(&inbound_edges);\n igraph_vector_long_destroy(&predecessors);\n for (i=0; i<vcount; i++) {\n igraph_vector_t *v1=VECTOR(resvertices)[i];\n igraph_vector_t *v2=VECTOR(resedges)[i];\n igraph_vector_destroy(v1);\n igraph_vector_destroy(v2);\n igraph_free(v1);\n igraph_free(v2);\n }\n igraph_vector_ptr_destroy(&resedges);\n igraph_vector_ptr_destroy(&resvertices);\n igraph_destroy(&g);\n\n return 0;\n}\n"}
62
c
/* See license.txt for license information. */ #ifndef ACCEL_SENSOR_H #define ACCEL_SENSOR_H // these bit definitions are specific to WISP 4.1 DL #define SENSOR_DATA_TYPE_ID 0x0D #define ACCEL_ENABLE_BIT BIT5 // 1.5 #define SET_ACCEL_ENABLE_DIR P1DIR |= ACCEL_ENABLE_BIT #define CLEAR_ACCEL_ENABLE_DIR P1DIR &= ~ACCEL_ENABLE_BIT #define TURN_ON_ACCEL_ENABLE P1OUT |= ACCEL_ENABLE_BIT #define TURN_OFF_ACCEL_ENABLE P1OUT &= ~ACCEL_ENABLE_BIT #define X_INCH INCH_2 // A2 #define Y_INCH INCH_1 // A1 #define Z_INCH INCH_0 // A0 #define DATA_LENGTH_IN_WORDS 3 #define DATA_LENGTH_IN_BYTES (DATA_LENGTH_IN_WORDS*2) #define CHECK_FOR_GOOD_VOLTAGE 0 #define DEBUG_BAD_SAMPLES 0 #if DEBUG_BAD_SAMPLES extern short lastx, lasty, lastz; extern short x, y, z; extern short diff; #endif #endif // ACCEL_SENSOR_H
38.78
23
(translation_unit) "/* See license.txt for license information. */\n\n#ifndef ACCEL_SENSOR_H\n#define ACCEL_SENSOR_H\n\n// these bit definitions are specific to WISP 4.1 DL\n\n#define SENSOR_DATA_TYPE_ID 0x0D\n\n#define ACCEL_ENABLE_BIT BIT5 // 1.5\n#define SET_ACCEL_ENABLE_DIR P1DIR |= ACCEL_ENABLE_BIT\n#define CLEAR_ACCEL_ENABLE_DIR P1DIR &= ~ACCEL_ENABLE_BIT\n#define TURN_ON_ACCEL_ENABLE P1OUT |= ACCEL_ENABLE_BIT\n#define TURN_OFF_ACCEL_ENABLE P1OUT &= ~ACCEL_ENABLE_BIT\n\n#define X_INCH INCH_2 // A2\n#define Y_INCH INCH_1 // A1\n#define Z_INCH INCH_0 // A0\n\n#define DATA_LENGTH_IN_WORDS 3\n#define DATA_LENGTH_IN_BYTES (DATA_LENGTH_IN_WORDS*2)\n\n#define CHECK_FOR_GOOD_VOLTAGE 0\n#define DEBUG_BAD_SAMPLES 0\n#if DEBUG_BAD_SAMPLES\nextern short lastx, lasty, lastz;\nextern short x, y, z;\nextern short diff;\n#endif\n\n#endif // ACCEL_SENSOR_H\n" (comment) "/* See license.txt for license information. */" (preproc_ifdef) "#ifndef ACCEL_SENSOR_H\n#define ACCEL_SENSOR_H\n\n// these bit definitions are specific to WISP 4.1 DL\n\n#define SENSOR_DATA_TYPE_ID 0x0D\n\n#define ACCEL_ENABLE_BIT BIT5 // 1.5\n#define SET_ACCEL_ENABLE_DIR P1DIR |= ACCEL_ENABLE_BIT\n#define CLEAR_ACCEL_ENABLE_DIR P1DIR &= ~ACCEL_ENABLE_BIT\n#define TURN_ON_ACCEL_ENABLE P1OUT |= ACCEL_ENABLE_BIT\n#define TURN_OFF_ACCEL_ENABLE P1OUT &= ~ACCEL_ENABLE_BIT\n\n#define X_INCH INCH_2 // A2\n#define Y_INCH INCH_1 // A1\n#define Z_INCH INCH_0 // A0\n\n#define DATA_LENGTH_IN_WORDS 3\n#define DATA_LENGTH_IN_BYTES (DATA_LENGTH_IN_WORDS*2)\n\n#define CHECK_FOR_GOOD_VOLTAGE 0\n#define DEBUG_BAD_SAMPLES 0\n#if DEBUG_BAD_SAMPLES\nextern short lastx, lasty, lastz;\nextern short x, y, z;\nextern short diff;\n#endif\n\n#endif" (#ifndef) "#ifndef" (identifier) "ACCEL_SENSOR_H" (preproc_def) "#define ACCEL_SENSOR_H\n" (#define) "#define" (identifier) "ACCEL_SENSOR_H" (comment) "// these bit definitions are specific to WISP 4.1 DL" (preproc_def) "#define SENSOR_DATA_TYPE_ID 0x0D\n" (#define) "#define" (identifier) "SENSOR_DATA_TYPE_ID" (preproc_arg) "0x0D" (preproc_def) "#define ACCEL_ENABLE_BIT BIT5 // 1.5\n" (#define) "#define" (identifier) "ACCEL_ENABLE_BIT" (preproc_arg) "BIT5 // 1.5" (preproc_def) "#define SET_ACCEL_ENABLE_DIR P1DIR |= ACCEL_ENABLE_BIT\n" (#define) "#define" (identifier) "SET_ACCEL_ENABLE_DIR" (preproc_arg) "P1DIR |= ACCEL_ENABLE_BIT" (preproc_def) "#define CLEAR_ACCEL_ENABLE_DIR P1DIR &= ~ACCEL_ENABLE_BIT\n" (#define) "#define" (identifier) "CLEAR_ACCEL_ENABLE_DIR" (preproc_arg) "P1DIR &= ~ACCEL_ENABLE_BIT" (preproc_def) "#define TURN_ON_ACCEL_ENABLE P1OUT |= ACCEL_ENABLE_BIT\n" (#define) "#define" (identifier) "TURN_ON_ACCEL_ENABLE" (preproc_arg) "P1OUT |= ACCEL_ENABLE_BIT" (preproc_def) "#define TURN_OFF_ACCEL_ENABLE P1OUT &= ~ACCEL_ENABLE_BIT\n" (#define) "#define" (identifier) "TURN_OFF_ACCEL_ENABLE" (preproc_arg) "P1OUT &= ~ACCEL_ENABLE_BIT" (preproc_def) "#define X_INCH INCH_2 // A2\n" (#define) "#define" (identifier) "X_INCH" (preproc_arg) "INCH_2 // A2" (preproc_def) "#define Y_INCH INCH_1 // A1\n" (#define) "#define" (identifier) "Y_INCH" (preproc_arg) "INCH_1 // A1" (preproc_def) "#define Z_INCH INCH_0 // A0\n" (#define) "#define" (identifier) "Z_INCH" (preproc_arg) "INCH_0 // A0" (preproc_def) "#define DATA_LENGTH_IN_WORDS 3\n" (#define) "#define" (identifier) "DATA_LENGTH_IN_WORDS" (preproc_arg) "3" (preproc_def) "#define DATA_LENGTH_IN_BYTES (DATA_LENGTH_IN_WORDS*2)\n" (#define) "#define" (identifier) "DATA_LENGTH_IN_BYTES" (preproc_arg) "(DATA_LENGTH_IN_WORDS*2)" (preproc_def) "#define CHECK_FOR_GOOD_VOLTAGE 0\n" (#define) "#define" (identifier) "CHECK_FOR_GOOD_VOLTAGE" (preproc_arg) "0" (preproc_def) "#define DEBUG_BAD_SAMPLES 0\n" (#define) "#define" (identifier) "DEBUG_BAD_SAMPLES" (preproc_arg) "0" (preproc_if) "#if DEBUG_BAD_SAMPLES\nextern short lastx, lasty, lastz;\nextern short x, y, z;\nextern short diff;\n#endif" (#if) "#if" (identifier) "DEBUG_BAD_SAMPLES" ( ) "\n" (declaration) "extern short lastx, lasty, lastz;" (storage_class_specifier) "extern" (extern) "extern" (sized_type_specifier) "short" (short) "short" (identifier) "lastx" (,) "," (identifier) "lasty" (,) "," (identifier) "lastz" (;) ";" (declaration) "extern short x, y, z;" (storage_class_specifier) "extern" (extern) "extern" (sized_type_specifier) "short" (short) "short" (identifier) "x" (,) "," (identifier) "y" (,) "," (identifier) "z" (;) ";" (declaration) "extern short diff;" (storage_class_specifier) "extern" (extern) "extern" (sized_type_specifier) "short" (short) "short" (identifier) "diff" (;) ";" (#endif) "#endif" (#endif) "#endif" (comment) "// ACCEL_SENSOR_H"
97
0
{"language": "c", "success": true, "metadata": {"lines": 23, "avg_line_length": 38.78, "nodes": 86, "errors": 0, "source_hash": "2122d6518d5a6524c024f1f2addd3e9e9f5ed3dd67891c4ceef93375c97461b7", "categorized_nodes": 38}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef ACCEL_SENSOR_H\n#define ACCEL_SENSOR_H\n\n// these bit definitions are specific to WISP 4.1 DL\n\n#define SENSOR_DATA_TYPE_ID 0x0D\n\n#define ACCEL_ENABLE_BIT BIT5 // 1.5\n#define SET_ACCEL_ENABLE_DIR P1DIR |= ACCEL_ENABLE_BIT\n#define CLEAR_ACCEL_ENABLE_DIR P1DIR &= ~ACCEL_ENABLE_BIT\n#define TURN_ON_ACCEL_ENABLE P1OUT |= ACCEL_ENABLE_BIT\n#define TURN_OFF_ACCEL_ENABLE P1OUT &= ~ACCEL_ENABLE_BIT\n\n#define X_INCH INCH_2 // A2\n#define Y_INCH INCH_1 // A1\n#define Z_INCH INCH_0 // A0\n\n#define DATA_LENGTH_IN_WORDS 3\n#define DATA_LENGTH_IN_BYTES (DATA_LENGTH_IN_WORDS*2)\n\n#define CHECK_FOR_GOOD_VOLTAGE 0\n#define DEBUG_BAD_SAMPLES 0\n#if DEBUG_BAD_SAMPLES\nextern short lastx, lasty, lastz;\nextern short x, y, z;\nextern short diff;\n#endif\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 85], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 30, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 2, "type": "identifier", "text": "ACCEL_SENSOR_H", "parent": 0, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 22}}, {"id": 3, "type": "preproc_def", "text": "#define ACCEL_SENSOR_H\n", "parent": 0, "children": [4, 5], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 5, "type": "identifier", "text": "ACCEL_SENSOR_H", "parent": 3, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 22}}, {"id": 6, "type": "preproc_def", "text": "#define SENSOR_DATA_TYPE_ID 0x0D\n", "parent": 0, "children": [7, 8, 9], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 8, "type": "identifier", "text": "SENSOR_DATA_TYPE_ID", "parent": 6, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 27}}, {"id": 9, "type": "preproc_arg", "text": "0x0D", "parent": 6, "children": [], "start_point": {"row": 7, "column": 34}, "end_point": {"row": 7, "column": 38}}, {"id": 10, "type": "preproc_def", "text": "#define ACCEL_ENABLE_BIT BIT5 // 1.5\n", "parent": 0, "children": [11, 12, 13], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 11, "type": "#define", "text": "#define", "parent": 10, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 7}}, {"id": 12, "type": "identifier", "text": "ACCEL_ENABLE_BIT", "parent": 10, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 24}}, {"id": 13, "type": "preproc_arg", "text": "BIT5 // 1.5", "parent": 10, "children": [], "start_point": {"row": 9, "column": 34}, "end_point": {"row": 9, "column": 47}}, {"id": 14, "type": "preproc_def", "text": "#define SET_ACCEL_ENABLE_DIR P1DIR |= ACCEL_ENABLE_BIT\n", "parent": 0, "children": [15, 16, 17], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 15, "type": "#define", "text": "#define", "parent": 14, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 16, "type": "identifier", "text": "SET_ACCEL_ENABLE_DIR", "parent": 14, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 28}}, {"id": 17, "type": "preproc_arg", "text": "P1DIR |= ACCEL_ENABLE_BIT", "parent": 14, "children": [], "start_point": {"row": 10, "column": 34}, "end_point": {"row": 10, "column": 59}}, {"id": 18, "type": "preproc_def", "text": "#define CLEAR_ACCEL_ENABLE_DIR P1DIR &= ~ACCEL_ENABLE_BIT\n", "parent": 0, "children": [19, 20, 21], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 19, "type": "#define", "text": "#define", "parent": 18, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 20, "type": "identifier", "text": "CLEAR_ACCEL_ENABLE_DIR", "parent": 18, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 30}}, {"id": 21, "type": "preproc_arg", "text": "P1DIR &= ~ACCEL_ENABLE_BIT", "parent": 18, "children": [], "start_point": {"row": 11, "column": 34}, "end_point": {"row": 11, "column": 60}}, {"id": 22, "type": "preproc_def", "text": "#define TURN_ON_ACCEL_ENABLE P1OUT |= ACCEL_ENABLE_BIT\n", "parent": 0, "children": [23, 24, 25], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 23, "type": "#define", "text": "#define", "parent": 22, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 24, "type": "identifier", "text": "TURN_ON_ACCEL_ENABLE", "parent": 22, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 28}}, {"id": 25, "type": "preproc_arg", "text": "P1OUT |= ACCEL_ENABLE_BIT", "parent": 22, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 59}}, {"id": 26, "type": "preproc_def", "text": "#define TURN_OFF_ACCEL_ENABLE P1OUT &= ~ACCEL_ENABLE_BIT\n", "parent": 0, "children": [27, 28, 29], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 27, "type": "#define", "text": "#define", "parent": 26, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 28, "type": "identifier", "text": "TURN_OFF_ACCEL_ENABLE", "parent": 26, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 29}}, {"id": 29, "type": "preproc_arg", "text": "P1OUT &= ~ACCEL_ENABLE_BIT", "parent": 26, "children": [], "start_point": {"row": 13, "column": 34}, "end_point": {"row": 13, "column": 60}}, {"id": 30, "type": "preproc_def", "text": "#define X_INCH INCH_2 // A2\n", "parent": 0, "children": [31, 32, 33], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 31, "type": "#define", "text": "#define", "parent": 30, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 32, "type": "identifier", "text": "X_INCH", "parent": 30, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 14}}, {"id": 33, "type": "preproc_arg", "text": "INCH_2 // A2", "parent": 30, "children": [], "start_point": {"row": 15, "column": 34}, "end_point": {"row": 15, "column": 47}}, {"id": 34, "type": "preproc_def", "text": "#define Y_INCH INCH_1 // A1\n", "parent": 0, "children": [35, 36, 37], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 35, "type": "#define", "text": "#define", "parent": 34, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 36, "type": "identifier", "text": "Y_INCH", "parent": 34, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 14}}, {"id": 37, "type": "preproc_arg", "text": "INCH_1 // A1", "parent": 34, "children": [], "start_point": {"row": 16, "column": 34}, "end_point": {"row": 16, "column": 47}}, {"id": 38, "type": "preproc_def", "text": "#define Z_INCH INCH_0 // A0\n", "parent": 0, "children": [39, 40, 41], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 39, "type": "#define", "text": "#define", "parent": 38, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 7}}, {"id": 40, "type": "identifier", "text": "Z_INCH", "parent": 38, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 14}}, {"id": 41, "type": "preproc_arg", "text": "INCH_0 // A0", "parent": 38, "children": [], "start_point": {"row": 17, "column": 34}, "end_point": {"row": 17, "column": 47}}, {"id": 42, "type": "preproc_def", "text": "#define DATA_LENGTH_IN_WORDS 3\n", "parent": 0, "children": [43, 44, 45], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 43, "type": "#define", "text": "#define", "parent": 42, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 44, "type": "identifier", "text": "DATA_LENGTH_IN_WORDS", "parent": 42, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 28}}, {"id": 45, "type": "preproc_arg", "text": "3", "parent": 42, "children": [], "start_point": {"row": 19, "column": 34}, "end_point": {"row": 19, "column": 35}}, {"id": 46, "type": "preproc_def", "text": "#define DATA_LENGTH_IN_BYTES (DATA_LENGTH_IN_WORDS*2)\n", "parent": 0, "children": [47, 48, 49], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 47, "type": "#define", "text": "#define", "parent": 46, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 48, "type": "identifier", "text": "DATA_LENGTH_IN_BYTES", "parent": 46, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 28}}, {"id": 49, "type": "preproc_arg", "text": "(DATA_LENGTH_IN_WORDS*2)", "parent": 46, "children": [], "start_point": {"row": 20, "column": 34}, "end_point": {"row": 20, "column": 58}}, {"id": 50, "type": "preproc_def", "text": "#define CHECK_FOR_GOOD_VOLTAGE 0\n", "parent": 0, "children": [51, 52, 53], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 51, "type": "#define", "text": "#define", "parent": 50, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 52, "type": "identifier", "text": "CHECK_FOR_GOOD_VOLTAGE", "parent": 50, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 30}}, {"id": 53, "type": "preproc_arg", "text": "0", "parent": 50, "children": [], "start_point": {"row": 22, "column": 34}, "end_point": {"row": 22, "column": 35}}, {"id": 54, "type": "preproc_def", "text": "#define DEBUG_BAD_SAMPLES 0\n", "parent": 0, "children": [55, 56, 57], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 55, "type": "#define", "text": "#define", "parent": 54, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 56, "type": "identifier", "text": "DEBUG_BAD_SAMPLES", "parent": 54, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 25}}, {"id": 57, "type": "preproc_arg", "text": "0", "parent": 54, "children": [], "start_point": {"row": 23, "column": 34}, "end_point": {"row": 23, "column": 35}}, {"id": 58, "type": "preproc_if", "text": "#if DEBUG_BAD_SAMPLES\nextern short lastx, lasty, lastz;\nextern short x, y, z;\nextern short diff;\n#endif", "parent": 0, "children": [59, 60, 61, 62, 70, 78, 84], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 59, "type": "#if", "text": "#if", "parent": 58, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 3}}, {"id": 60, "type": "identifier", "text": "DEBUG_BAD_SAMPLES", "parent": 58, "children": [], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 24, "column": 21}}, {"id": 61, "type": "\n", "text": "\n", "parent": 58, "children": [], "start_point": {"row": 24, "column": 21}, "end_point": {"row": 25, "column": 0}}, {"id": 62, "type": "declaration", "text": "extern short lastx, lasty, lastz;", "parent": 58, "children": [63, 65, 67, 68, 69], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 33}}, {"id": 63, "type": "storage_class_specifier", "text": "extern", "parent": 62, "children": [64], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 64, "type": "extern", "text": "extern", "parent": 63, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 65, "type": "sized_type_specifier", "text": "short", "parent": 62, "children": [66], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 12}}, {"id": 66, "type": "short", "text": "short", "parent": 65, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 12}}, {"id": 67, "type": "identifier", "text": "lastx", "parent": 62, "children": [], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 18}}, {"id": 68, "type": "identifier", "text": "lasty", "parent": 62, "children": [], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 25}}, {"id": 69, "type": "identifier", "text": "lastz", "parent": 62, "children": [], "start_point": {"row": 25, "column": 27}, "end_point": {"row": 25, "column": 32}}, {"id": 70, "type": "declaration", "text": "extern short x, y, z;", "parent": 58, "children": [71, 73, 75, 76, 77], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 21}}, {"id": 71, "type": "storage_class_specifier", "text": "extern", "parent": 70, "children": [72], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 72, "type": "extern", "text": "extern", "parent": 71, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 6}}, {"id": 73, "type": "sized_type_specifier", "text": "short", "parent": 70, "children": [74], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 12}}, {"id": 74, "type": "short", "text": "short", "parent": 73, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 12}}, {"id": 75, "type": "identifier", "text": "x", "parent": 70, "children": [], "start_point": {"row": 26, "column": 13}, "end_point": {"row": 26, "column": 14}}, {"id": 76, "type": "identifier", "text": "y", "parent": 70, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 17}}, {"id": 77, "type": "identifier", "text": "z", "parent": 70, "children": [], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 20}}, {"id": 78, "type": "declaration", "text": "extern short diff;", "parent": 58, "children": [79, 81, 83], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 18}}, {"id": 79, "type": "storage_class_specifier", "text": "extern", "parent": 78, "children": [80], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 80, "type": "extern", "text": "extern", "parent": 79, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 6}}, {"id": 81, "type": "sized_type_specifier", "text": "short", "parent": 78, "children": [82], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 12}}, {"id": 82, "type": "short", "text": "short", "parent": 81, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 12}}, {"id": 83, "type": "identifier", "text": "diff", "parent": 78, "children": [], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 17}}, {"id": 84, "type": "#endif", "text": "#endif", "parent": 58, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 6}}, {"id": 85, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [62, 70, 78], "classes": [63, 71, 79], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 58, 59, 60, 65, 67, 68, 69, 73, 75, 76, 77, 81, 83, 84, 85], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 63, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 71, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 79, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": []}, "original_source_code": "/* See license.txt for license information. */\n\n#ifndef ACCEL_SENSOR_H\n#define ACCEL_SENSOR_H\n\n// these bit definitions are specific to WISP 4.1 DL\n\n#define SENSOR_DATA_TYPE_ID 0x0D\n\n#define ACCEL_ENABLE_BIT BIT5 // 1.5\n#define SET_ACCEL_ENABLE_DIR P1DIR |= ACCEL_ENABLE_BIT\n#define CLEAR_ACCEL_ENABLE_DIR P1DIR &= ~ACCEL_ENABLE_BIT\n#define TURN_ON_ACCEL_ENABLE P1OUT |= ACCEL_ENABLE_BIT\n#define TURN_OFF_ACCEL_ENABLE P1OUT &= ~ACCEL_ENABLE_BIT\n\n#define X_INCH INCH_2 // A2\n#define Y_INCH INCH_1 // A1\n#define Z_INCH INCH_0 // A0\n\n#define DATA_LENGTH_IN_WORDS 3\n#define DATA_LENGTH_IN_BYTES (DATA_LENGTH_IN_WORDS*2)\n\n#define CHECK_FOR_GOOD_VOLTAGE 0\n#define DEBUG_BAD_SAMPLES 0\n#if DEBUG_BAD_SAMPLES\nextern short lastx, lasty, lastz;\nextern short x, y, z;\nextern short diff;\n#endif\n\n#endif // ACCEL_SENSOR_H\n"}
63
c
#include <stdbool.h> #define ERROR NULL typedef Tree DataType; typedef int Position; typedef struct QNode *PtrToQNode; struct QNode { DataType *Data; int Capacity; Position Front, Rear; }; typedef PtrToQNode Queue; Queue CreateQueue(int QSize) { Queue Q = (Queue) malloc(sizeof(*Q)); Q->Data = (DataType *) malloc(QSize * sizeof(DataType)); Q->Front = Q->Rear = 0; Q->Capacity = QSize; return Q; } void DestroyQueue(Queue Q) { free(Q->Data); free(Q); } bool IsFullQ(Queue Q) { return (Q->Rear+1)%Q->Capacity == Q->Front; } bool IsEmptyQ(Queue Q) { return Q->Front == Q->Rear; } bool Enqueue(Queue Q, DataType X) { if (IsFullQ(Q)) return false; Q->Rear = (Q->Rear+1)%Q->Capacity; Q->Data[Q->Rear] = X; return true; } DataType Dequeue(Queue Q) { if (IsEmptyQ(Q)) return ERROR; Q->Front = (Q->Front+1)%Q->Capacity; return Q->Data[Q->Front]; } void Level_order(Tree T, void (*visit)(Tree ThisNode)) { if (!T) return; Queue Q = CreateQueue(MaxTree); Enqueue(Q, T); while (!IsEmptyQ(Q)) { DataType X = Dequeue(Q); (*visit)(X); if (X->Left) Enqueue(Q, X->Left); if (X->Right) Enqueue(Q, X->Right); } DestroyQueue(Q); }
21.45
51
(translation_unit) "#include <stdbool.h>\n#define ERROR NULL\ntypedef Tree DataType;\ntypedef int Position;\ntypedef struct QNode *PtrToQNode;\nstruct QNode {\n DataType *Data;\n int Capacity;\n Position Front, Rear;\n};\ntypedef PtrToQNode Queue;\nQueue CreateQueue(int QSize) {\n Queue Q = (Queue) malloc(sizeof(*Q));\n Q->Data = (DataType *) malloc(QSize * sizeof(DataType));\n Q->Front = Q->Rear = 0;\n Q->Capacity = QSize;\n return Q;\n}\nvoid DestroyQueue(Queue Q) {\n free(Q->Data);\n free(Q);\n}\nbool IsFullQ(Queue Q) {\n return (Q->Rear+1)%Q->Capacity == Q->Front;\n}\nbool IsEmptyQ(Queue Q) {\n return Q->Front == Q->Rear;\n}\nbool Enqueue(Queue Q, DataType X) {\n if (IsFullQ(Q)) return false;\n Q->Rear = (Q->Rear+1)%Q->Capacity;\n Q->Data[Q->Rear] = X;\n return true;\n}\nDataType Dequeue(Queue Q) {\n if (IsEmptyQ(Q)) return ERROR;\n Q->Front = (Q->Front+1)%Q->Capacity;\n return Q->Data[Q->Front];\n}\nvoid Level_order(Tree T, void (*visit)(Tree ThisNode)) {\n if (!T) return;\n Queue Q = CreateQueue(MaxTree);\n Enqueue(Q, T);\n while (!IsEmptyQ(Q)) {\n DataType X = Dequeue(Q);\n (*visit)(X);\n if (X->Left) Enqueue(Q, X->Left);\n if (X->Right) Enqueue(Q, X->Right);\n }\n DestroyQueue(Q);\n}\n" (preproc_include) "#include <stdbool.h>\n" (#include) "#include" (system_lib_string) "<stdbool.h>" (preproc_def) "#define ERROR NULL\n" (#define) "#define" (identifier) "ERROR" (preproc_arg) "NULL" (type_definition) "typedef Tree DataType;" (typedef) "typedef" (type_identifier) "Tree" (type_identifier) "DataType" (;) ";" (type_definition) "typedef int Position;" (typedef) "typedef" (primitive_type) "int" (type_identifier) "Position" (;) ";" (type_definition) "typedef struct QNode *PtrToQNode;" (typedef) "typedef" (struct_specifier) "struct QNode" (struct) "struct" (type_identifier) "QNode" (pointer_declarator) "*PtrToQNode" (*) "*" (type_identifier) "PtrToQNode" (;) ";" (struct_specifier) "struct QNode {\n DataType *Data;\n int Capacity;\n Position Front, Rear;\n}" (struct) "struct" (type_identifier) "QNode" (field_declaration_list) "{\n DataType *Data;\n int Capacity;\n Position Front, Rear;\n}" ({) "{" (field_declaration) "DataType *Data;" (type_identifier) "DataType" (pointer_declarator) "*Data" (*) "*" (field_identifier) "Data" (;) ";" (field_declaration) "int Capacity;" (primitive_type) "int" (field_identifier) "Capacity" (;) ";" (field_declaration) "Position Front, Rear;" (type_identifier) "Position" (field_identifier) "Front" (,) "," (field_identifier) "Rear" (;) ";" (}) "}" (;) ";" (type_definition) "typedef PtrToQNode Queue;" (typedef) "typedef" (type_identifier) "PtrToQNode" (type_identifier) "Queue" (;) ";" (function_definition) "Queue CreateQueue(int QSize) {\n Queue Q = (Queue) malloc(sizeof(*Q));\n Q->Data = (DataType *) malloc(QSize * sizeof(DataType));\n Q->Front = Q->Rear = 0;\n Q->Capacity = QSize;\n return Q;\n}" (type_identifier) "Queue" (function_declarator) "CreateQueue(int QSize)" (identifier) "CreateQueue" (parameter_list) "(int QSize)" (() "(" (parameter_declaration) "int QSize" (primitive_type) "int" (identifier) "QSize" ()) ")" (compound_statement) "{\n Queue Q = (Queue) malloc(sizeof(*Q));\n Q->Data = (DataType *) malloc(QSize * sizeof(DataType));\n Q->Front = Q->Rear = 0;\n Q->Capacity = QSize;\n return Q;\n}" ({) "{" (declaration) "Queue Q = (Queue) malloc(sizeof(*Q));" (type_identifier) "Queue" (init_declarator) "Q = (Queue) malloc(sizeof(*Q))" (identifier) "Q" (=) "=" (cast_expression) "(Queue) malloc(sizeof(*Q))" (() "(" (type_descriptor) "Queue" (type_identifier) "Queue" ()) ")" (call_expression) "malloc(sizeof(*Q))" (identifier) "malloc" (argument_list) "(sizeof(*Q))" (() "(" (sizeof_expression) "sizeof(*Q)" (sizeof) "sizeof" (parenthesized_expression) "(*Q)" (() "(" (pointer_expression) "*Q" (*) "*" (identifier) "Q" ()) ")" ()) ")" (;) ";" (expression_statement) "Q->Data = (DataType *) malloc(QSize * sizeof(DataType));" (assignment_expression) "Q->Data = (DataType *) malloc(QSize * sizeof(DataType))" (field_expression) "Q->Data" (identifier) "Q" (->) "->" (field_identifier) "Data" (=) "=" (cast_expression) "(DataType *) malloc(QSize * sizeof(DataType))" (() "(" (type_descriptor) "DataType *" (type_identifier) "DataType" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(QSize * sizeof(DataType))" (identifier) "malloc" (argument_list) "(QSize * sizeof(DataType))" (() "(" (binary_expression) "QSize * sizeof(DataType)" (identifier) "QSize" (*) "*" (sizeof_expression) "sizeof(DataType)" (sizeof) "sizeof" (parenthesized_expression) "(DataType)" (() "(" (identifier) "DataType" ()) ")" ()) ")" (;) ";" (expression_statement) "Q->Front = Q->Rear = 0;" (assignment_expression) "Q->Front = Q->Rear = 0" (field_expression) "Q->Front" (identifier) "Q" (->) "->" (field_identifier) "Front" (=) "=" (assignment_expression) "Q->Rear = 0" (field_expression) "Q->Rear" (identifier) "Q" (->) "->" (field_identifier) "Rear" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "Q->Capacity = QSize;" (assignment_expression) "Q->Capacity = QSize" (field_expression) "Q->Capacity" (identifier) "Q" (->) "->" (field_identifier) "Capacity" (=) "=" (identifier) "QSize" (;) ";" (return_statement) "return Q;" (return) "return" (identifier) "Q" (;) ";" (}) "}" (function_definition) "void DestroyQueue(Queue Q) {\n free(Q->Data);\n free(Q);\n}" (primitive_type) "void" (function_declarator) "DestroyQueue(Queue Q)" (identifier) "DestroyQueue" (parameter_list) "(Queue Q)" (() "(" (parameter_declaration) "Queue Q" (type_identifier) "Queue" (identifier) "Q" ()) ")" (compound_statement) "{\n free(Q->Data);\n free(Q);\n}" ({) "{" (expression_statement) "free(Q->Data);" (call_expression) "free(Q->Data)" (identifier) "free" (argument_list) "(Q->Data)" (() "(" (field_expression) "Q->Data" (identifier) "Q" (->) "->" (field_identifier) "Data" ()) ")" (;) ";" (expression_statement) "free(Q);" (call_expression) "free(Q)" (identifier) "free" (argument_list) "(Q)" (() "(" (identifier) "Q" ()) ")" (;) ";" (}) "}" (function_definition) "bool IsFullQ(Queue Q) {\n return (Q->Rear+1)%Q->Capacity == Q->Front;\n}" (primitive_type) "bool" (function_declarator) "IsFullQ(Queue Q)" (identifier) "IsFullQ" (parameter_list) "(Queue Q)" (() "(" (parameter_declaration) "Queue Q" (type_identifier) "Queue" (identifier) "Q" ()) ")" (compound_statement) "{\n return (Q->Rear+1)%Q->Capacity == Q->Front;\n}" ({) "{" (return_statement) "return (Q->Rear+1)%Q->Capacity == Q->Front;" (return) "return" (binary_expression) "(Q->Rear+1)%Q->Capacity == Q->Front" (binary_expression) "(Q->Rear+1)%Q->Capacity" (parenthesized_expression) "(Q->Rear+1)" (() "(" (binary_expression) "Q->Rear+1" (field_expression) "Q->Rear" (identifier) "Q" (->) "->" (field_identifier) "Rear" (+) "+" (number_literal) "1" ()) ")" (%) "%" (field_expression) "Q->Capacity" (identifier) "Q" (->) "->" (field_identifier) "Capacity" (==) "==" (field_expression) "Q->Front" (identifier) "Q" (->) "->" (field_identifier) "Front" (;) ";" (}) "}" (function_definition) "bool IsEmptyQ(Queue Q) {\n return Q->Front == Q->Rear;\n}" (primitive_type) "bool" (function_declarator) "IsEmptyQ(Queue Q)" (identifier) "IsEmptyQ" (parameter_list) "(Queue Q)" (() "(" (parameter_declaration) "Queue Q" (type_identifier) "Queue" (identifier) "Q" ()) ")" (compound_statement) "{\n return Q->Front == Q->Rear;\n}" ({) "{" (return_statement) "return Q->Front == Q->Rear;" (return) "return" (binary_expression) "Q->Front == Q->Rear" (field_expression) "Q->Front" (identifier) "Q" (->) "->" (field_identifier) "Front" (==) "==" (field_expression) "Q->Rear" (identifier) "Q" (->) "->" (field_identifier) "Rear" (;) ";" (}) "}" (function_definition) "bool Enqueue(Queue Q, DataType X) {\n if (IsFullQ(Q)) return false;\n Q->Rear = (Q->Rear+1)%Q->Capacity;\n Q->Data[Q->Rear] = X;\n return true;\n}" (primitive_type) "bool" (function_declarator) "Enqueue(Queue Q, DataType X)" (identifier) "Enqueue" (parameter_list) "(Queue Q, DataType X)" (() "(" (parameter_declaration) "Queue Q" (type_identifier) "Queue" (identifier) "Q" (,) "," (parameter_declaration) "DataType X" (type_identifier) "DataType" (identifier) "X" ()) ")" (compound_statement) "{\n if (IsFullQ(Q)) return false;\n Q->Rear = (Q->Rear+1)%Q->Capacity;\n Q->Data[Q->Rear] = X;\n return true;\n}" ({) "{" (if_statement) "if (IsFullQ(Q)) return false;" (if) "if" (parenthesized_expression) "(IsFullQ(Q))" (() "(" (call_expression) "IsFullQ(Q)" (identifier) "IsFullQ" (argument_list) "(Q)" (() "(" (identifier) "Q" ()) ")" ()) ")" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (expression_statement) "Q->Rear = (Q->Rear+1)%Q->Capacity;" (assignment_expression) "Q->Rear = (Q->Rear+1)%Q->Capacity" (field_expression) "Q->Rear" (identifier) "Q" (->) "->" (field_identifier) "Rear" (=) "=" (binary_expression) "(Q->Rear+1)%Q->Capacity" (parenthesized_expression) "(Q->Rear+1)" (() "(" (binary_expression) "Q->Rear+1" (field_expression) "Q->Rear" (identifier) "Q" (->) "->" (field_identifier) "Rear" (+) "+" (number_literal) "1" ()) ")" (%) "%" (field_expression) "Q->Capacity" (identifier) "Q" (->) "->" (field_identifier) "Capacity" (;) ";" (expression_statement) "Q->Data[Q->Rear] = X;" (assignment_expression) "Q->Data[Q->Rear] = X" (subscript_expression) "Q->Data[Q->Rear]" (field_expression) "Q->Data" (identifier) "Q" (->) "->" (field_identifier) "Data" ([) "[" (field_expression) "Q->Rear" (identifier) "Q" (->) "->" (field_identifier) "Rear" (]) "]" (=) "=" (identifier) "X" (;) ";" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (function_definition) "DataType Dequeue(Queue Q) {\n if (IsEmptyQ(Q)) return ERROR;\n Q->Front = (Q->Front+1)%Q->Capacity;\n return Q->Data[Q->Front];\n}" (type_identifier) "DataType" (function_declarator) "Dequeue(Queue Q)" (identifier) "Dequeue" (parameter_list) "(Queue Q)" (() "(" (parameter_declaration) "Queue Q" (type_identifier) "Queue" (identifier) "Q" ()) ")" (compound_statement) "{\n if (IsEmptyQ(Q)) return ERROR;\n Q->Front = (Q->Front+1)%Q->Capacity;\n return Q->Data[Q->Front];\n}" ({) "{" (if_statement) "if (IsEmptyQ(Q)) return ERROR;" (if) "if" (parenthesized_expression) "(IsEmptyQ(Q))" (() "(" (call_expression) "IsEmptyQ(Q)" (identifier) "IsEmptyQ" (argument_list) "(Q)" (() "(" (identifier) "Q" ()) ")" ()) ")" (return_statement) "return ERROR;" (return) "return" (identifier) "ERROR" (;) ";" (expression_statement) "Q->Front = (Q->Front+1)%Q->Capacity;" (assignment_expression) "Q->Front = (Q->Front+1)%Q->Capacity" (field_expression) "Q->Front" (identifier) "Q" (->) "->" (field_identifier) "Front" (=) "=" (binary_expression) "(Q->Front+1)%Q->Capacity" (parenthesized_expression) "(Q->Front+1)" (() "(" (binary_expression) "Q->Front+1" (field_expression) "Q->Front" (identifier) "Q" (->) "->" (field_identifier) "Front" (+) "+" (number_literal) "1" ()) ")" (%) "%" (field_expression) "Q->Capacity" (identifier) "Q" (->) "->" (field_identifier) "Capacity" (;) ";" (return_statement) "return Q->Data[Q->Front];" (return) "return" (subscript_expression) "Q->Data[Q->Front]" (field_expression) "Q->Data" (identifier) "Q" (->) "->" (field_identifier) "Data" ([) "[" (field_expression) "Q->Front" (identifier) "Q" (->) "->" (field_identifier) "Front" (]) "]" (;) ";" (}) "}" (function_definition) "void Level_order(Tree T, void (*visit)(Tree ThisNode)) {\n if (!T) return;\n Queue Q = CreateQueue(MaxTree);\n Enqueue(Q, T);\n while (!IsEmptyQ(Q)) {\n DataType X = Dequeue(Q);\n (*visit)(X);\n if (X->Left) Enqueue(Q, X->Left);\n if (X->Right) Enqueue(Q, X->Right);\n }\n DestroyQueue(Q);\n}" (primitive_type) "void" (function_declarator) "Level_order(Tree T, void (*visit)(Tree ThisNode))" (identifier) "Level_order" (parameter_list) "(Tree T, void (*visit)(Tree ThisNode))" (() "(" (parameter_declaration) "Tree T" (type_identifier) "Tree" (identifier) "T" (,) "," (parameter_declaration) "void (*visit)(Tree ThisNode)" (primitive_type) "void" (function_declarator) "(*visit)(Tree ThisNode)" (parenthesized_declarator) "(*visit)" (() "(" (pointer_declarator) "*visit" (*) "*" (identifier) "visit" ()) ")" (parameter_list) "(Tree ThisNode)" (() "(" (parameter_declaration) "Tree ThisNode" (type_identifier) "Tree" (identifier) "ThisNode" ()) ")" ()) ")" (compound_statement) "{\n if (!T) return;\n Queue Q = CreateQueue(MaxTree);\n Enqueue(Q, T);\n while (!IsEmptyQ(Q)) {\n DataType X = Dequeue(Q);\n (*visit)(X);\n if (X->Left) Enqueue(Q, X->Left);\n if (X->Right) Enqueue(Q, X->Right);\n }\n DestroyQueue(Q);\n}" ({) "{" (if_statement) "if (!T) return;" (if) "if" (parenthesized_expression) "(!T)" (() "(" (unary_expression) "!T" (!) "!" (identifier) "T" ()) ")" (return_statement) "return;" (return) "return" (;) ";" (declaration) "Queue Q = CreateQueue(MaxTree);" (type_identifier) "Queue" (init_declarator) "Q = CreateQueue(MaxTree)" (identifier) "Q" (=) "=" (call_expression) "CreateQueue(MaxTree)" (identifier) "CreateQueue" (argument_list) "(MaxTree)" (() "(" (identifier) "MaxTree" ()) ")" (;) ";" (expression_statement) "Enqueue(Q, T);" (call_expression) "Enqueue(Q, T)" (identifier) "Enqueue" (argument_list) "(Q, T)" (() "(" (identifier) "Q" (,) "," (identifier) "T" ()) ")" (;) ";" (while_statement) "while (!IsEmptyQ(Q)) {\n DataType X = Dequeue(Q);\n (*visit)(X);\n if (X->Left) Enqueue(Q, X->Left);\n if (X->Right) Enqueue(Q, X->Right);\n }" (while) "while" (parenthesized_expression) "(!IsEmptyQ(Q))" (() "(" (unary_expression) "!IsEmptyQ(Q)" (!) "!" (call_expression) "IsEmptyQ(Q)" (identifier) "IsEmptyQ" (argument_list) "(Q)" (() "(" (identifier) "Q" ()) ")" ()) ")" (compound_statement) "{\n DataType X = Dequeue(Q);\n (*visit)(X);\n if (X->Left) Enqueue(Q, X->Left);\n if (X->Right) Enqueue(Q, X->Right);\n }" ({) "{" (declaration) "DataType X = Dequeue(Q);" (type_identifier) "DataType" (init_declarator) "X = Dequeue(Q)" (identifier) "X" (=) "=" (call_expression) "Dequeue(Q)" (identifier) "Dequeue" (argument_list) "(Q)" (() "(" (identifier) "Q" ()) ")" (;) ";" (expression_statement) "(*visit)(X);" (call_expression) "(*visit)(X)" (parenthesized_expression) "(*visit)" (() "(" (pointer_expression) "*visit" (*) "*" (identifier) "visit" ()) ")" (argument_list) "(X)" (() "(" (identifier) "X" ()) ")" (;) ";" (if_statement) "if (X->Left) Enqueue(Q, X->Left);" (if) "if" (parenthesized_expression) "(X->Left)" (() "(" (field_expression) "X->Left" (identifier) "X" (->) "->" (field_identifier) "Left" ()) ")" (expression_statement) "Enqueue(Q, X->Left);" (call_expression) "Enqueue(Q, X->Left)" (identifier) "Enqueue" (argument_list) "(Q, X->Left)" (() "(" (identifier) "Q" (,) "," (field_expression) "X->Left" (identifier) "X" (->) "->" (field_identifier) "Left" ()) ")" (;) ";" (if_statement) "if (X->Right) Enqueue(Q, X->Right);" (if) "if" (parenthesized_expression) "(X->Right)" (() "(" (field_expression) "X->Right" (identifier) "X" (->) "->" (field_identifier) "Right" ()) ")" (expression_statement) "Enqueue(Q, X->Right);" (call_expression) "Enqueue(Q, X->Right)" (identifier) "Enqueue" (argument_list) "(Q, X->Right)" (() "(" (identifier) "Q" (,) "," (field_expression) "X->Right" (identifier) "X" (->) "->" (field_identifier) "Right" ()) ")" (;) ";" (}) "}" (expression_statement) "DestroyQueue(Q);" (call_expression) "DestroyQueue(Q)" (identifier) "DestroyQueue" (argument_list) "(Q)" (() "(" (identifier) "Q" ()) ")" (;) ";" (}) "}"
542
0
{"language": "c", "success": true, "metadata": {"lines": 51, "avg_line_length": 21.45, "nodes": 345, "errors": 0, "source_hash": "eb362b7cdffad5dd0233eec6a89d6f1633918d3fce6f91239e4de12b46eeee56", "categorized_nodes": 268}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdbool.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": "<stdbool.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 20}}, {"id": 3, "type": "preproc_def", "text": "#define ERROR NULL\n", "parent": null, "children": [4, 5, 6], "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": "ERROR", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 13}}, {"id": 6, "type": "preproc_arg", "text": "NULL", "parent": 3, "children": [], "start_point": {"row": 1, "column": 14}, "end_point": {"row": 1, "column": 18}}, {"id": 7, "type": "type_definition", "text": "typedef Tree DataType;", "parent": null, "children": [8, 9, 10], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 22}}, {"id": 8, "type": "typedef", "text": "typedef", "parent": 7, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 9, "type": "type_identifier", "text": "Tree", "parent": 7, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 12}}, {"id": 10, "type": "type_identifier", "text": "DataType", "parent": 7, "children": [], "start_point": {"row": 2, "column": 13}, "end_point": {"row": 2, "column": 21}}, {"id": 11, "type": "type_definition", "text": "typedef int Position;", "parent": null, "children": [12, 13, 14], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 21}}, {"id": 12, "type": "typedef", "text": "typedef", "parent": 11, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 13, "type": "primitive_type", "text": "int", "parent": 11, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 11}}, {"id": 14, "type": "type_identifier", "text": "Position", "parent": 11, "children": [], "start_point": {"row": 3, "column": 12}, "end_point": {"row": 3, "column": 20}}, {"id": 15, "type": "type_definition", "text": "typedef struct QNode *PtrToQNode;", "parent": null, "children": [16, 17, 20], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 33}}, {"id": 16, "type": "typedef", "text": "typedef", "parent": 15, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 17, "type": "struct_specifier", "text": "struct QNode", "parent": 15, "children": [18, 19], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 20}}, {"id": 18, "type": "struct", "text": "struct", "parent": 17, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 14}}, {"id": 19, "type": "type_identifier", "text": "QNode", "parent": 17, "children": [], "start_point": {"row": 4, "column": 15}, "end_point": {"row": 4, "column": 20}}, {"id": 20, "type": "pointer_declarator", "text": "*PtrToQNode", "parent": 15, "children": [21, 22], "start_point": {"row": 4, "column": 21}, "end_point": {"row": 4, "column": 32}}, {"id": 21, "type": "*", "text": "*", "parent": 20, "children": [], "start_point": {"row": 4, "column": 21}, "end_point": {"row": 4, "column": 22}}, {"id": 22, "type": "type_identifier", "text": "PtrToQNode", "parent": 20, "children": [], "start_point": {"row": 4, "column": 22}, "end_point": {"row": 4, "column": 32}}, {"id": 23, "type": "struct_specifier", "text": "struct QNode {\n\tDataType *Data;\n\tint Capacity;\n\tPosition Front, Rear;\n}", "parent": null, "children": [24, 25], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 9, "column": 1}}, {"id": 24, "type": "struct", "text": "struct", "parent": 23, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 6}}, {"id": 25, "type": "type_identifier", "text": "QNode", "parent": 23, "children": [], "start_point": {"row": 5, "column": 7}, "end_point": {"row": 5, "column": 12}}, {"id": 26, "type": "field_declaration", "text": "DataType *Data;", "parent": 23, "children": [27, 28], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 16}}, {"id": 27, "type": "type_identifier", "text": "DataType", "parent": 26, "children": [], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 6, "column": 9}}, {"id": 28, "type": "pointer_declarator", "text": "*Data", "parent": 26, "children": [29, 30], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 15}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 11}}, {"id": 30, "type": "field_identifier", "text": "Data", "parent": 28, "children": [], "start_point": {"row": 6, "column": 11}, "end_point": {"row": 6, "column": 15}}, {"id": 31, "type": "field_declaration", "text": "int Capacity;", "parent": 23, "children": [32, 33], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 14}}, {"id": 32, "type": "primitive_type", "text": "int", "parent": 31, "children": [], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 7, "column": 4}}, {"id": 33, "type": "field_identifier", "text": "Capacity", "parent": 31, "children": [], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 13}}, {"id": 34, "type": "field_declaration", "text": "Position Front, Rear;", "parent": 23, "children": [35, 36, 37], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 22}}, {"id": 35, "type": "type_identifier", "text": "Position", "parent": 34, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 9}}, {"id": 36, "type": "field_identifier", "text": "Front", "parent": 34, "children": [], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 15}}, {"id": 37, "type": "field_identifier", "text": "Rear", "parent": 34, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 21}}, {"id": 38, "type": "type_definition", "text": "typedef PtrToQNode Queue;", "parent": null, "children": [39, 40, 41], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 25}}, {"id": 39, "type": "typedef", "text": "typedef", "parent": 38, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 40, "type": "type_identifier", "text": "PtrToQNode", "parent": 38, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 18}}, {"id": 41, "type": "type_identifier", "text": "Queue", "parent": 38, "children": [], "start_point": {"row": 10, "column": 19}, "end_point": {"row": 10, "column": 24}}, {"id": 42, "type": "function_definition", "text": "Queue CreateQueue(int QSize) {\n\tQueue Q = (Queue) malloc(sizeof(*Q));\n\tQ->Data = (DataType *) malloc(QSize * sizeof(DataType));\n\tQ->Front = Q->Rear = 0;\n\tQ->Capacity = QSize;\n\treturn Q;\n}", "parent": null, "children": [43, 44], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 17, "column": 1}}, {"id": 43, "type": "type_identifier", "text": "Queue", "parent": 42, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 5}}, {"id": 44, "type": "function_declarator", "text": "CreateQueue(int QSize)", "parent": 42, "children": [45, 46], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 28}}, {"id": 45, "type": "identifier", "text": "CreateQueue", "parent": 44, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 17}}, {"id": 46, "type": "parameter_list", "text": "(int QSize)", "parent": 44, "children": [47], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 28}}, {"id": 47, "type": "parameter_declaration", "text": "int QSize", "parent": 46, "children": [48, 49], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 27}}, {"id": 48, "type": "primitive_type", "text": "int", "parent": 47, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 21}}, {"id": 49, "type": "identifier", "text": "QSize", "parent": 47, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 27}}, {"id": 50, "type": "declaration", "text": "Queue Q = (Queue) malloc(sizeof(*Q));", "parent": 42, "children": [51, 52], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 38}}, {"id": 51, "type": "type_identifier", "text": "Queue", "parent": 50, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 6}}, {"id": 52, "type": "init_declarator", "text": "Q = (Queue) malloc(sizeof(*Q))", "parent": 50, "children": [53, 54, 55], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 37}}, {"id": 53, "type": "identifier", "text": "Q", "parent": 52, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 8}}, {"id": 54, "type": "=", "text": "=", "parent": 52, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 10}}, {"id": 55, "type": "cast_expression", "text": "(Queue) malloc(sizeof(*Q))", "parent": 52, "children": [56, 58], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 37}}, {"id": 56, "type": "type_descriptor", "text": "Queue", "parent": 55, "children": [57], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 17}}, {"id": 57, "type": "type_identifier", "text": "Queue", "parent": 56, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 17}}, {"id": 58, "type": "call_expression", "text": "malloc(sizeof(*Q))", "parent": 55, "children": [59, 60], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 37}}, {"id": 59, "type": "identifier", "text": "malloc", "parent": 58, "children": [], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 25}}, {"id": 60, "type": "argument_list", "text": "(sizeof(*Q))", "parent": 58, "children": [61], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 37}}, {"id": 61, "type": "sizeof_expression", "text": "sizeof(*Q)", "parent": 60, "children": [62], "start_point": {"row": 12, "column": 26}, "end_point": {"row": 12, "column": 36}}, {"id": 62, "type": "parenthesized_expression", "text": "(*Q)", "parent": 61, "children": [63], "start_point": {"row": 12, "column": 32}, "end_point": {"row": 12, "column": 36}}, {"id": 63, "type": "pointer_expression", "text": "*Q", "parent": 62, "children": [64, 65], "start_point": {"row": 12, "column": 33}, "end_point": {"row": 12, "column": 35}}, {"id": 64, "type": "*", "text": "*", "parent": 63, "children": [], "start_point": {"row": 12, "column": 33}, "end_point": {"row": 12, "column": 34}}, {"id": 65, "type": "identifier", "text": "Q", "parent": 63, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 35}}, {"id": 66, "type": "assignment_expression", "text": "Q->Data = (DataType *) malloc(QSize * sizeof(DataType))", "parent": 42, "children": [67, 70, 71], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 56}}, {"id": 67, "type": "field_expression", "text": "Q->Data", "parent": 66, "children": [68, 69], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 8}}, {"id": 68, "type": "identifier", "text": "Q", "parent": 67, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 2}}, {"id": 69, "type": "field_identifier", "text": "Data", "parent": 67, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 8}}, {"id": 70, "type": "=", "text": "=", "parent": 66, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 10}}, {"id": 71, "type": "cast_expression", "text": "(DataType *) malloc(QSize * sizeof(DataType))", "parent": 66, "children": [72, 76], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 56}}, {"id": 72, "type": "type_descriptor", "text": "DataType *", "parent": 71, "children": [73, 74], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 22}}, {"id": 73, "type": "type_identifier", "text": "DataType", "parent": 72, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 20}}, {"id": 74, "type": "abstract_pointer_declarator", "text": "*", "parent": 72, "children": [75], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 22}}, {"id": 75, "type": "*", "text": "*", "parent": 74, "children": [], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 22}}, {"id": 76, "type": "call_expression", "text": "malloc(QSize * sizeof(DataType))", "parent": 71, "children": [77, 78], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 56}}, {"id": 77, "type": "identifier", "text": "malloc", "parent": 76, "children": [], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 30}}, {"id": 78, "type": "argument_list", "text": "(QSize * sizeof(DataType))", "parent": 76, "children": [79], "start_point": {"row": 13, "column": 30}, "end_point": {"row": 13, "column": 56}}, {"id": 79, "type": "binary_expression", "text": "QSize * sizeof(DataType)", "parent": 78, "children": [80, 81, 82], "start_point": {"row": 13, "column": 31}, "end_point": {"row": 13, "column": 55}}, {"id": 80, "type": "identifier", "text": "QSize", "parent": 79, "children": [], "start_point": {"row": 13, "column": 31}, "end_point": {"row": 13, "column": 36}}, {"id": 81, "type": "*", "text": "*", "parent": 79, "children": [], "start_point": {"row": 13, "column": 37}, "end_point": {"row": 13, "column": 38}}, {"id": 82, "type": "sizeof_expression", "text": "sizeof(DataType)", "parent": 79, "children": [83], "start_point": {"row": 13, "column": 39}, "end_point": {"row": 13, "column": 55}}, {"id": 83, "type": "parenthesized_expression", "text": "(DataType)", "parent": 82, "children": [84], "start_point": {"row": 13, "column": 45}, "end_point": {"row": 13, "column": 55}}, {"id": 84, "type": "identifier", "text": "DataType", "parent": 83, "children": [], "start_point": {"row": 13, "column": 46}, "end_point": {"row": 13, "column": 54}}, {"id": 85, "type": "assignment_expression", "text": "Q->Front = Q->Rear = 0", "parent": 42, "children": [86, 89, 90], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 23}}, {"id": 86, "type": "field_expression", "text": "Q->Front", "parent": 85, "children": [87, 88], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 9}}, {"id": 87, "type": "identifier", "text": "Q", "parent": 86, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 2}}, {"id": 88, "type": "field_identifier", "text": "Front", "parent": 86, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 9}}, {"id": 89, "type": "=", "text": "=", "parent": 85, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 11}}, {"id": 90, "type": "assignment_expression", "text": "Q->Rear = 0", "parent": 85, "children": [91, 94, 95], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 23}}, {"id": 91, "type": "field_expression", "text": "Q->Rear", "parent": 90, "children": [92, 93], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 19}}, {"id": 92, "type": "identifier", "text": "Q", "parent": 91, "children": [], "start_point": {"row": 14, "column": 12}, "end_point": {"row": 14, "column": 13}}, {"id": 93, "type": "field_identifier", "text": "Rear", "parent": 91, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 19}}, {"id": 94, "type": "=", "text": "=", "parent": 90, "children": [], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 21}}, {"id": 95, "type": "number_literal", "text": "0", "parent": 90, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 23}}, {"id": 96, "type": "assignment_expression", "text": "Q->Capacity = QSize", "parent": 42, "children": [97, 100, 101], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 20}}, {"id": 97, "type": "field_expression", "text": "Q->Capacity", "parent": 96, "children": [98, 99], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 12}}, {"id": 98, "type": "identifier", "text": "Q", "parent": 97, "children": [], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 2}}, {"id": 99, "type": "field_identifier", "text": "Capacity", "parent": 97, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 12}}, {"id": 100, "type": "=", "text": "=", "parent": 96, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 14}}, {"id": 101, "type": "identifier", "text": "QSize", "parent": 96, "children": [], "start_point": {"row": 15, "column": 15}, "end_point": {"row": 15, "column": 20}}, {"id": 102, "type": "return_statement", "text": "return Q;", "parent": 42, "children": [103], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 10}}, {"id": 103, "type": "identifier", "text": "Q", "parent": 102, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 9}}, {"id": 104, "type": "function_definition", "text": "void DestroyQueue(Queue Q) {\n\tfree(Q->Data);\n\tfree(Q);\n}", "parent": null, "children": [105, 106], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 105, "type": "primitive_type", "text": "void", "parent": 104, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 4}}, {"id": 106, "type": "function_declarator", "text": "DestroyQueue(Queue Q)", "parent": 104, "children": [107, 108], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 26}}, {"id": 107, "type": "identifier", "text": "DestroyQueue", "parent": 106, "children": [], "start_point": {"row": 18, "column": 5}, "end_point": {"row": 18, "column": 17}}, {"id": 108, "type": "parameter_list", "text": "(Queue Q)", "parent": 106, "children": [109], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 26}}, {"id": 109, "type": "parameter_declaration", "text": "Queue Q", "parent": 108, "children": [110, 111], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 25}}, {"id": 110, "type": "type_identifier", "text": "Queue", "parent": 109, "children": [], "start_point": {"row": 18, "column": 18}, "end_point": {"row": 18, "column": 23}}, {"id": 111, "type": "identifier", "text": "Q", "parent": 109, "children": [], "start_point": {"row": 18, "column": 24}, "end_point": {"row": 18, "column": 25}}, {"id": 112, "type": "call_expression", "text": "free(Q->Data)", "parent": 104, "children": [113, 114], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 14}}, {"id": 113, "type": "identifier", "text": "free", "parent": 112, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 5}}, {"id": 114, "type": "argument_list", "text": "(Q->Data)", "parent": 112, "children": [115], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 14}}, {"id": 115, "type": "field_expression", "text": "Q->Data", "parent": 114, "children": [116, 117], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 13}}, {"id": 116, "type": "identifier", "text": "Q", "parent": 115, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 7}}, {"id": 117, "type": "field_identifier", "text": "Data", "parent": 115, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 13}}, {"id": 118, "type": "call_expression", "text": "free(Q)", "parent": 104, "children": [119, 120], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 8}}, {"id": 119, "type": "identifier", "text": "free", "parent": 118, "children": [], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 20, "column": 5}}, {"id": 120, "type": "argument_list", "text": "(Q)", "parent": 118, "children": [121], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 8}}, {"id": 121, "type": "identifier", "text": "Q", "parent": 120, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 7}}, {"id": 122, "type": "function_definition", "text": "bool IsFullQ(Queue Q) {\n\treturn (Q->Rear+1)%Q->Capacity == Q->Front;\n}", "parent": null, "children": [123, 124], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 123, "type": "primitive_type", "text": "bool", "parent": 122, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 4}}, {"id": 124, "type": "function_declarator", "text": "IsFullQ(Queue Q)", "parent": 122, "children": [125, 126], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 21}}, {"id": 125, "type": "identifier", "text": "IsFullQ", "parent": 124, "children": [], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 22, "column": 12}}, {"id": 126, "type": "parameter_list", "text": "(Queue Q)", "parent": 124, "children": [127], "start_point": {"row": 22, "column": 12}, "end_point": {"row": 22, "column": 21}}, {"id": 127, "type": "parameter_declaration", "text": "Queue Q", "parent": 126, "children": [128, 129], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 20}}, {"id": 128, "type": "type_identifier", "text": "Queue", "parent": 127, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 18}}, {"id": 129, "type": "identifier", "text": "Q", "parent": 127, "children": [], "start_point": {"row": 22, "column": 19}, "end_point": {"row": 22, "column": 20}}, {"id": 130, "type": "return_statement", "text": "return (Q->Rear+1)%Q->Capacity == Q->Front;", "parent": 122, "children": [131], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 44}}, {"id": 131, "type": "binary_expression", "text": "(Q->Rear+1)%Q->Capacity == Q->Front", "parent": 130, "children": [132, 144, 145], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 43}}, {"id": 132, "type": "binary_expression", "text": "(Q->Rear+1)%Q->Capacity", "parent": 131, "children": [133, 140, 141], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 31}}, {"id": 133, "type": "parenthesized_expression", "text": "(Q->Rear+1)", "parent": 132, "children": [134], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 19}}, {"id": 134, "type": "binary_expression", "text": "Q->Rear+1", "parent": 133, "children": [135, 138, 139], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 18}}, {"id": 135, "type": "field_expression", "text": "Q->Rear", "parent": 134, "children": [136, 137], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 16}}, {"id": 136, "type": "identifier", "text": "Q", "parent": 135, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 10}}, {"id": 137, "type": "field_identifier", "text": "Rear", "parent": 135, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 16}}, {"id": 138, "type": "+", "text": "+", "parent": 134, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 17}}, {"id": 139, "type": "number_literal", "text": "1", "parent": 134, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 18}}, {"id": 140, "type": "%", "text": "%", "parent": 132, "children": [], "start_point": {"row": 23, "column": 19}, "end_point": {"row": 23, "column": 20}}, {"id": 141, "type": "field_expression", "text": "Q->Capacity", "parent": 132, "children": [142, 143], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 31}}, {"id": 142, "type": "identifier", "text": "Q", "parent": 141, "children": [], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 21}}, {"id": 143, "type": "field_identifier", "text": "Capacity", "parent": 141, "children": [], "start_point": {"row": 23, "column": 23}, "end_point": {"row": 23, "column": 31}}, {"id": 144, "type": "==", "text": "==", "parent": 131, "children": [], "start_point": {"row": 23, "column": 32}, "end_point": {"row": 23, "column": 34}}, {"id": 145, "type": "field_expression", "text": "Q->Front", "parent": 131, "children": [146, 147], "start_point": {"row": 23, "column": 35}, "end_point": {"row": 23, "column": 43}}, {"id": 146, "type": "identifier", "text": "Q", "parent": 145, "children": [], "start_point": {"row": 23, "column": 35}, "end_point": {"row": 23, "column": 36}}, {"id": 147, "type": "field_identifier", "text": "Front", "parent": 145, "children": [], "start_point": {"row": 23, "column": 38}, "end_point": {"row": 23, "column": 43}}, {"id": 148, "type": "function_definition", "text": "bool IsEmptyQ(Queue Q) {\n\treturn Q->Front == Q->Rear;\n}", "parent": null, "children": [149, 150], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 149, "type": "primitive_type", "text": "bool", "parent": 148, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 4}}, {"id": 150, "type": "function_declarator", "text": "IsEmptyQ(Queue Q)", "parent": 148, "children": [151, 152], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 22}}, {"id": 151, "type": "identifier", "text": "IsEmptyQ", "parent": 150, "children": [], "start_point": {"row": 25, "column": 5}, "end_point": {"row": 25, "column": 13}}, {"id": 152, "type": "parameter_list", "text": "(Queue Q)", "parent": 150, "children": [153], "start_point": {"row": 25, "column": 13}, "end_point": {"row": 25, "column": 22}}, {"id": 153, "type": "parameter_declaration", "text": "Queue Q", "parent": 152, "children": [154, 155], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 21}}, {"id": 154, "type": "type_identifier", "text": "Queue", "parent": 153, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 19}}, {"id": 155, "type": "identifier", "text": "Q", "parent": 153, "children": [], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 21}}, {"id": 156, "type": "return_statement", "text": "return Q->Front == Q->Rear;", "parent": 148, "children": [157], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 28}}, {"id": 157, "type": "binary_expression", "text": "Q->Front == Q->Rear", "parent": 156, "children": [158, 161, 162], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 27}}, {"id": 158, "type": "field_expression", "text": "Q->Front", "parent": 157, "children": [159, 160], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 16}}, {"id": 159, "type": "identifier", "text": "Q", "parent": 158, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 9}}, {"id": 160, "type": "field_identifier", "text": "Front", "parent": 158, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 16}}, {"id": 161, "type": "==", "text": "==", "parent": 157, "children": [], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 19}}, {"id": 162, "type": "field_expression", "text": "Q->Rear", "parent": 157, "children": [163, 164], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 27}}, {"id": 163, "type": "identifier", "text": "Q", "parent": 162, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 21}}, {"id": 164, "type": "field_identifier", "text": "Rear", "parent": 162, "children": [], "start_point": {"row": 26, "column": 23}, "end_point": {"row": 26, "column": 27}}, {"id": 165, "type": "function_definition", "text": "bool Enqueue(Queue Q, DataType X) {\n\tif (IsFullQ(Q)) return false;\n\tQ->Rear = (Q->Rear+1)%Q->Capacity;\n\tQ->Data[Q->Rear] = X;\n\treturn true;\n}", "parent": null, "children": [166, 167], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 166, "type": "primitive_type", "text": "bool", "parent": 165, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 4}}, {"id": 167, "type": "function_declarator", "text": "Enqueue(Queue Q, DataType X)", "parent": 165, "children": [168, 169], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 33}}, {"id": 168, "type": "identifier", "text": "Enqueue", "parent": 167, "children": [], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 12}}, {"id": 169, "type": "parameter_list", "text": "(Queue Q, DataType X)", "parent": 167, "children": [170, 173], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 33}}, {"id": 170, "type": "parameter_declaration", "text": "Queue Q", "parent": 169, "children": [171, 172], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 20}}, {"id": 171, "type": "type_identifier", "text": "Queue", "parent": 170, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 18}}, {"id": 172, "type": "identifier", "text": "Q", "parent": 170, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 20}}, {"id": 173, "type": "parameter_declaration", "text": "DataType X", "parent": 169, "children": [174, 175], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 32}}, {"id": 174, "type": "type_identifier", "text": "DataType", "parent": 173, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 30}}, {"id": 175, "type": "identifier", "text": "X", "parent": 173, "children": [], "start_point": {"row": 28, "column": 31}, "end_point": {"row": 28, "column": 32}}, {"id": 176, "type": "if_statement", "text": "if (IsFullQ(Q)) return false;", "parent": 165, "children": [177, 182], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 30}}, {"id": 177, "type": "parenthesized_expression", "text": "(IsFullQ(Q))", "parent": 176, "children": [178], "start_point": {"row": 29, "column": 4}, "end_point": {"row": 29, "column": 16}}, {"id": 178, "type": "call_expression", "text": "IsFullQ(Q)", "parent": 177, "children": [179, 180], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 15}}, {"id": 179, "type": "identifier", "text": "IsFullQ", "parent": 178, "children": [], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 12}}, {"id": 180, "type": "argument_list", "text": "(Q)", "parent": 178, "children": [181], "start_point": {"row": 29, "column": 12}, "end_point": {"row": 29, "column": 15}}, {"id": 181, "type": "identifier", "text": "Q", "parent": 180, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 14}}, {"id": 182, "type": "return_statement", "text": "return false;", "parent": 176, "children": [183], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 30}}, {"id": 183, "type": "false", "text": "false", "parent": 182, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 29}}, {"id": 184, "type": "assignment_expression", "text": "Q->Rear = (Q->Rear+1)%Q->Capacity", "parent": 165, "children": [185, 188, 189], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 34}}, {"id": 185, "type": "field_expression", "text": "Q->Rear", "parent": 184, "children": [186, 187], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 8}}, {"id": 186, "type": "identifier", "text": "Q", "parent": 185, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 2}}, {"id": 187, "type": "field_identifier", "text": "Rear", "parent": 185, "children": [], "start_point": {"row": 30, "column": 4}, "end_point": {"row": 30, "column": 8}}, {"id": 188, "type": "=", "text": "=", "parent": 184, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 10}}, {"id": 189, "type": "binary_expression", "text": "(Q->Rear+1)%Q->Capacity", "parent": 184, "children": [190, 197, 198], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 34}}, {"id": 190, "type": "parenthesized_expression", "text": "(Q->Rear+1)", "parent": 189, "children": [191], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 22}}, {"id": 191, "type": "binary_expression", "text": "Q->Rear+1", "parent": 190, "children": [192, 195, 196], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 21}}, {"id": 192, "type": "field_expression", "text": "Q->Rear", "parent": 191, "children": [193, 194], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 19}}, {"id": 193, "type": "identifier", "text": "Q", "parent": 192, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 13}}, {"id": 194, "type": "field_identifier", "text": "Rear", "parent": 192, "children": [], "start_point": {"row": 30, "column": 15}, "end_point": {"row": 30, "column": 19}}, {"id": 195, "type": "+", "text": "+", "parent": 191, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 20}}, {"id": 196, "type": "number_literal", "text": "1", "parent": 191, "children": [], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 21}}, {"id": 197, "type": "%", "text": "%", "parent": 189, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 23}}, {"id": 198, "type": "field_expression", "text": "Q->Capacity", "parent": 189, "children": [199, 200], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 34}}, {"id": 199, "type": "identifier", "text": "Q", "parent": 198, "children": [], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 24}}, {"id": 200, "type": "field_identifier", "text": "Capacity", "parent": 198, "children": [], "start_point": {"row": 30, "column": 26}, "end_point": {"row": 30, "column": 34}}, {"id": 201, "type": "assignment_expression", "text": "Q->Data[Q->Rear] = X", "parent": 165, "children": [202, 209, 210], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 21}}, {"id": 202, "type": "subscript_expression", "text": "Q->Data[Q->Rear]", "parent": 201, "children": [203, 206], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 17}}, {"id": 203, "type": "field_expression", "text": "Q->Data", "parent": 202, "children": [204, 205], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 8}}, {"id": 204, "type": "identifier", "text": "Q", "parent": 203, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 2}}, {"id": 205, "type": "field_identifier", "text": "Data", "parent": 203, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 8}}, {"id": 206, "type": "field_expression", "text": "Q->Rear", "parent": 202, "children": [207, 208], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 16}}, {"id": 207, "type": "identifier", "text": "Q", "parent": 206, "children": [], "start_point": {"row": 31, "column": 9}, "end_point": {"row": 31, "column": 10}}, {"id": 208, "type": "field_identifier", "text": "Rear", "parent": 206, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 16}}, {"id": 209, "type": "=", "text": "=", "parent": 201, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 19}}, {"id": 210, "type": "identifier", "text": "X", "parent": 201, "children": [], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 21}}, {"id": 211, "type": "return_statement", "text": "return true;", "parent": 165, "children": [212], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 13}}, {"id": 212, "type": "true", "text": "true", "parent": 211, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 12}}, {"id": 213, "type": "function_definition", "text": "DataType Dequeue(Queue Q) {\n\tif (IsEmptyQ(Q)) return ERROR;\n\tQ->Front = (Q->Front+1)%Q->Capacity;\n\treturn Q->Data[Q->Front];\n}", "parent": null, "children": [214, 215], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 214, "type": "type_identifier", "text": "DataType", "parent": 213, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 8}}, {"id": 215, "type": "function_declarator", "text": "Dequeue(Queue Q)", "parent": 213, "children": [216, 217], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 25}}, {"id": 216, "type": "identifier", "text": "Dequeue", "parent": 215, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 16}}, {"id": 217, "type": "parameter_list", "text": "(Queue Q)", "parent": 215, "children": [218], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 25}}, {"id": 218, "type": "parameter_declaration", "text": "Queue Q", "parent": 217, "children": [219, 220], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 24}}, {"id": 219, "type": "type_identifier", "text": "Queue", "parent": 218, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 22}}, {"id": 220, "type": "identifier", "text": "Q", "parent": 218, "children": [], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 24}}, {"id": 221, "type": "if_statement", "text": "if (IsEmptyQ(Q)) return ERROR;", "parent": 213, "children": [222, 227], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 31}}, {"id": 222, "type": "parenthesized_expression", "text": "(IsEmptyQ(Q))", "parent": 221, "children": [223], "start_point": {"row": 35, "column": 4}, "end_point": {"row": 35, "column": 17}}, {"id": 223, "type": "call_expression", "text": "IsEmptyQ(Q)", "parent": 222, "children": [224, 225], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 16}}, {"id": 224, "type": "identifier", "text": "IsEmptyQ", "parent": 223, "children": [], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 13}}, {"id": 225, "type": "argument_list", "text": "(Q)", "parent": 223, "children": [226], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 16}}, {"id": 226, "type": "identifier", "text": "Q", "parent": 225, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 15}}, {"id": 227, "type": "return_statement", "text": "return ERROR;", "parent": 221, "children": [228], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 31}}, {"id": 228, "type": "identifier", "text": "ERROR", "parent": 227, "children": [], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 30}}, {"id": 229, "type": "assignment_expression", "text": "Q->Front = (Q->Front+1)%Q->Capacity", "parent": 213, "children": [230, 233, 234], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 36}}, {"id": 230, "type": "field_expression", "text": "Q->Front", "parent": 229, "children": [231, 232], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 9}}, {"id": 231, "type": "identifier", "text": "Q", "parent": 230, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 2}}, {"id": 232, "type": "field_identifier", "text": "Front", "parent": 230, "children": [], "start_point": {"row": 36, "column": 4}, "end_point": {"row": 36, "column": 9}}, {"id": 233, "type": "=", "text": "=", "parent": 229, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 11}}, {"id": 234, "type": "binary_expression", "text": "(Q->Front+1)%Q->Capacity", "parent": 229, "children": [235, 242, 243], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 36}}, {"id": 235, "type": "parenthesized_expression", "text": "(Q->Front+1)", "parent": 234, "children": [236], "start_point": {"row": 36, "column": 12}, "end_point": {"row": 36, "column": 24}}, {"id": 236, "type": "binary_expression", "text": "Q->Front+1", "parent": 235, "children": [237, 240, 241], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 23}}, {"id": 237, "type": "field_expression", "text": "Q->Front", "parent": 236, "children": [238, 239], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 21}}, {"id": 238, "type": "identifier", "text": "Q", "parent": 237, "children": [], "start_point": {"row": 36, "column": 13}, "end_point": {"row": 36, "column": 14}}, {"id": 239, "type": "field_identifier", "text": "Front", "parent": 237, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 21}}, {"id": 240, "type": "+", "text": "+", "parent": 236, "children": [], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 22}}, {"id": 241, "type": "number_literal", "text": "1", "parent": 236, "children": [], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 23}}, {"id": 242, "type": "%", "text": "%", "parent": 234, "children": [], "start_point": {"row": 36, "column": 24}, "end_point": {"row": 36, "column": 25}}, {"id": 243, "type": "field_expression", "text": "Q->Capacity", "parent": 234, "children": [244, 245], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 36}}, {"id": 244, "type": "identifier", "text": "Q", "parent": 243, "children": [], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 26}}, {"id": 245, "type": "field_identifier", "text": "Capacity", "parent": 243, "children": [], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 36}}, {"id": 246, "type": "return_statement", "text": "return Q->Data[Q->Front];", "parent": 213, "children": [247], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 26}}, {"id": 247, "type": "subscript_expression", "text": "Q->Data[Q->Front]", "parent": 246, "children": [248, 251], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 25}}, {"id": 248, "type": "field_expression", "text": "Q->Data", "parent": 247, "children": [249, 250], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 15}}, {"id": 249, "type": "identifier", "text": "Q", "parent": 248, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 9}}, {"id": 250, "type": "field_identifier", "text": "Data", "parent": 248, "children": [], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 15}}, {"id": 251, "type": "field_expression", "text": "Q->Front", "parent": 247, "children": [252, 253], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 24}}, {"id": 252, "type": "identifier", "text": "Q", "parent": 251, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 17}}, {"id": 253, "type": "field_identifier", "text": "Front", "parent": 251, "children": [], "start_point": {"row": 37, "column": 19}, "end_point": {"row": 37, "column": 24}}, {"id": 254, "type": "function_definition", "text": "void Level_order(Tree T, void (*visit)(Tree ThisNode)) {\n\tif (!T) return;\n\tQueue Q = CreateQueue(MaxTree);\n\tEnqueue(Q, T);\n\twhile (!IsEmptyQ(Q)) {\n\t\tDataType X = Dequeue(Q);\n\t\t(*visit)(X);\n\t\tif (X->Left) Enqueue(Q, X->Left);\n\t\tif (X->Right) Enqueue(Q, X->Right);\n\t}\n\tDestroyQueue(Q);\n}", "parent": null, "children": [255, 256], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 50, "column": 1}}, {"id": 255, "type": "primitive_type", "text": "void", "parent": 254, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 4}}, {"id": 256, "type": "function_declarator", "text": "Level_order(Tree T, void (*visit)(Tree ThisNode))", "parent": 254, "children": [257, 258], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 54}}, {"id": 257, "type": "identifier", "text": "Level_order", "parent": 256, "children": [], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 16}}, {"id": 258, "type": "parameter_list", "text": "(Tree T, void (*visit)(Tree ThisNode))", "parent": 256, "children": [259, 262], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 54}}, {"id": 259, "type": "parameter_declaration", "text": "Tree T", "parent": 258, "children": [260, 261], "start_point": {"row": 39, "column": 17}, "end_point": {"row": 39, "column": 23}}, {"id": 260, "type": "type_identifier", "text": "Tree", "parent": 259, "children": [], "start_point": {"row": 39, "column": 17}, "end_point": {"row": 39, "column": 21}}, {"id": 261, "type": "identifier", "text": "T", "parent": 259, "children": [], "start_point": {"row": 39, "column": 22}, "end_point": {"row": 39, "column": 23}}, {"id": 262, "type": "parameter_declaration", "text": "void (*visit)(Tree ThisNode)", "parent": 258, "children": [263, 264], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 53}}, {"id": 263, "type": "primitive_type", "text": "void", "parent": 262, "children": [], "start_point": {"row": 39, "column": 25}, "end_point": {"row": 39, "column": 29}}, {"id": 264, "type": "function_declarator", "text": "(*visit)(Tree ThisNode)", "parent": 262, "children": [265, 269], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 53}}, {"id": 265, "type": "parenthesized_declarator", "text": "(*visit)", "parent": 264, "children": [266], "start_point": {"row": 39, "column": 30}, "end_point": {"row": 39, "column": 38}}, {"id": 266, "type": "pointer_declarator", "text": "*visit", "parent": 265, "children": [267, 268], "start_point": {"row": 39, "column": 31}, "end_point": {"row": 39, "column": 37}}, {"id": 267, "type": "*", "text": "*", "parent": 266, "children": [], "start_point": {"row": 39, "column": 31}, "end_point": {"row": 39, "column": 32}}, {"id": 268, "type": "identifier", "text": "visit", "parent": 266, "children": [], "start_point": {"row": 39, "column": 32}, "end_point": {"row": 39, "column": 37}}, {"id": 269, "type": "parameter_list", "text": "(Tree ThisNode)", "parent": 264, "children": [270], "start_point": {"row": 39, "column": 38}, "end_point": {"row": 39, "column": 53}}, {"id": 270, "type": "parameter_declaration", "text": "Tree ThisNode", "parent": 269, "children": [271, 272], "start_point": {"row": 39, "column": 39}, "end_point": {"row": 39, "column": 52}}, {"id": 271, "type": "type_identifier", "text": "Tree", "parent": 270, "children": [], "start_point": {"row": 39, "column": 39}, "end_point": {"row": 39, "column": 43}}, {"id": 272, "type": "identifier", "text": "ThisNode", "parent": 270, "children": [], "start_point": {"row": 39, "column": 44}, "end_point": {"row": 39, "column": 52}}, {"id": 273, "type": "if_statement", "text": "if (!T) return;", "parent": 254, "children": [274, 278], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 16}}, {"id": 274, "type": "parenthesized_expression", "text": "(!T)", "parent": 273, "children": [275], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 8}}, {"id": 275, "type": "unary_expression", "text": "!T", "parent": 274, "children": [276, 277], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 7}}, {"id": 276, "type": "!", "text": "!", "parent": 275, "children": [], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 6}}, {"id": 277, "type": "identifier", "text": "T", "parent": 275, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 7}}, {"id": 278, "type": "return_statement", "text": "return;", "parent": 273, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 16}}, {"id": 279, "type": "declaration", "text": "Queue Q = CreateQueue(MaxTree);", "parent": 254, "children": [280, 281], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 32}}, {"id": 280, "type": "type_identifier", "text": "Queue", "parent": 279, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 6}}, {"id": 281, "type": "init_declarator", "text": "Q = CreateQueue(MaxTree)", "parent": 279, "children": [282, 283, 284], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 31}}, {"id": 282, "type": "identifier", "text": "Q", "parent": 281, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 8}}, {"id": 283, "type": "=", "text": "=", "parent": 281, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 10}}, {"id": 284, "type": "call_expression", "text": "CreateQueue(MaxTree)", "parent": 281, "children": [285, 286], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 31}}, {"id": 285, "type": "identifier", "text": "CreateQueue", "parent": 284, "children": [], "start_point": {"row": 41, "column": 11}, "end_point": {"row": 41, "column": 22}}, {"id": 286, "type": "argument_list", "text": "(MaxTree)", "parent": 284, "children": [287], "start_point": {"row": 41, "column": 22}, "end_point": {"row": 41, "column": 31}}, {"id": 287, "type": "identifier", "text": "MaxTree", "parent": 286, "children": [], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 30}}, {"id": 288, "type": "call_expression", "text": "Enqueue(Q, T)", "parent": 254, "children": [289, 290], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 14}}, {"id": 289, "type": "identifier", "text": "Enqueue", "parent": 288, "children": [], "start_point": {"row": 42, "column": 1}, "end_point": {"row": 42, "column": 8}}, {"id": 290, "type": "argument_list", "text": "(Q, T)", "parent": 288, "children": [291, 292], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 14}}, {"id": 291, "type": "identifier", "text": "Q", "parent": 290, "children": [], "start_point": {"row": 42, "column": 9}, "end_point": {"row": 42, "column": 10}}, {"id": 292, "type": "identifier", "text": "T", "parent": 290, "children": [], "start_point": {"row": 42, "column": 12}, "end_point": {"row": 42, "column": 13}}, {"id": 293, "type": "while_statement", "text": "while (!IsEmptyQ(Q)) {\n\t\tDataType X = Dequeue(Q);\n\t\t(*visit)(X);\n\t\tif (X->Left) Enqueue(Q, X->Left);\n\t\tif (X->Right) Enqueue(Q, X->Right);\n\t}", "parent": 254, "children": [294], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 48, "column": 2}}, {"id": 294, "type": "parenthesized_expression", "text": "(!IsEmptyQ(Q))", "parent": 293, "children": [295], "start_point": {"row": 43, "column": 7}, "end_point": {"row": 43, "column": 21}}, {"id": 295, "type": "unary_expression", "text": "!IsEmptyQ(Q)", "parent": 294, "children": [296, 297], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 20}}, {"id": 296, "type": "!", "text": "!", "parent": 295, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 9}}, {"id": 297, "type": "call_expression", "text": "IsEmptyQ(Q)", "parent": 295, "children": [298, 299], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 20}}, {"id": 298, "type": "identifier", "text": "IsEmptyQ", "parent": 297, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 17}}, {"id": 299, "type": "argument_list", "text": "(Q)", "parent": 297, "children": [300], "start_point": {"row": 43, "column": 17}, "end_point": {"row": 43, "column": 20}}, {"id": 300, "type": "identifier", "text": "Q", "parent": 299, "children": [], "start_point": {"row": 43, "column": 18}, "end_point": {"row": 43, "column": 19}}, {"id": 301, "type": "declaration", "text": "DataType X = Dequeue(Q);", "parent": 293, "children": [302, 303], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 26}}, {"id": 302, "type": "type_identifier", "text": "DataType", "parent": 301, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 10}}, {"id": 303, "type": "init_declarator", "text": "X = Dequeue(Q)", "parent": 301, "children": [304, 305, 306], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 25}}, {"id": 304, "type": "identifier", "text": "X", "parent": 303, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 12}}, {"id": 305, "type": "=", "text": "=", "parent": 303, "children": [], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 14}}, {"id": 306, "type": "call_expression", "text": "Dequeue(Q)", "parent": 303, "children": [307, 308], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 25}}, {"id": 307, "type": "identifier", "text": "Dequeue", "parent": 306, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 22}}, {"id": 308, "type": "argument_list", "text": "(Q)", "parent": 306, "children": [309], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 25}}, {"id": 309, "type": "identifier", "text": "Q", "parent": 308, "children": [], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 24}}, {"id": 310, "type": "call_expression", "text": "(*visit)(X)", "parent": 293, "children": [311, 315], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 13}}, {"id": 311, "type": "parenthesized_expression", "text": "(*visit)", "parent": 310, "children": [312], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 10}}, {"id": 312, "type": "pointer_expression", "text": "*visit", "parent": 311, "children": [313, 314], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 9}}, {"id": 313, "type": "*", "text": "*", "parent": 312, "children": [], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 4}}, {"id": 314, "type": "identifier", "text": "visit", "parent": 312, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 9}}, {"id": 315, "type": "argument_list", "text": "(X)", "parent": 310, "children": [316], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 13}}, {"id": 316, "type": "identifier", "text": "X", "parent": 315, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 12}}, {"id": 317, "type": "if_statement", "text": "if (X->Left) Enqueue(Q, X->Left);", "parent": 293, "children": [318], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 35}}, {"id": 318, "type": "parenthesized_expression", "text": "(X->Left)", "parent": 317, "children": [319], "start_point": {"row": 46, "column": 5}, "end_point": {"row": 46, "column": 14}}, {"id": 319, "type": "field_expression", "text": "X->Left", "parent": 318, "children": [320, 321], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 13}}, {"id": 320, "type": "identifier", "text": "X", "parent": 319, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 7}}, {"id": 321, "type": "field_identifier", "text": "Left", "parent": 319, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 13}}, {"id": 322, "type": "call_expression", "text": "Enqueue(Q, X->Left)", "parent": 317, "children": [323, 324], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 34}}, {"id": 323, "type": "identifier", "text": "Enqueue", "parent": 322, "children": [], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 22}}, {"id": 324, "type": "argument_list", "text": "(Q, X->Left)", "parent": 322, "children": [325, 326], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 34}}, {"id": 325, "type": "identifier", "text": "Q", "parent": 324, "children": [], "start_point": {"row": 46, "column": 23}, "end_point": {"row": 46, "column": 24}}, {"id": 326, "type": "field_expression", "text": "X->Left", "parent": 324, "children": [327, 328], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 33}}, {"id": 327, "type": "identifier", "text": "X", "parent": 326, "children": [], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 27}}, {"id": 328, "type": "field_identifier", "text": "Left", "parent": 326, "children": [], "start_point": {"row": 46, "column": 29}, "end_point": {"row": 46, "column": 33}}, {"id": 329, "type": "if_statement", "text": "if (X->Right) Enqueue(Q, X->Right);", "parent": 293, "children": [330], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 37}}, {"id": 330, "type": "parenthesized_expression", "text": "(X->Right)", "parent": 329, "children": [331], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 15}}, {"id": 331, "type": "field_expression", "text": "X->Right", "parent": 330, "children": [332, 333], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 14}}, {"id": 332, "type": "identifier", "text": "X", "parent": 331, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 7}}, {"id": 333, "type": "field_identifier", "text": "Right", "parent": 331, "children": [], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 14}}, {"id": 334, "type": "call_expression", "text": "Enqueue(Q, X->Right)", "parent": 329, "children": [335, 336], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 36}}, {"id": 335, "type": "identifier", "text": "Enqueue", "parent": 334, "children": [], "start_point": {"row": 47, "column": 16}, "end_point": {"row": 47, "column": 23}}, {"id": 336, "type": "argument_list", "text": "(Q, X->Right)", "parent": 334, "children": [337, 338], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 36}}, {"id": 337, "type": "identifier", "text": "Q", "parent": 336, "children": [], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 25}}, {"id": 338, "type": "field_expression", "text": "X->Right", "parent": 336, "children": [339, 340], "start_point": {"row": 47, "column": 27}, "end_point": {"row": 47, "column": 35}}, {"id": 339, "type": "identifier", "text": "X", "parent": 338, "children": [], "start_point": {"row": 47, "column": 27}, "end_point": {"row": 47, "column": 28}}, {"id": 340, "type": "field_identifier", "text": "Right", "parent": 338, "children": [], "start_point": {"row": 47, "column": 30}, "end_point": {"row": 47, "column": 35}}, {"id": 341, "type": "call_expression", "text": "DestroyQueue(Q)", "parent": 254, "children": [342, 343], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 16}}, {"id": 342, "type": "identifier", "text": "DestroyQueue", "parent": 341, "children": [], "start_point": {"row": 49, "column": 1}, "end_point": {"row": 49, "column": 13}}, {"id": 343, "type": "argument_list", "text": "(Q)", "parent": 341, "children": [344], "start_point": {"row": 49, "column": 13}, "end_point": {"row": 49, "column": 16}}, {"id": 344, "type": "identifier", "text": "Q", "parent": 343, "children": [], "start_point": {"row": 49, "column": 14}, "end_point": {"row": 49, "column": 15}}]}, "node_categories": {"declarations": {"functions": [42, 44, 104, 106, 122, 124, 148, 150, 165, 167, 213, 215, 254, 256, 264], "variables": [7, 11, 15, 26, 31, 34, 38, 47, 50, 109, 127, 153, 170, 173, 218, 259, 262, 270, 279, 301], "classes": [17, 18, 23, 24], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [55, 58, 61, 62, 63, 67, 71, 76, 79, 82, 83, 86, 91, 97, 112, 115, 118, 131, 132, 133, 134, 135, 141, 145, 157, 158, 162, 177, 178, 185, 189, 190, 191, 192, 198, 202, 203, 206, 222, 223, 230, 234, 235, 236, 237, 243, 247, 248, 251, 274, 275, 284, 288, 294, 295, 297, 306, 310, 311, 312, 318, 319, 322, 326, 330, 331, 334, 338, 341], "assignments": [66, 85, 90, 96, 184, 201, 229], "loops": [293], "conditionals": [5, 9, 10, 14, 19, 22, 25, 27, 30, 33, 35, 36, 37, 40, 41, 43, 45, 49, 51, 53, 57, 59, 65, 68, 69, 73, 77, 80, 84, 87, 88, 92, 93, 98, 99, 101, 103, 107, 110, 111, 113, 116, 117, 119, 121, 125, 128, 129, 136, 137, 142, 143, 146, 147, 151, 154, 155, 159, 160, 163, 164, 168, 171, 172, 174, 175, 176, 179, 181, 186, 187, 193, 194, 199, 200, 204, 205, 207, 208, 210, 214, 216, 219, 220, 221, 224, 226, 228, 231, 232, 238, 239, 244, 245, 249, 250, 252, 253, 257, 260, 261, 268, 271, 272, 273, 277, 280, 282, 285, 287, 289, 291, 292, 298, 300, 302, 304, 307, 309, 314, 316, 317, 320, 321, 323, 325, 327, 328, 329, 332, 333, 335, 337, 339, 340, 342, 344], "returns": [102, 130, 156, 182, 211, 227, 246, 278], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 95, 139, 196, 241], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 42, "universal_type": "function", "name": "unknown", "text_snippet": "Queue CreateQueue(int QSize) {\n\tQueue Q = (Queue) malloc(sizeof(*Q));\n\tQ->Data = (DataType *) malloc"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "CreateQueue(int QSize)"}, {"node_id": 104, "universal_type": "function", "name": "DestroyQueue", "text_snippet": "void DestroyQueue(Queue Q) {\n\tfree(Q->Data);\n\tfree(Q);\n}"}, {"node_id": 106, "universal_type": "function", "name": "unknown", "text_snippet": "DestroyQueue(Queue Q)"}, {"node_id": 122, "universal_type": "function", "name": "IsFullQ", "text_snippet": "bool IsFullQ(Queue Q) {\n\treturn (Q->Rear+1)%Q->Capacity == Q->Front;\n}"}, {"node_id": 124, "universal_type": "function", "name": "unknown", "text_snippet": "IsFullQ(Queue Q)"}, {"node_id": 148, "universal_type": "function", "name": "IsEmptyQ", "text_snippet": "bool IsEmptyQ(Queue Q) {\n\treturn Q->Front == Q->Rear;\n}"}, {"node_id": 150, "universal_type": "function", "name": "unknown", "text_snippet": "IsEmptyQ(Queue Q)"}, {"node_id": 165, "universal_type": "function", "name": "Enqueue", "text_snippet": "bool Enqueue(Queue Q, DataType X) {\n\tif (IsFullQ(Q)) return false;\n\tQ->Rear = (Q->Rear+1)%Q->Capacit"}, {"node_id": 167, "universal_type": "function", "name": "unknown", "text_snippet": "Enqueue(Queue Q, DataType X)"}, {"node_id": 213, "universal_type": "function", "name": "unknown", "text_snippet": "DataType Dequeue(Queue Q) {\n\tif (IsEmptyQ(Q)) return ERROR;\n\tQ->Front = (Q->Front+1)%Q->Capacity;\n\tr"}, {"node_id": 215, "universal_type": "function", "name": "unknown", "text_snippet": "Dequeue(Queue Q)"}, {"node_id": 254, "universal_type": "function", "name": "Level_order", "text_snippet": "void Level_order(Tree T, void (*visit)(Tree ThisNode)) {\n\tif (!T) return;\n\tQueue Q = CreateQueue(Max"}, {"node_id": 256, "universal_type": "function", "name": "", "text_snippet": "Level_order(Tree T, void (*visit)(Tree ThisNode))"}, {"node_id": 264, "universal_type": "function", "name": "unknown", "text_snippet": "(*visit)(Tree ThisNode)"}], "class_declarations": [{"node_id": 17, "universal_type": "class", "name": "QNode", "text_snippet": "struct QNode"}, {"node_id": 18, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 23, "universal_type": "class", "name": "QNode", "text_snippet": "struct QNode {\n\tDataType *Data;\n\tint Capacity;\n\tPosition Front, Rear;\n}"}, {"node_id": 24, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include <stdbool.h>\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "#include <stdbool.h>\n#define ERROR NULL\ntypedef Tree DataType;\ntypedef int Position;\ntypedef struct QNode *PtrToQNode;\nstruct QNode {\n\tDataType *Data;\n\tint Capacity;\n\tPosition Front, Rear;\n};\ntypedef PtrToQNode Queue;\nQueue CreateQueue(int QSize) {\n\tQueue Q = (Queue) malloc(sizeof(*Q));\n\tQ->Data = (DataType *) malloc(QSize * sizeof(DataType));\n\tQ->Front = Q->Rear = 0;\n\tQ->Capacity = QSize;\n\treturn Q;\n}\nvoid DestroyQueue(Queue Q) {\n\tfree(Q->Data);\n\tfree(Q);\n}\nbool IsFullQ(Queue Q) {\n\treturn (Q->Rear+1)%Q->Capacity == Q->Front;\n}\nbool IsEmptyQ(Queue Q) {\n\treturn Q->Front == Q->Rear;\n}\nbool Enqueue(Queue Q, DataType X) {\n\tif (IsFullQ(Q)) return false;\n\tQ->Rear = (Q->Rear+1)%Q->Capacity;\n\tQ->Data[Q->Rear] = X;\n\treturn true;\n}\nDataType Dequeue(Queue Q) {\n\tif (IsEmptyQ(Q)) return ERROR;\n\tQ->Front = (Q->Front+1)%Q->Capacity;\n\treturn Q->Data[Q->Front];\n}\nvoid Level_order(Tree T, void (*visit)(Tree ThisNode)) {\n\tif (!T) return;\n\tQueue Q = CreateQueue(MaxTree);\n\tEnqueue(Q, T);\n\twhile (!IsEmptyQ(Q)) {\n\t\tDataType X = Dequeue(Q);\n\t\t(*visit)(X);\n\t\tif (X->Left) Enqueue(Q, X->Left);\n\t\tif (X->Right) Enqueue(Q, X->Right);\n\t}\n\tDestroyQueue(Q);\n}\n"}
64
c
/* Copyright 2015 <NAME>, all rights reserved. */ #ifndef GRANARY_CODE_INSTRUCTION_H_ #define GRANARY_CODE_INSTRUCTION_H_ #include "granary/arch/instruction.h" namespace granary { // Represents a decoded application instruction that can be instrumented. class Instruction final { public: Instruction(void) = default; bool IsFunctionCall(void) const; bool IsFunctionReturn(void) const; bool IsInterruptCall(void) const; bool IsInterruptReturn(void) const; bool IsSystemCall(void) const; bool IsSystemReturn(void) const; bool IsJump(void) const; bool IsBranch(void) const; bool IsDirectFunctionCall(void) const; bool IsIndirectFunctionCall(void) const; bool IsDirectJump(void) const; bool IsIndirectJump(void) const; bool IsSerializing(void) const; bool IsUndefined(void) const; bool IsNoOp(void) const; // Beginning program counter of this instruction. AppPC32 StartPC(void) const; // Program counter of the next logical instruction after this instruction. AppPC32 EndPC(void) const; // Size of this instruction in bytes. size_t NumBytes(void) const; // Target of a branch, direct jump, or direct call. These only work on // their respective, non-indirect instruction kinds. AppPC32 BranchTakenPC(void) const; AppPC32 BranchNotTakenPC(void) const; AppPC32 JumpTargetPC(void) const; AppPC32 FunctionCallTargetPC(void) const; GRANARY_PROTECTED: // Internal architecture-specific instruction. arch::Instruction instruction; }; // Iterate forward over application instructions. class InstructionIterator { public: InstructionIterator(const InstructionIterator &) = default; InstructionIterator(InstructionIterator &&) = default; explicit InstructionIterator(Instruction *cursor_); inline bool operator!=(const InstructionIterator &that) const { return cursor != that.cursor; } Instruction *operator*(void) const; InstructionIterator &operator++(void); private: InstructionIterator(void) = delete; Instruction *cursor; }; // Iterate backward over instructions. class ReverseInstructionIterator { public: ReverseInstructionIterator( const ReverseInstructionIterator &) = default; ReverseInstructionIterator(ReverseInstructionIterator &&) = default; explicit ReverseInstructionIterator(Instruction *cursor_); inline bool operator!=(const ReverseInstructionIterator &that) const { return cursor != that.cursor; } Instruction *operator*(void) const; ReverseInstructionIterator &operator++(void); private: ReverseInstructionIterator(void) = delete; Instruction *cursor; }; } // namespace #endif // GRANARY_CODE_INSTRUCTION_H_
35.07
73
(translation_unit) "/* Copyright 2015 <NAME>, all rights reserved. */\n\n#ifndef GRANARY_CODE_INSTRUCTION_H_\n#define GRANARY_CODE_INSTRUCTION_H_\n\n#include "granary/arch/instruction.h"\n\nnamespace granary {\n\n// Represents a decoded application instruction that can be instrumented.\nclass Instruction final {\n public:\n Instruction(void) = default;\n\n bool IsFunctionCall(void) const;\n bool IsFunctionReturn(void) const;\n bool IsInterruptCall(void) const;\n bool IsInterruptReturn(void) const;\n bool IsSystemCall(void) const;\n bool IsSystemReturn(void) const;\n bool IsJump(void) const;\n bool IsBranch(void) const;\n\n bool IsDirectFunctionCall(void) const;\n bool IsIndirectFunctionCall(void) const;\n\n bool IsDirectJump(void) const;\n bool IsIndirectJump(void) const;\n\n bool IsSerializing(void) const;\n bool IsUndefined(void) const;\n\n bool IsNoOp(void) const;\n\n // Beginning program counter of this instruction.\n AppPC32 StartPC(void) const;\n\n // Program counter of the next logical instruction after this instruction.\n AppPC32 EndPC(void) const;\n\n // Size of this instruction in bytes.\n size_t NumBytes(void) const;\n\n // Target of a branch, direct jump, or direct call. These only work on\n // their respective, non-indirect instruction kinds.\n AppPC32 BranchTakenPC(void) const;\n AppPC32 BranchNotTakenPC(void) const;\n AppPC32 JumpTargetPC(void) const;\n AppPC32 FunctionCallTargetPC(void) const;\n\n GRANARY_PROTECTED:\n // Internal architecture-specific instruction.\n arch::Instruction instruction;\n};\n\n// Iterate forward over application instructions.\nclass InstructionIterator {\n public:\n InstructionIterator(const InstructionIterator &) = default;\n InstructionIterator(InstructionIterator &&) = default;\n\n explicit InstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const InstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n InstructionIterator &operator++(void);\n\n private:\n InstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n// Iterate backward over instructions.\nclass ReverseInstructionIterator {\n public:\n ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;\n ReverseInstructionIterator(ReverseInstructionIterator &&) = default;\n\n explicit ReverseInstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const ReverseInstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n ReverseInstructionIterator &operator++(void);\n\n private:\n ReverseInstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n} // namespace\n\n#endif // GRANARY_CODE_INSTRUCTION_H_\n" (comment) "/* Copyright 2015 <NAME>, all rights reserved. */" (preproc_ifdef) "#ifndef GRANARY_CODE_INSTRUCTION_H_\n#define GRANARY_CODE_INSTRUCTION_H_\n\n#include "granary/arch/instruction.h"\n\nnamespace granary {\n\n// Represents a decoded application instruction that can be instrumented.\nclass Instruction final {\n public:\n Instruction(void) = default;\n\n bool IsFunctionCall(void) const;\n bool IsFunctionReturn(void) const;\n bool IsInterruptCall(void) const;\n bool IsInterruptReturn(void) const;\n bool IsSystemCall(void) const;\n bool IsSystemReturn(void) const;\n bool IsJump(void) const;\n bool IsBranch(void) const;\n\n bool IsDirectFunctionCall(void) const;\n bool IsIndirectFunctionCall(void) const;\n\n bool IsDirectJump(void) const;\n bool IsIndirectJump(void) const;\n\n bool IsSerializing(void) const;\n bool IsUndefined(void) const;\n\n bool IsNoOp(void) const;\n\n // Beginning program counter of this instruction.\n AppPC32 StartPC(void) const;\n\n // Program counter of the next logical instruction after this instruction.\n AppPC32 EndPC(void) const;\n\n // Size of this instruction in bytes.\n size_t NumBytes(void) const;\n\n // Target of a branch, direct jump, or direct call. These only work on\n // their respective, non-indirect instruction kinds.\n AppPC32 BranchTakenPC(void) const;\n AppPC32 BranchNotTakenPC(void) const;\n AppPC32 JumpTargetPC(void) const;\n AppPC32 FunctionCallTargetPC(void) const;\n\n GRANARY_PROTECTED:\n // Internal architecture-specific instruction.\n arch::Instruction instruction;\n};\n\n// Iterate forward over application instructions.\nclass InstructionIterator {\n public:\n InstructionIterator(const InstructionIterator &) = default;\n InstructionIterator(InstructionIterator &&) = default;\n\n explicit InstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const InstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n InstructionIterator &operator++(void);\n\n private:\n InstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n// Iterate backward over instructions.\nclass ReverseInstructionIterator {\n public:\n ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;\n ReverseInstructionIterator(ReverseInstructionIterator &&) = default;\n\n explicit ReverseInstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const ReverseInstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n ReverseInstructionIterator &operator++(void);\n\n private:\n ReverseInstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n} // namespace\n\n#endif" (#ifndef) "#ifndef" (identifier) "GRANARY_CODE_INSTRUCTION_H_" (preproc_def) "#define GRANARY_CODE_INSTRUCTION_H_\n" (#define) "#define" (identifier) "GRANARY_CODE_INSTRUCTION_H_" (preproc_include) "#include "granary/arch/instruction.h"\n" (#include) "#include" (string_literal) ""granary/arch/instruction.h"" (") """ (string_content) "granary/arch/instruction.h" (") """ (function_definition) "namespace granary {\n\n// Represents a decoded application instruction that can be instrumented.\nclass Instruction final {\n public:\n Instruction(void) = default;\n\n bool IsFunctionCall(void) const;\n bool IsFunctionReturn(void) const;\n bool IsInterruptCall(void) const;\n bool IsInterruptReturn(void) const;\n bool IsSystemCall(void) const;\n bool IsSystemReturn(void) const;\n bool IsJump(void) const;\n bool IsBranch(void) const;\n\n bool IsDirectFunctionCall(void) const;\n bool IsIndirectFunctionCall(void) const;\n\n bool IsDirectJump(void) const;\n bool IsIndirectJump(void) const;\n\n bool IsSerializing(void) const;\n bool IsUndefined(void) const;\n\n bool IsNoOp(void) const;\n\n // Beginning program counter of this instruction.\n AppPC32 StartPC(void) const;\n\n // Program counter of the next logical instruction after this instruction.\n AppPC32 EndPC(void) const;\n\n // Size of this instruction in bytes.\n size_t NumBytes(void) const;\n\n // Target of a branch, direct jump, or direct call. These only work on\n // their respective, non-indirect instruction kinds.\n AppPC32 BranchTakenPC(void) const;\n AppPC32 BranchNotTakenPC(void) const;\n AppPC32 JumpTargetPC(void) const;\n AppPC32 FunctionCallTargetPC(void) const;\n\n GRANARY_PROTECTED:\n // Internal architecture-specific instruction.\n arch::Instruction instruction;\n};\n\n// Iterate forward over application instructions.\nclass InstructionIterator {\n public:\n InstructionIterator(const InstructionIterator &) = default;\n InstructionIterator(InstructionIterator &&) = default;\n\n explicit InstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const InstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n InstructionIterator &operator++(void);\n\n private:\n InstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n// Iterate backward over instructions.\nclass ReverseInstructionIterator {\n public:\n ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;\n ReverseInstructionIterator(ReverseInstructionIterator &&) = default;\n\n explicit ReverseInstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const ReverseInstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n ReverseInstructionIterator &operator++(void);\n\n private:\n ReverseInstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n}" (type_identifier) "namespace" (identifier) "granary" (compound_statement) "{\n\n// Represents a decoded application instruction that can be instrumented.\nclass Instruction final {\n public:\n Instruction(void) = default;\n\n bool IsFunctionCall(void) const;\n bool IsFunctionReturn(void) const;\n bool IsInterruptCall(void) const;\n bool IsInterruptReturn(void) const;\n bool IsSystemCall(void) const;\n bool IsSystemReturn(void) const;\n bool IsJump(void) const;\n bool IsBranch(void) const;\n\n bool IsDirectFunctionCall(void) const;\n bool IsIndirectFunctionCall(void) const;\n\n bool IsDirectJump(void) const;\n bool IsIndirectJump(void) const;\n\n bool IsSerializing(void) const;\n bool IsUndefined(void) const;\n\n bool IsNoOp(void) const;\n\n // Beginning program counter of this instruction.\n AppPC32 StartPC(void) const;\n\n // Program counter of the next logical instruction after this instruction.\n AppPC32 EndPC(void) const;\n\n // Size of this instruction in bytes.\n size_t NumBytes(void) const;\n\n // Target of a branch, direct jump, or direct call. These only work on\n // their respective, non-indirect instruction kinds.\n AppPC32 BranchTakenPC(void) const;\n AppPC32 BranchNotTakenPC(void) const;\n AppPC32 JumpTargetPC(void) const;\n AppPC32 FunctionCallTargetPC(void) const;\n\n GRANARY_PROTECTED:\n // Internal architecture-specific instruction.\n arch::Instruction instruction;\n};\n\n// Iterate forward over application instructions.\nclass InstructionIterator {\n public:\n InstructionIterator(const InstructionIterator &) = default;\n InstructionIterator(InstructionIterator &&) = default;\n\n explicit InstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const InstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n InstructionIterator &operator++(void);\n\n private:\n InstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n// Iterate backward over instructions.\nclass ReverseInstructionIterator {\n public:\n ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;\n ReverseInstructionIterator(ReverseInstructionIterator &&) = default;\n\n explicit ReverseInstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const ReverseInstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n ReverseInstructionIterator &operator++(void);\n\n private:\n ReverseInstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n}" ({) "{" (comment) "// Represents a decoded application instruction that can be instrumented." (function_definition) "class Instruction final {\n public:\n Instruction(void) = default;\n\n bool IsFunctionCall(void) const;\n bool IsFunctionReturn(void) const;\n bool IsInterruptCall(void) const;\n bool IsInterruptReturn(void) const;\n bool IsSystemCall(void) const;\n bool IsSystemReturn(void) const;\n bool IsJump(void) const;\n bool IsBranch(void) const;\n\n bool IsDirectFunctionCall(void) const;\n bool IsIndirectFunctionCall(void) const;\n\n bool IsDirectJump(void) const;\n bool IsIndirectJump(void) const;\n\n bool IsSerializing(void) const;\n bool IsUndefined(void) const;\n\n bool IsNoOp(void) const;\n\n // Beginning program counter of this instruction.\n AppPC32 StartPC(void) const;\n\n // Program counter of the next logical instruction after this instruction.\n AppPC32 EndPC(void) const;\n\n // Size of this instruction in bytes.\n size_t NumBytes(void) const;\n\n // Target of a branch, direct jump, or direct call. These only work on\n // their respective, non-indirect instruction kinds.\n AppPC32 BranchTakenPC(void) const;\n AppPC32 BranchNotTakenPC(void) const;\n AppPC32 JumpTargetPC(void) const;\n AppPC32 FunctionCallTargetPC(void) const;\n\n GRANARY_PROTECTED:\n // Internal architecture-specific instruction.\n arch::Instruction instruction;\n}" (type_identifier) "class" (identifier) "Instruction" (ERROR) "final" (identifier) "final" (compound_statement) "{\n public:\n Instruction(void) = default;\n\n bool IsFunctionCall(void) const;\n bool IsFunctionReturn(void) const;\n bool IsInterruptCall(void) const;\n bool IsInterruptReturn(void) const;\n bool IsSystemCall(void) const;\n bool IsSystemReturn(void) const;\n bool IsJump(void) const;\n bool IsBranch(void) const;\n\n bool IsDirectFunctionCall(void) const;\n bool IsIndirectFunctionCall(void) const;\n\n bool IsDirectJump(void) const;\n bool IsIndirectJump(void) const;\n\n bool IsSerializing(void) const;\n bool IsUndefined(void) const;\n\n bool IsNoOp(void) const;\n\n // Beginning program counter of this instruction.\n AppPC32 StartPC(void) const;\n\n // Program counter of the next logical instruction after this instruction.\n AppPC32 EndPC(void) const;\n\n // Size of this instruction in bytes.\n size_t NumBytes(void) const;\n\n // Target of a branch, direct jump, or direct call. These only work on\n // their respective, non-indirect instruction kinds.\n AppPC32 BranchTakenPC(void) const;\n AppPC32 BranchNotTakenPC(void) const;\n AppPC32 JumpTargetPC(void) const;\n AppPC32 FunctionCallTargetPC(void) const;\n\n GRANARY_PROTECTED:\n // Internal architecture-specific instruction.\n arch::Instruction instruction;\n}" ({) "{" (labeled_statement) "public:\n Instruction(void) = default;" (statement_identifier) "public" (:) ":" (expression_statement) "Instruction(void) = default;" (assignment_expression) "Instruction(void) = default" (call_expression) "Instruction(void)" (identifier) "Instruction" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (=) "=" (identifier) "default" (;) ";" (ERROR) "bool IsFunctionCall(void) const" (primitive_type) "bool" (function_declarator) "IsFunctionCall(void) const" (identifier) "IsFunctionCall" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsFunctionReturn(void) const" (primitive_type) "bool" (function_declarator) "IsFunctionReturn(void) const" (identifier) "IsFunctionReturn" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsInterruptCall(void) const" (primitive_type) "bool" (function_declarator) "IsInterruptCall(void) const" (identifier) "IsInterruptCall" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsInterruptReturn(void) const" (primitive_type) "bool" (function_declarator) "IsInterruptReturn(void) const" (identifier) "IsInterruptReturn" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsSystemCall(void) const" (primitive_type) "bool" (function_declarator) "IsSystemCall(void) const" (identifier) "IsSystemCall" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsSystemReturn(void) const" (primitive_type) "bool" (function_declarator) "IsSystemReturn(void) const" (identifier) "IsSystemReturn" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsJump(void) const" (primitive_type) "bool" (function_declarator) "IsJump(void) const" (identifier) "IsJump" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsBranch(void) const" (primitive_type) "bool" (function_declarator) "IsBranch(void) const" (identifier) "IsBranch" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsDirectFunctionCall(void) const" (primitive_type) "bool" (function_declarator) "IsDirectFunctionCall(void) const" (identifier) "IsDirectFunctionCall" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsIndirectFunctionCall(void) const" (primitive_type) "bool" (function_declarator) "IsIndirectFunctionCall(void) const" (identifier) "IsIndirectFunctionCall" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsDirectJump(void) const" (primitive_type) "bool" (function_declarator) "IsDirectJump(void) const" (identifier) "IsDirectJump" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsIndirectJump(void) const" (primitive_type) "bool" (function_declarator) "IsIndirectJump(void) const" (identifier) "IsIndirectJump" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsSerializing(void) const" (primitive_type) "bool" (function_declarator) "IsSerializing(void) const" (identifier) "IsSerializing" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsUndefined(void) const" (primitive_type) "bool" (function_declarator) "IsUndefined(void) const" (identifier) "IsUndefined" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "bool IsNoOp(void) const" (primitive_type) "bool" (function_declarator) "IsNoOp(void) const" (identifier) "IsNoOp" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (comment) "// Beginning program counter of this instruction." (ERROR) "AppPC32 StartPC(void) const" (type_identifier) "AppPC32" (function_declarator) "StartPC(void) const" (identifier) "StartPC" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (comment) "// Program counter of the next logical instruction after this instruction." (ERROR) "AppPC32 EndPC(void) const" (type_identifier) "AppPC32" (function_declarator) "EndPC(void) const" (identifier) "EndPC" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (comment) "// Size of this instruction in bytes." (ERROR) "size_t NumBytes(void) const" (primitive_type) "size_t" (function_declarator) "NumBytes(void) const" (identifier) "NumBytes" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (comment) "// Target of a branch, direct jump, or direct call. These only work on" (comment) "// their respective, non-indirect instruction kinds." (ERROR) "AppPC32 BranchTakenPC(void) const" (type_identifier) "AppPC32" (function_declarator) "BranchTakenPC(void) const" (identifier) "BranchTakenPC" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "AppPC32 BranchNotTakenPC(void) const" (type_identifier) "AppPC32" (function_declarator) "BranchNotTakenPC(void) const" (identifier) "BranchNotTakenPC" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "AppPC32 JumpTargetPC(void) const" (type_identifier) "AppPC32" (function_declarator) "JumpTargetPC(void) const" (identifier) "JumpTargetPC" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (ERROR) "AppPC32 FunctionCallTargetPC(void) const" (type_identifier) "AppPC32" (function_declarator) "FunctionCallTargetPC(void) const" (identifier) "FunctionCallTargetPC" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (identifier) "const" (expression_statement) ";" (;) ";" (labeled_statement) "GRANARY_PROTECTED:\n // Internal architecture-specific instruction.\n arch::Instruction instruction;" (statement_identifier) "GRANARY_PROTECTED" (:) ":" (comment) "// Internal architecture-specific instruction." (labeled_statement) "arch::Instruction instruction;" (statement_identifier) "arch" (:) ":" (ERROR) ":" (:) ":" (declaration) "Instruction instruction;" (type_identifier) "Instruction" (identifier) "instruction" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "// Iterate forward over application instructions." (function_definition) "class InstructionIterator {\n public:\n InstructionIterator(const InstructionIterator &) = default;\n InstructionIterator(InstructionIterator &&) = default;\n\n explicit InstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const InstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n InstructionIterator &operator++(void);\n\n private:\n InstructionIterator(void) = delete;\n\n Instruction *cursor;\n}" (type_identifier) "class" (identifier) "InstructionIterator" (compound_statement) "{\n public:\n InstructionIterator(const InstructionIterator &) = default;\n InstructionIterator(InstructionIterator &&) = default;\n\n explicit InstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const InstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n InstructionIterator &operator++(void);\n\n private:\n InstructionIterator(void) = delete;\n\n Instruction *cursor;\n}" ({) "{" (labeled_statement) "public:\n InstructionIterator(const InstructionIterator &) = default;" (statement_identifier) "public" (:) ":" (declaration) "InstructionIterator(const InstructionIterator &) = default;" (macro_type_specifier) "InstructionIterator(const InstructionIterator &)" (identifier) "InstructionIterator" (() "(" (type_descriptor) "const InstructionIterator" (type_qualifier) "const" (const) "const" (type_identifier) "InstructionIterator" (ERROR) "&" (&) "&" ()) ")" (init_declarator) " = default" (identifier) "" (=) "=" (identifier) "default" (;) ";" (expression_statement) "InstructionIterator(InstructionIterator &&) = default;" (assignment_expression) "InstructionIterator(InstructionIterator &&) = default" (call_expression) "InstructionIterator(InstructionIterator &&)" (identifier) "InstructionIterator" (argument_list) "(InstructionIterator &&)" (() "(" (binary_expression) "InstructionIterator &&" (identifier) "InstructionIterator" (&&) "&&" (identifier) "" ()) ")" (=) "=" (identifier) "default" (;) ";" (declaration) "explicit InstructionIterator(Instruction *cursor_);" (type_identifier) "explicit" (function_declarator) "InstructionIterator(Instruction *cursor_)" (identifier) "InstructionIterator" (parameter_list) "(Instruction *cursor_)" (() "(" (parameter_declaration) "Instruction *cursor_" (type_identifier) "Instruction" (pointer_declarator) "*cursor_" (*) "*" (identifier) "cursor_" ()) ")" (;) ";" (function_definition) "inline bool operator!=(const InstructionIterator &that) const {\n return cursor != that.cursor;\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "bool" (ERROR) "operator!=(const InstructionIterator &" (identifier) "operator" (!=) "!=" (() "(" (const) "const" (identifier) "InstructionIterator" (&) "&" (identifier) "that" (ERROR) ") const" ()) ")" (const) "const" (compound_statement) "{\n return cursor != that.cursor;\n }" ({) "{" (return_statement) "return cursor != that.cursor;" (return) "return" (binary_expression) "cursor != that.cursor" (identifier) "cursor" (!=) "!=" (field_expression) "that.cursor" (identifier) "that" (.) "." (field_identifier) "cursor" (;) ";" (}) "}" (expression_statement) "Instruction *operator*(void) const;" (binary_expression) "Instruction *operator*(void) const" (binary_expression) "Instruction *operator" (identifier) "Instruction" (*) "*" (identifier) "operator" (*) "*" (cast_expression) "(void) const" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "const" (;) ";" (expression_statement) "InstructionIterator &operator++(void);" (binary_expression) "InstructionIterator &operator++(void)" (identifier) "InstructionIterator" (&) "&" (call_expression) "operator++(void)" (update_expression) "operator++" (identifier) "operator" (++) "++" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (labeled_statement) "private:\n InstructionIterator(void) = delete;" (statement_identifier) "private" (:) ":" (expression_statement) "InstructionIterator(void) = delete;" (assignment_expression) "InstructionIterator(void) = delete" (call_expression) "InstructionIterator(void)" (identifier) "InstructionIterator" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (=) "=" (identifier) "delete" (;) ";" (declaration) "Instruction *cursor;" (type_identifier) "Instruction" (pointer_declarator) "*cursor" (*) "*" (identifier) "cursor" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (comment) "// Iterate backward over instructions." (function_definition) "class ReverseInstructionIterator {\n public:\n ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;\n ReverseInstructionIterator(ReverseInstructionIterator &&) = default;\n\n explicit ReverseInstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const ReverseInstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n ReverseInstructionIterator &operator++(void);\n\n private:\n ReverseInstructionIterator(void) = delete;\n\n Instruction *cursor;\n}" (type_identifier) "class" (identifier) "ReverseInstructionIterator" (compound_statement) "{\n public:\n ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;\n ReverseInstructionIterator(ReverseInstructionIterator &&) = default;\n\n explicit ReverseInstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const ReverseInstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n ReverseInstructionIterator &operator++(void);\n\n private:\n ReverseInstructionIterator(void) = delete;\n\n Instruction *cursor;\n}" ({) "{" (labeled_statement) "public:\n ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;" (statement_identifier) "public" (:) ":" (declaration) "ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;" (macro_type_specifier) "ReverseInstructionIterator(\n const ReverseInstructionIterator &)" (identifier) "ReverseInstructionIterator" (() "(" (type_descriptor) "const ReverseInstructionIterator" (type_qualifier) "const" (const) "const" (type_identifier) "ReverseInstructionIterator" (ERROR) "&" (&) "&" ()) ")" (init_declarator) " = default" (identifier) "" (=) "=" (identifier) "default" (;) ";" (expression_statement) "ReverseInstructionIterator(ReverseInstructionIterator &&) = default;" (assignment_expression) "ReverseInstructionIterator(ReverseInstructionIterator &&) = default" (call_expression) "ReverseInstructionIterator(ReverseInstructionIterator &&)" (identifier) "ReverseInstructionIterator" (argument_list) "(ReverseInstructionIterator &&)" (() "(" (binary_expression) "ReverseInstructionIterator &&" (identifier) "ReverseInstructionIterator" (&&) "&&" (identifier) "" ()) ")" (=) "=" (identifier) "default" (;) ";" (declaration) "explicit ReverseInstructionIterator(Instruction *cursor_);" (type_identifier) "explicit" (function_declarator) "ReverseInstructionIterator(Instruction *cursor_)" (identifier) "ReverseInstructionIterator" (parameter_list) "(Instruction *cursor_)" (() "(" (parameter_declaration) "Instruction *cursor_" (type_identifier) "Instruction" (pointer_declarator) "*cursor_" (*) "*" (identifier) "cursor_" ()) ")" (;) ";" (function_definition) "inline bool operator!=(const ReverseInstructionIterator &that) const {\n return cursor != that.cursor;\n }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "bool" (ERROR) "operator!=(const ReverseInstructionIterator &" (identifier) "operator" (!=) "!=" (() "(" (const) "const" (identifier) "ReverseInstructionIterator" (&) "&" (identifier) "that" (ERROR) ") const" ()) ")" (const) "const" (compound_statement) "{\n return cursor != that.cursor;\n }" ({) "{" (return_statement) "return cursor != that.cursor;" (return) "return" (binary_expression) "cursor != that.cursor" (identifier) "cursor" (!=) "!=" (field_expression) "that.cursor" (identifier) "that" (.) "." (field_identifier) "cursor" (;) ";" (}) "}" (expression_statement) "Instruction *operator*(void) const;" (binary_expression) "Instruction *operator*(void) const" (binary_expression) "Instruction *operator" (identifier) "Instruction" (*) "*" (identifier) "operator" (*) "*" (cast_expression) "(void) const" (() "(" (type_descriptor) "void" (primitive_type) "void" ()) ")" (identifier) "const" (;) ";" (expression_statement) "ReverseInstructionIterator &operator++(void);" (binary_expression) "ReverseInstructionIterator &operator++(void)" (identifier) "ReverseInstructionIterator" (&) "&" (call_expression) "operator++(void)" (update_expression) "operator++" (identifier) "operator" (++) "++" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (;) ";" (labeled_statement) "private:\n ReverseInstructionIterator(void) = delete;" (statement_identifier) "private" (:) ":" (expression_statement) "ReverseInstructionIterator(void) = delete;" (assignment_expression) "ReverseInstructionIterator(void) = delete" (call_expression) "ReverseInstructionIterator(void)" (identifier) "ReverseInstructionIterator" (argument_list) "(void)" (() "(" (identifier) "void" ()) ")" (=) "=" (identifier) "delete" (;) ";" (declaration) "Instruction *cursor;" (type_identifier) "Instruction" (pointer_declarator) "*cursor" (*) "*" (identifier) "cursor" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace" (#endif) "#endif" (comment) "// GRANARY_CODE_INSTRUCTION_H_"
590
30
{"language": "c", "success": true, "metadata": {"lines": 73, "avg_line_length": 35.07, "nodes": 342, "errors": 0, "source_hash": "bbbfeddb207aa73eb4f3e2c207a9f7c589f897818d68f4d9deb6e62585a34279", "categorized_nodes": 198}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef GRANARY_CODE_INSTRUCTION_H_\n#define GRANARY_CODE_INSTRUCTION_H_\n\n#include \"granary/arch/instruction.h\"\n\nnamespace granary {\n\n// Represents a decoded application instruction that can be instrumented.\nclass Instruction final {\n public:\n Instruction(void) = default;\n\n bool IsFunctionCall(void) const;\n bool IsFunctionReturn(void) const;\n bool IsInterruptCall(void) const;\n bool IsInterruptReturn(void) const;\n bool IsSystemCall(void) const;\n bool IsSystemReturn(void) const;\n bool IsJump(void) const;\n bool IsBranch(void) const;\n\n bool IsDirectFunctionCall(void) const;\n bool IsIndirectFunctionCall(void) const;\n\n bool IsDirectJump(void) const;\n bool IsIndirectJump(void) const;\n\n bool IsSerializing(void) const;\n bool IsUndefined(void) const;\n\n bool IsNoOp(void) const;\n\n // Beginning program counter of this instruction.\n AppPC32 StartPC(void) const;\n\n // Program counter of the next logical instruction after this instruction.\n AppPC32 EndPC(void) const;\n\n // Size of this instruction in bytes.\n size_t NumBytes(void) const;\n\n // Target of a branch, direct jump, or direct call. These only work on\n // their respective, non-indirect instruction kinds.\n AppPC32 BranchTakenPC(void) const;\n AppPC32 BranchNotTakenPC(void) const;\n AppPC32 JumpTargetPC(void) const;\n AppPC32 FunctionCallTargetPC(void) const;\n\n GRANARY_PROTECTED:\n // Internal architecture-specific instruction.\n arch::Instruction instruction;\n};\n\n// Iterate forward over application instructions.\nclass InstructionIterator {\n public:\n InstructionIterator(const InstructionIterator &) = default;\n InstructionIterator(InstructionIterator &&) = default;\n\n explicit InstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const InstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n InstructionIterator &operator++(void);\n\n private:\n InstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n// Iterate backward over instructions.\nclass ReverseInstructionIterator {\n public:\n ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;\n ReverseInstructionIterator(ReverseInstructionIterator &&) = default;\n\n explicit ReverseInstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const ReverseInstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n ReverseInstructionIterator &operator++(void);\n\n private:\n ReverseInstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n} // namespace\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 341], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 100, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 2, "type": "identifier", "text": "GRANARY_CODE_INSTRUCTION_H_", "parent": 0, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 35}}, {"id": 3, "type": "preproc_def", "text": "#define GRANARY_CODE_INSTRUCTION_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 5, "type": "identifier", "text": "GRANARY_CODE_INSTRUCTION_H_", "parent": 3, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 35}}, {"id": 6, "type": "preproc_include", "text": "#include \"granary/arch/instruction.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"granary/arch/instruction.h\"", "parent": 6, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 37}}, {"id": 9, "type": "function_definition", "text": "namespace granary {\n\n// Represents a decoded application instruction that can be instrumented.\nclass Instruction final {\n public:\n Instruction(void) = default;\n\n bool IsFunctionCall(void) const;\n bool IsFunctionReturn(void) const;\n bool IsInterruptCall(void) const;\n bool IsInterruptReturn(void) const;\n bool IsSystemCall(void) const;\n bool IsSystemReturn(void) const;\n bool IsJump(void) const;\n bool IsBranch(void) const;\n\n bool IsDirectFunctionCall(void) const;\n bool IsIndirectFunctionCall(void) const;\n\n bool IsDirectJump(void) const;\n bool IsIndirectJump(void) const;\n\n bool IsSerializing(void) const;\n bool IsUndefined(void) const;\n\n bool IsNoOp(void) const;\n\n // Beginning program counter of this instruction.\n AppPC32 StartPC(void) const;\n\n // Program counter of the next logical instruction after this instruction.\n AppPC32 EndPC(void) const;\n\n // Size of this instruction in bytes.\n size_t NumBytes(void) const;\n\n // Target of a branch, direct jump, or direct call. These only work on\n // their respective, non-indirect instruction kinds.\n AppPC32 BranchTakenPC(void) const;\n AppPC32 BranchNotTakenPC(void) const;\n AppPC32 JumpTargetPC(void) const;\n AppPC32 FunctionCallTargetPC(void) const;\n\n GRANARY_PROTECTED:\n // Internal architecture-specific instruction.\n arch::Instruction instruction;\n};\n\n// Iterate forward over application instructions.\nclass InstructionIterator {\n public:\n InstructionIterator(const InstructionIterator &) = default;\n InstructionIterator(InstructionIterator &&) = default;\n\n explicit InstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const InstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n InstructionIterator &operator++(void);\n\n private:\n InstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n// Iterate backward over instructions.\nclass ReverseInstructionIterator {\n public:\n ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;\n ReverseInstructionIterator(ReverseInstructionIterator &&) = default;\n\n explicit ReverseInstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const ReverseInstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n ReverseInstructionIterator &operator++(void);\n\n private:\n ReverseInstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n}", "parent": 0, "children": [10, 11], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 98, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 9}}, {"id": 11, "type": "identifier", "text": "granary", "parent": 9, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 17}}, {"id": 12, "type": "function_definition", "text": "class Instruction final {\n public:\n Instruction(void) = default;\n\n bool IsFunctionCall(void) const;\n bool IsFunctionReturn(void) const;\n bool IsInterruptCall(void) const;\n bool IsInterruptReturn(void) const;\n bool IsSystemCall(void) const;\n bool IsSystemReturn(void) const;\n bool IsJump(void) const;\n bool IsBranch(void) const;\n\n bool IsDirectFunctionCall(void) const;\n bool IsIndirectFunctionCall(void) const;\n\n bool IsDirectJump(void) const;\n bool IsIndirectJump(void) const;\n\n bool IsSerializing(void) const;\n bool IsUndefined(void) const;\n\n bool IsNoOp(void) const;\n\n // Beginning program counter of this instruction.\n AppPC32 StartPC(void) const;\n\n // Program counter of the next logical instruction after this instruction.\n AppPC32 EndPC(void) const;\n\n // Size of this instruction in bytes.\n size_t NumBytes(void) const;\n\n // Target of a branch, direct jump, or direct call. These only work on\n // their respective, non-indirect instruction kinds.\n AppPC32 BranchTakenPC(void) const;\n AppPC32 BranchNotTakenPC(void) const;\n AppPC32 JumpTargetPC(void) const;\n AppPC32 FunctionCallTargetPC(void) const;\n\n GRANARY_PROTECTED:\n // Internal architecture-specific instruction.\n arch::Instruction instruction;\n}", "parent": 9, "children": [13, 14], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 53, "column": 1}}, {"id": 13, "type": "identifier", "text": "Instruction", "parent": 12, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 17}}, {"id": 14, "type": "ERROR", "text": "final", "parent": 12, "children": [15], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 23}}, {"id": 15, "type": "identifier", "text": "final", "parent": 14, "children": [], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 23}}, {"id": 16, "type": "labeled_statement", "text": "public:\n Instruction(void) = default;", "parent": 12, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 12, "column": 30}}, {"id": 17, "type": "assignment_expression", "text": "Instruction(void) = default", "parent": 16, "children": [18, 22, 23], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 29}}, {"id": 18, "type": "call_expression", "text": "Instruction(void)", "parent": 17, "children": [19, 20], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 19}}, {"id": 19, "type": "identifier", "text": "Instruction", "parent": 18, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 13}}, {"id": 20, "type": "argument_list", "text": "(void)", "parent": 18, "children": [21], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 19}}, {"id": 21, "type": "identifier", "text": "void", "parent": 20, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 18}}, {"id": 22, "type": "=", "text": "=", "parent": 17, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 21}}, {"id": 23, "type": "identifier", "text": "default", "parent": 17, "children": [], "start_point": {"row": 12, "column": 22}, "end_point": {"row": 12, "column": 29}}, {"id": 24, "type": "ERROR", "text": "bool IsFunctionCall(void) const", "parent": 12, "children": [25, 26], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 33}}, {"id": 25, "type": "primitive_type", "text": "bool", "parent": 24, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 6}}, {"id": 26, "type": "function_declarator", "text": "IsFunctionCall(void) const", "parent": 24, "children": [27, 28], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 33}}, {"id": 27, "type": "identifier", "text": "IsFunctionCall", "parent": 26, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 21}}, {"id": 28, "type": "parameter_list", "text": "(void)", "parent": 26, "children": [29], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 27}}, {"id": 29, "type": "parameter_declaration", "text": "void", "parent": 28, "children": [30], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 26}}, {"id": 30, "type": "primitive_type", "text": "void", "parent": 29, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 26}}, {"id": 31, "type": "ERROR", "text": "bool IsFunctionReturn(void) const", "parent": 12, "children": [32, 33], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 35}}, {"id": 32, "type": "primitive_type", "text": "bool", "parent": 31, "children": [], "start_point": {"row": 15, "column": 2}, "end_point": {"row": 15, "column": 6}}, {"id": 33, "type": "function_declarator", "text": "IsFunctionReturn(void) const", "parent": 31, "children": [34, 35], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 35}}, {"id": 34, "type": "identifier", "text": "IsFunctionReturn", "parent": 33, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 23}}, {"id": 35, "type": "parameter_list", "text": "(void)", "parent": 33, "children": [36], "start_point": {"row": 15, "column": 23}, "end_point": {"row": 15, "column": 29}}, {"id": 36, "type": "parameter_declaration", "text": "void", "parent": 35, "children": [37], "start_point": {"row": 15, "column": 24}, "end_point": {"row": 15, "column": 28}}, {"id": 37, "type": "primitive_type", "text": "void", "parent": 36, "children": [], "start_point": {"row": 15, "column": 24}, "end_point": {"row": 15, "column": 28}}, {"id": 38, "type": "ERROR", "text": "bool IsInterruptCall(void) const", "parent": 12, "children": [39, 40], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 34}}, {"id": 39, "type": "primitive_type", "text": "bool", "parent": 38, "children": [], "start_point": {"row": 16, "column": 2}, "end_point": {"row": 16, "column": 6}}, {"id": 40, "type": "function_declarator", "text": "IsInterruptCall(void) const", "parent": 38, "children": [41, 42], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 34}}, {"id": 41, "type": "identifier", "text": "IsInterruptCall", "parent": 40, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 22}}, {"id": 42, "type": "parameter_list", "text": "(void)", "parent": 40, "children": [43], "start_point": {"row": 16, "column": 22}, "end_point": {"row": 16, "column": 28}}, {"id": 43, "type": "parameter_declaration", "text": "void", "parent": 42, "children": [44], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 27}}, {"id": 44, "type": "primitive_type", "text": "void", "parent": 43, "children": [], "start_point": {"row": 16, "column": 23}, "end_point": {"row": 16, "column": 27}}, {"id": 45, "type": "ERROR", "text": "bool IsInterruptReturn(void) const", "parent": 12, "children": [46, 47], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 36}}, {"id": 46, "type": "primitive_type", "text": "bool", "parent": 45, "children": [], "start_point": {"row": 17, "column": 2}, "end_point": {"row": 17, "column": 6}}, {"id": 47, "type": "function_declarator", "text": "IsInterruptReturn(void) const", "parent": 45, "children": [48, 49], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 36}}, {"id": 48, "type": "identifier", "text": "IsInterruptReturn", "parent": 47, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 24}}, {"id": 49, "type": "parameter_list", "text": "(void)", "parent": 47, "children": [50], "start_point": {"row": 17, "column": 24}, "end_point": {"row": 17, "column": 30}}, {"id": 50, "type": "parameter_declaration", "text": "void", "parent": 49, "children": [51], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 29}}, {"id": 51, "type": "primitive_type", "text": "void", "parent": 50, "children": [], "start_point": {"row": 17, "column": 25}, "end_point": {"row": 17, "column": 29}}, {"id": 52, "type": "ERROR", "text": "bool IsSystemCall(void) const", "parent": 12, "children": [53, 54], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 31}}, {"id": 53, "type": "primitive_type", "text": "bool", "parent": 52, "children": [], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 6}}, {"id": 54, "type": "function_declarator", "text": "IsSystemCall(void) const", "parent": 52, "children": [55, 56], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 31}}, {"id": 55, "type": "identifier", "text": "IsSystemCall", "parent": 54, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 19}}, {"id": 56, "type": "parameter_list", "text": "(void)", "parent": 54, "children": [57], "start_point": {"row": 18, "column": 19}, "end_point": {"row": 18, "column": 25}}, {"id": 57, "type": "parameter_declaration", "text": "void", "parent": 56, "children": [58], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 24}}, {"id": 58, "type": "primitive_type", "text": "void", "parent": 57, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 24}}, {"id": 59, "type": "ERROR", "text": "bool IsSystemReturn(void) const", "parent": 12, "children": [60, 61], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 33}}, {"id": 60, "type": "primitive_type", "text": "bool", "parent": 59, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 6}}, {"id": 61, "type": "function_declarator", "text": "IsSystemReturn(void) const", "parent": 59, "children": [62, 63], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 33}}, {"id": 62, "type": "identifier", "text": "IsSystemReturn", "parent": 61, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 21}}, {"id": 63, "type": "parameter_list", "text": "(void)", "parent": 61, "children": [64], "start_point": {"row": 19, "column": 21}, "end_point": {"row": 19, "column": 27}}, {"id": 64, "type": "parameter_declaration", "text": "void", "parent": 63, "children": [65], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 26}}, {"id": 65, "type": "primitive_type", "text": "void", "parent": 64, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 26}}, {"id": 66, "type": "ERROR", "text": "bool IsJump(void) const", "parent": 12, "children": [67, 68], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 25}}, {"id": 67, "type": "primitive_type", "text": "bool", "parent": 66, "children": [], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 6}}, {"id": 68, "type": "function_declarator", "text": "IsJump(void) const", "parent": 66, "children": [69, 70], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 25}}, {"id": 69, "type": "identifier", "text": "IsJump", "parent": 68, "children": [], "start_point": {"row": 20, "column": 7}, "end_point": {"row": 20, "column": 13}}, {"id": 70, "type": "parameter_list", "text": "(void)", "parent": 68, "children": [71], "start_point": {"row": 20, "column": 13}, "end_point": {"row": 20, "column": 19}}, {"id": 71, "type": "parameter_declaration", "text": "void", "parent": 70, "children": [72], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 18}}, {"id": 72, "type": "primitive_type", "text": "void", "parent": 71, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 18}}, {"id": 73, "type": "ERROR", "text": "bool IsBranch(void) const", "parent": 12, "children": [74, 75], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 27}}, {"id": 74, "type": "primitive_type", "text": "bool", "parent": 73, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 6}}, {"id": 75, "type": "function_declarator", "text": "IsBranch(void) const", "parent": 73, "children": [76, 77], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 27}}, {"id": 76, "type": "identifier", "text": "IsBranch", "parent": 75, "children": [], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 15}}, {"id": 77, "type": "parameter_list", "text": "(void)", "parent": 75, "children": [78], "start_point": {"row": 21, "column": 15}, "end_point": {"row": 21, "column": 21}}, {"id": 78, "type": "parameter_declaration", "text": "void", "parent": 77, "children": [79], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 20}}, {"id": 79, "type": "primitive_type", "text": "void", "parent": 78, "children": [], "start_point": {"row": 21, "column": 16}, "end_point": {"row": 21, "column": 20}}, {"id": 80, "type": "ERROR", "text": "bool IsDirectFunctionCall(void) const", "parent": 12, "children": [81, 82], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 39}}, {"id": 81, "type": "primitive_type", "text": "bool", "parent": 80, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 6}}, {"id": 82, "type": "function_declarator", "text": "IsDirectFunctionCall(void) const", "parent": 80, "children": [83, 84], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 39}}, {"id": 83, "type": "identifier", "text": "IsDirectFunctionCall", "parent": 82, "children": [], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 27}}, {"id": 84, "type": "parameter_list", "text": "(void)", "parent": 82, "children": [85], "start_point": {"row": 23, "column": 27}, "end_point": {"row": 23, "column": 33}}, {"id": 85, "type": "parameter_declaration", "text": "void", "parent": 84, "children": [86], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 32}}, {"id": 86, "type": "primitive_type", "text": "void", "parent": 85, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 32}}, {"id": 87, "type": "ERROR", "text": "bool IsIndirectFunctionCall(void) const", "parent": 12, "children": [88, 89], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 41}}, {"id": 88, "type": "primitive_type", "text": "bool", "parent": 87, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 6}}, {"id": 89, "type": "function_declarator", "text": "IsIndirectFunctionCall(void) const", "parent": 87, "children": [90, 91], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 41}}, {"id": 90, "type": "identifier", "text": "IsIndirectFunctionCall", "parent": 89, "children": [], "start_point": {"row": 24, "column": 7}, "end_point": {"row": 24, "column": 29}}, {"id": 91, "type": "parameter_list", "text": "(void)", "parent": 89, "children": [92], "start_point": {"row": 24, "column": 29}, "end_point": {"row": 24, "column": 35}}, {"id": 92, "type": "parameter_declaration", "text": "void", "parent": 91, "children": [93], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 34}}, {"id": 93, "type": "primitive_type", "text": "void", "parent": 92, "children": [], "start_point": {"row": 24, "column": 30}, "end_point": {"row": 24, "column": 34}}, {"id": 94, "type": "ERROR", "text": "bool IsDirectJump(void) const", "parent": 12, "children": [95, 96], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 31}}, {"id": 95, "type": "primitive_type", "text": "bool", "parent": 94, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 6}}, {"id": 96, "type": "function_declarator", "text": "IsDirectJump(void) const", "parent": 94, "children": [97, 98], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 31}}, {"id": 97, "type": "identifier", "text": "IsDirectJump", "parent": 96, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 19}}, {"id": 98, "type": "parameter_list", "text": "(void)", "parent": 96, "children": [99], "start_point": {"row": 26, "column": 19}, "end_point": {"row": 26, "column": 25}}, {"id": 99, "type": "parameter_declaration", "text": "void", "parent": 98, "children": [100], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 24}}, {"id": 100, "type": "primitive_type", "text": "void", "parent": 99, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 24}}, {"id": 101, "type": "ERROR", "text": "bool IsIndirectJump(void) const", "parent": 12, "children": [102, 103], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 33}}, {"id": 102, "type": "primitive_type", "text": "bool", "parent": 101, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 6}}, {"id": 103, "type": "function_declarator", "text": "IsIndirectJump(void) const", "parent": 101, "children": [104, 105], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 33}}, {"id": 104, "type": "identifier", "text": "IsIndirectJump", "parent": 103, "children": [], "start_point": {"row": 27, "column": 7}, "end_point": {"row": 27, "column": 21}}, {"id": 105, "type": "parameter_list", "text": "(void)", "parent": 103, "children": [106], "start_point": {"row": 27, "column": 21}, "end_point": {"row": 27, "column": 27}}, {"id": 106, "type": "parameter_declaration", "text": "void", "parent": 105, "children": [107], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 26}}, {"id": 107, "type": "primitive_type", "text": "void", "parent": 106, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 26}}, {"id": 108, "type": "ERROR", "text": "bool IsSerializing(void) const", "parent": 12, "children": [109, 110], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 32}}, {"id": 109, "type": "primitive_type", "text": "bool", "parent": 108, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 6}}, {"id": 110, "type": "function_declarator", "text": "IsSerializing(void) const", "parent": 108, "children": [111, 112], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 32}}, {"id": 111, "type": "identifier", "text": "IsSerializing", "parent": 110, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 20}}, {"id": 112, "type": "parameter_list", "text": "(void)", "parent": 110, "children": [113], "start_point": {"row": 29, "column": 20}, "end_point": {"row": 29, "column": 26}}, {"id": 113, "type": "parameter_declaration", "text": "void", "parent": 112, "children": [114], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 25}}, {"id": 114, "type": "primitive_type", "text": "void", "parent": 113, "children": [], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 25}}, {"id": 115, "type": "ERROR", "text": "bool IsUndefined(void) const", "parent": 12, "children": [116, 117], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 30}}, {"id": 116, "type": "primitive_type", "text": "bool", "parent": 115, "children": [], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 6}}, {"id": 117, "type": "function_declarator", "text": "IsUndefined(void) const", "parent": 115, "children": [118, 119], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 30}}, {"id": 118, "type": "identifier", "text": "IsUndefined", "parent": 117, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 18}}, {"id": 119, "type": "parameter_list", "text": "(void)", "parent": 117, "children": [120], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 24}}, {"id": 120, "type": "parameter_declaration", "text": "void", "parent": 119, "children": [121], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 23}}, {"id": 121, "type": "primitive_type", "text": "void", "parent": 120, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 23}}, {"id": 122, "type": "ERROR", "text": "bool IsNoOp(void) const", "parent": 12, "children": [123, 124], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 25}}, {"id": 123, "type": "primitive_type", "text": "bool", "parent": 122, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 6}}, {"id": 124, "type": "function_declarator", "text": "IsNoOp(void) const", "parent": 122, "children": [125, 126], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 25}}, {"id": 125, "type": "identifier", "text": "IsNoOp", "parent": 124, "children": [], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 13}}, {"id": 126, "type": "parameter_list", "text": "(void)", "parent": 124, "children": [127], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 19}}, {"id": 127, "type": "parameter_declaration", "text": "void", "parent": 126, "children": [128], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 18}}, {"id": 128, "type": "primitive_type", "text": "void", "parent": 127, "children": [], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 18}}, {"id": 129, "type": "ERROR", "text": "AppPC32 StartPC(void) const", "parent": 12, "children": [130, 131], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 29}}, {"id": 130, "type": "type_identifier", "text": "AppPC32", "parent": 129, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 9}}, {"id": 131, "type": "function_declarator", "text": "StartPC(void) const", "parent": 129, "children": [132, 133], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 29}}, {"id": 132, "type": "identifier", "text": "StartPC", "parent": 131, "children": [], "start_point": {"row": 35, "column": 10}, "end_point": {"row": 35, "column": 17}}, {"id": 133, "type": "parameter_list", "text": "(void)", "parent": 131, "children": [134], "start_point": {"row": 35, "column": 17}, "end_point": {"row": 35, "column": 23}}, {"id": 134, "type": "parameter_declaration", "text": "void", "parent": 133, "children": [135], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 22}}, {"id": 135, "type": "primitive_type", "text": "void", "parent": 134, "children": [], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 22}}, {"id": 136, "type": "ERROR", "text": "AppPC32 EndPC(void) const", "parent": 12, "children": [137, 138], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 27}}, {"id": 137, "type": "type_identifier", "text": "AppPC32", "parent": 136, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 9}}, {"id": 138, "type": "function_declarator", "text": "EndPC(void) const", "parent": 136, "children": [139, 140], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 27}}, {"id": 139, "type": "identifier", "text": "EndPC", "parent": 138, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 15}}, {"id": 140, "type": "parameter_list", "text": "(void)", "parent": 138, "children": [141], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 21}}, {"id": 141, "type": "parameter_declaration", "text": "void", "parent": 140, "children": [142], "start_point": {"row": 38, "column": 16}, "end_point": {"row": 38, "column": 20}}, {"id": 142, "type": "primitive_type", "text": "void", "parent": 141, "children": [], "start_point": {"row": 38, "column": 16}, "end_point": {"row": 38, "column": 20}}, {"id": 143, "type": "ERROR", "text": "size_t NumBytes(void) const", "parent": 12, "children": [144, 145], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 29}}, {"id": 144, "type": "primitive_type", "text": "size_t", "parent": 143, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 8}}, {"id": 145, "type": "function_declarator", "text": "NumBytes(void) const", "parent": 143, "children": [146, 147], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 29}}, {"id": 146, "type": "identifier", "text": "NumBytes", "parent": 145, "children": [], "start_point": {"row": 41, "column": 9}, "end_point": {"row": 41, "column": 17}}, {"id": 147, "type": "parameter_list", "text": "(void)", "parent": 145, "children": [148], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 23}}, {"id": 148, "type": "parameter_declaration", "text": "void", "parent": 147, "children": [149], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 22}}, {"id": 149, "type": "primitive_type", "text": "void", "parent": 148, "children": [], "start_point": {"row": 41, "column": 18}, "end_point": {"row": 41, "column": 22}}, {"id": 150, "type": "ERROR", "text": "AppPC32 BranchTakenPC(void) const", "parent": 12, "children": [151, 152], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 35}}, {"id": 151, "type": "type_identifier", "text": "AppPC32", "parent": 150, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 9}}, {"id": 152, "type": "function_declarator", "text": "BranchTakenPC(void) const", "parent": 150, "children": [153, 154], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 35}}, {"id": 153, "type": "identifier", "text": "BranchTakenPC", "parent": 152, "children": [], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 23}}, {"id": 154, "type": "parameter_list", "text": "(void)", "parent": 152, "children": [155], "start_point": {"row": 45, "column": 23}, "end_point": {"row": 45, "column": 29}}, {"id": 155, "type": "parameter_declaration", "text": "void", "parent": 154, "children": [156], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 28}}, {"id": 156, "type": "primitive_type", "text": "void", "parent": 155, "children": [], "start_point": {"row": 45, "column": 24}, "end_point": {"row": 45, "column": 28}}, {"id": 157, "type": "ERROR", "text": "AppPC32 BranchNotTakenPC(void) const", "parent": 12, "children": [158, 159], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 38}}, {"id": 158, "type": "type_identifier", "text": "AppPC32", "parent": 157, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 9}}, {"id": 159, "type": "function_declarator", "text": "BranchNotTakenPC(void) const", "parent": 157, "children": [160, 161], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 38}}, {"id": 160, "type": "identifier", "text": "BranchNotTakenPC", "parent": 159, "children": [], "start_point": {"row": 46, "column": 10}, "end_point": {"row": 46, "column": 26}}, {"id": 161, "type": "parameter_list", "text": "(void)", "parent": 159, "children": [162], "start_point": {"row": 46, "column": 26}, "end_point": {"row": 46, "column": 32}}, {"id": 162, "type": "parameter_declaration", "text": "void", "parent": 161, "children": [163], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 31}}, {"id": 163, "type": "primitive_type", "text": "void", "parent": 162, "children": [], "start_point": {"row": 46, "column": 27}, "end_point": {"row": 46, "column": 31}}, {"id": 164, "type": "ERROR", "text": "AppPC32 JumpTargetPC(void) const", "parent": 12, "children": [165, 166], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 34}}, {"id": 165, "type": "type_identifier", "text": "AppPC32", "parent": 164, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 9}}, {"id": 166, "type": "function_declarator", "text": "JumpTargetPC(void) const", "parent": 164, "children": [167, 168], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 34}}, {"id": 167, "type": "identifier", "text": "JumpTargetPC", "parent": 166, "children": [], "start_point": {"row": 47, "column": 10}, "end_point": {"row": 47, "column": 22}}, {"id": 168, "type": "parameter_list", "text": "(void)", "parent": 166, "children": [169], "start_point": {"row": 47, "column": 22}, "end_point": {"row": 47, "column": 28}}, {"id": 169, "type": "parameter_declaration", "text": "void", "parent": 168, "children": [170], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 27}}, {"id": 170, "type": "primitive_type", "text": "void", "parent": 169, "children": [], "start_point": {"row": 47, "column": 23}, "end_point": {"row": 47, "column": 27}}, {"id": 171, "type": "ERROR", "text": "AppPC32 FunctionCallTargetPC(void) const", "parent": 12, "children": [172, 173], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 42}}, {"id": 172, "type": "type_identifier", "text": "AppPC32", "parent": 171, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 9}}, {"id": 173, "type": "function_declarator", "text": "FunctionCallTargetPC(void) const", "parent": 171, "children": [174, 175], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 42}}, {"id": 174, "type": "identifier", "text": "FunctionCallTargetPC", "parent": 173, "children": [], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 30}}, {"id": 175, "type": "parameter_list", "text": "(void)", "parent": 173, "children": [176], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 36}}, {"id": 176, "type": "parameter_declaration", "text": "void", "parent": 175, "children": [177], "start_point": {"row": 48, "column": 31}, "end_point": {"row": 48, "column": 35}}, {"id": 177, "type": "primitive_type", "text": "void", "parent": 176, "children": [], "start_point": {"row": 48, "column": 31}, "end_point": {"row": 48, "column": 35}}, {"id": 178, "type": "labeled_statement", "text": "GRANARY_PROTECTED:\n // Internal architecture-specific instruction.\n arch::Instruction instruction;", "parent": 12, "children": [179, 180], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 52, "column": 32}}, {"id": 179, "type": "statement_identifier", "text": "GRANARY_PROTECTED", "parent": 178, "children": [], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 50, "column": 18}}, {"id": 180, "type": "labeled_statement", "text": "arch::Instruction instruction;", "parent": 178, "children": [181, 182], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 32}}, {"id": 181, "type": "statement_identifier", "text": "arch", "parent": 180, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 6}}, {"id": 182, "type": "declaration", "text": "Instruction instruction;", "parent": 180, "children": [183, 184], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 32}}, {"id": 183, "type": "type_identifier", "text": "Instruction", "parent": 182, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 19}}, {"id": 184, "type": "identifier", "text": "instruction", "parent": 182, "children": [], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 31}}, {"id": 185, "type": "function_definition", "text": "class InstructionIterator {\n public:\n InstructionIterator(const InstructionIterator &) = default;\n InstructionIterator(InstructionIterator &&) = default;\n\n explicit InstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const InstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n InstructionIterator &operator++(void);\n\n private:\n InstructionIterator(void) = delete;\n\n Instruction *cursor;\n}", "parent": 9, "children": [186], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 74, "column": 1}}, {"id": 186, "type": "identifier", "text": "InstructionIterator", "parent": 185, "children": [], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 25}}, {"id": 187, "type": "labeled_statement", "text": "public:\n InstructionIterator(const InstructionIterator &) = default;", "parent": 185, "children": [188], "start_point": {"row": 57, "column": 1}, "end_point": {"row": 58, "column": 61}}, {"id": 188, "type": "declaration", "text": "InstructionIterator(const InstructionIterator &) = default;", "parent": 187, "children": [189, 193], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 61}}, {"id": 189, "type": "macro_type_specifier", "text": "InstructionIterator(const InstructionIterator &)", "parent": 188, "children": [190, 191], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 50}}, {"id": 190, "type": "identifier", "text": "InstructionIterator", "parent": 189, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 21}}, {"id": 191, "type": "type_descriptor", "text": "const InstructionIterator", "parent": 189, "children": [192], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 47}}, {"id": 192, "type": "type_identifier", "text": "InstructionIterator", "parent": 191, "children": [], "start_point": {"row": 58, "column": 28}, "end_point": {"row": 58, "column": 47}}, {"id": 193, "type": "init_declarator", "text": " = default", "parent": 188, "children": [194, 195, 196], "start_point": {"row": 58, "column": 50}, "end_point": {"row": 58, "column": 60}}, {"id": 194, "type": "identifier", "text": "", "parent": 193, "children": [], "start_point": {"row": 58, "column": 50}, "end_point": {"row": 58, "column": 50}}, {"id": 195, "type": "=", "text": "=", "parent": 193, "children": [], "start_point": {"row": 58, "column": 51}, "end_point": {"row": 58, "column": 52}}, {"id": 196, "type": "identifier", "text": "default", "parent": 193, "children": [], "start_point": {"row": 58, "column": 53}, "end_point": {"row": 58, "column": 60}}, {"id": 197, "type": "assignment_expression", "text": "InstructionIterator(InstructionIterator &&) = default", "parent": 185, "children": [198, 205, 206], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 55}}, {"id": 198, "type": "call_expression", "text": "InstructionIterator(InstructionIterator &&)", "parent": 197, "children": [199, 200], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 45}}, {"id": 199, "type": "identifier", "text": "InstructionIterator", "parent": 198, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 21}}, {"id": 200, "type": "argument_list", "text": "(InstructionIterator &&)", "parent": 198, "children": [201], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 45}}, {"id": 201, "type": "binary_expression", "text": "InstructionIterator &&", "parent": 200, "children": [202, 203, 204], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 44}}, {"id": 202, "type": "identifier", "text": "InstructionIterator", "parent": 201, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 41}}, {"id": 203, "type": "&&", "text": "&&", "parent": 201, "children": [], "start_point": {"row": 59, "column": 42}, "end_point": {"row": 59, "column": 44}}, {"id": 204, "type": "identifier", "text": "", "parent": 201, "children": [], "start_point": {"row": 59, "column": 44}, "end_point": {"row": 59, "column": 44}}, {"id": 205, "type": "=", "text": "=", "parent": 197, "children": [], "start_point": {"row": 59, "column": 46}, "end_point": {"row": 59, "column": 47}}, {"id": 206, "type": "identifier", "text": "default", "parent": 197, "children": [], "start_point": {"row": 59, "column": 48}, "end_point": {"row": 59, "column": 55}}, {"id": 207, "type": "declaration", "text": "explicit InstructionIterator(Instruction *cursor_);", "parent": 185, "children": [208, 209], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 53}}, {"id": 208, "type": "type_identifier", "text": "explicit", "parent": 207, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 10}}, {"id": 209, "type": "function_declarator", "text": "InstructionIterator(Instruction *cursor_)", "parent": 207, "children": [210, 211], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 52}}, {"id": 210, "type": "identifier", "text": "InstructionIterator", "parent": 209, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 30}}, {"id": 211, "type": "parameter_list", "text": "(Instruction *cursor_)", "parent": 209, "children": [212], "start_point": {"row": 61, "column": 30}, "end_point": {"row": 61, "column": 52}}, {"id": 212, "type": "parameter_declaration", "text": "Instruction *cursor_", "parent": 211, "children": [213, 214], "start_point": {"row": 61, "column": 31}, "end_point": {"row": 61, "column": 51}}, {"id": 213, "type": "type_identifier", "text": "Instruction", "parent": 212, "children": [], "start_point": {"row": 61, "column": 31}, "end_point": {"row": 61, "column": 42}}, {"id": 214, "type": "pointer_declarator", "text": "*cursor_", "parent": 212, "children": [215, 216], "start_point": {"row": 61, "column": 43}, "end_point": {"row": 61, "column": 51}}, {"id": 215, "type": "*", "text": "*", "parent": 214, "children": [], "start_point": {"row": 61, "column": 43}, "end_point": {"row": 61, "column": 44}}, {"id": 216, "type": "identifier", "text": "cursor_", "parent": 214, "children": [], "start_point": {"row": 61, "column": 44}, "end_point": {"row": 61, "column": 51}}, {"id": 217, "type": "function_definition", "text": "inline bool operator!=(const InstructionIterator &that) const {\n return cursor != that.cursor;\n }", "parent": 185, "children": [218, 220, 221, 225, 226], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 65, "column": 3}}, {"id": 218, "type": "storage_class_specifier", "text": "inline", "parent": 217, "children": [219], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 8}}, {"id": 219, "type": "inline", "text": "inline", "parent": 218, "children": [], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 8}}, {"id": 220, "type": "primitive_type", "text": "bool", "parent": 217, "children": [], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 13}}, {"id": 221, "type": "ERROR", "text": "operator!=(const InstructionIterator &", "parent": 217, "children": [222, 223, 224], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 52}}, {"id": 222, "type": "identifier", "text": "operator", "parent": 221, "children": [], "start_point": {"row": 63, "column": 14}, "end_point": {"row": 63, "column": 22}}, {"id": 223, "type": "!=", "text": "!=", "parent": 221, "children": [], "start_point": {"row": 63, "column": 22}, "end_point": {"row": 63, "column": 24}}, {"id": 224, "type": "identifier", "text": "InstructionIterator", "parent": 221, "children": [], "start_point": {"row": 63, "column": 31}, "end_point": {"row": 63, "column": 50}}, {"id": 225, "type": "identifier", "text": "that", "parent": 217, "children": [], "start_point": {"row": 63, "column": 52}, "end_point": {"row": 63, "column": 56}}, {"id": 226, "type": "ERROR", "text": ") const", "parent": 217, "children": [], "start_point": {"row": 63, "column": 56}, "end_point": {"row": 63, "column": 63}}, {"id": 227, "type": "return_statement", "text": "return cursor != that.cursor;", "parent": 217, "children": [228], "start_point": {"row": 64, "column": 4}, "end_point": {"row": 64, "column": 33}}, {"id": 228, "type": "binary_expression", "text": "cursor != that.cursor", "parent": 227, "children": [229, 230, 231], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 32}}, {"id": 229, "type": "identifier", "text": "cursor", "parent": 228, "children": [], "start_point": {"row": 64, "column": 11}, "end_point": {"row": 64, "column": 17}}, {"id": 230, "type": "!=", "text": "!=", "parent": 228, "children": [], "start_point": {"row": 64, "column": 18}, "end_point": {"row": 64, "column": 20}}, {"id": 231, "type": "field_expression", "text": "that.cursor", "parent": 228, "children": [232, 233], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 64, "column": 32}}, {"id": 232, "type": "identifier", "text": "that", "parent": 231, "children": [], "start_point": {"row": 64, "column": 21}, "end_point": {"row": 64, "column": 25}}, {"id": 233, "type": "field_identifier", "text": "cursor", "parent": 231, "children": [], "start_point": {"row": 64, "column": 26}, "end_point": {"row": 64, "column": 32}}, {"id": 234, "type": "binary_expression", "text": "Instruction *operator*(void) const", "parent": 185, "children": [235, 239, 240], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 36}}, {"id": 235, "type": "binary_expression", "text": "Instruction *operator", "parent": 234, "children": [236, 237, 238], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 23}}, {"id": 236, "type": "identifier", "text": "Instruction", "parent": 235, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 13}}, {"id": 237, "type": "*", "text": "*", "parent": 235, "children": [], "start_point": {"row": 67, "column": 14}, "end_point": {"row": 67, "column": 15}}, {"id": 238, "type": "identifier", "text": "operator", "parent": 235, "children": [], "start_point": {"row": 67, "column": 15}, "end_point": {"row": 67, "column": 23}}, {"id": 239, "type": "*", "text": "*", "parent": 234, "children": [], "start_point": {"row": 67, "column": 23}, "end_point": {"row": 67, "column": 24}}, {"id": 240, "type": "cast_expression", "text": "(void) const", "parent": 234, "children": [241], "start_point": {"row": 67, "column": 24}, "end_point": {"row": 67, "column": 36}}, {"id": 241, "type": "type_descriptor", "text": "void", "parent": 240, "children": [242], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 29}}, {"id": 242, "type": "primitive_type", "text": "void", "parent": 241, "children": [], "start_point": {"row": 67, "column": 25}, "end_point": {"row": 67, "column": 29}}, {"id": 243, "type": "binary_expression", "text": "InstructionIterator &operator++(void)", "parent": 185, "children": [244, 245], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 39}}, {"id": 244, "type": "identifier", "text": "InstructionIterator", "parent": 243, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 21}}, {"id": 245, "type": "call_expression", "text": "operator++(void)", "parent": 243, "children": [246, 249], "start_point": {"row": 68, "column": 23}, "end_point": {"row": 68, "column": 39}}, {"id": 246, "type": "update_expression", "text": "operator++", "parent": 245, "children": [247, 248], "start_point": {"row": 68, "column": 23}, "end_point": {"row": 68, "column": 33}}, {"id": 247, "type": "identifier", "text": "operator", "parent": 246, "children": [], "start_point": {"row": 68, "column": 23}, "end_point": {"row": 68, "column": 31}}, {"id": 248, "type": "++", "text": "++", "parent": 246, "children": [], "start_point": {"row": 68, "column": 31}, "end_point": {"row": 68, "column": 33}}, {"id": 249, "type": "argument_list", "text": "(void)", "parent": 245, "children": [250], "start_point": {"row": 68, "column": 33}, "end_point": {"row": 68, "column": 39}}, {"id": 250, "type": "identifier", "text": "void", "parent": 249, "children": [], "start_point": {"row": 68, "column": 34}, "end_point": {"row": 68, "column": 38}}, {"id": 251, "type": "labeled_statement", "text": "private:\n InstructionIterator(void) = delete;", "parent": 185, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 71, "column": 37}}, {"id": 252, "type": "assignment_expression", "text": "InstructionIterator(void) = delete", "parent": 251, "children": [253, 257], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 36}}, {"id": 253, "type": "call_expression", "text": "InstructionIterator(void)", "parent": 252, "children": [254, 255], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 27}}, {"id": 254, "type": "identifier", "text": "InstructionIterator", "parent": 253, "children": [], "start_point": {"row": 71, "column": 2}, "end_point": {"row": 71, "column": 21}}, {"id": 255, "type": "argument_list", "text": "(void)", "parent": 253, "children": [256], "start_point": {"row": 71, "column": 21}, "end_point": {"row": 71, "column": 27}}, {"id": 256, "type": "identifier", "text": "void", "parent": 255, "children": [], "start_point": {"row": 71, "column": 22}, "end_point": {"row": 71, "column": 26}}, {"id": 257, "type": "=", "text": "=", "parent": 252, "children": [], "start_point": {"row": 71, "column": 28}, "end_point": {"row": 71, "column": 29}}, {"id": 258, "type": "declaration", "text": "Instruction *cursor;", "parent": 185, "children": [259, 260], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 22}}, {"id": 259, "type": "type_identifier", "text": "Instruction", "parent": 258, "children": [], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 13}}, {"id": 260, "type": "pointer_declarator", "text": "*cursor", "parent": 258, "children": [261, 262], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 21}}, {"id": 261, "type": "*", "text": "*", "parent": 260, "children": [], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 15}}, {"id": 262, "type": "identifier", "text": "cursor", "parent": 260, "children": [], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 21}}, {"id": 263, "type": "function_definition", "text": "class ReverseInstructionIterator {\n public:\n ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;\n ReverseInstructionIterator(ReverseInstructionIterator &&) = default;\n\n explicit ReverseInstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const ReverseInstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n ReverseInstructionIterator &operator++(void);\n\n private:\n ReverseInstructionIterator(void) = delete;\n\n Instruction *cursor;\n}", "parent": 9, "children": [264], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 96, "column": 1}}, {"id": 264, "type": "identifier", "text": "ReverseInstructionIterator", "parent": 263, "children": [], "start_point": {"row": 77, "column": 6}, "end_point": {"row": 77, "column": 32}}, {"id": 265, "type": "labeled_statement", "text": "public:\n ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;", "parent": 263, "children": [266], "start_point": {"row": 78, "column": 1}, "end_point": {"row": 80, "column": 52}}, {"id": 266, "type": "declaration", "text": "ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;", "parent": 265, "children": [267, 271], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 80, "column": 52}}, {"id": 267, "type": "macro_type_specifier", "text": "ReverseInstructionIterator(\n const ReverseInstructionIterator &)", "parent": 266, "children": [268, 269], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 80, "column": 41}}, {"id": 268, "type": "identifier", "text": "ReverseInstructionIterator", "parent": 267, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 28}}, {"id": 269, "type": "type_descriptor", "text": "const ReverseInstructionIterator", "parent": 267, "children": [270], "start_point": {"row": 80, "column": 6}, "end_point": {"row": 80, "column": 38}}, {"id": 270, "type": "type_identifier", "text": "ReverseInstructionIterator", "parent": 269, "children": [], "start_point": {"row": 80, "column": 12}, "end_point": {"row": 80, "column": 38}}, {"id": 271, "type": "init_declarator", "text": " = default", "parent": 266, "children": [272, 273, 274], "start_point": {"row": 80, "column": 41}, "end_point": {"row": 80, "column": 51}}, {"id": 272, "type": "identifier", "text": "", "parent": 271, "children": [], "start_point": {"row": 80, "column": 41}, "end_point": {"row": 80, "column": 41}}, {"id": 273, "type": "=", "text": "=", "parent": 271, "children": [], "start_point": {"row": 80, "column": 42}, "end_point": {"row": 80, "column": 43}}, {"id": 274, "type": "identifier", "text": "default", "parent": 271, "children": [], "start_point": {"row": 80, "column": 44}, "end_point": {"row": 80, "column": 51}}, {"id": 275, "type": "assignment_expression", "text": "ReverseInstructionIterator(ReverseInstructionIterator &&) = default", "parent": 263, "children": [276, 283, 284], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 69}}, {"id": 276, "type": "call_expression", "text": "ReverseInstructionIterator(ReverseInstructionIterator &&)", "parent": 275, "children": [277, 278], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 59}}, {"id": 277, "type": "identifier", "text": "ReverseInstructionIterator", "parent": 276, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 28}}, {"id": 278, "type": "argument_list", "text": "(ReverseInstructionIterator &&)", "parent": 276, "children": [279], "start_point": {"row": 81, "column": 28}, "end_point": {"row": 81, "column": 59}}, {"id": 279, "type": "binary_expression", "text": "ReverseInstructionIterator &&", "parent": 278, "children": [280, 281, 282], "start_point": {"row": 81, "column": 29}, "end_point": {"row": 81, "column": 58}}, {"id": 280, "type": "identifier", "text": "ReverseInstructionIterator", "parent": 279, "children": [], "start_point": {"row": 81, "column": 29}, "end_point": {"row": 81, "column": 55}}, {"id": 281, "type": "&&", "text": "&&", "parent": 279, "children": [], "start_point": {"row": 81, "column": 56}, "end_point": {"row": 81, "column": 58}}, {"id": 282, "type": "identifier", "text": "", "parent": 279, "children": [], "start_point": {"row": 81, "column": 58}, "end_point": {"row": 81, "column": 58}}, {"id": 283, "type": "=", "text": "=", "parent": 275, "children": [], "start_point": {"row": 81, "column": 60}, "end_point": {"row": 81, "column": 61}}, {"id": 284, "type": "identifier", "text": "default", "parent": 275, "children": [], "start_point": {"row": 81, "column": 62}, "end_point": {"row": 81, "column": 69}}, {"id": 285, "type": "declaration", "text": "explicit ReverseInstructionIterator(Instruction *cursor_);", "parent": 263, "children": [286, 287], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 60}}, {"id": 286, "type": "type_identifier", "text": "explicit", "parent": 285, "children": [], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 10}}, {"id": 287, "type": "function_declarator", "text": "ReverseInstructionIterator(Instruction *cursor_)", "parent": 285, "children": [288, 289], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 59}}, {"id": 288, "type": "identifier", "text": "ReverseInstructionIterator", "parent": 287, "children": [], "start_point": {"row": 83, "column": 11}, "end_point": {"row": 83, "column": 37}}, {"id": 289, "type": "parameter_list", "text": "(Instruction *cursor_)", "parent": 287, "children": [290], "start_point": {"row": 83, "column": 37}, "end_point": {"row": 83, "column": 59}}, {"id": 290, "type": "parameter_declaration", "text": "Instruction *cursor_", "parent": 289, "children": [291, 292], "start_point": {"row": 83, "column": 38}, "end_point": {"row": 83, "column": 58}}, {"id": 291, "type": "type_identifier", "text": "Instruction", "parent": 290, "children": [], "start_point": {"row": 83, "column": 38}, "end_point": {"row": 83, "column": 49}}, {"id": 292, "type": "pointer_declarator", "text": "*cursor_", "parent": 290, "children": [293, 294], "start_point": {"row": 83, "column": 50}, "end_point": {"row": 83, "column": 58}}, {"id": 293, "type": "*", "text": "*", "parent": 292, "children": [], "start_point": {"row": 83, "column": 50}, "end_point": {"row": 83, "column": 51}}, {"id": 294, "type": "identifier", "text": "cursor_", "parent": 292, "children": [], "start_point": {"row": 83, "column": 51}, "end_point": {"row": 83, "column": 58}}, {"id": 295, "type": "function_definition", "text": "inline bool operator!=(const ReverseInstructionIterator &that) const {\n return cursor != that.cursor;\n }", "parent": 263, "children": [296, 298, 299, 303, 304], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 87, "column": 3}}, {"id": 296, "type": "storage_class_specifier", "text": "inline", "parent": 295, "children": [297], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 8}}, {"id": 297, "type": "inline", "text": "inline", "parent": 296, "children": [], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 8}}, {"id": 298, "type": "primitive_type", "text": "bool", "parent": 295, "children": [], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 13}}, {"id": 299, "type": "ERROR", "text": "operator!=(const ReverseInstructionIterator &", "parent": 295, "children": [300, 301, 302], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 59}}, {"id": 300, "type": "identifier", "text": "operator", "parent": 299, "children": [], "start_point": {"row": 85, "column": 14}, "end_point": {"row": 85, "column": 22}}, {"id": 301, "type": "!=", "text": "!=", "parent": 299, "children": [], "start_point": {"row": 85, "column": 22}, "end_point": {"row": 85, "column": 24}}, {"id": 302, "type": "identifier", "text": "ReverseInstructionIterator", "parent": 299, "children": [], "start_point": {"row": 85, "column": 31}, "end_point": {"row": 85, "column": 57}}, {"id": 303, "type": "identifier", "text": "that", "parent": 295, "children": [], "start_point": {"row": 85, "column": 59}, "end_point": {"row": 85, "column": 63}}, {"id": 304, "type": "ERROR", "text": ") const", "parent": 295, "children": [], "start_point": {"row": 85, "column": 63}, "end_point": {"row": 85, "column": 70}}, {"id": 305, "type": "return_statement", "text": "return cursor != that.cursor;", "parent": 295, "children": [306], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 33}}, {"id": 306, "type": "binary_expression", "text": "cursor != that.cursor", "parent": 305, "children": [307, 308, 309], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 32}}, {"id": 307, "type": "identifier", "text": "cursor", "parent": 306, "children": [], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 17}}, {"id": 308, "type": "!=", "text": "!=", "parent": 306, "children": [], "start_point": {"row": 86, "column": 18}, "end_point": {"row": 86, "column": 20}}, {"id": 309, "type": "field_expression", "text": "that.cursor", "parent": 306, "children": [310, 311], "start_point": {"row": 86, "column": 21}, "end_point": {"row": 86, "column": 32}}, {"id": 310, "type": "identifier", "text": "that", "parent": 309, "children": [], "start_point": {"row": 86, "column": 21}, "end_point": {"row": 86, "column": 25}}, {"id": 311, "type": "field_identifier", "text": "cursor", "parent": 309, "children": [], "start_point": {"row": 86, "column": 26}, "end_point": {"row": 86, "column": 32}}, {"id": 312, "type": "binary_expression", "text": "Instruction *operator*(void) const", "parent": 263, "children": [313, 317, 318], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 36}}, {"id": 313, "type": "binary_expression", "text": "Instruction *operator", "parent": 312, "children": [314, 315, 316], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 23}}, {"id": 314, "type": "identifier", "text": "Instruction", "parent": 313, "children": [], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 13}}, {"id": 315, "type": "*", "text": "*", "parent": 313, "children": [], "start_point": {"row": 89, "column": 14}, "end_point": {"row": 89, "column": 15}}, {"id": 316, "type": "identifier", "text": "operator", "parent": 313, "children": [], "start_point": {"row": 89, "column": 15}, "end_point": {"row": 89, "column": 23}}, {"id": 317, "type": "*", "text": "*", "parent": 312, "children": [], "start_point": {"row": 89, "column": 23}, "end_point": {"row": 89, "column": 24}}, {"id": 318, "type": "cast_expression", "text": "(void) const", "parent": 312, "children": [319], "start_point": {"row": 89, "column": 24}, "end_point": {"row": 89, "column": 36}}, {"id": 319, "type": "type_descriptor", "text": "void", "parent": 318, "children": [320], "start_point": {"row": 89, "column": 25}, "end_point": {"row": 89, "column": 29}}, {"id": 320, "type": "primitive_type", "text": "void", "parent": 319, "children": [], "start_point": {"row": 89, "column": 25}, "end_point": {"row": 89, "column": 29}}, {"id": 321, "type": "binary_expression", "text": "ReverseInstructionIterator &operator++(void)", "parent": 263, "children": [322, 323], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 46}}, {"id": 322, "type": "identifier", "text": "ReverseInstructionIterator", "parent": 321, "children": [], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 28}}, {"id": 323, "type": "call_expression", "text": "operator++(void)", "parent": 321, "children": [324, 327], "start_point": {"row": 90, "column": 30}, "end_point": {"row": 90, "column": 46}}, {"id": 324, "type": "update_expression", "text": "operator++", "parent": 323, "children": [325, 326], "start_point": {"row": 90, "column": 30}, "end_point": {"row": 90, "column": 40}}, {"id": 325, "type": "identifier", "text": "operator", "parent": 324, "children": [], "start_point": {"row": 90, "column": 30}, "end_point": {"row": 90, "column": 38}}, {"id": 326, "type": "++", "text": "++", "parent": 324, "children": [], "start_point": {"row": 90, "column": 38}, "end_point": {"row": 90, "column": 40}}, {"id": 327, "type": "argument_list", "text": "(void)", "parent": 323, "children": [328], "start_point": {"row": 90, "column": 40}, "end_point": {"row": 90, "column": 46}}, {"id": 328, "type": "identifier", "text": "void", "parent": 327, "children": [], "start_point": {"row": 90, "column": 41}, "end_point": {"row": 90, "column": 45}}, {"id": 329, "type": "labeled_statement", "text": "private:\n ReverseInstructionIterator(void) = delete;", "parent": 263, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 93, "column": 44}}, {"id": 330, "type": "assignment_expression", "text": "ReverseInstructionIterator(void) = delete", "parent": 329, "children": [331, 335], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 43}}, {"id": 331, "type": "call_expression", "text": "ReverseInstructionIterator(void)", "parent": 330, "children": [332, 333], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 34}}, {"id": 332, "type": "identifier", "text": "ReverseInstructionIterator", "parent": 331, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 28}}, {"id": 333, "type": "argument_list", "text": "(void)", "parent": 331, "children": [334], "start_point": {"row": 93, "column": 28}, "end_point": {"row": 93, "column": 34}}, {"id": 334, "type": "identifier", "text": "void", "parent": 333, "children": [], "start_point": {"row": 93, "column": 29}, "end_point": {"row": 93, "column": 33}}, {"id": 335, "type": "=", "text": "=", "parent": 330, "children": [], "start_point": {"row": 93, "column": 35}, "end_point": {"row": 93, "column": 36}}, {"id": 336, "type": "declaration", "text": "Instruction *cursor;", "parent": 263, "children": [337, 338], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 22}}, {"id": 337, "type": "type_identifier", "text": "Instruction", "parent": 336, "children": [], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 13}}, {"id": 338, "type": "pointer_declarator", "text": "*cursor", "parent": 336, "children": [339, 340], "start_point": {"row": 95, "column": 14}, "end_point": {"row": 95, "column": 21}}, {"id": 339, "type": "*", "text": "*", "parent": 338, "children": [], "start_point": {"row": 95, "column": 14}, "end_point": {"row": 95, "column": 15}}, {"id": 340, "type": "identifier", "text": "cursor", "parent": 338, "children": [], "start_point": {"row": 95, "column": 15}, "end_point": {"row": 95, "column": 21}}, {"id": 341, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 6}}]}, "node_categories": {"declarations": {"functions": [9, 12, 26, 33, 40, 47, 54, 61, 68, 75, 82, 89, 96, 103, 110, 117, 124, 131, 138, 145, 152, 159, 166, 173, 185, 209, 217, 263, 287, 295], "variables": [29, 36, 43, 50, 57, 64, 71, 78, 85, 92, 99, 106, 113, 120, 127, 134, 141, 148, 155, 162, 169, 176, 182, 188, 207, 212, 258, 266, 285, 290, 336], "classes": [218, 296], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [18, 198, 201, 228, 231, 234, 235, 240, 243, 245, 246, 253, 276, 279, 306, 309, 312, 313, 318, 321, 323, 324, 331], "assignments": [17, 197, 252, 275, 330], "loops": [], "conditionals": [0, 1, 2, 5, 10, 11, 13, 15, 19, 21, 23, 27, 34, 41, 48, 55, 62, 69, 76, 83, 90, 97, 104, 111, 118, 125, 130, 132, 137, 139, 146, 151, 153, 158, 160, 165, 167, 172, 174, 179, 181, 183, 184, 186, 189, 190, 192, 194, 196, 199, 202, 204, 206, 208, 210, 213, 216, 222, 224, 225, 229, 232, 233, 236, 238, 244, 247, 250, 254, 256, 259, 262, 264, 267, 268, 270, 272, 274, 277, 280, 282, 284, 286, 288, 291, 294, 300, 302, 303, 307, 310, 311, 314, 316, 322, 325, 328, 332, 334, 337, 340, 341], "returns": [227, 305], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "Instruction", "text_snippet": "namespace granary {\n\n// Represents a decoded application instruction that can be instrumented.\nclass"}, {"node_id": 12, "universal_type": "function", "name": "Instruction", "text_snippet": "class Instruction final {\n public:\n Instruction(void) = default;\n\n bool IsFunctionCall(void) const"}, {"node_id": 26, "universal_type": "function", "name": "unknown", "text_snippet": "IsFunctionCall(void) const"}, {"node_id": 33, "universal_type": "function", "name": "unknown", "text_snippet": "IsFunctionReturn(void) const"}, {"node_id": 40, "universal_type": "function", "name": "unknown", "text_snippet": "IsInterruptCall(void) const"}, {"node_id": 47, "universal_type": "function", "name": "unknown", "text_snippet": "IsInterruptReturn(void) const"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "IsSystemCall(void) const"}, {"node_id": 61, "universal_type": "function", "name": "unknown", "text_snippet": "IsSystemReturn(void) const"}, {"node_id": 68, "universal_type": "function", "name": "unknown", "text_snippet": "IsJump(void) const"}, {"node_id": 75, "universal_type": "function", "name": "unknown", "text_snippet": "IsBranch(void) const"}, {"node_id": 82, "universal_type": "function", "name": "unknown", "text_snippet": "IsDirectFunctionCall(void) const"}, {"node_id": 89, "universal_type": "function", "name": "unknown", "text_snippet": "IsIndirectFunctionCall(void) const"}, {"node_id": 96, "universal_type": "function", "name": "unknown", "text_snippet": "IsDirectJump(void) const"}, {"node_id": 103, "universal_type": "function", "name": "unknown", "text_snippet": "IsIndirectJump(void) const"}, {"node_id": 110, "universal_type": "function", "name": "unknown", "text_snippet": "IsSerializing(void) const"}, {"node_id": 117, "universal_type": "function", "name": "unknown", "text_snippet": "IsUndefined(void) const"}, {"node_id": 124, "universal_type": "function", "name": "unknown", "text_snippet": "IsNoOp(void) const"}, {"node_id": 131, "universal_type": "function", "name": "unknown", "text_snippet": "StartPC(void) const"}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "EndPC(void) const"}, {"node_id": 145, "universal_type": "function", "name": "unknown", "text_snippet": "NumBytes(void) const"}, {"node_id": 152, "universal_type": "function", "name": "unknown", "text_snippet": "BranchTakenPC(void) const"}, {"node_id": 159, "universal_type": "function", "name": "unknown", "text_snippet": "BranchNotTakenPC(void) const"}, {"node_id": 166, "universal_type": "function", "name": "unknown", "text_snippet": "JumpTargetPC(void) const"}, {"node_id": 173, "universal_type": "function", "name": "unknown", "text_snippet": "FunctionCallTargetPC(void) const"}, {"node_id": 185, "universal_type": "function", "name": "InstructionIterator", "text_snippet": "class InstructionIterator {\n public:\n InstructionIterator(const InstructionIterator &) = default;\n "}, {"node_id": 209, "universal_type": "function", "name": "unknown", "text_snippet": "InstructionIterator(Instruction *cursor_)"}, {"node_id": 217, "universal_type": "function", "name": "operator!=", "text_snippet": "inline bool operator!=(const InstructionIterator &that) const {\n return cursor != that.cursor;\n "}, {"node_id": 263, "universal_type": "function", "name": "ReverseInstructionIterator", "text_snippet": "class ReverseInstructionIterator {\n public:\n ReverseInstructionIterator(\n const ReverseInstruc"}, {"node_id": 287, "universal_type": "function", "name": "unknown", "text_snippet": "ReverseInstructionIterator(Instruction *cursor_)"}, {"node_id": 295, "universal_type": "function", "name": "operator!=", "text_snippet": "inline bool operator!=(const ReverseInstructionIterator &that) const {\n return cursor != that.cur"}], "class_declarations": [{"node_id": 218, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 296, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 6, "text": "#include \"granary/arch/instruction.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/* Copyright 2015 <NAME>, all rights reserved. */\n\n#ifndef GRANARY_CODE_INSTRUCTION_H_\n#define GRANARY_CODE_INSTRUCTION_H_\n\n#include \"granary/arch/instruction.h\"\n\nnamespace granary {\n\n// Represents a decoded application instruction that can be instrumented.\nclass Instruction final {\n public:\n Instruction(void) = default;\n\n bool IsFunctionCall(void) const;\n bool IsFunctionReturn(void) const;\n bool IsInterruptCall(void) const;\n bool IsInterruptReturn(void) const;\n bool IsSystemCall(void) const;\n bool IsSystemReturn(void) const;\n bool IsJump(void) const;\n bool IsBranch(void) const;\n\n bool IsDirectFunctionCall(void) const;\n bool IsIndirectFunctionCall(void) const;\n\n bool IsDirectJump(void) const;\n bool IsIndirectJump(void) const;\n\n bool IsSerializing(void) const;\n bool IsUndefined(void) const;\n\n bool IsNoOp(void) const;\n\n // Beginning program counter of this instruction.\n AppPC32 StartPC(void) const;\n\n // Program counter of the next logical instruction after this instruction.\n AppPC32 EndPC(void) const;\n\n // Size of this instruction in bytes.\n size_t NumBytes(void) const;\n\n // Target of a branch, direct jump, or direct call. These only work on\n // their respective, non-indirect instruction kinds.\n AppPC32 BranchTakenPC(void) const;\n AppPC32 BranchNotTakenPC(void) const;\n AppPC32 JumpTargetPC(void) const;\n AppPC32 FunctionCallTargetPC(void) const;\n\n GRANARY_PROTECTED:\n // Internal architecture-specific instruction.\n arch::Instruction instruction;\n};\n\n// Iterate forward over application instructions.\nclass InstructionIterator {\n public:\n InstructionIterator(const InstructionIterator &) = default;\n InstructionIterator(InstructionIterator &&) = default;\n\n explicit InstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const InstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n InstructionIterator &operator++(void);\n\n private:\n InstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n// Iterate backward over instructions.\nclass ReverseInstructionIterator {\n public:\n ReverseInstructionIterator(\n const ReverseInstructionIterator &) = default;\n ReverseInstructionIterator(ReverseInstructionIterator &&) = default;\n\n explicit ReverseInstructionIterator(Instruction *cursor_);\n\n inline bool operator!=(const ReverseInstructionIterator &that) const {\n return cursor != that.cursor;\n }\n\n Instruction *operator*(void) const;\n ReverseInstructionIterator &operator++(void);\n\n private:\n ReverseInstructionIterator(void) = delete;\n\n Instruction *cursor;\n};\n\n} // namespace\n\n#endif // GRANARY_CODE_INSTRUCTION_H_\n"}
65
c
#include <uv.h> #include <signal.h> #include <stdio.h> #include "macros.h" #include "dbg.h" #include "MemoryStore.h" #include "server.h" static void interruptCb( uv_signal_t *interrupt, int signal ) { puts( "" ); log_info( "SIGINT caught. \e[1;31mQuitting\e[m." ); MemoryStore_disconnect( interrupt->data ); uv_stop( interrupt->loop ); } int main ( int argc, char **argv ) { uv_loop_t *loop = uv_default_loop( ); if ( !loop ) { log_err( "uv loop creation failed." ); return 1; } Server *server = Server_new( "::", "9001", ServerProtocol_TCP ); checkConstructor( server ); checkFunction( Server_initWithLoop( server, loop ) ); checkFunction( Server_listen( server ) ); MemoryStore *store = MemoryStore_new( "reki2" ); checkConstructor( store ); checkFunction( MemoryStore_initConnection( store, "localhost", 6379 ) ); checkFunction( MemoryStore_attachToLoop( store, loop ) ); server->memStore = store; uv_signal_t interrupt; interrupt.data = (void*)store; uv_signal_init( loop, &interrupt ); uv_signal_start( &interrupt, interruptCb, SIGINT ); uv_run( loop, UV_RUN_DEFAULT ); uv_loop_close( loop ); return 0; }
30.58
36
(translation_unit) "#include <uv.h>\n#include <signal.h>\n#include <stdio.h>\n\n#include "macros.h"\n#include "dbg.h"\n#include "MemoryStore.h"\n#include "server.h"\n\nstatic void interruptCb( uv_signal_t *interrupt, int signal ) {\n puts( "" );\n log_info( "SIGINT caught. \e[1;31mQuitting\e[m." );\n MemoryStore_disconnect( interrupt->data );\n uv_stop( interrupt->loop );\n}\n\nint main ( int argc, char **argv ) {\n uv_loop_t *loop = uv_default_loop( );\n if ( !loop ) {\n log_err( "uv loop creation failed." );\n return 1;\n }\n\n Server *server = Server_new( "::", "9001", ServerProtocol_TCP );\n checkConstructor( server );\n checkFunction( Server_initWithLoop( server, loop ) );\n checkFunction( Server_listen( server ) );\n\n MemoryStore *store = MemoryStore_new( "reki2" );\n checkConstructor( store );\n checkFunction( MemoryStore_initConnection( store, "localhost", 6379 ) );\n checkFunction( MemoryStore_attachToLoop( store, loop ) );\n\n server->memStore = store;\n\n uv_signal_t interrupt;\n interrupt.data = (void*)store;\n uv_signal_init( loop, &interrupt );\n uv_signal_start( &interrupt, interruptCb, SIGINT );\n\n uv_run( loop, UV_RUN_DEFAULT );\n uv_loop_close( loop );\n\n return 0;\n}\n" (preproc_include) "#include <uv.h>\n" (#include) "#include" (system_lib_string) "<uv.h>" (preproc_include) "#include <signal.h>\n" (#include) "#include" (system_lib_string) "<signal.h>" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include "macros.h"\n" (#include) "#include" (string_literal) ""macros.h"" (") """ (string_content) "macros.h" (") """ (preproc_include) "#include "dbg.h"\n" (#include) "#include" (string_literal) ""dbg.h"" (") """ (string_content) "dbg.h" (") """ (preproc_include) "#include "MemoryStore.h"\n" (#include) "#include" (string_literal) ""MemoryStore.h"" (") """ (string_content) "MemoryStore.h" (") """ (preproc_include) "#include "server.h"\n" (#include) "#include" (string_literal) ""server.h"" (") """ (string_content) "server.h" (") """ (function_definition) "static void interruptCb( uv_signal_t *interrupt, int signal ) {\n puts( "" );\n log_info( "SIGINT caught. \e[1;31mQuitting\e[m." );\n MemoryStore_disconnect( interrupt->data );\n uv_stop( interrupt->loop );\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "interruptCb( uv_signal_t *interrupt, int signal )" (identifier) "interruptCb" (parameter_list) "( uv_signal_t *interrupt, int signal )" (() "(" (parameter_declaration) "uv_signal_t *interrupt" (type_identifier) "uv_signal_t" (pointer_declarator) "*interrupt" (*) "*" (identifier) "interrupt" (,) "," (parameter_declaration) "int signal" (primitive_type) "int" (identifier) "signal" ()) ")" (compound_statement) "{\n puts( "" );\n log_info( "SIGINT caught. \e[1;31mQuitting\e[m." );\n MemoryStore_disconnect( interrupt->data );\n uv_stop( interrupt->loop );\n}" ({) "{" (expression_statement) "puts( "" );" (call_expression) "puts( "" )" (identifier) "puts" (argument_list) "( "" )" (() "(" (string_literal) """" (") """ (") """ ()) ")" (;) ";" (expression_statement) "log_info( "SIGINT caught. \e[1;31mQuitting\e[m." );" (call_expression) "log_info( "SIGINT caught. \e[1;31mQuitting\e[m." )" (identifier) "log_info" (argument_list) "( "SIGINT caught. \e[1;31mQuitting\e[m." )" (() "(" (string_literal) ""SIGINT caught. \e[1;31mQuitting\e[m."" (") """ (string_content) "SIGINT caught. " (escape_sequence) "\e" (string_content) "[1;31mQuitting" (escape_sequence) "\e" (string_content) "[m." (") """ ()) ")" (;) ";" (expression_statement) "MemoryStore_disconnect( interrupt->data );" (call_expression) "MemoryStore_disconnect( interrupt->data )" (identifier) "MemoryStore_disconnect" (argument_list) "( interrupt->data )" (() "(" (field_expression) "interrupt->data" (identifier) "interrupt" (->) "->" (field_identifier) "data" ()) ")" (;) ";" (expression_statement) "uv_stop( interrupt->loop );" (call_expression) "uv_stop( interrupt->loop )" (identifier) "uv_stop" (argument_list) "( interrupt->loop )" (() "(" (field_expression) "interrupt->loop" (identifier) "interrupt" (->) "->" (field_identifier) "loop" ()) ")" (;) ";" (}) "}" (function_definition) "int main ( int argc, char **argv ) {\n uv_loop_t *loop = uv_default_loop( );\n if ( !loop ) {\n log_err( "uv loop creation failed." );\n return 1;\n }\n\n Server *server = Server_new( "::", "9001", ServerProtocol_TCP );\n checkConstructor( server );\n checkFunction( Server_initWithLoop( server, loop ) );\n checkFunction( Server_listen( server ) );\n\n MemoryStore *store = MemoryStore_new( "reki2" );\n checkConstructor( store );\n checkFunction( MemoryStore_initConnection( store, "localhost", 6379 ) );\n checkFunction( MemoryStore_attachToLoop( store, loop ) );\n\n server->memStore = store;\n\n uv_signal_t interrupt;\n interrupt.data = (void*)store;\n uv_signal_init( loop, &interrupt );\n uv_signal_start( &interrupt, interruptCb, SIGINT );\n\n uv_run( loop, UV_RUN_DEFAULT );\n uv_loop_close( loop );\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "main ( int argc, char **argv )" (identifier) "main" (parameter_list) "( int argc, char **argv )" (() "(" (parameter_declaration) "int argc" (primitive_type) "int" (identifier) "argc" (,) "," (parameter_declaration) "char **argv" (primitive_type) "char" (pointer_declarator) "**argv" (*) "*" (pointer_declarator) "*argv" (*) "*" (identifier) "argv" ()) ")" (compound_statement) "{\n uv_loop_t *loop = uv_default_loop( );\n if ( !loop ) {\n log_err( "uv loop creation failed." );\n return 1;\n }\n\n Server *server = Server_new( "::", "9001", ServerProtocol_TCP );\n checkConstructor( server );\n checkFunction( Server_initWithLoop( server, loop ) );\n checkFunction( Server_listen( server ) );\n\n MemoryStore *store = MemoryStore_new( "reki2" );\n checkConstructor( store );\n checkFunction( MemoryStore_initConnection( store, "localhost", 6379 ) );\n checkFunction( MemoryStore_attachToLoop( store, loop ) );\n\n server->memStore = store;\n\n uv_signal_t interrupt;\n interrupt.data = (void*)store;\n uv_signal_init( loop, &interrupt );\n uv_signal_start( &interrupt, interruptCb, SIGINT );\n\n uv_run( loop, UV_RUN_DEFAULT );\n uv_loop_close( loop );\n\n return 0;\n}" ({) "{" (declaration) "uv_loop_t *loop = uv_default_loop( );" (type_identifier) "uv_loop_t" (init_declarator) "*loop = uv_default_loop( )" (pointer_declarator) "*loop" (*) "*" (identifier) "loop" (=) "=" (call_expression) "uv_default_loop( )" (identifier) "uv_default_loop" (argument_list) "( )" (() "(" ()) ")" (;) ";" (if_statement) "if ( !loop ) {\n log_err( "uv loop creation failed." );\n return 1;\n }" (if) "if" (parenthesized_expression) "( !loop )" (() "(" (unary_expression) "!loop" (!) "!" (identifier) "loop" ()) ")" (compound_statement) "{\n log_err( "uv loop creation failed." );\n return 1;\n }" ({) "{" (expression_statement) "log_err( "uv loop creation failed." );" (call_expression) "log_err( "uv loop creation failed." )" (identifier) "log_err" (argument_list) "( "uv loop creation failed." )" (() "(" (string_literal) ""uv loop creation failed."" (") """ (string_content) "uv loop creation failed." (") """ ()) ")" (;) ";" (return_statement) "return 1;" (return) "return" (number_literal) "1" (;) ";" (}) "}" (declaration) "Server *server = Server_new( "::", "9001", ServerProtocol_TCP );" (type_identifier) "Server" (init_declarator) "*server = Server_new( "::", "9001", ServerProtocol_TCP )" (pointer_declarator) "*server" (*) "*" (identifier) "server" (=) "=" (call_expression) "Server_new( "::", "9001", ServerProtocol_TCP )" (identifier) "Server_new" (argument_list) "( "::", "9001", ServerProtocol_TCP )" (() "(" (string_literal) ""::"" (") """ (string_content) "::" (") """ (,) "," (string_literal) ""9001"" (") """ (string_content) "9001" (") """ (,) "," (identifier) "ServerProtocol_TCP" ()) ")" (;) ";" (expression_statement) "checkConstructor( server );" (call_expression) "checkConstructor( server )" (identifier) "checkConstructor" (argument_list) "( server )" (() "(" (identifier) "server" ()) ")" (;) ";" (expression_statement) "checkFunction( Server_initWithLoop( server, loop ) );" (call_expression) "checkFunction( Server_initWithLoop( server, loop ) )" (identifier) "checkFunction" (argument_list) "( Server_initWithLoop( server, loop ) )" (() "(" (call_expression) "Server_initWithLoop( server, loop )" (identifier) "Server_initWithLoop" (argument_list) "( server, loop )" (() "(" (identifier) "server" (,) "," (identifier) "loop" ()) ")" ()) ")" (;) ";" (expression_statement) "checkFunction( Server_listen( server ) );" (call_expression) "checkFunction( Server_listen( server ) )" (identifier) "checkFunction" (argument_list) "( Server_listen( server ) )" (() "(" (call_expression) "Server_listen( server )" (identifier) "Server_listen" (argument_list) "( server )" (() "(" (identifier) "server" ()) ")" ()) ")" (;) ";" (declaration) "MemoryStore *store = MemoryStore_new( "reki2" );" (type_identifier) "MemoryStore" (init_declarator) "*store = MemoryStore_new( "reki2" )" (pointer_declarator) "*store" (*) "*" (identifier) "store" (=) "=" (call_expression) "MemoryStore_new( "reki2" )" (identifier) "MemoryStore_new" (argument_list) "( "reki2" )" (() "(" (string_literal) ""reki2"" (") """ (string_content) "reki2" (") """ ()) ")" (;) ";" (expression_statement) "checkConstructor( store );" (call_expression) "checkConstructor( store )" (identifier) "checkConstructor" (argument_list) "( store )" (() "(" (identifier) "store" ()) ")" (;) ";" (expression_statement) "checkFunction( MemoryStore_initConnection( store, "localhost", 6379 ) );" (call_expression) "checkFunction( MemoryStore_initConnection( store, "localhost", 6379 ) )" (identifier) "checkFunction" (argument_list) "( MemoryStore_initConnection( store, "localhost", 6379 ) )" (() "(" (call_expression) "MemoryStore_initConnection( store, "localhost", 6379 )" (identifier) "MemoryStore_initConnection" (argument_list) "( store, "localhost", 6379 )" (() "(" (identifier) "store" (,) "," (string_literal) ""localhost"" (") """ (string_content) "localhost" (") """ (,) "," (number_literal) "6379" ()) ")" ()) ")" (;) ";" (expression_statement) "checkFunction( MemoryStore_attachToLoop( store, loop ) );" (call_expression) "checkFunction( MemoryStore_attachToLoop( store, loop ) )" (identifier) "checkFunction" (argument_list) "( MemoryStore_attachToLoop( store, loop ) )" (() "(" (call_expression) "MemoryStore_attachToLoop( store, loop )" (identifier) "MemoryStore_attachToLoop" (argument_list) "( store, loop )" (() "(" (identifier) "store" (,) "," (identifier) "loop" ()) ")" ()) ")" (;) ";" (expression_statement) "server->memStore = store;" (assignment_expression) "server->memStore = store" (field_expression) "server->memStore" (identifier) "server" (->) "->" (field_identifier) "memStore" (=) "=" (identifier) "store" (;) ";" (declaration) "uv_signal_t interrupt;" (type_identifier) "uv_signal_t" (identifier) "interrupt" (;) ";" (expression_statement) "interrupt.data = (void*)store;" (assignment_expression) "interrupt.data = (void*)store" (field_expression) "interrupt.data" (identifier) "interrupt" (.) "." (field_identifier) "data" (=) "=" (cast_expression) "(void*)store" (() "(" (type_descriptor) "void*" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "store" (;) ";" (expression_statement) "uv_signal_init( loop, &interrupt );" (call_expression) "uv_signal_init( loop, &interrupt )" (identifier) "uv_signal_init" (argument_list) "( loop, &interrupt )" (() "(" (identifier) "loop" (,) "," (pointer_expression) "&interrupt" (&) "&" (identifier) "interrupt" ()) ")" (;) ";" (expression_statement) "uv_signal_start( &interrupt, interruptCb, SIGINT );" (call_expression) "uv_signal_start( &interrupt, interruptCb, SIGINT )" (identifier) "uv_signal_start" (argument_list) "( &interrupt, interruptCb, SIGINT )" (() "(" (pointer_expression) "&interrupt" (&) "&" (identifier) "interrupt" (,) "," (identifier) "interruptCb" (,) "," (identifier) "SIGINT" ()) ")" (;) ";" (expression_statement) "uv_run( loop, UV_RUN_DEFAULT );" (call_expression) "uv_run( loop, UV_RUN_DEFAULT )" (identifier) "uv_run" (argument_list) "( loop, UV_RUN_DEFAULT )" (() "(" (identifier) "loop" (,) "," (identifier) "UV_RUN_DEFAULT" ()) ")" (;) ";" (expression_statement) "uv_loop_close( loop );" (call_expression) "uv_loop_close( loop )" (identifier) "uv_loop_close" (argument_list) "( loop )" (() "(" (identifier) "loop" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
359
0
{"language": "c", "success": true, "metadata": {"lines": 36, "avg_line_length": 30.58, "nodes": 200, "errors": 0, "source_hash": "07d4bff77673af9c1ea0f477a18311dd2a1491c415df0d9ed94adf8e077a8124", "categorized_nodes": 144}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <uv.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": "<uv.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 15}}, {"id": 3, "type": "preproc_include", "text": "#include <signal.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": "<signal.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <stdio.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": "<stdio.h>", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include \"macros.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": "\"macros.h\"", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 19}}, {"id": 12, "type": "preproc_include", "text": "#include \"dbg.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": "\"dbg.h\"", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 16}}, {"id": 15, "type": "preproc_include", "text": "#include \"MemoryStore.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": "\"MemoryStore.h\"", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 24}}, {"id": 18, "type": "preproc_include", "text": "#include \"server.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": "\"server.h\"", "parent": 18, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 19}}, {"id": 21, "type": "function_definition", "text": "static void interruptCb( uv_signal_t *interrupt, int signal ) {\n\tputs( \"\" );\n\tlog_info( \"SIGINT caught. \\e[1;31mQuitting\\e[m.\" );\n\tMemoryStore_disconnect( interrupt->data );\n\tuv_stop( interrupt->loop );\n}", "parent": null, "children": [22, 23], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 22, "type": "primitive_type", "text": "void", "parent": 21, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 11}}, {"id": 23, "type": "function_declarator", "text": "interruptCb( uv_signal_t *interrupt, int signal )", "parent": 21, "children": [24, 25], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 61}}, {"id": 24, "type": "identifier", "text": "interruptCb", "parent": 23, "children": [], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 23}}, {"id": 25, "type": "parameter_list", "text": "( uv_signal_t *interrupt, int signal )", "parent": 23, "children": [26, 31], "start_point": {"row": 9, "column": 23}, "end_point": {"row": 9, "column": 61}}, {"id": 26, "type": "parameter_declaration", "text": "uv_signal_t *interrupt", "parent": 25, "children": [27, 28], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 47}}, {"id": 27, "type": "type_identifier", "text": "uv_signal_t", "parent": 26, "children": [], "start_point": {"row": 9, "column": 25}, "end_point": {"row": 9, "column": 36}}, {"id": 28, "type": "pointer_declarator", "text": "*interrupt", "parent": 26, "children": [29, 30], "start_point": {"row": 9, "column": 37}, "end_point": {"row": 9, "column": 47}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 9, "column": 37}, "end_point": {"row": 9, "column": 38}}, {"id": 30, "type": "identifier", "text": "interrupt", "parent": 28, "children": [], "start_point": {"row": 9, "column": 38}, "end_point": {"row": 9, "column": 47}}, {"id": 31, "type": "parameter_declaration", "text": "int signal", "parent": 25, "children": [32, 33], "start_point": {"row": 9, "column": 49}, "end_point": {"row": 9, "column": 59}}, {"id": 32, "type": "primitive_type", "text": "int", "parent": 31, "children": [], "start_point": {"row": 9, "column": 49}, "end_point": {"row": 9, "column": 52}}, {"id": 33, "type": "identifier", "text": "signal", "parent": 31, "children": [], "start_point": {"row": 9, "column": 53}, "end_point": {"row": 9, "column": 59}}, {"id": 34, "type": "call_expression", "text": "puts( \"\" )", "parent": 21, "children": [35, 36], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 11}}, {"id": 35, "type": "identifier", "text": "puts", "parent": 34, "children": [], "start_point": {"row": 10, "column": 1}, "end_point": {"row": 10, "column": 5}}, {"id": 36, "type": "argument_list", "text": "( \"\" )", "parent": 34, "children": [37], "start_point": {"row": 10, "column": 5}, "end_point": {"row": 10, "column": 11}}, {"id": 37, "type": "string_literal", "text": "\"\"", "parent": 36, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 9}}, {"id": 38, "type": "call_expression", "text": "log_info( \"SIGINT caught. \\e[1;31mQuitting\\e[m.\" )", "parent": 21, "children": [39, 40], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 51}}, {"id": 39, "type": "identifier", "text": "log_info", "parent": 38, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 9}}, {"id": 40, "type": "argument_list", "text": "( \"SIGINT caught. \\e[1;31mQuitting\\e[m.\" )", "parent": 38, "children": [41], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 51}}, {"id": 41, "type": "string_literal", "text": "\"SIGINT caught. \\e[1;31mQuitting\\e[m.\"", "parent": 40, "children": [42, 43], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 49}}, {"id": 42, "type": "escape_sequence", "text": "\\e", "parent": 41, "children": [], "start_point": {"row": 11, "column": 27}, "end_point": {"row": 11, "column": 29}}, {"id": 43, "type": "escape_sequence", "text": "\\e", "parent": 41, "children": [], "start_point": {"row": 11, "column": 43}, "end_point": {"row": 11, "column": 45}}, {"id": 44, "type": "call_expression", "text": "MemoryStore_disconnect( interrupt->data )", "parent": 21, "children": [45, 46], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 42}}, {"id": 45, "type": "identifier", "text": "MemoryStore_disconnect", "parent": 44, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 23}}, {"id": 46, "type": "argument_list", "text": "( interrupt->data )", "parent": 44, "children": [47], "start_point": {"row": 12, "column": 23}, "end_point": {"row": 12, "column": 42}}, {"id": 47, "type": "field_expression", "text": "interrupt->data", "parent": 46, "children": [48, 49], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 40}}, {"id": 48, "type": "identifier", "text": "interrupt", "parent": 47, "children": [], "start_point": {"row": 12, "column": 25}, "end_point": {"row": 12, "column": 34}}, {"id": 49, "type": "field_identifier", "text": "data", "parent": 47, "children": [], "start_point": {"row": 12, "column": 36}, "end_point": {"row": 12, "column": 40}}, {"id": 50, "type": "call_expression", "text": "uv_stop( interrupt->loop )", "parent": 21, "children": [51, 52], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 27}}, {"id": 51, "type": "identifier", "text": "uv_stop", "parent": 50, "children": [], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 13, "column": 8}}, {"id": 52, "type": "argument_list", "text": "( interrupt->loop )", "parent": 50, "children": [53], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 27}}, {"id": 53, "type": "field_expression", "text": "interrupt->loop", "parent": 52, "children": [54, 55], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 25}}, {"id": 54, "type": "identifier", "text": "interrupt", "parent": 53, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 19}}, {"id": 55, "type": "field_identifier", "text": "loop", "parent": 53, "children": [], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 25}}, {"id": 56, "type": "function_definition", "text": "int main ( int argc, char **argv ) {\n\tuv_loop_t *loop = uv_default_loop( );\n\tif ( !loop ) {\n\t\tlog_err( \"uv loop creation failed.\" );\n\t\treturn 1;\n\t}\n\n\tServer *server = Server_new( \"::\", \"9001\", ServerProtocol_TCP );\n\tcheckConstructor( server );\n\tcheckFunction( Server_initWithLoop( server, loop ) );\n\tcheckFunction( Server_listen( server ) );\n\n\tMemoryStore *store = MemoryStore_new( \"reki2\" );\n\tcheckConstructor( store );\n\tcheckFunction( MemoryStore_initConnection( store, \"localhost\", 6379 ) );\n\tcheckFunction( MemoryStore_attachToLoop( store, loop ) );\n\n\tserver->memStore = store;\n\n\tuv_signal_t interrupt;\n\tinterrupt.data = (void*)store;\n\tuv_signal_init( loop, &interrupt );\n\tuv_signal_start( &interrupt, interruptCb, SIGINT );\n\n\tuv_run( loop, UV_RUN_DEFAULT );\n\tuv_loop_close( loop );\n\n\treturn 0;\n}", "parent": null, "children": [57, 58], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 44, "column": 1}}, {"id": 57, "type": "primitive_type", "text": "int", "parent": 56, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 3}}, {"id": 58, "type": "function_declarator", "text": "main ( int argc, char **argv )", "parent": 56, "children": [59, 60], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 34}}, {"id": 59, "type": "identifier", "text": "main", "parent": 58, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 8}}, {"id": 60, "type": "parameter_list", "text": "( int argc, char **argv )", "parent": 58, "children": [61, 64], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 34}}, {"id": 61, "type": "parameter_declaration", "text": "int argc", "parent": 60, "children": [62, 63], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 19}}, {"id": 62, "type": "primitive_type", "text": "int", "parent": 61, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 14}}, {"id": 63, "type": "identifier", "text": "argc", "parent": 61, "children": [], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 19}}, {"id": 64, "type": "parameter_declaration", "text": "char **argv", "parent": 60, "children": [65, 66], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 32}}, {"id": 65, "type": "primitive_type", "text": "char", "parent": 64, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 25}}, {"id": 66, "type": "pointer_declarator", "text": "**argv", "parent": 64, "children": [67, 68], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 32}}, {"id": 67, "type": "*", "text": "*", "parent": 66, "children": [], "start_point": {"row": 16, "column": 26}, "end_point": {"row": 16, "column": 27}}, {"id": 68, "type": "pointer_declarator", "text": "*argv", "parent": 66, "children": [69, 70], "start_point": {"row": 16, "column": 27}, "end_point": {"row": 16, "column": 32}}, {"id": 69, "type": "*", "text": "*", "parent": 68, "children": [], "start_point": {"row": 16, "column": 27}, "end_point": {"row": 16, "column": 28}}, {"id": 70, "type": "identifier", "text": "argv", "parent": 68, "children": [], "start_point": {"row": 16, "column": 28}, "end_point": {"row": 16, "column": 32}}, {"id": 71, "type": "declaration", "text": "uv_loop_t *loop = uv_default_loop( );", "parent": 56, "children": [72, 73], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 38}}, {"id": 72, "type": "type_identifier", "text": "uv_loop_t", "parent": 71, "children": [], "start_point": {"row": 17, "column": 1}, "end_point": {"row": 17, "column": 10}}, {"id": 73, "type": "init_declarator", "text": "*loop = uv_default_loop( )", "parent": 71, "children": [74, 77, 78], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 37}}, {"id": 74, "type": "pointer_declarator", "text": "*loop", "parent": 73, "children": [75, 76], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 16}}, {"id": 75, "type": "*", "text": "*", "parent": 74, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 12}}, {"id": 76, "type": "identifier", "text": "loop", "parent": 74, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 16}}, {"id": 77, "type": "=", "text": "=", "parent": 73, "children": [], "start_point": {"row": 17, "column": 17}, "end_point": {"row": 17, "column": 18}}, {"id": 78, "type": "call_expression", "text": "uv_default_loop( )", "parent": 73, "children": [79, 80], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 37}}, {"id": 79, "type": "identifier", "text": "uv_default_loop", "parent": 78, "children": [], "start_point": {"row": 17, "column": 19}, "end_point": {"row": 17, "column": 34}}, {"id": 80, "type": "argument_list", "text": "( )", "parent": 78, "children": [], "start_point": {"row": 17, "column": 34}, "end_point": {"row": 17, "column": 37}}, {"id": 81, "type": "if_statement", "text": "if ( !loop ) {\n\t\tlog_err( \"uv loop creation failed.\" );\n\t\treturn 1;\n\t}", "parent": 56, "children": [82], "start_point": {"row": 18, "column": 1}, "end_point": {"row": 21, "column": 2}}, {"id": 82, "type": "parenthesized_expression", "text": "( !loop )", "parent": 81, "children": [83], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 13}}, {"id": 83, "type": "unary_expression", "text": "!loop", "parent": 82, "children": [84, 85], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 11}}, {"id": 84, "type": "!", "text": "!", "parent": 83, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 7}}, {"id": 85, "type": "identifier", "text": "loop", "parent": 83, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 11}}, {"id": 86, "type": "call_expression", "text": "log_err( \"uv loop creation failed.\" )", "parent": 81, "children": [87, 88], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 39}}, {"id": 87, "type": "identifier", "text": "log_err", "parent": 86, "children": [], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 19, "column": 9}}, {"id": 88, "type": "argument_list", "text": "( \"uv loop creation failed.\" )", "parent": 86, "children": [89], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 39}}, {"id": 89, "type": "string_literal", "text": "\"uv loop creation failed.\"", "parent": 88, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 37}}, {"id": 90, "type": "return_statement", "text": "return 1;", "parent": 81, "children": [91], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 11}}, {"id": 91, "type": "number_literal", "text": "1", "parent": 90, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 10}}, {"id": 92, "type": "declaration", "text": "Server *server = Server_new( \"::\", \"9001\", ServerProtocol_TCP );", "parent": 56, "children": [93, 94], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 65}}, {"id": 93, "type": "type_identifier", "text": "Server", "parent": 92, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 7}}, {"id": 94, "type": "init_declarator", "text": "*server = Server_new( \"::\", \"9001\", ServerProtocol_TCP )", "parent": 92, "children": [95, 98, 99], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 64}}, {"id": 95, "type": "pointer_declarator", "text": "*server", "parent": 94, "children": [96, 97], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 15}}, {"id": 96, "type": "*", "text": "*", "parent": 95, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 9}}, {"id": 97, "type": "identifier", "text": "server", "parent": 95, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 15}}, {"id": 98, "type": "=", "text": "=", "parent": 94, "children": [], "start_point": {"row": 23, "column": 16}, "end_point": {"row": 23, "column": 17}}, {"id": 99, "type": "call_expression", "text": "Server_new( \"::\", \"9001\", ServerProtocol_TCP )", "parent": 94, "children": [100, 101], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 64}}, {"id": 100, "type": "identifier", "text": "Server_new", "parent": 99, "children": [], "start_point": {"row": 23, "column": 18}, "end_point": {"row": 23, "column": 28}}, {"id": 101, "type": "argument_list", "text": "( \"::\", \"9001\", ServerProtocol_TCP )", "parent": 99, "children": [102, 103, 104], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 64}}, {"id": 102, "type": "string_literal", "text": "\"::\"", "parent": 101, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 34}}, {"id": 103, "type": "string_literal", "text": "\"9001\"", "parent": 101, "children": [], "start_point": {"row": 23, "column": 36}, "end_point": {"row": 23, "column": 42}}, {"id": 104, "type": "identifier", "text": "ServerProtocol_TCP", "parent": 101, "children": [], "start_point": {"row": 23, "column": 44}, "end_point": {"row": 23, "column": 62}}, {"id": 105, "type": "call_expression", "text": "checkConstructor( server )", "parent": 56, "children": [106, 107], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 27}}, {"id": 106, "type": "identifier", "text": "checkConstructor", "parent": 105, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 17}}, {"id": 107, "type": "argument_list", "text": "( server )", "parent": 105, "children": [108], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 27}}, {"id": 108, "type": "identifier", "text": "server", "parent": 107, "children": [], "start_point": {"row": 24, "column": 19}, "end_point": {"row": 24, "column": 25}}, {"id": 109, "type": "call_expression", "text": "checkFunction( Server_initWithLoop( server, loop ) )", "parent": 56, "children": [110, 111], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 53}}, {"id": 110, "type": "identifier", "text": "checkFunction", "parent": 109, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 14}}, {"id": 111, "type": "argument_list", "text": "( Server_initWithLoop( server, loop ) )", "parent": 109, "children": [112], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 53}}, {"id": 112, "type": "call_expression", "text": "Server_initWithLoop( server, loop )", "parent": 111, "children": [113, 114], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 51}}, {"id": 113, "type": "identifier", "text": "Server_initWithLoop", "parent": 112, "children": [], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 35}}, {"id": 114, "type": "argument_list", "text": "( server, loop )", "parent": 112, "children": [115, 116], "start_point": {"row": 25, "column": 35}, "end_point": {"row": 25, "column": 51}}, {"id": 115, "type": "identifier", "text": "server", "parent": 114, "children": [], "start_point": {"row": 25, "column": 37}, "end_point": {"row": 25, "column": 43}}, {"id": 116, "type": "identifier", "text": "loop", "parent": 114, "children": [], "start_point": {"row": 25, "column": 45}, "end_point": {"row": 25, "column": 49}}, {"id": 117, "type": "call_expression", "text": "checkFunction( Server_listen( server ) )", "parent": 56, "children": [118, 119], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 41}}, {"id": 118, "type": "identifier", "text": "checkFunction", "parent": 117, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 14}}, {"id": 119, "type": "argument_list", "text": "( Server_listen( server ) )", "parent": 117, "children": [120], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 26, "column": 41}}, {"id": 120, "type": "call_expression", "text": "Server_listen( server )", "parent": 119, "children": [121, 122], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 39}}, {"id": 121, "type": "identifier", "text": "Server_listen", "parent": 120, "children": [], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 29}}, {"id": 122, "type": "argument_list", "text": "( server )", "parent": 120, "children": [123], "start_point": {"row": 26, "column": 29}, "end_point": {"row": 26, "column": 39}}, {"id": 123, "type": "identifier", "text": "server", "parent": 122, "children": [], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 37}}, {"id": 124, "type": "declaration", "text": "MemoryStore *store = MemoryStore_new( \"reki2\" );", "parent": 56, "children": [125, 126], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 49}}, {"id": 125, "type": "type_identifier", "text": "MemoryStore", "parent": 124, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 12}}, {"id": 126, "type": "init_declarator", "text": "*store = MemoryStore_new( \"reki2\" )", "parent": 124, "children": [127, 130, 131], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 48}}, {"id": 127, "type": "pointer_declarator", "text": "*store", "parent": 126, "children": [128, 129], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 19}}, {"id": 128, "type": "*", "text": "*", "parent": 127, "children": [], "start_point": {"row": 28, "column": 13}, "end_point": {"row": 28, "column": 14}}, {"id": 129, "type": "identifier", "text": "store", "parent": 127, "children": [], "start_point": {"row": 28, "column": 14}, "end_point": {"row": 28, "column": 19}}, {"id": 130, "type": "=", "text": "=", "parent": 126, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 21}}, {"id": 131, "type": "call_expression", "text": "MemoryStore_new( \"reki2\" )", "parent": 126, "children": [132, 133], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 48}}, {"id": 132, "type": "identifier", "text": "MemoryStore_new", "parent": 131, "children": [], "start_point": {"row": 28, "column": 22}, "end_point": {"row": 28, "column": 37}}, {"id": 133, "type": "argument_list", "text": "( \"reki2\" )", "parent": 131, "children": [134], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 48}}, {"id": 134, "type": "string_literal", "text": "\"reki2\"", "parent": 133, "children": [], "start_point": {"row": 28, "column": 39}, "end_point": {"row": 28, "column": 46}}, {"id": 135, "type": "call_expression", "text": "checkConstructor( store )", "parent": 56, "children": [136, 137], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 26}}, {"id": 136, "type": "identifier", "text": "checkConstructor", "parent": 135, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 17}}, {"id": 137, "type": "argument_list", "text": "( store )", "parent": 135, "children": [138], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 26}}, {"id": 138, "type": "identifier", "text": "store", "parent": 137, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 24}}, {"id": 139, "type": "call_expression", "text": "checkFunction( MemoryStore_initConnection( store, \"localhost\", 6379 ) )", "parent": 56, "children": [140, 141], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 72}}, {"id": 140, "type": "identifier", "text": "checkFunction", "parent": 139, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 14}}, {"id": 141, "type": "argument_list", "text": "( MemoryStore_initConnection( store, \"localhost\", 6379 ) )", "parent": 139, "children": [142], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 72}}, {"id": 142, "type": "call_expression", "text": "MemoryStore_initConnection( store, \"localhost\", 6379 )", "parent": 141, "children": [143, 144], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 70}}, {"id": 143, "type": "identifier", "text": "MemoryStore_initConnection", "parent": 142, "children": [], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 42}}, {"id": 144, "type": "argument_list", "text": "( store, \"localhost\", 6379 )", "parent": 142, "children": [145, 146, 147], "start_point": {"row": 30, "column": 42}, "end_point": {"row": 30, "column": 70}}, {"id": 145, "type": "identifier", "text": "store", "parent": 144, "children": [], "start_point": {"row": 30, "column": 44}, "end_point": {"row": 30, "column": 49}}, {"id": 146, "type": "string_literal", "text": "\"localhost\"", "parent": 144, "children": [], "start_point": {"row": 30, "column": 51}, "end_point": {"row": 30, "column": 62}}, {"id": 147, "type": "number_literal", "text": "6379", "parent": 144, "children": [], "start_point": {"row": 30, "column": 64}, "end_point": {"row": 30, "column": 68}}, {"id": 148, "type": "call_expression", "text": "checkFunction( MemoryStore_attachToLoop( store, loop ) )", "parent": 56, "children": [149, 150], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 57}}, {"id": 149, "type": "identifier", "text": "checkFunction", "parent": 148, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 14}}, {"id": 150, "type": "argument_list", "text": "( MemoryStore_attachToLoop( store, loop ) )", "parent": 148, "children": [151], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 57}}, {"id": 151, "type": "call_expression", "text": "MemoryStore_attachToLoop( store, loop )", "parent": 150, "children": [152, 153], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 55}}, {"id": 152, "type": "identifier", "text": "MemoryStore_attachToLoop", "parent": 151, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 40}}, {"id": 153, "type": "argument_list", "text": "( store, loop )", "parent": 151, "children": [154, 155], "start_point": {"row": 31, "column": 40}, "end_point": {"row": 31, "column": 55}}, {"id": 154, "type": "identifier", "text": "store", "parent": 153, "children": [], "start_point": {"row": 31, "column": 42}, "end_point": {"row": 31, "column": 47}}, {"id": 155, "type": "identifier", "text": "loop", "parent": 153, "children": [], "start_point": {"row": 31, "column": 49}, "end_point": {"row": 31, "column": 53}}, {"id": 156, "type": "assignment_expression", "text": "server->memStore = store", "parent": 56, "children": [157, 160, 161], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 25}}, {"id": 157, "type": "field_expression", "text": "server->memStore", "parent": 156, "children": [158, 159], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 17}}, {"id": 158, "type": "identifier", "text": "server", "parent": 157, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 7}}, {"id": 159, "type": "field_identifier", "text": "memStore", "parent": 157, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 17}}, {"id": 160, "type": "=", "text": "=", "parent": 156, "children": [], "start_point": {"row": 33, "column": 18}, "end_point": {"row": 33, "column": 19}}, {"id": 161, "type": "identifier", "text": "store", "parent": 156, "children": [], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 25}}, {"id": 162, "type": "declaration", "text": "uv_signal_t interrupt;", "parent": 56, "children": [163, 164], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 23}}, {"id": 163, "type": "type_identifier", "text": "uv_signal_t", "parent": 162, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 12}}, {"id": 164, "type": "identifier", "text": "interrupt", "parent": 162, "children": [], "start_point": {"row": 35, "column": 13}, "end_point": {"row": 35, "column": 22}}, {"id": 165, "type": "assignment_expression", "text": "interrupt.data = (void*)store", "parent": 56, "children": [166, 169, 170], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 30}}, {"id": 166, "type": "field_expression", "text": "interrupt.data", "parent": 165, "children": [167, 168], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 15}}, {"id": 167, "type": "identifier", "text": "interrupt", "parent": 166, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 10}}, {"id": 168, "type": "field_identifier", "text": "data", "parent": 166, "children": [], "start_point": {"row": 36, "column": 11}, "end_point": {"row": 36, "column": 15}}, {"id": 169, "type": "=", "text": "=", "parent": 165, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 17}}, {"id": 170, "type": "cast_expression", "text": "(void*)store", "parent": 165, "children": [171, 175], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 30}}, {"id": 171, "type": "type_descriptor", "text": "void*", "parent": 170, "children": [172, 173], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 24}}, {"id": 172, "type": "primitive_type", "text": "void", "parent": 171, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 23}}, {"id": 173, "type": "abstract_pointer_declarator", "text": "*", "parent": 171, "children": [174], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 24}}, {"id": 174, "type": "*", "text": "*", "parent": 173, "children": [], "start_point": {"row": 36, "column": 23}, "end_point": {"row": 36, "column": 24}}, {"id": 175, "type": "identifier", "text": "store", "parent": 170, "children": [], "start_point": {"row": 36, "column": 25}, "end_point": {"row": 36, "column": 30}}, {"id": 176, "type": "call_expression", "text": "uv_signal_init( loop, &interrupt )", "parent": 56, "children": [177, 178], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 35}}, {"id": 177, "type": "identifier", "text": "uv_signal_init", "parent": 176, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 15}}, {"id": 178, "type": "argument_list", "text": "( loop, &interrupt )", "parent": 176, "children": [179, 180], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 35}}, {"id": 179, "type": "identifier", "text": "loop", "parent": 178, "children": [], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 21}}, {"id": 180, "type": "pointer_expression", "text": "&interrupt", "parent": 178, "children": [181], "start_point": {"row": 37, "column": 23}, "end_point": {"row": 37, "column": 33}}, {"id": 181, "type": "identifier", "text": "interrupt", "parent": 180, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 33}}, {"id": 182, "type": "call_expression", "text": "uv_signal_start( &interrupt, interruptCb, SIGINT )", "parent": 56, "children": [183, 184], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 51}}, {"id": 183, "type": "identifier", "text": "uv_signal_start", "parent": 182, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 16}}, {"id": 184, "type": "argument_list", "text": "( &interrupt, interruptCb, SIGINT )", "parent": 182, "children": [185, 187, 188], "start_point": {"row": 38, "column": 16}, "end_point": {"row": 38, "column": 51}}, {"id": 185, "type": "pointer_expression", "text": "&interrupt", "parent": 184, "children": [186], "start_point": {"row": 38, "column": 18}, "end_point": {"row": 38, "column": 28}}, {"id": 186, "type": "identifier", "text": "interrupt", "parent": 185, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 28}}, {"id": 187, "type": "identifier", "text": "interruptCb", "parent": 184, "children": [], "start_point": {"row": 38, "column": 30}, "end_point": {"row": 38, "column": 41}}, {"id": 188, "type": "identifier", "text": "SIGINT", "parent": 184, "children": [], "start_point": {"row": 38, "column": 43}, "end_point": {"row": 38, "column": 49}}, {"id": 189, "type": "call_expression", "text": "uv_run( loop, UV_RUN_DEFAULT )", "parent": 56, "children": [190, 191], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 31}}, {"id": 190, "type": "identifier", "text": "uv_run", "parent": 189, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 7}}, {"id": 191, "type": "argument_list", "text": "( loop, UV_RUN_DEFAULT )", "parent": 189, "children": [192, 193], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 31}}, {"id": 192, "type": "identifier", "text": "loop", "parent": 191, "children": [], "start_point": {"row": 40, "column": 9}, "end_point": {"row": 40, "column": 13}}, {"id": 193, "type": "identifier", "text": "UV_RUN_DEFAULT", "parent": 191, "children": [], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 29}}, {"id": 194, "type": "call_expression", "text": "uv_loop_close( loop )", "parent": 56, "children": [195, 196], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 22}}, {"id": 195, "type": "identifier", "text": "uv_loop_close", "parent": 194, "children": [], "start_point": {"row": 41, "column": 1}, "end_point": {"row": 41, "column": 14}}, {"id": 196, "type": "argument_list", "text": "( loop )", "parent": 194, "children": [197], "start_point": {"row": 41, "column": 14}, "end_point": {"row": 41, "column": 22}}, {"id": 197, "type": "identifier", "text": "loop", "parent": 196, "children": [], "start_point": {"row": 41, "column": 16}, "end_point": {"row": 41, "column": 20}}, {"id": 198, "type": "return_statement", "text": "return 0;", "parent": 56, "children": [199], "start_point": {"row": 43, "column": 1}, "end_point": {"row": 43, "column": 10}}, {"id": 199, "type": "number_literal", "text": "0", "parent": 198, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 9}}]}, "node_categories": {"declarations": {"functions": [21, 23, 56, 58], "variables": [26, 31, 61, 64, 71, 92, 124, 162], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [34, 38, 44, 47, 50, 53, 78, 82, 83, 86, 99, 105, 109, 112, 117, 120, 131, 135, 139, 142, 148, 151, 157, 166, 170, 176, 180, 182, 185, 189, 194], "assignments": [156, 165], "loops": [], "conditionals": [24, 27, 30, 33, 35, 39, 45, 48, 49, 51, 54, 55, 59, 63, 70, 72, 76, 79, 81, 85, 87, 93, 97, 100, 104, 106, 108, 110, 113, 115, 116, 118, 121, 123, 125, 129, 132, 136, 138, 140, 143, 145, 149, 152, 154, 155, 158, 159, 161, 163, 164, 167, 168, 175, 177, 179, 181, 183, 186, 187, 188, 190, 192, 193, 195, 197], "returns": [90, 198], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 17, 20, 37, 41, 89, 91, 102, 103, 134, 146, 147, 199], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 21, "universal_type": "function", "name": "interruptCb", "text_snippet": "static void interruptCb( uv_signal_t *interrupt, int signal ) {\n\tputs( \"\" );\n\tlog_info( \"SIGINT caug"}, {"node_id": 23, "universal_type": "function", "name": "signal", "text_snippet": "interruptCb( uv_signal_t *interrupt, int signal )"}, {"node_id": 56, "universal_type": "function", "name": "main", "text_snippet": "int main ( int argc, char **argv ) {\n\tuv_loop_t *loop = uv_default_loop( );\n\tif ( !loop ) {\n\t\tlog_er"}, {"node_id": 58, "universal_type": "function", "name": "argc,", "text_snippet": "main ( int argc, char **argv )"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <uv.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <signal.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 \"macros.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"dbg.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"MemoryStore.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"server.h\"\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "#include <uv.h>\n#include <signal.h>\n#include <stdio.h>\n\n#include \"macros.h\"\n#include \"dbg.h\"\n#include \"MemoryStore.h\"\n#include \"server.h\"\n\nstatic void interruptCb( uv_signal_t *interrupt, int signal ) {\n\tputs( \"\" );\n\tlog_info( \"SIGINT caught. \\e[1;31mQuitting\\e[m.\" );\n\tMemoryStore_disconnect( interrupt->data );\n\tuv_stop( interrupt->loop );\n}\n\nint main ( int argc, char **argv ) {\n\tuv_loop_t *loop = uv_default_loop( );\n\tif ( !loop ) {\n\t\tlog_err( \"uv loop creation failed.\" );\n\t\treturn 1;\n\t}\n\n\tServer *server = Server_new( \"::\", \"9001\", ServerProtocol_TCP );\n\tcheckConstructor( server );\n\tcheckFunction( Server_initWithLoop( server, loop ) );\n\tcheckFunction( Server_listen( server ) );\n\n\tMemoryStore *store = MemoryStore_new( \"reki2\" );\n\tcheckConstructor( store );\n\tcheckFunction( MemoryStore_initConnection( store, \"localhost\", 6379 ) );\n\tcheckFunction( MemoryStore_attachToLoop( store, loop ) );\n\n\tserver->memStore = store;\n\n\tuv_signal_t interrupt;\n\tinterrupt.data = (void*)store;\n\tuv_signal_init( loop, &interrupt );\n\tuv_signal_start( &interrupt, interruptCb, SIGINT );\n\n\tuv_run( loop, UV_RUN_DEFAULT );\n\tuv_loop_close( loop );\n\n\treturn 0;\n}\n"}
66
c
#include <stdio.h> #include <stdlib.h> int largestSumContinousSubArray(int arr[], int size) { int max_till = 0; int max_int = 0; for (int i = 0; i < size; i++) { max_int = max_int + arr[i]; if(max_till < max_int) { max_till = max_int; } if (max_int < 0) { max_int = 0; } } return max_till; } int main() { int array[10]; for (int k = 0; k < 10; k++) { array[k] = rand() % 10; } printf("%d", largestSumContinousSubArray(array, 10)); }
19
23
(translation_unit) "#include <stdio.h>\n#include <stdlib.h>\n\nint largestSumContinousSubArray(int arr[], int size) {\n int max_till = 0;\n int max_int = 0;\n for (int i = 0; i < size; i++) {\n max_int = max_int + arr[i];\n if(max_till < max_int) {\n max_till = max_int;\n }\n if (max_int < 0) {\n max_int = 0;\n }\n }\n return max_till;\n}\n\nint main() {\n int array[10];\n for (int k = 0; k < 10; k++) {\n array[k] = rand() % 10;\n }\n printf("%d", largestSumContinousSubArray(array, 10));\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>" (function_definition) "int largestSumContinousSubArray(int arr[], int size) {\n int max_till = 0;\n int max_int = 0;\n for (int i = 0; i < size; i++) {\n max_int = max_int + arr[i];\n if(max_till < max_int) {\n max_till = max_int;\n }\n if (max_int < 0) {\n max_int = 0;\n }\n }\n return max_till;\n}" (primitive_type) "int" (function_declarator) "largestSumContinousSubArray(int arr[], int size)" (identifier) "largestSumContinousSubArray" (parameter_list) "(int arr[], int size)" (() "(" (parameter_declaration) "int arr[]" (primitive_type) "int" (array_declarator) "arr[]" (identifier) "arr" ([) "[" (]) "]" (,) "," (parameter_declaration) "int size" (primitive_type) "int" (identifier) "size" ()) ")" (compound_statement) "{\n int max_till = 0;\n int max_int = 0;\n for (int i = 0; i < size; i++) {\n max_int = max_int + arr[i];\n if(max_till < max_int) {\n max_till = max_int;\n }\n if (max_int < 0) {\n max_int = 0;\n }\n }\n return max_till;\n}" ({) "{" (declaration) "int max_till = 0;" (primitive_type) "int" (init_declarator) "max_till = 0" (identifier) "max_till" (=) "=" (number_literal) "0" (;) ";" (declaration) "int max_int = 0;" (primitive_type) "int" (init_declarator) "max_int = 0" (identifier) "max_int" (=) "=" (number_literal) "0" (;) ";" (for_statement) "for (int i = 0; i < size; i++) {\n max_int = max_int + arr[i];\n if(max_till < max_int) {\n max_till = max_int;\n }\n if (max_int < 0) {\n max_int = 0;\n }\n }" (for) "for" (() "(" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < size" (identifier) "i" (<) "<" (identifier) "size" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n max_int = max_int + arr[i];\n if(max_till < max_int) {\n max_till = max_int;\n }\n if (max_int < 0) {\n max_int = 0;\n }\n }" ({) "{" (expression_statement) "max_int = max_int + arr[i];" (assignment_expression) "max_int = max_int + arr[i]" (identifier) "max_int" (=) "=" (binary_expression) "max_int + arr[i]" (identifier) "max_int" (+) "+" (subscript_expression) "arr[i]" (identifier) "arr" ([) "[" (identifier) "i" (]) "]" (;) ";" (if_statement) "if(max_till < max_int) {\n max_till = max_int;\n }" (if) "if" (parenthesized_expression) "(max_till < max_int)" (() "(" (binary_expression) "max_till < max_int" (identifier) "max_till" (<) "<" (identifier) "max_int" ()) ")" (compound_statement) "{\n max_till = max_int;\n }" ({) "{" (expression_statement) "max_till = max_int;" (assignment_expression) "max_till = max_int" (identifier) "max_till" (=) "=" (identifier) "max_int" (;) ";" (}) "}" (if_statement) "if (max_int < 0) {\n max_int = 0;\n }" (if) "if" (parenthesized_expression) "(max_int < 0)" (() "(" (binary_expression) "max_int < 0" (identifier) "max_int" (<) "<" (number_literal) "0" ()) ")" (compound_statement) "{\n max_int = 0;\n }" ({) "{" (expression_statement) "max_int = 0;" (assignment_expression) "max_int = 0" (identifier) "max_int" (=) "=" (number_literal) "0" (;) ";" (}) "}" (}) "}" (return_statement) "return max_till;" (return) "return" (identifier) "max_till" (;) ";" (}) "}" (function_definition) "int main() {\n int array[10];\n for (int k = 0; k < 10; k++) {\n array[k] = rand() % 10;\n }\n printf("%d", largestSumContinousSubArray(array, 10));\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n int array[10];\n for (int k = 0; k < 10; k++) {\n array[k] = rand() % 10;\n }\n printf("%d", largestSumContinousSubArray(array, 10));\n}" ({) "{" (declaration) "int array[10];" (primitive_type) "int" (array_declarator) "array[10]" (identifier) "array" ([) "[" (number_literal) "10" (]) "]" (;) ";" (for_statement) "for (int k = 0; k < 10; k++) {\n array[k] = rand() % 10;\n }" (for) "for" (() "(" (declaration) "int k = 0;" (primitive_type) "int" (init_declarator) "k = 0" (identifier) "k" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "k < 10" (identifier) "k" (<) "<" (number_literal) "10" (;) ";" (update_expression) "k++" (identifier) "k" (++) "++" ()) ")" (compound_statement) "{\n array[k] = rand() % 10;\n }" ({) "{" (expression_statement) "array[k] = rand() % 10;" (assignment_expression) "array[k] = rand() % 10" (subscript_expression) "array[k]" (identifier) "array" ([) "[" (identifier) "k" (]) "]" (=) "=" (binary_expression) "rand() % 10" (call_expression) "rand()" (identifier) "rand" (argument_list) "()" (() "(" ()) ")" (%) "%" (number_literal) "10" (;) ";" (}) "}" (expression_statement) "printf("%d", largestSumContinousSubArray(array, 10));" (call_expression) "printf("%d", largestSumContinousSubArray(array, 10))" (identifier) "printf" (argument_list) "("%d", largestSumContinousSubArray(array, 10))" (() "(" (string_literal) ""%d"" (") """ (string_content) "%d" (") """ (,) "," (call_expression) "largestSumContinousSubArray(array, 10)" (identifier) "largestSumContinousSubArray" (argument_list) "(array, 10)" (() "(" (identifier) "array" (,) "," (number_literal) "10" ()) ")" ()) ")" (;) ";" (}) "}"
193
0
{"language": "c", "success": true, "metadata": {"lines": 23, "avg_line_length": 19.0, "nodes": 119, "errors": 0, "source_hash": "0cab23f97dd16cec0e612df183110048d517619a14da72097ee274e0f78eeef5", "categorized_nodes": 83}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "function_definition", "text": "int largestSumContinousSubArray(int arr[], int size) {\n\tint max_till = 0;\n\tint max_int = 0;\n\tfor (int i = 0; i < size; i++) {\n\t\tmax_int = max_int + arr[i];\n\t\tif(max_till < max_int) {\n\t\t\tmax_till = max_int;\n\t\t}\n\t\tif (max_int < 0) {\n\t\t\tmax_int = 0;\n\t\t}\n\t}\n\treturn max_till;\n}", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 7, "type": "primitive_type", "text": "int", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 3}}, {"id": 8, "type": "function_declarator", "text": "largestSumContinousSubArray(int arr[], int size)", "parent": 6, "children": [9, 10], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 52}}, {"id": 9, "type": "identifier", "text": "largestSumContinousSubArray", "parent": 8, "children": [], "start_point": {"row": 3, "column": 4}, "end_point": {"row": 3, "column": 31}}, {"id": 10, "type": "parameter_list", "text": "(int arr[], int size)", "parent": 8, "children": [11, 15], "start_point": {"row": 3, "column": 31}, "end_point": {"row": 3, "column": 52}}, {"id": 11, "type": "parameter_declaration", "text": "int arr[]", "parent": 10, "children": [12, 13], "start_point": {"row": 3, "column": 32}, "end_point": {"row": 3, "column": 41}}, {"id": 12, "type": "primitive_type", "text": "int", "parent": 11, "children": [], "start_point": {"row": 3, "column": 32}, "end_point": {"row": 3, "column": 35}}, {"id": 13, "type": "array_declarator", "text": "arr[]", "parent": 11, "children": [14], "start_point": {"row": 3, "column": 36}, "end_point": {"row": 3, "column": 41}}, {"id": 14, "type": "identifier", "text": "arr", "parent": 13, "children": [], "start_point": {"row": 3, "column": 36}, "end_point": {"row": 3, "column": 39}}, {"id": 15, "type": "parameter_declaration", "text": "int size", "parent": 10, "children": [16, 17], "start_point": {"row": 3, "column": 43}, "end_point": {"row": 3, "column": 51}}, {"id": 16, "type": "primitive_type", "text": "int", "parent": 15, "children": [], "start_point": {"row": 3, "column": 43}, "end_point": {"row": 3, "column": 46}}, {"id": 17, "type": "identifier", "text": "size", "parent": 15, "children": [], "start_point": {"row": 3, "column": 47}, "end_point": {"row": 3, "column": 51}}, {"id": 18, "type": "declaration", "text": "int max_till = 0;", "parent": 6, "children": [19, 20], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 18}}, {"id": 19, "type": "primitive_type", "text": "int", "parent": 18, "children": [], "start_point": {"row": 4, "column": 1}, "end_point": {"row": 4, "column": 4}}, {"id": 20, "type": "init_declarator", "text": "max_till = 0", "parent": 18, "children": [21, 22, 23], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 17}}, {"id": 21, "type": "identifier", "text": "max_till", "parent": 20, "children": [], "start_point": {"row": 4, "column": 5}, "end_point": {"row": 4, "column": 13}}, {"id": 22, "type": "=", "text": "=", "parent": 20, "children": [], "start_point": {"row": 4, "column": 14}, "end_point": {"row": 4, "column": 15}}, {"id": 23, "type": "number_literal", "text": "0", "parent": 20, "children": [], "start_point": {"row": 4, "column": 16}, "end_point": {"row": 4, "column": 17}}, {"id": 24, "type": "declaration", "text": "int max_int = 0;", "parent": 6, "children": [25, 26], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 17}}, {"id": 25, "type": "primitive_type", "text": "int", "parent": 24, "children": [], "start_point": {"row": 5, "column": 1}, "end_point": {"row": 5, "column": 4}}, {"id": 26, "type": "init_declarator", "text": "max_int = 0", "parent": 24, "children": [27, 28, 29], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 16}}, {"id": 27, "type": "identifier", "text": "max_int", "parent": 26, "children": [], "start_point": {"row": 5, "column": 5}, "end_point": {"row": 5, "column": 12}}, {"id": 28, "type": "=", "text": "=", "parent": 26, "children": [], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 14}}, {"id": 29, "type": "number_literal", "text": "0", "parent": 26, "children": [], "start_point": {"row": 5, "column": 15}, "end_point": {"row": 5, "column": 16}}, {"id": 30, "type": "for_statement", "text": "for (int i = 0; i < size; i++) {\n\t\tmax_int = max_int + arr[i];\n\t\tif(max_till < max_int) {\n\t\t\tmax_till = max_int;\n\t\t}\n\t\tif (max_int < 0) {\n\t\t\tmax_int = 0;\n\t\t}\n\t}", "parent": 6, "children": [31, 37, 41], "start_point": {"row": 6, "column": 1}, "end_point": {"row": 14, "column": 2}}, {"id": 31, "type": "declaration", "text": "int i = 0;", "parent": 30, "children": [32, 33], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 16}}, {"id": 32, "type": "primitive_type", "text": "int", "parent": 31, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 9}}, {"id": 33, "type": "init_declarator", "text": "i = 0", "parent": 31, "children": [34, 35, 36], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 15}}, {"id": 34, "type": "identifier", "text": "i", "parent": 33, "children": [], "start_point": {"row": 6, "column": 10}, "end_point": {"row": 6, "column": 11}}, {"id": 35, "type": "=", "text": "=", "parent": 33, "children": [], "start_point": {"row": 6, "column": 12}, "end_point": {"row": 6, "column": 13}}, {"id": 36, "type": "number_literal", "text": "0", "parent": 33, "children": [], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 15}}, {"id": 37, "type": "binary_expression", "text": "i < size", "parent": 30, "children": [38, 39, 40], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 25}}, {"id": 38, "type": "identifier", "text": "i", "parent": 37, "children": [], "start_point": {"row": 6, "column": 17}, "end_point": {"row": 6, "column": 18}}, {"id": 39, "type": "<", "text": "<", "parent": 37, "children": [], "start_point": {"row": 6, "column": 19}, "end_point": {"row": 6, "column": 20}}, {"id": 40, "type": "identifier", "text": "size", "parent": 37, "children": [], "start_point": {"row": 6, "column": 21}, "end_point": {"row": 6, "column": 25}}, {"id": 41, "type": "update_expression", "text": "i++", "parent": 30, "children": [42, 43], "start_point": {"row": 6, "column": 27}, "end_point": {"row": 6, "column": 30}}, {"id": 42, "type": "identifier", "text": "i", "parent": 41, "children": [], "start_point": {"row": 6, "column": 27}, "end_point": {"row": 6, "column": 28}}, {"id": 43, "type": "++", "text": "++", "parent": 41, "children": [], "start_point": {"row": 6, "column": 28}, "end_point": {"row": 6, "column": 30}}, {"id": 44, "type": "assignment_expression", "text": "max_int = max_int + arr[i]", "parent": 30, "children": [45, 46, 47], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 28}}, {"id": 45, "type": "identifier", "text": "max_int", "parent": 44, "children": [], "start_point": {"row": 7, "column": 2}, "end_point": {"row": 7, "column": 9}}, {"id": 46, "type": "=", "text": "=", "parent": 44, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 11}}, {"id": 47, "type": "binary_expression", "text": "max_int + arr[i]", "parent": 44, "children": [48, 49, 50], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 28}}, {"id": 48, "type": "identifier", "text": "max_int", "parent": 47, "children": [], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 19}}, {"id": 49, "type": "+", "text": "+", "parent": 47, "children": [], "start_point": {"row": 7, "column": 20}, "end_point": {"row": 7, "column": 21}}, {"id": 50, "type": "subscript_expression", "text": "arr[i]", "parent": 47, "children": [51, 52], "start_point": {"row": 7, "column": 22}, "end_point": {"row": 7, "column": 28}}, {"id": 51, "type": "identifier", "text": "arr", "parent": 50, "children": [], "start_point": {"row": 7, "column": 22}, "end_point": {"row": 7, "column": 25}}, {"id": 52, "type": "identifier", "text": "i", "parent": 50, "children": [], "start_point": {"row": 7, "column": 26}, "end_point": {"row": 7, "column": 27}}, {"id": 53, "type": "if_statement", "text": "if(max_till < max_int) {\n\t\t\tmax_till = max_int;\n\t\t}", "parent": 30, "children": [54], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 10, "column": 3}}, {"id": 54, "type": "parenthesized_expression", "text": "(max_till < max_int)", "parent": 53, "children": [55], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 24}}, {"id": 55, "type": "binary_expression", "text": "max_till < max_int", "parent": 54, "children": [56, 57, 58], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 23}}, {"id": 56, "type": "identifier", "text": "max_till", "parent": 55, "children": [], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 13}}, {"id": 57, "type": "<", "text": "<", "parent": 55, "children": [], "start_point": {"row": 8, "column": 14}, "end_point": {"row": 8, "column": 15}}, {"id": 58, "type": "identifier", "text": "max_int", "parent": 55, "children": [], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 23}}, {"id": 59, "type": "assignment_expression", "text": "max_till = max_int", "parent": 53, "children": [60, 61, 62], "start_point": {"row": 9, "column": 3}, "end_point": {"row": 9, "column": 21}}, {"id": 60, "type": "identifier", "text": "max_till", "parent": 59, "children": [], "start_point": {"row": 9, "column": 3}, "end_point": {"row": 9, "column": 11}}, {"id": 61, "type": "=", "text": "=", "parent": 59, "children": [], "start_point": {"row": 9, "column": 12}, "end_point": {"row": 9, "column": 13}}, {"id": 62, "type": "identifier", "text": "max_int", "parent": 59, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 21}}, {"id": 63, "type": "if_statement", "text": "if (max_int < 0) {\n\t\t\tmax_int = 0;\n\t\t}", "parent": 30, "children": [64], "start_point": {"row": 11, "column": 2}, "end_point": {"row": 13, "column": 3}}, {"id": 64, "type": "parenthesized_expression", "text": "(max_int < 0)", "parent": 63, "children": [65], "start_point": {"row": 11, "column": 5}, "end_point": {"row": 11, "column": 18}}, {"id": 65, "type": "binary_expression", "text": "max_int < 0", "parent": 64, "children": [66, 67, 68], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 17}}, {"id": 66, "type": "identifier", "text": "max_int", "parent": 65, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 13}}, {"id": 67, "type": "<", "text": "<", "parent": 65, "children": [], "start_point": {"row": 11, "column": 14}, "end_point": {"row": 11, "column": 15}}, {"id": 68, "type": "number_literal", "text": "0", "parent": 65, "children": [], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 17}}, {"id": 69, "type": "assignment_expression", "text": "max_int = 0", "parent": 63, "children": [70, 71, 72], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 14}}, {"id": 70, "type": "identifier", "text": "max_int", "parent": 69, "children": [], "start_point": {"row": 12, "column": 3}, "end_point": {"row": 12, "column": 10}}, {"id": 71, "type": "=", "text": "=", "parent": 69, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 12}}, {"id": 72, "type": "number_literal", "text": "0", "parent": 69, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 14}}, {"id": 73, "type": "return_statement", "text": "return max_till;", "parent": 6, "children": [74], "start_point": {"row": 15, "column": 1}, "end_point": {"row": 15, "column": 17}}, {"id": 74, "type": "identifier", "text": "max_till", "parent": 73, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 16}}, {"id": 75, "type": "function_definition", "text": "int main() {\n\tint array[10];\n\tfor (int k = 0; k < 10; k++) {\n\t\tarray[k] = rand() % 10;\n\t}\n\tprintf(\"%d\", largestSumContinousSubArray(array, 10));\n}", "parent": null, "children": [76, 77], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 76, "type": "primitive_type", "text": "int", "parent": 75, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 3}}, {"id": 77, "type": "function_declarator", "text": "main()", "parent": 75, "children": [78, 79], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 10}}, {"id": 78, "type": "identifier", "text": "main", "parent": 77, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 8}}, {"id": 79, "type": "parameter_list", "text": "()", "parent": 77, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 10}}, {"id": 80, "type": "declaration", "text": "int array[10];", "parent": 75, "children": [81, 82], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 15}}, {"id": 81, "type": "primitive_type", "text": "int", "parent": 80, "children": [], "start_point": {"row": 19, "column": 1}, "end_point": {"row": 19, "column": 4}}, {"id": 82, "type": "array_declarator", "text": "array[10]", "parent": 80, "children": [83, 84], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 14}}, {"id": 83, "type": "identifier", "text": "array", "parent": 82, "children": [], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 10}}, {"id": 84, "type": "number_literal", "text": "10", "parent": 82, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 13}}, {"id": 85, "type": "for_statement", "text": "for (int k = 0; k < 10; k++) {\n\t\tarray[k] = rand() % 10;\n\t}", "parent": 75, "children": [86, 92, 96], "start_point": {"row": 20, "column": 1}, "end_point": {"row": 22, "column": 2}}, {"id": 86, "type": "declaration", "text": "int k = 0;", "parent": 85, "children": [87, 88], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 16}}, {"id": 87, "type": "primitive_type", "text": "int", "parent": 86, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 9}}, {"id": 88, "type": "init_declarator", "text": "k = 0", "parent": 86, "children": [89, 90, 91], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 15}}, {"id": 89, "type": "identifier", "text": "k", "parent": 88, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 11}}, {"id": 90, "type": "=", "text": "=", "parent": 88, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 13}}, {"id": 91, "type": "number_literal", "text": "0", "parent": 88, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 15}}, {"id": 92, "type": "binary_expression", "text": "k < 10", "parent": 85, "children": [93, 94, 95], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 23}}, {"id": 93, "type": "identifier", "text": "k", "parent": 92, "children": [], "start_point": {"row": 20, "column": 17}, "end_point": {"row": 20, "column": 18}}, {"id": 94, "type": "<", "text": "<", "parent": 92, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 20}}, {"id": 95, "type": "number_literal", "text": "10", "parent": 92, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 23}}, {"id": 96, "type": "update_expression", "text": "k++", "parent": 85, "children": [97, 98], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 28}}, {"id": 97, "type": "identifier", "text": "k", "parent": 96, "children": [], "start_point": {"row": 20, "column": 25}, "end_point": {"row": 20, "column": 26}}, {"id": 98, "type": "++", "text": "++", "parent": 96, "children": [], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 28}}, {"id": 99, "type": "assignment_expression", "text": "array[k] = rand() % 10", "parent": 85, "children": [100, 103, 104], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 24}}, {"id": 100, "type": "subscript_expression", "text": "array[k]", "parent": 99, "children": [101, 102], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 10}}, {"id": 101, "type": "identifier", "text": "array", "parent": 100, "children": [], "start_point": {"row": 21, "column": 2}, "end_point": {"row": 21, "column": 7}}, {"id": 102, "type": "identifier", "text": "k", "parent": 100, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 9}}, {"id": 103, "type": "=", "text": "=", "parent": 99, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 12}}, {"id": 104, "type": "binary_expression", "text": "rand() % 10", "parent": 99, "children": [105, 108, 109], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 24}}, {"id": 105, "type": "call_expression", "text": "rand()", "parent": 104, "children": [106, 107], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 19}}, {"id": 106, "type": "identifier", "text": "rand", "parent": 105, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 17}}, {"id": 107, "type": "argument_list", "text": "()", "parent": 105, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 19}}, {"id": 108, "type": "%", "text": "%", "parent": 104, "children": [], "start_point": {"row": 21, "column": 20}, "end_point": {"row": 21, "column": 21}}, {"id": 109, "type": "number_literal", "text": "10", "parent": 104, "children": [], "start_point": {"row": 21, "column": 22}, "end_point": {"row": 21, "column": 24}}, {"id": 110, "type": "call_expression", "text": "printf(\"%d\", largestSumContinousSubArray(array, 10))", "parent": 75, "children": [111, 112], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 53}}, {"id": 111, "type": "identifier", "text": "printf", "parent": 110, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 7}}, {"id": 112, "type": "argument_list", "text": "(\"%d\", largestSumContinousSubArray(array, 10))", "parent": 110, "children": [113, 114], "start_point": {"row": 23, "column": 7}, "end_point": {"row": 23, "column": 53}}, {"id": 113, "type": "string_literal", "text": "\"%d\"", "parent": 112, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 12}}, {"id": 114, "type": "call_expression", "text": "largestSumContinousSubArray(array, 10)", "parent": 112, "children": [115, 116], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 52}}, {"id": 115, "type": "identifier", "text": "largestSumContinousSubArray", "parent": 114, "children": [], "start_point": {"row": 23, "column": 14}, "end_point": {"row": 23, "column": 41}}, {"id": 116, "type": "argument_list", "text": "(array, 10)", "parent": 114, "children": [117, 118], "start_point": {"row": 23, "column": 41}, "end_point": {"row": 23, "column": 52}}, {"id": 117, "type": "identifier", "text": "array", "parent": 116, "children": [], "start_point": {"row": 23, "column": 42}, "end_point": {"row": 23, "column": 47}}, {"id": 118, "type": "number_literal", "text": "10", "parent": 116, "children": [], "start_point": {"row": 23, "column": 49}, "end_point": {"row": 23, "column": 51}}]}, "node_categories": {"declarations": {"functions": [6, 8, 75, 77], "variables": [11, 15, 18, 24, 31, 80, 86], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [37, 41, 47, 50, 54, 55, 64, 65, 92, 96, 100, 104, 105, 110, 114], "assignments": [44, 59, 69, 99], "loops": [30, 85], "conditionals": [9, 14, 17, 21, 27, 34, 38, 40, 42, 45, 48, 51, 52, 53, 56, 58, 60, 62, 63, 66, 70, 74, 78, 83, 89, 93, 97, 101, 102, 106, 111, 115, 117], "returns": [73], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 23, 29, 36, 68, 72, 84, 91, 95, 109, 113, 118], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "largestSumContinousSubArray", "text_snippet": "int largestSumContinousSubArray(int arr[], int size) {\n\tint max_till = 0;\n\tint max_int = 0;\n\tfor (in"}, {"node_id": 8, "universal_type": "function", "name": "size)", "text_snippet": "largestSumContinousSubArray(int arr[], int size)"}, {"node_id": 75, "universal_type": "function", "name": "main", "text_snippet": "int main() {\n\tint array[10];\n\tfor (int k = 0; k < 10; k++) {\n\t\tarray[k] = rand() % 10;\n\t}\n\tprintf(\"%"}, {"node_id": 77, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdlib.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n#include <stdlib.h>\n\nint largestSumContinousSubArray(int arr[], int size) {\n\tint max_till = 0;\n\tint max_int = 0;\n\tfor (int i = 0; i < size; i++) {\n\t\tmax_int = max_int + arr[i];\n\t\tif(max_till < max_int) {\n\t\t\tmax_till = max_int;\n\t\t}\n\t\tif (max_int < 0) {\n\t\t\tmax_int = 0;\n\t\t}\n\t}\n\treturn max_till;\n}\n\nint main() {\n\tint array[10];\n\tfor (int k = 0; k < 10; k++) {\n\t\tarray[k] = rand() % 10;\n\t}\n\tprintf(\"%d\", largestSumContinousSubArray(array, 10));\n}\n"}
67
c
#ifndef FVUPDATER_H #define FVUPDATER_H #include <QObject> #include <QMutex> #include <QNetworkAccessManager> #include <QUrl> #include <QXmlStreamReader> class QNetworkReply; class FvUpdateWindow; class FvUpdateConfirmDialog; class FvAvailableUpdate; class FvUpdater : public QObject { Q_OBJECT public: // Singleton static FvUpdater* sharedUpdater(); static void drop(); // Set / get feed URL void SetFeedURL(QUrl feedURL); void SetFeedURL(QString feedURL); QString GetFeedURL(); void finishUpdate(QString pathToFinish = ""); void setRequiredSslFingerPrint(QString md5); QString getRequiredSslFingerPrint(); // returns md5! // HTTP Authentuication - for security reasons no getters are provided, only a setter void setHtAuthCredentials(QString user, QString pass); void setHtAuthUsername(QString user); void setHtAuthPassword(QString pass); void setSkipVersionAllowed(bool allowed); void setRemindLaterAllowed(bool allowed); bool getSkipVersionAllowed(); bool getRemindLaterAllowed(); public slots: // Check for updates bool CheckForUpdates(bool silentAsMuchAsItCouldGet = true); // Aliases bool CheckForUpdatesSilent(); bool CheckForUpdatesNotSilent(); // // --------------------------------------------------- // --------------------------------------------------- // --------------------------------------------------- // --------------------------------------------------- // protected: friend class FvUpdateWindow; // Uses GetProposedUpdate() and others friend class FvUpdateConfirmDialog; // Uses GetProposedUpdate() and others FvAvailableUpdate* GetProposedUpdate(); protected slots: // Update window button slots void InstallUpdate(); void SkipUpdate(); void RemindMeLater(); private: // // Singleton business // // (we leave just the declarations, so the compiler will warn us if we try // to use those two functions by accident) FvUpdater(); // Hide main constructor ~FvUpdater(); // Hide main destructor FvUpdater(const FvUpdater&); // Hide copy constructor FvUpdater& operator=(const FvUpdater&); // Hide assign op static FvUpdater* m_Instance; // Singleton instance // // Windows / dialogs // #ifdef FV_GUI FvUpdateWindow* m_updaterWindow; // Updater window (NULL if not shown) void showUpdaterWindowUpdatedWithCurrentUpdateProposal(); // Show updater window void hideUpdaterWindow(); // Hide + destroy m_updaterWindow void updaterWindowWasClosed(); // Sent by the updater window when it gets closed #else void decideWhatToDoWithCurrentUpdateProposal(); // Perform an action which is configured in settings #endif // Available update (NULL if not fetched) FvAvailableUpdate* m_proposedUpdate; // If true, don't show the error dialogs and the "no updates." dialog // (silentAsMuchAsItCouldGet from CheckForUpdates() goes here) // Useful for automatic update checking upon application startup. bool m_silentAsMuchAsItCouldGet; // Dialogs (notifications) bool skipVersionAllowed; bool remindLaterAllowed; void showErrorDialog(QString message, bool showEvenInSilentMode = false); // Show an error message void showInformationDialog(QString message, bool showEvenInSilentMode = false); // Show an informational message // // HTTP feed fetcher infrastructure // QUrl m_feedURL; // Feed URL that will be fetched QNetworkAccessManager m_qnam; QNetworkReply* m_reply; int m_httpGetId; bool m_httpRequestAborted; void startDownloadFeed(QUrl url); // Start downloading feed void cancelDownloadFeed(); // Stop downloading the current feed // // SSL Fingerprint Check infrastructure // QString m_requiredSslFingerprint; bool checkSslFingerPrint(QUrl urltoCheck); // true=ssl Fingerprint accepted, false= ssl Fingerprint NOT accepted // // Htauth-Infrastructure // QString htAuthUsername; QString htAuthPassword; // // XML parser // QXmlStreamReader m_xml; // XML data collector and parser bool xmlParseFeed(); // Parse feed in m_xml bool searchDownloadedFeedForUpdates(QString xmlTitle, QString xmlLink, QString xmlReleaseNotesLink, QString xmlPubDate, QString xmlEnclosureUrl, QString xmlEnclosureVersion, QString xmlEnclosurePlatform, unsigned long xmlEnclosureLength, QString xmlEnclosureType); // // Helpers // void installTranslator(); // Initialize translation mechanism void restartApplication(); // Restarts application after update private slots: void authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator ); void httpFeedReadyRead(); void httpFeedUpdateDataReadProgress(qint64 bytesRead, qint64 totalBytes); void httpFeedDownloadFinished(); // // Download and install Update infrastructure // void httpUpdateDownloadFinished(); bool unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName = QString("")); // returns true on success signals: void updatedFinishedSuccessfully(); }; #endif // FVUPDATER_H
32.97
149
(translation_unit) "#ifndef FVUPDATER_H\n#define FVUPDATER_H\n\n#include <QObject>\n#include <QMutex>\n#include <QNetworkAccessManager>\n#include <QUrl>\n#include <QXmlStreamReader>\nclass QNetworkReply;\nclass FvUpdateWindow;\nclass FvUpdateConfirmDialog;\nclass FvAvailableUpdate;\n\n\nclass FvUpdater : public QObject\n{\n Q_OBJECT\n\npublic:\n\n // Singleton\n static FvUpdater* sharedUpdater();\n static void drop();\n\n // Set / get feed URL\n void SetFeedURL(QUrl feedURL);\n void SetFeedURL(QString feedURL);\n QString GetFeedURL();\n void finishUpdate(QString pathToFinish = "");\n void setRequiredSslFingerPrint(QString md5);\n QString getRequiredSslFingerPrint(); // returns md5!\n // HTTP Authentuication - for security reasons no getters are provided, only a setter\n void setHtAuthCredentials(QString user, QString pass);\n void setHtAuthUsername(QString user);\n void setHtAuthPassword(QString pass);\n void setSkipVersionAllowed(bool allowed);\n void setRemindLaterAllowed(bool allowed);\n bool getSkipVersionAllowed();\n bool getRemindLaterAllowed();\n\n \npublic slots:\n\n // Check for updates\n bool CheckForUpdates(bool silentAsMuchAsItCouldGet = true);\n\n // Aliases\n bool CheckForUpdatesSilent();\n bool CheckForUpdatesNotSilent();\n\n\n //\n // ---------------------------------------------------\n // ---------------------------------------------------\n // ---------------------------------------------------\n // ---------------------------------------------------\n //\n\nprotected:\n\n friend class FvUpdateWindow; // Uses GetProposedUpdate() and others\n friend class FvUpdateConfirmDialog; // Uses GetProposedUpdate() and others\n FvAvailableUpdate* GetProposedUpdate();\n\n\nprotected slots:\n\n // Update window button slots\n void InstallUpdate();\n void SkipUpdate();\n void RemindMeLater();\n\nprivate:\n\n //\n // Singleton business\n //\n // (we leave just the declarations, so the compiler will warn us if we try\n // to use those two functions by accident)\n FvUpdater(); // Hide main constructor\n ~FvUpdater(); // Hide main destructor\n FvUpdater(const FvUpdater&); // Hide copy constructor\n FvUpdater& operator=(const FvUpdater&); // Hide assign op\n\n static FvUpdater* m_Instance; // Singleton instance\n\n\n //\n // Windows / dialogs\n //\n#ifdef FV_GUI\n FvUpdateWindow* m_updaterWindow; // Updater window (NULL if not shown)\n void showUpdaterWindowUpdatedWithCurrentUpdateProposal(); // Show updater window\n void hideUpdaterWindow(); // Hide + destroy m_updaterWindow\n void updaterWindowWasClosed(); // Sent by the updater window when it gets closed\n#else\n void decideWhatToDoWithCurrentUpdateProposal(); // Perform an action which is configured in settings\n#endif\n\n // Available update (NULL if not fetched)\n FvAvailableUpdate* m_proposedUpdate;\n\n // If true, don't show the error dialogs and the "no updates." dialog\n // (silentAsMuchAsItCouldGet from CheckForUpdates() goes here)\n // Useful for automatic update checking upon application startup.\n bool m_silentAsMuchAsItCouldGet;\n\n // Dialogs (notifications)\n bool skipVersionAllowed;\n bool remindLaterAllowed;\n\n void showErrorDialog(QString message, bool showEvenInSilentMode = false); // Show an error message\n void showInformationDialog(QString message, bool showEvenInSilentMode = false); // Show an informational message\n\n\n //\n // HTTP feed fetcher infrastructure\n //\n QUrl m_feedURL; // Feed URL that will be fetched\n QNetworkAccessManager m_qnam;\n QNetworkReply* m_reply;\n int m_httpGetId;\n bool m_httpRequestAborted;\n\n void startDownloadFeed(QUrl url); // Start downloading feed\n void cancelDownloadFeed(); // Stop downloading the current feed\n\n //\n // SSL Fingerprint Check infrastructure\n //\n QString m_requiredSslFingerprint;\n\n bool checkSslFingerPrint(QUrl urltoCheck); // true=ssl Fingerprint accepted, false= ssl Fingerprint NOT accepted\n\n //\n // Htauth-Infrastructure\n //\n QString htAuthUsername;\n QString htAuthPassword;\n\n\n //\n // XML parser\n //\n QXmlStreamReader m_xml; // XML data collector and parser\n bool xmlParseFeed(); // Parse feed in m_xml\n bool searchDownloadedFeedForUpdates(QString xmlTitle,\n QString xmlLink,\n QString xmlReleaseNotesLink,\n QString xmlPubDate,\n QString xmlEnclosureUrl,\n QString xmlEnclosureVersion,\n QString xmlEnclosurePlatform,\n unsigned long xmlEnclosureLength,\n QString xmlEnclosureType);\n\n\n //\n // Helpers\n //\n void installTranslator(); // Initialize translation mechanism\n void restartApplication(); // Restarts application after update\n\nprivate slots:\n\n void authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator );\n void httpFeedReadyRead();\n void httpFeedUpdateDataReadProgress(qint64 bytesRead,\n qint64 totalBytes);\n void httpFeedDownloadFinished();\n\n //\n // Download and install Update infrastructure\n //\n void httpUpdateDownloadFinished();\n bool unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName = QString("")); // returns true on success\n\nsignals:\n void updatedFinishedSuccessfully();\n\n};\n\n#endif // FVUPDATER_H\n" (preproc_ifdef) "#ifndef FVUPDATER_H\n#define FVUPDATER_H\n\n#include <QObject>\n#include <QMutex>\n#include <QNetworkAccessManager>\n#include <QUrl>\n#include <QXmlStreamReader>\nclass QNetworkReply;\nclass FvUpdateWindow;\nclass FvUpdateConfirmDialog;\nclass FvAvailableUpdate;\n\n\nclass FvUpdater : public QObject\n{\n Q_OBJECT\n\npublic:\n\n // Singleton\n static FvUpdater* sharedUpdater();\n static void drop();\n\n // Set / get feed URL\n void SetFeedURL(QUrl feedURL);\n void SetFeedURL(QString feedURL);\n QString GetFeedURL();\n void finishUpdate(QString pathToFinish = "");\n void setRequiredSslFingerPrint(QString md5);\n QString getRequiredSslFingerPrint(); // returns md5!\n // HTTP Authentuication - for security reasons no getters are provided, only a setter\n void setHtAuthCredentials(QString user, QString pass);\n void setHtAuthUsername(QString user);\n void setHtAuthPassword(QString pass);\n void setSkipVersionAllowed(bool allowed);\n void setRemindLaterAllowed(bool allowed);\n bool getSkipVersionAllowed();\n bool getRemindLaterAllowed();\n\n \npublic slots:\n\n // Check for updates\n bool CheckForUpdates(bool silentAsMuchAsItCouldGet = true);\n\n // Aliases\n bool CheckForUpdatesSilent();\n bool CheckForUpdatesNotSilent();\n\n\n //\n // ---------------------------------------------------\n // ---------------------------------------------------\n // ---------------------------------------------------\n // ---------------------------------------------------\n //\n\nprotected:\n\n friend class FvUpdateWindow; // Uses GetProposedUpdate() and others\n friend class FvUpdateConfirmDialog; // Uses GetProposedUpdate() and others\n FvAvailableUpdate* GetProposedUpdate();\n\n\nprotected slots:\n\n // Update window button slots\n void InstallUpdate();\n void SkipUpdate();\n void RemindMeLater();\n\nprivate:\n\n //\n // Singleton business\n //\n // (we leave just the declarations, so the compiler will warn us if we try\n // to use those two functions by accident)\n FvUpdater(); // Hide main constructor\n ~FvUpdater(); // Hide main destructor\n FvUpdater(const FvUpdater&); // Hide copy constructor\n FvUpdater& operator=(const FvUpdater&); // Hide assign op\n\n static FvUpdater* m_Instance; // Singleton instance\n\n\n //\n // Windows / dialogs\n //\n#ifdef FV_GUI\n FvUpdateWindow* m_updaterWindow; // Updater window (NULL if not shown)\n void showUpdaterWindowUpdatedWithCurrentUpdateProposal(); // Show updater window\n void hideUpdaterWindow(); // Hide + destroy m_updaterWindow\n void updaterWindowWasClosed(); // Sent by the updater window when it gets closed\n#else\n void decideWhatToDoWithCurrentUpdateProposal(); // Perform an action which is configured in settings\n#endif\n\n // Available update (NULL if not fetched)\n FvAvailableUpdate* m_proposedUpdate;\n\n // If true, don't show the error dialogs and the "no updates." dialog\n // (silentAsMuchAsItCouldGet from CheckForUpdates() goes here)\n // Useful for automatic update checking upon application startup.\n bool m_silentAsMuchAsItCouldGet;\n\n // Dialogs (notifications)\n bool skipVersionAllowed;\n bool remindLaterAllowed;\n\n void showErrorDialog(QString message, bool showEvenInSilentMode = false); // Show an error message\n void showInformationDialog(QString message, bool showEvenInSilentMode = false); // Show an informational message\n\n\n //\n // HTTP feed fetcher infrastructure\n //\n QUrl m_feedURL; // Feed URL that will be fetched\n QNetworkAccessManager m_qnam;\n QNetworkReply* m_reply;\n int m_httpGetId;\n bool m_httpRequestAborted;\n\n void startDownloadFeed(QUrl url); // Start downloading feed\n void cancelDownloadFeed(); // Stop downloading the current feed\n\n //\n // SSL Fingerprint Check infrastructure\n //\n QString m_requiredSslFingerprint;\n\n bool checkSslFingerPrint(QUrl urltoCheck); // true=ssl Fingerprint accepted, false= ssl Fingerprint NOT accepted\n\n //\n // Htauth-Infrastructure\n //\n QString htAuthUsername;\n QString htAuthPassword;\n\n\n //\n // XML parser\n //\n QXmlStreamReader m_xml; // XML data collector and parser\n bool xmlParseFeed(); // Parse feed in m_xml\n bool searchDownloadedFeedForUpdates(QString xmlTitle,\n QString xmlLink,\n QString xmlReleaseNotesLink,\n QString xmlPubDate,\n QString xmlEnclosureUrl,\n QString xmlEnclosureVersion,\n QString xmlEnclosurePlatform,\n unsigned long xmlEnclosureLength,\n QString xmlEnclosureType);\n\n\n //\n // Helpers\n //\n void installTranslator(); // Initialize translation mechanism\n void restartApplication(); // Restarts application after update\n\nprivate slots:\n\n void authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator );\n void httpFeedReadyRead();\n void httpFeedUpdateDataReadProgress(qint64 bytesRead,\n qint64 totalBytes);\n void httpFeedDownloadFinished();\n\n //\n // Download and install Update infrastructure\n //\n void httpUpdateDownloadFinished();\n bool unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName = QString("")); // returns true on success\n\nsignals:\n void updatedFinishedSuccessfully();\n\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "FVUPDATER_H" (preproc_def) "#define FVUPDATER_H\n" (#define) "#define" (identifier) "FVUPDATER_H" (preproc_include) "#include <QObject>\n" (#include) "#include" (system_lib_string) "<QObject>" (preproc_include) "#include <QMutex>\n" (#include) "#include" (system_lib_string) "<QMutex>" (preproc_include) "#include <QNetworkAccessManager>\n" (#include) "#include" (system_lib_string) "<QNetworkAccessManager>" (preproc_include) "#include <QUrl>\n" (#include) "#include" (system_lib_string) "<QUrl>" (preproc_include) "#include <QXmlStreamReader>\n" (#include) "#include" (system_lib_string) "<QXmlStreamReader>" (declaration) "class QNetworkReply;" (type_identifier) "class" (identifier) "QNetworkReply" (;) ";" (declaration) "class FvUpdateWindow;" (type_identifier) "class" (identifier) "FvUpdateWindow" (;) ";" (declaration) "class FvUpdateConfirmDialog;" (type_identifier) "class" (identifier) "FvUpdateConfirmDialog" (;) ";" (declaration) "class FvAvailableUpdate;" (type_identifier) "class" (identifier) "FvAvailableUpdate" (;) ";" (function_definition) "class FvUpdater : public QObject\n{\n Q_OBJECT\n\npublic:\n\n // Singleton\n static FvUpdater* sharedUpdater();\n static void drop();\n\n // Set / get feed URL\n void SetFeedURL(QUrl feedURL);\n void SetFeedURL(QString feedURL);\n QString GetFeedURL();\n void finishUpdate(QString pathToFinish = "");\n void setRequiredSslFingerPrint(QString md5);\n QString getRequiredSslFingerPrint(); // returns md5!\n // HTTP Authentuication - for security reasons no getters are provided, only a setter\n void setHtAuthCredentials(QString user, QString pass);\n void setHtAuthUsername(QString user);\n void setHtAuthPassword(QString pass);\n void setSkipVersionAllowed(bool allowed);\n void setRemindLaterAllowed(bool allowed);\n bool getSkipVersionAllowed();\n bool getRemindLaterAllowed();\n\n \npublic slots:\n\n // Check for updates\n bool CheckForUpdates(bool silentAsMuchAsItCouldGet = true);\n\n // Aliases\n bool CheckForUpdatesSilent();\n bool CheckForUpdatesNotSilent();\n\n\n //\n // ---------------------------------------------------\n // ---------------------------------------------------\n // ---------------------------------------------------\n // ---------------------------------------------------\n //\n\nprotected:\n\n friend class FvUpdateWindow; // Uses GetProposedUpdate() and others\n friend class FvUpdateConfirmDialog; // Uses GetProposedUpdate() and others\n FvAvailableUpdate* GetProposedUpdate();\n\n\nprotected slots:\n\n // Update window button slots\n void InstallUpdate();\n void SkipUpdate();\n void RemindMeLater();\n\nprivate:\n\n //\n // Singleton business\n //\n // (we leave just the declarations, so the compiler will warn us if we try\n // to use those two functions by accident)\n FvUpdater(); // Hide main constructor\n ~FvUpdater(); // Hide main destructor\n FvUpdater(const FvUpdater&); // Hide copy constructor\n FvUpdater& operator=(const FvUpdater&); // Hide assign op\n\n static FvUpdater* m_Instance; // Singleton instance\n\n\n //\n // Windows / dialogs\n //\n#ifdef FV_GUI\n FvUpdateWindow* m_updaterWindow; // Updater window (NULL if not shown)\n void showUpdaterWindowUpdatedWithCurrentUpdateProposal(); // Show updater window\n void hideUpdaterWindow(); // Hide + destroy m_updaterWindow\n void updaterWindowWasClosed(); // Sent by the updater window when it gets closed\n#else\n void decideWhatToDoWithCurrentUpdateProposal(); // Perform an action which is configured in settings\n#endif\n\n // Available update (NULL if not fetched)\n FvAvailableUpdate* m_proposedUpdate;\n\n // If true, don't show the error dialogs and the "no updates." dialog\n // (silentAsMuchAsItCouldGet from CheckForUpdates() goes here)\n // Useful for automatic update checking upon application startup.\n bool m_silentAsMuchAsItCouldGet;\n\n // Dialogs (notifications)\n bool skipVersionAllowed;\n bool remindLaterAllowed;\n\n void showErrorDialog(QString message, bool showEvenInSilentMode = false); // Show an error message\n void showInformationDialog(QString message, bool showEvenInSilentMode = false); // Show an informational message\n\n\n //\n // HTTP feed fetcher infrastructure\n //\n QUrl m_feedURL; // Feed URL that will be fetched\n QNetworkAccessManager m_qnam;\n QNetworkReply* m_reply;\n int m_httpGetId;\n bool m_httpRequestAborted;\n\n void startDownloadFeed(QUrl url); // Start downloading feed\n void cancelDownloadFeed(); // Stop downloading the current feed\n\n //\n // SSL Fingerprint Check infrastructure\n //\n QString m_requiredSslFingerprint;\n\n bool checkSslFingerPrint(QUrl urltoCheck); // true=ssl Fingerprint accepted, false= ssl Fingerprint NOT accepted\n\n //\n // Htauth-Infrastructure\n //\n QString htAuthUsername;\n QString htAuthPassword;\n\n\n //\n // XML parser\n //\n QXmlStreamReader m_xml; // XML data collector and parser\n bool xmlParseFeed(); // Parse feed in m_xml\n bool searchDownloadedFeedForUpdates(QString xmlTitle,\n QString xmlLink,\n QString xmlReleaseNotesLink,\n QString xmlPubDate,\n QString xmlEnclosureUrl,\n QString xmlEnclosureVersion,\n QString xmlEnclosurePlatform,\n unsigned long xmlEnclosureLength,\n QString xmlEnclosureType);\n\n\n //\n // Helpers\n //\n void installTranslator(); // Initialize translation mechanism\n void restartApplication(); // Restarts application after update\n\nprivate slots:\n\n void authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator );\n void httpFeedReadyRead();\n void httpFeedUpdateDataReadProgress(qint64 bytesRead,\n qint64 totalBytes);\n void httpFeedDownloadFinished();\n\n //\n // Download and install Update infrastructure\n //\n void httpUpdateDownloadFinished();\n bool unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName = QString("")); // returns true on success\n\nsignals:\n void updatedFinishedSuccessfully();\n\n}" (type_identifier) "class" (identifier) "FvUpdater" (ERROR) ": public QObject" (:) ":" (identifier) "public" (identifier) "QObject" (compound_statement) "{\n Q_OBJECT\n\npublic:\n\n // Singleton\n static FvUpdater* sharedUpdater();\n static void drop();\n\n // Set / get feed URL\n void SetFeedURL(QUrl feedURL);\n void SetFeedURL(QString feedURL);\n QString GetFeedURL();\n void finishUpdate(QString pathToFinish = "");\n void setRequiredSslFingerPrint(QString md5);\n QString getRequiredSslFingerPrint(); // returns md5!\n // HTTP Authentuication - for security reasons no getters are provided, only a setter\n void setHtAuthCredentials(QString user, QString pass);\n void setHtAuthUsername(QString user);\n void setHtAuthPassword(QString pass);\n void setSkipVersionAllowed(bool allowed);\n void setRemindLaterAllowed(bool allowed);\n bool getSkipVersionAllowed();\n bool getRemindLaterAllowed();\n\n \npublic slots:\n\n // Check for updates\n bool CheckForUpdates(bool silentAsMuchAsItCouldGet = true);\n\n // Aliases\n bool CheckForUpdatesSilent();\n bool CheckForUpdatesNotSilent();\n\n\n //\n // ---------------------------------------------------\n // ---------------------------------------------------\n // ---------------------------------------------------\n // ---------------------------------------------------\n //\n\nprotected:\n\n friend class FvUpdateWindow; // Uses GetProposedUpdate() and others\n friend class FvUpdateConfirmDialog; // Uses GetProposedUpdate() and others\n FvAvailableUpdate* GetProposedUpdate();\n\n\nprotected slots:\n\n // Update window button slots\n void InstallUpdate();\n void SkipUpdate();\n void RemindMeLater();\n\nprivate:\n\n //\n // Singleton business\n //\n // (we leave just the declarations, so the compiler will warn us if we try\n // to use those two functions by accident)\n FvUpdater(); // Hide main constructor\n ~FvUpdater(); // Hide main destructor\n FvUpdater(const FvUpdater&); // Hide copy constructor\n FvUpdater& operator=(const FvUpdater&); // Hide assign op\n\n static FvUpdater* m_Instance; // Singleton instance\n\n\n //\n // Windows / dialogs\n //\n#ifdef FV_GUI\n FvUpdateWindow* m_updaterWindow; // Updater window (NULL if not shown)\n void showUpdaterWindowUpdatedWithCurrentUpdateProposal(); // Show updater window\n void hideUpdaterWindow(); // Hide + destroy m_updaterWindow\n void updaterWindowWasClosed(); // Sent by the updater window when it gets closed\n#else\n void decideWhatToDoWithCurrentUpdateProposal(); // Perform an action which is configured in settings\n#endif\n\n // Available update (NULL if not fetched)\n FvAvailableUpdate* m_proposedUpdate;\n\n // If true, don't show the error dialogs and the "no updates." dialog\n // (silentAsMuchAsItCouldGet from CheckForUpdates() goes here)\n // Useful for automatic update checking upon application startup.\n bool m_silentAsMuchAsItCouldGet;\n\n // Dialogs (notifications)\n bool skipVersionAllowed;\n bool remindLaterAllowed;\n\n void showErrorDialog(QString message, bool showEvenInSilentMode = false); // Show an error message\n void showInformationDialog(QString message, bool showEvenInSilentMode = false); // Show an informational message\n\n\n //\n // HTTP feed fetcher infrastructure\n //\n QUrl m_feedURL; // Feed URL that will be fetched\n QNetworkAccessManager m_qnam;\n QNetworkReply* m_reply;\n int m_httpGetId;\n bool m_httpRequestAborted;\n\n void startDownloadFeed(QUrl url); // Start downloading feed\n void cancelDownloadFeed(); // Stop downloading the current feed\n\n //\n // SSL Fingerprint Check infrastructure\n //\n QString m_requiredSslFingerprint;\n\n bool checkSslFingerPrint(QUrl urltoCheck); // true=ssl Fingerprint accepted, false= ssl Fingerprint NOT accepted\n\n //\n // Htauth-Infrastructure\n //\n QString htAuthUsername;\n QString htAuthPassword;\n\n\n //\n // XML parser\n //\n QXmlStreamReader m_xml; // XML data collector and parser\n bool xmlParseFeed(); // Parse feed in m_xml\n bool searchDownloadedFeedForUpdates(QString xmlTitle,\n QString xmlLink,\n QString xmlReleaseNotesLink,\n QString xmlPubDate,\n QString xmlEnclosureUrl,\n QString xmlEnclosureVersion,\n QString xmlEnclosurePlatform,\n unsigned long xmlEnclosureLength,\n QString xmlEnclosureType);\n\n\n //\n // Helpers\n //\n void installTranslator(); // Initialize translation mechanism\n void restartApplication(); // Restarts application after update\n\nprivate slots:\n\n void authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator );\n void httpFeedReadyRead();\n void httpFeedUpdateDataReadProgress(qint64 bytesRead,\n qint64 totalBytes);\n void httpFeedDownloadFinished();\n\n //\n // Download and install Update infrastructure\n //\n void httpUpdateDownloadFinished();\n bool unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName = QString("")); // returns true on success\n\nsignals:\n void updatedFinishedSuccessfully();\n\n}" ({) "{" (ERROR) "Q_OBJECT\n\npublic:" (type_identifier) "Q_OBJECT" (identifier) "public" (:) ":" (comment) "// Singleton" (declaration) "static FvUpdater* sharedUpdater();" (storage_class_specifier) "static" (static) "static" (type_identifier) "FvUpdater" (pointer_declarator) "* sharedUpdater()" (*) "*" (function_declarator) "sharedUpdater()" (identifier) "sharedUpdater" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "static void drop();" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "drop()" (identifier) "drop" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Set / get feed URL" (declaration) "void SetFeedURL(QUrl feedURL);" (primitive_type) "void" (function_declarator) "SetFeedURL(QUrl feedURL)" (identifier) "SetFeedURL" (parameter_list) "(QUrl feedURL)" (() "(" (parameter_declaration) "QUrl feedURL" (type_identifier) "QUrl" (identifier) "feedURL" ()) ")" (;) ";" (declaration) "void SetFeedURL(QString feedURL);" (primitive_type) "void" (function_declarator) "SetFeedURL(QString feedURL)" (identifier) "SetFeedURL" (parameter_list) "(QString feedURL)" (() "(" (parameter_declaration) "QString feedURL" (type_identifier) "QString" (identifier) "feedURL" ()) ")" (;) ";" (declaration) "QString GetFeedURL();" (type_identifier) "QString" (function_declarator) "GetFeedURL()" (identifier) "GetFeedURL" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void finishUpdate(QString pathToFinish = "");" (primitive_type) "void" (init_declarator) "finishUpdate(QString pathToFinish = """ (function_declarator) "finishUpdate(QString pathToFinish" (identifier) "finishUpdate" (parameter_list) "(QString pathToFinish" (() "(" (parameter_declaration) "QString pathToFinish" (type_identifier) "QString" (identifier) "pathToFinish" ()) "" (=) "=" (string_literal) """" (") """ (") """ (ERROR) ")" ()) ")" (;) ";" (declaration) "void setRequiredSslFingerPrint(QString md5);" (primitive_type) "void" (function_declarator) "setRequiredSslFingerPrint(QString md5)" (identifier) "setRequiredSslFingerPrint" (parameter_list) "(QString md5)" (() "(" (parameter_declaration) "QString md5" (type_identifier) "QString" (identifier) "md5" ()) ")" (;) ";" (declaration) "QString getRequiredSslFingerPrint();" (type_identifier) "QString" (function_declarator) "getRequiredSslFingerPrint()" (identifier) "getRequiredSslFingerPrint" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// returns md5!" (comment) "// HTTP Authentuication - for security reasons no getters are provided, only a setter" (declaration) "void setHtAuthCredentials(QString user, QString pass);" (primitive_type) "void" (function_declarator) "setHtAuthCredentials(QString user, QString pass)" (identifier) "setHtAuthCredentials" (parameter_list) "(QString user, QString pass)" (() "(" (parameter_declaration) "QString user" (type_identifier) "QString" (identifier) "user" (,) "," (parameter_declaration) "QString pass" (type_identifier) "QString" (identifier) "pass" ()) ")" (;) ";" (declaration) "void setHtAuthUsername(QString user);" (primitive_type) "void" (function_declarator) "setHtAuthUsername(QString user)" (identifier) "setHtAuthUsername" (parameter_list) "(QString user)" (() "(" (parameter_declaration) "QString user" (type_identifier) "QString" (identifier) "user" ()) ")" (;) ";" (declaration) "void setHtAuthPassword(QString pass);" (primitive_type) "void" (function_declarator) "setHtAuthPassword(QString pass)" (identifier) "setHtAuthPassword" (parameter_list) "(QString pass)" (() "(" (parameter_declaration) "QString pass" (type_identifier) "QString" (identifier) "pass" ()) ")" (;) ";" (declaration) "void setSkipVersionAllowed(bool allowed);" (primitive_type) "void" (function_declarator) "setSkipVersionAllowed(bool allowed)" (identifier) "setSkipVersionAllowed" (parameter_list) "(bool allowed)" (() "(" (parameter_declaration) "bool allowed" (primitive_type) "bool" (identifier) "allowed" ()) ")" (;) ";" (declaration) "void setRemindLaterAllowed(bool allowed);" (primitive_type) "void" (function_declarator) "setRemindLaterAllowed(bool allowed)" (identifier) "setRemindLaterAllowed" (parameter_list) "(bool allowed)" (() "(" (parameter_declaration) "bool allowed" (primitive_type) "bool" (identifier) "allowed" ()) ")" (;) ";" (declaration) "bool getSkipVersionAllowed();" (primitive_type) "bool" (function_declarator) "getSkipVersionAllowed()" (identifier) "getSkipVersionAllowed" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool getRemindLaterAllowed();" (primitive_type) "bool" (function_declarator) "getRemindLaterAllowed()" (identifier) "getRemindLaterAllowed" (parameter_list) "()" (() "(" ()) ")" (;) ";" (ERROR) "public slots:" (type_identifier) "public" (identifier) "slots" (:) ":" (comment) "// Check for updates" (declaration) "bool CheckForUpdates(bool silentAsMuchAsItCouldGet = true);" (primitive_type) "bool" (init_declarator) "CheckForUpdates(bool silentAsMuchAsItCouldGet = true" (function_declarator) "CheckForUpdates(bool silentAsMuchAsItCouldGet" (identifier) "CheckForUpdates" (parameter_list) "(bool silentAsMuchAsItCouldGet" (() "(" (parameter_declaration) "bool silentAsMuchAsItCouldGet" (primitive_type) "bool" (identifier) "silentAsMuchAsItCouldGet" ()) "" (=) "=" (true) "true" (ERROR) ")" ()) ")" (;) ";" (comment) "// Aliases" (declaration) "bool CheckForUpdatesSilent();" (primitive_type) "bool" (function_declarator) "CheckForUpdatesSilent()" (identifier) "CheckForUpdatesSilent" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool CheckForUpdatesNotSilent();" (primitive_type) "bool" (function_declarator) "CheckForUpdatesNotSilent()" (identifier) "CheckForUpdatesNotSilent" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//" (comment) "// ---------------------------------------------------" (comment) "// ---------------------------------------------------" (comment) "// ---------------------------------------------------" (comment) "// ---------------------------------------------------" (comment) "//" (labeled_statement) "protected:\n\n friend class FvUpdateWindow;" (statement_identifier) "protected" (:) ":" (declaration) "friend class FvUpdateWindow;" (type_identifier) "friend" (ERROR) "class" (identifier) "class" (identifier) "FvUpdateWindow" (;) ";" (comment) "// Uses GetProposedUpdate() and others" (declaration) "friend class FvUpdateConfirmDialog;" (type_identifier) "friend" (ERROR) "class" (identifier) "class" (identifier) "FvUpdateConfirmDialog" (;) ";" (comment) "// Uses GetProposedUpdate() and others" (declaration) "FvAvailableUpdate* GetProposedUpdate();" (type_identifier) "FvAvailableUpdate" (pointer_declarator) "* GetProposedUpdate()" (*) "*" (function_declarator) "GetProposedUpdate()" (identifier) "GetProposedUpdate" (parameter_list) "()" (() "(" ()) ")" (;) ";" (ERROR) "protected slots:" (type_identifier) "protected" (identifier) "slots" (:) ":" (comment) "// Update window button slots" (declaration) "void InstallUpdate();" (primitive_type) "void" (function_declarator) "InstallUpdate()" (identifier) "InstallUpdate" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void SkipUpdate();" (primitive_type) "void" (function_declarator) "SkipUpdate()" (identifier) "SkipUpdate" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void RemindMeLater();" (primitive_type) "void" (function_declarator) "RemindMeLater()" (identifier) "RemindMeLater" (parameter_list) "()" (() "(" ()) ")" (;) ";" (labeled_statement) "private:\n\n //\n // Singleton business\n //\n // (we leave just the declarations, so the compiler will warn us if we try\n // to use those two functions by accident)\n FvUpdater();" (statement_identifier) "private" (:) ":" (comment) "//" (comment) "// Singleton business" (comment) "//" (comment) "// (we leave just the declarations, so the compiler will warn us if we try" (comment) "// to use those two functions by accident)" (expression_statement) "FvUpdater();" (call_expression) "FvUpdater()" (identifier) "FvUpdater" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Hide main constructor" (expression_statement) "~FvUpdater();" (unary_expression) "~FvUpdater()" (~) "~" (call_expression) "FvUpdater()" (identifier) "FvUpdater" (argument_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Hide main destructor" (macro_type_specifier) "FvUpdater(const FvUpdater&)" (identifier) "FvUpdater" (() "(" (type_descriptor) "const FvUpdater" (type_qualifier) "const" (const) "const" (type_identifier) "FvUpdater" (ERROR) "&" (&) "&" ()) ")" (;) ";" (comment) "// Hide copy constructor" (expression_statement) "FvUpdater& operator=(const FvUpdater&);" (binary_expression) "FvUpdater& operator=(const FvUpdater&)" (identifier) "FvUpdater" (&) "&" (assignment_expression) "operator=(const FvUpdater&)" (identifier) "operator" (=) "=" (cast_expression) "(const FvUpdater&)" (() "(" (type_descriptor) "const FvUpdater" (type_qualifier) "const" (const) "const" (type_identifier) "FvUpdater" (ERROR) "&" (&) "&" ()) ")" (identifier) "" (;) ";" (comment) "// Hide assign op" (declaration) "static FvUpdater* m_Instance;" (storage_class_specifier) "static" (static) "static" (type_identifier) "FvUpdater" (pointer_declarator) "* m_Instance" (*) "*" (identifier) "m_Instance" (;) ";" (comment) "// Singleton instance" (comment) "//" (comment) "// Windows / dialogs" (comment) "//" (preproc_ifdef) "#ifdef FV_GUI\n FvUpdateWindow* m_updaterWindow; // Updater window (NULL if not shown)\n void showUpdaterWindowUpdatedWithCurrentUpdateProposal(); // Show updater window\n void hideUpdaterWindow(); // Hide + destroy m_updaterWindow\n void updaterWindowWasClosed(); // Sent by the updater window when it gets closed\n#else\n void decideWhatToDoWithCurrentUpdateProposal(); // Perform an action which is configured in settings\n#endif" (#ifdef) "#ifdef" (identifier) "FV_GUI" (declaration) "FvUpdateWindow* m_updaterWindow;" (type_identifier) "FvUpdateWindow" (pointer_declarator) "* m_updaterWindow" (*) "*" (identifier) "m_updaterWindow" (;) ";" (comment) "// Updater window (NULL if not shown)" (declaration) "void showUpdaterWindowUpdatedWithCurrentUpdateProposal();" (primitive_type) "void" (function_declarator) "showUpdaterWindowUpdatedWithCurrentUpdateProposal()" (identifier) "showUpdaterWindowUpdatedWithCurrentUpdateProposal" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Show updater window" (declaration) "void hideUpdaterWindow();" (primitive_type) "void" (function_declarator) "hideUpdaterWindow()" (identifier) "hideUpdaterWindow" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Hide + destroy m_updaterWindow" (declaration) "void updaterWindowWasClosed();" (primitive_type) "void" (function_declarator) "updaterWindowWasClosed()" (identifier) "updaterWindowWasClosed" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Sent by the updater window when it gets closed" (preproc_else) "#else\n void decideWhatToDoWithCurrentUpdateProposal();" (#else) "#else" (declaration) "void decideWhatToDoWithCurrentUpdateProposal();" (primitive_type) "void" (function_declarator) "decideWhatToDoWithCurrentUpdateProposal()" (identifier) "decideWhatToDoWithCurrentUpdateProposal" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Perform an action which is configured in settings" (#endif) "#endif" (comment) "// Available update (NULL if not fetched)" (declaration) "FvAvailableUpdate* m_proposedUpdate;" (type_identifier) "FvAvailableUpdate" (pointer_declarator) "* m_proposedUpdate" (*) "*" (identifier) "m_proposedUpdate" (;) ";" (comment) "// If true, don't show the error dialogs and the "no updates." dialog" (comment) "// (silentAsMuchAsItCouldGet from CheckForUpdates() goes here)" (comment) "// Useful for automatic update checking upon application startup." (declaration) "bool m_silentAsMuchAsItCouldGet;" (primitive_type) "bool" (identifier) "m_silentAsMuchAsItCouldGet" (;) ";" (comment) "// Dialogs (notifications)" (declaration) "bool skipVersionAllowed;" (primitive_type) "bool" (identifier) "skipVersionAllowed" (;) ";" (declaration) "bool remindLaterAllowed;" (primitive_type) "bool" (identifier) "remindLaterAllowed" (;) ";" (declaration) "void showErrorDialog(QString message, bool showEvenInSilentMode = false);" (primitive_type) "void" (init_declarator) "showErrorDialog(QString message, bool showEvenInSilentMode = false" (function_declarator) "showErrorDialog(QString message, bool showEvenInSilentMode" (identifier) "showErrorDialog" (parameter_list) "(QString message, bool showEvenInSilentMode" (() "(" (parameter_declaration) "QString message" (type_identifier) "QString" (identifier) "message" (,) "," (parameter_declaration) "bool showEvenInSilentMode" (primitive_type) "bool" (identifier) "showEvenInSilentMode" ()) "" (=) "=" (false) "false" (ERROR) ")" ()) ")" (;) ";" (comment) "// Show an error message" (declaration) "void showInformationDialog(QString message, bool showEvenInSilentMode = false);" (primitive_type) "void" (init_declarator) "showInformationDialog(QString message, bool showEvenInSilentMode = false" (function_declarator) "showInformationDialog(QString message, bool showEvenInSilentMode" (identifier) "showInformationDialog" (parameter_list) "(QString message, bool showEvenInSilentMode" (() "(" (parameter_declaration) "QString message" (type_identifier) "QString" (identifier) "message" (,) "," (parameter_declaration) "bool showEvenInSilentMode" (primitive_type) "bool" (identifier) "showEvenInSilentMode" ()) "" (=) "=" (false) "false" (ERROR) ")" ()) ")" (;) ";" (comment) "// Show an informational message" (comment) "//" (comment) "// HTTP feed fetcher infrastructure" (comment) "//" (declaration) "QUrl m_feedURL;" (type_identifier) "QUrl" (identifier) "m_feedURL" (;) ";" (comment) "// Feed URL that will be fetched" (declaration) "QNetworkAccessManager m_qnam;" (type_identifier) "QNetworkAccessManager" (identifier) "m_qnam" (;) ";" (declaration) "QNetworkReply* m_reply;" (type_identifier) "QNetworkReply" (pointer_declarator) "* m_reply" (*) "*" (identifier) "m_reply" (;) ";" (declaration) "int m_httpGetId;" (primitive_type) "int" (identifier) "m_httpGetId" (;) ";" (declaration) "bool m_httpRequestAborted;" (primitive_type) "bool" (identifier) "m_httpRequestAborted" (;) ";" (declaration) "void startDownloadFeed(QUrl url);" (primitive_type) "void" (function_declarator) "startDownloadFeed(QUrl url)" (identifier) "startDownloadFeed" (parameter_list) "(QUrl url)" (() "(" (parameter_declaration) "QUrl url" (type_identifier) "QUrl" (identifier) "url" ()) ")" (;) ";" (comment) "// Start downloading feed" (declaration) "void cancelDownloadFeed();" (primitive_type) "void" (function_declarator) "cancelDownloadFeed()" (identifier) "cancelDownloadFeed" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Stop downloading the current feed" (comment) "//" (comment) "// SSL Fingerprint Check infrastructure" (comment) "//" (declaration) "QString m_requiredSslFingerprint;" (type_identifier) "QString" (identifier) "m_requiredSslFingerprint" (;) ";" (declaration) "bool checkSslFingerPrint(QUrl urltoCheck);" (primitive_type) "bool" (function_declarator) "checkSslFingerPrint(QUrl urltoCheck)" (identifier) "checkSslFingerPrint" (parameter_list) "(QUrl urltoCheck)" (() "(" (parameter_declaration) "QUrl urltoCheck" (type_identifier) "QUrl" (identifier) "urltoCheck" ()) ")" (;) ";" (comment) "// true=ssl Fingerprint accepted, false= ssl Fingerprint NOT accepted" (comment) "//" (comment) "// Htauth-Infrastructure" (comment) "//" (declaration) "QString htAuthUsername;" (type_identifier) "QString" (identifier) "htAuthUsername" (;) ";" (declaration) "QString htAuthPassword;" (type_identifier) "QString" (identifier) "htAuthPassword" (;) ";" (comment) "//" (comment) "// XML parser" (comment) "//" (declaration) "QXmlStreamReader m_xml;" (type_identifier) "QXmlStreamReader" (identifier) "m_xml" (;) ";" (comment) "// XML data collector and parser" (declaration) "bool xmlParseFeed();" (primitive_type) "bool" (function_declarator) "xmlParseFeed()" (identifier) "xmlParseFeed" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Parse feed in m_xml" (declaration) "bool searchDownloadedFeedForUpdates(QString xmlTitle,\n QString xmlLink,\n QString xmlReleaseNotesLink,\n QString xmlPubDate,\n QString xmlEnclosureUrl,\n QString xmlEnclosureVersion,\n QString xmlEnclosurePlatform,\n unsigned long xmlEnclosureLength,\n QString xmlEnclosureType);" (primitive_type) "bool" (function_declarator) "searchDownloadedFeedForUpdates(QString xmlTitle,\n QString xmlLink,\n QString xmlReleaseNotesLink,\n QString xmlPubDate,\n QString xmlEnclosureUrl,\n QString xmlEnclosureVersion,\n QString xmlEnclosurePlatform,\n unsigned long xmlEnclosureLength,\n QString xmlEnclosureType)" (identifier) "searchDownloadedFeedForUpdates" (parameter_list) "(QString xmlTitle,\n QString xmlLink,\n QString xmlReleaseNotesLink,\n QString xmlPubDate,\n QString xmlEnclosureUrl,\n QString xmlEnclosureVersion,\n QString xmlEnclosurePlatform,\n unsigned long xmlEnclosureLength,\n QString xmlEnclosureType)" (() "(" (parameter_declaration) "QString xmlTitle" (type_identifier) "QString" (identifier) "xmlTitle" (,) "," (parameter_declaration) "QString xmlLink" (type_identifier) "QString" (identifier) "xmlLink" (,) "," (parameter_declaration) "QString xmlReleaseNotesLink" (type_identifier) "QString" (identifier) "xmlReleaseNotesLink" (,) "," (parameter_declaration) "QString xmlPubDate" (type_identifier) "QString" (identifier) "xmlPubDate" (,) "," (parameter_declaration) "QString xmlEnclosureUrl" (type_identifier) "QString" (identifier) "xmlEnclosureUrl" (,) "," (parameter_declaration) "QString xmlEnclosureVersion" (type_identifier) "QString" (identifier) "xmlEnclosureVersion" (,) "," (parameter_declaration) "QString xmlEnclosurePlatform" (type_identifier) "QString" (identifier) "xmlEnclosurePlatform" (,) "," (parameter_declaration) "unsigned long xmlEnclosureLength" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (identifier) "xmlEnclosureLength" (,) "," (parameter_declaration) "QString xmlEnclosureType" (type_identifier) "QString" (identifier) "xmlEnclosureType" ()) ")" (;) ";" (comment) "//" (comment) "// Helpers" (comment) "//" (declaration) "void installTranslator();" (primitive_type) "void" (function_declarator) "installTranslator()" (identifier) "installTranslator" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Initialize translation mechanism" (declaration) "void restartApplication();" (primitive_type) "void" (function_declarator) "restartApplication()" (identifier) "restartApplication" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// Restarts application after update" (ERROR) "private slots:" (type_identifier) "private" (identifier) "slots" (:) ":" (declaration) "void authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator );" (primitive_type) "void" (function_declarator) "authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator )" (identifier) "authenticationRequired" (parameter_list) "( QNetworkReply * reply, QAuthenticator * authenticator )" (() "(" (parameter_declaration) "QNetworkReply * reply" (type_identifier) "QNetworkReply" (pointer_declarator) "* reply" (*) "*" (identifier) "reply" (,) "," (parameter_declaration) "QAuthenticator * authenticator" (type_identifier) "QAuthenticator" (pointer_declarator) "* authenticator" (*) "*" (identifier) "authenticator" ()) ")" (;) ";" (declaration) "void httpFeedReadyRead();" (primitive_type) "void" (function_declarator) "httpFeedReadyRead()" (identifier) "httpFeedReadyRead" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void httpFeedUpdateDataReadProgress(qint64 bytesRead,\n qint64 totalBytes);" (primitive_type) "void" (function_declarator) "httpFeedUpdateDataReadProgress(qint64 bytesRead,\n qint64 totalBytes)" (identifier) "httpFeedUpdateDataReadProgress" (parameter_list) "(qint64 bytesRead,\n qint64 totalBytes)" (() "(" (parameter_declaration) "qint64 bytesRead" (type_identifier) "qint64" (identifier) "bytesRead" (,) "," (parameter_declaration) "qint64 totalBytes" (type_identifier) "qint64" (identifier) "totalBytes" ()) ")" (;) ";" (declaration) "void httpFeedDownloadFinished();" (primitive_type) "void" (function_declarator) "httpFeedDownloadFinished()" (identifier) "httpFeedDownloadFinished" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "//" (comment) "// Download and install Update infrastructure" (comment) "//" (declaration) "void httpUpdateDownloadFinished();" (primitive_type) "void" (function_declarator) "httpUpdateDownloadFinished()" (identifier) "httpUpdateDownloadFinished" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "bool unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName = QString(""));" (primitive_type) "bool" (init_declarator) "unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName = QString("")" (function_declarator) "unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName" (identifier) "unzipUpdate" (parameter_list) "(const QString & filePath, const QString & extDirPath, const QString & singleFileName" (() "(" (parameter_declaration) "const QString & filePath" (type_qualifier) "const" (const) "const" (type_identifier) "QString" (ERROR) "&" (&) "&" (identifier) "filePath" (,) "," (parameter_declaration) "const QString & extDirPath" (type_qualifier) "const" (const) "const" (type_identifier) "QString" (ERROR) "&" (&) "&" (identifier) "extDirPath" (,) "," (parameter_declaration) "const QString & singleFileName" (type_qualifier) "const" (const) "const" (type_identifier) "QString" (ERROR) "&" (&) "&" (identifier) "singleFileName" ()) "" (=) "=" (call_expression) "QString("")" (identifier) "QString" (argument_list) "("")" (() "(" (string_literal) """" (") """ (") """ ()) ")" (ERROR) ")" ()) ")" (;) ";" (comment) "// returns true on success" (labeled_statement) "signals:\n void updatedFinishedSuccessfully();" (statement_identifier) "signals" (:) ":" (declaration) "void updatedFinishedSuccessfully();" (primitive_type) "void" (function_declarator) "updatedFinishedSuccessfully()" (identifier) "updatedFinishedSuccessfully" (parameter_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// FVUPDATER_H"
787
17
{"language": "c", "success": true, "metadata": {"lines": 149, "avg_line_length": 32.97, "nodes": 469, "errors": 0, "source_hash": "d6d00cc4afca54847d710ad77c0b686adf4c3f8d7706d3646860844d4a826ed4", "categorized_nodes": 329}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef FVUPDATER_H\n#define FVUPDATER_H\n\n#include <QObject>\n#include <QMutex>\n#include <QNetworkAccessManager>\n#include <QUrl>\n#include <QXmlStreamReader>\nclass QNetworkReply;\nclass FvUpdateWindow;\nclass FvUpdateConfirmDialog;\nclass FvAvailableUpdate;\n\n\nclass FvUpdater : public QObject\n{\n\tQ_OBJECT\n\npublic:\n\n\t// Singleton\n\tstatic FvUpdater* sharedUpdater();\n\tstatic void drop();\n\n\t// Set / get feed URL\n\tvoid SetFeedURL(QUrl feedURL);\n\tvoid SetFeedURL(QString feedURL);\n\tQString GetFeedURL();\n\tvoid finishUpdate(QString pathToFinish = \"\");\n\tvoid setRequiredSslFingerPrint(QString md5);\n\tQString getRequiredSslFingerPrint();\t// returns md5!\n\t// HTTP Authentuication - for security reasons no getters are provided, only a setter\n\tvoid setHtAuthCredentials(QString user, QString pass);\n\tvoid setHtAuthUsername(QString user);\n\tvoid setHtAuthPassword(QString pass);\n\tvoid setSkipVersionAllowed(bool allowed);\n\tvoid setRemindLaterAllowed(bool allowed);\n\tbool getSkipVersionAllowed();\n\tbool getRemindLaterAllowed();\n\n\t\npublic slots:\n\n\t// Check for updates\n\tbool CheckForUpdates(bool silentAsMuchAsItCouldGet = true);\n\n\t// Aliases\n\tbool CheckForUpdatesSilent();\n\tbool CheckForUpdatesNotSilent();\n\n\n\t//\n\t// ---------------------------------------------------\n\t// ---------------------------------------------------\n\t// ---------------------------------------------------\n\t// ---------------------------------------------------\n\t//\n\nprotected:\n\n\tfriend class FvUpdateWindow;\t\t// Uses GetProposedUpdate() and others\n\tfriend class FvUpdateConfirmDialog;\t// Uses GetProposedUpdate() and others\n\tFvAvailableUpdate* GetProposedUpdate();\n\n\nprotected slots:\n\n\t// Update window button slots\n\tvoid InstallUpdate();\n\tvoid SkipUpdate();\n\tvoid RemindMeLater();\n\nprivate:\n\n\t//\n\t// Singleton business\n\t//\n\t// (we leave just the declarations, so the compiler will warn us if we try\n\t// to use those two functions by accident)\n\tFvUpdater();\t\t\t\t\t\t\t// Hide main constructor\n\t~FvUpdater();\t\t\t\t\t\t\t// Hide main destructor\n\tFvUpdater(const FvUpdater&);\t\t\t// Hide copy constructor\n\tFvUpdater& operator=(const FvUpdater&);\t// Hide assign op\n\n\tstatic FvUpdater* m_Instance;\t\t\t// Singleton instance\n\n\n\t//\n\t// Windows / dialogs\n\t//\n#ifdef FV_GUI\n\tFvUpdateWindow* m_updaterWindow;\t\t\t\t\t\t\t\t// Updater window (NULL if not shown)\n\tvoid showUpdaterWindowUpdatedWithCurrentUpdateProposal();\t\t// Show updater window\n\tvoid hideUpdaterWindow();\t\t\t\t\t\t\t\t\t\t// Hide + destroy m_updaterWindow\n\tvoid updaterWindowWasClosed();\t\t\t\t\t\t\t\t\t// Sent by the updater window when it gets closed\n#else\n\tvoid decideWhatToDoWithCurrentUpdateProposal(); // Perform an action which is configured in settings\n#endif\n\n\t// Available update (NULL if not fetched)\n\tFvAvailableUpdate* m_proposedUpdate;\n\n\t// If true, don't show the error dialogs and the \"no updates.\" dialog\n\t// (silentAsMuchAsItCouldGet from CheckForUpdates() goes here)\n\t// Useful for automatic update checking upon application startup.\n\tbool m_silentAsMuchAsItCouldGet;\n\n\t// Dialogs (notifications)\n\tbool skipVersionAllowed;\n\tbool remindLaterAllowed;\n\n\tvoid showErrorDialog(QString message, bool showEvenInSilentMode = false);\t\t\t// Show an error message\n\tvoid showInformationDialog(QString message, bool showEvenInSilentMode = false);\t\t// Show an informational message\n\n\n\t//\n\t// HTTP feed fetcher infrastructure\n\t//\n\tQUrl m_feedURL;\t\t\t\t\t// Feed URL that will be fetched\n\tQNetworkAccessManager m_qnam;\n\tQNetworkReply* m_reply;\n\tint m_httpGetId;\n\tbool m_httpRequestAborted;\n\n\tvoid startDownloadFeed(QUrl url);\t// Start downloading feed\n\tvoid cancelDownloadFeed();\t\t\t// Stop downloading the current feed\n\n\t//\n\t// SSL Fingerprint Check infrastructure\n\t//\n\tQString m_requiredSslFingerprint;\n\n\tbool checkSslFingerPrint(QUrl urltoCheck);\t// true=ssl Fingerprint accepted, false= ssl Fingerprint NOT accepted\n\n\t//\n\t// Htauth-Infrastructure\n\t//\n\tQString htAuthUsername;\n\tQString htAuthPassword;\n\n\n\t//\n\t// XML parser\n\t//\n\tQXmlStreamReader m_xml;\t\t\t\t// XML data collector and parser\n\tbool xmlParseFeed();\t\t\t\t// Parse feed in m_xml\n\tbool searchDownloadedFeedForUpdates(QString xmlTitle,\n\t\t\t\t\t\t\t\t\t\tQString xmlLink,\n\t\t\t\t\t\t\t\t\t\tQString xmlReleaseNotesLink,\n\t\t\t\t\t\t\t\t\t\tQString xmlPubDate,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureUrl,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureVersion,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosurePlatform,\n\t\t\t\t\t\t\t\t\t\tunsigned long xmlEnclosureLength,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureType);\n\n\n\t//\n\t// Helpers\n\t//\n\tvoid installTranslator();\t\t\t// Initialize translation mechanism\n\tvoid restartApplication();\t\t\t// Restarts application after update\n\nprivate slots:\n\n\tvoid authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator );\n\tvoid httpFeedReadyRead();\n\tvoid httpFeedUpdateDataReadProgress(qint64 bytesRead,\n\t\t\t\t\t\t\t\t\t\tqint64 totalBytes);\n\tvoid httpFeedDownloadFinished();\n\n\t//\n\t// Download and install Update infrastructure\n\t//\n\tvoid httpUpdateDownloadFinished();\n\tbool unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName = QString(\"\"));\t// returns true on success\n\nsignals:\n\tvoid updatedFinishedSuccessfully();\n\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 23, 25, 27, 29, 468], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 182, "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": "FVUPDATER_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_def", "text": "#define FVUPDATER_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": "FVUPDATER_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <QObject>\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": "<QObject>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "preproc_include", "text": "#include <QMutex>\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": "<QMutex>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 17}}, {"id": 12, "type": "preproc_include", "text": "#include <QNetworkAccessManager>\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": "<QNetworkAccessManager>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 32}}, {"id": 15, "type": "preproc_include", "text": "#include <QUrl>\n", "parent": 0, "children": [16, 17], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 16, "type": "#include", "text": "#include", "parent": 15, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 17, "type": "system_lib_string", "text": "<QUrl>", "parent": 15, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 15}}, {"id": 18, "type": "preproc_include", "text": "#include <QXmlStreamReader>\n", "parent": 0, "children": [19, 20], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<QXmlStreamReader>", "parent": 18, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 27}}, {"id": 21, "type": "declaration", "text": "class QNetworkReply;", "parent": 0, "children": [22], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 20}}, {"id": 22, "type": "identifier", "text": "QNetworkReply", "parent": 21, "children": [], "start_point": {"row": 8, "column": 6}, "end_point": {"row": 8, "column": 19}}, {"id": 23, "type": "declaration", "text": "class FvUpdateWindow;", "parent": 0, "children": [24], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 21}}, {"id": 24, "type": "identifier", "text": "FvUpdateWindow", "parent": 23, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 20}}, {"id": 25, "type": "declaration", "text": "class FvUpdateConfirmDialog;", "parent": 0, "children": [26], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 28}}, {"id": 26, "type": "identifier", "text": "FvUpdateConfirmDialog", "parent": 25, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 27}}, {"id": 27, "type": "declaration", "text": "class FvAvailableUpdate;", "parent": 0, "children": [28], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 24}}, {"id": 28, "type": "identifier", "text": "FvAvailableUpdate", "parent": 27, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 23}}, {"id": 29, "type": "function_definition", "text": "class FvUpdater : public QObject\n{\n\tQ_OBJECT\n\npublic:\n\n\t// Singleton\n\tstatic FvUpdater* sharedUpdater();\n\tstatic void drop();\n\n\t// Set / get feed URL\n\tvoid SetFeedURL(QUrl feedURL);\n\tvoid SetFeedURL(QString feedURL);\n\tQString GetFeedURL();\n\tvoid finishUpdate(QString pathToFinish = \"\");\n\tvoid setRequiredSslFingerPrint(QString md5);\n\tQString getRequiredSslFingerPrint();\t// returns md5!\n\t// HTTP Authentuication - for security reasons no getters are provided, only a setter\n\tvoid setHtAuthCredentials(QString user, QString pass);\n\tvoid setHtAuthUsername(QString user);\n\tvoid setHtAuthPassword(QString pass);\n\tvoid setSkipVersionAllowed(bool allowed);\n\tvoid setRemindLaterAllowed(bool allowed);\n\tbool getSkipVersionAllowed();\n\tbool getRemindLaterAllowed();\n\n\t\npublic slots:\n\n\t// Check for updates\n\tbool CheckForUpdates(bool silentAsMuchAsItCouldGet = true);\n\n\t// Aliases\n\tbool CheckForUpdatesSilent();\n\tbool CheckForUpdatesNotSilent();\n\n\n\t//\n\t// ---------------------------------------------------\n\t// ---------------------------------------------------\n\t// ---------------------------------------------------\n\t// ---------------------------------------------------\n\t//\n\nprotected:\n\n\tfriend class FvUpdateWindow;\t\t// Uses GetProposedUpdate() and others\n\tfriend class FvUpdateConfirmDialog;\t// Uses GetProposedUpdate() and others\n\tFvAvailableUpdate* GetProposedUpdate();\n\n\nprotected slots:\n\n\t// Update window button slots\n\tvoid InstallUpdate();\n\tvoid SkipUpdate();\n\tvoid RemindMeLater();\n\nprivate:\n\n\t//\n\t// Singleton business\n\t//\n\t// (we leave just the declarations, so the compiler will warn us if we try\n\t// to use those two functions by accident)\n\tFvUpdater();\t\t\t\t\t\t\t// Hide main constructor\n\t~FvUpdater();\t\t\t\t\t\t\t// Hide main destructor\n\tFvUpdater(const FvUpdater&);\t\t\t// Hide copy constructor\n\tFvUpdater& operator=(const FvUpdater&);\t// Hide assign op\n\n\tstatic FvUpdater* m_Instance;\t\t\t// Singleton instance\n\n\n\t//\n\t// Windows / dialogs\n\t//\n#ifdef FV_GUI\n\tFvUpdateWindow* m_updaterWindow;\t\t\t\t\t\t\t\t// Updater window (NULL if not shown)\n\tvoid showUpdaterWindowUpdatedWithCurrentUpdateProposal();\t\t// Show updater window\n\tvoid hideUpdaterWindow();\t\t\t\t\t\t\t\t\t\t// Hide + destroy m_updaterWindow\n\tvoid updaterWindowWasClosed();\t\t\t\t\t\t\t\t\t// Sent by the updater window when it gets closed\n#else\n\tvoid decideWhatToDoWithCurrentUpdateProposal(); // Perform an action which is configured in settings\n#endif\n\n\t// Available update (NULL if not fetched)\n\tFvAvailableUpdate* m_proposedUpdate;\n\n\t// If true, don't show the error dialogs and the \"no updates.\" dialog\n\t// (silentAsMuchAsItCouldGet from CheckForUpdates() goes here)\n\t// Useful for automatic update checking upon application startup.\n\tbool m_silentAsMuchAsItCouldGet;\n\n\t// Dialogs (notifications)\n\tbool skipVersionAllowed;\n\tbool remindLaterAllowed;\n\n\tvoid showErrorDialog(QString message, bool showEvenInSilentMode = false);\t\t\t// Show an error message\n\tvoid showInformationDialog(QString message, bool showEvenInSilentMode = false);\t\t// Show an informational message\n\n\n\t//\n\t// HTTP feed fetcher infrastructure\n\t//\n\tQUrl m_feedURL;\t\t\t\t\t// Feed URL that will be fetched\n\tQNetworkAccessManager m_qnam;\n\tQNetworkReply* m_reply;\n\tint m_httpGetId;\n\tbool m_httpRequestAborted;\n\n\tvoid startDownloadFeed(QUrl url);\t// Start downloading feed\n\tvoid cancelDownloadFeed();\t\t\t// Stop downloading the current feed\n\n\t//\n\t// SSL Fingerprint Check infrastructure\n\t//\n\tQString m_requiredSslFingerprint;\n\n\tbool checkSslFingerPrint(QUrl urltoCheck);\t// true=ssl Fingerprint accepted, false= ssl Fingerprint NOT accepted\n\n\t//\n\t// Htauth-Infrastructure\n\t//\n\tQString htAuthUsername;\n\tQString htAuthPassword;\n\n\n\t//\n\t// XML parser\n\t//\n\tQXmlStreamReader m_xml;\t\t\t\t// XML data collector and parser\n\tbool xmlParseFeed();\t\t\t\t// Parse feed in m_xml\n\tbool searchDownloadedFeedForUpdates(QString xmlTitle,\n\t\t\t\t\t\t\t\t\t\tQString xmlLink,\n\t\t\t\t\t\t\t\t\t\tQString xmlReleaseNotesLink,\n\t\t\t\t\t\t\t\t\t\tQString xmlPubDate,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureUrl,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureVersion,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosurePlatform,\n\t\t\t\t\t\t\t\t\t\tunsigned long xmlEnclosureLength,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureType);\n\n\n\t//\n\t// Helpers\n\t//\n\tvoid installTranslator();\t\t\t// Initialize translation mechanism\n\tvoid restartApplication();\t\t\t// Restarts application after update\n\nprivate slots:\n\n\tvoid authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator );\n\tvoid httpFeedReadyRead();\n\tvoid httpFeedUpdateDataReadProgress(qint64 bytesRead,\n\t\t\t\t\t\t\t\t\t\tqint64 totalBytes);\n\tvoid httpFeedDownloadFinished();\n\n\t//\n\t// Download and install Update infrastructure\n\t//\n\tvoid httpUpdateDownloadFinished();\n\tbool unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName = QString(\"\"));\t// returns true on success\n\nsignals:\n\tvoid updatedFinishedSuccessfully();\n\n}", "parent": 0, "children": [30, 31], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 180, "column": 1}}, {"id": 30, "type": "identifier", "text": "FvUpdater", "parent": 29, "children": [], "start_point": {"row": 14, "column": 6}, "end_point": {"row": 14, "column": 15}}, {"id": 31, "type": "ERROR", "text": ": public QObject", "parent": 29, "children": [32], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 32}}, {"id": 32, "type": "identifier", "text": "QObject", "parent": 31, "children": [], "start_point": {"row": 14, "column": 25}, "end_point": {"row": 14, "column": 32}}, {"id": 33, "type": "ERROR", "text": "Q_OBJECT\n\npublic:", "parent": 29, "children": [34], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 18, "column": 7}}, {"id": 34, "type": "type_identifier", "text": "Q_OBJECT", "parent": 33, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 9}}, {"id": 35, "type": "declaration", "text": "static FvUpdater* sharedUpdater();", "parent": 29, "children": [36, 37], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 35}}, {"id": 36, "type": "type_identifier", "text": "FvUpdater", "parent": 35, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 17}}, {"id": 37, "type": "pointer_declarator", "text": "* sharedUpdater()", "parent": 35, "children": [38, 39], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 34}}, {"id": 38, "type": "*", "text": "*", "parent": 37, "children": [], "start_point": {"row": 21, "column": 17}, "end_point": {"row": 21, "column": 18}}, {"id": 39, "type": "function_declarator", "text": "sharedUpdater()", "parent": 37, "children": [40, 41], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 34}}, {"id": 40, "type": "identifier", "text": "sharedUpdater", "parent": 39, "children": [], "start_point": {"row": 21, "column": 19}, "end_point": {"row": 21, "column": 32}}, {"id": 41, "type": "parameter_list", "text": "()", "parent": 39, "children": [], "start_point": {"row": 21, "column": 32}, "end_point": {"row": 21, "column": 34}}, {"id": 42, "type": "declaration", "text": "static void drop();", "parent": 29, "children": [43, 44], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 20}}, {"id": 43, "type": "primitive_type", "text": "void", "parent": 42, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 12}}, {"id": 44, "type": "function_declarator", "text": "drop()", "parent": 42, "children": [45, 46], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 19}}, {"id": 45, "type": "identifier", "text": "drop", "parent": 44, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 17}}, {"id": 46, "type": "parameter_list", "text": "()", "parent": 44, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 19}}, {"id": 47, "type": "declaration", "text": "void SetFeedURL(QUrl feedURL);", "parent": 29, "children": [48, 49], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 31}}, {"id": 48, "type": "primitive_type", "text": "void", "parent": 47, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 5}}, {"id": 49, "type": "function_declarator", "text": "SetFeedURL(QUrl feedURL)", "parent": 47, "children": [50, 51], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 30}}, {"id": 50, "type": "identifier", "text": "SetFeedURL", "parent": 49, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 16}}, {"id": 51, "type": "parameter_list", "text": "(QUrl feedURL)", "parent": 49, "children": [52], "start_point": {"row": 25, "column": 16}, "end_point": {"row": 25, "column": 30}}, {"id": 52, "type": "parameter_declaration", "text": "QUrl feedURL", "parent": 51, "children": [53, 54], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 29}}, {"id": 53, "type": "type_identifier", "text": "QUrl", "parent": 52, "children": [], "start_point": {"row": 25, "column": 17}, "end_point": {"row": 25, "column": 21}}, {"id": 54, "type": "identifier", "text": "feedURL", "parent": 52, "children": [], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 29}}, {"id": 55, "type": "declaration", "text": "void SetFeedURL(QString feedURL);", "parent": 29, "children": [56, 57], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 34}}, {"id": 56, "type": "primitive_type", "text": "void", "parent": 55, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 5}}, {"id": 57, "type": "function_declarator", "text": "SetFeedURL(QString feedURL)", "parent": 55, "children": [58, 59], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 33}}, {"id": 58, "type": "identifier", "text": "SetFeedURL", "parent": 57, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 16}}, {"id": 59, "type": "parameter_list", "text": "(QString feedURL)", "parent": 57, "children": [60], "start_point": {"row": 26, "column": 16}, "end_point": {"row": 26, "column": 33}}, {"id": 60, "type": "parameter_declaration", "text": "QString feedURL", "parent": 59, "children": [61, 62], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 32}}, {"id": 61, "type": "type_identifier", "text": "QString", "parent": 60, "children": [], "start_point": {"row": 26, "column": 17}, "end_point": {"row": 26, "column": 24}}, {"id": 62, "type": "identifier", "text": "feedURL", "parent": 60, "children": [], "start_point": {"row": 26, "column": 25}, "end_point": {"row": 26, "column": 32}}, {"id": 63, "type": "declaration", "text": "QString GetFeedURL();", "parent": 29, "children": [64, 65], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 22}}, {"id": 64, "type": "type_identifier", "text": "QString", "parent": 63, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 8}}, {"id": 65, "type": "function_declarator", "text": "GetFeedURL()", "parent": 63, "children": [66, 67], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 21}}, {"id": 66, "type": "identifier", "text": "GetFeedURL", "parent": 65, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 19}}, {"id": 67, "type": "parameter_list", "text": "()", "parent": 65, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 21}}, {"id": 68, "type": "declaration", "text": "void finishUpdate(QString pathToFinish = \"\");", "parent": 29, "children": [69, 70], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 46}}, {"id": 69, "type": "primitive_type", "text": "void", "parent": 68, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 5}}, {"id": 70, "type": "init_declarator", "text": "finishUpdate(QString pathToFinish = \"\"", "parent": 68, "children": [71, 77, 78], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 44}}, {"id": 71, "type": "function_declarator", "text": "finishUpdate(QString pathToFinish", "parent": 70, "children": [72, 73], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 39}}, {"id": 72, "type": "identifier", "text": "finishUpdate", "parent": 71, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 18}}, {"id": 73, "type": "parameter_list", "text": "(QString pathToFinish", "parent": 71, "children": [74], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 39}}, {"id": 74, "type": "parameter_declaration", "text": "QString pathToFinish", "parent": 73, "children": [75, 76], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 39}}, {"id": 75, "type": "type_identifier", "text": "QString", "parent": 74, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 26}}, {"id": 76, "type": "identifier", "text": "pathToFinish", "parent": 74, "children": [], "start_point": {"row": 28, "column": 27}, "end_point": {"row": 28, "column": 39}}, {"id": 77, "type": "=", "text": "=", "parent": 70, "children": [], "start_point": {"row": 28, "column": 40}, "end_point": {"row": 28, "column": 41}}, {"id": 78, "type": "string_literal", "text": "\"\"", "parent": 70, "children": [], "start_point": {"row": 28, "column": 42}, "end_point": {"row": 28, "column": 44}}, {"id": 79, "type": "declaration", "text": "void setRequiredSslFingerPrint(QString md5);", "parent": 29, "children": [80, 81], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 45}}, {"id": 80, "type": "primitive_type", "text": "void", "parent": 79, "children": [], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 29, "column": 5}}, {"id": 81, "type": "function_declarator", "text": "setRequiredSslFingerPrint(QString md5)", "parent": 79, "children": [82, 83], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 44}}, {"id": 82, "type": "identifier", "text": "setRequiredSslFingerPrint", "parent": 81, "children": [], "start_point": {"row": 29, "column": 6}, "end_point": {"row": 29, "column": 31}}, {"id": 83, "type": "parameter_list", "text": "(QString md5)", "parent": 81, "children": [84], "start_point": {"row": 29, "column": 31}, "end_point": {"row": 29, "column": 44}}, {"id": 84, "type": "parameter_declaration", "text": "QString md5", "parent": 83, "children": [85, 86], "start_point": {"row": 29, "column": 32}, "end_point": {"row": 29, "column": 43}}, {"id": 85, "type": "type_identifier", "text": "QString", "parent": 84, "children": [], "start_point": {"row": 29, "column": 32}, "end_point": {"row": 29, "column": 39}}, {"id": 86, "type": "identifier", "text": "md5", "parent": 84, "children": [], "start_point": {"row": 29, "column": 40}, "end_point": {"row": 29, "column": 43}}, {"id": 87, "type": "declaration", "text": "QString getRequiredSslFingerPrint();", "parent": 29, "children": [88, 89], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 37}}, {"id": 88, "type": "type_identifier", "text": "QString", "parent": 87, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 8}}, {"id": 89, "type": "function_declarator", "text": "getRequiredSslFingerPrint()", "parent": 87, "children": [90, 91], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 36}}, {"id": 90, "type": "identifier", "text": "getRequiredSslFingerPrint", "parent": 89, "children": [], "start_point": {"row": 30, "column": 9}, "end_point": {"row": 30, "column": 34}}, {"id": 91, "type": "parameter_list", "text": "()", "parent": 89, "children": [], "start_point": {"row": 30, "column": 34}, "end_point": {"row": 30, "column": 36}}, {"id": 92, "type": "declaration", "text": "void setHtAuthCredentials(QString user, QString pass);", "parent": 29, "children": [93, 94], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 55}}, {"id": 93, "type": "primitive_type", "text": "void", "parent": 92, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 5}}, {"id": 94, "type": "function_declarator", "text": "setHtAuthCredentials(QString user, QString pass)", "parent": 92, "children": [95, 96], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 54}}, {"id": 95, "type": "identifier", "text": "setHtAuthCredentials", "parent": 94, "children": [], "start_point": {"row": 32, "column": 6}, "end_point": {"row": 32, "column": 26}}, {"id": 96, "type": "parameter_list", "text": "(QString user, QString pass)", "parent": 94, "children": [97, 100], "start_point": {"row": 32, "column": 26}, "end_point": {"row": 32, "column": 54}}, {"id": 97, "type": "parameter_declaration", "text": "QString user", "parent": 96, "children": [98, 99], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 39}}, {"id": 98, "type": "type_identifier", "text": "QString", "parent": 97, "children": [], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 34}}, {"id": 99, "type": "identifier", "text": "user", "parent": 97, "children": [], "start_point": {"row": 32, "column": 35}, "end_point": {"row": 32, "column": 39}}, {"id": 100, "type": "parameter_declaration", "text": "QString pass", "parent": 96, "children": [101, 102], "start_point": {"row": 32, "column": 41}, "end_point": {"row": 32, "column": 53}}, {"id": 101, "type": "type_identifier", "text": "QString", "parent": 100, "children": [], "start_point": {"row": 32, "column": 41}, "end_point": {"row": 32, "column": 48}}, {"id": 102, "type": "identifier", "text": "pass", "parent": 100, "children": [], "start_point": {"row": 32, "column": 49}, "end_point": {"row": 32, "column": 53}}, {"id": 103, "type": "declaration", "text": "void setHtAuthUsername(QString user);", "parent": 29, "children": [104, 105], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 38}}, {"id": 104, "type": "primitive_type", "text": "void", "parent": 103, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 5}}, {"id": 105, "type": "function_declarator", "text": "setHtAuthUsername(QString user)", "parent": 103, "children": [106, 107], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 37}}, {"id": 106, "type": "identifier", "text": "setHtAuthUsername", "parent": 105, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 23}}, {"id": 107, "type": "parameter_list", "text": "(QString user)", "parent": 105, "children": [108], "start_point": {"row": 33, "column": 23}, "end_point": {"row": 33, "column": 37}}, {"id": 108, "type": "parameter_declaration", "text": "QString user", "parent": 107, "children": [109, 110], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 36}}, {"id": 109, "type": "type_identifier", "text": "QString", "parent": 108, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 31}}, {"id": 110, "type": "identifier", "text": "user", "parent": 108, "children": [], "start_point": {"row": 33, "column": 32}, "end_point": {"row": 33, "column": 36}}, {"id": 111, "type": "declaration", "text": "void setHtAuthPassword(QString pass);", "parent": 29, "children": [112, 113], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 38}}, {"id": 112, "type": "primitive_type", "text": "void", "parent": 111, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 5}}, {"id": 113, "type": "function_declarator", "text": "setHtAuthPassword(QString pass)", "parent": 111, "children": [114, 115], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 37}}, {"id": 114, "type": "identifier", "text": "setHtAuthPassword", "parent": 113, "children": [], "start_point": {"row": 34, "column": 6}, "end_point": {"row": 34, "column": 23}}, {"id": 115, "type": "parameter_list", "text": "(QString pass)", "parent": 113, "children": [116], "start_point": {"row": 34, "column": 23}, "end_point": {"row": 34, "column": 37}}, {"id": 116, "type": "parameter_declaration", "text": "QString pass", "parent": 115, "children": [117, 118], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 36}}, {"id": 117, "type": "type_identifier", "text": "QString", "parent": 116, "children": [], "start_point": {"row": 34, "column": 24}, "end_point": {"row": 34, "column": 31}}, {"id": 118, "type": "identifier", "text": "pass", "parent": 116, "children": [], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 36}}, {"id": 119, "type": "declaration", "text": "void setSkipVersionAllowed(bool allowed);", "parent": 29, "children": [120, 121], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 42}}, {"id": 120, "type": "primitive_type", "text": "void", "parent": 119, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 5}}, {"id": 121, "type": "function_declarator", "text": "setSkipVersionAllowed(bool allowed)", "parent": 119, "children": [122, 123], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 41}}, {"id": 122, "type": "identifier", "text": "setSkipVersionAllowed", "parent": 121, "children": [], "start_point": {"row": 35, "column": 6}, "end_point": {"row": 35, "column": 27}}, {"id": 123, "type": "parameter_list", "text": "(bool allowed)", "parent": 121, "children": [124], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 41}}, {"id": 124, "type": "parameter_declaration", "text": "bool allowed", "parent": 123, "children": [125, 126], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 40}}, {"id": 125, "type": "primitive_type", "text": "bool", "parent": 124, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 35, "column": 32}}, {"id": 126, "type": "identifier", "text": "allowed", "parent": 124, "children": [], "start_point": {"row": 35, "column": 33}, "end_point": {"row": 35, "column": 40}}, {"id": 127, "type": "declaration", "text": "void setRemindLaterAllowed(bool allowed);", "parent": 29, "children": [128, 129], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 42}}, {"id": 128, "type": "primitive_type", "text": "void", "parent": 127, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 5}}, {"id": 129, "type": "function_declarator", "text": "setRemindLaterAllowed(bool allowed)", "parent": 127, "children": [130, 131], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 41}}, {"id": 130, "type": "identifier", "text": "setRemindLaterAllowed", "parent": 129, "children": [], "start_point": {"row": 36, "column": 6}, "end_point": {"row": 36, "column": 27}}, {"id": 131, "type": "parameter_list", "text": "(bool allowed)", "parent": 129, "children": [132], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 41}}, {"id": 132, "type": "parameter_declaration", "text": "bool allowed", "parent": 131, "children": [133, 134], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 40}}, {"id": 133, "type": "primitive_type", "text": "bool", "parent": 132, "children": [], "start_point": {"row": 36, "column": 28}, "end_point": {"row": 36, "column": 32}}, {"id": 134, "type": "identifier", "text": "allowed", "parent": 132, "children": [], "start_point": {"row": 36, "column": 33}, "end_point": {"row": 36, "column": 40}}, {"id": 135, "type": "declaration", "text": "bool getSkipVersionAllowed();", "parent": 29, "children": [136, 137], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 30}}, {"id": 136, "type": "primitive_type", "text": "bool", "parent": 135, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 5}}, {"id": 137, "type": "function_declarator", "text": "getSkipVersionAllowed()", "parent": 135, "children": [138, 139], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 29}}, {"id": 138, "type": "identifier", "text": "getSkipVersionAllowed", "parent": 137, "children": [], "start_point": {"row": 37, "column": 6}, "end_point": {"row": 37, "column": 27}}, {"id": 139, "type": "parameter_list", "text": "()", "parent": 137, "children": [], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 29}}, {"id": 140, "type": "declaration", "text": "bool getRemindLaterAllowed();", "parent": 29, "children": [141, 142], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 30}}, {"id": 141, "type": "primitive_type", "text": "bool", "parent": 140, "children": [], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 38, "column": 5}}, {"id": 142, "type": "function_declarator", "text": "getRemindLaterAllowed()", "parent": 140, "children": [143, 144], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 29}}, {"id": 143, "type": "identifier", "text": "getRemindLaterAllowed", "parent": 142, "children": [], "start_point": {"row": 38, "column": 6}, "end_point": {"row": 38, "column": 27}}, {"id": 144, "type": "parameter_list", "text": "()", "parent": 142, "children": [], "start_point": {"row": 38, "column": 27}, "end_point": {"row": 38, "column": 29}}, {"id": 145, "type": "ERROR", "text": "public slots:", "parent": 29, "children": [146], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 13}}, {"id": 146, "type": "identifier", "text": "slots", "parent": 145, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 12}}, {"id": 147, "type": "declaration", "text": "bool CheckForUpdates(bool silentAsMuchAsItCouldGet = true);", "parent": 29, "children": [148, 149], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 60}}, {"id": 148, "type": "primitive_type", "text": "bool", "parent": 147, "children": [], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 44, "column": 5}}, {"id": 149, "type": "init_declarator", "text": "CheckForUpdates(bool silentAsMuchAsItCouldGet = true", "parent": 147, "children": [150, 156, 157], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 58}}, {"id": 150, "type": "function_declarator", "text": "CheckForUpdates(bool silentAsMuchAsItCouldGet", "parent": 149, "children": [151, 152], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 51}}, {"id": 151, "type": "identifier", "text": "CheckForUpdates", "parent": 150, "children": [], "start_point": {"row": 44, "column": 6}, "end_point": {"row": 44, "column": 21}}, {"id": 152, "type": "parameter_list", "text": "(bool silentAsMuchAsItCouldGet", "parent": 150, "children": [153], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 51}}, {"id": 153, "type": "parameter_declaration", "text": "bool silentAsMuchAsItCouldGet", "parent": 152, "children": [154, 155], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 51}}, {"id": 154, "type": "primitive_type", "text": "bool", "parent": 153, "children": [], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 26}}, {"id": 155, "type": "identifier", "text": "silentAsMuchAsItCouldGet", "parent": 153, "children": [], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 51}}, {"id": 156, "type": "=", "text": "=", "parent": 149, "children": [], "start_point": {"row": 44, "column": 52}, "end_point": {"row": 44, "column": 53}}, {"id": 157, "type": "true", "text": "true", "parent": 149, "children": [], "start_point": {"row": 44, "column": 54}, "end_point": {"row": 44, "column": 58}}, {"id": 158, "type": "declaration", "text": "bool CheckForUpdatesSilent();", "parent": 29, "children": [159, 160], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 30}}, {"id": 159, "type": "primitive_type", "text": "bool", "parent": 158, "children": [], "start_point": {"row": 47, "column": 1}, "end_point": {"row": 47, "column": 5}}, {"id": 160, "type": "function_declarator", "text": "CheckForUpdatesSilent()", "parent": 158, "children": [161, 162], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 29}}, {"id": 161, "type": "identifier", "text": "CheckForUpdatesSilent", "parent": 160, "children": [], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 27}}, {"id": 162, "type": "parameter_list", "text": "()", "parent": 160, "children": [], "start_point": {"row": 47, "column": 27}, "end_point": {"row": 47, "column": 29}}, {"id": 163, "type": "declaration", "text": "bool CheckForUpdatesNotSilent();", "parent": 29, "children": [164, 165], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 33}}, {"id": 164, "type": "primitive_type", "text": "bool", "parent": 163, "children": [], "start_point": {"row": 48, "column": 1}, "end_point": {"row": 48, "column": 5}}, {"id": 165, "type": "function_declarator", "text": "CheckForUpdatesNotSilent()", "parent": 163, "children": [166, 167], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 32}}, {"id": 166, "type": "identifier", "text": "CheckForUpdatesNotSilent", "parent": 165, "children": [], "start_point": {"row": 48, "column": 6}, "end_point": {"row": 48, "column": 30}}, {"id": 167, "type": "parameter_list", "text": "()", "parent": 165, "children": [], "start_point": {"row": 48, "column": 30}, "end_point": {"row": 48, "column": 32}}, {"id": 168, "type": "labeled_statement", "text": "protected:\n\n\tfriend class FvUpdateWindow;", "parent": 29, "children": [169], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 60, "column": 29}}, {"id": 169, "type": "declaration", "text": "friend class FvUpdateWindow;", "parent": 168, "children": [170, 171], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 29}}, {"id": 170, "type": "type_identifier", "text": "friend", "parent": 169, "children": [], "start_point": {"row": 60, "column": 1}, "end_point": {"row": 60, "column": 7}}, {"id": 171, "type": "identifier", "text": "FvUpdateWindow", "parent": 169, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 28}}, {"id": 172, "type": "declaration", "text": "friend class FvUpdateConfirmDialog;", "parent": 29, "children": [173, 174], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 36}}, {"id": 173, "type": "type_identifier", "text": "friend", "parent": 172, "children": [], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 61, "column": 7}}, {"id": 174, "type": "identifier", "text": "FvUpdateConfirmDialog", "parent": 172, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 35}}, {"id": 175, "type": "declaration", "text": "FvAvailableUpdate* GetProposedUpdate();", "parent": 29, "children": [176, 177], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 40}}, {"id": 176, "type": "type_identifier", "text": "FvAvailableUpdate", "parent": 175, "children": [], "start_point": {"row": 62, "column": 1}, "end_point": {"row": 62, "column": 18}}, {"id": 177, "type": "pointer_declarator", "text": "* GetProposedUpdate()", "parent": 175, "children": [178, 179], "start_point": {"row": 62, "column": 18}, "end_point": {"row": 62, "column": 39}}, {"id": 178, "type": "*", "text": "*", "parent": 177, "children": [], "start_point": {"row": 62, "column": 18}, "end_point": {"row": 62, "column": 19}}, {"id": 179, "type": "function_declarator", "text": "GetProposedUpdate()", "parent": 177, "children": [180, 181], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 39}}, {"id": 180, "type": "identifier", "text": "GetProposedUpdate", "parent": 179, "children": [], "start_point": {"row": 62, "column": 20}, "end_point": {"row": 62, "column": 37}}, {"id": 181, "type": "parameter_list", "text": "()", "parent": 179, "children": [], "start_point": {"row": 62, "column": 37}, "end_point": {"row": 62, "column": 39}}, {"id": 182, "type": "ERROR", "text": "protected slots:", "parent": 29, "children": [183], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 16}}, {"id": 183, "type": "identifier", "text": "slots", "parent": 182, "children": [], "start_point": {"row": 65, "column": 10}, "end_point": {"row": 65, "column": 15}}, {"id": 184, "type": "declaration", "text": "void InstallUpdate();", "parent": 29, "children": [185, 186], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 22}}, {"id": 185, "type": "primitive_type", "text": "void", "parent": 184, "children": [], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 68, "column": 5}}, {"id": 186, "type": "function_declarator", "text": "InstallUpdate()", "parent": 184, "children": [187, 188], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 21}}, {"id": 187, "type": "identifier", "text": "InstallUpdate", "parent": 186, "children": [], "start_point": {"row": 68, "column": 6}, "end_point": {"row": 68, "column": 19}}, {"id": 188, "type": "parameter_list", "text": "()", "parent": 186, "children": [], "start_point": {"row": 68, "column": 19}, "end_point": {"row": 68, "column": 21}}, {"id": 189, "type": "declaration", "text": "void SkipUpdate();", "parent": 29, "children": [190, 191], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 19}}, {"id": 190, "type": "primitive_type", "text": "void", "parent": 189, "children": [], "start_point": {"row": 69, "column": 1}, "end_point": {"row": 69, "column": 5}}, {"id": 191, "type": "function_declarator", "text": "SkipUpdate()", "parent": 189, "children": [192, 193], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 18}}, {"id": 192, "type": "identifier", "text": "SkipUpdate", "parent": 191, "children": [], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 16}}, {"id": 193, "type": "parameter_list", "text": "()", "parent": 191, "children": [], "start_point": {"row": 69, "column": 16}, "end_point": {"row": 69, "column": 18}}, {"id": 194, "type": "declaration", "text": "void RemindMeLater();", "parent": 29, "children": [195, 196], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 22}}, {"id": 195, "type": "primitive_type", "text": "void", "parent": 194, "children": [], "start_point": {"row": 70, "column": 1}, "end_point": {"row": 70, "column": 5}}, {"id": 196, "type": "function_declarator", "text": "RemindMeLater()", "parent": 194, "children": [197, 198], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 21}}, {"id": 197, "type": "identifier", "text": "RemindMeLater", "parent": 196, "children": [], "start_point": {"row": 70, "column": 6}, "end_point": {"row": 70, "column": 19}}, {"id": 198, "type": "parameter_list", "text": "()", "parent": 196, "children": [], "start_point": {"row": 70, "column": 19}, "end_point": {"row": 70, "column": 21}}, {"id": 199, "type": "labeled_statement", "text": "private:\n\n\t//\n\t// Singleton business\n\t//\n\t// (we leave just the declarations, so the compiler will warn us if we try\n\t// to use those two functions by accident)\n\tFvUpdater();", "parent": 29, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 79, "column": 13}}, {"id": 200, "type": "call_expression", "text": "FvUpdater()", "parent": 199, "children": [201, 202], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 12}}, {"id": 201, "type": "identifier", "text": "FvUpdater", "parent": 200, "children": [], "start_point": {"row": 79, "column": 1}, "end_point": {"row": 79, "column": 10}}, {"id": 202, "type": "argument_list", "text": "()", "parent": 200, "children": [], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 12}}, {"id": 203, "type": "unary_expression", "text": "~FvUpdater()", "parent": 29, "children": [204, 205], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 13}}, {"id": 204, "type": "~", "text": "~", "parent": 203, "children": [], "start_point": {"row": 80, "column": 1}, "end_point": {"row": 80, "column": 2}}, {"id": 205, "type": "call_expression", "text": "FvUpdater()", "parent": 203, "children": [206, 207], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 13}}, {"id": 206, "type": "identifier", "text": "FvUpdater", "parent": 205, "children": [], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 11}}, {"id": 207, "type": "argument_list", "text": "()", "parent": 205, "children": [], "start_point": {"row": 80, "column": 11}, "end_point": {"row": 80, "column": 13}}, {"id": 208, "type": "macro_type_specifier", "text": "FvUpdater(const FvUpdater&)", "parent": 29, "children": [209, 210], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 28}}, {"id": 209, "type": "identifier", "text": "FvUpdater", "parent": 208, "children": [], "start_point": {"row": 81, "column": 1}, "end_point": {"row": 81, "column": 10}}, {"id": 210, "type": "type_descriptor", "text": "const FvUpdater", "parent": 208, "children": [211], "start_point": {"row": 81, "column": 11}, "end_point": {"row": 81, "column": 26}}, {"id": 211, "type": "type_identifier", "text": "FvUpdater", "parent": 210, "children": [], "start_point": {"row": 81, "column": 17}, "end_point": {"row": 81, "column": 26}}, {"id": 212, "type": "binary_expression", "text": "FvUpdater& operator=(const FvUpdater&)", "parent": 29, "children": [213, 214], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 39}}, {"id": 213, "type": "identifier", "text": "FvUpdater", "parent": 212, "children": [], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 10}}, {"id": 214, "type": "assignment_expression", "text": "operator=(const FvUpdater&)", "parent": 212, "children": [215, 216, 217], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 39}}, {"id": 215, "type": "identifier", "text": "operator", "parent": 214, "children": [], "start_point": {"row": 82, "column": 12}, "end_point": {"row": 82, "column": 20}}, {"id": 216, "type": "=", "text": "=", "parent": 214, "children": [], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 21}}, {"id": 217, "type": "cast_expression", "text": "(const FvUpdater&)", "parent": 214, "children": [218, 220], "start_point": {"row": 82, "column": 21}, "end_point": {"row": 82, "column": 39}}, {"id": 218, "type": "type_descriptor", "text": "const FvUpdater", "parent": 217, "children": [219], "start_point": {"row": 82, "column": 22}, "end_point": {"row": 82, "column": 37}}, {"id": 219, "type": "type_identifier", "text": "FvUpdater", "parent": 218, "children": [], "start_point": {"row": 82, "column": 28}, "end_point": {"row": 82, "column": 37}}, {"id": 220, "type": "identifier", "text": "", "parent": 217, "children": [], "start_point": {"row": 82, "column": 39}, "end_point": {"row": 82, "column": 39}}, {"id": 221, "type": "declaration", "text": "static FvUpdater* m_Instance;", "parent": 29, "children": [222, 223], "start_point": {"row": 84, "column": 1}, "end_point": {"row": 84, "column": 30}}, {"id": 222, "type": "type_identifier", "text": "FvUpdater", "parent": 221, "children": [], "start_point": {"row": 84, "column": 8}, "end_point": {"row": 84, "column": 17}}, {"id": 223, "type": "pointer_declarator", "text": "* m_Instance", "parent": 221, "children": [224, 225], "start_point": {"row": 84, "column": 17}, "end_point": {"row": 84, "column": 29}}, {"id": 224, "type": "*", "text": "*", "parent": 223, "children": [], "start_point": {"row": 84, "column": 17}, "end_point": {"row": 84, "column": 18}}, {"id": 225, "type": "identifier", "text": "m_Instance", "parent": 223, "children": [], "start_point": {"row": 84, "column": 19}, "end_point": {"row": 84, "column": 29}}, {"id": 226, "type": "preproc_ifdef", "text": "#ifdef FV_GUI\n\tFvUpdateWindow* m_updaterWindow;\t\t\t\t\t\t\t\t// Updater window (NULL if not shown)\n\tvoid showUpdaterWindowUpdatedWithCurrentUpdateProposal();\t\t// Show updater window\n\tvoid hideUpdaterWindow();\t\t\t\t\t\t\t\t\t\t// Hide + destroy m_updaterWindow\n\tvoid updaterWindowWasClosed();\t\t\t\t\t\t\t\t\t// Sent by the updater window when it gets closed\n#else\n\tvoid decideWhatToDoWithCurrentUpdateProposal(); // Perform an action which is configured in settings\n#endif", "parent": 29, "children": [227, 228, 229, 234, 239, 244, 249, 256], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 97, "column": 6}}, {"id": 227, "type": "#ifdef", "text": "#ifdef", "parent": 226, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 6}}, {"id": 228, "type": "identifier", "text": "FV_GUI", "parent": 226, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 13}}, {"id": 229, "type": "declaration", "text": "FvUpdateWindow* m_updaterWindow;", "parent": 226, "children": [230, 231], "start_point": {"row": 91, "column": 1}, "end_point": {"row": 91, "column": 33}}, {"id": 230, "type": "type_identifier", "text": "FvUpdateWindow", "parent": 229, "children": [], "start_point": {"row": 91, "column": 1}, "end_point": {"row": 91, "column": 15}}, {"id": 231, "type": "pointer_declarator", "text": "* m_updaterWindow", "parent": 229, "children": [232, 233], "start_point": {"row": 91, "column": 15}, "end_point": {"row": 91, "column": 32}}, {"id": 232, "type": "*", "text": "*", "parent": 231, "children": [], "start_point": {"row": 91, "column": 15}, "end_point": {"row": 91, "column": 16}}, {"id": 233, "type": "identifier", "text": "m_updaterWindow", "parent": 231, "children": [], "start_point": {"row": 91, "column": 17}, "end_point": {"row": 91, "column": 32}}, {"id": 234, "type": "declaration", "text": "void showUpdaterWindowUpdatedWithCurrentUpdateProposal();", "parent": 226, "children": [235, 236], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 58}}, {"id": 235, "type": "primitive_type", "text": "void", "parent": 234, "children": [], "start_point": {"row": 92, "column": 1}, "end_point": {"row": 92, "column": 5}}, {"id": 236, "type": "function_declarator", "text": "showUpdaterWindowUpdatedWithCurrentUpdateProposal()", "parent": 234, "children": [237, 238], "start_point": {"row": 92, "column": 6}, "end_point": {"row": 92, "column": 57}}, {"id": 237, "type": "identifier", "text": "showUpdaterWindowUpdatedWithCurrentUpdateProposal", "parent": 236, "children": [], "start_point": {"row": 92, "column": 6}, "end_point": {"row": 92, "column": 55}}, {"id": 238, "type": "parameter_list", "text": "()", "parent": 236, "children": [], "start_point": {"row": 92, "column": 55}, "end_point": {"row": 92, "column": 57}}, {"id": 239, "type": "declaration", "text": "void hideUpdaterWindow();", "parent": 226, "children": [240, 241], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 26}}, {"id": 240, "type": "primitive_type", "text": "void", "parent": 239, "children": [], "start_point": {"row": 93, "column": 1}, "end_point": {"row": 93, "column": 5}}, {"id": 241, "type": "function_declarator", "text": "hideUpdaterWindow()", "parent": 239, "children": [242, 243], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 25}}, {"id": 242, "type": "identifier", "text": "hideUpdaterWindow", "parent": 241, "children": [], "start_point": {"row": 93, "column": 6}, "end_point": {"row": 93, "column": 23}}, {"id": 243, "type": "parameter_list", "text": "()", "parent": 241, "children": [], "start_point": {"row": 93, "column": 23}, "end_point": {"row": 93, "column": 25}}, {"id": 244, "type": "declaration", "text": "void updaterWindowWasClosed();", "parent": 226, "children": [245, 246], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 31}}, {"id": 245, "type": "primitive_type", "text": "void", "parent": 244, "children": [], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 94, "column": 5}}, {"id": 246, "type": "function_declarator", "text": "updaterWindowWasClosed()", "parent": 244, "children": [247, 248], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 30}}, {"id": 247, "type": "identifier", "text": "updaterWindowWasClosed", "parent": 246, "children": [], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 28}}, {"id": 248, "type": "parameter_list", "text": "()", "parent": 246, "children": [], "start_point": {"row": 94, "column": 28}, "end_point": {"row": 94, "column": 30}}, {"id": 249, "type": "preproc_else", "text": "#else\n\tvoid decideWhatToDoWithCurrentUpdateProposal();", "parent": 226, "children": [250, 251], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 96, "column": 48}}, {"id": 250, "type": "#else", "text": "#else", "parent": 249, "children": [], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 5}}, {"id": 251, "type": "declaration", "text": "void decideWhatToDoWithCurrentUpdateProposal();", "parent": 249, "children": [252, 253], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 48}}, {"id": 252, "type": "primitive_type", "text": "void", "parent": 251, "children": [], "start_point": {"row": 96, "column": 1}, "end_point": {"row": 96, "column": 5}}, {"id": 253, "type": "function_declarator", "text": "decideWhatToDoWithCurrentUpdateProposal()", "parent": 251, "children": [254, 255], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 47}}, {"id": 254, "type": "identifier", "text": "decideWhatToDoWithCurrentUpdateProposal", "parent": 253, "children": [], "start_point": {"row": 96, "column": 6}, "end_point": {"row": 96, "column": 45}}, {"id": 255, "type": "parameter_list", "text": "()", "parent": 253, "children": [], "start_point": {"row": 96, "column": 45}, "end_point": {"row": 96, "column": 47}}, {"id": 256, "type": "#endif", "text": "#endif", "parent": 226, "children": [], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 6}}, {"id": 257, "type": "declaration", "text": "FvAvailableUpdate* m_proposedUpdate;", "parent": 29, "children": [258, 259], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 37}}, {"id": 258, "type": "type_identifier", "text": "FvAvailableUpdate", "parent": 257, "children": [], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 18}}, {"id": 259, "type": "pointer_declarator", "text": "* m_proposedUpdate", "parent": 257, "children": [260, 261], "start_point": {"row": 100, "column": 18}, "end_point": {"row": 100, "column": 36}}, {"id": 260, "type": "*", "text": "*", "parent": 259, "children": [], "start_point": {"row": 100, "column": 18}, "end_point": {"row": 100, "column": 19}}, {"id": 261, "type": "identifier", "text": "m_proposedUpdate", "parent": 259, "children": [], "start_point": {"row": 100, "column": 20}, "end_point": {"row": 100, "column": 36}}, {"id": 262, "type": "declaration", "text": "bool m_silentAsMuchAsItCouldGet;", "parent": 29, "children": [263, 264], "start_point": {"row": 105, "column": 1}, "end_point": {"row": 105, "column": 33}}, {"id": 263, "type": "primitive_type", "text": "bool", "parent": 262, "children": [], "start_point": {"row": 105, "column": 1}, "end_point": {"row": 105, "column": 5}}, {"id": 264, "type": "identifier", "text": "m_silentAsMuchAsItCouldGet", "parent": 262, "children": [], "start_point": {"row": 105, "column": 6}, "end_point": {"row": 105, "column": 32}}, {"id": 265, "type": "declaration", "text": "bool skipVersionAllowed;", "parent": 29, "children": [266, 267], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 25}}, {"id": 266, "type": "primitive_type", "text": "bool", "parent": 265, "children": [], "start_point": {"row": 108, "column": 1}, "end_point": {"row": 108, "column": 5}}, {"id": 267, "type": "identifier", "text": "skipVersionAllowed", "parent": 265, "children": [], "start_point": {"row": 108, "column": 6}, "end_point": {"row": 108, "column": 24}}, {"id": 268, "type": "declaration", "text": "bool remindLaterAllowed;", "parent": 29, "children": [269, 270], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 25}}, {"id": 269, "type": "primitive_type", "text": "bool", "parent": 268, "children": [], "start_point": {"row": 109, "column": 1}, "end_point": {"row": 109, "column": 5}}, {"id": 270, "type": "identifier", "text": "remindLaterAllowed", "parent": 268, "children": [], "start_point": {"row": 109, "column": 6}, "end_point": {"row": 109, "column": 24}}, {"id": 271, "type": "declaration", "text": "void showErrorDialog(QString message, bool showEvenInSilentMode = false);", "parent": 29, "children": [272, 273], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 74}}, {"id": 272, "type": "primitive_type", "text": "void", "parent": 271, "children": [], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 5}}, {"id": 273, "type": "init_declarator", "text": "showErrorDialog(QString message, bool showEvenInSilentMode = false", "parent": 271, "children": [274, 283, 284], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 72}}, {"id": 274, "type": "function_declarator", "text": "showErrorDialog(QString message, bool showEvenInSilentMode", "parent": 273, "children": [275, 276], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 64}}, {"id": 275, "type": "identifier", "text": "showErrorDialog", "parent": 274, "children": [], "start_point": {"row": 111, "column": 6}, "end_point": {"row": 111, "column": 21}}, {"id": 276, "type": "parameter_list", "text": "(QString message, bool showEvenInSilentMode", "parent": 274, "children": [277, 280], "start_point": {"row": 111, "column": 21}, "end_point": {"row": 111, "column": 64}}, {"id": 277, "type": "parameter_declaration", "text": "QString message", "parent": 276, "children": [278, 279], "start_point": {"row": 111, "column": 22}, "end_point": {"row": 111, "column": 37}}, {"id": 278, "type": "type_identifier", "text": "QString", "parent": 277, "children": [], "start_point": {"row": 111, "column": 22}, "end_point": {"row": 111, "column": 29}}, {"id": 279, "type": "identifier", "text": "message", "parent": 277, "children": [], "start_point": {"row": 111, "column": 30}, "end_point": {"row": 111, "column": 37}}, {"id": 280, "type": "parameter_declaration", "text": "bool showEvenInSilentMode", "parent": 276, "children": [281, 282], "start_point": {"row": 111, "column": 39}, "end_point": {"row": 111, "column": 64}}, {"id": 281, "type": "primitive_type", "text": "bool", "parent": 280, "children": [], "start_point": {"row": 111, "column": 39}, "end_point": {"row": 111, "column": 43}}, {"id": 282, "type": "identifier", "text": "showEvenInSilentMode", "parent": 280, "children": [], "start_point": {"row": 111, "column": 44}, "end_point": {"row": 111, "column": 64}}, {"id": 283, "type": "=", "text": "=", "parent": 273, "children": [], "start_point": {"row": 111, "column": 65}, "end_point": {"row": 111, "column": 66}}, {"id": 284, "type": "false", "text": "false", "parent": 273, "children": [], "start_point": {"row": 111, "column": 67}, "end_point": {"row": 111, "column": 72}}, {"id": 285, "type": "declaration", "text": "void showInformationDialog(QString message, bool showEvenInSilentMode = false);", "parent": 29, "children": [286, 287], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 80}}, {"id": 286, "type": "primitive_type", "text": "void", "parent": 285, "children": [], "start_point": {"row": 112, "column": 1}, "end_point": {"row": 112, "column": 5}}, {"id": 287, "type": "init_declarator", "text": "showInformationDialog(QString message, bool showEvenInSilentMode = false", "parent": 285, "children": [288, 297, 298], "start_point": {"row": 112, "column": 6}, "end_point": {"row": 112, "column": 78}}, {"id": 288, "type": "function_declarator", "text": "showInformationDialog(QString message, bool showEvenInSilentMode", "parent": 287, "children": [289, 290], "start_point": {"row": 112, "column": 6}, "end_point": {"row": 112, "column": 70}}, {"id": 289, "type": "identifier", "text": "showInformationDialog", "parent": 288, "children": [], "start_point": {"row": 112, "column": 6}, "end_point": {"row": 112, "column": 27}}, {"id": 290, "type": "parameter_list", "text": "(QString message, bool showEvenInSilentMode", "parent": 288, "children": [291, 294], "start_point": {"row": 112, "column": 27}, "end_point": {"row": 112, "column": 70}}, {"id": 291, "type": "parameter_declaration", "text": "QString message", "parent": 290, "children": [292, 293], "start_point": {"row": 112, "column": 28}, "end_point": {"row": 112, "column": 43}}, {"id": 292, "type": "type_identifier", "text": "QString", "parent": 291, "children": [], "start_point": {"row": 112, "column": 28}, "end_point": {"row": 112, "column": 35}}, {"id": 293, "type": "identifier", "text": "message", "parent": 291, "children": [], "start_point": {"row": 112, "column": 36}, "end_point": {"row": 112, "column": 43}}, {"id": 294, "type": "parameter_declaration", "text": "bool showEvenInSilentMode", "parent": 290, "children": [295, 296], "start_point": {"row": 112, "column": 45}, "end_point": {"row": 112, "column": 70}}, {"id": 295, "type": "primitive_type", "text": "bool", "parent": 294, "children": [], "start_point": {"row": 112, "column": 45}, "end_point": {"row": 112, "column": 49}}, {"id": 296, "type": "identifier", "text": "showEvenInSilentMode", "parent": 294, "children": [], "start_point": {"row": 112, "column": 50}, "end_point": {"row": 112, "column": 70}}, {"id": 297, "type": "=", "text": "=", "parent": 287, "children": [], "start_point": {"row": 112, "column": 71}, "end_point": {"row": 112, "column": 72}}, {"id": 298, "type": "false", "text": "false", "parent": 287, "children": [], "start_point": {"row": 112, "column": 73}, "end_point": {"row": 112, "column": 78}}, {"id": 299, "type": "declaration", "text": "QUrl m_feedURL;", "parent": 29, "children": [300, 301], "start_point": {"row": 118, "column": 1}, "end_point": {"row": 118, "column": 16}}, {"id": 300, "type": "type_identifier", "text": "QUrl", "parent": 299, "children": [], "start_point": {"row": 118, "column": 1}, "end_point": {"row": 118, "column": 5}}, {"id": 301, "type": "identifier", "text": "m_feedURL", "parent": 299, "children": [], "start_point": {"row": 118, "column": 6}, "end_point": {"row": 118, "column": 15}}, {"id": 302, "type": "declaration", "text": "QNetworkAccessManager m_qnam;", "parent": 29, "children": [303, 304], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 30}}, {"id": 303, "type": "type_identifier", "text": "QNetworkAccessManager", "parent": 302, "children": [], "start_point": {"row": 119, "column": 1}, "end_point": {"row": 119, "column": 22}}, {"id": 304, "type": "identifier", "text": "m_qnam", "parent": 302, "children": [], "start_point": {"row": 119, "column": 23}, "end_point": {"row": 119, "column": 29}}, {"id": 305, "type": "declaration", "text": "QNetworkReply* m_reply;", "parent": 29, "children": [306, 307], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 120, "column": 24}}, {"id": 306, "type": "type_identifier", "text": "QNetworkReply", "parent": 305, "children": [], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 120, "column": 14}}, {"id": 307, "type": "pointer_declarator", "text": "* m_reply", "parent": 305, "children": [308, 309], "start_point": {"row": 120, "column": 14}, "end_point": {"row": 120, "column": 23}}, {"id": 308, "type": "*", "text": "*", "parent": 307, "children": [], "start_point": {"row": 120, "column": 14}, "end_point": {"row": 120, "column": 15}}, {"id": 309, "type": "identifier", "text": "m_reply", "parent": 307, "children": [], "start_point": {"row": 120, "column": 16}, "end_point": {"row": 120, "column": 23}}, {"id": 310, "type": "declaration", "text": "int m_httpGetId;", "parent": 29, "children": [311, 312], "start_point": {"row": 121, "column": 1}, "end_point": {"row": 121, "column": 17}}, {"id": 311, "type": "primitive_type", "text": "int", "parent": 310, "children": [], "start_point": {"row": 121, "column": 1}, "end_point": {"row": 121, "column": 4}}, {"id": 312, "type": "identifier", "text": "m_httpGetId", "parent": 310, "children": [], "start_point": {"row": 121, "column": 5}, "end_point": {"row": 121, "column": 16}}, {"id": 313, "type": "declaration", "text": "bool m_httpRequestAborted;", "parent": 29, "children": [314, 315], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 122, "column": 27}}, {"id": 314, "type": "primitive_type", "text": "bool", "parent": 313, "children": [], "start_point": {"row": 122, "column": 1}, "end_point": {"row": 122, "column": 5}}, {"id": 315, "type": "identifier", "text": "m_httpRequestAborted", "parent": 313, "children": [], "start_point": {"row": 122, "column": 6}, "end_point": {"row": 122, "column": 26}}, {"id": 316, "type": "declaration", "text": "void startDownloadFeed(QUrl url);", "parent": 29, "children": [317, 318], "start_point": {"row": 124, "column": 1}, "end_point": {"row": 124, "column": 34}}, {"id": 317, "type": "primitive_type", "text": "void", "parent": 316, "children": [], "start_point": {"row": 124, "column": 1}, "end_point": {"row": 124, "column": 5}}, {"id": 318, "type": "function_declarator", "text": "startDownloadFeed(QUrl url)", "parent": 316, "children": [319, 320], "start_point": {"row": 124, "column": 6}, "end_point": {"row": 124, "column": 33}}, {"id": 319, "type": "identifier", "text": "startDownloadFeed", "parent": 318, "children": [], "start_point": {"row": 124, "column": 6}, "end_point": {"row": 124, "column": 23}}, {"id": 320, "type": "parameter_list", "text": "(QUrl url)", "parent": 318, "children": [321], "start_point": {"row": 124, "column": 23}, "end_point": {"row": 124, "column": 33}}, {"id": 321, "type": "parameter_declaration", "text": "QUrl url", "parent": 320, "children": [322, 323], "start_point": {"row": 124, "column": 24}, "end_point": {"row": 124, "column": 32}}, {"id": 322, "type": "type_identifier", "text": "QUrl", "parent": 321, "children": [], "start_point": {"row": 124, "column": 24}, "end_point": {"row": 124, "column": 28}}, {"id": 323, "type": "identifier", "text": "url", "parent": 321, "children": [], "start_point": {"row": 124, "column": 29}, "end_point": {"row": 124, "column": 32}}, {"id": 324, "type": "declaration", "text": "void cancelDownloadFeed();", "parent": 29, "children": [325, 326], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 125, "column": 27}}, {"id": 325, "type": "primitive_type", "text": "void", "parent": 324, "children": [], "start_point": {"row": 125, "column": 1}, "end_point": {"row": 125, "column": 5}}, {"id": 326, "type": "function_declarator", "text": "cancelDownloadFeed()", "parent": 324, "children": [327, 328], "start_point": {"row": 125, "column": 6}, "end_point": {"row": 125, "column": 26}}, {"id": 327, "type": "identifier", "text": "cancelDownloadFeed", "parent": 326, "children": [], "start_point": {"row": 125, "column": 6}, "end_point": {"row": 125, "column": 24}}, {"id": 328, "type": "parameter_list", "text": "()", "parent": 326, "children": [], "start_point": {"row": 125, "column": 24}, "end_point": {"row": 125, "column": 26}}, {"id": 329, "type": "declaration", "text": "QString m_requiredSslFingerprint;", "parent": 29, "children": [330, 331], "start_point": {"row": 130, "column": 1}, "end_point": {"row": 130, "column": 34}}, {"id": 330, "type": "type_identifier", "text": "QString", "parent": 329, "children": [], "start_point": {"row": 130, "column": 1}, "end_point": {"row": 130, "column": 8}}, {"id": 331, "type": "identifier", "text": "m_requiredSslFingerprint", "parent": 329, "children": [], "start_point": {"row": 130, "column": 9}, "end_point": {"row": 130, "column": 33}}, {"id": 332, "type": "declaration", "text": "bool checkSslFingerPrint(QUrl urltoCheck);", "parent": 29, "children": [333, 334], "start_point": {"row": 132, "column": 1}, "end_point": {"row": 132, "column": 43}}, {"id": 333, "type": "primitive_type", "text": "bool", "parent": 332, "children": [], "start_point": {"row": 132, "column": 1}, "end_point": {"row": 132, "column": 5}}, {"id": 334, "type": "function_declarator", "text": "checkSslFingerPrint(QUrl urltoCheck)", "parent": 332, "children": [335, 336], "start_point": {"row": 132, "column": 6}, "end_point": {"row": 132, "column": 42}}, {"id": 335, "type": "identifier", "text": "checkSslFingerPrint", "parent": 334, "children": [], "start_point": {"row": 132, "column": 6}, "end_point": {"row": 132, "column": 25}}, {"id": 336, "type": "parameter_list", "text": "(QUrl urltoCheck)", "parent": 334, "children": [337], "start_point": {"row": 132, "column": 25}, "end_point": {"row": 132, "column": 42}}, {"id": 337, "type": "parameter_declaration", "text": "QUrl urltoCheck", "parent": 336, "children": [338, 339], "start_point": {"row": 132, "column": 26}, "end_point": {"row": 132, "column": 41}}, {"id": 338, "type": "type_identifier", "text": "QUrl", "parent": 337, "children": [], "start_point": {"row": 132, "column": 26}, "end_point": {"row": 132, "column": 30}}, {"id": 339, "type": "identifier", "text": "urltoCheck", "parent": 337, "children": [], "start_point": {"row": 132, "column": 31}, "end_point": {"row": 132, "column": 41}}, {"id": 340, "type": "declaration", "text": "QString htAuthUsername;", "parent": 29, "children": [341, 342], "start_point": {"row": 137, "column": 1}, "end_point": {"row": 137, "column": 24}}, {"id": 341, "type": "type_identifier", "text": "QString", "parent": 340, "children": [], "start_point": {"row": 137, "column": 1}, "end_point": {"row": 137, "column": 8}}, {"id": 342, "type": "identifier", "text": "htAuthUsername", "parent": 340, "children": [], "start_point": {"row": 137, "column": 9}, "end_point": {"row": 137, "column": 23}}, {"id": 343, "type": "declaration", "text": "QString htAuthPassword;", "parent": 29, "children": [344, 345], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 138, "column": 24}}, {"id": 344, "type": "type_identifier", "text": "QString", "parent": 343, "children": [], "start_point": {"row": 138, "column": 1}, "end_point": {"row": 138, "column": 8}}, {"id": 345, "type": "identifier", "text": "htAuthPassword", "parent": 343, "children": [], "start_point": {"row": 138, "column": 9}, "end_point": {"row": 138, "column": 23}}, {"id": 346, "type": "declaration", "text": "QXmlStreamReader m_xml;", "parent": 29, "children": [347, 348], "start_point": {"row": 144, "column": 1}, "end_point": {"row": 144, "column": 24}}, {"id": 347, "type": "type_identifier", "text": "QXmlStreamReader", "parent": 346, "children": [], "start_point": {"row": 144, "column": 1}, "end_point": {"row": 144, "column": 17}}, {"id": 348, "type": "identifier", "text": "m_xml", "parent": 346, "children": [], "start_point": {"row": 144, "column": 18}, "end_point": {"row": 144, "column": 23}}, {"id": 349, "type": "declaration", "text": "bool xmlParseFeed();", "parent": 29, "children": [350, 351], "start_point": {"row": 145, "column": 1}, "end_point": {"row": 145, "column": 21}}, {"id": 350, "type": "primitive_type", "text": "bool", "parent": 349, "children": [], "start_point": {"row": 145, "column": 1}, "end_point": {"row": 145, "column": 5}}, {"id": 351, "type": "function_declarator", "text": "xmlParseFeed()", "parent": 349, "children": [352, 353], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 145, "column": 20}}, {"id": 352, "type": "identifier", "text": "xmlParseFeed", "parent": 351, "children": [], "start_point": {"row": 145, "column": 6}, "end_point": {"row": 145, "column": 18}}, {"id": 353, "type": "parameter_list", "text": "()", "parent": 351, "children": [], "start_point": {"row": 145, "column": 18}, "end_point": {"row": 145, "column": 20}}, {"id": 354, "type": "declaration", "text": "bool searchDownloadedFeedForUpdates(QString xmlTitle,\n\t\t\t\t\t\t\t\t\t\tQString xmlLink,\n\t\t\t\t\t\t\t\t\t\tQString xmlReleaseNotesLink,\n\t\t\t\t\t\t\t\t\t\tQString xmlPubDate,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureUrl,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureVersion,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosurePlatform,\n\t\t\t\t\t\t\t\t\t\tunsigned long xmlEnclosureLength,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureType);", "parent": 29, "children": [355, 356], "start_point": {"row": 146, "column": 1}, "end_point": {"row": 154, "column": 36}}, {"id": 355, "type": "primitive_type", "text": "bool", "parent": 354, "children": [], "start_point": {"row": 146, "column": 1}, "end_point": {"row": 146, "column": 5}}, {"id": 356, "type": "function_declarator", "text": "searchDownloadedFeedForUpdates(QString xmlTitle,\n\t\t\t\t\t\t\t\t\t\tQString xmlLink,\n\t\t\t\t\t\t\t\t\t\tQString xmlReleaseNotesLink,\n\t\t\t\t\t\t\t\t\t\tQString xmlPubDate,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureUrl,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureVersion,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosurePlatform,\n\t\t\t\t\t\t\t\t\t\tunsigned long xmlEnclosureLength,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureType)", "parent": 354, "children": [357, 358], "start_point": {"row": 146, "column": 6}, "end_point": {"row": 154, "column": 35}}, {"id": 357, "type": "identifier", "text": "searchDownloadedFeedForUpdates", "parent": 356, "children": [], "start_point": {"row": 146, "column": 6}, "end_point": {"row": 146, "column": 36}}, {"id": 358, "type": "parameter_list", "text": "(QString xmlTitle,\n\t\t\t\t\t\t\t\t\t\tQString xmlLink,\n\t\t\t\t\t\t\t\t\t\tQString xmlReleaseNotesLink,\n\t\t\t\t\t\t\t\t\t\tQString xmlPubDate,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureUrl,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureVersion,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosurePlatform,\n\t\t\t\t\t\t\t\t\t\tunsigned long xmlEnclosureLength,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureType)", "parent": 356, "children": [359, 362, 365, 368, 371, 374, 377, 380, 385], "start_point": {"row": 146, "column": 36}, "end_point": {"row": 154, "column": 35}}, {"id": 359, "type": "parameter_declaration", "text": "QString xmlTitle", "parent": 358, "children": [360, 361], "start_point": {"row": 146, "column": 37}, "end_point": {"row": 146, "column": 53}}, {"id": 360, "type": "type_identifier", "text": "QString", "parent": 359, "children": [], "start_point": {"row": 146, "column": 37}, "end_point": {"row": 146, "column": 44}}, {"id": 361, "type": "identifier", "text": "xmlTitle", "parent": 359, "children": [], "start_point": {"row": 146, "column": 45}, "end_point": {"row": 146, "column": 53}}, {"id": 362, "type": "parameter_declaration", "text": "QString xmlLink", "parent": 358, "children": [363, 364], "start_point": {"row": 147, "column": 10}, "end_point": {"row": 147, "column": 25}}, {"id": 363, "type": "type_identifier", "text": "QString", "parent": 362, "children": [], "start_point": {"row": 147, "column": 10}, "end_point": {"row": 147, "column": 17}}, {"id": 364, "type": "identifier", "text": "xmlLink", "parent": 362, "children": [], "start_point": {"row": 147, "column": 18}, "end_point": {"row": 147, "column": 25}}, {"id": 365, "type": "parameter_declaration", "text": "QString xmlReleaseNotesLink", "parent": 358, "children": [366, 367], "start_point": {"row": 148, "column": 10}, "end_point": {"row": 148, "column": 37}}, {"id": 366, "type": "type_identifier", "text": "QString", "parent": 365, "children": [], "start_point": {"row": 148, "column": 10}, "end_point": {"row": 148, "column": 17}}, {"id": 367, "type": "identifier", "text": "xmlReleaseNotesLink", "parent": 365, "children": [], "start_point": {"row": 148, "column": 18}, "end_point": {"row": 148, "column": 37}}, {"id": 368, "type": "parameter_declaration", "text": "QString xmlPubDate", "parent": 358, "children": [369, 370], "start_point": {"row": 149, "column": 10}, "end_point": {"row": 149, "column": 28}}, {"id": 369, "type": "type_identifier", "text": "QString", "parent": 368, "children": [], "start_point": {"row": 149, "column": 10}, "end_point": {"row": 149, "column": 17}}, {"id": 370, "type": "identifier", "text": "xmlPubDate", "parent": 368, "children": [], "start_point": {"row": 149, "column": 18}, "end_point": {"row": 149, "column": 28}}, {"id": 371, "type": "parameter_declaration", "text": "QString xmlEnclosureUrl", "parent": 358, "children": [372, 373], "start_point": {"row": 150, "column": 10}, "end_point": {"row": 150, "column": 33}}, {"id": 372, "type": "type_identifier", "text": "QString", "parent": 371, "children": [], "start_point": {"row": 150, "column": 10}, "end_point": {"row": 150, "column": 17}}, {"id": 373, "type": "identifier", "text": "xmlEnclosureUrl", "parent": 371, "children": [], "start_point": {"row": 150, "column": 18}, "end_point": {"row": 150, "column": 33}}, {"id": 374, "type": "parameter_declaration", "text": "QString xmlEnclosureVersion", "parent": 358, "children": [375, 376], "start_point": {"row": 151, "column": 10}, "end_point": {"row": 151, "column": 37}}, {"id": 375, "type": "type_identifier", "text": "QString", "parent": 374, "children": [], "start_point": {"row": 151, "column": 10}, "end_point": {"row": 151, "column": 17}}, {"id": 376, "type": "identifier", "text": "xmlEnclosureVersion", "parent": 374, "children": [], "start_point": {"row": 151, "column": 18}, "end_point": {"row": 151, "column": 37}}, {"id": 377, "type": "parameter_declaration", "text": "QString xmlEnclosurePlatform", "parent": 358, "children": [378, 379], "start_point": {"row": 152, "column": 10}, "end_point": {"row": 152, "column": 38}}, {"id": 378, "type": "type_identifier", "text": "QString", "parent": 377, "children": [], "start_point": {"row": 152, "column": 10}, "end_point": {"row": 152, "column": 17}}, {"id": 379, "type": "identifier", "text": "xmlEnclosurePlatform", "parent": 377, "children": [], "start_point": {"row": 152, "column": 18}, "end_point": {"row": 152, "column": 38}}, {"id": 380, "type": "parameter_declaration", "text": "unsigned long xmlEnclosureLength", "parent": 358, "children": [381, 384], "start_point": {"row": 153, "column": 10}, "end_point": {"row": 153, "column": 42}}, {"id": 381, "type": "sized_type_specifier", "text": "unsigned long", "parent": 380, "children": [382, 383], "start_point": {"row": 153, "column": 10}, "end_point": {"row": 153, "column": 23}}, {"id": 382, "type": "unsigned", "text": "unsigned", "parent": 381, "children": [], "start_point": {"row": 153, "column": 10}, "end_point": {"row": 153, "column": 18}}, {"id": 383, "type": "long", "text": "long", "parent": 381, "children": [], "start_point": {"row": 153, "column": 19}, "end_point": {"row": 153, "column": 23}}, {"id": 384, "type": "identifier", "text": "xmlEnclosureLength", "parent": 380, "children": [], "start_point": {"row": 153, "column": 24}, "end_point": {"row": 153, "column": 42}}, {"id": 385, "type": "parameter_declaration", "text": "QString xmlEnclosureType", "parent": 358, "children": [386, 387], "start_point": {"row": 154, "column": 10}, "end_point": {"row": 154, "column": 34}}, {"id": 386, "type": "type_identifier", "text": "QString", "parent": 385, "children": [], "start_point": {"row": 154, "column": 10}, "end_point": {"row": 154, "column": 17}}, {"id": 387, "type": "identifier", "text": "xmlEnclosureType", "parent": 385, "children": [], "start_point": {"row": 154, "column": 18}, "end_point": {"row": 154, "column": 34}}, {"id": 388, "type": "declaration", "text": "void installTranslator();", "parent": 29, "children": [389, 390], "start_point": {"row": 160, "column": 1}, "end_point": {"row": 160, "column": 26}}, {"id": 389, "type": "primitive_type", "text": "void", "parent": 388, "children": [], "start_point": {"row": 160, "column": 1}, "end_point": {"row": 160, "column": 5}}, {"id": 390, "type": "function_declarator", "text": "installTranslator()", "parent": 388, "children": [391, 392], "start_point": {"row": 160, "column": 6}, "end_point": {"row": 160, "column": 25}}, {"id": 391, "type": "identifier", "text": "installTranslator", "parent": 390, "children": [], "start_point": {"row": 160, "column": 6}, "end_point": {"row": 160, "column": 23}}, {"id": 392, "type": "parameter_list", "text": "()", "parent": 390, "children": [], "start_point": {"row": 160, "column": 23}, "end_point": {"row": 160, "column": 25}}, {"id": 393, "type": "declaration", "text": "void restartApplication();", "parent": 29, "children": [394, 395], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 27}}, {"id": 394, "type": "primitive_type", "text": "void", "parent": 393, "children": [], "start_point": {"row": 161, "column": 1}, "end_point": {"row": 161, "column": 5}}, {"id": 395, "type": "function_declarator", "text": "restartApplication()", "parent": 393, "children": [396, 397], "start_point": {"row": 161, "column": 6}, "end_point": {"row": 161, "column": 26}}, {"id": 396, "type": "identifier", "text": "restartApplication", "parent": 395, "children": [], "start_point": {"row": 161, "column": 6}, "end_point": {"row": 161, "column": 24}}, {"id": 397, "type": "parameter_list", "text": "()", "parent": 395, "children": [], "start_point": {"row": 161, "column": 24}, "end_point": {"row": 161, "column": 26}}, {"id": 398, "type": "ERROR", "text": "private slots:", "parent": 29, "children": [399], "start_point": {"row": 163, "column": 0}, "end_point": {"row": 163, "column": 14}}, {"id": 399, "type": "identifier", "text": "slots", "parent": 398, "children": [], "start_point": {"row": 163, "column": 8}, "end_point": {"row": 163, "column": 13}}, {"id": 400, "type": "declaration", "text": "void authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator );", "parent": 29, "children": [401, 402], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 87}}, {"id": 401, "type": "primitive_type", "text": "void", "parent": 400, "children": [], "start_point": {"row": 165, "column": 1}, "end_point": {"row": 165, "column": 5}}, {"id": 402, "type": "function_declarator", "text": "authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator )", "parent": 400, "children": [403, 404], "start_point": {"row": 165, "column": 6}, "end_point": {"row": 165, "column": 86}}, {"id": 403, "type": "identifier", "text": "authenticationRequired", "parent": 402, "children": [], "start_point": {"row": 165, "column": 6}, "end_point": {"row": 165, "column": 28}}, {"id": 404, "type": "parameter_list", "text": "( QNetworkReply * reply, QAuthenticator * authenticator )", "parent": 402, "children": [405, 410], "start_point": {"row": 165, "column": 29}, "end_point": {"row": 165, "column": 86}}, {"id": 405, "type": "parameter_declaration", "text": "QNetworkReply * reply", "parent": 404, "children": [406, 407], "start_point": {"row": 165, "column": 31}, "end_point": {"row": 165, "column": 52}}, {"id": 406, "type": "type_identifier", "text": "QNetworkReply", "parent": 405, "children": [], "start_point": {"row": 165, "column": 31}, "end_point": {"row": 165, "column": 44}}, {"id": 407, "type": "pointer_declarator", "text": "* reply", "parent": 405, "children": [408, 409], "start_point": {"row": 165, "column": 45}, "end_point": {"row": 165, "column": 52}}, {"id": 408, "type": "*", "text": "*", "parent": 407, "children": [], "start_point": {"row": 165, "column": 45}, "end_point": {"row": 165, "column": 46}}, {"id": 409, "type": "identifier", "text": "reply", "parent": 407, "children": [], "start_point": {"row": 165, "column": 47}, "end_point": {"row": 165, "column": 52}}, {"id": 410, "type": "parameter_declaration", "text": "QAuthenticator * authenticator", "parent": 404, "children": [411, 412], "start_point": {"row": 165, "column": 54}, "end_point": {"row": 165, "column": 84}}, {"id": 411, "type": "type_identifier", "text": "QAuthenticator", "parent": 410, "children": [], "start_point": {"row": 165, "column": 54}, "end_point": {"row": 165, "column": 68}}, {"id": 412, "type": "pointer_declarator", "text": "* authenticator", "parent": 410, "children": [413, 414], "start_point": {"row": 165, "column": 69}, "end_point": {"row": 165, "column": 84}}, {"id": 413, "type": "*", "text": "*", "parent": 412, "children": [], "start_point": {"row": 165, "column": 69}, "end_point": {"row": 165, "column": 70}}, {"id": 414, "type": "identifier", "text": "authenticator", "parent": 412, "children": [], "start_point": {"row": 165, "column": 71}, "end_point": {"row": 165, "column": 84}}, {"id": 415, "type": "declaration", "text": "void httpFeedReadyRead();", "parent": 29, "children": [416, 417], "start_point": {"row": 166, "column": 1}, "end_point": {"row": 166, "column": 26}}, {"id": 416, "type": "primitive_type", "text": "void", "parent": 415, "children": [], "start_point": {"row": 166, "column": 1}, "end_point": {"row": 166, "column": 5}}, {"id": 417, "type": "function_declarator", "text": "httpFeedReadyRead()", "parent": 415, "children": [418, 419], "start_point": {"row": 166, "column": 6}, "end_point": {"row": 166, "column": 25}}, {"id": 418, "type": "identifier", "text": "httpFeedReadyRead", "parent": 417, "children": [], "start_point": {"row": 166, "column": 6}, "end_point": {"row": 166, "column": 23}}, {"id": 419, "type": "parameter_list", "text": "()", "parent": 417, "children": [], "start_point": {"row": 166, "column": 23}, "end_point": {"row": 166, "column": 25}}, {"id": 420, "type": "declaration", "text": "void httpFeedUpdateDataReadProgress(qint64 bytesRead,\n\t\t\t\t\t\t\t\t\t\tqint64 totalBytes);", "parent": 29, "children": [421, 422], "start_point": {"row": 167, "column": 1}, "end_point": {"row": 168, "column": 29}}, {"id": 421, "type": "primitive_type", "text": "void", "parent": 420, "children": [], "start_point": {"row": 167, "column": 1}, "end_point": {"row": 167, "column": 5}}, {"id": 422, "type": "function_declarator", "text": "httpFeedUpdateDataReadProgress(qint64 bytesRead,\n\t\t\t\t\t\t\t\t\t\tqint64 totalBytes)", "parent": 420, "children": [423, 424], "start_point": {"row": 167, "column": 6}, "end_point": {"row": 168, "column": 28}}, {"id": 423, "type": "identifier", "text": "httpFeedUpdateDataReadProgress", "parent": 422, "children": [], "start_point": {"row": 167, "column": 6}, "end_point": {"row": 167, "column": 36}}, {"id": 424, "type": "parameter_list", "text": "(qint64 bytesRead,\n\t\t\t\t\t\t\t\t\t\tqint64 totalBytes)", "parent": 422, "children": [425, 428], "start_point": {"row": 167, "column": 36}, "end_point": {"row": 168, "column": 28}}, {"id": 425, "type": "parameter_declaration", "text": "qint64 bytesRead", "parent": 424, "children": [426, 427], "start_point": {"row": 167, "column": 37}, "end_point": {"row": 167, "column": 53}}, {"id": 426, "type": "type_identifier", "text": "qint64", "parent": 425, "children": [], "start_point": {"row": 167, "column": 37}, "end_point": {"row": 167, "column": 43}}, {"id": 427, "type": "identifier", "text": "bytesRead", "parent": 425, "children": [], "start_point": {"row": 167, "column": 44}, "end_point": {"row": 167, "column": 53}}, {"id": 428, "type": "parameter_declaration", "text": "qint64 totalBytes", "parent": 424, "children": [429, 430], "start_point": {"row": 168, "column": 10}, "end_point": {"row": 168, "column": 27}}, {"id": 429, "type": "type_identifier", "text": "qint64", "parent": 428, "children": [], "start_point": {"row": 168, "column": 10}, "end_point": {"row": 168, "column": 16}}, {"id": 430, "type": "identifier", "text": "totalBytes", "parent": 428, "children": [], "start_point": {"row": 168, "column": 17}, "end_point": {"row": 168, "column": 27}}, {"id": 431, "type": "declaration", "text": "void httpFeedDownloadFinished();", "parent": 29, "children": [432, 433], "start_point": {"row": 169, "column": 1}, "end_point": {"row": 169, "column": 33}}, {"id": 432, "type": "primitive_type", "text": "void", "parent": 431, "children": [], "start_point": {"row": 169, "column": 1}, "end_point": {"row": 169, "column": 5}}, {"id": 433, "type": "function_declarator", "text": "httpFeedDownloadFinished()", "parent": 431, "children": [434, 435], "start_point": {"row": 169, "column": 6}, "end_point": {"row": 169, "column": 32}}, {"id": 434, "type": "identifier", "text": "httpFeedDownloadFinished", "parent": 433, "children": [], "start_point": {"row": 169, "column": 6}, "end_point": {"row": 169, "column": 30}}, {"id": 435, "type": "parameter_list", "text": "()", "parent": 433, "children": [], "start_point": {"row": 169, "column": 30}, "end_point": {"row": 169, "column": 32}}, {"id": 436, "type": "declaration", "text": "void httpUpdateDownloadFinished();", "parent": 29, "children": [437, 438], "start_point": {"row": 174, "column": 1}, "end_point": {"row": 174, "column": 35}}, {"id": 437, "type": "primitive_type", "text": "void", "parent": 436, "children": [], "start_point": {"row": 174, "column": 1}, "end_point": {"row": 174, "column": 5}}, {"id": 438, "type": "function_declarator", "text": "httpUpdateDownloadFinished()", "parent": 436, "children": [439, 440], "start_point": {"row": 174, "column": 6}, "end_point": {"row": 174, "column": 34}}, {"id": 439, "type": "identifier", "text": "httpUpdateDownloadFinished", "parent": 438, "children": [], "start_point": {"row": 174, "column": 6}, "end_point": {"row": 174, "column": 32}}, {"id": 440, "type": "parameter_list", "text": "()", "parent": 438, "children": [], "start_point": {"row": 174, "column": 32}, "end_point": {"row": 174, "column": 34}}, {"id": 441, "type": "declaration", "text": "bool unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName = QString(\"\"));", "parent": 29, "children": [442, 443], "start_point": {"row": 175, "column": 1}, "end_point": {"row": 175, "column": 118}}, {"id": 442, "type": "primitive_type", "text": "bool", "parent": 441, "children": [], "start_point": {"row": 175, "column": 1}, "end_point": {"row": 175, "column": 5}}, {"id": 443, "type": "init_declarator", "text": "unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName = QString(\"\")", "parent": 441, "children": [444, 456, 457], "start_point": {"row": 175, "column": 6}, "end_point": {"row": 175, "column": 116}}, {"id": 444, "type": "function_declarator", "text": "unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName", "parent": 443, "children": [445, 446], "start_point": {"row": 175, "column": 6}, "end_point": {"row": 175, "column": 102}}, {"id": 445, "type": "identifier", "text": "unzipUpdate", "parent": 444, "children": [], "start_point": {"row": 175, "column": 6}, "end_point": {"row": 175, "column": 17}}, {"id": 446, "type": "parameter_list", "text": "(const QString & filePath, const QString & extDirPath, const QString & singleFileName", "parent": 444, "children": [447, 450, 453], "start_point": {"row": 175, "column": 17}, "end_point": {"row": 175, "column": 102}}, {"id": 447, "type": "parameter_declaration", "text": "const QString & filePath", "parent": 446, "children": [448, 449], "start_point": {"row": 175, "column": 18}, "end_point": {"row": 175, "column": 42}}, {"id": 448, "type": "type_identifier", "text": "QString", "parent": 447, "children": [], "start_point": {"row": 175, "column": 24}, "end_point": {"row": 175, "column": 31}}, {"id": 449, "type": "identifier", "text": "filePath", "parent": 447, "children": [], "start_point": {"row": 175, "column": 34}, "end_point": {"row": 175, "column": 42}}, {"id": 450, "type": "parameter_declaration", "text": "const QString & extDirPath", "parent": 446, "children": [451, 452], "start_point": {"row": 175, "column": 44}, "end_point": {"row": 175, "column": 70}}, {"id": 451, "type": "type_identifier", "text": "QString", "parent": 450, "children": [], "start_point": {"row": 175, "column": 50}, "end_point": {"row": 175, "column": 57}}, {"id": 452, "type": "identifier", "text": "extDirPath", "parent": 450, "children": [], "start_point": {"row": 175, "column": 60}, "end_point": {"row": 175, "column": 70}}, {"id": 453, "type": "parameter_declaration", "text": "const QString & singleFileName", "parent": 446, "children": [454, 455], "start_point": {"row": 175, "column": 72}, "end_point": {"row": 175, "column": 102}}, {"id": 454, "type": "type_identifier", "text": "QString", "parent": 453, "children": [], "start_point": {"row": 175, "column": 78}, "end_point": {"row": 175, "column": 85}}, {"id": 455, "type": "identifier", "text": "singleFileName", "parent": 453, "children": [], "start_point": {"row": 175, "column": 88}, "end_point": {"row": 175, "column": 102}}, {"id": 456, "type": "=", "text": "=", "parent": 443, "children": [], "start_point": {"row": 175, "column": 103}, "end_point": {"row": 175, "column": 104}}, {"id": 457, "type": "call_expression", "text": "QString(\"\")", "parent": 443, "children": [458, 459], "start_point": {"row": 175, "column": 105}, "end_point": {"row": 175, "column": 116}}, {"id": 458, "type": "identifier", "text": "QString", "parent": 457, "children": [], "start_point": {"row": 175, "column": 105}, "end_point": {"row": 175, "column": 112}}, {"id": 459, "type": "argument_list", "text": "(\"\")", "parent": 457, "children": [460], "start_point": {"row": 175, "column": 112}, "end_point": {"row": 175, "column": 116}}, {"id": 460, "type": "string_literal", "text": "\"\"", "parent": 459, "children": [], "start_point": {"row": 175, "column": 113}, "end_point": {"row": 175, "column": 115}}, {"id": 461, "type": "labeled_statement", "text": "signals:\n\tvoid updatedFinishedSuccessfully();", "parent": 29, "children": [462, 463], "start_point": {"row": 177, "column": 0}, "end_point": {"row": 178, "column": 36}}, {"id": 462, "type": "statement_identifier", "text": "signals", "parent": 461, "children": [], "start_point": {"row": 177, "column": 0}, "end_point": {"row": 177, "column": 7}}, {"id": 463, "type": "declaration", "text": "void updatedFinishedSuccessfully();", "parent": 461, "children": [464, 465], "start_point": {"row": 178, "column": 1}, "end_point": {"row": 178, "column": 36}}, {"id": 464, "type": "primitive_type", "text": "void", "parent": 463, "children": [], "start_point": {"row": 178, "column": 1}, "end_point": {"row": 178, "column": 5}}, {"id": 465, "type": "function_declarator", "text": "updatedFinishedSuccessfully()", "parent": 463, "children": [466, 467], "start_point": {"row": 178, "column": 6}, "end_point": {"row": 178, "column": 35}}, {"id": 466, "type": "identifier", "text": "updatedFinishedSuccessfully", "parent": 465, "children": [], "start_point": {"row": 178, "column": 6}, "end_point": {"row": 178, "column": 33}}, {"id": 467, "type": "parameter_list", "text": "()", "parent": 465, "children": [], "start_point": {"row": 178, "column": 33}, "end_point": {"row": 178, "column": 35}}, {"id": 468, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 182, "column": 0}, "end_point": {"row": 182, "column": 6}}]}, "node_categories": {"declarations": {"functions": [29, 39, 44, 49, 57, 65, 71, 81, 89, 94, 105, 113, 121, 129, 137, 142, 150, 160, 165, 179, 186, 191, 196, 236, 241, 246, 253, 274, 288, 318, 326, 334, 351, 356, 390, 395, 402, 417, 422, 433, 438, 444, 465], "variables": [21, 23, 25, 27, 35, 42, 47, 52, 55, 60, 63, 68, 74, 79, 84, 87, 92, 97, 100, 103, 108, 111, 116, 119, 124, 127, 132, 135, 140, 147, 153, 158, 163, 169, 172, 175, 184, 189, 194, 221, 229, 234, 239, 244, 251, 257, 262, 265, 268, 271, 277, 280, 285, 291, 294, 299, 302, 305, 310, 313, 316, 321, 324, 329, 332, 337, 340, 343, 346, 349, 354, 359, 362, 365, 368, 371, 374, 377, 380, 385, 388, 393, 400, 405, 410, 415, 420, 425, 428, 431, 436, 441, 447, 450, 453, 463], "classes": [], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19], "modules": [], "enums": []}, "statements": {"expressions": [200, 203, 205, 212, 217, 457], "assignments": [214], "loops": [], "conditionals": [0, 1, 2, 5, 22, 24, 26, 28, 30, 32, 34, 36, 40, 45, 50, 53, 54, 58, 61, 62, 64, 66, 72, 75, 76, 82, 85, 86, 88, 90, 95, 98, 99, 101, 102, 106, 109, 110, 114, 117, 118, 122, 126, 130, 134, 138, 143, 146, 151, 155, 161, 166, 170, 171, 173, 174, 176, 180, 183, 187, 192, 197, 201, 206, 208, 209, 211, 213, 215, 219, 220, 222, 225, 226, 227, 228, 230, 233, 237, 242, 247, 254, 256, 258, 261, 264, 267, 270, 275, 278, 279, 282, 289, 292, 293, 296, 300, 301, 303, 304, 306, 309, 312, 315, 319, 322, 323, 327, 330, 331, 335, 338, 339, 341, 342, 344, 345, 347, 348, 352, 357, 360, 361, 363, 364, 366, 367, 369, 370, 372, 373, 375, 376, 378, 379, 381, 384, 386, 387, 391, 396, 399, 403, 406, 409, 411, 414, 418, 423, 426, 427, 429, 430, 434, 439, 445, 448, 449, 451, 452, 454, 455, 458, 462, 466, 468], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 78, 460], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 29, "universal_type": "function", "name": "FvUpdater", "text_snippet": "class FvUpdater : public QObject\n{\n\tQ_OBJECT\n\npublic:\n\n\t// Singleton\n\tstatic FvUpdater* sharedUpdate"}, {"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "sharedUpdater()"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "drop()"}, {"node_id": 49, "universal_type": "function", "name": "unknown", "text_snippet": "SetFeedURL(QUrl feedURL)"}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "SetFeedURL(QString feedURL)"}, {"node_id": 65, "universal_type": "function", "name": "unknown", "text_snippet": "GetFeedURL()"}, {"node_id": 71, "universal_type": "function", "name": "unknown", "text_snippet": "finishUpdate(QString pathToFinish"}, {"node_id": 81, "universal_type": "function", "name": "unknown", "text_snippet": "setRequiredSslFingerPrint(QString md5)"}, {"node_id": 89, "universal_type": "function", "name": "unknown", "text_snippet": "getRequiredSslFingerPrint()"}, {"node_id": 94, "universal_type": "function", "name": "unknown", "text_snippet": "setHtAuthCredentials(QString user, QString pass)"}, {"node_id": 105, "universal_type": "function", "name": "unknown", "text_snippet": "setHtAuthUsername(QString user)"}, {"node_id": 113, "universal_type": "function", "name": "unknown", "text_snippet": "setHtAuthPassword(QString pass)"}, {"node_id": 121, "universal_type": "function", "name": "unknown", "text_snippet": "setSkipVersionAllowed(bool allowed)"}, {"node_id": 129, "universal_type": "function", "name": "unknown", "text_snippet": "setRemindLaterAllowed(bool allowed)"}, {"node_id": 137, "universal_type": "function", "name": "unknown", "text_snippet": "getSkipVersionAllowed()"}, {"node_id": 142, "universal_type": "function", "name": "unknown", "text_snippet": "getRemindLaterAllowed()"}, {"node_id": 150, "universal_type": "function", "name": "unknown", "text_snippet": "CheckForUpdates(bool silentAsMuchAsItCouldGet"}, {"node_id": 160, "universal_type": "function", "name": "unknown", "text_snippet": "CheckForUpdatesSilent()"}, {"node_id": 165, "universal_type": "function", "name": "unknown", "text_snippet": "CheckForUpdatesNotSilent()"}, {"node_id": 179, "universal_type": "function", "name": "unknown", "text_snippet": "GetProposedUpdate()"}, {"node_id": 186, "universal_type": "function", "name": "unknown", "text_snippet": "InstallUpdate()"}, {"node_id": 191, "universal_type": "function", "name": "unknown", "text_snippet": "SkipUpdate()"}, {"node_id": 196, "universal_type": "function", "name": "unknown", "text_snippet": "RemindMeLater()"}, {"node_id": 236, "universal_type": "function", "name": "unknown", "text_snippet": "showUpdaterWindowUpdatedWithCurrentUpdateProposal()"}, {"node_id": 241, "universal_type": "function", "name": "unknown", "text_snippet": "hideUpdaterWindow()"}, {"node_id": 246, "universal_type": "function", "name": "unknown", "text_snippet": "updaterWindowWasClosed()"}, {"node_id": 253, "universal_type": "function", "name": "unknown", "text_snippet": "decideWhatToDoWithCurrentUpdateProposal()"}, {"node_id": 274, "universal_type": "function", "name": "showEvenInSilentMode", "text_snippet": "showErrorDialog(QString message, bool showEvenInSilentMode"}, {"node_id": 288, "universal_type": "function", "name": "showEvenInSilentMode", "text_snippet": "showInformationDialog(QString message, bool showEvenInSilentMode"}, {"node_id": 318, "universal_type": "function", "name": "unknown", "text_snippet": "startDownloadFeed(QUrl url)"}, {"node_id": 326, "universal_type": "function", "name": "unknown", "text_snippet": "cancelDownloadFeed()"}, {"node_id": 334, "universal_type": "function", "name": "unknown", "text_snippet": "checkSslFingerPrint(QUrl urltoCheck)"}, {"node_id": 351, "universal_type": "function", "name": "unknown", "text_snippet": "xmlParseFeed()"}, {"node_id": 356, "universal_type": "function", "name": "unknown", "text_snippet": "searchDownloadedFeedForUpdates(QString xmlTitle,\n\t\t\t\t\t\t\t\t\t\tQString xmlLink,\n\t\t\t\t\t\t\t\t\t\tQString xmlRel"}, {"node_id": 390, "universal_type": "function", "name": "unknown", "text_snippet": "installTranslator()"}, {"node_id": 395, "universal_type": "function", "name": "unknown", "text_snippet": "restartApplication()"}, {"node_id": 402, "universal_type": "function", "name": "unknown", "text_snippet": "authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator )"}, {"node_id": 417, "universal_type": "function", "name": "unknown", "text_snippet": "httpFeedReadyRead()"}, {"node_id": 422, "universal_type": "function", "name": "unknown", "text_snippet": "httpFeedUpdateDataReadProgress(qint64 bytesRead,\n\t\t\t\t\t\t\t\t\t\tqint64 totalBytes)"}, {"node_id": 433, "universal_type": "function", "name": "unknown", "text_snippet": "httpFeedDownloadFinished()"}, {"node_id": 438, "universal_type": "function", "name": "unknown", "text_snippet": "httpUpdateDownloadFinished()"}, {"node_id": 444, "universal_type": "function", "name": "unknown", "text_snippet": "unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName"}, {"node_id": 465, "universal_type": "function", "name": "unknown", "text_snippet": "updatedFinishedSuccessfully()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <QObject>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <QMutex>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <QNetworkAccessManager>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <QUrl>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <QXmlStreamReader>\n"}, {"node_id": 19, "text": "#include"}]}, "original_source_code": "#ifndef FVUPDATER_H\n#define FVUPDATER_H\n\n#include <QObject>\n#include <QMutex>\n#include <QNetworkAccessManager>\n#include <QUrl>\n#include <QXmlStreamReader>\nclass QNetworkReply;\nclass FvUpdateWindow;\nclass FvUpdateConfirmDialog;\nclass FvAvailableUpdate;\n\n\nclass FvUpdater : public QObject\n{\n\tQ_OBJECT\n\npublic:\n\n\t// Singleton\n\tstatic FvUpdater* sharedUpdater();\n\tstatic void drop();\n\n\t// Set / get feed URL\n\tvoid SetFeedURL(QUrl feedURL);\n\tvoid SetFeedURL(QString feedURL);\n\tQString GetFeedURL();\n\tvoid finishUpdate(QString pathToFinish = \"\");\n\tvoid setRequiredSslFingerPrint(QString md5);\n\tQString getRequiredSslFingerPrint();\t// returns md5!\n\t// HTTP Authentuication - for security reasons no getters are provided, only a setter\n\tvoid setHtAuthCredentials(QString user, QString pass);\n\tvoid setHtAuthUsername(QString user);\n\tvoid setHtAuthPassword(QString pass);\n\tvoid setSkipVersionAllowed(bool allowed);\n\tvoid setRemindLaterAllowed(bool allowed);\n\tbool getSkipVersionAllowed();\n\tbool getRemindLaterAllowed();\n\n\t\npublic slots:\n\n\t// Check for updates\n\tbool CheckForUpdates(bool silentAsMuchAsItCouldGet = true);\n\n\t// Aliases\n\tbool CheckForUpdatesSilent();\n\tbool CheckForUpdatesNotSilent();\n\n\n\t//\n\t// ---------------------------------------------------\n\t// ---------------------------------------------------\n\t// ---------------------------------------------------\n\t// ---------------------------------------------------\n\t//\n\nprotected:\n\n\tfriend class FvUpdateWindow;\t\t// Uses GetProposedUpdate() and others\n\tfriend class FvUpdateConfirmDialog;\t// Uses GetProposedUpdate() and others\n\tFvAvailableUpdate* GetProposedUpdate();\n\n\nprotected slots:\n\n\t// Update window button slots\n\tvoid InstallUpdate();\n\tvoid SkipUpdate();\n\tvoid RemindMeLater();\n\nprivate:\n\n\t//\n\t// Singleton business\n\t//\n\t// (we leave just the declarations, so the compiler will warn us if we try\n\t// to use those two functions by accident)\n\tFvUpdater();\t\t\t\t\t\t\t// Hide main constructor\n\t~FvUpdater();\t\t\t\t\t\t\t// Hide main destructor\n\tFvUpdater(const FvUpdater&);\t\t\t// Hide copy constructor\n\tFvUpdater& operator=(const FvUpdater&);\t// Hide assign op\n\n\tstatic FvUpdater* m_Instance;\t\t\t// Singleton instance\n\n\n\t//\n\t// Windows / dialogs\n\t//\n#ifdef FV_GUI\n\tFvUpdateWindow* m_updaterWindow;\t\t\t\t\t\t\t\t// Updater window (NULL if not shown)\n\tvoid showUpdaterWindowUpdatedWithCurrentUpdateProposal();\t\t// Show updater window\n\tvoid hideUpdaterWindow();\t\t\t\t\t\t\t\t\t\t// Hide + destroy m_updaterWindow\n\tvoid updaterWindowWasClosed();\t\t\t\t\t\t\t\t\t// Sent by the updater window when it gets closed\n#else\n\tvoid decideWhatToDoWithCurrentUpdateProposal(); // Perform an action which is configured in settings\n#endif\n\n\t// Available update (NULL if not fetched)\n\tFvAvailableUpdate* m_proposedUpdate;\n\n\t// If true, don't show the error dialogs and the \"no updates.\" dialog\n\t// (silentAsMuchAsItCouldGet from CheckForUpdates() goes here)\n\t// Useful for automatic update checking upon application startup.\n\tbool m_silentAsMuchAsItCouldGet;\n\n\t// Dialogs (notifications)\n\tbool skipVersionAllowed;\n\tbool remindLaterAllowed;\n\n\tvoid showErrorDialog(QString message, bool showEvenInSilentMode = false);\t\t\t// Show an error message\n\tvoid showInformationDialog(QString message, bool showEvenInSilentMode = false);\t\t// Show an informational message\n\n\n\t//\n\t// HTTP feed fetcher infrastructure\n\t//\n\tQUrl m_feedURL;\t\t\t\t\t// Feed URL that will be fetched\n\tQNetworkAccessManager m_qnam;\n\tQNetworkReply* m_reply;\n\tint m_httpGetId;\n\tbool m_httpRequestAborted;\n\n\tvoid startDownloadFeed(QUrl url);\t// Start downloading feed\n\tvoid cancelDownloadFeed();\t\t\t// Stop downloading the current feed\n\n\t//\n\t// SSL Fingerprint Check infrastructure\n\t//\n\tQString m_requiredSslFingerprint;\n\n\tbool checkSslFingerPrint(QUrl urltoCheck);\t// true=ssl Fingerprint accepted, false= ssl Fingerprint NOT accepted\n\n\t//\n\t// Htauth-Infrastructure\n\t//\n\tQString htAuthUsername;\n\tQString htAuthPassword;\n\n\n\t//\n\t// XML parser\n\t//\n\tQXmlStreamReader m_xml;\t\t\t\t// XML data collector and parser\n\tbool xmlParseFeed();\t\t\t\t// Parse feed in m_xml\n\tbool searchDownloadedFeedForUpdates(QString xmlTitle,\n\t\t\t\t\t\t\t\t\t\tQString xmlLink,\n\t\t\t\t\t\t\t\t\t\tQString xmlReleaseNotesLink,\n\t\t\t\t\t\t\t\t\t\tQString xmlPubDate,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureUrl,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureVersion,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosurePlatform,\n\t\t\t\t\t\t\t\t\t\tunsigned long xmlEnclosureLength,\n\t\t\t\t\t\t\t\t\t\tQString xmlEnclosureType);\n\n\n\t//\n\t// Helpers\n\t//\n\tvoid installTranslator();\t\t\t// Initialize translation mechanism\n\tvoid restartApplication();\t\t\t// Restarts application after update\n\nprivate slots:\n\n\tvoid authenticationRequired ( QNetworkReply * reply, QAuthenticator * authenticator );\n\tvoid httpFeedReadyRead();\n\tvoid httpFeedUpdateDataReadProgress(qint64 bytesRead,\n\t\t\t\t\t\t\t\t\t\tqint64 totalBytes);\n\tvoid httpFeedDownloadFinished();\n\n\t//\n\t// Download and install Update infrastructure\n\t//\n\tvoid httpUpdateDownloadFinished();\n\tbool unzipUpdate(const QString & filePath, const QString & extDirPath, const QString & singleFileName = QString(\"\"));\t// returns true on success\n\nsignals:\n\tvoid updatedFinishedSuccessfully();\n\n};\n\n#endif // FVUPDATER_H\n"}
68
c
// // precomp.h Precompiled header file for SymCrypt unit test // // Copyright (c) Microsoft Corporation. Licensed under the MIT license. // #define KERNEL_MODE
23.71
7
(translation_unit) "// \n// precomp.h Precompiled header file for SymCrypt unit test \n// \n// Copyright (c) Microsoft Corporation. Licensed under the MIT license. \n// \n \n#define KERNEL_MODE \n \n" (comment) "// " (comment) "// precomp.h Precompiled header file for SymCrypt unit test " (comment) "// " (comment) "// Copyright (c) Microsoft Corporation. Licensed under the MIT license. " (comment) "// " (preproc_def) "#define KERNEL_MODE \n" (#define) "#define" (identifier) "KERNEL_MODE"
9
0
{"language": "c", "success": true, "metadata": {"lines": 7, "avg_line_length": 23.71, "nodes": 3, "errors": 0, "source_hash": "a390028ddf0bb0f6028ddce86415cd8d05a7600a6034bd3813f8fc26fa303450", "categorized_nodes": 1}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_def", "text": "#define KERNEL_MODE\r\n", "parent": null, "children": [1, 2], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 1, "type": "#define", "text": "#define", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 7}}, {"id": 2, "type": "identifier", "text": "KERNEL_MODE", "parent": 0, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 19}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [2], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\r\n// precomp.h Precompiled header file for SymCrypt unit test \r\n//\r\n// Copyright (c) Microsoft Corporation. Licensed under the MIT license. \r\n//\r\n\r\n#define KERNEL_MODE\r\n\r\n"}
69
c
#ifndef NUMERICMATH #define NUMERICMATH #include "RandMath.h" /// Numerical procedures namespace RandMath { /** * @fn integral * @param funPtr integrand * @param a lower boundary * @param b upper boundary * @param epsilon tolerance * @param maxRecursionDepth how deep should the algorithm go * @return */ double integral(const std::function<double (double)> &funPtr, double a, double b, double epsilon = 1e-11, int maxRecursionDepth = 11); /** * @fn findRoot * Newton's root-finding procedure, * using first and second derivatives * @param funPtr mapping x |-> (f(x), f'(x), f''(x)) * @param root starting point in input and such x that f(x) = 0 in output * @param funTol function tolerance * @param stepTol step tolerance * @return true if success, false otherwise */ bool findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6); /** * @fn findRoot * Newton's root-finding procedure, * using first derivative * @param funPtr mapping x |-> (f(x), f'(x)) * @param root starting point in input and such x that f(x) = 0 in output * @param funTol function tolerance * @param stepTol step tolerance * @return true if success, false otherwise */ bool findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6); /** * @fn findRoot * Newton's root-finding procedure * for 2 functions of 2 parameters, * using Jacobian matrix * @param funPtr mapping x, y |-> (f(x, y), g(x, y)) * @param gradPtr x, y |-> (f_x(x, y), f_y(x, y), g_x(x, y)), g_y(x, y)) * @param root starting point in input and such x that f(x) = 0 in output * @param funTol function tolerance * @param stepTol step tolerance * @return true if success, false otherwise */ bool findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr, DoublePair & root, double funTol = 1e-10, double stepTol = 1e-6); /** * @fn findRoot * Brent's root-finding procedure * @param funPtr mapping x |-> f(x) * @param a lower boundary * @param b upper boundary * @param root starting point and such x that f(x) = 0 * @param epsilon tolerance * @return true if success, false otherwise */ bool findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon = 1e-8); /** * @fn findMin * Combined Brent's method * @param funPtr * @param abc lower boundary / middle / upper boundary * @param fabc funPtr(abc) * @param root such x that funPtr(x) is min * @param epsilon tolerance * @return true if success */ bool findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon = 1e-8); /** * @fn findMin * Combined Brent's method * @param funPtr * @param closePoint point that is nearby minimum * @param root such x that funPtr(x) is min * @param epsilon tolerance * @return true if success */ bool findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon = 1e-8); } #endif // NUMERICMATH
35.72
87
(translation_unit) "#ifndef NUMERICMATH\n#define NUMERICMATH\n\n#include "RandMath.h"\n\n/// Numerical procedures\n\nnamespace RandMath\n{\n\n/**\n * @fn integral\n * @param funPtr integrand\n * @param a lower boundary\n * @param b upper boundary\n * @param epsilon tolerance\n * @param maxRecursionDepth how deep should the algorithm go\n * @return\n */\ndouble integral(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon = 1e-11, int maxRecursionDepth = 11);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first and second derivatives\n * @param funPtr mapping x |-> (f(x), f'(x), f''(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first derivative\n * @param funPtr mapping x |-> (f(x), f'(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure\n * for 2 functions of 2 parameters,\n * using Jacobian matrix\n * @param funPtr mapping x, y |-> (f(x, y), g(x, y))\n * @param gradPtr x, y |-> (f_x(x, y), f_y(x, y), g_x(x, y)), g_y(x, y))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Brent's root-finding procedure\n * @param funPtr mapping x |-> f(x)\n * @param a lower boundary\n * @param b upper boundary\n * @param root starting point and such x that f(x) = 0\n * @param epsilon tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param abc lower boundary / middle / upper boundary\n * @param fabc funPtr(abc)\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param closePoint point that is nearby minimum\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon = 1e-8);\n\n}\n\n#endif // NUMERICMATH\n\n" (preproc_ifdef) "#ifndef NUMERICMATH\n#define NUMERICMATH\n\n#include "RandMath.h"\n\n/// Numerical procedures\n\nnamespace RandMath\n{\n\n/**\n * @fn integral\n * @param funPtr integrand\n * @param a lower boundary\n * @param b upper boundary\n * @param epsilon tolerance\n * @param maxRecursionDepth how deep should the algorithm go\n * @return\n */\ndouble integral(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon = 1e-11, int maxRecursionDepth = 11);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first and second derivatives\n * @param funPtr mapping x |-> (f(x), f'(x), f''(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first derivative\n * @param funPtr mapping x |-> (f(x), f'(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure\n * for 2 functions of 2 parameters,\n * using Jacobian matrix\n * @param funPtr mapping x, y |-> (f(x, y), g(x, y))\n * @param gradPtr x, y |-> (f_x(x, y), f_y(x, y), g_x(x, y)), g_y(x, y))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Brent's root-finding procedure\n * @param funPtr mapping x |-> f(x)\n * @param a lower boundary\n * @param b upper boundary\n * @param root starting point and such x that f(x) = 0\n * @param epsilon tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param abc lower boundary / middle / upper boundary\n * @param fabc funPtr(abc)\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param closePoint point that is nearby minimum\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon = 1e-8);\n\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "NUMERICMATH" (preproc_def) "#define NUMERICMATH\n" (#define) "#define" (identifier) "NUMERICMATH" (preproc_include) "#include "RandMath.h"\n" (#include) "#include" (string_literal) ""RandMath.h"" (") """ (string_content) "RandMath.h" (") """ (comment) "/// Numerical procedures" (function_definition) "namespace RandMath\n{\n\n/**\n * @fn integral\n * @param funPtr integrand\n * @param a lower boundary\n * @param b upper boundary\n * @param epsilon tolerance\n * @param maxRecursionDepth how deep should the algorithm go\n * @return\n */\ndouble integral(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon = 1e-11, int maxRecursionDepth = 11);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first and second derivatives\n * @param funPtr mapping x |-> (f(x), f'(x), f''(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first derivative\n * @param funPtr mapping x |-> (f(x), f'(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure\n * for 2 functions of 2 parameters,\n * using Jacobian matrix\n * @param funPtr mapping x, y |-> (f(x, y), g(x, y))\n * @param gradPtr x, y |-> (f_x(x, y), f_y(x, y), g_x(x, y)), g_y(x, y))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Brent's root-finding procedure\n * @param funPtr mapping x |-> f(x)\n * @param a lower boundary\n * @param b upper boundary\n * @param root starting point and such x that f(x) = 0\n * @param epsilon tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param abc lower boundary / middle / upper boundary\n * @param fabc funPtr(abc)\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param closePoint point that is nearby minimum\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon = 1e-8);\n\n}" (type_identifier) "namespace" (identifier) "RandMath" (compound_statement) "{\n\n/**\n * @fn integral\n * @param funPtr integrand\n * @param a lower boundary\n * @param b upper boundary\n * @param epsilon tolerance\n * @param maxRecursionDepth how deep should the algorithm go\n * @return\n */\ndouble integral(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon = 1e-11, int maxRecursionDepth = 11);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first and second derivatives\n * @param funPtr mapping x |-> (f(x), f'(x), f''(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first derivative\n * @param funPtr mapping x |-> (f(x), f'(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure\n * for 2 functions of 2 parameters,\n * using Jacobian matrix\n * @param funPtr mapping x, y |-> (f(x, y), g(x, y))\n * @param gradPtr x, y |-> (f_x(x, y), f_y(x, y), g_x(x, y)), g_y(x, y))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Brent's root-finding procedure\n * @param funPtr mapping x |-> f(x)\n * @param a lower boundary\n * @param b upper boundary\n * @param root starting point and such x that f(x) = 0\n * @param epsilon tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param abc lower boundary / middle / upper boundary\n * @param fabc funPtr(abc)\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param closePoint point that is nearby minimum\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon = 1e-8);\n\n}" ({) "{" (comment) "/**\n * @fn integral\n * @param funPtr integrand\n * @param a lower boundary\n * @param b upper boundary\n * @param epsilon tolerance\n * @param maxRecursionDepth how deep should the algorithm go\n * @return\n */" (declaration) "double integral(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon = 1e-11, int maxRecursionDepth = 11);" (primitive_type) "double" (init_declarator) "integral(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon = 1e-11" (function_declarator) "integral(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon" (identifier) "integral" (parameter_list) "(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon" (() "(" (parameter_declaration) "const std::function<double (double)> &funPtr" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::" (:) ":" (:) ":" (function_declarator) "function<double (double)> &funPtr" (identifier) "function" (ERROR) "<double" (<) "<" (primitive_type) "double" (parameter_list) "(double)" (() "(" (parameter_declaration) "double" (primitive_type) "double" ()) ")" (ERROR) "> &" (>) ">" (&) "&" (identifier) "funPtr" (,) "," (parameter_declaration) "double a" (primitive_type) "double" (identifier) "a" (,) "," (parameter_declaration) "double b" (primitive_type) "double" (identifier) "b" (,) "," (parameter_declaration) "double epsilon" (primitive_type) "double" (identifier) "epsilon" ()) "" (=) "=" (number_literal) "1e-11" (,) "," (ERROR) "int" (identifier) "int" (init_declarator) "maxRecursionDepth = 11" (identifier) "maxRecursionDepth" (=) "=" (number_literal) "11" (ERROR) ")" ()) ")" (;) ";" (comment) "/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first and second derivatives\n * @param funPtr mapping x |-> (f(x), f'(x), f''(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */" (declaration) "bool findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);" (primitive_type) "bool" (init_declarator) "findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol = 1e-10" (function_declarator) "findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol" (identifier) "findRoot" (parameter_list) "(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol" (() "(" (parameter_declaration) "const std::function<DoubleTriplet (double)> &funPtr" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::function<" (:) ":" (:) ":" (identifier) "function" (<) "<" (function_declarator) "DoubleTriplet (double)> &funPtr" (identifier) "DoubleTriplet" (parameter_list) "(double)" (() "(" (parameter_declaration) "double" (primitive_type) "double" ()) ")" (ERROR) "> &" (>) ">" (&) "&" (identifier) "funPtr" (,) "," (parameter_declaration) "double & root" (primitive_type) "double" (ERROR) "&" (&) "&" (identifier) "root" (,) "," (parameter_declaration) "double funTol" (primitive_type) "double" (identifier) "funTol" ()) "" (=) "=" (number_literal) "1e-10" (,) "," (ERROR) "double" (identifier) "double" (init_declarator) "stepTol = 1e-6" (identifier) "stepTol" (=) "=" (number_literal) "1e-6" (ERROR) ")" ()) ")" (;) ";" (comment) "/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first derivative\n * @param funPtr mapping x |-> (f(x), f'(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */" (declaration) "bool findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);" (primitive_type) "bool" (init_declarator) "findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol = 1e-10" (function_declarator) "findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol" (identifier) "findRoot" (parameter_list) "(const std::function<DoublePair (double)> &funPtr, double & root, double funTol" (() "(" (parameter_declaration) "const std::function<DoublePair (double)> &funPtr" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::function<" (:) ":" (:) ":" (identifier) "function" (<) "<" (function_declarator) "DoublePair (double)> &funPtr" (identifier) "DoublePair" (parameter_list) "(double)" (() "(" (parameter_declaration) "double" (primitive_type) "double" ()) ")" (ERROR) "> &" (>) ">" (&) "&" (identifier) "funPtr" (,) "," (parameter_declaration) "double & root" (primitive_type) "double" (ERROR) "&" (&) "&" (identifier) "root" (,) "," (parameter_declaration) "double funTol" (primitive_type) "double" (identifier) "funTol" ()) "" (=) "=" (number_literal) "1e-10" (,) "," (ERROR) "double" (identifier) "double" (init_declarator) "stepTol = 1e-6" (identifier) "stepTol" (=) "=" (number_literal) "1e-6" (ERROR) ")" ()) ")" (;) ";" (comment) "/**\n * @fn findRoot\n * Newton's root-finding procedure\n * for 2 functions of 2 parameters,\n * using Jacobian matrix\n * @param funPtr mapping x, y |-> (f(x, y), g(x, y))\n * @param gradPtr x, y |-> (f_x(x, y), f_y(x, y), g_x(x, y)), g_y(x, y))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */" (declaration) "bool findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol = 1e-10, double stepTol = 1e-6);" (primitive_type) "bool" (init_declarator) "findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol = 1e-10" (function_declarator) "findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol" (identifier) "findRoot" (parameter_list) "(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol" (() "(" (parameter_declaration) "const std::function<DoublePair (DoublePair)> &funPtr" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::function<" (:) ":" (:) ":" (identifier) "function" (<) "<" (function_declarator) "DoublePair (DoublePair)> &funPtr" (identifier) "DoublePair" (parameter_list) "(DoublePair)" (() "(" (parameter_declaration) "DoublePair" (type_identifier) "DoublePair" ()) ")" (ERROR) "> &" (>) ">" (&) "&" (identifier) "funPtr" (,) "," (parameter_declaration) "const std::function<std::tuple<DoublePair" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::function<std::tuple<" (:) ":" (:) ":" (identifier) "function" (<) "<" (identifier) "std" (:) ":" (:) ":" (identifier) "tuple" (<) "<" (identifier) "DoublePair" (,) "," (parameter_declaration) "DoublePair> (DoublePair)> &gradPtr" (macro_type_specifier) "DoublePair> (DoublePair)" (identifier) "DoublePair" (ERROR) ">" (>) ">" (() "(" (type_descriptor) "DoublePair" (type_identifier) "DoublePair" ()) ")" (ERROR) "> &" (>) ">" (&) "&" (identifier) "gradPtr" (,) "," (parameter_declaration) "DoublePair & root" (type_identifier) "DoublePair" (ERROR) "&" (&) "&" (identifier) "root" (,) "," (parameter_declaration) "double funTol" (primitive_type) "double" (identifier) "funTol" ()) "" (=) "=" (number_literal) "1e-10" (,) "," (ERROR) "double" (identifier) "double" (init_declarator) "stepTol = 1e-6" (identifier) "stepTol" (=) "=" (number_literal) "1e-6" (ERROR) ")" ()) ")" (;) ";" (comment) "/**\n * @fn findRoot\n * Brent's root-finding procedure\n * @param funPtr mapping x |-> f(x)\n * @param a lower boundary\n * @param b upper boundary\n * @param root starting point and such x that f(x) = 0\n * @param epsilon tolerance\n * @return true if success, false otherwise\n */" (declaration) "bool findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon = 1e-8);" (primitive_type) "bool" (init_declarator) "findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon = 1e-8" (function_declarator) "findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon" (identifier) "findRoot" (parameter_list) "(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon" (() "(" (parameter_declaration) "const std::function<double (double)> &funPtr" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::" (:) ":" (:) ":" (function_declarator) "function<double (double)> &funPtr" (identifier) "function" (ERROR) "<double" (<) "<" (primitive_type) "double" (parameter_list) "(double)" (() "(" (parameter_declaration) "double" (primitive_type) "double" ()) ")" (ERROR) "> &" (>) ">" (&) "&" (identifier) "funPtr" (,) "," (parameter_declaration) "double a" (primitive_type) "double" (identifier) "a" (,) "," (parameter_declaration) "double b" (primitive_type) "double" (identifier) "b" (,) "," (parameter_declaration) "double & root" (primitive_type) "double" (ERROR) "&" (&) "&" (identifier) "root" (,) "," (parameter_declaration) "double epsilon" (primitive_type) "double" (identifier) "epsilon" ()) "" (=) "=" (number_literal) "1e-8" (ERROR) ")" ()) ")" (;) ";" (comment) "/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param abc lower boundary / middle / upper boundary\n * @param fabc funPtr(abc)\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */" (declaration) "bool findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon = 1e-8);" (primitive_type) "bool" (init_declarator) "findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon = 1e-8" (function_declarator) "findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon" (identifier) "findMin" (parameter_list) "(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon" (() "(" (parameter_declaration) "const std::function<double (double)> &funPtr" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::" (:) ":" (:) ":" (function_declarator) "function<double (double)> &funPtr" (identifier) "function" (ERROR) "<double" (<) "<" (primitive_type) "double" (parameter_list) "(double)" (() "(" (parameter_declaration) "double" (primitive_type) "double" ()) ")" (ERROR) "> &" (>) ">" (&) "&" (identifier) "funPtr" (,) "," (parameter_declaration) "const DoubleTriplet &abc" (type_qualifier) "const" (const) "const" (type_identifier) "DoubleTriplet" (ERROR) "&" (&) "&" (identifier) "abc" (,) "," (parameter_declaration) "const DoubleTriplet &fabc" (type_qualifier) "const" (const) "const" (type_identifier) "DoubleTriplet" (ERROR) "&" (&) "&" (identifier) "fabc" (,) "," (parameter_declaration) "double &root" (primitive_type) "double" (ERROR) "&" (&) "&" (identifier) "root" (,) "," (parameter_declaration) "double epsilon" (primitive_type) "double" (identifier) "epsilon" ()) "" (=) "=" (number_literal) "1e-8" (ERROR) ")" ()) ")" (;) ";" (comment) "/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param closePoint point that is nearby minimum\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */" (declaration) "bool findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon = 1e-8);" (primitive_type) "bool" (init_declarator) "findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon = 1e-8" (function_declarator) "findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon" (identifier) "findMin" (parameter_list) "(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon" (() "(" (parameter_declaration) "const std::function<double (double)> &funPtr" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::" (:) ":" (:) ":" (function_declarator) "function<double (double)> &funPtr" (identifier) "function" (ERROR) "<double" (<) "<" (primitive_type) "double" (parameter_list) "(double)" (() "(" (parameter_declaration) "double" (primitive_type) "double" ()) ")" (ERROR) "> &" (>) ">" (&) "&" (identifier) "funPtr" (,) "," (parameter_declaration) "double closePoint" (primitive_type) "double" (identifier) "closePoint" (,) "," (parameter_declaration) "double &root" (primitive_type) "double" (ERROR) "&" (&) "&" (identifier) "root" (,) "," (parameter_declaration) "double epsilon" (primitive_type) "double" (identifier) "epsilon" ()) "" (=) "=" (number_literal) "1e-8" (ERROR) ")" ()) ")" (;) ";" (}) "}" (#endif) "#endif" (comment) "// NUMERICMATH"
422
40
{"language": "c", "success": true, "metadata": {"lines": 87, "avg_line_length": 35.72, "nodes": 255, "errors": 0, "source_hash": "4382f0ed5822177ba2f27c6d96cfe508e0d9d23a9afea4577099a106ed008798", "categorized_nodes": 143}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef NUMERICMATH\n#define NUMERICMATH\n\n#include \"RandMath.h\"\n\n/// Numerical procedures\n\nnamespace RandMath\n{\n\n/**\n * @fn integral\n * @param funPtr integrand\n * @param a lower boundary\n * @param b upper boundary\n * @param epsilon tolerance\n * @param maxRecursionDepth how deep should the algorithm go\n * @return\n */\ndouble integral(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon = 1e-11, int maxRecursionDepth = 11);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first and second derivatives\n * @param funPtr mapping x |-> (f(x), f'(x), f''(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first derivative\n * @param funPtr mapping x |-> (f(x), f'(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure\n * for 2 functions of 2 parameters,\n * using Jacobian matrix\n * @param funPtr mapping x, y |-> (f(x, y), g(x, y))\n * @param gradPtr x, y |-> (f_x(x, y), f_y(x, y), g_x(x, y)), g_y(x, y))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Brent's root-finding procedure\n * @param funPtr mapping x |-> f(x)\n * @param a lower boundary\n * @param b upper boundary\n * @param root starting point and such x that f(x) = 0\n * @param epsilon tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param abc lower boundary / middle / upper boundary\n * @param fabc funPtr(abc)\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param closePoint point that is nearby minimum\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon = 1e-8);\n\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 254], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 98, "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": "NUMERICMATH", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_def", "text": "#define NUMERICMATH\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": "NUMERICMATH", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include \"RandMath.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": "\"RandMath.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 21}}, {"id": 9, "type": "function_definition", "text": "namespace RandMath\n{\n\n/**\n * @fn integral\n * @param funPtr integrand\n * @param a lower boundary\n * @param b upper boundary\n * @param epsilon tolerance\n * @param maxRecursionDepth how deep should the algorithm go\n * @return\n */\ndouble integral(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon = 1e-11, int maxRecursionDepth = 11);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first and second derivatives\n * @param funPtr mapping x |-> (f(x), f'(x), f''(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first derivative\n * @param funPtr mapping x |-> (f(x), f'(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure\n * for 2 functions of 2 parameters,\n * using Jacobian matrix\n * @param funPtr mapping x, y |-> (f(x, y), g(x, y))\n * @param gradPtr x, y |-> (f_x(x, y), f_y(x, y), g_x(x, y)), g_y(x, y))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Brent's root-finding procedure\n * @param funPtr mapping x |-> f(x)\n * @param a lower boundary\n * @param b upper boundary\n * @param root starting point and such x that f(x) = 0\n * @param epsilon tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param abc lower boundary / middle / upper boundary\n * @param fabc funPtr(abc)\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param closePoint point that is nearby minimum\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon = 1e-8);\n\n}", "parent": 0, "children": [10, 11], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 96, "column": 1}}, {"id": 10, "type": "type_identifier", "text": "namespace", "parent": 9, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 9}}, {"id": 11, "type": "identifier", "text": "RandMath", "parent": 9, "children": [], "start_point": {"row": 7, "column": 10}, "end_point": {"row": 7, "column": 18}}, {"id": 12, "type": "declaration", "text": "double integral(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon = 1e-11, int maxRecursionDepth = 11);", "parent": 9, "children": [13, 14, 41, 43], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 80}}, {"id": 13, "type": "primitive_type", "text": "double", "parent": 12, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 6}}, {"id": 14, "type": "init_declarator", "text": "integral(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon = 1e-11", "parent": 12, "children": [15, 39, 40], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 20, "column": 50}}, {"id": 15, "type": "function_declarator", "text": "integral(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon", "parent": 14, "children": [16, 17], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 20, "column": 42}}, {"id": 16, "type": "identifier", "text": "integral", "parent": 15, "children": [], "start_point": {"row": 19, "column": 7}, "end_point": {"row": 19, "column": 15}}, {"id": 17, "type": "parameter_list", "text": "(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon", "parent": 15, "children": [18, 30, 33, 36], "start_point": {"row": 19, "column": 15}, "end_point": {"row": 20, "column": 42}}, {"id": 18, "type": "parameter_declaration", "text": "const std::function<double (double)> &funPtr", "parent": 17, "children": [19, 20], "start_point": {"row": 19, "column": 16}, "end_point": {"row": 19, "column": 60}}, {"id": 19, "type": "type_identifier", "text": "std", "parent": 18, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 25}}, {"id": 20, "type": "function_declarator", "text": "function<double (double)> &funPtr", "parent": 18, "children": [21, 24, 27, 29], "start_point": {"row": 19, "column": 27}, "end_point": {"row": 19, "column": 60}}, {"id": 21, "type": "ERROR", "text": "<double", "parent": 20, "children": [22, 23], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 42}}, {"id": 22, "type": "<", "text": "<", "parent": 21, "children": [], "start_point": {"row": 19, "column": 35}, "end_point": {"row": 19, "column": 36}}, {"id": 23, "type": "primitive_type", "text": "double", "parent": 21, "children": [], "start_point": {"row": 19, "column": 36}, "end_point": {"row": 19, "column": 42}}, {"id": 24, "type": "parameter_list", "text": "(double)", "parent": 20, "children": [25], "start_point": {"row": 19, "column": 43}, "end_point": {"row": 19, "column": 51}}, {"id": 25, "type": "parameter_declaration", "text": "double", "parent": 24, "children": [26], "start_point": {"row": 19, "column": 44}, "end_point": {"row": 19, "column": 50}}, {"id": 26, "type": "primitive_type", "text": "double", "parent": 25, "children": [], "start_point": {"row": 19, "column": 44}, "end_point": {"row": 19, "column": 50}}, {"id": 27, "type": "ERROR", "text": "> &", "parent": 20, "children": [28], "start_point": {"row": 19, "column": 51}, "end_point": {"row": 19, "column": 54}}, {"id": 28, "type": ">", "text": ">", "parent": 27, "children": [], "start_point": {"row": 19, "column": 51}, "end_point": {"row": 19, "column": 52}}, {"id": 29, "type": "identifier", "text": "funPtr", "parent": 20, "children": [], "start_point": {"row": 19, "column": 54}, "end_point": {"row": 19, "column": 60}}, {"id": 30, "type": "parameter_declaration", "text": "double a", "parent": 17, "children": [31, 32], "start_point": {"row": 19, "column": 62}, "end_point": {"row": 19, "column": 70}}, {"id": 31, "type": "primitive_type", "text": "double", "parent": 30, "children": [], "start_point": {"row": 19, "column": 62}, "end_point": {"row": 19, "column": 68}}, {"id": 32, "type": "identifier", "text": "a", "parent": 30, "children": [], "start_point": {"row": 19, "column": 69}, "end_point": {"row": 19, "column": 70}}, {"id": 33, "type": "parameter_declaration", "text": "double b", "parent": 17, "children": [34, 35], "start_point": {"row": 19, "column": 72}, "end_point": {"row": 19, "column": 80}}, {"id": 34, "type": "primitive_type", "text": "double", "parent": 33, "children": [], "start_point": {"row": 19, "column": 72}, "end_point": {"row": 19, "column": 78}}, {"id": 35, "type": "identifier", "text": "b", "parent": 33, "children": [], "start_point": {"row": 19, "column": 79}, "end_point": {"row": 19, "column": 80}}, {"id": 36, "type": "parameter_declaration", "text": "double epsilon", "parent": 17, "children": [37, 38], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 42}}, {"id": 37, "type": "primitive_type", "text": "double", "parent": 36, "children": [], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 34}}, {"id": 38, "type": "identifier", "text": "epsilon", "parent": 36, "children": [], "start_point": {"row": 20, "column": 35}, "end_point": {"row": 20, "column": 42}}, {"id": 39, "type": "=", "text": "=", "parent": 14, "children": [], "start_point": {"row": 20, "column": 43}, "end_point": {"row": 20, "column": 44}}, {"id": 40, "type": "number_literal", "text": "1e-11", "parent": 14, "children": [], "start_point": {"row": 20, "column": 45}, "end_point": {"row": 20, "column": 50}}, {"id": 41, "type": "ERROR", "text": "int", "parent": 12, "children": [42], "start_point": {"row": 20, "column": 52}, "end_point": {"row": 20, "column": 55}}, {"id": 42, "type": "identifier", "text": "int", "parent": 41, "children": [], "start_point": {"row": 20, "column": 52}, "end_point": {"row": 20, "column": 55}}, {"id": 43, "type": "init_declarator", "text": "maxRecursionDepth = 11", "parent": 12, "children": [44, 45, 46], "start_point": {"row": 20, "column": 56}, "end_point": {"row": 20, "column": 78}}, {"id": 44, "type": "identifier", "text": "maxRecursionDepth", "parent": 43, "children": [], "start_point": {"row": 20, "column": 56}, "end_point": {"row": 20, "column": 73}}, {"id": 45, "type": "=", "text": "=", "parent": 43, "children": [], "start_point": {"row": 20, "column": 74}, "end_point": {"row": 20, "column": 75}}, {"id": 46, "type": "number_literal", "text": "11", "parent": 43, "children": [], "start_point": {"row": 20, "column": 76}, "end_point": {"row": 20, "column": 78}}, {"id": 47, "type": "declaration", "text": "bool findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);", "parent": 9, "children": [48, 49, 73, 75], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 128}}, {"id": 48, "type": "primitive_type", "text": "bool", "parent": 47, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 4}}, {"id": 49, "type": "init_declarator", "text": "findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol = 1e-10", "parent": 47, "children": [50, 71, 72], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 103}}, {"id": 50, "type": "function_declarator", "text": "findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol", "parent": 49, "children": [51, 52], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 95}}, {"id": 51, "type": "identifier", "text": "findRoot", "parent": 50, "children": [], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 13}}, {"id": 52, "type": "parameter_list", "text": "(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol", "parent": 50, "children": [53, 65, 68], "start_point": {"row": 32, "column": 13}, "end_point": {"row": 32, "column": 95}}, {"id": 53, "type": "parameter_declaration", "text": "const std::function<DoubleTriplet (double)> &funPtr", "parent": 52, "children": [54, 55, 57], "start_point": {"row": 32, "column": 14}, "end_point": {"row": 32, "column": 65}}, {"id": 54, "type": "type_identifier", "text": "std", "parent": 53, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 23}}, {"id": 55, "type": "ERROR", "text": "::function<", "parent": 53, "children": [56], "start_point": {"row": 32, "column": 23}, "end_point": {"row": 32, "column": 34}}, {"id": 56, "type": "<", "text": "<", "parent": 55, "children": [], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 34}}, {"id": 57, "type": "function_declarator", "text": "DoubleTriplet (double)> &funPtr", "parent": 53, "children": [58, 59, 62, 64], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 65}}, {"id": 58, "type": "identifier", "text": "DoubleTriplet", "parent": 57, "children": [], "start_point": {"row": 32, "column": 34}, "end_point": {"row": 32, "column": 47}}, {"id": 59, "type": "parameter_list", "text": "(double)", "parent": 57, "children": [60], "start_point": {"row": 32, "column": 48}, "end_point": {"row": 32, "column": 56}}, {"id": 60, "type": "parameter_declaration", "text": "double", "parent": 59, "children": [61], "start_point": {"row": 32, "column": 49}, "end_point": {"row": 32, "column": 55}}, {"id": 61, "type": "primitive_type", "text": "double", "parent": 60, "children": [], "start_point": {"row": 32, "column": 49}, "end_point": {"row": 32, "column": 55}}, {"id": 62, "type": "ERROR", "text": "> &", "parent": 57, "children": [63], "start_point": {"row": 32, "column": 56}, "end_point": {"row": 32, "column": 59}}, {"id": 63, "type": ">", "text": ">", "parent": 62, "children": [], "start_point": {"row": 32, "column": 56}, "end_point": {"row": 32, "column": 57}}, {"id": 64, "type": "identifier", "text": "funPtr", "parent": 57, "children": [], "start_point": {"row": 32, "column": 59}, "end_point": {"row": 32, "column": 65}}, {"id": 65, "type": "parameter_declaration", "text": "double & root", "parent": 52, "children": [66, 67], "start_point": {"row": 32, "column": 67}, "end_point": {"row": 32, "column": 80}}, {"id": 66, "type": "primitive_type", "text": "double", "parent": 65, "children": [], "start_point": {"row": 32, "column": 67}, "end_point": {"row": 32, "column": 73}}, {"id": 67, "type": "identifier", "text": "root", "parent": 65, "children": [], "start_point": {"row": 32, "column": 76}, "end_point": {"row": 32, "column": 80}}, {"id": 68, "type": "parameter_declaration", "text": "double funTol", "parent": 52, "children": [69, 70], "start_point": {"row": 32, "column": 82}, "end_point": {"row": 32, "column": 95}}, {"id": 69, "type": "primitive_type", "text": "double", "parent": 68, "children": [], "start_point": {"row": 32, "column": 82}, "end_point": {"row": 32, "column": 88}}, {"id": 70, "type": "identifier", "text": "funTol", "parent": 68, "children": [], "start_point": {"row": 32, "column": 89}, "end_point": {"row": 32, "column": 95}}, {"id": 71, "type": "=", "text": "=", "parent": 49, "children": [], "start_point": {"row": 32, "column": 96}, "end_point": {"row": 32, "column": 97}}, {"id": 72, "type": "number_literal", "text": "1e-10", "parent": 49, "children": [], "start_point": {"row": 32, "column": 98}, "end_point": {"row": 32, "column": 103}}, {"id": 73, "type": "ERROR", "text": "double", "parent": 47, "children": [74], "start_point": {"row": 32, "column": 105}, "end_point": {"row": 32, "column": 111}}, {"id": 74, "type": "identifier", "text": "double", "parent": 73, "children": [], "start_point": {"row": 32, "column": 105}, "end_point": {"row": 32, "column": 111}}, {"id": 75, "type": "init_declarator", "text": "stepTol = 1e-6", "parent": 47, "children": [76, 77, 78], "start_point": {"row": 32, "column": 112}, "end_point": {"row": 32, "column": 126}}, {"id": 76, "type": "identifier", "text": "stepTol", "parent": 75, "children": [], "start_point": {"row": 32, "column": 112}, "end_point": {"row": 32, "column": 119}}, {"id": 77, "type": "=", "text": "=", "parent": 75, "children": [], "start_point": {"row": 32, "column": 120}, "end_point": {"row": 32, "column": 121}}, {"id": 78, "type": "number_literal", "text": "1e-6", "parent": 75, "children": [], "start_point": {"row": 32, "column": 122}, "end_point": {"row": 32, "column": 126}}, {"id": 79, "type": "declaration", "text": "bool findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);", "parent": 9, "children": [80, 81, 105, 107], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 125}}, {"id": 80, "type": "primitive_type", "text": "bool", "parent": 79, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 4}}, {"id": 81, "type": "init_declarator", "text": "findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol = 1e-10", "parent": 79, "children": [82, 103, 104], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 100}}, {"id": 82, "type": "function_declarator", "text": "findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol", "parent": 81, "children": [83, 84], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 92}}, {"id": 83, "type": "identifier", "text": "findRoot", "parent": 82, "children": [], "start_point": {"row": 44, "column": 5}, "end_point": {"row": 44, "column": 13}}, {"id": 84, "type": "parameter_list", "text": "(const std::function<DoublePair (double)> &funPtr, double & root, double funTol", "parent": 82, "children": [85, 97, 100], "start_point": {"row": 44, "column": 13}, "end_point": {"row": 44, "column": 92}}, {"id": 85, "type": "parameter_declaration", "text": "const std::function<DoublePair (double)> &funPtr", "parent": 84, "children": [86, 87, 89], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 62}}, {"id": 86, "type": "type_identifier", "text": "std", "parent": 85, "children": [], "start_point": {"row": 44, "column": 20}, "end_point": {"row": 44, "column": 23}}, {"id": 87, "type": "ERROR", "text": "::function<", "parent": 85, "children": [88], "start_point": {"row": 44, "column": 23}, "end_point": {"row": 44, "column": 34}}, {"id": 88, "type": "<", "text": "<", "parent": 87, "children": [], "start_point": {"row": 44, "column": 33}, "end_point": {"row": 44, "column": 34}}, {"id": 89, "type": "function_declarator", "text": "DoublePair (double)> &funPtr", "parent": 85, "children": [90, 91, 94, 96], "start_point": {"row": 44, "column": 34}, "end_point": {"row": 44, "column": 62}}, {"id": 90, "type": "identifier", "text": "DoublePair", "parent": 89, "children": [], "start_point": {"row": 44, "column": 34}, "end_point": {"row": 44, "column": 44}}, {"id": 91, "type": "parameter_list", "text": "(double)", "parent": 89, "children": [92], "start_point": {"row": 44, "column": 45}, "end_point": {"row": 44, "column": 53}}, {"id": 92, "type": "parameter_declaration", "text": "double", "parent": 91, "children": [93], "start_point": {"row": 44, "column": 46}, "end_point": {"row": 44, "column": 52}}, {"id": 93, "type": "primitive_type", "text": "double", "parent": 92, "children": [], "start_point": {"row": 44, "column": 46}, "end_point": {"row": 44, "column": 52}}, {"id": 94, "type": "ERROR", "text": "> &", "parent": 89, "children": [95], "start_point": {"row": 44, "column": 53}, "end_point": {"row": 44, "column": 56}}, {"id": 95, "type": ">", "text": ">", "parent": 94, "children": [], "start_point": {"row": 44, "column": 53}, "end_point": {"row": 44, "column": 54}}, {"id": 96, "type": "identifier", "text": "funPtr", "parent": 89, "children": [], "start_point": {"row": 44, "column": 56}, "end_point": {"row": 44, "column": 62}}, {"id": 97, "type": "parameter_declaration", "text": "double & root", "parent": 84, "children": [98, 99], "start_point": {"row": 44, "column": 64}, "end_point": {"row": 44, "column": 77}}, {"id": 98, "type": "primitive_type", "text": "double", "parent": 97, "children": [], "start_point": {"row": 44, "column": 64}, "end_point": {"row": 44, "column": 70}}, {"id": 99, "type": "identifier", "text": "root", "parent": 97, "children": [], "start_point": {"row": 44, "column": 73}, "end_point": {"row": 44, "column": 77}}, {"id": 100, "type": "parameter_declaration", "text": "double funTol", "parent": 84, "children": [101, 102], "start_point": {"row": 44, "column": 79}, "end_point": {"row": 44, "column": 92}}, {"id": 101, "type": "primitive_type", "text": "double", "parent": 100, "children": [], "start_point": {"row": 44, "column": 79}, "end_point": {"row": 44, "column": 85}}, {"id": 102, "type": "identifier", "text": "funTol", "parent": 100, "children": [], "start_point": {"row": 44, "column": 86}, "end_point": {"row": 44, "column": 92}}, {"id": 103, "type": "=", "text": "=", "parent": 81, "children": [], "start_point": {"row": 44, "column": 93}, "end_point": {"row": 44, "column": 94}}, {"id": 104, "type": "number_literal", "text": "1e-10", "parent": 81, "children": [], "start_point": {"row": 44, "column": 95}, "end_point": {"row": 44, "column": 100}}, {"id": 105, "type": "ERROR", "text": "double", "parent": 79, "children": [106], "start_point": {"row": 44, "column": 102}, "end_point": {"row": 44, "column": 108}}, {"id": 106, "type": "identifier", "text": "double", "parent": 105, "children": [], "start_point": {"row": 44, "column": 102}, "end_point": {"row": 44, "column": 108}}, {"id": 107, "type": "init_declarator", "text": "stepTol = 1e-6", "parent": 79, "children": [108, 109, 110], "start_point": {"row": 44, "column": 109}, "end_point": {"row": 44, "column": 123}}, {"id": 108, "type": "identifier", "text": "stepTol", "parent": 107, "children": [], "start_point": {"row": 44, "column": 109}, "end_point": {"row": 44, "column": 116}}, {"id": 109, "type": "=", "text": "=", "parent": 107, "children": [], "start_point": {"row": 44, "column": 117}, "end_point": {"row": 44, "column": 118}}, {"id": 110, "type": "number_literal", "text": "1e-6", "parent": 107, "children": [], "start_point": {"row": 44, "column": 119}, "end_point": {"row": 44, "column": 123}}, {"id": 111, "type": "declaration", "text": "bool findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol = 1e-10, double stepTol = 1e-6);", "parent": 9, "children": [112, 113, 155, 157], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 59, "column": 79}}, {"id": 112, "type": "primitive_type", "text": "bool", "parent": 111, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 4}}, {"id": 113, "type": "init_declarator", "text": "findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol = 1e-10", "parent": 111, "children": [114, 153, 154], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 59, "column": 54}}, {"id": 114, "type": "function_declarator", "text": "findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol", "parent": 113, "children": [115, 116], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 59, "column": 46}}, {"id": 115, "type": "identifier", "text": "findRoot", "parent": 114, "children": [], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 13}}, {"id": 116, "type": "parameter_list", "text": "(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol", "parent": 114, "children": [117, 129, 137, 147, 150], "start_point": {"row": 58, "column": 13}, "end_point": {"row": 59, "column": 46}}, {"id": 117, "type": "parameter_declaration", "text": "const std::function<DoublePair (DoublePair)> &funPtr", "parent": 116, "children": [118, 119, 121], "start_point": {"row": 58, "column": 14}, "end_point": {"row": 58, "column": 66}}, {"id": 118, "type": "type_identifier", "text": "std", "parent": 117, "children": [], "start_point": {"row": 58, "column": 20}, "end_point": {"row": 58, "column": 23}}, {"id": 119, "type": "ERROR", "text": "::function<", "parent": 117, "children": [120], "start_point": {"row": 58, "column": 23}, "end_point": {"row": 58, "column": 34}}, {"id": 120, "type": "<", "text": "<", "parent": 119, "children": [], "start_point": {"row": 58, "column": 33}, "end_point": {"row": 58, "column": 34}}, {"id": 121, "type": "function_declarator", "text": "DoublePair (DoublePair)> &funPtr", "parent": 117, "children": [122, 123, 126, 128], "start_point": {"row": 58, "column": 34}, "end_point": {"row": 58, "column": 66}}, {"id": 122, "type": "identifier", "text": "DoublePair", "parent": 121, "children": [], "start_point": {"row": 58, "column": 34}, "end_point": {"row": 58, "column": 44}}, {"id": 123, "type": "parameter_list", "text": "(DoublePair)", "parent": 121, "children": [124], "start_point": {"row": 58, "column": 45}, "end_point": {"row": 58, "column": 57}}, {"id": 124, "type": "parameter_declaration", "text": "DoublePair", "parent": 123, "children": [125], "start_point": {"row": 58, "column": 46}, "end_point": {"row": 58, "column": 56}}, {"id": 125, "type": "type_identifier", "text": "DoublePair", "parent": 124, "children": [], "start_point": {"row": 58, "column": 46}, "end_point": {"row": 58, "column": 56}}, {"id": 126, "type": "ERROR", "text": "> &", "parent": 121, "children": [127], "start_point": {"row": 58, "column": 57}, "end_point": {"row": 58, "column": 60}}, {"id": 127, "type": ">", "text": ">", "parent": 126, "children": [], "start_point": {"row": 58, "column": 57}, "end_point": {"row": 58, "column": 58}}, {"id": 128, "type": "identifier", "text": "funPtr", "parent": 121, "children": [], "start_point": {"row": 58, "column": 60}, "end_point": {"row": 58, "column": 66}}, {"id": 129, "type": "parameter_declaration", "text": "const std::function<std::tuple<DoublePair", "parent": 116, "children": [130, 131, 136], "start_point": {"row": 58, "column": 68}, "end_point": {"row": 58, "column": 109}}, {"id": 130, "type": "type_identifier", "text": "std", "parent": 129, "children": [], "start_point": {"row": 58, "column": 74}, "end_point": {"row": 58, "column": 77}}, {"id": 131, "type": "ERROR", "text": "::function<std::tuple<", "parent": 129, "children": [132, 133, 134, 135], "start_point": {"row": 58, "column": 77}, "end_point": {"row": 58, "column": 99}}, {"id": 132, "type": "<", "text": "<", "parent": 131, "children": [], "start_point": {"row": 58, "column": 87}, "end_point": {"row": 58, "column": 88}}, {"id": 133, "type": "identifier", "text": "std", "parent": 131, "children": [], "start_point": {"row": 58, "column": 88}, "end_point": {"row": 58, "column": 91}}, {"id": 134, "type": "identifier", "text": "tuple", "parent": 131, "children": [], "start_point": {"row": 58, "column": 93}, "end_point": {"row": 58, "column": 98}}, {"id": 135, "type": "<", "text": "<", "parent": 131, "children": [], "start_point": {"row": 58, "column": 98}, "end_point": {"row": 58, "column": 99}}, {"id": 136, "type": "identifier", "text": "DoublePair", "parent": 129, "children": [], "start_point": {"row": 58, "column": 99}, "end_point": {"row": 58, "column": 109}}, {"id": 137, "type": "parameter_declaration", "text": "DoublePair> (DoublePair)> &gradPtr", "parent": 116, "children": [138, 144, 146], "start_point": {"row": 58, "column": 111}, "end_point": {"row": 58, "column": 145}}, {"id": 138, "type": "macro_type_specifier", "text": "DoublePair> (DoublePair)", "parent": 137, "children": [139, 140, 142], "start_point": {"row": 58, "column": 111}, "end_point": {"row": 58, "column": 135}}, {"id": 139, "type": "identifier", "text": "DoublePair", "parent": 138, "children": [], "start_point": {"row": 58, "column": 111}, "end_point": {"row": 58, "column": 121}}, {"id": 140, "type": "ERROR", "text": ">", "parent": 138, "children": [141], "start_point": {"row": 58, "column": 121}, "end_point": {"row": 58, "column": 122}}, {"id": 141, "type": ">", "text": ">", "parent": 140, "children": [], "start_point": {"row": 58, "column": 121}, "end_point": {"row": 58, "column": 122}}, {"id": 142, "type": "type_descriptor", "text": "DoublePair", "parent": 138, "children": [143], "start_point": {"row": 58, "column": 124}, "end_point": {"row": 58, "column": 134}}, {"id": 143, "type": "type_identifier", "text": "DoublePair", "parent": 142, "children": [], "start_point": {"row": 58, "column": 124}, "end_point": {"row": 58, "column": 134}}, {"id": 144, "type": "ERROR", "text": "> &", "parent": 137, "children": [145], "start_point": {"row": 58, "column": 135}, "end_point": {"row": 58, "column": 138}}, {"id": 145, "type": ">", "text": ">", "parent": 144, "children": [], "start_point": {"row": 58, "column": 135}, "end_point": {"row": 58, "column": 136}}, {"id": 146, "type": "identifier", "text": "gradPtr", "parent": 137, "children": [], "start_point": {"row": 58, "column": 138}, "end_point": {"row": 58, "column": 145}}, {"id": 147, "type": "parameter_declaration", "text": "DoublePair & root", "parent": 116, "children": [148, 149], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 31}}, {"id": 148, "type": "type_identifier", "text": "DoublePair", "parent": 147, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 24}}, {"id": 149, "type": "identifier", "text": "root", "parent": 147, "children": [], "start_point": {"row": 59, "column": 27}, "end_point": {"row": 59, "column": 31}}, {"id": 150, "type": "parameter_declaration", "text": "double funTol", "parent": 116, "children": [151, 152], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 46}}, {"id": 151, "type": "primitive_type", "text": "double", "parent": 150, "children": [], "start_point": {"row": 59, "column": 33}, "end_point": {"row": 59, "column": 39}}, {"id": 152, "type": "identifier", "text": "funTol", "parent": 150, "children": [], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 46}}, {"id": 153, "type": "=", "text": "=", "parent": 113, "children": [], "start_point": {"row": 59, "column": 47}, "end_point": {"row": 59, "column": 48}}, {"id": 154, "type": "number_literal", "text": "1e-10", "parent": 113, "children": [], "start_point": {"row": 59, "column": 49}, "end_point": {"row": 59, "column": 54}}, {"id": 155, "type": "ERROR", "text": "double", "parent": 111, "children": [156], "start_point": {"row": 59, "column": 56}, "end_point": {"row": 59, "column": 62}}, {"id": 156, "type": "identifier", "text": "double", "parent": 155, "children": [], "start_point": {"row": 59, "column": 56}, "end_point": {"row": 59, "column": 62}}, {"id": 157, "type": "init_declarator", "text": "stepTol = 1e-6", "parent": 111, "children": [158, 159, 160], "start_point": {"row": 59, "column": 63}, "end_point": {"row": 59, "column": 77}}, {"id": 158, "type": "identifier", "text": "stepTol", "parent": 157, "children": [], "start_point": {"row": 59, "column": 63}, "end_point": {"row": 59, "column": 70}}, {"id": 159, "type": "=", "text": "=", "parent": 157, "children": [], "start_point": {"row": 59, "column": 71}, "end_point": {"row": 59, "column": 72}}, {"id": 160, "type": "number_literal", "text": "1e-6", "parent": 157, "children": [], "start_point": {"row": 59, "column": 73}, "end_point": {"row": 59, "column": 77}}, {"id": 161, "type": "declaration", "text": "bool findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon = 1e-8);", "parent": 9, "children": [162, 163], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 118}}, {"id": 162, "type": "primitive_type", "text": "bool", "parent": 161, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 4}}, {"id": 163, "type": "init_declarator", "text": "findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon = 1e-8", "parent": 161, "children": [164, 191, 192], "start_point": {"row": 71, "column": 5}, "end_point": {"row": 71, "column": 116}}, {"id": 164, "type": "function_declarator", "text": "findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon", "parent": 163, "children": [165, 166], "start_point": {"row": 71, "column": 5}, "end_point": {"row": 71, "column": 109}}, {"id": 165, "type": "identifier", "text": "findRoot", "parent": 164, "children": [], "start_point": {"row": 71, "column": 5}, "end_point": {"row": 71, "column": 13}}, {"id": 166, "type": "parameter_list", "text": "(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon", "parent": 164, "children": [167, 179, 182, 185, 188], "start_point": {"row": 71, "column": 13}, "end_point": {"row": 71, "column": 109}}, {"id": 167, "type": "parameter_declaration", "text": "const std::function<double (double)> &funPtr", "parent": 166, "children": [168, 169], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 58}}, {"id": 168, "type": "type_identifier", "text": "std", "parent": 167, "children": [], "start_point": {"row": 71, "column": 20}, "end_point": {"row": 71, "column": 23}}, {"id": 169, "type": "function_declarator", "text": "function<double (double)> &funPtr", "parent": 167, "children": [170, 173, 176, 178], "start_point": {"row": 71, "column": 25}, "end_point": {"row": 71, "column": 58}}, {"id": 170, "type": "ERROR", "text": "<double", "parent": 169, "children": [171, 172], "start_point": {"row": 71, "column": 33}, "end_point": {"row": 71, "column": 40}}, {"id": 171, "type": "<", "text": "<", "parent": 170, "children": [], "start_point": {"row": 71, "column": 33}, "end_point": {"row": 71, "column": 34}}, {"id": 172, "type": "primitive_type", "text": "double", "parent": 170, "children": [], "start_point": {"row": 71, "column": 34}, "end_point": {"row": 71, "column": 40}}, {"id": 173, "type": "parameter_list", "text": "(double)", "parent": 169, "children": [174], "start_point": {"row": 71, "column": 41}, "end_point": {"row": 71, "column": 49}}, {"id": 174, "type": "parameter_declaration", "text": "double", "parent": 173, "children": [175], "start_point": {"row": 71, "column": 42}, "end_point": {"row": 71, "column": 48}}, {"id": 175, "type": "primitive_type", "text": "double", "parent": 174, "children": [], "start_point": {"row": 71, "column": 42}, "end_point": {"row": 71, "column": 48}}, {"id": 176, "type": "ERROR", "text": "> &", "parent": 169, "children": [177], "start_point": {"row": 71, "column": 49}, "end_point": {"row": 71, "column": 52}}, {"id": 177, "type": ">", "text": ">", "parent": 176, "children": [], "start_point": {"row": 71, "column": 49}, "end_point": {"row": 71, "column": 50}}, {"id": 178, "type": "identifier", "text": "funPtr", "parent": 169, "children": [], "start_point": {"row": 71, "column": 52}, "end_point": {"row": 71, "column": 58}}, {"id": 179, "type": "parameter_declaration", "text": "double a", "parent": 166, "children": [180, 181], "start_point": {"row": 71, "column": 60}, "end_point": {"row": 71, "column": 68}}, {"id": 180, "type": "primitive_type", "text": "double", "parent": 179, "children": [], "start_point": {"row": 71, "column": 60}, "end_point": {"row": 71, "column": 66}}, {"id": 181, "type": "identifier", "text": "a", "parent": 179, "children": [], "start_point": {"row": 71, "column": 67}, "end_point": {"row": 71, "column": 68}}, {"id": 182, "type": "parameter_declaration", "text": "double b", "parent": 166, "children": [183, 184], "start_point": {"row": 71, "column": 70}, "end_point": {"row": 71, "column": 78}}, {"id": 183, "type": "primitive_type", "text": "double", "parent": 182, "children": [], "start_point": {"row": 71, "column": 70}, "end_point": {"row": 71, "column": 76}}, {"id": 184, "type": "identifier", "text": "b", "parent": 182, "children": [], "start_point": {"row": 71, "column": 77}, "end_point": {"row": 71, "column": 78}}, {"id": 185, "type": "parameter_declaration", "text": "double & root", "parent": 166, "children": [186, 187], "start_point": {"row": 71, "column": 80}, "end_point": {"row": 71, "column": 93}}, {"id": 186, "type": "primitive_type", "text": "double", "parent": 185, "children": [], "start_point": {"row": 71, "column": 80}, "end_point": {"row": 71, "column": 86}}, {"id": 187, "type": "identifier", "text": "root", "parent": 185, "children": [], "start_point": {"row": 71, "column": 89}, "end_point": {"row": 71, "column": 93}}, {"id": 188, "type": "parameter_declaration", "text": "double epsilon", "parent": 166, "children": [189, 190], "start_point": {"row": 71, "column": 95}, "end_point": {"row": 71, "column": 109}}, {"id": 189, "type": "primitive_type", "text": "double", "parent": 188, "children": [], "start_point": {"row": 71, "column": 95}, "end_point": {"row": 71, "column": 101}}, {"id": 190, "type": "identifier", "text": "epsilon", "parent": 188, "children": [], "start_point": {"row": 71, "column": 102}, "end_point": {"row": 71, "column": 109}}, {"id": 191, "type": "=", "text": "=", "parent": 163, "children": [], "start_point": {"row": 71, "column": 110}, "end_point": {"row": 71, "column": 111}}, {"id": 192, "type": "number_literal", "text": "1e-8", "parent": 163, "children": [], "start_point": {"row": 71, "column": 112}, "end_point": {"row": 71, "column": 116}}, {"id": 193, "type": "declaration", "text": "bool findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon = 1e-8);", "parent": 9, "children": [194, 195], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 149}}, {"id": 194, "type": "primitive_type", "text": "bool", "parent": 193, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 4}}, {"id": 195, "type": "init_declarator", "text": "findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon = 1e-8", "parent": 193, "children": [196, 223, 224], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 147}}, {"id": 196, "type": "function_declarator", "text": "findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon", "parent": 195, "children": [197, 198], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 140}}, {"id": 197, "type": "identifier", "text": "findMin", "parent": 196, "children": [], "start_point": {"row": 83, "column": 5}, "end_point": {"row": 83, "column": 12}}, {"id": 198, "type": "parameter_list", "text": "(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon", "parent": 196, "children": [199, 211, 214, 217, 220], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 140}}, {"id": 199, "type": "parameter_declaration", "text": "const std::function<double (double)> &funPtr", "parent": 198, "children": [200, 201], "start_point": {"row": 83, "column": 13}, "end_point": {"row": 83, "column": 57}}, {"id": 200, "type": "type_identifier", "text": "std", "parent": 199, "children": [], "start_point": {"row": 83, "column": 19}, "end_point": {"row": 83, "column": 22}}, {"id": 201, "type": "function_declarator", "text": "function<double (double)> &funPtr", "parent": 199, "children": [202, 205, 208, 210], "start_point": {"row": 83, "column": 24}, "end_point": {"row": 83, "column": 57}}, {"id": 202, "type": "ERROR", "text": "<double", "parent": 201, "children": [203, 204], "start_point": {"row": 83, "column": 32}, "end_point": {"row": 83, "column": 39}}, {"id": 203, "type": "<", "text": "<", "parent": 202, "children": [], "start_point": {"row": 83, "column": 32}, "end_point": {"row": 83, "column": 33}}, {"id": 204, "type": "primitive_type", "text": "double", "parent": 202, "children": [], "start_point": {"row": 83, "column": 33}, "end_point": {"row": 83, "column": 39}}, {"id": 205, "type": "parameter_list", "text": "(double)", "parent": 201, "children": [206], "start_point": {"row": 83, "column": 40}, "end_point": {"row": 83, "column": 48}}, {"id": 206, "type": "parameter_declaration", "text": "double", "parent": 205, "children": [207], "start_point": {"row": 83, "column": 41}, "end_point": {"row": 83, "column": 47}}, {"id": 207, "type": "primitive_type", "text": "double", "parent": 206, "children": [], "start_point": {"row": 83, "column": 41}, "end_point": {"row": 83, "column": 47}}, {"id": 208, "type": "ERROR", "text": "> &", "parent": 201, "children": [209], "start_point": {"row": 83, "column": 48}, "end_point": {"row": 83, "column": 51}}, {"id": 209, "type": ">", "text": ">", "parent": 208, "children": [], "start_point": {"row": 83, "column": 48}, "end_point": {"row": 83, "column": 49}}, {"id": 210, "type": "identifier", "text": "funPtr", "parent": 201, "children": [], "start_point": {"row": 83, "column": 51}, "end_point": {"row": 83, "column": 57}}, {"id": 211, "type": "parameter_declaration", "text": "const DoubleTriplet &abc", "parent": 198, "children": [212, 213], "start_point": {"row": 83, "column": 59}, "end_point": {"row": 83, "column": 83}}, {"id": 212, "type": "type_identifier", "text": "DoubleTriplet", "parent": 211, "children": [], "start_point": {"row": 83, "column": 65}, "end_point": {"row": 83, "column": 78}}, {"id": 213, "type": "identifier", "text": "abc", "parent": 211, "children": [], "start_point": {"row": 83, "column": 80}, "end_point": {"row": 83, "column": 83}}, {"id": 214, "type": "parameter_declaration", "text": "const DoubleTriplet &fabc", "parent": 198, "children": [215, 216], "start_point": {"row": 83, "column": 85}, "end_point": {"row": 83, "column": 110}}, {"id": 215, "type": "type_identifier", "text": "DoubleTriplet", "parent": 214, "children": [], "start_point": {"row": 83, "column": 91}, "end_point": {"row": 83, "column": 104}}, {"id": 216, "type": "identifier", "text": "fabc", "parent": 214, "children": [], "start_point": {"row": 83, "column": 106}, "end_point": {"row": 83, "column": 110}}, {"id": 217, "type": "parameter_declaration", "text": "double &root", "parent": 198, "children": [218, 219], "start_point": {"row": 83, "column": 112}, "end_point": {"row": 83, "column": 124}}, {"id": 218, "type": "primitive_type", "text": "double", "parent": 217, "children": [], "start_point": {"row": 83, "column": 112}, "end_point": {"row": 83, "column": 118}}, {"id": 219, "type": "identifier", "text": "root", "parent": 217, "children": [], "start_point": {"row": 83, "column": 120}, "end_point": {"row": 83, "column": 124}}, {"id": 220, "type": "parameter_declaration", "text": "double epsilon", "parent": 198, "children": [221, 222], "start_point": {"row": 83, "column": 126}, "end_point": {"row": 83, "column": 140}}, {"id": 221, "type": "primitive_type", "text": "double", "parent": 220, "children": [], "start_point": {"row": 83, "column": 126}, "end_point": {"row": 83, "column": 132}}, {"id": 222, "type": "identifier", "text": "epsilon", "parent": 220, "children": [], "start_point": {"row": 83, "column": 133}, "end_point": {"row": 83, "column": 140}}, {"id": 223, "type": "=", "text": "=", "parent": 195, "children": [], "start_point": {"row": 83, "column": 141}, "end_point": {"row": 83, "column": 142}}, {"id": 224, "type": "number_literal", "text": "1e-8", "parent": 195, "children": [], "start_point": {"row": 83, "column": 143}, "end_point": {"row": 83, "column": 147}}, {"id": 225, "type": "declaration", "text": "bool findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon = 1e-8);", "parent": 9, "children": [226, 227], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 115}}, {"id": 226, "type": "primitive_type", "text": "bool", "parent": 225, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 4}}, {"id": 227, "type": "init_declarator", "text": "findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon = 1e-8", "parent": 225, "children": [228, 252, 253], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 113}}, {"id": 228, "type": "function_declarator", "text": "findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon", "parent": 227, "children": [229, 230], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 106}}, {"id": 229, "type": "identifier", "text": "findMin", "parent": 228, "children": [], "start_point": {"row": 94, "column": 5}, "end_point": {"row": 94, "column": 12}}, {"id": 230, "type": "parameter_list", "text": "(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon", "parent": 228, "children": [231, 243, 246, 249], "start_point": {"row": 94, "column": 12}, "end_point": {"row": 94, "column": 106}}, {"id": 231, "type": "parameter_declaration", "text": "const std::function<double (double)> &funPtr", "parent": 230, "children": [232, 233], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 57}}, {"id": 232, "type": "type_identifier", "text": "std", "parent": 231, "children": [], "start_point": {"row": 94, "column": 19}, "end_point": {"row": 94, "column": 22}}, {"id": 233, "type": "function_declarator", "text": "function<double (double)> &funPtr", "parent": 231, "children": [234, 237, 240, 242], "start_point": {"row": 94, "column": 24}, "end_point": {"row": 94, "column": 57}}, {"id": 234, "type": "ERROR", "text": "<double", "parent": 233, "children": [235, 236], "start_point": {"row": 94, "column": 32}, "end_point": {"row": 94, "column": 39}}, {"id": 235, "type": "<", "text": "<", "parent": 234, "children": [], "start_point": {"row": 94, "column": 32}, "end_point": {"row": 94, "column": 33}}, {"id": 236, "type": "primitive_type", "text": "double", "parent": 234, "children": [], "start_point": {"row": 94, "column": 33}, "end_point": {"row": 94, "column": 39}}, {"id": 237, "type": "parameter_list", "text": "(double)", "parent": 233, "children": [238], "start_point": {"row": 94, "column": 40}, "end_point": {"row": 94, "column": 48}}, {"id": 238, "type": "parameter_declaration", "text": "double", "parent": 237, "children": [239], "start_point": {"row": 94, "column": 41}, "end_point": {"row": 94, "column": 47}}, {"id": 239, "type": "primitive_type", "text": "double", "parent": 238, "children": [], "start_point": {"row": 94, "column": 41}, "end_point": {"row": 94, "column": 47}}, {"id": 240, "type": "ERROR", "text": "> &", "parent": 233, "children": [241], "start_point": {"row": 94, "column": 48}, "end_point": {"row": 94, "column": 51}}, {"id": 241, "type": ">", "text": ">", "parent": 240, "children": [], "start_point": {"row": 94, "column": 48}, "end_point": {"row": 94, "column": 49}}, {"id": 242, "type": "identifier", "text": "funPtr", "parent": 233, "children": [], "start_point": {"row": 94, "column": 51}, "end_point": {"row": 94, "column": 57}}, {"id": 243, "type": "parameter_declaration", "text": "double closePoint", "parent": 230, "children": [244, 245], "start_point": {"row": 94, "column": 59}, "end_point": {"row": 94, "column": 76}}, {"id": 244, "type": "primitive_type", "text": "double", "parent": 243, "children": [], "start_point": {"row": 94, "column": 59}, "end_point": {"row": 94, "column": 65}}, {"id": 245, "type": "identifier", "text": "closePoint", "parent": 243, "children": [], "start_point": {"row": 94, "column": 66}, "end_point": {"row": 94, "column": 76}}, {"id": 246, "type": "parameter_declaration", "text": "double &root", "parent": 230, "children": [247, 248], "start_point": {"row": 94, "column": 78}, "end_point": {"row": 94, "column": 90}}, {"id": 247, "type": "primitive_type", "text": "double", "parent": 246, "children": [], "start_point": {"row": 94, "column": 78}, "end_point": {"row": 94, "column": 84}}, {"id": 248, "type": "identifier", "text": "root", "parent": 246, "children": [], "start_point": {"row": 94, "column": 86}, "end_point": {"row": 94, "column": 90}}, {"id": 249, "type": "parameter_declaration", "text": "double epsilon", "parent": 230, "children": [250, 251], "start_point": {"row": 94, "column": 92}, "end_point": {"row": 94, "column": 106}}, {"id": 250, "type": "primitive_type", "text": "double", "parent": 249, "children": [], "start_point": {"row": 94, "column": 92}, "end_point": {"row": 94, "column": 98}}, {"id": 251, "type": "identifier", "text": "epsilon", "parent": 249, "children": [], "start_point": {"row": 94, "column": 99}, "end_point": {"row": 94, "column": 106}}, {"id": 252, "type": "=", "text": "=", "parent": 227, "children": [], "start_point": {"row": 94, "column": 107}, "end_point": {"row": 94, "column": 108}}, {"id": 253, "type": "number_literal", "text": "1e-8", "parent": 227, "children": [], "start_point": {"row": 94, "column": 109}, "end_point": {"row": 94, "column": 113}}, {"id": 254, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 98, "column": 6}}]}, "node_categories": {"declarations": {"functions": [9, 15, 20, 50, 57, 82, 89, 114, 121, 164, 169, 196, 201, 228, 233], "variables": [12, 18, 25, 30, 33, 36, 47, 53, 60, 65, 68, 79, 85, 92, 97, 100, 111, 117, 124, 129, 137, 147, 150, 161, 167, 174, 179, 182, 185, 188, 193, 199, 206, 211, 214, 217, 220, 225, 231, 238, 243, 246, 249], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 11, 16, 19, 29, 32, 35, 38, 42, 44, 51, 54, 58, 64, 67, 70, 74, 76, 83, 86, 90, 96, 99, 102, 106, 108, 115, 118, 122, 125, 128, 130, 133, 134, 136, 138, 139, 143, 146, 148, 149, 152, 156, 158, 165, 168, 178, 181, 184, 187, 190, 197, 200, 210, 212, 213, 215, 216, 219, 222, 229, 232, 242, 245, 248, 251, 254], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 40, 46, 72, 78, 104, 110, 154, 160, 192, 224, 253], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "maxRecursionDepth", "text_snippet": "namespace RandMath\n{\n\n/**\n * @fn integral\n * @param funPtr integrand\n * @param a lower boundary\n * @"}, {"node_id": 15, "universal_type": "function", "name": "unknown", "text_snippet": "integral(const std::function<double (double)> &funPtr, double a, double b,\n "}, {"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "function<double (double)> &funPtr"}, {"node_id": 50, "universal_type": "function", "name": "unknown", "text_snippet": "findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol"}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "DoubleTriplet (double)> &funPtr"}, {"node_id": 82, "universal_type": "function", "name": "unknown", "text_snippet": "findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol"}, {"node_id": 89, "universal_type": "function", "name": "unknown", "text_snippet": "DoublePair (double)> &funPtr"}, {"node_id": 114, "universal_type": "function", "name": "unknown", "text_snippet": "findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<Double"}, {"node_id": 121, "universal_type": "function", "name": "unknown", "text_snippet": "DoublePair (DoublePair)> &funPtr"}, {"node_id": 164, "universal_type": "function", "name": "unknown", "text_snippet": "findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double eps"}, {"node_id": 169, "universal_type": "function", "name": "unknown", "text_snippet": "function<double (double)> &funPtr"}, {"node_id": 196, "universal_type": "function", "name": "unknown", "text_snippet": "findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet "}, {"node_id": 201, "universal_type": "function", "name": "unknown", "text_snippet": "function<double (double)> &funPtr"}, {"node_id": 228, "universal_type": "function", "name": "unknown", "text_snippet": "findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilo"}, {"node_id": 233, "universal_type": "function", "name": "unknown", "text_snippet": "function<double (double)> &funPtr"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"RandMath.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef NUMERICMATH\n#define NUMERICMATH\n\n#include \"RandMath.h\"\n\n/// Numerical procedures\n\nnamespace RandMath\n{\n\n/**\n * @fn integral\n * @param funPtr integrand\n * @param a lower boundary\n * @param b upper boundary\n * @param epsilon tolerance\n * @param maxRecursionDepth how deep should the algorithm go\n * @return\n */\ndouble integral(const std::function<double (double)> &funPtr, double a, double b,\n double epsilon = 1e-11, int maxRecursionDepth = 11);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first and second derivatives\n * @param funPtr mapping x |-> (f(x), f'(x), f''(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoubleTriplet (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure,\n * using first derivative\n * @param funPtr mapping x |-> (f(x), f'(x))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (double)> &funPtr, double & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Newton's root-finding procedure\n * for 2 functions of 2 parameters,\n * using Jacobian matrix\n * @param funPtr mapping x, y |-> (f(x, y), g(x, y))\n * @param gradPtr x, y |-> (f_x(x, y), f_y(x, y), g_x(x, y)), g_y(x, y))\n * @param root starting point in input and such x that f(x) = 0 in output\n * @param funTol function tolerance\n * @param stepTol step tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<DoublePair (DoublePair)> &funPtr, const std::function<std::tuple<DoublePair, DoublePair> (DoublePair)> &gradPtr,\n DoublePair & root, double funTol = 1e-10, double stepTol = 1e-6);\n\n/**\n * @fn findRoot\n * Brent's root-finding procedure\n * @param funPtr mapping x |-> f(x)\n * @param a lower boundary\n * @param b upper boundary\n * @param root starting point and such x that f(x) = 0\n * @param epsilon tolerance\n * @return true if success, false otherwise\n */\nbool findRoot(const std::function<double (double)> &funPtr, double a, double b, double & root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param abc lower boundary / middle / upper boundary\n * @param fabc funPtr(abc)\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, const DoubleTriplet &abc, const DoubleTriplet &fabc, double &root, double epsilon = 1e-8);\n\n/**\n * @fn findMin\n * Combined Brent's method\n * @param funPtr\n * @param closePoint point that is nearby minimum\n * @param root such x that funPtr(x) is min\n * @param epsilon tolerance\n * @return true if success\n */\nbool findMin(const std::function<double (double)> &funPtr, double closePoint, double &root, double epsilon = 1e-8);\n\n}\n\n#endif // NUMERICMATH\n\n"}
70
c
// // MKMPLoadStatusController.h // MKLoRaWAN-MP_Example // // Created by aa on 2021/10/24. // Copyright © 2021 <EMAIL>. All rights reserved. // #import <MKBaseModuleLibrary/MKBaseViewController.h> NS_ASSUME_NONNULL_BEGIN @interface MKMPLoadStatusController : MKBaseViewController @end NS_ASSUME_NONNULL_END
25
12
(translation_unit) "//\n// MKMPLoadStatusController.h\n// MKLoRaWAN-MP_Example\n//\n// Created by aa on 2021/10/24.\n// Copyright © 2021 <EMAIL>. All rights reserved.\n//\n\n#import <MKBaseModuleLibrary/MKBaseViewController.h>\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface MKMPLoadStatusController : MKBaseViewController\n\n@end\n\nNS_ASSUME_NONNULL_END\n" (comment) "//" (comment) "// MKMPLoadStatusController.h" (comment) "// MKLoRaWAN-MP_Example" (comment) "//" (comment) "// Created by aa on 2021/10/24." (comment) "// Copyright © 2021 <EMAIL>. All rights reserved.\n" (comment) "/\n" (preproc_call) "import <MKBaseModuleLibrary/MKBaseViewController.h>\n\n" (preproc_directive) "import " (preproc_arg) "MKBaseModuleLibrary/MKBaseViewController.h>\n" (declaration) "S_ASSUME_NONNULL_BEGIN\n\n@interface " (type_identifier) "S_ASSUME_NONNULL_BEGIN\n" (ERROR) "i" (ERROR) "i" (identifier) "nterface " (;) "" (labeled_statement) "KMPLoadStatusController : MKBaseViewController\n\n@end\n\nNS_ASSUME_NONNULL_END\n" (statement_identifier) "KMPLoadStatusController " (:) " " (declaration) "KBaseViewController\n\n@end\n\nNS_ASSUME_NONNULL_END\n" (type_identifier) "KBaseViewController\n" (ERROR) "end\n" (ERROR) "e" (identifier) "nd\n" (identifier) "S_ASSUME_NONNULL_END\n" (;) ""
27
4
{"language": "c", "success": true, "metadata": {"lines": 12, "avg_line_length": 25.0, "nodes": 14, "errors": 0, "source_hash": "a72d1b3cff7144b30c2db8b88c05a35b0662c63c189087adfac75eacb4eb1e33", "categorized_nodes": 9}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "import <MKBaseModuleLibrary/MKBaseViewController.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": "MKBaseModuleLibrary/MKBaseViewController.h>\n", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 52}}, {"id": 2, "type": "declaration", "text": "S_ASSUME_NONNULL_BEGIN\n\n@interface ", "parent": null, "children": [3, 4, 6], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 12, "column": 10}}, {"id": 3, "type": "type_identifier", "text": "S_ASSUME_NONNULL_BEGIN\n", "parent": 2, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 23}}, {"id": 4, "type": "ERROR", "text": "i", "parent": 2, "children": [5], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 5, "type": "ERROR", "text": "i", "parent": 4, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 6, "type": "identifier", "text": "nterface ", "parent": 2, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 10}}, {"id": 7, "type": "labeled_statement", "text": "KMPLoadStatusController : MKBaseViewController\n\n@end\n\nNS_ASSUME_NONNULL_END\n", "parent": null, "children": [8, 9], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 16, "column": 21}}, {"id": 8, "type": "statement_identifier", "text": "KMPLoadStatusController ", "parent": 7, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 35}}, {"id": 9, "type": "declaration", "text": "KBaseViewController\n\n@end\n\nNS_ASSUME_NONNULL_END\n", "parent": 7, "children": [10, 13], "start_point": {"row": 12, "column": 38}, "end_point": {"row": 16, "column": 21}}, {"id": 10, "type": "type_identifier", "text": "KBaseViewController\n", "parent": 9, "children": [], "start_point": {"row": 12, "column": 38}, "end_point": {"row": 12, "column": 58}}, {"id": 11, "type": "ERROR", "text": "e", "parent": 9, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 1}}, {"id": 12, "type": "identifier", "text": "nd\n", "parent": 9, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 4}}, {"id": 13, "type": "identifier", "text": "S_ASSUME_NONNULL_END\n", "parent": 9, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 21}}]}, "node_categories": {"declarations": {"functions": [], "variables": [2, 9], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [3, 6, 8, 10, 12, 13], "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// MKMPLoadStatusController.h\n// MKLoRaWAN-MP_Example\n//\n// Created by aa on 2021/10/24.\n// Copyright \u00a9 2021 <EMAIL>. All rights reserved.\n//\n\n#import <MKBaseModuleLibrary/MKBaseViewController.h>\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface MKMPLoadStatusController : MKBaseViewController\n\n@end\n\nNS_ASSUME_NONNULL_END\n"}
71
c
#pragma once #include <fstream> #include <map> #include <string> class Localization { public: std::map<std::string, std::string> local; explicit Localization(std::string local_file_name); void SetLocal(std::string local_file_name); };
23.2
10
(translation_unit) "#pragma once\n\n#include <fstream>\n#include <map>\n#include <string>\n\nclass Localization {\n public:\n std::map<std::string, std::string> local;\n\n explicit Localization(std::string local_file_name);\n\n void SetLocal(std::string local_file_name);\n};" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <fstream>\n" (#include) "#include" (system_lib_string) "<fstream>" (preproc_include) "#include <map>\n" (#include) "#include" (system_lib_string) "<map>" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (function_definition) "class Localization {\n public:\n std::map<std::string, std::string> local;\n\n explicit Localization(std::string local_file_name);\n\n void SetLocal(std::string local_file_name);\n}" (type_identifier) "class" (identifier) "Localization" (compound_statement) "{\n public:\n std::map<std::string, std::string> local;\n\n explicit Localization(std::string local_file_name);\n\n void SetLocal(std::string local_file_name);\n}" ({) "{" (labeled_statement) "public:\n std::map<std::string, std::string> local;" (statement_identifier) "public" (:) ":" (labeled_statement) "std::map<std::string, std::string> local;" (statement_identifier) "std" (ERROR) "::map<std::string, std:" (:) ":" (:) ":" (binary_expression) "map<std" (identifier) "map" (<) "<" (identifier) "std" (:) ":" (:) ":" (comma_expression) "string, std" (identifier) "string" (,) "," (identifier) "std" (:) ":" (:) ":" (expression_statement) "string> local;" (binary_expression) "string> local" (identifier) "string" (>) ">" (identifier) "local" (;) ";" (declaration) "explicit Localization(std::string local_file_name);" (type_identifier) "explicit" (function_declarator) "Localization(std::string local_file_name)" (identifier) "Localization" (parameter_list) "(std::string local_file_name)" (() "(" (parameter_declaration) "std::string local_file_name" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (identifier) "local_file_name" ()) ")" (;) ";" (declaration) "void SetLocal(std::string local_file_name);" (primitive_type) "void" (function_declarator) "SetLocal(std::string local_file_name)" (identifier) "SetLocal" (parameter_list) "(std::string local_file_name)" (() "(" (parameter_declaration) "std::string local_file_name" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (identifier) "local_file_name" ()) ")" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
77
3
{"language": "c", "success": true, "metadata": {"lines": 10, "avg_line_length": 23.2, "nodes": 49, "errors": 0, "source_hash": "e8eace6d589cf7deb10272a2dfbba891f0b82d45fb9f8d98e3b7bd0e8102fda7", "categorized_nodes": 37}, "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 <fstream>\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": "<fstream>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 18}}, {"id": 6, "type": "preproc_include", "text": "#include <map>\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": "<map>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 14}}, {"id": 9, "type": "preproc_include", "text": "#include <string>\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": "<string>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 9}, "end_point": {"row": 4, "column": 17}}, {"id": 12, "type": "function_definition", "text": "class Localization {\n public:\n std::map<std::string, std::string> local;\n\n explicit Localization(std::string local_file_name);\n\n void SetLocal(std::string local_file_name);\n}", "parent": null, "children": [13], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 13, "column": 1}}, {"id": 13, "type": "identifier", "text": "Localization", "parent": 12, "children": [], "start_point": {"row": 6, "column": 6}, "end_point": {"row": 6, "column": 18}}, {"id": 14, "type": "labeled_statement", "text": "public:\n std::map<std::string, std::string> local;", "parent": 12, "children": [15], "start_point": {"row": 7, "column": 1}, "end_point": {"row": 8, "column": 43}}, {"id": 15, "type": "labeled_statement", "text": "std::map<std::string, std::string> local;", "parent": 14, "children": [16, 17], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 43}}, {"id": 16, "type": "statement_identifier", "text": "std", "parent": 15, "children": [], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 5}}, {"id": 17, "type": "ERROR", "text": "::map<std::string, std:", "parent": 15, "children": [18, 22], "start_point": {"row": 8, "column": 5}, "end_point": {"row": 8, "column": 28}}, {"id": 18, "type": "binary_expression", "text": "map<std", "parent": 17, "children": [19, 20, 21], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 14}}, {"id": 19, "type": "identifier", "text": "map", "parent": 18, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 10}}, {"id": 20, "type": "<", "text": "<", "parent": 18, "children": [], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 11}}, {"id": 21, "type": "identifier", "text": "std", "parent": 18, "children": [], "start_point": {"row": 8, "column": 11}, "end_point": {"row": 8, "column": 14}}, {"id": 22, "type": "comma_expression", "text": "string, std", "parent": 17, "children": [23, 24], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 27}}, {"id": 23, "type": "identifier", "text": "string", "parent": 22, "children": [], "start_point": {"row": 8, "column": 16}, "end_point": {"row": 8, "column": 22}}, {"id": 24, "type": "identifier", "text": "std", "parent": 22, "children": [], "start_point": {"row": 8, "column": 24}, "end_point": {"row": 8, "column": 27}}, {"id": 25, "type": "binary_expression", "text": "string> local", "parent": 15, "children": [26, 27, 28], "start_point": {"row": 8, "column": 29}, "end_point": {"row": 8, "column": 42}}, {"id": 26, "type": "identifier", "text": "string", "parent": 25, "children": [], "start_point": {"row": 8, "column": 29}, "end_point": {"row": 8, "column": 35}}, {"id": 27, "type": ">", "text": ">", "parent": 25, "children": [], "start_point": {"row": 8, "column": 35}, "end_point": {"row": 8, "column": 36}}, {"id": 28, "type": "identifier", "text": "local", "parent": 25, "children": [], "start_point": {"row": 8, "column": 37}, "end_point": {"row": 8, "column": 42}}, {"id": 29, "type": "declaration", "text": "explicit Localization(std::string local_file_name);", "parent": 12, "children": [30, 31], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 53}}, {"id": 30, "type": "type_identifier", "text": "explicit", "parent": 29, "children": [], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 10}}, {"id": 31, "type": "function_declarator", "text": "Localization(std::string local_file_name)", "parent": 29, "children": [32, 33], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 52}}, {"id": 32, "type": "identifier", "text": "Localization", "parent": 31, "children": [], "start_point": {"row": 10, "column": 11}, "end_point": {"row": 10, "column": 23}}, {"id": 33, "type": "parameter_list", "text": "(std::string local_file_name)", "parent": 31, "children": [34], "start_point": {"row": 10, "column": 23}, "end_point": {"row": 10, "column": 52}}, {"id": 34, "type": "parameter_declaration", "text": "std::string local_file_name", "parent": 33, "children": [35, 36, 38], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 51}}, {"id": 35, "type": "type_identifier", "text": "std", "parent": 34, "children": [], "start_point": {"row": 10, "column": 24}, "end_point": {"row": 10, "column": 27}}, {"id": 36, "type": "ERROR", "text": "::string", "parent": 34, "children": [37], "start_point": {"row": 10, "column": 27}, "end_point": {"row": 10, "column": 35}}, {"id": 37, "type": "identifier", "text": "string", "parent": 36, "children": [], "start_point": {"row": 10, "column": 29}, "end_point": {"row": 10, "column": 35}}, {"id": 38, "type": "identifier", "text": "local_file_name", "parent": 34, "children": [], "start_point": {"row": 10, "column": 36}, "end_point": {"row": 10, "column": 51}}, {"id": 39, "type": "declaration", "text": "void SetLocal(std::string local_file_name);", "parent": 12, "children": [40, 41], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 45}}, {"id": 40, "type": "primitive_type", "text": "void", "parent": 39, "children": [], "start_point": {"row": 12, "column": 2}, "end_point": {"row": 12, "column": 6}}, {"id": 41, "type": "function_declarator", "text": "SetLocal(std::string local_file_name)", "parent": 39, "children": [42, 43], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 44}}, {"id": 42, "type": "identifier", "text": "SetLocal", "parent": 41, "children": [], "start_point": {"row": 12, "column": 7}, "end_point": {"row": 12, "column": 15}}, {"id": 43, "type": "parameter_list", "text": "(std::string local_file_name)", "parent": 41, "children": [44], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 44}}, {"id": 44, "type": "parameter_declaration", "text": "std::string local_file_name", "parent": 43, "children": [45, 46, 48], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 43}}, {"id": 45, "type": "type_identifier", "text": "std", "parent": 44, "children": [], "start_point": {"row": 12, "column": 16}, "end_point": {"row": 12, "column": 19}}, {"id": 46, "type": "ERROR", "text": "::string", "parent": 44, "children": [47], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 27}}, {"id": 47, "type": "identifier", "text": "string", "parent": 46, "children": [], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 12, "column": 27}}, {"id": 48, "type": "identifier", "text": "local_file_name", "parent": 44, "children": [], "start_point": {"row": 12, "column": 28}, "end_point": {"row": 12, "column": 43}}]}, "node_categories": {"declarations": {"functions": [12, 31, 41], "variables": [29, 34, 39, 44], "classes": [], "imports": [3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [18, 22, 25], "assignments": [], "loops": [], "conditionals": [13, 16, 19, 21, 23, 24, 26, 28, 30, 32, 35, 37, 38, 42, 45, 47, 48], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "Localization", "text_snippet": "class Localization {\n public:\n std::map<std::string, std::string> local;\n\n explicit Localization(s"}, {"node_id": 31, "universal_type": "function", "name": "unknown", "text_snippet": "Localization(std::string local_file_name)"}, {"node_id": 41, "universal_type": "function", "name": "unknown", "text_snippet": "SetLocal(std::string local_file_name)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <fstream>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <map>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <string>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <fstream>\n#include <map>\n#include <string>\n\nclass Localization {\n public:\n std::map<std::string, std::string> local;\n\n explicit Localization(std::string local_file_name);\n\n void SetLocal(std::string local_file_name);\n};"}
72
c
struct { struct a *b } * c; struct a { int d; int e }; f, g, h; i() { unsigned j; if (f) { j = 0; for (; j < g; ++j) if (c->b[j].e) break; if (j == g) goto k; c->b[j].d = 0; } if (h != f) l(); k:; }
10
23
(translation_unit) "struct {\n struct a *b\n} * c;\nstruct a {\n int d;\n int e\n};\nf, g, h;\ni() {\n unsigned j;\n if (f) {\n j = 0;\n for (; j < g; ++j)\n if (c->b[j].e)\n break;\n if (j == g)\n goto k;\n c->b[j].d = 0;\n }\n if (h != f)\n l();\nk:;\n}\n" (declaration) "struct {\n struct a *b\n} * c;" (struct_specifier) "struct {\n struct a *b\n}" (struct) "struct" (field_declaration_list) "{\n struct a *b\n}" ({) "{" (field_declaration) "struct a *b" (struct_specifier) "struct a" (struct) "struct" (type_identifier) "a" (pointer_declarator) "*b" (*) "*" (field_identifier) "b" (;) "" (}) "}" (pointer_declarator) "* c" (*) "*" (identifier) "c" (;) ";" (ERROR) "struct a {\n int d;\n int e\n};\nf, g, h;\ni() {\n unsigned j;\n if (f) {\n j = 0;\n for (; j < g; ++j)\n if (c->b[j].e)\n break;\n if (j == g)\n goto k;\n c->b[j].d = 0;\n }\n if (h != f)\n l();\nk:;\n}" (struct_specifier) "struct a {\n int d;\n int e\n};\nf, g, h;\ni() {\n unsigned j;\n if (f) {\n j = 0;\n for (; j < g; ++j)\n if (c->b[j].e)\n break;\n if (j == g)\n goto k;\n c->b[j].d = 0;\n }" (struct) "struct" (type_identifier) "a" (field_declaration_list) "{\n int d;\n int e\n};\nf, g, h;\ni() {\n unsigned j;\n if (f) {\n j = 0;\n for (; j < g; ++j)\n if (c->b[j].e)\n break;\n if (j == g)\n goto k;\n c->b[j].d = 0;\n }" ({) "{" (field_declaration) "int d;" (primitive_type) "int" (field_identifier) "d" (;) ";" (field_declaration) "int e\n};" (primitive_type) "int" (field_identifier) "e" (ERROR) "}" (}) "}" (;) ";" (field_declaration) "f, g, h;" (type_identifier) "f" (ERROR) "," (,) "," (field_identifier) "g" (,) "," (field_identifier) "h" (;) ";" (field_declaration) "i() {\n unsigned j;" (macro_type_specifier) "i() {\n unsigned j" (identifier) "i" (() "(" (ERROR) ") {" ()) ")" ({) "{" (type_descriptor) "unsigned j" (sized_type_specifier) "unsigned j" (unsigned) "unsigned" (type_identifier) "j" ()) "" (;) ";" (field_declaration) "if (f) {\n j = 0;" (macro_type_specifier) "if (f)" (identifier) "if" (() "(" (type_descriptor) "f" (type_identifier) "f" ()) ")" (ERROR) "{" ({) "{" (field_identifier) "j" (ERROR) "= 0" (=) "=" (number_literal) "0" (;) ";" (field_declaration) "for (;" (type_identifier) "for" (ERROR) "(" (() "(" (;) ";" (field_declaration) "j < g;" (type_identifier) "j" (ERROR) "<" (<) "<" (field_identifier) "g" (;) ";" (ERROR) "++" (+) "+" (+) "+" (field_declaration) "j)\n if (c->b[j].e)\n break;" (type_identifier) "j" (ERROR) ")\n if (c->b[j].e)" ()) ")" (if) "if" (parenthesized_declarator) "(c->b[j].e)" (() "(" (ERROR) "c->b[j]." (field_identifier) "c" (->) "->" (array_declarator) "b[j]" (field_identifier) "b" ([) "[" (identifier) "j" (]) "]" (.) "." (field_identifier) "e" ()) ")" (field_identifier) "break" (;) ";" (field_declaration) "if (j == g)\n goto k;" (macro_type_specifier) "if (j == g)" (identifier) "if" (() "(" (type_descriptor) "j" (type_identifier) "j" (ERROR) "== g" (==) "==" (identifier) "g" ()) ")" (field_identifier) "goto" (ERROR) "k" (identifier) "k" (;) ";" (field_declaration) "c->b[j].d = 0;" (type_identifier) "c" (ERROR) "->b[j]." (->) "->" (array_declarator) "b[j]" (field_identifier) "b" ([) "[" (identifier) "j" (]) "]" (.) "." (field_identifier) "d" (ERROR) "= 0" (=) "=" (number_literal) "0" (;) ";" (}) "}" (function_declarator) "if (h != f)\n l()" (identifier) "if" (parameter_list) "(h != f)" (() "(" (parameter_declaration) "h != f" (type_identifier) "h" (ERROR) "!=" (!=) "!=" (identifier) "f" ()) ")" (call_expression) "l()" (identifier) "l" (argument_list) "()" (() "(" ()) ")" (;) ";" (identifier) "k" (:) ":" (;) ";" (}) "}"
154
16
{"language": "c", "success": true, "metadata": {"lines": 23, "avg_line_length": 10.0, "nodes": 94, "errors": 0, "source_hash": "938646fba009da39e2b63ba62cb37c220fdfc33bfb56e5a2c802407ab4e933ff", "categorized_nodes": 60}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "declaration", "text": "struct {\n struct a *b\n} * c;", "parent": null, "children": [1, 10], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 2, "column": 6}}, {"id": 1, "type": "struct_specifier", "text": "struct {\n struct a *b\n}", "parent": 0, "children": [2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 2, "column": 1}}, {"id": 2, "type": "struct", "text": "struct", "parent": 1, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 6}}, {"id": 3, "type": "field_declaration", "text": "struct a *b", "parent": 1, "children": [4, 7], "start_point": {"row": 1, "column": 2}, "end_point": {"row": 1, "column": 13}}, {"id": 4, "type": "struct_specifier", "text": "struct a", "parent": 3, "children": [5, 6], "start_point": {"row": 1, "column": 2}, "end_point": {"row": 1, "column": 10}}, {"id": 5, "type": "struct", "text": "struct", "parent": 4, "children": [], "start_point": {"row": 1, "column": 2}, "end_point": {"row": 1, "column": 8}}, {"id": 6, "type": "type_identifier", "text": "a", "parent": 4, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 10}}, {"id": 7, "type": "pointer_declarator", "text": "*b", "parent": 3, "children": [8, 9], "start_point": {"row": 1, "column": 11}, "end_point": {"row": 1, "column": 13}}, {"id": 8, "type": "*", "text": "*", "parent": 7, "children": [], "start_point": {"row": 1, "column": 11}, "end_point": {"row": 1, "column": 12}}, {"id": 9, "type": "field_identifier", "text": "b", "parent": 7, "children": [], "start_point": {"row": 1, "column": 12}, "end_point": {"row": 1, "column": 13}}, {"id": 10, "type": "pointer_declarator", "text": "* c", "parent": 0, "children": [11, 12], "start_point": {"row": 2, "column": 2}, "end_point": {"row": 2, "column": 5}}, {"id": 11, "type": "*", "text": "*", "parent": 10, "children": [], "start_point": {"row": 2, "column": 2}, "end_point": {"row": 2, "column": 3}}, {"id": 12, "type": "identifier", "text": "c", "parent": 10, "children": [], "start_point": {"row": 2, "column": 4}, "end_point": {"row": 2, "column": 5}}, {"id": 13, "type": "ERROR", "text": "struct a {\n int d;\n int e\n};\nf, g, h;\ni() {\n unsigned j;\n if (f) {\n j = 0;\n for (; j < g; ++j)\n if (c->b[j].e)\n break;\n if (j == g)\n goto k;\n c->b[j].d = 0;\n }\n if (h != f)\n l();\nk:;\n}", "parent": null, "children": [14, 83, 93], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 14, "type": "struct_specifier", "text": "struct a {\n int d;\n int e\n};\nf, g, h;\ni() {\n unsigned j;\n if (f) {\n j = 0;\n for (; j < g; ++j)\n if (c->b[j].e)\n break;\n if (j == g)\n goto k;\n c->b[j].d = 0;\n }", "parent": 13, "children": [15, 16], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 18, "column": 3}}, {"id": 15, "type": "struct", "text": "struct", "parent": 14, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 6}}, {"id": 16, "type": "type_identifier", "text": "a", "parent": 14, "children": [], "start_point": {"row": 3, "column": 7}, "end_point": {"row": 3, "column": 8}}, {"id": 17, "type": "field_declaration", "text": "int d;", "parent": 14, "children": [18, 19], "start_point": {"row": 4, "column": 2}, "end_point": {"row": 4, "column": 8}}, {"id": 18, "type": "primitive_type", "text": "int", "parent": 17, "children": [], "start_point": {"row": 4, "column": 2}, "end_point": {"row": 4, "column": 5}}, {"id": 19, "type": "field_identifier", "text": "d", "parent": 17, "children": [], "start_point": {"row": 4, "column": 6}, "end_point": {"row": 4, "column": 7}}, {"id": 20, "type": "field_declaration", "text": "int e\n};", "parent": 14, "children": [21, 22], "start_point": {"row": 5, "column": 2}, "end_point": {"row": 6, "column": 2}}, {"id": 21, "type": "primitive_type", "text": "int", "parent": 20, "children": [], "start_point": {"row": 5, "column": 2}, "end_point": {"row": 5, "column": 5}}, {"id": 22, "type": "field_identifier", "text": "e", "parent": 20, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 7}}, {"id": 23, "type": "field_declaration", "text": "f, g, h;", "parent": 14, "children": [24, 25, 26], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 24, "type": "type_identifier", "text": "f", "parent": 23, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 1}}, {"id": 25, "type": "field_identifier", "text": "g", "parent": 23, "children": [], "start_point": {"row": 7, "column": 3}, "end_point": {"row": 7, "column": 4}}, {"id": 26, "type": "field_identifier", "text": "h", "parent": 23, "children": [], "start_point": {"row": 7, "column": 6}, "end_point": {"row": 7, "column": 7}}, {"id": 27, "type": "field_declaration", "text": "i() {\n unsigned j;", "parent": 14, "children": [28], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 13}}, {"id": 28, "type": "macro_type_specifier", "text": "i() {\n unsigned j", "parent": 27, "children": [29, 30, 31], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 12}}, {"id": 29, "type": "identifier", "text": "i", "parent": 28, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 1}}, {"id": 30, "type": "ERROR", "text": ") {", "parent": 28, "children": [], "start_point": {"row": 8, "column": 2}, "end_point": {"row": 8, "column": 5}}, {"id": 31, "type": "type_descriptor", "text": "unsigned j", "parent": 28, "children": [32], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 12}}, {"id": 32, "type": "sized_type_specifier", "text": "unsigned j", "parent": 31, "children": [33, 34], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 12}}, {"id": 33, "type": "unsigned", "text": "unsigned", "parent": 32, "children": [], "start_point": {"row": 9, "column": 2}, "end_point": {"row": 9, "column": 10}}, {"id": 34, "type": "type_identifier", "text": "j", "parent": 32, "children": [], "start_point": {"row": 9, "column": 11}, "end_point": {"row": 9, "column": 12}}, {"id": 35, "type": "field_declaration", "text": "if (f) {\n j = 0;", "parent": 14, "children": [36, 39, 40], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 11, "column": 10}}, {"id": 36, "type": "macro_type_specifier", "text": "if (f)", "parent": 35, "children": [37], "start_point": {"row": 10, "column": 2}, "end_point": {"row": 10, "column": 8}}, {"id": 37, "type": "type_descriptor", "text": "f", "parent": 36, "children": [38], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 7}}, {"id": 38, "type": "type_identifier", "text": "f", "parent": 37, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 7}}, {"id": 39, "type": "field_identifier", "text": "j", "parent": 35, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 5}}, {"id": 40, "type": "ERROR", "text": "= 0", "parent": 35, "children": [41, 42], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 9}}, {"id": 41, "type": "=", "text": "=", "parent": 40, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 7}}, {"id": 42, "type": "number_literal", "text": "0", "parent": 40, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 9}}, {"id": 43, "type": "field_declaration", "text": "for (;", "parent": 14, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 10}}, {"id": 44, "type": "field_declaration", "text": "j < g;", "parent": 14, "children": [45, 46, 48], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 17}}, {"id": 45, "type": "type_identifier", "text": "j", "parent": 44, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 12}}, {"id": 46, "type": "ERROR", "text": "<", "parent": 44, "children": [47], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 14}}, {"id": 47, "type": "<", "text": "<", "parent": 46, "children": [], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 14}}, {"id": 48, "type": "field_identifier", "text": "g", "parent": 44, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 16}}, {"id": 49, "type": "ERROR", "text": "++", "parent": 14, "children": [50, 51], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 20}}, {"id": 50, "type": "+", "text": "+", "parent": 49, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 19}}, {"id": 51, "type": "+", "text": "+", "parent": 49, "children": [], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 20}}, {"id": 52, "type": "field_declaration", "text": "j)\n if (c->b[j].e)\n break;", "parent": 14, "children": [53, 54, 62], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 14, "column": 14}}, {"id": 53, "type": "type_identifier", "text": "j", "parent": 52, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 21}}, {"id": 54, "type": "ERROR", "text": ")\n if (c->b[j].e)", "parent": 52, "children": [55], "start_point": {"row": 12, "column": 21}, "end_point": {"row": 13, "column": 20}}, {"id": 55, "type": "parenthesized_declarator", "text": "(c->b[j].e)", "parent": 54, "children": [56, 61], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 20}}, {"id": 56, "type": "ERROR", "text": "c->b[j].", "parent": 55, "children": [57, 58], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 18}}, {"id": 57, "type": "field_identifier", "text": "c", "parent": 56, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 11}}, {"id": 58, "type": "array_declarator", "text": "b[j]", "parent": 56, "children": [59, 60], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 17}}, {"id": 59, "type": "field_identifier", "text": "b", "parent": 58, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 14}}, {"id": 60, "type": "identifier", "text": "j", "parent": 58, "children": [], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 16}}, {"id": 61, "type": "field_identifier", "text": "e", "parent": 55, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 19}}, {"id": 62, "type": "field_identifier", "text": "break", "parent": 52, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 13}}, {"id": 63, "type": "field_declaration", "text": "if (j == g)\n goto k;", "parent": 14, "children": [64, 70, 71], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 16, "column": 13}}, {"id": 64, "type": "macro_type_specifier", "text": "if (j == g)", "parent": 63, "children": [65, 67], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 15}}, {"id": 65, "type": "type_descriptor", "text": "j", "parent": 64, "children": [66], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 9}}, {"id": 66, "type": "type_identifier", "text": "j", "parent": 65, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 9}}, {"id": 67, "type": "ERROR", "text": "== g", "parent": 64, "children": [68, 69], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 14}}, {"id": 68, "type": "==", "text": "==", "parent": 67, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 12}}, {"id": 69, "type": "identifier", "text": "g", "parent": 67, "children": [], "start_point": {"row": 15, "column": 13}, "end_point": {"row": 15, "column": 14}}, {"id": 70, "type": "field_identifier", "text": "goto", "parent": 63, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 10}}, {"id": 71, "type": "ERROR", "text": "k", "parent": 63, "children": [72], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 12}}, {"id": 72, "type": "identifier", "text": "k", "parent": 71, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 12}}, {"id": 73, "type": "field_declaration", "text": "c->b[j].d = 0;", "parent": 14, "children": [74, 75, 79, 80], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 18}}, {"id": 74, "type": "type_identifier", "text": "c", "parent": 73, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 5}}, {"id": 75, "type": "ERROR", "text": "->b[j].", "parent": 73, "children": [76], "start_point": {"row": 17, "column": 5}, "end_point": {"row": 17, "column": 12}}, {"id": 76, "type": "array_declarator", "text": "b[j]", "parent": 75, "children": [77, 78], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 11}}, {"id": 77, "type": "field_identifier", "text": "b", "parent": 76, "children": [], "start_point": {"row": 17, "column": 7}, "end_point": {"row": 17, "column": 8}}, {"id": 78, "type": "identifier", "text": "j", "parent": 76, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 10}}, {"id": 79, "type": "field_identifier", "text": "d", "parent": 73, "children": [], "start_point": {"row": 17, "column": 12}, "end_point": {"row": 17, "column": 13}}, {"id": 80, "type": "ERROR", "text": "= 0", "parent": 73, "children": [81, 82], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 17}}, {"id": 81, "type": "=", "text": "=", "parent": 80, "children": [], "start_point": {"row": 17, "column": 14}, "end_point": {"row": 17, "column": 15}}, {"id": 82, "type": "number_literal", "text": "0", "parent": 80, "children": [], "start_point": {"row": 17, "column": 16}, "end_point": {"row": 17, "column": 17}}, {"id": 83, "type": "function_declarator", "text": "if (h != f)\n l()", "parent": 13, "children": [84, 90], "start_point": {"row": 19, "column": 2}, "end_point": {"row": 20, "column": 7}}, {"id": 84, "type": "parameter_list", "text": "(h != f)", "parent": 83, "children": [85], "start_point": {"row": 19, "column": 5}, "end_point": {"row": 19, "column": 13}}, {"id": 85, "type": "parameter_declaration", "text": "h != f", "parent": 84, "children": [86, 87, 89], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 12}}, {"id": 86, "type": "type_identifier", "text": "h", "parent": 85, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 7}}, {"id": 87, "type": "ERROR", "text": "!=", "parent": 85, "children": [88], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 10}}, {"id": 88, "type": "!=", "text": "!=", "parent": 87, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 10}}, {"id": 89, "type": "identifier", "text": "f", "parent": 85, "children": [], "start_point": {"row": 19, "column": 11}, "end_point": {"row": 19, "column": 12}}, {"id": 90, "type": "call_expression", "text": "l()", "parent": 83, "children": [91, 92], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 7}}, {"id": 91, "type": "identifier", "text": "l", "parent": 90, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 5}}, {"id": 92, "type": "argument_list", "text": "()", "parent": 90, "children": [], "start_point": {"row": 20, "column": 5}, "end_point": {"row": 20, "column": 7}}, {"id": 93, "type": "identifier", "text": "k", "parent": 13, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}]}, "node_categories": {"declarations": {"functions": [83], "variables": [0, 3, 17, 20, 23, 27, 35, 43, 44, 52, 63, 73, 85], "classes": [1, 2, 4, 5, 14, 15], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [90], "assignments": [], "loops": [], "conditionals": [6, 9, 12, 16, 19, 22, 24, 25, 26, 28, 29, 32, 34, 36, 38, 39, 45, 48, 53, 57, 59, 60, 61, 62, 64, 66, 69, 70, 72, 74, 77, 78, 79, 86, 89, 91, 93], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [42, 82], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 83, "universal_type": "function", "name": "unknown", "text_snippet": "if (h != f)\n l()"}], "class_declarations": [{"node_id": 1, "universal_type": "class", "name": "{", "text_snippet": "struct {\n struct a *b\n}"}, {"node_id": 2, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 4, "universal_type": "class", "name": "a", "text_snippet": "struct a"}, {"node_id": 5, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 14, "universal_type": "class", "name": "a", "text_snippet": "struct a {\n int d;\n int e\n};\nf, g, h;\ni() {\n unsigned j;\n if (f) {\n j = 0;\n for (; j < g; "}, {"node_id": 15, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": []}, "original_source_code": "struct {\n struct a *b\n} * c;\nstruct a {\n int d;\n int e\n};\nf, g, h;\ni() {\n unsigned j;\n if (f) {\n j = 0;\n for (; j < g; ++j)\n if (c->b[j].e)\n break;\n if (j == g)\n goto k;\n c->b[j].d = 0;\n }\n if (h != f)\n l();\nk:;\n}\n"}
73
c
/**************************************************************************** ** ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (<EMAIL>) ** ** This file is part of the qmake spec of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial Usage ** Licensees holding valid Qt Commercial licenses may use this file in ** accordance with the Qt Commercial License Agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Nokia. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you have questions regarding the use of this file, please contact ** Nokia at <EMAIL>. ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QPLATFORMDEFS_H #define QPLATFORMDEFS_H #ifdef UNICODE #ifndef _UNICODE #define _UNICODE #endif #endif // Get Qt defines/settings #include "qglobal.h" #define _POSIX_ #include <limits.h> #undef _POSIX_ #include <tchar.h> #include <io.h> #include <direct.h> #include <stdio.h> #include <fcntl.h> #include <errno.h> #include <sys/stat.h> #include <stdlib.h> #include <windows.h> #define Q_FS_FAT #ifdef QT_LARGEFILE_SUPPORT #define QT_STATBUF struct _stati64 // non-ANSI defs #define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs #define QT_STAT ::_stati64 #define QT_FSTAT ::_fstati64 #else #define QT_STATBUF struct _stat // non-ANSI defs #define QT_STATBUF4TSTAT struct _stat // non-ANSI defs #define QT_STAT ::_stat #define QT_FSTAT ::_fstat #endif #define QT_STAT_REG _S_IFREG #define QT_STAT_DIR _S_IFDIR #define QT_STAT_MASK _S_IFMT #if defined(_S_IFLNK) # define QT_STAT_LNK _S_IFLNK #endif #define QT_FILENO _fileno #define QT_OPEN ::_open #define QT_CLOSE ::_close #ifdef QT_LARGEFILE_SUPPORT #define QT_LSEEK ::_lseeki64 #define QT_TSTAT ::_tstati64 #else #define QT_LSEEK ::_lseek #define QT_TSTAT ::_tstat #endif #define QT_READ ::_read #define QT_WRITE ::_write #define QT_ACCESS ::_access #define QT_GETCWD ::_getcwd #define QT_CHDIR ::_chdir #define QT_MKDIR ::_mkdir #define QT_RMDIR ::_rmdir #define QT_OPEN_LARGEFILE 0 #define QT_OPEN_RDONLY _O_RDONLY #define QT_OPEN_WRONLY _O_WRONLY #define QT_OPEN_RDWR _O_RDWR #define QT_OPEN_CREAT _O_CREAT #define QT_OPEN_TRUNC _O_TRUNC #define QT_OPEN_APPEND _O_APPEND #if defined(O_TEXT) # define QT_OPEN_TEXT _O_TEXT # define QT_OPEN_BINARY _O_BINARY #endif #include "../common/c89/qplatformdefs.h" #ifdef QT_LARGEFILE_SUPPORT #undef QT_FTELL #undef QT_OFF_T // 64-bit versions of fseek/ftell not always available. E.g., when linking // dynamically to CRT (/MT) #define QT_FTELL (QT_OFF_T)::ftell #define QT_OFF_T __int64 #endif #define QT_SIGNAL_ARGS int #define QT_VSNPRINTF ::_vsnprintf #define QT_SNPRINTF ::_snprintf # define F_OK 0 # define X_OK 1 # define W_OK 2 # define R_OK 4 typedef int mode_t; #endif // QPLATFORMDEFS_H
29.4
140
(translation_unit) "/**************************************************************************** \n** \n** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). \n** All rights reserved. \n** Contact: Nokia Corporation (<EMAIL>) \n** \n** This file is part of the qmake spec of the Qt Toolkit. \n** \n** $QT_BEGIN_LICENSE:LGPL$ \n** Commercial Usage \n** Licensees holding valid Qt Commercial licenses may use this file in \n** accordance with the Qt Commercial License Agreement provided with the \n** Software or, alternatively, in accordance with the terms contained in \n** a written agreement between you and Nokia. \n** \n** GNU Lesser General Public License Usage \n** Alternatively, this file may be used under the terms of the GNU Lesser \n** General Public License version 2.1 as published by the Free Software \n** Foundation and appearing in the file LICENSE.LGPL included in the \n** packaging of this file. Please review the following information to \n** ensure the GNU Lesser General Public License version 2.1 requirements \n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. \n** \n** In addition, as a special exception, Nokia gives you certain additional \n** rights. These rights are described in the Nokia Qt LGPL Exception \n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. \n** \n** GNU General Public License Usage \n** Alternatively, this file may be used under the terms of the GNU \n** General Public License version 3.0 as published by the Free Software \n** Foundation and appearing in the file LICENSE.GPL included in the \n** packaging of this file. Please review the following information to \n** ensure the GNU General Public License version 3.0 requirements will be \n** met: http://www.gnu.org/copyleft/gpl.html. \n** \n** If you have questions regarding the use of this file, please contact \n** Nokia at <EMAIL>. \n** $QT_END_LICENSE$ \n** \n****************************************************************************/ \n \n#ifndef QPLATFORMDEFS_H \n#define QPLATFORMDEFS_H \n \n#ifdef UNICODE \n#ifndef _UNICODE \n#define _UNICODE \n#endif \n#endif \n \n// Get Qt defines/settings \n \n#include "qglobal.h" \n \n#define _POSIX_ \n#include <limits.h> \n#undef _POSIX_ \n \n#include <tchar.h> \n#include <io.h> \n#include <direct.h> \n#include <stdio.h> \n#include <fcntl.h> \n#include <errno.h> \n#include <sys/stat.h> \n#include <stdlib.h> \n#include <windows.h> \n \n#define Q_FS_FAT \n#ifdef QT_LARGEFILE_SUPPORT \n#define QT_STATBUF struct _stati64 // non-ANSI defs \n#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs \n#define QT_STAT ::_stati64 \n#define QT_FSTAT ::_fstati64 \n#else \n#define QT_STATBUF struct _stat // non-ANSI defs \n#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs \n#define QT_STAT ::_stat \n#define QT_FSTAT ::_fstat \n#endif \n#define QT_STAT_REG _S_IFREG \n#define QT_STAT_DIR _S_IFDIR \n#define QT_STAT_MASK _S_IFMT \n#if defined(_S_IFLNK) \n# define QT_STAT_LNK _S_IFLNK \n#endif \n#define QT_FILENO _fileno \n#define QT_OPEN ::_open \n#define QT_CLOSE ::_close \n#ifdef QT_LARGEFILE_SUPPORT \n#define QT_LSEEK ::_lseeki64 \n#define QT_TSTAT ::_tstati64 \n#else \n#define QT_LSEEK ::_lseek \n#define QT_TSTAT ::_tstat \n#endif \n#define QT_READ ::_read \n#define QT_WRITE ::_write \n#define QT_ACCESS ::_access \n#define QT_GETCWD ::_getcwd \n#define QT_CHDIR ::_chdir \n#define QT_MKDIR ::_mkdir \n#define QT_RMDIR ::_rmdir \n#define QT_OPEN_LARGEFILE 0 \n#define QT_OPEN_RDONLY _O_RDONLY \n#define QT_OPEN_WRONLY _O_WRONLY \n#define QT_OPEN_RDWR _O_RDWR \n#define QT_OPEN_CREAT _O_CREAT \n#define QT_OPEN_TRUNC _O_TRUNC \n#define QT_OPEN_APPEND _O_APPEND \n#if defined(O_TEXT) \n# define QT_OPEN_TEXT _O_TEXT \n# define QT_OPEN_BINARY _O_BINARY \n#endif \n \n#include "../common/c89/qplatformdefs.h" \n \n#ifdef QT_LARGEFILE_SUPPORT \n#undef QT_FTELL \n#undef QT_OFF_T \n \n// 64-bit versions of fseek/ftell not always available. E.g., when linking \n// dynamically to CRT (/MT) \n#define QT_FTELL (QT_OFF_T)::ftell \n#define QT_OFF_T __int64 \n#endif \n \n#define QT_SIGNAL_ARGS int \n \n#define QT_VSNPRINTF ::_vsnprintf \n#define QT_SNPRINTF ::_snprintf \n \n# define F_OK 0 \n# define X_OK 1 \n# define W_OK 2 \n# define R_OK 4 \n \ntypedef int mode_t; \n \n#endif // QPLATFORMDEFS_H \n" (comment) "/**************************************************************************** \n** \n** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). \n** All rights reserved. \n** Contact: Nokia Corporation (<EMAIL>) \n** \n** This file is part of the qmake spec of the Qt Toolkit. \n** \n** $QT_BEGIN_LICENSE:LGPL$ \n** Commercial Usage \n** Licensees holding valid Qt Commercial licenses may use this file in \n** accordance with the Qt Commercial License Agreement provided with the \n** Software or, alternatively, in accordance with the terms contained in \n** a written agreement between you and Nokia. \n** \n** GNU Lesser General Public License Usage \n** Alternatively, this file may be used under the terms of the GNU Lesser \n** General Public License version 2.1 as published by the Free Software \n** Foundation and appearing in the file LICENSE.LGPL included in the \n** packaging of this file. Please review the following information to \n** ensure the GNU Lesser General Public License version 2.1 requirements \n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. \n** \n** In addition, as a special exception, Nokia gives you certain additional \n** rights. These rights are described in the Nokia Qt LGPL Exception \n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. \n** \n** GNU General Public License Usage \n** Alternatively, this file may be used under the terms of the GNU \n** General Public License version 3.0 as published by the Free Software \n** Foundation and appearing in the file LICENSE.GPL included in the \n** packaging of this file. Please review the following information to \n** ensure the GNU General Public License version 3.0 requirements will be \n** met: http://www.gnu.org/copyleft/gpl.html. \n** \n** If you have questions regarding the use of this file, please contact \n** Nokia at <EMAIL>. \n** $QT_END_LICENSE$ \n** \n****************************************************************************/" (preproc_ifdef) "#ifndef QPLATFORMDEFS_H \n#define QPLATFORMDEFS_H \n \n#ifdef UNICODE \n#ifndef _UNICODE \n#define _UNICODE \n#endif \n#endif \n \n// Get Qt defines/settings \n \n#include "qglobal.h" \n \n#define _POSIX_ \n#include <limits.h> \n#undef _POSIX_ \n \n#include <tchar.h> \n#include <io.h> \n#include <direct.h> \n#include <stdio.h> \n#include <fcntl.h> \n#include <errno.h> \n#include <sys/stat.h> \n#include <stdlib.h> \n#include <windows.h> \n \n#define Q_FS_FAT \n#ifdef QT_LARGEFILE_SUPPORT \n#define QT_STATBUF struct _stati64 // non-ANSI defs \n#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs \n#define QT_STAT ::_stati64 \n#define QT_FSTAT ::_fstati64 \n#else \n#define QT_STATBUF struct _stat // non-ANSI defs \n#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs \n#define QT_STAT ::_stat \n#define QT_FSTAT ::_fstat \n#endif \n#define QT_STAT_REG _S_IFREG \n#define QT_STAT_DIR _S_IFDIR \n#define QT_STAT_MASK _S_IFMT \n#if defined(_S_IFLNK) \n# define QT_STAT_LNK _S_IFLNK \n#endif \n#define QT_FILENO _fileno \n#define QT_OPEN ::_open \n#define QT_CLOSE ::_close \n#ifdef QT_LARGEFILE_SUPPORT \n#define QT_LSEEK ::_lseeki64 \n#define QT_TSTAT ::_tstati64 \n#else \n#define QT_LSEEK ::_lseek \n#define QT_TSTAT ::_tstat \n#endif \n#define QT_READ ::_read \n#define QT_WRITE ::_write \n#define QT_ACCESS ::_access \n#define QT_GETCWD ::_getcwd \n#define QT_CHDIR ::_chdir \n#define QT_MKDIR ::_mkdir \n#define QT_RMDIR ::_rmdir \n#define QT_OPEN_LARGEFILE 0 \n#define QT_OPEN_RDONLY _O_RDONLY \n#define QT_OPEN_WRONLY _O_WRONLY \n#define QT_OPEN_RDWR _O_RDWR \n#define QT_OPEN_CREAT _O_CREAT \n#define QT_OPEN_TRUNC _O_TRUNC \n#define QT_OPEN_APPEND _O_APPEND \n#if defined(O_TEXT) \n# define QT_OPEN_TEXT _O_TEXT \n# define QT_OPEN_BINARY _O_BINARY \n#endif \n \n#include "../common/c89/qplatformdefs.h" \n \n#ifdef QT_LARGEFILE_SUPPORT \n#undef QT_FTELL \n#undef QT_OFF_T \n \n// 64-bit versions of fseek/ftell not always available. E.g., when linking \n// dynamically to CRT (/MT) \n#define QT_FTELL (QT_OFF_T)::ftell \n#define QT_OFF_T __int64 \n#endif \n \n#define QT_SIGNAL_ARGS int \n \n#define QT_VSNPRINTF ::_vsnprintf \n#define QT_SNPRINTF ::_snprintf \n \n# define F_OK 0 \n# define X_OK 1 \n# define W_OK 2 \n# define R_OK 4 \n \ntypedef int mode_t; \n \n#endif" (#ifndef) "#ifndef" (identifier) "QPLATFORMDEFS_H" (preproc_def) "#define QPLATFORMDEFS_H \n" (#define) "#define" (identifier) "QPLATFORMDEFS_H" (preproc_ifdef) "#ifdef UNICODE \n#ifndef _UNICODE \n#define _UNICODE \n#endif \n#endif" (#ifdef) "#ifdef" (identifier) "UNICODE" (preproc_ifdef) "#ifndef _UNICODE \n#define _UNICODE \n#endif" (#ifndef) "#ifndef" (identifier) "_UNICODE" (preproc_def) "#define _UNICODE \n" (#define) "#define" (identifier) "_UNICODE" (#endif) "#endif" (#endif) "#endif" (comment) "// Get Qt defines/settings " (preproc_include) "#include "qglobal.h" \n" (#include) "#include" (string_literal) ""qglobal.h"" (") """ (string_content) "qglobal.h" (") """ (preproc_def) "#define _POSIX_ \n" (#define) "#define" (identifier) "_POSIX_" (preproc_include) "#include <limits.h> \n" (#include) "#include" (system_lib_string) "<limits.h>" (preproc_call) "#undef _POSIX_ \n" (preproc_directive) "#undef" (preproc_arg) "_POSIX_ " (preproc_include) "#include <tchar.h> \n" (#include) "#include" (system_lib_string) "<tchar.h>" (preproc_include) "#include <io.h> \n" (#include) "#include" (system_lib_string) "<io.h>" (preproc_include) "#include <direct.h> \n" (#include) "#include" (system_lib_string) "<direct.h>" (preproc_include) "#include <stdio.h> \n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <fcntl.h> \n" (#include) "#include" (system_lib_string) "<fcntl.h>" (preproc_include) "#include <errno.h> \n" (#include) "#include" (system_lib_string) "<errno.h>" (preproc_include) "#include <sys/stat.h> \n" (#include) "#include" (system_lib_string) "<sys/stat.h>" (preproc_include) "#include <stdlib.h> \n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_include) "#include <windows.h> \n" (#include) "#include" (system_lib_string) "<windows.h>" (preproc_def) "#define Q_FS_FAT \n" (#define) "#define" (identifier) "Q_FS_FAT" (preproc_ifdef) "#ifdef QT_LARGEFILE_SUPPORT \n#define QT_STATBUF struct _stati64 // non-ANSI defs \n#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs \n#define QT_STAT ::_stati64 \n#define QT_FSTAT ::_fstati64 \n#else \n#define QT_STATBUF struct _stat // non-ANSI defs \n#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs \n#define QT_STAT ::_stat \n#define QT_FSTAT ::_fstat \n#endif" (#ifdef) "#ifdef" (identifier) "QT_LARGEFILE_SUPPORT" (preproc_def) "#define QT_STATBUF struct _stati64 // non-ANSI defs \n" (#define) "#define" (identifier) "QT_STATBUF" (preproc_arg) "struct _stati64 // non-ANSI defs " (preproc_def) "#define QT_STATBUF4TSTAT struct _stati64 // non-ANSI defs \n" (#define) "#define" (identifier) "QT_STATBUF4TSTAT" (preproc_arg) "struct _stati64 // non-ANSI defs " (preproc_def) "#define QT_STAT ::_stati64 \n" (#define) "#define" (identifier) "QT_STAT" (preproc_arg) "::_stati64 " (preproc_def) "#define QT_FSTAT ::_fstati64 \n" (#define) "#define" (identifier) "QT_FSTAT" (preproc_arg) "::_fstati64 " (preproc_else) "#else \n#define QT_STATBUF struct _stat // non-ANSI defs \n#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs \n#define QT_STAT ::_stat \n#define QT_FSTAT ::_fstat \n" (#else) "#else" (preproc_def) "#define QT_STATBUF struct _stat // non-ANSI defs \n" (#define) "#define" (identifier) "QT_STATBUF" (preproc_arg) "struct _stat // non-ANSI defs " (preproc_def) "#define QT_STATBUF4TSTAT struct _stat // non-ANSI defs \n" (#define) "#define" (identifier) "QT_STATBUF4TSTAT" (preproc_arg) "struct _stat // non-ANSI defs " (preproc_def) "#define QT_STAT ::_stat \n" (#define) "#define" (identifier) "QT_STAT" (preproc_arg) "::_stat " (preproc_def) "#define QT_FSTAT ::_fstat \n" (#define) "#define" (identifier) "QT_FSTAT" (preproc_arg) "::_fstat " (#endif) "#endif" (preproc_def) "#define QT_STAT_REG _S_IFREG \n" (#define) "#define" (identifier) "QT_STAT_REG" (preproc_arg) "_S_IFREG " (preproc_def) "#define QT_STAT_DIR _S_IFDIR \n" (#define) "#define" (identifier) "QT_STAT_DIR" (preproc_arg) "_S_IFDIR " (preproc_def) "#define QT_STAT_MASK _S_IFMT \n" (#define) "#define" (identifier) "QT_STAT_MASK" (preproc_arg) "_S_IFMT " (preproc_if) "#if defined(_S_IFLNK) \n# define QT_STAT_LNK _S_IFLNK \n#endif" (#if) "#if" (preproc_defined) "defined(_S_IFLNK)" (defined) "defined" (() "(" (identifier) "_S_IFLNK" ()) ")" ( ) "\n" (preproc_def) "# define QT_STAT_LNK _S_IFLNK \n" (#define) "# define" (identifier) "QT_STAT_LNK" (preproc_arg) "_S_IFLNK " (#endif) "#endif" (preproc_def) "#define QT_FILENO _fileno \n" (#define) "#define" (identifier) "QT_FILENO" (preproc_arg) "_fileno " (preproc_def) "#define QT_OPEN ::_open \n" (#define) "#define" (identifier) "QT_OPEN" (preproc_arg) "::_open " (preproc_def) "#define QT_CLOSE ::_close \n" (#define) "#define" (identifier) "QT_CLOSE" (preproc_arg) "::_close " (preproc_ifdef) "#ifdef QT_LARGEFILE_SUPPORT \n#define QT_LSEEK ::_lseeki64 \n#define QT_TSTAT ::_tstati64 \n#else \n#define QT_LSEEK ::_lseek \n#define QT_TSTAT ::_tstat \n#endif" (#ifdef) "#ifdef" (identifier) "QT_LARGEFILE_SUPPORT" (preproc_def) "#define QT_LSEEK ::_lseeki64 \n" (#define) "#define" (identifier) "QT_LSEEK" (preproc_arg) "::_lseeki64 " (preproc_def) "#define QT_TSTAT ::_tstati64 \n" (#define) "#define" (identifier) "QT_TSTAT" (preproc_arg) "::_tstati64 " (preproc_else) "#else \n#define QT_LSEEK ::_lseek \n#define QT_TSTAT ::_tstat \n" (#else) "#else" (preproc_def) "#define QT_LSEEK ::_lseek \n" (#define) "#define" (identifier) "QT_LSEEK" (preproc_arg) "::_lseek " (preproc_def) "#define QT_TSTAT ::_tstat \n" (#define) "#define" (identifier) "QT_TSTAT" (preproc_arg) "::_tstat " (#endif) "#endif" (preproc_def) "#define QT_READ ::_read \n" (#define) "#define" (identifier) "QT_READ" (preproc_arg) "::_read " (preproc_def) "#define QT_WRITE ::_write \n" (#define) "#define" (identifier) "QT_WRITE" (preproc_arg) "::_write " (preproc_def) "#define QT_ACCESS ::_access \n" (#define) "#define" (identifier) "QT_ACCESS" (preproc_arg) "::_access " (preproc_def) "#define QT_GETCWD ::_getcwd \n" (#define) "#define" (identifier) "QT_GETCWD" (preproc_arg) "::_getcwd " (preproc_def) "#define QT_CHDIR ::_chdir \n" (#define) "#define" (identifier) "QT_CHDIR" (preproc_arg) "::_chdir " (preproc_def) "#define QT_MKDIR ::_mkdir \n" (#define) "#define" (identifier) "QT_MKDIR" (preproc_arg) "::_mkdir " (preproc_def) "#define QT_RMDIR ::_rmdir \n" (#define) "#define" (identifier) "QT_RMDIR" (preproc_arg) "::_rmdir " (preproc_def) "#define QT_OPEN_LARGEFILE 0 \n" (#define) "#define" (identifier) "QT_OPEN_LARGEFILE" (preproc_arg) "0 " (preproc_def) "#define QT_OPEN_RDONLY _O_RDONLY \n" (#define) "#define" (identifier) "QT_OPEN_RDONLY" (preproc_arg) "_O_RDONLY " (preproc_def) "#define QT_OPEN_WRONLY _O_WRONLY \n" (#define) "#define" (identifier) "QT_OPEN_WRONLY" (preproc_arg) "_O_WRONLY " (preproc_def) "#define QT_OPEN_RDWR _O_RDWR \n" (#define) "#define" (identifier) "QT_OPEN_RDWR" (preproc_arg) "_O_RDWR " (preproc_def) "#define QT_OPEN_CREAT _O_CREAT \n" (#define) "#define" (identifier) "QT_OPEN_CREAT" (preproc_arg) "_O_CREAT " (preproc_def) "#define QT_OPEN_TRUNC _O_TRUNC \n" (#define) "#define" (identifier) "QT_OPEN_TRUNC" (preproc_arg) "_O_TRUNC " (preproc_def) "#define QT_OPEN_APPEND _O_APPEND \n" (#define) "#define" (identifier) "QT_OPEN_APPEND" (preproc_arg) "_O_APPEND " (preproc_if) "#if defined(O_TEXT) \n# define QT_OPEN_TEXT _O_TEXT \n# define QT_OPEN_BINARY _O_BINARY \n#endif" (#if) "#if" (preproc_defined) "defined(O_TEXT)" (defined) "defined" (() "(" (identifier) "O_TEXT" ()) ")" ( ) "\n" (preproc_def) "# define QT_OPEN_TEXT _O_TEXT \n" (#define) "# define" (identifier) "QT_OPEN_TEXT" (preproc_arg) "_O_TEXT " (preproc_def) "# define QT_OPEN_BINARY _O_BINARY \n" (#define) "# define" (identifier) "QT_OPEN_BINARY" (preproc_arg) "_O_BINARY " (#endif) "#endif" (preproc_include) "#include "../common/c89/qplatformdefs.h" \n" (#include) "#include" (string_literal) ""../common/c89/qplatformdefs.h"" (") """ (string_content) "../common/c89/qplatformdefs.h" (") """ (preproc_ifdef) "#ifdef QT_LARGEFILE_SUPPORT \n#undef QT_FTELL \n#undef QT_OFF_T \n \n// 64-bit versions of fseek/ftell not always available. E.g., when linking \n// dynamically to CRT (/MT) \n#define QT_FTELL (QT_OFF_T)::ftell \n#define QT_OFF_T __int64 \n#endif" (#ifdef) "#ifdef" (identifier) "QT_LARGEFILE_SUPPORT" (preproc_call) "#undef QT_FTELL \n" (preproc_directive) "#undef" (preproc_arg) "QT_FTELL " (preproc_call) "#undef QT_OFF_T \n" (preproc_directive) "#undef" (preproc_arg) "QT_OFF_T " (comment) "// 64-bit versions of fseek/ftell not always available. E.g., when linking " (comment) "// dynamically to CRT (/MT) " (preproc_def) "#define QT_FTELL (QT_OFF_T)::ftell \n" (#define) "#define" (identifier) "QT_FTELL" (preproc_arg) "(QT_OFF_T)::ftell " (preproc_def) "#define QT_OFF_T __int64 \n" (#define) "#define" (identifier) "QT_OFF_T" (preproc_arg) "__int64 " (#endif) "#endif" (preproc_def) "#define QT_SIGNAL_ARGS int \n" (#define) "#define" (identifier) "QT_SIGNAL_ARGS" (preproc_arg) "int " (preproc_def) "#define QT_VSNPRINTF ::_vsnprintf \n" (#define) "#define" (identifier) "QT_VSNPRINTF" (preproc_arg) "::_vsnprintf " (preproc_def) "#define QT_SNPRINTF ::_snprintf \n" (#define) "#define" (identifier) "QT_SNPRINTF" (preproc_arg) "::_snprintf " (preproc_def) "# define F_OK 0 \n" (#define) "# define" (identifier) "F_OK" (preproc_arg) "0 " (preproc_def) "# define X_OK 1 \n" (#define) "# define" (identifier) "X_OK" (preproc_arg) "1 " (preproc_def) "# define W_OK 2 \n" (#define) "# define" (identifier) "W_OK" (preproc_arg) "2 " (preproc_def) "# define R_OK 4 \n" (#define) "# define" (identifier) "R_OK" (preproc_arg) "4 " (type_definition) "typedef int mode_t;" (typedef) "typedef" (primitive_type) "int" (type_identifier) "mode_t" (;) ";" (#endif) "#endif" (comment) "// QPLATFORMDEFS_H "
296
0
{"language": "c", "success": true, "metadata": {"lines": 140, "avg_line_length": 29.4, "nodes": 279, "errors": 0, "source_hash": "c58a94565e495d4bac13c336232905859c4996f3e58530b47c64476f7bf75e0f", "categorized_nodes": 121}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef QPLATFORMDEFS_H\r\n#define QPLATFORMDEFS_H\r\n\r\n#ifdef UNICODE\r\n#ifndef _UNICODE\r\n#define _UNICODE\r\n#endif\r\n#endif\r\n\r\n// Get Qt defines/settings\r\n\r\n#include \"qglobal.h\"\r\n\r\n#define _POSIX_\r\n#include <limits.h>\r\n#undef _POSIX_\r\n\r\n#include <tchar.h>\r\n#include <io.h>\r\n#include <direct.h>\r\n#include <stdio.h>\r\n#include <fcntl.h>\r\n#include <errno.h>\r\n#include <sys/stat.h>\r\n#include <stdlib.h>\r\n#include <windows.h>\r\n\r\n#define Q_FS_FAT\r\n#ifdef QT_LARGEFILE_SUPPORT\r\n#define QT_STATBUF\t\tstruct _stati64\t\t// non-ANSI defs\r\n#define QT_STATBUF4TSTAT\tstruct _stati64\t\t// non-ANSI defs\r\n#define QT_STAT\t\t\t::_stati64\r\n#define QT_FSTAT\t\t::_fstati64\r\n#else\r\n#define QT_STATBUF\t\tstruct _stat\t\t// non-ANSI defs\r\n#define QT_STATBUF4TSTAT\tstruct _stat\t\t// non-ANSI defs\r\n#define QT_STAT\t\t\t::_stat\r\n#define QT_FSTAT\t\t::_fstat\r\n#endif\r\n#define QT_STAT_REG\t\t_S_IFREG\r\n#define QT_STAT_DIR\t\t_S_IFDIR\r\n#define QT_STAT_MASK\t\t_S_IFMT\r\n#if defined(_S_IFLNK)\r\n# define QT_STAT_LNK\t\t_S_IFLNK\r\n#endif\r\n#define QT_FILENO\t\t_fileno\r\n#define QT_OPEN\t\t\t::_open\r\n#define QT_CLOSE\t\t::_close\r\n#ifdef QT_LARGEFILE_SUPPORT\r\n#define QT_LSEEK\t\t::_lseeki64\r\n#define QT_TSTAT\t\t::_tstati64\r\n#else\r\n#define QT_LSEEK\t\t::_lseek\r\n#define QT_TSTAT\t\t::_tstat\r\n#endif\r\n#define QT_READ\t\t\t::_read\r\n#define QT_WRITE\t\t::_write\r\n#define QT_ACCESS\t\t::_access\r\n#define QT_GETCWD\t\t::_getcwd\r\n#define QT_CHDIR\t\t::_chdir\r\n#define QT_MKDIR\t\t::_mkdir\r\n#define QT_RMDIR\t\t::_rmdir\r\n#define QT_OPEN_LARGEFILE 0\r\n#define QT_OPEN_RDONLY\t\t_O_RDONLY\r\n#define QT_OPEN_WRONLY\t\t_O_WRONLY\r\n#define QT_OPEN_RDWR\t\t_O_RDWR\r\n#define QT_OPEN_CREAT\t\t_O_CREAT\r\n#define QT_OPEN_TRUNC\t\t_O_TRUNC\r\n#define QT_OPEN_APPEND\t\t_O_APPEND\r\n#if defined(O_TEXT)\r\n# define QT_OPEN_TEXT\t\t_O_TEXT\r\n# define QT_OPEN_BINARY\t\t_O_BINARY\r\n#endif\r\n\r\n#include \"../common/c89/qplatformdefs.h\"\r\n\r\n#ifdef QT_LARGEFILE_SUPPORT\r\n#undef QT_FTELL\r\n#undef QT_OFF_T\r\n\r\n// 64-bit versions of fseek/ftell not always available. E.g., when linking\r\n// dynamically to CRT (/MT)\r\n#define QT_FTELL (QT_OFF_T)::ftell\r\n#define QT_OFF_T __int64\r\n#endif\r\n\r\n#define QT_SIGNAL_ARGS\t\tint\r\n\r\n#define QT_VSNPRINTF ::_vsnprintf\r\n#define QT_SNPRINTF\t\t::_snprintf\r\n\r\n# define F_OK\t0\r\n# define X_OK\t1\r\n# define W_OK\t2\r\n# define R_OK\t4\r\n\r\ntypedef int mode_t;\r\n\r\n#endif", "parent": null, "children": [1, 2, 3, 6, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 97, 101, 105, 109, 120, 124, 128, 132, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 225, 228, 246, 250, 254, 258, 262, 266, 270, 274, 278], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 139, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 7}}, {"id": 2, "type": "identifier", "text": "QPLATFORMDEFS_H", "parent": 0, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 23}}, {"id": 3, "type": "preproc_def", "text": "#define QPLATFORMDEFS_H\r\n", "parent": 0, "children": [4, 5], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 43, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 42, "column": 0}, "end_point": {"row": 42, "column": 7}}, {"id": 5, "type": "identifier", "text": "QPLATFORMDEFS_H", "parent": 3, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 23}}, {"id": 6, "type": "preproc_ifdef", "text": "#ifdef UNICODE\r\n#ifndef _UNICODE\r\n#define _UNICODE\r\n#endif\r\n#endif", "parent": 0, "children": [7, 8, 9, 16], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 48, "column": 6}}, {"id": 7, "type": "#ifdef", "text": "#ifdef", "parent": 6, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 6}}, {"id": 8, "type": "identifier", "text": "UNICODE", "parent": 6, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 14}}, {"id": 9, "type": "preproc_ifdef", "text": "#ifndef _UNICODE\r\n#define _UNICODE\r\n#endif", "parent": 6, "children": [10, 11, 12, 15], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 47, "column": 6}}, {"id": 10, "type": "#ifndef", "text": "#ifndef", "parent": 9, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 7}}, {"id": 11, "type": "identifier", "text": "_UNICODE", "parent": 9, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 16}}, {"id": 12, "type": "preproc_def", "text": "#define _UNICODE\r\n", "parent": 9, "children": [13, 14], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 47, "column": 0}}, {"id": 13, "type": "#define", "text": "#define", "parent": 12, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 7}}, {"id": 14, "type": "identifier", "text": "_UNICODE", "parent": 12, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 16}}, {"id": 15, "type": "#endif", "text": "#endif", "parent": 9, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 6}}, {"id": 16, "type": "#endif", "text": "#endif", "parent": 6, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 6}}, {"id": 17, "type": "preproc_include", "text": "#include \"qglobal.h\"\r\n", "parent": 0, "children": [18, 19], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 53, "column": 0}}, {"id": 18, "type": "#include", "text": "#include", "parent": 17, "children": [], "start_point": {"row": 52, "column": 0}, "end_point": {"row": 52, "column": 8}}, {"id": 19, "type": "string_literal", "text": "\"qglobal.h\"", "parent": 17, "children": [], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 20}}, {"id": 20, "type": "preproc_def", "text": "#define _POSIX_\r\n", "parent": 0, "children": [21, 22], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 55, "column": 0}}, {"id": 21, "type": "#define", "text": "#define", "parent": 20, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 7}}, {"id": 22, "type": "identifier", "text": "_POSIX_", "parent": 20, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 15}}, {"id": 23, "type": "preproc_include", "text": "#include <limits.h>\r\n", "parent": 0, "children": [24, 25], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 56, "column": 0}}, {"id": 24, "type": "#include", "text": "#include", "parent": 23, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 8}}, {"id": 25, "type": "system_lib_string", "text": "<limits.h>", "parent": 23, "children": [], "start_point": {"row": 55, "column": 9}, "end_point": {"row": 55, "column": 19}}, {"id": 26, "type": "preproc_call", "text": "#undef _POSIX_\r\n", "parent": 0, "children": [27, 28], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 57, "column": 0}}, {"id": 27, "type": "preproc_directive", "text": "#undef", "parent": 26, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 6}}, {"id": 28, "type": "preproc_arg", "text": "_POSIX_\r", "parent": 26, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 15}}, {"id": 29, "type": "preproc_include", "text": "#include <tchar.h>\r\n", "parent": 0, "children": [30, 31], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 59, "column": 0}}, {"id": 30, "type": "#include", "text": "#include", "parent": 29, "children": [], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 8}}, {"id": 31, "type": "system_lib_string", "text": "<tchar.h>", "parent": 29, "children": [], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 18}}, {"id": 32, "type": "preproc_include", "text": "#include <io.h>\r\n", "parent": 0, "children": [33, 34], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 60, "column": 0}}, {"id": 33, "type": "#include", "text": "#include", "parent": 32, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 8}}, {"id": 34, "type": "system_lib_string", "text": "<io.h>", "parent": 32, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 15}}, {"id": 35, "type": "preproc_include", "text": "#include <direct.h>\r\n", "parent": 0, "children": [36, 37], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 61, "column": 0}}, {"id": 36, "type": "#include", "text": "#include", "parent": 35, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 8}}, {"id": 37, "type": "system_lib_string", "text": "<direct.h>", "parent": 35, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 19}}, {"id": 38, "type": "preproc_include", "text": "#include <stdio.h>\r\n", "parent": 0, "children": [39, 40], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 62, "column": 0}}, {"id": 39, "type": "#include", "text": "#include", "parent": 38, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 8}}, {"id": 40, "type": "system_lib_string", "text": "<stdio.h>", "parent": 38, "children": [], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 18}}, {"id": 41, "type": "preproc_include", "text": "#include <fcntl.h>\r\n", "parent": 0, "children": [42, 43], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 63, "column": 0}}, {"id": 42, "type": "#include", "text": "#include", "parent": 41, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 8}}, {"id": 43, "type": "system_lib_string", "text": "<fcntl.h>", "parent": 41, "children": [], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 18}}, {"id": 44, "type": "preproc_include", "text": "#include <errno.h>\r\n", "parent": 0, "children": [45, 46], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 64, "column": 0}}, {"id": 45, "type": "#include", "text": "#include", "parent": 44, "children": [], "start_point": {"row": 63, "column": 0}, "end_point": {"row": 63, "column": 8}}, {"id": 46, "type": "system_lib_string", "text": "<errno.h>", "parent": 44, "children": [], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 18}}, {"id": 47, "type": "preproc_include", "text": "#include <sys/stat.h>\r\n", "parent": 0, "children": [48, 49], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 65, "column": 0}}, {"id": 48, "type": "#include", "text": "#include", "parent": 47, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 8}}, {"id": 49, "type": "system_lib_string", "text": "<sys/stat.h>", "parent": 47, "children": [], "start_point": {"row": 64, "column": 9}, "end_point": {"row": 64, "column": 21}}, {"id": 50, "type": "preproc_include", "text": "#include <stdlib.h>\r\n", "parent": 0, "children": [51, 52], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 66, "column": 0}}, {"id": 51, "type": "#include", "text": "#include", "parent": 50, "children": [], "start_point": {"row": 65, "column": 0}, "end_point": {"row": 65, "column": 8}}, {"id": 52, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 50, "children": [], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 19}}, {"id": 53, "type": "preproc_include", "text": "#include <windows.h>\r\n", "parent": 0, "children": [54, 55], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 67, "column": 0}}, {"id": 54, "type": "#include", "text": "#include", "parent": 53, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 8}}, {"id": 55, "type": "system_lib_string", "text": "<windows.h>", "parent": 53, "children": [], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 20}}, {"id": 56, "type": "preproc_def", "text": "#define Q_FS_FAT\r\n", "parent": 0, "children": [57, 58], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 69, "column": 0}}, {"id": 57, "type": "#define", "text": "#define", "parent": 56, "children": [], "start_point": {"row": 68, "column": 0}, "end_point": {"row": 68, "column": 7}}, {"id": 58, "type": "identifier", "text": "Q_FS_FAT", "parent": 56, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 16}}, {"id": 59, "type": "preproc_ifdef", "text": "#ifdef QT_LARGEFILE_SUPPORT\r\n#define QT_STATBUF\t\tstruct _stati64\t\t// non-ANSI defs\r\n#define QT_STATBUF4TSTAT\tstruct _stati64\t\t// non-ANSI defs\r\n#define QT_STAT\t\t\t::_stati64\r\n#define QT_FSTAT\t\t::_fstati64\r\n#else\r\n#define QT_STATBUF\t\tstruct _stat\t\t// non-ANSI defs\r\n#define QT_STATBUF4TSTAT\tstruct _stat\t\t// non-ANSI defs\r\n#define QT_STAT\t\t\t::_stat\r\n#define QT_FSTAT\t\t::_fstat\r\n#endif", "parent": 0, "children": [60, 61, 62, 66, 70, 74, 78, 96], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 79, "column": 6}}, {"id": 60, "type": "#ifdef", "text": "#ifdef", "parent": 59, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 6}}, {"id": 61, "type": "identifier", "text": "QT_LARGEFILE_SUPPORT", "parent": 59, "children": [], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 27}}, {"id": 62, "type": "preproc_def", "text": "#define QT_STATBUF\t\tstruct _stati64\t\t// non-ANSI defs\r\n", "parent": 59, "children": [63, 64, 65], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 71, "column": 0}}, {"id": 63, "type": "#define", "text": "#define", "parent": 62, "children": [], "start_point": {"row": 70, "column": 0}, "end_point": {"row": 70, "column": 7}}, {"id": 64, "type": "identifier", "text": "QT_STATBUF", "parent": 62, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 18}}, {"id": 65, "type": "preproc_arg", "text": "struct _stati64\t\t// non-ANSI defs\r", "parent": 62, "children": [], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 54}}, {"id": 66, "type": "preproc_def", "text": "#define QT_STATBUF4TSTAT\tstruct _stati64\t\t// non-ANSI defs\r\n", "parent": 59, "children": [67, 68, 69], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 72, "column": 0}}, {"id": 67, "type": "#define", "text": "#define", "parent": 66, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 7}}, {"id": 68, "type": "identifier", "text": "QT_STATBUF4TSTAT", "parent": 66, "children": [], "start_point": {"row": 71, "column": 8}, "end_point": {"row": 71, "column": 24}}, {"id": 69, "type": "preproc_arg", "text": "struct _stati64\t\t// non-ANSI defs\r", "parent": 66, "children": [], "start_point": {"row": 71, "column": 25}, "end_point": {"row": 71, "column": 59}}, {"id": 70, "type": "preproc_def", "text": "#define QT_STAT\t\t\t::_stati64\r\n", "parent": 59, "children": [71, 72, 73], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 73, "column": 0}}, {"id": 71, "type": "#define", "text": "#define", "parent": 70, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 7}}, {"id": 72, "type": "identifier", "text": "QT_STAT", "parent": 70, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 15}}, {"id": 73, "type": "preproc_arg", "text": "::_stati64\r", "parent": 70, "children": [], "start_point": {"row": 72, "column": 18}, "end_point": {"row": 72, "column": 29}}, {"id": 74, "type": "preproc_def", "text": "#define QT_FSTAT\t\t::_fstati64\r\n", "parent": 59, "children": [75, 76, 77], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 74, "column": 0}}, {"id": 75, "type": "#define", "text": "#define", "parent": 74, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 7}}, {"id": 76, "type": "identifier", "text": "QT_FSTAT", "parent": 74, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 16}}, {"id": 77, "type": "preproc_arg", "text": "::_fstati64\r", "parent": 74, "children": [], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 30}}, {"id": 78, "type": "preproc_else", "text": "#else\r\n#define QT_STATBUF\t\tstruct _stat\t\t// non-ANSI defs\r\n#define QT_STATBUF4TSTAT\tstruct _stat\t\t// non-ANSI defs\r\n#define QT_STAT\t\t\t::_stat\r\n#define QT_FSTAT\t\t::_fstat\r\n", "parent": 59, "children": [79, 80, 84, 88, 92], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 79, "column": 0}}, {"id": 79, "type": "#else", "text": "#else", "parent": 78, "children": [], "start_point": {"row": 74, "column": 0}, "end_point": {"row": 74, "column": 5}}, {"id": 80, "type": "preproc_def", "text": "#define QT_STATBUF\t\tstruct _stat\t\t// non-ANSI defs\r\n", "parent": 78, "children": [81, 82, 83], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 76, "column": 0}}, {"id": 81, "type": "#define", "text": "#define", "parent": 80, "children": [], "start_point": {"row": 75, "column": 0}, "end_point": {"row": 75, "column": 7}}, {"id": 82, "type": "identifier", "text": "QT_STATBUF", "parent": 80, "children": [], "start_point": {"row": 75, "column": 8}, "end_point": {"row": 75, "column": 18}}, {"id": 83, "type": "preproc_arg", "text": "struct _stat\t\t// non-ANSI defs\r", "parent": 80, "children": [], "start_point": {"row": 75, "column": 20}, "end_point": {"row": 75, "column": 51}}, {"id": 84, "type": "preproc_def", "text": "#define QT_STATBUF4TSTAT\tstruct _stat\t\t// non-ANSI defs\r\n", "parent": 78, "children": [85, 86, 87], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 77, "column": 0}}, {"id": 85, "type": "#define", "text": "#define", "parent": 84, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 7}}, {"id": 86, "type": "identifier", "text": "QT_STATBUF4TSTAT", "parent": 84, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 24}}, {"id": 87, "type": "preproc_arg", "text": "struct _stat\t\t// non-ANSI defs\r", "parent": 84, "children": [], "start_point": {"row": 76, "column": 25}, "end_point": {"row": 76, "column": 56}}, {"id": 88, "type": "preproc_def", "text": "#define QT_STAT\t\t\t::_stat\r\n", "parent": 78, "children": [89, 90, 91], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 78, "column": 0}}, {"id": 89, "type": "#define", "text": "#define", "parent": 88, "children": [], "start_point": {"row": 77, "column": 0}, "end_point": {"row": 77, "column": 7}}, {"id": 90, "type": "identifier", "text": "QT_STAT", "parent": 88, "children": [], "start_point": {"row": 77, "column": 8}, "end_point": {"row": 77, "column": 15}}, {"id": 91, "type": "preproc_arg", "text": "::_stat\r", "parent": 88, "children": [], "start_point": {"row": 77, "column": 18}, "end_point": {"row": 77, "column": 26}}, {"id": 92, "type": "preproc_def", "text": "#define QT_FSTAT\t\t::_fstat\r\n", "parent": 78, "children": [93, 94, 95], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 79, "column": 0}}, {"id": 93, "type": "#define", "text": "#define", "parent": 92, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 7}}, {"id": 94, "type": "identifier", "text": "QT_FSTAT", "parent": 92, "children": [], "start_point": {"row": 78, "column": 8}, "end_point": {"row": 78, "column": 16}}, {"id": 95, "type": "preproc_arg", "text": "::_fstat\r", "parent": 92, "children": [], "start_point": {"row": 78, "column": 18}, "end_point": {"row": 78, "column": 27}}, {"id": 96, "type": "#endif", "text": "#endif", "parent": 59, "children": [], "start_point": {"row": 79, "column": 0}, "end_point": {"row": 79, "column": 6}}, {"id": 97, "type": "preproc_def", "text": "#define QT_STAT_REG\t\t_S_IFREG\r\n", "parent": 0, "children": [98, 99, 100], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 81, "column": 0}}, {"id": 98, "type": "#define", "text": "#define", "parent": 97, "children": [], "start_point": {"row": 80, "column": 0}, "end_point": {"row": 80, "column": 7}}, {"id": 99, "type": "identifier", "text": "QT_STAT_REG", "parent": 97, "children": [], "start_point": {"row": 80, "column": 8}, "end_point": {"row": 80, "column": 19}}, {"id": 100, "type": "preproc_arg", "text": "_S_IFREG\r", "parent": 97, "children": [], "start_point": {"row": 80, "column": 21}, "end_point": {"row": 80, "column": 30}}, {"id": 101, "type": "preproc_def", "text": "#define QT_STAT_DIR\t\t_S_IFDIR\r\n", "parent": 0, "children": [102, 103, 104], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 82, "column": 0}}, {"id": 102, "type": "#define", "text": "#define", "parent": 101, "children": [], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 81, "column": 7}}, {"id": 103, "type": "identifier", "text": "QT_STAT_DIR", "parent": 101, "children": [], "start_point": {"row": 81, "column": 8}, "end_point": {"row": 81, "column": 19}}, {"id": 104, "type": "preproc_arg", "text": "_S_IFDIR\r", "parent": 101, "children": [], "start_point": {"row": 81, "column": 21}, "end_point": {"row": 81, "column": 30}}, {"id": 105, "type": "preproc_def", "text": "#define QT_STAT_MASK\t\t_S_IFMT\r\n", "parent": 0, "children": [106, 107, 108], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 83, "column": 0}}, {"id": 106, "type": "#define", "text": "#define", "parent": 105, "children": [], "start_point": {"row": 82, "column": 0}, "end_point": {"row": 82, "column": 7}}, {"id": 107, "type": "identifier", "text": "QT_STAT_MASK", "parent": 105, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 20}}, {"id": 108, "type": "preproc_arg", "text": "_S_IFMT\r", "parent": 105, "children": [], "start_point": {"row": 82, "column": 22}, "end_point": {"row": 82, "column": 30}}, {"id": 109, "type": "preproc_if", "text": "#if defined(_S_IFLNK)\r\n# define QT_STAT_LNK\t\t_S_IFLNK\r\n#endif", "parent": 0, "children": [110, 111, 114, 115, 119], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 85, "column": 6}}, {"id": 110, "type": "#if", "text": "#if", "parent": 109, "children": [], "start_point": {"row": 83, "column": 0}, "end_point": {"row": 83, "column": 3}}, {"id": 111, "type": "preproc_defined", "text": "defined(_S_IFLNK)", "parent": 109, "children": [112, 113], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 21}}, {"id": 112, "type": "defined", "text": "defined", "parent": 111, "children": [], "start_point": {"row": 83, "column": 4}, "end_point": {"row": 83, "column": 11}}, {"id": 113, "type": "identifier", "text": "_S_IFLNK", "parent": 111, "children": [], "start_point": {"row": 83, "column": 12}, "end_point": {"row": 83, "column": 20}}, {"id": 114, "type": "\n", "text": "\n", "parent": 109, "children": [], "start_point": {"row": 83, "column": 22}, "end_point": {"row": 84, "column": 0}}, {"id": 115, "type": "preproc_def", "text": "# define QT_STAT_LNK\t\t_S_IFLNK\r\n", "parent": 109, "children": [116, 117, 118], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 85, "column": 0}}, {"id": 116, "type": "#define", "text": "# define", "parent": 115, "children": [], "start_point": {"row": 84, "column": 0}, "end_point": {"row": 84, "column": 9}}, {"id": 117, "type": "identifier", "text": "QT_STAT_LNK", "parent": 115, "children": [], "start_point": {"row": 84, "column": 10}, "end_point": {"row": 84, "column": 21}}, {"id": 118, "type": "preproc_arg", "text": "_S_IFLNK\r", "parent": 115, "children": [], "start_point": {"row": 84, "column": 23}, "end_point": {"row": 84, "column": 32}}, {"id": 119, "type": "#endif", "text": "#endif", "parent": 109, "children": [], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 6}}, {"id": 120, "type": "preproc_def", "text": "#define QT_FILENO\t\t_fileno\r\n", "parent": 0, "children": [121, 122, 123], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 87, "column": 0}}, {"id": 121, "type": "#define", "text": "#define", "parent": 120, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 7}}, {"id": 122, "type": "identifier", "text": "QT_FILENO", "parent": 120, "children": [], "start_point": {"row": 86, "column": 8}, "end_point": {"row": 86, "column": 17}}, {"id": 123, "type": "preproc_arg", "text": "_fileno\r", "parent": 120, "children": [], "start_point": {"row": 86, "column": 19}, "end_point": {"row": 86, "column": 27}}, {"id": 124, "type": "preproc_def", "text": "#define QT_OPEN\t\t\t::_open\r\n", "parent": 0, "children": [125, 126, 127], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 88, "column": 0}}, {"id": 125, "type": "#define", "text": "#define", "parent": 124, "children": [], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 87, "column": 7}}, {"id": 126, "type": "identifier", "text": "QT_OPEN", "parent": 124, "children": [], "start_point": {"row": 87, "column": 8}, "end_point": {"row": 87, "column": 15}}, {"id": 127, "type": "preproc_arg", "text": "::_open\r", "parent": 124, "children": [], "start_point": {"row": 87, "column": 18}, "end_point": {"row": 87, "column": 26}}, {"id": 128, "type": "preproc_def", "text": "#define QT_CLOSE\t\t::_close\r\n", "parent": 0, "children": [129, 130, 131], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 89, "column": 0}}, {"id": 129, "type": "#define", "text": "#define", "parent": 128, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 7}}, {"id": 130, "type": "identifier", "text": "QT_CLOSE", "parent": 128, "children": [], "start_point": {"row": 88, "column": 8}, "end_point": {"row": 88, "column": 16}}, {"id": 131, "type": "preproc_arg", "text": "::_close\r", "parent": 128, "children": [], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 27}}, {"id": 132, "type": "preproc_ifdef", "text": "#ifdef QT_LARGEFILE_SUPPORT\r\n#define QT_LSEEK\t\t::_lseeki64\r\n#define QT_TSTAT\t\t::_tstati64\r\n#else\r\n#define QT_LSEEK\t\t::_lseek\r\n#define QT_TSTAT\t\t::_tstat\r\n#endif", "parent": 0, "children": [133, 134, 135, 139, 143, 153], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 95, "column": 6}}, {"id": 133, "type": "#ifdef", "text": "#ifdef", "parent": 132, "children": [], "start_point": {"row": 89, "column": 0}, "end_point": {"row": 89, "column": 6}}, {"id": 134, "type": "identifier", "text": "QT_LARGEFILE_SUPPORT", "parent": 132, "children": [], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 27}}, {"id": 135, "type": "preproc_def", "text": "#define QT_LSEEK\t\t::_lseeki64\r\n", "parent": 132, "children": [136, 137, 138], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 91, "column": 0}}, {"id": 136, "type": "#define", "text": "#define", "parent": 135, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 7}}, {"id": 137, "type": "identifier", "text": "QT_LSEEK", "parent": 135, "children": [], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 16}}, {"id": 138, "type": "preproc_arg", "text": "::_lseeki64\r", "parent": 135, "children": [], "start_point": {"row": 90, "column": 18}, "end_point": {"row": 90, "column": 30}}, {"id": 139, "type": "preproc_def", "text": "#define QT_TSTAT\t\t::_tstati64\r\n", "parent": 132, "children": [140, 141, 142], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 92, "column": 0}}, {"id": 140, "type": "#define", "text": "#define", "parent": 139, "children": [], "start_point": {"row": 91, "column": 0}, "end_point": {"row": 91, "column": 7}}, {"id": 141, "type": "identifier", "text": "QT_TSTAT", "parent": 139, "children": [], "start_point": {"row": 91, "column": 8}, "end_point": {"row": 91, "column": 16}}, {"id": 142, "type": "preproc_arg", "text": "::_tstati64\r", "parent": 139, "children": [], "start_point": {"row": 91, "column": 18}, "end_point": {"row": 91, "column": 30}}, {"id": 143, "type": "preproc_else", "text": "#else\r\n#define QT_LSEEK\t\t::_lseek\r\n#define QT_TSTAT\t\t::_tstat\r\n", "parent": 132, "children": [144, 145, 149], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 95, "column": 0}}, {"id": 144, "type": "#else", "text": "#else", "parent": 143, "children": [], "start_point": {"row": 92, "column": 0}, "end_point": {"row": 92, "column": 5}}, {"id": 145, "type": "preproc_def", "text": "#define QT_LSEEK\t\t::_lseek\r\n", "parent": 143, "children": [146, 147, 148], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 94, "column": 0}}, {"id": 146, "type": "#define", "text": "#define", "parent": 145, "children": [], "start_point": {"row": 93, "column": 0}, "end_point": {"row": 93, "column": 7}}, {"id": 147, "type": "identifier", "text": "QT_LSEEK", "parent": 145, "children": [], "start_point": {"row": 93, "column": 8}, "end_point": {"row": 93, "column": 16}}, {"id": 148, "type": "preproc_arg", "text": "::_lseek\r", "parent": 145, "children": [], "start_point": {"row": 93, "column": 18}, "end_point": {"row": 93, "column": 27}}, {"id": 149, "type": "preproc_def", "text": "#define QT_TSTAT\t\t::_tstat\r\n", "parent": 143, "children": [150, 151, 152], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 95, "column": 0}}, {"id": 150, "type": "#define", "text": "#define", "parent": 149, "children": [], "start_point": {"row": 94, "column": 0}, "end_point": {"row": 94, "column": 7}}, {"id": 151, "type": "identifier", "text": "QT_TSTAT", "parent": 149, "children": [], "start_point": {"row": 94, "column": 8}, "end_point": {"row": 94, "column": 16}}, {"id": 152, "type": "preproc_arg", "text": "::_tstat\r", "parent": 149, "children": [], "start_point": {"row": 94, "column": 18}, "end_point": {"row": 94, "column": 27}}, {"id": 153, "type": "#endif", "text": "#endif", "parent": 132, "children": [], "start_point": {"row": 95, "column": 0}, "end_point": {"row": 95, "column": 6}}, {"id": 154, "type": "preproc_def", "text": "#define QT_READ\t\t\t::_read\r\n", "parent": 0, "children": [155, 156, 157], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 97, "column": 0}}, {"id": 155, "type": "#define", "text": "#define", "parent": 154, "children": [], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 7}}, {"id": 156, "type": "identifier", "text": "QT_READ", "parent": 154, "children": [], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 15}}, {"id": 157, "type": "preproc_arg", "text": "::_read\r", "parent": 154, "children": [], "start_point": {"row": 96, "column": 18}, "end_point": {"row": 96, "column": 26}}, {"id": 158, "type": "preproc_def", "text": "#define QT_WRITE\t\t::_write\r\n", "parent": 0, "children": [159, 160, 161], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 98, "column": 0}}, {"id": 159, "type": "#define", "text": "#define", "parent": 158, "children": [], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 7}}, {"id": 160, "type": "identifier", "text": "QT_WRITE", "parent": 158, "children": [], "start_point": {"row": 97, "column": 8}, "end_point": {"row": 97, "column": 16}}, {"id": 161, "type": "preproc_arg", "text": "::_write\r", "parent": 158, "children": [], "start_point": {"row": 97, "column": 18}, "end_point": {"row": 97, "column": 27}}, {"id": 162, "type": "preproc_def", "text": "#define QT_ACCESS\t\t::_access\r\n", "parent": 0, "children": [163, 164, 165], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 99, "column": 0}}, {"id": 163, "type": "#define", "text": "#define", "parent": 162, "children": [], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 98, "column": 7}}, {"id": 164, "type": "identifier", "text": "QT_ACCESS", "parent": 162, "children": [], "start_point": {"row": 98, "column": 8}, "end_point": {"row": 98, "column": 17}}, {"id": 165, "type": "preproc_arg", "text": "::_access\r", "parent": 162, "children": [], "start_point": {"row": 98, "column": 19}, "end_point": {"row": 98, "column": 29}}, {"id": 166, "type": "preproc_def", "text": "#define QT_GETCWD\t\t::_getcwd\r\n", "parent": 0, "children": [167, 168, 169], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 100, "column": 0}}, {"id": 167, "type": "#define", "text": "#define", "parent": 166, "children": [], "start_point": {"row": 99, "column": 0}, "end_point": {"row": 99, "column": 7}}, {"id": 168, "type": "identifier", "text": "QT_GETCWD", "parent": 166, "children": [], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 99, "column": 17}}, {"id": 169, "type": "preproc_arg", "text": "::_getcwd\r", "parent": 166, "children": [], "start_point": {"row": 99, "column": 19}, "end_point": {"row": 99, "column": 29}}, {"id": 170, "type": "preproc_def", "text": "#define QT_CHDIR\t\t::_chdir\r\n", "parent": 0, "children": [171, 172, 173], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 101, "column": 0}}, {"id": 171, "type": "#define", "text": "#define", "parent": 170, "children": [], "start_point": {"row": 100, "column": 0}, "end_point": {"row": 100, "column": 7}}, {"id": 172, "type": "identifier", "text": "QT_CHDIR", "parent": 170, "children": [], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 16}}, {"id": 173, "type": "preproc_arg", "text": "::_chdir\r", "parent": 170, "children": [], "start_point": {"row": 100, "column": 18}, "end_point": {"row": 100, "column": 27}}, {"id": 174, "type": "preproc_def", "text": "#define QT_MKDIR\t\t::_mkdir\r\n", "parent": 0, "children": [175, 176, 177], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 102, "column": 0}}, {"id": 175, "type": "#define", "text": "#define", "parent": 174, "children": [], "start_point": {"row": 101, "column": 0}, "end_point": {"row": 101, "column": 7}}, {"id": 176, "type": "identifier", "text": "QT_MKDIR", "parent": 174, "children": [], "start_point": {"row": 101, "column": 8}, "end_point": {"row": 101, "column": 16}}, {"id": 177, "type": "preproc_arg", "text": "::_mkdir\r", "parent": 174, "children": [], "start_point": {"row": 101, "column": 18}, "end_point": {"row": 101, "column": 27}}, {"id": 178, "type": "preproc_def", "text": "#define QT_RMDIR\t\t::_rmdir\r\n", "parent": 0, "children": [179, 180, 181], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 103, "column": 0}}, {"id": 179, "type": "#define", "text": "#define", "parent": 178, "children": [], "start_point": {"row": 102, "column": 0}, "end_point": {"row": 102, "column": 7}}, {"id": 180, "type": "identifier", "text": "QT_RMDIR", "parent": 178, "children": [], "start_point": {"row": 102, "column": 8}, "end_point": {"row": 102, "column": 16}}, {"id": 181, "type": "preproc_arg", "text": "::_rmdir\r", "parent": 178, "children": [], "start_point": {"row": 102, "column": 18}, "end_point": {"row": 102, "column": 27}}, {"id": 182, "type": "preproc_def", "text": "#define QT_OPEN_LARGEFILE 0\r\n", "parent": 0, "children": [183, 184, 185], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 104, "column": 0}}, {"id": 183, "type": "#define", "text": "#define", "parent": 182, "children": [], "start_point": {"row": 103, "column": 0}, "end_point": {"row": 103, "column": 7}}, {"id": 184, "type": "identifier", "text": "QT_OPEN_LARGEFILE", "parent": 182, "children": [], "start_point": {"row": 103, "column": 8}, "end_point": {"row": 103, "column": 25}}, {"id": 185, "type": "preproc_arg", "text": "0\r", "parent": 182, "children": [], "start_point": {"row": 103, "column": 32}, "end_point": {"row": 103, "column": 34}}, {"id": 186, "type": "preproc_def", "text": "#define QT_OPEN_RDONLY\t\t_O_RDONLY\r\n", "parent": 0, "children": [187, 188, 189], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 105, "column": 0}}, {"id": 187, "type": "#define", "text": "#define", "parent": 186, "children": [], "start_point": {"row": 104, "column": 0}, "end_point": {"row": 104, "column": 7}}, {"id": 188, "type": "identifier", "text": "QT_OPEN_RDONLY", "parent": 186, "children": [], "start_point": {"row": 104, "column": 8}, "end_point": {"row": 104, "column": 22}}, {"id": 189, "type": "preproc_arg", "text": "_O_RDONLY\r", "parent": 186, "children": [], "start_point": {"row": 104, "column": 24}, "end_point": {"row": 104, "column": 34}}, {"id": 190, "type": "preproc_def", "text": "#define QT_OPEN_WRONLY\t\t_O_WRONLY\r\n", "parent": 0, "children": [191, 192, 193], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 106, "column": 0}}, {"id": 191, "type": "#define", "text": "#define", "parent": 190, "children": [], "start_point": {"row": 105, "column": 0}, "end_point": {"row": 105, "column": 7}}, {"id": 192, "type": "identifier", "text": "QT_OPEN_WRONLY", "parent": 190, "children": [], "start_point": {"row": 105, "column": 8}, "end_point": {"row": 105, "column": 22}}, {"id": 193, "type": "preproc_arg", "text": "_O_WRONLY\r", "parent": 190, "children": [], "start_point": {"row": 105, "column": 24}, "end_point": {"row": 105, "column": 34}}, {"id": 194, "type": "preproc_def", "text": "#define QT_OPEN_RDWR\t\t_O_RDWR\r\n", "parent": 0, "children": [195, 196, 197], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 107, "column": 0}}, {"id": 195, "type": "#define", "text": "#define", "parent": 194, "children": [], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 106, "column": 7}}, {"id": 196, "type": "identifier", "text": "QT_OPEN_RDWR", "parent": 194, "children": [], "start_point": {"row": 106, "column": 8}, "end_point": {"row": 106, "column": 20}}, {"id": 197, "type": "preproc_arg", "text": "_O_RDWR\r", "parent": 194, "children": [], "start_point": {"row": 106, "column": 22}, "end_point": {"row": 106, "column": 30}}, {"id": 198, "type": "preproc_def", "text": "#define QT_OPEN_CREAT\t\t_O_CREAT\r\n", "parent": 0, "children": [199, 200, 201], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 108, "column": 0}}, {"id": 199, "type": "#define", "text": "#define", "parent": 198, "children": [], "start_point": {"row": 107, "column": 0}, "end_point": {"row": 107, "column": 7}}, {"id": 200, "type": "identifier", "text": "QT_OPEN_CREAT", "parent": 198, "children": [], "start_point": {"row": 107, "column": 8}, "end_point": {"row": 107, "column": 21}}, {"id": 201, "type": "preproc_arg", "text": "_O_CREAT\r", "parent": 198, "children": [], "start_point": {"row": 107, "column": 23}, "end_point": {"row": 107, "column": 32}}, {"id": 202, "type": "preproc_def", "text": "#define QT_OPEN_TRUNC\t\t_O_TRUNC\r\n", "parent": 0, "children": [203, 204, 205], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 109, "column": 0}}, {"id": 203, "type": "#define", "text": "#define", "parent": 202, "children": [], "start_point": {"row": 108, "column": 0}, "end_point": {"row": 108, "column": 7}}, {"id": 204, "type": "identifier", "text": "QT_OPEN_TRUNC", "parent": 202, "children": [], "start_point": {"row": 108, "column": 8}, "end_point": {"row": 108, "column": 21}}, {"id": 205, "type": "preproc_arg", "text": "_O_TRUNC\r", "parent": 202, "children": [], "start_point": {"row": 108, "column": 23}, "end_point": {"row": 108, "column": 32}}, {"id": 206, "type": "preproc_def", "text": "#define QT_OPEN_APPEND\t\t_O_APPEND\r\n", "parent": 0, "children": [207, 208, 209], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 110, "column": 0}}, {"id": 207, "type": "#define", "text": "#define", "parent": 206, "children": [], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 109, "column": 7}}, {"id": 208, "type": "identifier", "text": "QT_OPEN_APPEND", "parent": 206, "children": [], "start_point": {"row": 109, "column": 8}, "end_point": {"row": 109, "column": 22}}, {"id": 209, "type": "preproc_arg", "text": "_O_APPEND\r", "parent": 206, "children": [], "start_point": {"row": 109, "column": 24}, "end_point": {"row": 109, "column": 34}}, {"id": 210, "type": "preproc_if", "text": "#if defined(O_TEXT)\r\n# define QT_OPEN_TEXT\t\t_O_TEXT\r\n# define QT_OPEN_BINARY\t\t_O_BINARY\r\n#endif", "parent": 0, "children": [211, 212, 215, 216, 220, 224], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 113, "column": 6}}, {"id": 211, "type": "#if", "text": "#if", "parent": 210, "children": [], "start_point": {"row": 110, "column": 0}, "end_point": {"row": 110, "column": 3}}, {"id": 212, "type": "preproc_defined", "text": "defined(O_TEXT)", "parent": 210, "children": [213, 214], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 19}}, {"id": 213, "type": "defined", "text": "defined", "parent": 212, "children": [], "start_point": {"row": 110, "column": 4}, "end_point": {"row": 110, "column": 11}}, {"id": 214, "type": "identifier", "text": "O_TEXT", "parent": 212, "children": [], "start_point": {"row": 110, "column": 12}, "end_point": {"row": 110, "column": 18}}, {"id": 215, "type": "\n", "text": "\n", "parent": 210, "children": [], "start_point": {"row": 110, "column": 20}, "end_point": {"row": 111, "column": 0}}, {"id": 216, "type": "preproc_def", "text": "# define QT_OPEN_TEXT\t\t_O_TEXT\r\n", "parent": 210, "children": [217, 218, 219], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 112, "column": 0}}, {"id": 217, "type": "#define", "text": "# define", "parent": 216, "children": [], "start_point": {"row": 111, "column": 0}, "end_point": {"row": 111, "column": 8}}, {"id": 218, "type": "identifier", "text": "QT_OPEN_TEXT", "parent": 216, "children": [], "start_point": {"row": 111, "column": 9}, "end_point": {"row": 111, "column": 21}}, {"id": 219, "type": "preproc_arg", "text": "_O_TEXT\r", "parent": 216, "children": [], "start_point": {"row": 111, "column": 23}, "end_point": {"row": 111, "column": 31}}, {"id": 220, "type": "preproc_def", "text": "# define QT_OPEN_BINARY\t\t_O_BINARY\r\n", "parent": 210, "children": [221, 222, 223], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 113, "column": 0}}, {"id": 221, "type": "#define", "text": "# define", "parent": 220, "children": [], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 112, "column": 8}}, {"id": 222, "type": "identifier", "text": "QT_OPEN_BINARY", "parent": 220, "children": [], "start_point": {"row": 112, "column": 9}, "end_point": {"row": 112, "column": 23}}, {"id": 223, "type": "preproc_arg", "text": "_O_BINARY\r", "parent": 220, "children": [], "start_point": {"row": 112, "column": 25}, "end_point": {"row": 112, "column": 35}}, {"id": 224, "type": "#endif", "text": "#endif", "parent": 210, "children": [], "start_point": {"row": 113, "column": 0}, "end_point": {"row": 113, "column": 6}}, {"id": 225, "type": "preproc_include", "text": "#include \"../common/c89/qplatformdefs.h\"\r\n", "parent": 0, "children": [226, 227], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 116, "column": 0}}, {"id": 226, "type": "#include", "text": "#include", "parent": 225, "children": [], "start_point": {"row": 115, "column": 0}, "end_point": {"row": 115, "column": 8}}, {"id": 227, "type": "string_literal", "text": "\"../common/c89/qplatformdefs.h\"", "parent": 225, "children": [], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 40}}, {"id": 228, "type": "preproc_ifdef", "text": "#ifdef QT_LARGEFILE_SUPPORT\r\n#undef QT_FTELL\r\n#undef QT_OFF_T\r\n\r\n// 64-bit versions of fseek/ftell not always available. E.g., when linking\r\n// dynamically to CRT (/MT)\r\n#define QT_FTELL (QT_OFF_T)::ftell\r\n#define QT_OFF_T __int64\r\n#endif", "parent": 0, "children": [229, 230, 231, 234, 237, 241, 245], "start_point": {"row": 117, "column": 0}, "end_point": {"row": 125, "column": 6}}, {"id": 229, "type": "#ifdef", "text": "#ifdef", "parent": 228, "children": [], "start_point": {"row": 117, "column": 0}, "end_point": {"row": 117, "column": 6}}, {"id": 230, "type": "identifier", "text": "QT_LARGEFILE_SUPPORT", "parent": 228, "children": [], "start_point": {"row": 117, "column": 7}, "end_point": {"row": 117, "column": 27}}, {"id": 231, "type": "preproc_call", "text": "#undef QT_FTELL\r\n", "parent": 228, "children": [232, 233], "start_point": {"row": 118, "column": 0}, "end_point": {"row": 119, "column": 0}}, {"id": 232, "type": "preproc_directive", "text": "#undef", "parent": 231, "children": [], "start_point": {"row": 118, "column": 0}, "end_point": {"row": 118, "column": 6}}, {"id": 233, "type": "preproc_arg", "text": "QT_FTELL\r", "parent": 231, "children": [], "start_point": {"row": 118, "column": 7}, "end_point": {"row": 118, "column": 16}}, {"id": 234, "type": "preproc_call", "text": "#undef QT_OFF_T\r\n", "parent": 228, "children": [235, 236], "start_point": {"row": 119, "column": 0}, "end_point": {"row": 120, "column": 0}}, {"id": 235, "type": "preproc_directive", "text": "#undef", "parent": 234, "children": [], "start_point": {"row": 119, "column": 0}, "end_point": {"row": 119, "column": 6}}, {"id": 236, "type": "preproc_arg", "text": "QT_OFF_T\r", "parent": 234, "children": [], "start_point": {"row": 119, "column": 7}, "end_point": {"row": 119, "column": 16}}, {"id": 237, "type": "preproc_def", "text": "#define QT_FTELL (QT_OFF_T)::ftell\r\n", "parent": 228, "children": [238, 239, 240], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 124, "column": 0}}, {"id": 238, "type": "#define", "text": "#define", "parent": 237, "children": [], "start_point": {"row": 123, "column": 0}, "end_point": {"row": 123, "column": 7}}, {"id": 239, "type": "identifier", "text": "QT_FTELL", "parent": 237, "children": [], "start_point": {"row": 123, "column": 8}, "end_point": {"row": 123, "column": 16}}, {"id": 240, "type": "preproc_arg", "text": "(QT_OFF_T)::ftell\r", "parent": 237, "children": [], "start_point": {"row": 123, "column": 32}, "end_point": {"row": 123, "column": 50}}, {"id": 241, "type": "preproc_def", "text": "#define QT_OFF_T __int64\r\n", "parent": 228, "children": [242, 243, 244], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 125, "column": 0}}, {"id": 242, "type": "#define", "text": "#define", "parent": 241, "children": [], "start_point": {"row": 124, "column": 0}, "end_point": {"row": 124, "column": 7}}, {"id": 243, "type": "identifier", "text": "QT_OFF_T", "parent": 241, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 16}}, {"id": 244, "type": "preproc_arg", "text": "__int64\r", "parent": 241, "children": [], "start_point": {"row": 124, "column": 32}, "end_point": {"row": 124, "column": 40}}, {"id": 245, "type": "#endif", "text": "#endif", "parent": 228, "children": [], "start_point": {"row": 125, "column": 0}, "end_point": {"row": 125, "column": 6}}, {"id": 246, "type": "preproc_def", "text": "#define QT_SIGNAL_ARGS\t\tint\r\n", "parent": 0, "children": [247, 248, 249], "start_point": {"row": 127, "column": 0}, "end_point": {"row": 128, "column": 0}}, {"id": 247, "type": "#define", "text": "#define", "parent": 246, "children": [], "start_point": {"row": 127, "column": 0}, "end_point": {"row": 127, "column": 7}}, {"id": 248, "type": "identifier", "text": "QT_SIGNAL_ARGS", "parent": 246, "children": [], "start_point": {"row": 127, "column": 8}, "end_point": {"row": 127, "column": 22}}, {"id": 249, "type": "preproc_arg", "text": "int\r", "parent": 246, "children": [], "start_point": {"row": 127, "column": 24}, "end_point": {"row": 127, "column": 28}}, {"id": 250, "type": "preproc_def", "text": "#define QT_VSNPRINTF ::_vsnprintf\r\n", "parent": 0, "children": [251, 252, 253], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 130, "column": 0}}, {"id": 251, "type": "#define", "text": "#define", "parent": 250, "children": [], "start_point": {"row": 129, "column": 0}, "end_point": {"row": 129, "column": 7}}, {"id": 252, "type": "identifier", "text": "QT_VSNPRINTF", "parent": 250, "children": [], "start_point": {"row": 129, "column": 8}, "end_point": {"row": 129, "column": 20}}, {"id": 253, "type": "preproc_arg", "text": "::_vsnprintf\r", "parent": 250, "children": [], "start_point": {"row": 129, "column": 21}, "end_point": {"row": 129, "column": 34}}, {"id": 254, "type": "preproc_def", "text": "#define QT_SNPRINTF\t\t::_snprintf\r\n", "parent": 0, "children": [255, 256, 257], "start_point": {"row": 130, "column": 0}, "end_point": {"row": 131, "column": 0}}, {"id": 255, "type": "#define", "text": "#define", "parent": 254, "children": [], "start_point": {"row": 130, "column": 0}, "end_point": {"row": 130, "column": 7}}, {"id": 256, "type": "identifier", "text": "QT_SNPRINTF", "parent": 254, "children": [], "start_point": {"row": 130, "column": 8}, "end_point": {"row": 130, "column": 19}}, {"id": 257, "type": "preproc_arg", "text": "::_snprintf\r", "parent": 254, "children": [], "start_point": {"row": 130, "column": 21}, "end_point": {"row": 130, "column": 33}}, {"id": 258, "type": "preproc_def", "text": "# define F_OK\t0\r\n", "parent": 0, "children": [259, 260, 261], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 133, "column": 0}}, {"id": 259, "type": "#define", "text": "# define", "parent": 258, "children": [], "start_point": {"row": 132, "column": 0}, "end_point": {"row": 132, "column": 8}}, {"id": 260, "type": "identifier", "text": "F_OK", "parent": 258, "children": [], "start_point": {"row": 132, "column": 9}, "end_point": {"row": 132, "column": 13}}, {"id": 261, "type": "preproc_arg", "text": "0\r", "parent": 258, "children": [], "start_point": {"row": 132, "column": 14}, "end_point": {"row": 132, "column": 16}}, {"id": 262, "type": "preproc_def", "text": "# define X_OK\t1\r\n", "parent": 0, "children": [263, 264, 265], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 134, "column": 0}}, {"id": 263, "type": "#define", "text": "# define", "parent": 262, "children": [], "start_point": {"row": 133, "column": 0}, "end_point": {"row": 133, "column": 8}}, {"id": 264, "type": "identifier", "text": "X_OK", "parent": 262, "children": [], "start_point": {"row": 133, "column": 9}, "end_point": {"row": 133, "column": 13}}, {"id": 265, "type": "preproc_arg", "text": "1\r", "parent": 262, "children": [], "start_point": {"row": 133, "column": 14}, "end_point": {"row": 133, "column": 16}}, {"id": 266, "type": "preproc_def", "text": "# define W_OK\t2\r\n", "parent": 0, "children": [267, 268, 269], "start_point": {"row": 134, "column": 0}, "end_point": {"row": 135, "column": 0}}, {"id": 267, "type": "#define", "text": "# define", "parent": 266, "children": [], "start_point": {"row": 134, "column": 0}, "end_point": {"row": 134, "column": 8}}, {"id": 268, "type": "identifier", "text": "W_OK", "parent": 266, "children": [], "start_point": {"row": 134, "column": 9}, "end_point": {"row": 134, "column": 13}}, {"id": 269, "type": "preproc_arg", "text": "2\r", "parent": 266, "children": [], "start_point": {"row": 134, "column": 14}, "end_point": {"row": 134, "column": 16}}, {"id": 270, "type": "preproc_def", "text": "# define R_OK\t4\r\n", "parent": 0, "children": [271, 272, 273], "start_point": {"row": 135, "column": 0}, "end_point": {"row": 136, "column": 0}}, {"id": 271, "type": "#define", "text": "# define", "parent": 270, "children": [], "start_point": {"row": 135, "column": 0}, "end_point": {"row": 135, "column": 8}}, {"id": 272, "type": "identifier", "text": "R_OK", "parent": 270, "children": [], "start_point": {"row": 135, "column": 9}, "end_point": {"row": 135, "column": 13}}, {"id": 273, "type": "preproc_arg", "text": "4\r", "parent": 270, "children": [], "start_point": {"row": 135, "column": 14}, "end_point": {"row": 135, "column": 16}}, {"id": 274, "type": "type_definition", "text": "typedef int mode_t;", "parent": 0, "children": [275, 276, 277], "start_point": {"row": 137, "column": 0}, "end_point": {"row": 137, "column": 19}}, {"id": 275, "type": "typedef", "text": "typedef", "parent": 274, "children": [], "start_point": {"row": 137, "column": 0}, "end_point": {"row": 137, "column": 7}}, {"id": 276, "type": "primitive_type", "text": "int", "parent": 274, "children": [], "start_point": {"row": 137, "column": 8}, "end_point": {"row": 137, "column": 11}}, {"id": 277, "type": "type_identifier", "text": "mode_t", "parent": 274, "children": [], "start_point": {"row": 137, "column": 12}, "end_point": {"row": 137, "column": 18}}, {"id": 278, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 139, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [274], "classes": [], "imports": [17, 18, 23, 24, 29, 30, 32, 33, 35, 36, 38, 39, 41, 42, 44, 45, 47, 48, 50, 51, 53, 54, 225, 226], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 22, 58, 59, 60, 61, 64, 68, 72, 76, 82, 86, 90, 94, 96, 99, 103, 107, 109, 110, 113, 117, 119, 122, 126, 130, 132, 133, 134, 137, 141, 147, 151, 153, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 210, 211, 214, 218, 222, 224, 228, 229, 230, 239, 243, 245, 248, 252, 256, 260, 264, 268, 272, 277, 278], "returns": [], "exceptions": []}, "expressions": {"calls": [26, 231, 234], "literals": [19, 25, 31, 34, 37, 40, 43, 46, 49, 52, 55, 227], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 17, "text": "#include \"qglobal.h\"\r\n"}, {"node_id": 18, "text": "#include"}, {"node_id": 23, "text": "#include <limits.h>\r\n"}, {"node_id": 24, "text": "#include"}, {"node_id": 29, "text": "#include <tchar.h>\r\n"}, {"node_id": 30, "text": "#include"}, {"node_id": 32, "text": "#include <io.h>\r\n"}, {"node_id": 33, "text": "#include"}, {"node_id": 35, "text": "#include <direct.h>\r\n"}, {"node_id": 36, "text": "#include"}, {"node_id": 38, "text": "#include <stdio.h>\r\n"}, {"node_id": 39, "text": "#include"}, {"node_id": 41, "text": "#include <fcntl.h>\r\n"}, {"node_id": 42, "text": "#include"}, {"node_id": 44, "text": "#include <errno.h>\r\n"}, {"node_id": 45, "text": "#include"}, {"node_id": 47, "text": "#include <sys/stat.h>\r\n"}, {"node_id": 48, "text": "#include"}, {"node_id": 50, "text": "#include <stdlib.h>\r\n"}, {"node_id": 51, "text": "#include"}, {"node_id": 53, "text": "#include <windows.h>\r\n"}, {"node_id": 54, "text": "#include"}, {"node_id": 225, "text": "#include \"../common/c89/qplatformdefs.h\"\r\n"}, {"node_id": 226, "text": "#include"}]}, "original_source_code": "/****************************************************************************\r\n**\r\n** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).\r\n** All rights reserved.\r\n** Contact: Nokia Corporation (<EMAIL>)\r\n**\r\n** This file is part of the qmake spec of the Qt Toolkit.\r\n**\r\n** $QT_BEGIN_LICENSE:LGPL$\r\n** Commercial Usage\r\n** Licensees holding valid Qt Commercial licenses may use this file in\r\n** accordance with the Qt Commercial License Agreement provided with the\r\n** Software or, alternatively, in accordance with the terms contained in\r\n** a written agreement between you and Nokia.\r\n**\r\n** GNU Lesser General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU Lesser\r\n** General Public License version 2.1 as published by the Free Software\r\n** Foundation and appearing in the file LICENSE.LGPL included in the\r\n** packaging of this file. Please review the following information to\r\n** ensure the GNU Lesser General Public License version 2.1 requirements\r\n** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\r\n**\r\n** In addition, as a special exception, Nokia gives you certain additional\r\n** rights. These rights are described in the Nokia Qt LGPL Exception\r\n** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\r\n**\r\n** GNU General Public License Usage\r\n** Alternatively, this file may be used under the terms of the GNU\r\n** General Public License version 3.0 as published by the Free Software\r\n** Foundation and appearing in the file LICENSE.GPL included in the\r\n** packaging of this file. Please review the following information to\r\n** ensure the GNU General Public License version 3.0 requirements will be\r\n** met: http://www.gnu.org/copyleft/gpl.html.\r\n**\r\n** If you have questions regarding the use of this file, please contact\r\n** Nokia at <EMAIL>.\r\n** $QT_END_LICENSE$\r\n**\r\n****************************************************************************/\r\n\r\n#ifndef QPLATFORMDEFS_H\r\n#define QPLATFORMDEFS_H\r\n\r\n#ifdef UNICODE\r\n#ifndef _UNICODE\r\n#define _UNICODE\r\n#endif\r\n#endif\r\n\r\n// Get Qt defines/settings\r\n\r\n#include \"qglobal.h\"\r\n\r\n#define _POSIX_\r\n#include <limits.h>\r\n#undef _POSIX_\r\n\r\n#include <tchar.h>\r\n#include <io.h>\r\n#include <direct.h>\r\n#include <stdio.h>\r\n#include <fcntl.h>\r\n#include <errno.h>\r\n#include <sys/stat.h>\r\n#include <stdlib.h>\r\n#include <windows.h>\r\n\r\n#define Q_FS_FAT\r\n#ifdef QT_LARGEFILE_SUPPORT\r\n#define QT_STATBUF\t\tstruct _stati64\t\t// non-ANSI defs\r\n#define QT_STATBUF4TSTAT\tstruct _stati64\t\t// non-ANSI defs\r\n#define QT_STAT\t\t\t::_stati64\r\n#define QT_FSTAT\t\t::_fstati64\r\n#else\r\n#define QT_STATBUF\t\tstruct _stat\t\t// non-ANSI defs\r\n#define QT_STATBUF4TSTAT\tstruct _stat\t\t// non-ANSI defs\r\n#define QT_STAT\t\t\t::_stat\r\n#define QT_FSTAT\t\t::_fstat\r\n#endif\r\n#define QT_STAT_REG\t\t_S_IFREG\r\n#define QT_STAT_DIR\t\t_S_IFDIR\r\n#define QT_STAT_MASK\t\t_S_IFMT\r\n#if defined(_S_IFLNK)\r\n# define QT_STAT_LNK\t\t_S_IFLNK\r\n#endif\r\n#define QT_FILENO\t\t_fileno\r\n#define QT_OPEN\t\t\t::_open\r\n#define QT_CLOSE\t\t::_close\r\n#ifdef QT_LARGEFILE_SUPPORT\r\n#define QT_LSEEK\t\t::_lseeki64\r\n#define QT_TSTAT\t\t::_tstati64\r\n#else\r\n#define QT_LSEEK\t\t::_lseek\r\n#define QT_TSTAT\t\t::_tstat\r\n#endif\r\n#define QT_READ\t\t\t::_read\r\n#define QT_WRITE\t\t::_write\r\n#define QT_ACCESS\t\t::_access\r\n#define QT_GETCWD\t\t::_getcwd\r\n#define QT_CHDIR\t\t::_chdir\r\n#define QT_MKDIR\t\t::_mkdir\r\n#define QT_RMDIR\t\t::_rmdir\r\n#define QT_OPEN_LARGEFILE 0\r\n#define QT_OPEN_RDONLY\t\t_O_RDONLY\r\n#define QT_OPEN_WRONLY\t\t_O_WRONLY\r\n#define QT_OPEN_RDWR\t\t_O_RDWR\r\n#define QT_OPEN_CREAT\t\t_O_CREAT\r\n#define QT_OPEN_TRUNC\t\t_O_TRUNC\r\n#define QT_OPEN_APPEND\t\t_O_APPEND\r\n#if defined(O_TEXT)\r\n# define QT_OPEN_TEXT\t\t_O_TEXT\r\n# define QT_OPEN_BINARY\t\t_O_BINARY\r\n#endif\r\n\r\n#include \"../common/c89/qplatformdefs.h\"\r\n\r\n#ifdef QT_LARGEFILE_SUPPORT\r\n#undef QT_FTELL\r\n#undef QT_OFF_T\r\n\r\n// 64-bit versions of fseek/ftell not always available. E.g., when linking\r\n// dynamically to CRT (/MT)\r\n#define QT_FTELL (QT_OFF_T)::ftell\r\n#define QT_OFF_T __int64\r\n#endif\r\n\r\n#define QT_SIGNAL_ARGS\t\tint\r\n\r\n#define QT_VSNPRINTF ::_vsnprintf\r\n#define QT_SNPRINTF\t\t::_snprintf\r\n\r\n# define F_OK\t0\r\n# define X_OK\t1\r\n# define W_OK\t2\r\n# define R_OK\t4\r\n\r\ntypedef int mode_t;\r\n\r\n#endif // QPLATFORMDEFS_H\r\n"}
74
c
/// \file /// Initialize the atom configuration. #ifndef __INIT_ATOMS_H #define __INIT_ATOMS_H #include "mytype.h" struct SimFlatSt; struct LinkCellSt; struct NeighborListSt; /// Atom data typedef struct AtomsSt { // atom-specific data int nLocal; //!< total number of atoms on this processor int* lid; //!< A locally unique id for each atom (used for the neighborlist) int nGlobal; //!< total number of atoms in simulation int* gid; //!< A globally unique id for each atom int* iSpecies; //!< the species index of the atom struct NeighborListSt* neighborList; vec_t r; //!< positions vec_t p; //!< momenta of atoms vec_t f; //!< forces real_t* U; //!< potential energy per atom } Atoms; /// Allocates memory to store atom data. Atoms* initAtoms(struct LinkCellSt* boxes, const real_t skinDistance); void destroyAtoms(struct AtomsSt* atoms); void createFccLattice(int nx, int ny, int nz, real_t lat, struct SimFlatSt* s); void setVcm(struct SimFlatSt* s, real_t vcm[3]); void setTemperature(struct SimFlatSt* s, real_t temperature); void randomDisplacements(struct SimFlatSt* s, real_t delta); /// Update the local id of each local particle. This is used by the neighbor-list void atomsUpdateLocalId(struct LinkCellSt* boxes, Atoms* atoms); #endif
37.65
34
(translation_unit) "/// \file\n/// Initialize the atom configuration.\n\n#ifndef __INIT_ATOMS_H\n#define __INIT_ATOMS_H\n\n#include "mytype.h"\n\nstruct SimFlatSt;\nstruct LinkCellSt;\nstruct NeighborListSt;\n\n/// Atom data\ntypedef struct AtomsSt\n{\n // atom-specific data\n int nLocal; //!< total number of atoms on this processor\n int* lid; //!< A locally unique id for each atom (used for the neighborlist)\n int nGlobal; //!< total number of atoms in simulation\n\n int* gid; //!< A globally unique id for each atom\n int* iSpecies; //!< the species index of the atom\n\n struct NeighborListSt* neighborList;\n\n vec_t r; //!< positions\n vec_t p; //!< momenta of atoms\n vec_t f; //!< forces \n real_t* U; //!< potential energy per atom\n} Atoms;\n\n\n/// Allocates memory to store atom data.\nAtoms* initAtoms(struct LinkCellSt* boxes, const real_t skinDistance);\nvoid destroyAtoms(struct AtomsSt* atoms);\n\nvoid createFccLattice(int nx, int ny, int nz, real_t lat, struct SimFlatSt* s);\n\nvoid setVcm(struct SimFlatSt* s, real_t vcm[3]);\nvoid setTemperature(struct SimFlatSt* s, real_t temperature);\nvoid randomDisplacements(struct SimFlatSt* s, real_t delta);\n\n/// Update the local id of each local particle. This is used by the neighbor-list\nvoid atomsUpdateLocalId(struct LinkCellSt* boxes, Atoms* atoms);\n#endif\n" (comment) "/// \file" (comment) "/// Initialize the atom configuration." (preproc_ifdef) "#ifndef __INIT_ATOMS_H\n#define __INIT_ATOMS_H\n\n#include "mytype.h"\n\nstruct SimFlatSt;\nstruct LinkCellSt;\nstruct NeighborListSt;\n\n/// Atom data\ntypedef struct AtomsSt\n{\n // atom-specific data\n int nLocal; //!< total number of atoms on this processor\n int* lid; //!< A locally unique id for each atom (used for the neighborlist)\n int nGlobal; //!< total number of atoms in simulation\n\n int* gid; //!< A globally unique id for each atom\n int* iSpecies; //!< the species index of the atom\n\n struct NeighborListSt* neighborList;\n\n vec_t r; //!< positions\n vec_t p; //!< momenta of atoms\n vec_t f; //!< forces \n real_t* U; //!< potential energy per atom\n} Atoms;\n\n\n/// Allocates memory to store atom data.\nAtoms* initAtoms(struct LinkCellSt* boxes, const real_t skinDistance);\nvoid destroyAtoms(struct AtomsSt* atoms);\n\nvoid createFccLattice(int nx, int ny, int nz, real_t lat, struct SimFlatSt* s);\n\nvoid setVcm(struct SimFlatSt* s, real_t vcm[3]);\nvoid setTemperature(struct SimFlatSt* s, real_t temperature);\nvoid randomDisplacements(struct SimFlatSt* s, real_t delta);\n\n/// Update the local id of each local particle. This is used by the neighbor-list\nvoid atomsUpdateLocalId(struct LinkCellSt* boxes, Atoms* atoms);\n#endif" (#ifndef) "#ifndef" (identifier) "__INIT_ATOMS_H" (preproc_def) "#define __INIT_ATOMS_H\n" (#define) "#define" (identifier) "__INIT_ATOMS_H" (preproc_include) "#include "mytype.h"\n" (#include) "#include" (string_literal) ""mytype.h"" (") """ (string_content) "mytype.h" (") """ (struct_specifier) "struct SimFlatSt" (struct) "struct" (type_identifier) "SimFlatSt" (;) ";" (struct_specifier) "struct LinkCellSt" (struct) "struct" (type_identifier) "LinkCellSt" (;) ";" (struct_specifier) "struct NeighborListSt" (struct) "struct" (type_identifier) "NeighborListSt" (;) ";" (comment) "/// Atom data" (type_definition) "typedef struct AtomsSt\n{\n // atom-specific data\n int nLocal; //!< total number of atoms on this processor\n int* lid; //!< A locally unique id for each atom (used for the neighborlist)\n int nGlobal; //!< total number of atoms in simulation\n\n int* gid; //!< A globally unique id for each atom\n int* iSpecies; //!< the species index of the atom\n\n struct NeighborListSt* neighborList;\n\n vec_t r; //!< positions\n vec_t p; //!< momenta of atoms\n vec_t f; //!< forces \n real_t* U; //!< potential energy per atom\n} Atoms;" (typedef) "typedef" (struct_specifier) "struct AtomsSt\n{\n // atom-specific data\n int nLocal; //!< total number of atoms on this processor\n int* lid; //!< A locally unique id for each atom (used for the neighborlist)\n int nGlobal; //!< total number of atoms in simulation\n\n int* gid; //!< A globally unique id for each atom\n int* iSpecies; //!< the species index of the atom\n\n struct NeighborListSt* neighborList;\n\n vec_t r; //!< positions\n vec_t p; //!< momenta of atoms\n vec_t f; //!< forces \n real_t* U; //!< potential energy per atom\n}" (struct) "struct" (type_identifier) "AtomsSt" (field_declaration_list) "{\n // atom-specific data\n int nLocal; //!< total number of atoms on this processor\n int* lid; //!< A locally unique id for each atom (used for the neighborlist)\n int nGlobal; //!< total number of atoms in simulation\n\n int* gid; //!< A globally unique id for each atom\n int* iSpecies; //!< the species index of the atom\n\n struct NeighborListSt* neighborList;\n\n vec_t r; //!< positions\n vec_t p; //!< momenta of atoms\n vec_t f; //!< forces \n real_t* U; //!< potential energy per atom\n}" ({) "{" (comment) "// atom-specific data" (field_declaration) "int nLocal;" (primitive_type) "int" (field_identifier) "nLocal" (;) ";" (comment) "//!< total number of atoms on this processor" (field_declaration) "int* lid;" (primitive_type) "int" (pointer_declarator) "* lid" (*) "*" (field_identifier) "lid" (;) ";" (comment) "//!< A locally unique id for each atom (used for the neighborlist)" (field_declaration) "int nGlobal;" (primitive_type) "int" (field_identifier) "nGlobal" (;) ";" (comment) "//!< total number of atoms in simulation" (field_declaration) "int* gid;" (primitive_type) "int" (pointer_declarator) "* gid" (*) "*" (field_identifier) "gid" (;) ";" (comment) "//!< A globally unique id for each atom" (field_declaration) "int* iSpecies;" (primitive_type) "int" (pointer_declarator) "* iSpecies" (*) "*" (field_identifier) "iSpecies" (;) ";" (comment) "//!< the species index of the atom" (field_declaration) "struct NeighborListSt* neighborList;" (struct_specifier) "struct NeighborListSt" (struct) "struct" (type_identifier) "NeighborListSt" (pointer_declarator) "* neighborList" (*) "*" (field_identifier) "neighborList" (;) ";" (field_declaration) "vec_t r;" (type_identifier) "vec_t" (field_identifier) "r" (;) ";" (comment) "//!< positions" (field_declaration) "vec_t p;" (type_identifier) "vec_t" (field_identifier) "p" (;) ";" (comment) "//!< momenta of atoms" (field_declaration) "vec_t f;" (type_identifier) "vec_t" (field_identifier) "f" (;) ";" (comment) "//!< forces " (field_declaration) "real_t* U;" (type_identifier) "real_t" (pointer_declarator) "* U" (*) "*" (field_identifier) "U" (;) ";" (comment) "//!< potential energy per atom" (}) "}" (type_identifier) "Atoms" (;) ";" (comment) "/// Allocates memory to store atom data." (declaration) "Atoms* initAtoms(struct LinkCellSt* boxes, const real_t skinDistance);" (type_identifier) "Atoms" (pointer_declarator) "* initAtoms(struct LinkCellSt* boxes, const real_t skinDistance)" (*) "*" (function_declarator) "initAtoms(struct LinkCellSt* boxes, const real_t skinDistance)" (identifier) "initAtoms" (parameter_list) "(struct LinkCellSt* boxes, const real_t skinDistance)" (() "(" (parameter_declaration) "struct LinkCellSt* boxes" (struct_specifier) "struct LinkCellSt" (struct) "struct" (type_identifier) "LinkCellSt" (pointer_declarator) "* boxes" (*) "*" (identifier) "boxes" (,) "," (parameter_declaration) "const real_t skinDistance" (type_qualifier) "const" (const) "const" (type_identifier) "real_t" (identifier) "skinDistance" ()) ")" (;) ";" (declaration) "void destroyAtoms(struct AtomsSt* atoms);" (primitive_type) "void" (function_declarator) "destroyAtoms(struct AtomsSt* atoms)" (identifier) "destroyAtoms" (parameter_list) "(struct AtomsSt* atoms)" (() "(" (parameter_declaration) "struct AtomsSt* atoms" (struct_specifier) "struct AtomsSt" (struct) "struct" (type_identifier) "AtomsSt" (pointer_declarator) "* atoms" (*) "*" (identifier) "atoms" ()) ")" (;) ";" (declaration) "void createFccLattice(int nx, int ny, int nz, real_t lat, struct SimFlatSt* s);" (primitive_type) "void" (function_declarator) "createFccLattice(int nx, int ny, int nz, real_t lat, struct SimFlatSt* s)" (identifier) "createFccLattice" (parameter_list) "(int nx, int ny, int nz, real_t lat, struct SimFlatSt* s)" (() "(" (parameter_declaration) "int nx" (primitive_type) "int" (identifier) "nx" (,) "," (parameter_declaration) "int ny" (primitive_type) "int" (identifier) "ny" (,) "," (parameter_declaration) "int nz" (primitive_type) "int" (identifier) "nz" (,) "," (parameter_declaration) "real_t lat" (type_identifier) "real_t" (identifier) "lat" (,) "," (parameter_declaration) "struct SimFlatSt* s" (struct_specifier) "struct SimFlatSt" (struct) "struct" (type_identifier) "SimFlatSt" (pointer_declarator) "* s" (*) "*" (identifier) "s" ()) ")" (;) ";" (declaration) "void setVcm(struct SimFlatSt* s, real_t vcm[3]);" (primitive_type) "void" (function_declarator) "setVcm(struct SimFlatSt* s, real_t vcm[3])" (identifier) "setVcm" (parameter_list) "(struct SimFlatSt* s, real_t vcm[3])" (() "(" (parameter_declaration) "struct SimFlatSt* s" (struct_specifier) "struct SimFlatSt" (struct) "struct" (type_identifier) "SimFlatSt" (pointer_declarator) "* s" (*) "*" (identifier) "s" (,) "," (parameter_declaration) "real_t vcm[3]" (type_identifier) "real_t" (array_declarator) "vcm[3]" (identifier) "vcm" ([) "[" (number_literal) "3" (]) "]" ()) ")" (;) ";" (declaration) "void setTemperature(struct SimFlatSt* s, real_t temperature);" (primitive_type) "void" (function_declarator) "setTemperature(struct SimFlatSt* s, real_t temperature)" (identifier) "setTemperature" (parameter_list) "(struct SimFlatSt* s, real_t temperature)" (() "(" (parameter_declaration) "struct SimFlatSt* s" (struct_specifier) "struct SimFlatSt" (struct) "struct" (type_identifier) "SimFlatSt" (pointer_declarator) "* s" (*) "*" (identifier) "s" (,) "," (parameter_declaration) "real_t temperature" (type_identifier) "real_t" (identifier) "temperature" ()) ")" (;) ";" (declaration) "void randomDisplacements(struct SimFlatSt* s, real_t delta);" (primitive_type) "void" (function_declarator) "randomDisplacements(struct SimFlatSt* s, real_t delta)" (identifier) "randomDisplacements" (parameter_list) "(struct SimFlatSt* s, real_t delta)" (() "(" (parameter_declaration) "struct SimFlatSt* s" (struct_specifier) "struct SimFlatSt" (struct) "struct" (type_identifier) "SimFlatSt" (pointer_declarator) "* s" (*) "*" (identifier) "s" (,) "," (parameter_declaration) "real_t delta" (type_identifier) "real_t" (identifier) "delta" ()) ")" (;) ";" (comment) "/// Update the local id of each local particle. This is used by the neighbor-list" (declaration) "void atomsUpdateLocalId(struct LinkCellSt* boxes, Atoms* atoms);" (primitive_type) "void" (function_declarator) "atomsUpdateLocalId(struct LinkCellSt* boxes, Atoms* atoms)" (identifier) "atomsUpdateLocalId" (parameter_list) "(struct LinkCellSt* boxes, Atoms* atoms)" (() "(" (parameter_declaration) "struct LinkCellSt* boxes" (struct_specifier) "struct LinkCellSt" (struct) "struct" (type_identifier) "LinkCellSt" (pointer_declarator) "* boxes" (*) "*" (identifier) "boxes" (,) "," (parameter_declaration) "Atoms* atoms" (type_identifier) "Atoms" (pointer_declarator) "* atoms" (*) "*" (identifier) "atoms" ()) ")" (;) ";" (#endif) "#endif"
254
0
{"language": "c", "success": true, "metadata": {"lines": 34, "avg_line_length": 37.65, "nodes": 184, "errors": 0, "source_hash": "2cc6e2c4740e0dfcfd3c1c3d768b8cec406748792107b36b488ca7c9be6c446f", "categorized_nodes": 131}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __INIT_ATOMS_H\n#define __INIT_ATOMS_H\n\n#include \"mytype.h\"\n\nstruct SimFlatSt;\nstruct LinkCellSt;\nstruct NeighborListSt;\n\n/// Atom data\ntypedef struct AtomsSt\n{\n // atom-specific data\n int nLocal; //!< total number of atoms on this processor\n int* lid; //!< A locally unique id for each atom (used for the neighborlist)\n int nGlobal; //!< total number of atoms in simulation\n\n int* gid; //!< A globally unique id for each atom\n int* iSpecies; //!< the species index of the atom\n\n struct NeighborListSt* neighborList;\n\n vec_t r; //!< positions\n vec_t p; //!< momenta of atoms\n vec_t f; //!< forces \n real_t* U; //!< potential energy per atom\n} Atoms;\n\n\n/// Allocates memory to store atom data.\nAtoms* initAtoms(struct LinkCellSt* boxes, const real_t skinDistance);\nvoid destroyAtoms(struct AtomsSt* atoms);\n\nvoid createFccLattice(int nx, int ny, int nz, real_t lat, struct SimFlatSt* s);\n\nvoid setVcm(struct SimFlatSt* s, real_t vcm[3]);\nvoid setTemperature(struct SimFlatSt* s, real_t temperature);\nvoid randomDisplacements(struct SimFlatSt* s, real_t delta);\n\n/// Update the local id of each local particle. This is used by the neighbor-list\nvoid atomsUpdateLocalId(struct LinkCellSt* boxes, Atoms* atoms);\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 66, 83, 95, 119, 136, 151, 166, 183], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 44, "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": "__INIT_ATOMS_H", "parent": 0, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 22}}, {"id": 3, "type": "preproc_def", "text": "#define __INIT_ATOMS_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": "__INIT_ATOMS_H", "parent": 3, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include \"mytype.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 7, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"mytype.h\"", "parent": 6, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 19}}, {"id": 9, "type": "struct_specifier", "text": "struct SimFlatSt", "parent": 0, "children": [10, 11], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 16}}, {"id": 10, "type": "struct", "text": "struct", "parent": 9, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 11, "type": "type_identifier", "text": "SimFlatSt", "parent": 9, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 16}}, {"id": 12, "type": "struct_specifier", "text": "struct LinkCellSt", "parent": 0, "children": [13, 14], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 17}}, {"id": 13, "type": "struct", "text": "struct", "parent": 12, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 6}}, {"id": 14, "type": "type_identifier", "text": "LinkCellSt", "parent": 12, "children": [], "start_point": {"row": 9, "column": 7}, "end_point": {"row": 9, "column": 17}}, {"id": 15, "type": "struct_specifier", "text": "struct NeighborListSt", "parent": 0, "children": [16, 17], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 21}}, {"id": 16, "type": "struct", "text": "struct", "parent": 15, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 17, "type": "type_identifier", "text": "NeighborListSt", "parent": 15, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 21}}, {"id": 18, "type": "type_definition", "text": "typedef struct AtomsSt\n{\n // atom-specific data\n int nLocal; //!< total number of atoms on this processor\n int* lid; //!< A locally unique id for each atom (used for the neighborlist)\n int nGlobal; //!< total number of atoms in simulation\n\n int* gid; //!< A globally unique id for each atom\n int* iSpecies; //!< the species index of the atom\n\n struct NeighborListSt* neighborList;\n\n vec_t r; //!< positions\n vec_t p; //!< momenta of atoms\n vec_t f; //!< forces \n real_t* U; //!< potential energy per atom\n} Atoms;", "parent": 0, "children": [19, 20, 65], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 29, "column": 8}}, {"id": 19, "type": "typedef", "text": "typedef", "parent": 18, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 20, "type": "struct_specifier", "text": "struct AtomsSt\n{\n // atom-specific data\n int nLocal; //!< total number of atoms on this processor\n int* lid; //!< A locally unique id for each atom (used for the neighborlist)\n int nGlobal; //!< total number of atoms in simulation\n\n int* gid; //!< A globally unique id for each atom\n int* iSpecies; //!< the species index of the atom\n\n struct NeighborListSt* neighborList;\n\n vec_t r; //!< positions\n vec_t p; //!< momenta of atoms\n vec_t f; //!< forces \n real_t* U; //!< potential energy per atom\n}", "parent": 18, "children": [21, 22], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 29, "column": 1}}, {"id": 21, "type": "struct", "text": "struct", "parent": 20, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 14}}, {"id": 22, "type": "type_identifier", "text": "AtomsSt", "parent": 20, "children": [], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 22}}, {"id": 23, "type": "field_declaration", "text": "int nLocal;", "parent": 20, "children": [24, 25], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 14}}, {"id": 24, "type": "primitive_type", "text": "int", "parent": 23, "children": [], "start_point": {"row": 16, "column": 3}, "end_point": {"row": 16, "column": 6}}, {"id": 25, "type": "field_identifier", "text": "nLocal", "parent": 23, "children": [], "start_point": {"row": 16, "column": 7}, "end_point": {"row": 16, "column": 13}}, {"id": 26, "type": "field_declaration", "text": "int* lid;", "parent": 20, "children": [27, 28], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 12}}, {"id": 27, "type": "primitive_type", "text": "int", "parent": 26, "children": [], "start_point": {"row": 17, "column": 3}, "end_point": {"row": 17, "column": 6}}, {"id": 28, "type": "pointer_declarator", "text": "* lid", "parent": 26, "children": [29, 30], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 11}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 17, "column": 6}, "end_point": {"row": 17, "column": 7}}, {"id": 30, "type": "field_identifier", "text": "lid", "parent": 28, "children": [], "start_point": {"row": 17, "column": 8}, "end_point": {"row": 17, "column": 11}}, {"id": 31, "type": "field_declaration", "text": "int nGlobal;", "parent": 20, "children": [32, 33], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 15}}, {"id": 32, "type": "primitive_type", "text": "int", "parent": 31, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 6}}, {"id": 33, "type": "field_identifier", "text": "nGlobal", "parent": 31, "children": [], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 14}}, {"id": 34, "type": "field_declaration", "text": "int* gid;", "parent": 20, "children": [35, 36], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 12}}, {"id": 35, "type": "primitive_type", "text": "int", "parent": 34, "children": [], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 6}}, {"id": 36, "type": "pointer_declarator", "text": "* gid", "parent": 34, "children": [37, 38], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 11}}, {"id": 37, "type": "*", "text": "*", "parent": 36, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 7}}, {"id": 38, "type": "field_identifier", "text": "gid", "parent": 36, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 11}}, {"id": 39, "type": "field_declaration", "text": "int* iSpecies;", "parent": 20, "children": [40, 41], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 17}}, {"id": 40, "type": "primitive_type", "text": "int", "parent": 39, "children": [], "start_point": {"row": 21, "column": 3}, "end_point": {"row": 21, "column": 6}}, {"id": 41, "type": "pointer_declarator", "text": "* iSpecies", "parent": 39, "children": [42, 43], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 16}}, {"id": 42, "type": "*", "text": "*", "parent": 41, "children": [], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 7}}, {"id": 43, "type": "field_identifier", "text": "iSpecies", "parent": 41, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 16}}, {"id": 44, "type": "field_declaration", "text": "struct NeighborListSt* neighborList;", "parent": 20, "children": [45, 48], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 39}}, {"id": 45, "type": "struct_specifier", "text": "struct NeighborListSt", "parent": 44, "children": [46, 47], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 24}}, {"id": 46, "type": "struct", "text": "struct", "parent": 45, "children": [], "start_point": {"row": 23, "column": 3}, "end_point": {"row": 23, "column": 9}}, {"id": 47, "type": "type_identifier", "text": "NeighborListSt", "parent": 45, "children": [], "start_point": {"row": 23, "column": 10}, "end_point": {"row": 23, "column": 24}}, {"id": 48, "type": "pointer_declarator", "text": "* neighborList", "parent": 44, "children": [49, 50], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 38}}, {"id": 49, "type": "*", "text": "*", "parent": 48, "children": [], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 25}}, {"id": 50, "type": "field_identifier", "text": "neighborList", "parent": 48, "children": [], "start_point": {"row": 23, "column": 26}, "end_point": {"row": 23, "column": 38}}, {"id": 51, "type": "field_declaration", "text": "vec_t r;", "parent": 20, "children": [52, 53], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 11}}, {"id": 52, "type": "type_identifier", "text": "vec_t", "parent": 51, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 8}}, {"id": 53, "type": "field_identifier", "text": "r", "parent": 51, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 10}}, {"id": 54, "type": "field_declaration", "text": "vec_t p;", "parent": 20, "children": [55, 56], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 11}}, {"id": 55, "type": "type_identifier", "text": "vec_t", "parent": 54, "children": [], "start_point": {"row": 26, "column": 3}, "end_point": {"row": 26, "column": 8}}, {"id": 56, "type": "field_identifier", "text": "p", "parent": 54, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 10}}, {"id": 57, "type": "field_declaration", "text": "vec_t f;", "parent": 20, "children": [58, 59], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 11}}, {"id": 58, "type": "type_identifier", "text": "vec_t", "parent": 57, "children": [], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 8}}, {"id": 59, "type": "field_identifier", "text": "f", "parent": 57, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 10}}, {"id": 60, "type": "field_declaration", "text": "real_t* U;", "parent": 20, "children": [61, 62], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 13}}, {"id": 61, "type": "type_identifier", "text": "real_t", "parent": 60, "children": [], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 9}}, {"id": 62, "type": "pointer_declarator", "text": "* U", "parent": 60, "children": [63, 64], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 12}}, {"id": 63, "type": "*", "text": "*", "parent": 62, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 10}}, {"id": 64, "type": "field_identifier", "text": "U", "parent": 62, "children": [], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 12}}, {"id": 65, "type": "type_identifier", "text": "Atoms", "parent": 18, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 7}}, {"id": 66, "type": "declaration", "text": "Atoms* initAtoms(struct LinkCellSt* boxes, const real_t skinDistance);", "parent": 0, "children": [67, 68], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 70}}, {"id": 67, "type": "type_identifier", "text": "Atoms", "parent": 66, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 5}}, {"id": 68, "type": "pointer_declarator", "text": "* initAtoms(struct LinkCellSt* boxes, const real_t skinDistance)", "parent": 66, "children": [69, 70], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 69}}, {"id": 69, "type": "*", "text": "*", "parent": 68, "children": [], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 6}}, {"id": 70, "type": "function_declarator", "text": "initAtoms(struct LinkCellSt* boxes, const real_t skinDistance)", "parent": 68, "children": [71, 72], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 69}}, {"id": 71, "type": "identifier", "text": "initAtoms", "parent": 70, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 16}}, {"id": 72, "type": "parameter_list", "text": "(struct LinkCellSt* boxes, const real_t skinDistance)", "parent": 70, "children": [73, 80], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 69}}, {"id": 73, "type": "parameter_declaration", "text": "struct LinkCellSt* boxes", "parent": 72, "children": [74, 77], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 41}}, {"id": 74, "type": "struct_specifier", "text": "struct LinkCellSt", "parent": 73, "children": [75, 76], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 34}}, {"id": 75, "type": "struct", "text": "struct", "parent": 74, "children": [], "start_point": {"row": 33, "column": 17}, "end_point": {"row": 33, "column": 23}}, {"id": 76, "type": "type_identifier", "text": "LinkCellSt", "parent": 74, "children": [], "start_point": {"row": 33, "column": 24}, "end_point": {"row": 33, "column": 34}}, {"id": 77, "type": "pointer_declarator", "text": "* boxes", "parent": 73, "children": [78, 79], "start_point": {"row": 33, "column": 34}, "end_point": {"row": 33, "column": 41}}, {"id": 78, "type": "*", "text": "*", "parent": 77, "children": [], "start_point": {"row": 33, "column": 34}, "end_point": {"row": 33, "column": 35}}, {"id": 79, "type": "identifier", "text": "boxes", "parent": 77, "children": [], "start_point": {"row": 33, "column": 36}, "end_point": {"row": 33, "column": 41}}, {"id": 80, "type": "parameter_declaration", "text": "const real_t skinDistance", "parent": 72, "children": [81, 82], "start_point": {"row": 33, "column": 43}, "end_point": {"row": 33, "column": 68}}, {"id": 81, "type": "type_identifier", "text": "real_t", "parent": 80, "children": [], "start_point": {"row": 33, "column": 49}, "end_point": {"row": 33, "column": 55}}, {"id": 82, "type": "identifier", "text": "skinDistance", "parent": 80, "children": [], "start_point": {"row": 33, "column": 56}, "end_point": {"row": 33, "column": 68}}, {"id": 83, "type": "declaration", "text": "void destroyAtoms(struct AtomsSt* atoms);", "parent": 0, "children": [84, 85], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 41}}, {"id": 84, "type": "primitive_type", "text": "void", "parent": 83, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 4}}, {"id": 85, "type": "function_declarator", "text": "destroyAtoms(struct AtomsSt* atoms)", "parent": 83, "children": [86, 87], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 40}}, {"id": 86, "type": "identifier", "text": "destroyAtoms", "parent": 85, "children": [], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 17}}, {"id": 87, "type": "parameter_list", "text": "(struct AtomsSt* atoms)", "parent": 85, "children": [88], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 40}}, {"id": 88, "type": "parameter_declaration", "text": "struct AtomsSt* atoms", "parent": 87, "children": [89, 92], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 39}}, {"id": 89, "type": "struct_specifier", "text": "struct AtomsSt", "parent": 88, "children": [90, 91], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 32}}, {"id": 90, "type": "struct", "text": "struct", "parent": 89, "children": [], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 24}}, {"id": 91, "type": "type_identifier", "text": "AtomsSt", "parent": 89, "children": [], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 32}}, {"id": 92, "type": "pointer_declarator", "text": "* atoms", "parent": 88, "children": [93, 94], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 39}}, {"id": 93, "type": "*", "text": "*", "parent": 92, "children": [], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 33}}, {"id": 94, "type": "identifier", "text": "atoms", "parent": 92, "children": [], "start_point": {"row": 34, "column": 34}, "end_point": {"row": 34, "column": 39}}, {"id": 95, "type": "declaration", "text": "void createFccLattice(int nx, int ny, int nz, real_t lat, struct SimFlatSt* s);", "parent": 0, "children": [96, 97], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 79}}, {"id": 96, "type": "primitive_type", "text": "void", "parent": 95, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 4}}, {"id": 97, "type": "function_declarator", "text": "createFccLattice(int nx, int ny, int nz, real_t lat, struct SimFlatSt* s)", "parent": 95, "children": [98, 99], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 78}}, {"id": 98, "type": "identifier", "text": "createFccLattice", "parent": 97, "children": [], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 21}}, {"id": 99, "type": "parameter_list", "text": "(int nx, int ny, int nz, real_t lat, struct SimFlatSt* s)", "parent": 97, "children": [100, 103, 106, 109, 112], "start_point": {"row": 36, "column": 21}, "end_point": {"row": 36, "column": 78}}, {"id": 100, "type": "parameter_declaration", "text": "int nx", "parent": 99, "children": [101, 102], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 28}}, {"id": 101, "type": "primitive_type", "text": "int", "parent": 100, "children": [], "start_point": {"row": 36, "column": 22}, "end_point": {"row": 36, "column": 25}}, {"id": 102, "type": "identifier", "text": "nx", "parent": 100, "children": [], "start_point": {"row": 36, "column": 26}, "end_point": {"row": 36, "column": 28}}, {"id": 103, "type": "parameter_declaration", "text": "int ny", "parent": 99, "children": [104, 105], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 36}}, {"id": 104, "type": "primitive_type", "text": "int", "parent": 103, "children": [], "start_point": {"row": 36, "column": 30}, "end_point": {"row": 36, "column": 33}}, {"id": 105, "type": "identifier", "text": "ny", "parent": 103, "children": [], "start_point": {"row": 36, "column": 34}, "end_point": {"row": 36, "column": 36}}, {"id": 106, "type": "parameter_declaration", "text": "int nz", "parent": 99, "children": [107, 108], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 44}}, {"id": 107, "type": "primitive_type", "text": "int", "parent": 106, "children": [], "start_point": {"row": 36, "column": 38}, "end_point": {"row": 36, "column": 41}}, {"id": 108, "type": "identifier", "text": "nz", "parent": 106, "children": [], "start_point": {"row": 36, "column": 42}, "end_point": {"row": 36, "column": 44}}, {"id": 109, "type": "parameter_declaration", "text": "real_t lat", "parent": 99, "children": [110, 111], "start_point": {"row": 36, "column": 46}, "end_point": {"row": 36, "column": 56}}, {"id": 110, "type": "type_identifier", "text": "real_t", "parent": 109, "children": [], "start_point": {"row": 36, "column": 46}, "end_point": {"row": 36, "column": 52}}, {"id": 111, "type": "identifier", "text": "lat", "parent": 109, "children": [], "start_point": {"row": 36, "column": 53}, "end_point": {"row": 36, "column": 56}}, {"id": 112, "type": "parameter_declaration", "text": "struct SimFlatSt* s", "parent": 99, "children": [113, 116], "start_point": {"row": 36, "column": 58}, "end_point": {"row": 36, "column": 77}}, {"id": 113, "type": "struct_specifier", "text": "struct SimFlatSt", "parent": 112, "children": [114, 115], "start_point": {"row": 36, "column": 58}, "end_point": {"row": 36, "column": 74}}, {"id": 114, "type": "struct", "text": "struct", "parent": 113, "children": [], "start_point": {"row": 36, "column": 58}, "end_point": {"row": 36, "column": 64}}, {"id": 115, "type": "type_identifier", "text": "SimFlatSt", "parent": 113, "children": [], "start_point": {"row": 36, "column": 65}, "end_point": {"row": 36, "column": 74}}, {"id": 116, "type": "pointer_declarator", "text": "* s", "parent": 112, "children": [117, 118], "start_point": {"row": 36, "column": 74}, "end_point": {"row": 36, "column": 77}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 36, "column": 74}, "end_point": {"row": 36, "column": 75}}, {"id": 118, "type": "identifier", "text": "s", "parent": 116, "children": [], "start_point": {"row": 36, "column": 76}, "end_point": {"row": 36, "column": 77}}, {"id": 119, "type": "declaration", "text": "void setVcm(struct SimFlatSt* s, real_t vcm[3]);", "parent": 0, "children": [120, 121], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 48}}, {"id": 120, "type": "primitive_type", "text": "void", "parent": 119, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 4}}, {"id": 121, "type": "function_declarator", "text": "setVcm(struct SimFlatSt* s, real_t vcm[3])", "parent": 119, "children": [122, 123], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 47}}, {"id": 122, "type": "identifier", "text": "setVcm", "parent": 121, "children": [], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 11}}, {"id": 123, "type": "parameter_list", "text": "(struct SimFlatSt* s, real_t vcm[3])", "parent": 121, "children": [124, 131], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 47}}, {"id": 124, "type": "parameter_declaration", "text": "struct SimFlatSt* s", "parent": 123, "children": [125, 128], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 31}}, {"id": 125, "type": "struct_specifier", "text": "struct SimFlatSt", "parent": 124, "children": [126, 127], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 28}}, {"id": 126, "type": "struct", "text": "struct", "parent": 125, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 18}}, {"id": 127, "type": "type_identifier", "text": "SimFlatSt", "parent": 125, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 28}}, {"id": 128, "type": "pointer_declarator", "text": "* s", "parent": 124, "children": [129, 130], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 31}}, {"id": 129, "type": "*", "text": "*", "parent": 128, "children": [], "start_point": {"row": 38, "column": 28}, "end_point": {"row": 38, "column": 29}}, {"id": 130, "type": "identifier", "text": "s", "parent": 128, "children": [], "start_point": {"row": 38, "column": 30}, "end_point": {"row": 38, "column": 31}}, {"id": 131, "type": "parameter_declaration", "text": "real_t vcm[3]", "parent": 123, "children": [132, 133], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 46}}, {"id": 132, "type": "type_identifier", "text": "real_t", "parent": 131, "children": [], "start_point": {"row": 38, "column": 33}, "end_point": {"row": 38, "column": 39}}, {"id": 133, "type": "array_declarator", "text": "vcm[3]", "parent": 131, "children": [134, 135], "start_point": {"row": 38, "column": 40}, "end_point": {"row": 38, "column": 46}}, {"id": 134, "type": "identifier", "text": "vcm", "parent": 133, "children": [], "start_point": {"row": 38, "column": 40}, "end_point": {"row": 38, "column": 43}}, {"id": 135, "type": "number_literal", "text": "3", "parent": 133, "children": [], "start_point": {"row": 38, "column": 44}, "end_point": {"row": 38, "column": 45}}, {"id": 136, "type": "declaration", "text": "void setTemperature(struct SimFlatSt* s, real_t temperature);", "parent": 0, "children": [137, 138], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 61}}, {"id": 137, "type": "primitive_type", "text": "void", "parent": 136, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 4}}, {"id": 138, "type": "function_declarator", "text": "setTemperature(struct SimFlatSt* s, real_t temperature)", "parent": 136, "children": [139, 140], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 60}}, {"id": 139, "type": "identifier", "text": "setTemperature", "parent": 138, "children": [], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 19}}, {"id": 140, "type": "parameter_list", "text": "(struct SimFlatSt* s, real_t temperature)", "parent": 138, "children": [141, 148], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 60}}, {"id": 141, "type": "parameter_declaration", "text": "struct SimFlatSt* s", "parent": 140, "children": [142, 145], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 39}}, {"id": 142, "type": "struct_specifier", "text": "struct SimFlatSt", "parent": 141, "children": [143, 144], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 36}}, {"id": 143, "type": "struct", "text": "struct", "parent": 142, "children": [], "start_point": {"row": 39, "column": 20}, "end_point": {"row": 39, "column": 26}}, {"id": 144, "type": "type_identifier", "text": "SimFlatSt", "parent": 142, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 36}}, {"id": 145, "type": "pointer_declarator", "text": "* s", "parent": 141, "children": [146, 147], "start_point": {"row": 39, "column": 36}, "end_point": {"row": 39, "column": 39}}, {"id": 146, "type": "*", "text": "*", "parent": 145, "children": [], "start_point": {"row": 39, "column": 36}, "end_point": {"row": 39, "column": 37}}, {"id": 147, "type": "identifier", "text": "s", "parent": 145, "children": [], "start_point": {"row": 39, "column": 38}, "end_point": {"row": 39, "column": 39}}, {"id": 148, "type": "parameter_declaration", "text": "real_t temperature", "parent": 140, "children": [149, 150], "start_point": {"row": 39, "column": 41}, "end_point": {"row": 39, "column": 59}}, {"id": 149, "type": "type_identifier", "text": "real_t", "parent": 148, "children": [], "start_point": {"row": 39, "column": 41}, "end_point": {"row": 39, "column": 47}}, {"id": 150, "type": "identifier", "text": "temperature", "parent": 148, "children": [], "start_point": {"row": 39, "column": 48}, "end_point": {"row": 39, "column": 59}}, {"id": 151, "type": "declaration", "text": "void randomDisplacements(struct SimFlatSt* s, real_t delta);", "parent": 0, "children": [152, 153], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 60}}, {"id": 152, "type": "primitive_type", "text": "void", "parent": 151, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 4}}, {"id": 153, "type": "function_declarator", "text": "randomDisplacements(struct SimFlatSt* s, real_t delta)", "parent": 151, "children": [154, 155], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 59}}, {"id": 154, "type": "identifier", "text": "randomDisplacements", "parent": 153, "children": [], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 24}}, {"id": 155, "type": "parameter_list", "text": "(struct SimFlatSt* s, real_t delta)", "parent": 153, "children": [156, 163], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 59}}, {"id": 156, "type": "parameter_declaration", "text": "struct SimFlatSt* s", "parent": 155, "children": [157, 160], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 44}}, {"id": 157, "type": "struct_specifier", "text": "struct SimFlatSt", "parent": 156, "children": [158, 159], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 41}}, {"id": 158, "type": "struct", "text": "struct", "parent": 157, "children": [], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 31}}, {"id": 159, "type": "type_identifier", "text": "SimFlatSt", "parent": 157, "children": [], "start_point": {"row": 40, "column": 32}, "end_point": {"row": 40, "column": 41}}, {"id": 160, "type": "pointer_declarator", "text": "* s", "parent": 156, "children": [161, 162], "start_point": {"row": 40, "column": 41}, "end_point": {"row": 40, "column": 44}}, {"id": 161, "type": "*", "text": "*", "parent": 160, "children": [], "start_point": {"row": 40, "column": 41}, "end_point": {"row": 40, "column": 42}}, {"id": 162, "type": "identifier", "text": "s", "parent": 160, "children": [], "start_point": {"row": 40, "column": 43}, "end_point": {"row": 40, "column": 44}}, {"id": 163, "type": "parameter_declaration", "text": "real_t delta", "parent": 155, "children": [164, 165], "start_point": {"row": 40, "column": 46}, "end_point": {"row": 40, "column": 58}}, {"id": 164, "type": "type_identifier", "text": "real_t", "parent": 163, "children": [], "start_point": {"row": 40, "column": 46}, "end_point": {"row": 40, "column": 52}}, {"id": 165, "type": "identifier", "text": "delta", "parent": 163, "children": [], "start_point": {"row": 40, "column": 53}, "end_point": {"row": 40, "column": 58}}, {"id": 166, "type": "declaration", "text": "void atomsUpdateLocalId(struct LinkCellSt* boxes, Atoms* atoms);", "parent": 0, "children": [167, 168], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 64}}, {"id": 167, "type": "primitive_type", "text": "void", "parent": 166, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 4}}, {"id": 168, "type": "function_declarator", "text": "atomsUpdateLocalId(struct LinkCellSt* boxes, Atoms* atoms)", "parent": 166, "children": [169, 170], "start_point": {"row": 43, "column": 5}, "end_point": {"row": 43, "column": 63}}, {"id": 169, "type": "identifier", "text": "atomsUpdateLocalId", "parent": 168, "children": [], "start_point": {"row": 43, "column": 5}, "end_point": {"row": 43, "column": 23}}, {"id": 170, "type": "parameter_list", "text": "(struct LinkCellSt* boxes, Atoms* atoms)", "parent": 168, "children": [171, 178], "start_point": {"row": 43, "column": 23}, "end_point": {"row": 43, "column": 63}}, {"id": 171, "type": "parameter_declaration", "text": "struct LinkCellSt* boxes", "parent": 170, "children": [172, 175], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 48}}, {"id": 172, "type": "struct_specifier", "text": "struct LinkCellSt", "parent": 171, "children": [173, 174], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 41}}, {"id": 173, "type": "struct", "text": "struct", "parent": 172, "children": [], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 30}}, {"id": 174, "type": "type_identifier", "text": "LinkCellSt", "parent": 172, "children": [], "start_point": {"row": 43, "column": 31}, "end_point": {"row": 43, "column": 41}}, {"id": 175, "type": "pointer_declarator", "text": "* boxes", "parent": 171, "children": [176, 177], "start_point": {"row": 43, "column": 41}, "end_point": {"row": 43, "column": 48}}, {"id": 176, "type": "*", "text": "*", "parent": 175, "children": [], "start_point": {"row": 43, "column": 41}, "end_point": {"row": 43, "column": 42}}, {"id": 177, "type": "identifier", "text": "boxes", "parent": 175, "children": [], "start_point": {"row": 43, "column": 43}, "end_point": {"row": 43, "column": 48}}, {"id": 178, "type": "parameter_declaration", "text": "Atoms* atoms", "parent": 170, "children": [179, 180], "start_point": {"row": 43, "column": 50}, "end_point": {"row": 43, "column": 62}}, {"id": 179, "type": "type_identifier", "text": "Atoms", "parent": 178, "children": [], "start_point": {"row": 43, "column": 50}, "end_point": {"row": 43, "column": 55}}, {"id": 180, "type": "pointer_declarator", "text": "* atoms", "parent": 178, "children": [181, 182], "start_point": {"row": 43, "column": 55}, "end_point": {"row": 43, "column": 62}}, {"id": 181, "type": "*", "text": "*", "parent": 180, "children": [], "start_point": {"row": 43, "column": 55}, "end_point": {"row": 43, "column": 56}}, {"id": 182, "type": "identifier", "text": "atoms", "parent": 180, "children": [], "start_point": {"row": 43, "column": 57}, "end_point": {"row": 43, "column": 62}}, {"id": 183, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 6}}]}, "node_categories": {"declarations": {"functions": [70, 85, 97, 121, 138, 153, 168], "variables": [18, 23, 26, 31, 34, 39, 44, 51, 54, 57, 60, 66, 73, 80, 83, 88, 95, 100, 103, 106, 109, 112, 119, 124, 131, 136, 141, 148, 151, 156, 163, 166, 171, 178], "classes": [9, 10, 12, 13, 15, 16, 20, 21, 45, 46, 74, 75, 89, 90, 113, 114, 125, 126, 142, 143, 157, 158, 172, 173], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 11, 14, 17, 22, 25, 30, 33, 38, 43, 47, 50, 52, 53, 55, 56, 58, 59, 61, 64, 65, 67, 71, 76, 79, 81, 82, 86, 91, 94, 98, 102, 105, 108, 110, 111, 115, 118, 122, 127, 130, 132, 134, 139, 144, 147, 149, 150, 154, 159, 162, 164, 165, 169, 174, 177, 179, 182, 183], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 135], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 70, "universal_type": "function", "name": "unknown", "text_snippet": "initAtoms(struct LinkCellSt* boxes, const real_t skinDistance)"}, {"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "destroyAtoms(struct AtomsSt* atoms)"}, {"node_id": 97, "universal_type": "function", "name": "ny,", "text_snippet": "createFccLattice(int nx, int ny, int nz, real_t lat, struct SimFlatSt* s)"}, {"node_id": 121, "universal_type": "function", "name": "unknown", "text_snippet": "setVcm(struct SimFlatSt* s, real_t vcm[3])"}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "setTemperature(struct SimFlatSt* s, real_t temperature)"}, {"node_id": 153, "universal_type": "function", "name": "unknown", "text_snippet": "randomDisplacements(struct SimFlatSt* s, real_t delta)"}, {"node_id": 168, "universal_type": "function", "name": "unknown", "text_snippet": "atomsUpdateLocalId(struct LinkCellSt* boxes, Atoms* atoms)"}], "class_declarations": [{"node_id": 9, "universal_type": "class", "name": "SimFlatSt", "text_snippet": "struct SimFlatSt"}, {"node_id": 10, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 12, "universal_type": "class", "name": "LinkCellSt", "text_snippet": "struct LinkCellSt"}, {"node_id": 13, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 15, "universal_type": "class", "name": "NeighborListSt", "text_snippet": "struct NeighborListSt"}, {"node_id": 16, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 20, "universal_type": "class", "name": "AtomsSt", "text_snippet": "struct AtomsSt\n{\n // atom-specific data\n int nLocal; //!< total number of atoms on this proce"}, {"node_id": 21, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 45, "universal_type": "class", "name": "NeighborListSt", "text_snippet": "struct NeighborListSt"}, {"node_id": 46, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 74, "universal_type": "class", "name": "LinkCellSt", "text_snippet": "struct LinkCellSt"}, {"node_id": 75, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 89, "universal_type": "class", "name": "AtomsSt", "text_snippet": "struct AtomsSt"}, {"node_id": 90, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 113, "universal_type": "class", "name": "SimFlatSt", "text_snippet": "struct SimFlatSt"}, {"node_id": 114, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 125, "universal_type": "class", "name": "SimFlatSt", "text_snippet": "struct SimFlatSt"}, {"node_id": 126, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 142, "universal_type": "class", "name": "SimFlatSt", "text_snippet": "struct SimFlatSt"}, {"node_id": 143, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 157, "universal_type": "class", "name": "SimFlatSt", "text_snippet": "struct SimFlatSt"}, {"node_id": 158, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 172, "universal_type": "class", "name": "LinkCellSt", "text_snippet": "struct LinkCellSt"}, {"node_id": 173, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include \"mytype.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "/// \\file\n/// Initialize the atom configuration.\n\n#ifndef __INIT_ATOMS_H\n#define __INIT_ATOMS_H\n\n#include \"mytype.h\"\n\nstruct SimFlatSt;\nstruct LinkCellSt;\nstruct NeighborListSt;\n\n/// Atom data\ntypedef struct AtomsSt\n{\n // atom-specific data\n int nLocal; //!< total number of atoms on this processor\n int* lid; //!< A locally unique id for each atom (used for the neighborlist)\n int nGlobal; //!< total number of atoms in simulation\n\n int* gid; //!< A globally unique id for each atom\n int* iSpecies; //!< the species index of the atom\n\n struct NeighborListSt* neighborList;\n\n vec_t r; //!< positions\n vec_t p; //!< momenta of atoms\n vec_t f; //!< forces \n real_t* U; //!< potential energy per atom\n} Atoms;\n\n\n/// Allocates memory to store atom data.\nAtoms* initAtoms(struct LinkCellSt* boxes, const real_t skinDistance);\nvoid destroyAtoms(struct AtomsSt* atoms);\n\nvoid createFccLattice(int nx, int ny, int nz, real_t lat, struct SimFlatSt* s);\n\nvoid setVcm(struct SimFlatSt* s, real_t vcm[3]);\nvoid setTemperature(struct SimFlatSt* s, real_t temperature);\nvoid randomDisplacements(struct SimFlatSt* s, real_t delta);\n\n/// Update the local id of each local particle. This is used by the neighbor-list\nvoid atomsUpdateLocalId(struct LinkCellSt* boxes, Atoms* atoms);\n#endif\n"}
75
c
// // JWTTokenTextTypeDescription.h // JWTDesktop // // Created by <NAME> on 25.09.16. // Copyright © 2016 JWT. All rights reserved. // #import <Foundation/Foundation.h> #import <Cocoa/Cocoa.h> #import <AppKit/AppKit.h> #import "NSArrayExtension.h" typedef NS_ENUM(NSInteger, JWTTokenTextType) { JWTTokenTextTypeDefault, // dot text color JWTTokenTextTypeHeader, JWTTokenTextTypePayload, JWTTokenTextTypeSignature, JWTTokenTextTypeDot }; @interface JWTTokenTextTypeAppearanceAttributes : NSObject @property (copy, nonatomic, readwrite) NSColor *color; @property (copy, nonatomic, readwrite) NSFont *font; @end @interface JWTTokenTextTypeDescription: NSObject - (NSColor *)colorForType:(JWTTokenTextType)type; - (NSFont *)font; - (NSDictionary *)encodedTextAttributesForType:(JWTTokenTextType)type; + (NSArray <NSNumber *>*)typicalSchemeComponents; @end @interface JWTTokenTextTypeSerialization: NSObject - (NSString *)textPartFromTexts:(NSArray *)texts type:(JWTTokenTextType)type; @end @interface JWTTokenTextTypeAppearance: NSObject - (NSArray <JWTTokenTextTypeAppearanceAttributes *>*)attributesForText:(NSString *)text; - (NSAttributedString *)attributedStringForText:(NSString *)text; @end
33.83
35
(translation_unit) "//\n// JWTTokenTextTypeDescription.h\n// JWTDesktop\n//\n// Created by <NAME> on 25.09.16.\n// Copyright © 2016 JWT. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import <Cocoa/Cocoa.h>\n#import <AppKit/AppKit.h>\n#import "NSArrayExtension.h"\n\ntypedef NS_ENUM(NSInteger, JWTTokenTextType) {\n JWTTokenTextTypeDefault, // dot text color\n JWTTokenTextTypeHeader,\n JWTTokenTextTypePayload,\n JWTTokenTextTypeSignature,\n JWTTokenTextTypeDot\n};\n\n@interface JWTTokenTextTypeAppearanceAttributes : NSObject\n@property (copy, nonatomic, readwrite) NSColor *color;\n@property (copy, nonatomic, readwrite) NSFont *font;\n@end\n\n@interface JWTTokenTextTypeDescription: NSObject\n- (NSColor *)colorForType:(JWTTokenTextType)type;\n- (NSFont *)font;\n- (NSDictionary *)encodedTextAttributesForType:(JWTTokenTextType)type;\n+ (NSArray <NSNumber *>*)typicalSchemeComponents;\n@end\n\n@interface JWTTokenTextTypeSerialization: NSObject\n- (NSString *)textPartFromTexts:(NSArray *)texts type:(JWTTokenTextType)type;\n@end\n\n@interface JWTTokenTextTypeAppearance: NSObject\n- (NSArray <JWTTokenTextTypeAppearanceAttributes *>*)attributesForText:(NSString *)text;\n- (NSAttributedString *)attributedStringForText:(NSString *)text;\n@end\n" (comment) "//" (comment) "// JWTTokenTextTypeDescription.h" (comment) "// JWTDesktop" (comment) "//" (comment) "// Created by <NAME> on 25.09.16." (comment) "// Copyright © 2016 JWT. All rights reserved.\n" (comment) "/\n" (preproc_call) "import <Foundation/Foundation.h>\n#" (preproc_directive) "import " (preproc_arg) "Foundation/Foundation.h>\n" (preproc_call) "import <Cocoa/Cocoa.h>\n#" (preproc_directive) "import " (preproc_arg) "Cocoa/Cocoa.h>\n" (preproc_call) "import <AppKit/AppKit.h>\n#" (preproc_directive) "import " (preproc_arg) "AppKit/AppKit.h>\n" (preproc_call) "import "NSArrayExtension.h"\n\n" (preproc_directive) "import " (preproc_arg) "NSArrayExtension.h"\n" (type_definition) "ypedef NS_ENUM(NSInteger, JWTTokenTextType) {\n JWTTokenTextTypeDefault, // dot text color\n JWTTokenTextTypeHeader,\n JWTTokenTextTypePayload,\n JWTTokenTextTypeSignature,\n JWTTokenTextTypeDot\n};\n" (typedef) "ypedef " (macro_type_specifier) "S_ENUM(NSInteger, JWTTokenTextType) " (identifier) "S_ENUM(" (() "N" (ERROR) "SInteger, " (type_descriptor) "SInteger," (type_identifier) "SInteger," (,) " " (type_descriptor) "WTTokenTextType)" (type_identifier) "WTTokenTextType)" ()) " " (ERROR) "\n" ({) "\n" (type_identifier) "WTTokenTextTypeDefault," (,) " " (comment) "/ dot text color\n" (type_identifier) "WTTokenTextTypeHeader," (,) "\n" (type_identifier) "WTTokenTextTypePayload," (,) "\n" (type_identifier) "WTTokenTextTypeSignature," (,) "\n" (type_identifier) "WTTokenTextTypeDot\n" (ERROR) ";" (}) ";" (;) "\n" (ERROR) "interface JWTTokenTextTypeAppearanceAttributes : NSObject\n@property (copy, nonatomic, readwrite) NSColor *color;\n@property (copy, nonatomic, readwrite) NSFont *font;\n@end\n\n@interface JWTTokenTextTypeDescription: NSObject\n- (NSColor *)colorForType:(JWTTokenTextType)type;\n- (NSFont *)font;\n- (NSDictionary *)encodedTextAttributesForType:(JWTTokenTextType)type;\n+ (NSArray <NSNumber *>*)typicalSchemeComponents;\n@end\n\n@interface JWTTokenTextTypeSerialization: NSObject\n- (NSString *)textPartFromTexts:(NSArray *)texts type:(JWTTokenTextType)type;\n@end\n\n@interface JWTTokenTextTypeAppearance: NSObject\n- (NSArray <JWTTokenTextTypeAppearanceAttributes *>*)attributesForText:(NSString *)text;\n- (NSAttributedString *)attributedStringForText:(NSString *)text;\n@end\n" (ERROR) "i" (type_identifier) "nterface " (function_declarator) "WTTokenTextTypeAppearanceAttributes : NSObject\n@property (copy, nonatomic, readwrite) " (identifier) "WTTokenTextTypeAppearanceAttributes " (ERROR) " NSObject\n@property " (:) " " (identifier) "SObject\n" (ERROR) "p" (identifier) "roperty " (parameter_list) "copy, nonatomic, readwrite) " (() "c" (identifier) "opy," (,) " " (identifier) "onatomic," (,) " " (identifier) "eadwrite)" ()) " " (declaration) "SColor *color;\n" (type_identifier) "SColor " (pointer_declarator) "color;" (*) "c" (identifier) "olor;" (;) "\n" (ERROR) "p" (ERROR) "p" (declaration) "roperty (copy, nonatomic, readwrite) NSFont *font;\n" (macro_type_specifier) "roperty (copy, nonatomic, readwrite) " (identifier) "roperty " (() "c" (ERROR) "opy, nonatomic, " (type_descriptor) "opy," (type_identifier) "opy," (,) " " (type_descriptor) "onatomic," (type_identifier) "onatomic," (,) " " (type_descriptor) "eadwrite)" (type_identifier) "eadwrite)" ()) " " (ERROR) "SFont " (identifier) "SFont " (pointer_declarator) "font;" (*) "f" (identifier) "ont;" (;) "\n" (ERROR) "e" (ERROR) "e" (declaration) "nd\n\n@interface JWTTokenTextTypeDescription: NSObject\n- (NSColor *)colorForType:(JWTTokenTextType)type;\n" (type_identifier) "nd\n" (ERROR) "interface JWTTokenTextTypeDescription: NSObject\n- (NSColor *)colorForType:(JWTTokenTextType)t" (ERROR) "i" (identifier) "nterface " (identifier) "WTTokenTextTypeDescription:" (:) " " (function_declarator) "SObject\n- (NSColor *)colorForType:(JWTTokenTextType)" (identifier) "SObject\n" (ERROR) " " (-) " " (parameter_list) "NSColor *)c" (() "N" (parameter_declaration) "SColor *)" (type_identifier) "SColor " (abstract_pointer_declarator) ")" (*) ")" ()) "c" (identifier) "olorForType:" (ERROR) "(J" (:) "(" (() "J" (identifier) "WTTokenTextType)" ()) "t" (identifier) "ype;" (;) "\n" (ERROR) " (N" (-) " " (() "N" (declaration) "SFont *)font;\n" (type_identifier) "SFont " (pointer_declarator) ")font;" (*) ")" (ERROR) "f" ()) "f" (identifier) "ont;" (;) "\n" (ERROR) " (N" (-) " " (() "N" (declaration) "SDictionary *)encodedTextAttributesForType:(JWTTokenTextType)type;\n" (type_identifier) "SDictionary " (pointer_declarator) ")encodedTextAttributesForType:(JWTTokenTextType)" (*) ")" (ERROR) "encodedTextAttributesForType:(J" ()) "e" (identifier) "ncodedTextAttributesForType:" (:) "(" (() "J" (identifier) "WTTokenTextType)" (ERROR) "type;" ()) "t" (identifier) "ype;" (;) "\n" (ERROR) " (N" (+) " " (() "N" (declaration) "SArray <NSNumber *>*)typicalSchemeComponents;\n" (type_identifier) "SArray " (ERROR) "NSNumber *>*" (<) "N" (identifier) "SNumber " (*) ">" (>) "*" (pointer_declarator) ")typicalSchemeComponents;" (*) ")" (ERROR) "t" ()) "t" (identifier) "ypicalSchemeComponents;" (;) "\n" (ERROR) "e" (ERROR) "e" (declaration) "nd\n\n@interface JWTTokenTextTypeSerialization: NSObject\n- (NSString *)textPartFromTexts:(NSArray *)texts type:(JWTTokenTextType)type;\n" (type_identifier) "nd\n" (ERROR) "interface JWTTokenTextTypeSerialization: NSObject\n- (NSString *)textPartFromTexts:(NSArray *)texts type:(JWTTokenTextType)t" (ERROR) "i" (identifier) "nterface " (identifier) "WTTokenTextTypeSerialization:" (:) " " (function_declarator) "SObject\n- (NSString *)textPartFromTexts:(NSArray *)texts type:(JWTTokenTextType)" (identifier) "SObject\n" (ERROR) " " (-) " " (parameter_list) "NSString *)t" (() "N" (parameter_declaration) "SString *)" (type_identifier) "SString " (abstract_pointer_declarator) ")" (*) ")" ()) "t" (identifier) "extPartFromTexts:" (ERROR) "(N" (:) "(" (() "N" (identifier) "SArray " (ERROR) ")t" (*) ")" ()) "t" (identifier) "exts " (identifier) "ype:" (ERROR) "(J" (:) "(" (() "J" (identifier) "WTTokenTextType)" ()) "t" (identifier) "ype;" (;) "\n" (ERROR) "e" (ERROR) "e" (type_identifier) "nd\n" (ERROR) "interface JWTTokenTextTypeAppearance: NSObject\n- (NSArray <JWTTokenTextTypeAppearanceAttributes *>*)attributesForText:(NSString *)text;\n- (NSAttributedString *)attributedStringForText:(NSString *)text;\n@e" (ERROR) "i" (identifier) "nterface " (identifier) "WTTokenTextTypeAppearance:" (:) " " (function_declarator) "SObject\n- (NSArray <JWTTokenTextTypeAppearanceAttributes *>*)attributesForText:(NSString *)text;\n- (NSAttributedString *)attributedStringForText:(NSString *)text;" (function_declarator) "SObject\n- (NSArray <JWTTokenTextTypeAppearanceAttributes *>*)attributesForText:(NSString *)text;" (identifier) "SObject\n" (ERROR) " " (-) " " (parameter_list) "NSArray <JWTTokenTextTypeAppearanceAttributes *>*)a" (() "N" (parameter_declaration) "SArray <JWTTokenTextTypeAppearanceAttributes *>*)" (type_identifier) "SArray " (ERROR) "JWTTokenTextTypeAppearanceAttributes *>*" (<) "J" (identifier) "WTTokenTextTypeAppearanceAttributes " (*) ">" (>) "*" (abstract_pointer_declarator) ")" (*) ")" ()) "a" (identifier) "ttributesForText:" (ERROR) "(N" (:) "(" (() "N" (identifier) "SString " (ERROR) ")t" (*) ")" ()) "t" (identifier) "ext;" (ERROR) "\n- " (;) "\n" (-) " " (parameter_list) "NSAttributedString *)a" (() "N" (parameter_declaration) "SAttributedString *)" (type_identifier) "SAttributedString " (abstract_pointer_declarator) ")" (*) ")" ()) "a" (identifier) "ttributedStringForText:" (ERROR) "(N" (:) "(" (() "N" (identifier) "SString " (ERROR) ")t" (*) ")" ()) "t" (identifier) "ext;" (;) "\n" (ERROR) "e" (identifier) "nd\n"
258
45
{"language": "c", "success": true, "metadata": {"lines": 35, "avg_line_length": 33.83, "nodes": 167, "errors": 0, "source_hash": "5cf6b22fcaf64e309ccab02bc1883ec83431c2e9abdd99d897d07601d516fec3", "categorized_nodes": 88}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "import <Foundation/Foundation.h>\n#", "parent": null, "children": [1], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 1, "type": "preproc_arg", "text": "Foundation/Foundation.h>\n", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 2, "type": "preproc_call", "text": "import <Cocoa/Cocoa.h>\n#", "parent": null, "children": [3], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 3, "type": "preproc_arg", "text": "Cocoa/Cocoa.h>\n", "parent": 2, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 23}}, {"id": 4, "type": "preproc_call", "text": "import <AppKit/AppKit.h>\n#", "parent": null, "children": [5], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 5, "type": "preproc_arg", "text": "AppKit/AppKit.h>\n", "parent": 4, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 25}}, {"id": 6, "type": "preproc_call", "text": "import \"NSArrayExtension.h\"\n\n", "parent": null, "children": [7], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 7, "type": "preproc_arg", "text": "NSArrayExtension.h\"\n", "parent": 6, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 28}}, {"id": 8, "type": "type_definition", "text": "ypedef NS_ENUM(NSInteger, JWTTokenTextType) {\n JWTTokenTextTypeDefault, // dot text color\n JWTTokenTextTypeHeader,\n JWTTokenTextTypePayload,\n JWTTokenTextTypeSignature,\n JWTTokenTextTypeDot\n};\n", "parent": null, "children": [9, 10, 17, 18, 19, 20, 21, 22], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 19, "column": 2}}, {"id": 9, "type": "typedef", "text": "ypedef ", "parent": 8, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 10, "type": "macro_type_specifier", "text": "S_ENUM(NSInteger, JWTTokenTextType) ", "parent": 8, "children": [11, 12, 15], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 44}}, {"id": 11, "type": "identifier", "text": "S_ENUM(", "parent": 10, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 15}}, {"id": 12, "type": "ERROR", "text": "SInteger, ", "parent": 10, "children": [13], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 26}}, {"id": 13, "type": "type_descriptor", "text": "SInteger,", "parent": 12, "children": [14], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 25}}, {"id": 14, "type": "type_identifier", "text": "SInteger,", "parent": 13, "children": [], "start_point": {"row": 13, "column": 16}, "end_point": {"row": 13, "column": 25}}, {"id": 15, "type": "type_descriptor", "text": "WTTokenTextType)", "parent": 10, "children": [16], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 43}}, {"id": 16, "type": "type_identifier", "text": "WTTokenTextType)", "parent": 15, "children": [], "start_point": {"row": 13, "column": 27}, "end_point": {"row": 13, "column": 43}}, {"id": 17, "type": "ERROR", "text": "\n", "parent": 8, "children": [], "start_point": {"row": 13, "column": 45}, "end_point": {"row": 13, "column": 46}}, {"id": 18, "type": "type_identifier", "text": "WTTokenTextTypeDefault,", "parent": 8, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 27}}, {"id": 19, "type": "type_identifier", "text": "WTTokenTextTypeHeader,", "parent": 8, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 26}}, {"id": 20, "type": "type_identifier", "text": "WTTokenTextTypePayload,", "parent": 8, "children": [], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 27}}, {"id": 21, "type": "type_identifier", "text": "WTTokenTextTypeSignature,", "parent": 8, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 29}}, {"id": 22, "type": "type_identifier", "text": "WTTokenTextTypeDot\n", "parent": 8, "children": [], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 18, "column": 23}}, {"id": 23, "type": "ERROR", "text": "interface JWTTokenTextTypeAppearanceAttributes : NSObject\n@property (copy, nonatomic, readwrite) NSColor *color;\n@property (copy, nonatomic, readwrite) NSFont *font;\n@end\n\n@interface JWTTokenTextTypeDescription: NSObject\n- (NSColor *)colorForType:(JWTTokenTextType)type;\n- (NSFont *)font;\n- (NSDictionary *)encodedTextAttributesForType:(JWTTokenTextType)type;\n+ (NSArray <NSNumber *>*)typicalSchemeComponents;\n@end\n\n@interface JWTTokenTextTypeSerialization: NSObject\n- (NSString *)textPartFromTexts:(NSArray *)texts type:(JWTTokenTextType)type;\n@end\n\n@interface JWTTokenTextTypeAppearance: NSObject\n- (NSArray <JWTTokenTextTypeAppearanceAttributes *>*)attributesForText:(NSString *)text;\n- (NSAttributedString *)attributedStringForText:(NSString *)text;\n@end\n", "parent": null, "children": [24, 25, 26, 36, 41, 43, 58, 60, 77, 79, 84, 86, 94, 96, 106, 108, 130, 132, 133, 166], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 40, "column": 4}}, {"id": 24, "type": "ERROR", "text": "i", "parent": 23, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 1}}, {"id": 25, "type": "type_identifier", "text": "nterface ", "parent": 23, "children": [], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 21, "column": 10}}, {"id": 26, "type": "function_declarator", "text": "WTTokenTextTypeAppearanceAttributes : NSObject\n@property (copy, nonatomic, readwrite) ", "parent": 23, "children": [27, 28, 32], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 22, "column": 38}}, {"id": 27, "type": "identifier", "text": "WTTokenTextTypeAppearanceAttributes ", "parent": 26, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 47}}, {"id": 28, "type": "ERROR", "text": " NSObject\n@property ", "parent": 26, "children": [29, 30, 31], "start_point": {"row": 21, "column": 48}, "end_point": {"row": 22, "column": 9}}, {"id": 29, "type": "identifier", "text": "SObject\n", "parent": 28, "children": [], "start_point": {"row": 21, "column": 50}, "end_point": {"row": 21, "column": 58}}, {"id": 30, "type": "ERROR", "text": "p", "parent": 28, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 31, "type": "identifier", "text": "roperty ", "parent": 28, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 9}}, {"id": 32, "type": "parameter_list", "text": "copy, nonatomic, readwrite) ", "parent": 26, "children": [33, 34, 35], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 38}}, {"id": 33, "type": "identifier", "text": "opy,", "parent": 32, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 15}}, {"id": 34, "type": "identifier", "text": "onatomic,", "parent": 32, "children": [], "start_point": {"row": 22, "column": 17}, "end_point": {"row": 22, "column": 26}}, {"id": 35, "type": "identifier", "text": "eadwrite)", "parent": 32, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 37}}, {"id": 36, "type": "declaration", "text": "SColor *color;\n", "parent": 23, "children": [37, 38], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 54}}, {"id": 37, "type": "type_identifier", "text": "SColor ", "parent": 36, "children": [], "start_point": {"row": 22, "column": 39}, "end_point": {"row": 22, "column": 46}}, {"id": 38, "type": "pointer_declarator", "text": "color;", "parent": 36, "children": [39, 40], "start_point": {"row": 22, "column": 47}, "end_point": {"row": 22, "column": 53}}, {"id": 39, "type": "*", "text": "c", "parent": 38, "children": [], "start_point": {"row": 22, "column": 47}, "end_point": {"row": 22, "column": 48}}, {"id": 40, "type": "identifier", "text": "olor;", "parent": 38, "children": [], "start_point": {"row": 22, "column": 48}, "end_point": {"row": 22, "column": 53}}, {"id": 41, "type": "ERROR", "text": "p", "parent": 23, "children": [42], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 42, "type": "ERROR", "text": "p", "parent": 41, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 1}}, {"id": 43, "type": "declaration", "text": "roperty (copy, nonatomic, readwrite) NSFont *font;\n", "parent": 23, "children": [44, 53, 55], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 52}}, {"id": 44, "type": "macro_type_specifier", "text": "roperty (copy, nonatomic, readwrite) ", "parent": 43, "children": [45, 46, 51], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 38}}, {"id": 45, "type": "identifier", "text": "roperty ", "parent": 44, "children": [], "start_point": {"row": 23, "column": 1}, "end_point": {"row": 23, "column": 9}}, {"id": 46, "type": "ERROR", "text": "opy, nonatomic, ", "parent": 44, "children": [47, 49], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 27}}, {"id": 47, "type": "type_descriptor", "text": "opy,", "parent": 46, "children": [48], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 15}}, {"id": 48, "type": "type_identifier", "text": "opy,", "parent": 47, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 15}}, {"id": 49, "type": "type_descriptor", "text": "onatomic,", "parent": 46, "children": [50], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 26}}, {"id": 50, "type": "type_identifier", "text": "onatomic,", "parent": 49, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 26}}, {"id": 51, "type": "type_descriptor", "text": "eadwrite)", "parent": 44, "children": [52], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 37}}, {"id": 52, "type": "type_identifier", "text": "eadwrite)", "parent": 51, "children": [], "start_point": {"row": 23, "column": 28}, "end_point": {"row": 23, "column": 37}}, {"id": 53, "type": "ERROR", "text": "SFont ", "parent": 43, "children": [54], "start_point": {"row": 23, "column": 39}, "end_point": {"row": 23, "column": 45}}, {"id": 54, "type": "identifier", "text": "SFont ", "parent": 53, "children": [], "start_point": {"row": 23, "column": 39}, "end_point": {"row": 23, "column": 45}}, {"id": 55, "type": "pointer_declarator", "text": "font;", "parent": 43, "children": [56, 57], "start_point": {"row": 23, "column": 46}, "end_point": {"row": 23, "column": 51}}, {"id": 56, "type": "*", "text": "f", "parent": 55, "children": [], "start_point": {"row": 23, "column": 46}, "end_point": {"row": 23, "column": 47}}, {"id": 57, "type": "identifier", "text": "ont;", "parent": 55, "children": [], "start_point": {"row": 23, "column": 47}, "end_point": {"row": 23, "column": 51}}, {"id": 58, "type": "ERROR", "text": "e", "parent": 23, "children": [59], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 59, "type": "ERROR", "text": "e", "parent": 58, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 60, "type": "declaration", "text": "nd\n\n@interface JWTTokenTextTypeDescription: NSObject\n- (NSColor *)colorForType:(JWTTokenTextType)type;\n", "parent": 23, "children": [61, 62, 76], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 27, "column": 49}}, {"id": 61, "type": "type_identifier", "text": "nd\n", "parent": 60, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 4}}, {"id": 62, "type": "ERROR", "text": "interface JWTTokenTextTypeDescription: NSObject\n- (NSColor *)colorForType:(JWTTokenTextType)t", "parent": 60, "children": [63, 64, 65, 66], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 27, "column": 44}}, {"id": 63, "type": "ERROR", "text": "i", "parent": 62, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 1}}, {"id": 64, "type": "identifier", "text": "nterface ", "parent": 62, "children": [], "start_point": {"row": 26, "column": 1}, "end_point": {"row": 26, "column": 10}}, {"id": 65, "type": "identifier", "text": "WTTokenTextTypeDescription:", "parent": 62, "children": [], "start_point": {"row": 26, "column": 11}, "end_point": {"row": 26, "column": 38}}, {"id": 66, "type": "function_declarator", "text": "SObject\n- (NSColor *)colorForType:(JWTTokenTextType)", "parent": 62, "children": [67, 68, 70, 73, 74, 75], "start_point": {"row": 26, "column": 40}, "end_point": {"row": 27, "column": 43}}, {"id": 67, "type": "identifier", "text": "SObject\n", "parent": 66, "children": [], "start_point": {"row": 26, "column": 40}, "end_point": {"row": 26, "column": 48}}, {"id": 68, "type": "ERROR", "text": " ", "parent": 66, "children": [69], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 69, "type": "-", "text": " ", "parent": 68, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 70, "type": "parameter_list", "text": "NSColor *)c", "parent": 66, "children": [71], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 13}}, {"id": 71, "type": "parameter_declaration", "text": "SColor *)", "parent": 70, "children": [72], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 12}}, {"id": 72, "type": "type_identifier", "text": "SColor ", "parent": 71, "children": [], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 10}}, {"id": 73, "type": "identifier", "text": "olorForType:", "parent": 66, "children": [], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 25}}, {"id": 74, "type": "ERROR", "text": "(J", "parent": 66, "children": [], "start_point": {"row": 27, "column": 25}, "end_point": {"row": 27, "column": 27}}, {"id": 75, "type": "identifier", "text": "WTTokenTextType)", "parent": 66, "children": [], "start_point": {"row": 27, "column": 27}, "end_point": {"row": 27, "column": 43}}, {"id": 76, "type": "identifier", "text": "ype;", "parent": 60, "children": [], "start_point": {"row": 27, "column": 44}, "end_point": {"row": 27, "column": 48}}, {"id": 77, "type": "ERROR", "text": " (N", "parent": 23, "children": [78], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 3}}, {"id": 78, "type": "-", "text": " ", "parent": 77, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 1}}, {"id": 79, "type": "declaration", "text": "SFont *)font;\n", "parent": 23, "children": [80, 81], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 17}}, {"id": 80, "type": "type_identifier", "text": "SFont ", "parent": 79, "children": [], "start_point": {"row": 28, "column": 3}, "end_point": {"row": 28, "column": 9}}, {"id": 81, "type": "pointer_declarator", "text": ")font;", "parent": 79, "children": [82, 83], "start_point": {"row": 28, "column": 10}, "end_point": {"row": 28, "column": 16}}, {"id": 82, "type": "ERROR", "text": "f", "parent": 81, "children": [], "start_point": {"row": 28, "column": 11}, "end_point": {"row": 28, "column": 12}}, {"id": 83, "type": "identifier", "text": "ont;", "parent": 81, "children": [], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 16}}, {"id": 84, "type": "ERROR", "text": " (N", "parent": 23, "children": [85], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 3}}, {"id": 85, "type": "-", "text": " ", "parent": 84, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 1}}, {"id": 86, "type": "declaration", "text": "SDictionary *)encodedTextAttributesForType:(JWTTokenTextType)type;\n", "parent": 23, "children": [87, 88, 92], "start_point": {"row": 29, "column": 3}, "end_point": {"row": 29, "column": 70}}, {"id": 87, "type": "type_identifier", "text": "SDictionary ", "parent": 86, "children": [], "start_point": {"row": 29, "column": 3}, "end_point": {"row": 29, "column": 15}}, {"id": 88, "type": "pointer_declarator", "text": ")encodedTextAttributesForType:(JWTTokenTextType)", "parent": 86, "children": [89, 91], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 64}}, {"id": 89, "type": "ERROR", "text": "encodedTextAttributesForType:(J", "parent": 88, "children": [90], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 48}}, {"id": 90, "type": "identifier", "text": "ncodedTextAttributesForType:", "parent": 89, "children": [], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 46}}, {"id": 91, "type": "identifier", "text": "WTTokenTextType)", "parent": 88, "children": [], "start_point": {"row": 29, "column": 48}, "end_point": {"row": 29, "column": 64}}, {"id": 92, "type": "ERROR", "text": "type;", "parent": 86, "children": [93], "start_point": {"row": 29, "column": 64}, "end_point": {"row": 29, "column": 69}}, {"id": 93, "type": "identifier", "text": "ype;", "parent": 92, "children": [], "start_point": {"row": 29, "column": 65}, "end_point": {"row": 29, "column": 69}}, {"id": 94, "type": "ERROR", "text": " (N", "parent": 23, "children": [95], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 3}}, {"id": 95, "type": "+", "text": " ", "parent": 94, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 1}}, {"id": 96, "type": "declaration", "text": "SArray <NSNumber *>*)typicalSchemeComponents;\n", "parent": 23, "children": [97, 98, 103], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 30, "column": 49}}, {"id": 97, "type": "type_identifier", "text": "SArray ", "parent": 96, "children": [], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 30, "column": 10}}, {"id": 98, "type": "ERROR", "text": "NSNumber *>*", "parent": 96, "children": [99, 100, 101, 102], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 23}}, {"id": 99, "type": "<", "text": "N", "parent": 98, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 12}}, {"id": 100, "type": "identifier", "text": "SNumber ", "parent": 98, "children": [], "start_point": {"row": 30, "column": 12}, "end_point": {"row": 30, "column": 20}}, {"id": 101, "type": "*", "text": ">", "parent": 98, "children": [], "start_point": {"row": 30, "column": 21}, "end_point": {"row": 30, "column": 22}}, {"id": 102, "type": ">", "text": "*", "parent": 98, "children": [], "start_point": {"row": 30, "column": 22}, "end_point": {"row": 30, "column": 23}}, {"id": 103, "type": "pointer_declarator", "text": ")typicalSchemeComponents;", "parent": 96, "children": [104, 105], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 48}}, {"id": 104, "type": "ERROR", "text": "t", "parent": 103, "children": [], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 25}}, {"id": 105, "type": "identifier", "text": "ypicalSchemeComponents;", "parent": 103, "children": [], "start_point": {"row": 30, "column": 25}, "end_point": {"row": 30, "column": 48}}, {"id": 106, "type": "ERROR", "text": "e", "parent": 23, "children": [107], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 107, "type": "ERROR", "text": "e", "parent": 106, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 108, "type": "declaration", "text": "nd\n\n@interface JWTTokenTextTypeSerialization: NSObject\n- (NSString *)textPartFromTexts:(NSArray *)texts type:(JWTTokenTextType)type;\n", "parent": 23, "children": [109, 110, 129], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 34, "column": 77}}, {"id": 109, "type": "type_identifier", "text": "nd\n", "parent": 108, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 4}}, {"id": 110, "type": "ERROR", "text": "interface JWTTokenTextTypeSerialization: NSObject\n- (NSString *)textPartFromTexts:(NSArray *)texts type:(JWTTokenTextType)t", "parent": 108, "children": [111, 112, 113, 114], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 72}}, {"id": 111, "type": "ERROR", "text": "i", "parent": 110, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 112, "type": "identifier", "text": "nterface ", "parent": 110, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 10}}, {"id": 113, "type": "identifier", "text": "WTTokenTextTypeSerialization:", "parent": 110, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 40}}, {"id": 114, "type": "function_declarator", "text": "SObject\n- (NSString *)textPartFromTexts:(NSArray *)texts type:(JWTTokenTextType)", "parent": 110, "children": [115, 116, 118, 121, 122, 123, 124, 125, 126, 127, 128], "start_point": {"row": 33, "column": 42}, "end_point": {"row": 34, "column": 71}}, {"id": 115, "type": "identifier", "text": "SObject\n", "parent": 114, "children": [], "start_point": {"row": 33, "column": 42}, "end_point": {"row": 33, "column": 50}}, {"id": 116, "type": "ERROR", "text": " ", "parent": 114, "children": [117], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 117, "type": "-", "text": " ", "parent": 116, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 118, "type": "parameter_list", "text": "NSString *)t", "parent": 114, "children": [119], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 14}}, {"id": 119, "type": "parameter_declaration", "text": "SString *)", "parent": 118, "children": [120], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 13}}, {"id": 120, "type": "type_identifier", "text": "SString ", "parent": 119, "children": [], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 11}}, {"id": 121, "type": "identifier", "text": "extPartFromTexts:", "parent": 114, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 31}}, {"id": 122, "type": "ERROR", "text": "(N", "parent": 114, "children": [], "start_point": {"row": 34, "column": 31}, "end_point": {"row": 34, "column": 33}}, {"id": 123, "type": "identifier", "text": "SArray ", "parent": 114, "children": [], "start_point": {"row": 34, "column": 33}, "end_point": {"row": 34, "column": 40}}, {"id": 124, "type": "ERROR", "text": ")t", "parent": 114, "children": [], "start_point": {"row": 34, "column": 41}, "end_point": {"row": 34, "column": 43}}, {"id": 125, "type": "identifier", "text": "exts ", "parent": 114, "children": [], "start_point": {"row": 34, "column": 43}, "end_point": {"row": 34, "column": 48}}, {"id": 126, "type": "identifier", "text": "ype:", "parent": 114, "children": [], "start_point": {"row": 34, "column": 49}, "end_point": {"row": 34, "column": 53}}, {"id": 127, "type": "ERROR", "text": "(J", "parent": 114, "children": [], "start_point": {"row": 34, "column": 53}, "end_point": {"row": 34, "column": 55}}, {"id": 128, "type": "identifier", "text": "WTTokenTextType)", "parent": 114, "children": [], "start_point": {"row": 34, "column": 55}, "end_point": {"row": 34, "column": 71}}, {"id": 129, "type": "identifier", "text": "ype;", "parent": 108, "children": [], "start_point": {"row": 34, "column": 72}, "end_point": {"row": 34, "column": 76}}, {"id": 130, "type": "ERROR", "text": "e", "parent": 23, "children": [131], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 131, "type": "ERROR", "text": "e", "parent": 130, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 1}}, {"id": 132, "type": "type_identifier", "text": "nd\n", "parent": 23, "children": [], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 35, "column": 4}}, {"id": 133, "type": "ERROR", "text": "interface JWTTokenTextTypeAppearance: NSObject\n- (NSArray <JWTTokenTextTypeAppearanceAttributes *>*)attributesForText:(NSString *)text;\n- (NSAttributedString *)attributedStringForText:(NSString *)text;\n@e", "parent": 23, "children": [134, 135, 136, 137, 165], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 134, "type": "ERROR", "text": "i", "parent": 133, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 135, "type": "identifier", "text": "nterface ", "parent": 133, "children": [], "start_point": {"row": 37, "column": 1}, "end_point": {"row": 37, "column": 10}}, {"id": 136, "type": "identifier", "text": "WTTokenTextTypeAppearance:", "parent": 133, "children": [], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 37}}, {"id": 137, "type": "function_declarator", "text": "SObject\n- (NSArray <JWTTokenTextTypeAppearanceAttributes *>*)attributesForText:(NSString *)text;\n- (NSAttributedString *)attributedStringForText:(NSString *)text;", "parent": 133, "children": [138, 155, 157, 160, 161, 162, 163, 164], "start_point": {"row": 37, "column": 39}, "end_point": {"row": 39, "column": 64}}, {"id": 138, "type": "function_declarator", "text": "SObject\n- (NSArray <JWTTokenTextTypeAppearanceAttributes *>*)attributesForText:(NSString *)text;", "parent": 137, "children": [139, 140, 142, 150, 151, 152, 153, 154], "start_point": {"row": 37, "column": 39}, "end_point": {"row": 38, "column": 87}}, {"id": 139, "type": "identifier", "text": "SObject\n", "parent": 138, "children": [], "start_point": {"row": 37, "column": 39}, "end_point": {"row": 37, "column": 47}}, {"id": 140, "type": "ERROR", "text": " ", "parent": 138, "children": [141], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 141, "type": "-", "text": " ", "parent": 140, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 1}}, {"id": 142, "type": "parameter_list", "text": "NSArray <JWTTokenTextTypeAppearanceAttributes *>*)a", "parent": 138, "children": [143], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 53}}, {"id": 143, "type": "parameter_declaration", "text": "SArray <JWTTokenTextTypeAppearanceAttributes *>*)", "parent": 142, "children": [144, 145], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 38, "column": 52}}, {"id": 144, "type": "type_identifier", "text": "SArray ", "parent": 143, "children": [], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 38, "column": 10}}, {"id": 145, "type": "ERROR", "text": "JWTTokenTextTypeAppearanceAttributes *>*", "parent": 143, "children": [146, 147, 148, 149], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 51}}, {"id": 146, "type": "<", "text": "J", "parent": 145, "children": [], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 12}}, {"id": 147, "type": "identifier", "text": "WTTokenTextTypeAppearanceAttributes ", "parent": 145, "children": [], "start_point": {"row": 38, "column": 12}, "end_point": {"row": 38, "column": 48}}, {"id": 148, "type": "*", "text": ">", "parent": 145, "children": [], "start_point": {"row": 38, "column": 49}, "end_point": {"row": 38, "column": 50}}, {"id": 149, "type": ">", "text": "*", "parent": 145, "children": [], "start_point": {"row": 38, "column": 50}, "end_point": {"row": 38, "column": 51}}, {"id": 150, "type": "identifier", "text": "ttributesForText:", "parent": 138, "children": [], "start_point": {"row": 38, "column": 53}, "end_point": {"row": 38, "column": 70}}, {"id": 151, "type": "ERROR", "text": "(N", "parent": 138, "children": [], "start_point": {"row": 38, "column": 70}, "end_point": {"row": 38, "column": 72}}, {"id": 152, "type": "identifier", "text": "SString ", "parent": 138, "children": [], "start_point": {"row": 38, "column": 72}, "end_point": {"row": 38, "column": 80}}, {"id": 153, "type": "ERROR", "text": ")t", "parent": 138, "children": [], "start_point": {"row": 38, "column": 81}, "end_point": {"row": 38, "column": 83}}, {"id": 154, "type": "identifier", "text": "ext;", "parent": 138, "children": [], "start_point": {"row": 38, "column": 83}, "end_point": {"row": 38, "column": 87}}, {"id": 155, "type": "ERROR", "text": "\n- ", "parent": 137, "children": [156], "start_point": {"row": 38, "column": 87}, "end_point": {"row": 39, "column": 1}}, {"id": 156, "type": "-", "text": " ", "parent": 155, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 1}}, {"id": 157, "type": "parameter_list", "text": "NSAttributedString *)a", "parent": 137, "children": [158], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 24}}, {"id": 158, "type": "parameter_declaration", "text": "SAttributedString *)", "parent": 157, "children": [159], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 23}}, {"id": 159, "type": "type_identifier", "text": "SAttributedString ", "parent": 158, "children": [], "start_point": {"row": 39, "column": 3}, "end_point": {"row": 39, "column": 21}}, {"id": 160, "type": "identifier", "text": "ttributedStringForText:", "parent": 137, "children": [], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 47}}, {"id": 161, "type": "ERROR", "text": "(N", "parent": 137, "children": [], "start_point": {"row": 39, "column": 47}, "end_point": {"row": 39, "column": 49}}, {"id": 162, "type": "identifier", "text": "SString ", "parent": 137, "children": [], "start_point": {"row": 39, "column": 49}, "end_point": {"row": 39, "column": 57}}, {"id": 163, "type": "ERROR", "text": ")t", "parent": 137, "children": [], "start_point": {"row": 39, "column": 58}, "end_point": {"row": 39, "column": 60}}, {"id": 164, "type": "identifier", "text": "ext;", "parent": 137, "children": [], "start_point": {"row": 39, "column": 60}, "end_point": {"row": 39, "column": 64}}, {"id": 165, "type": "ERROR", "text": "e", "parent": 133, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 1}}, {"id": 166, "type": "identifier", "text": "nd\n", "parent": 23, "children": [], "start_point": {"row": 40, "column": 1}, "end_point": {"row": 40, "column": 4}}]}, "node_categories": {"declarations": {"functions": [26, 66, 114, 137, 138], "variables": [8, 36, 43, 60, 71, 79, 86, 96, 108, 119, 143, 158], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [10, 11, 14, 16, 18, 19, 20, 21, 22, 25, 27, 29, 31, 33, 34, 35, 37, 40, 44, 45, 48, 50, 52, 54, 57, 61, 64, 65, 67, 72, 73, 75, 76, 80, 83, 87, 90, 91, 93, 97, 100, 105, 109, 112, 113, 115, 120, 121, 123, 125, 126, 128, 129, 132, 135, 136, 139, 144, 147, 150, 152, 154, 159, 160, 162, 164, 166], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 2, 4, 6], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 26, "universal_type": "function", "name": "unknown", "text_snippet": "WTTokenTextTypeAppearanceAttributes : NSObject\n@property (copy, nonatomic, readwrite) "}, {"node_id": 66, "universal_type": "function", "name": "unknown", "text_snippet": "SObject\n- (NSColor *)colorForType:(JWTTokenTextType)"}, {"node_id": 114, "universal_type": "function", "name": "unknown", "text_snippet": "SObject\n- (NSString *)textPartFromTexts:(NSArray *)texts type:(JWTTokenTextType)"}, {"node_id": 137, "universal_type": "function", "name": "unknown", "text_snippet": "SObject\n- (NSArray <JWTTokenTextTypeAppearanceAttributes *>*)attributesForText:(NSString *)text;\n- ("}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "SObject\n- (NSArray <JWTTokenTextTypeAppearanceAttributes *>*)attributesForText:(NSString *)text;"}], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// JWTTokenTextTypeDescription.h\n// JWTDesktop\n//\n// Created by <NAME> on 25.09.16.\n// Copyright \u00a9 2016 JWT. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import <Cocoa/Cocoa.h>\n#import <AppKit/AppKit.h>\n#import \"NSArrayExtension.h\"\n\ntypedef NS_ENUM(NSInteger, JWTTokenTextType) {\n JWTTokenTextTypeDefault, // dot text color\n JWTTokenTextTypeHeader,\n JWTTokenTextTypePayload,\n JWTTokenTextTypeSignature,\n JWTTokenTextTypeDot\n};\n\n@interface JWTTokenTextTypeAppearanceAttributes : NSObject\n@property (copy, nonatomic, readwrite) NSColor *color;\n@property (copy, nonatomic, readwrite) NSFont *font;\n@end\n\n@interface JWTTokenTextTypeDescription: NSObject\n- (NSColor *)colorForType:(JWTTokenTextType)type;\n- (NSFont *)font;\n- (NSDictionary *)encodedTextAttributesForType:(JWTTokenTextType)type;\n+ (NSArray <NSNumber *>*)typicalSchemeComponents;\n@end\n\n@interface JWTTokenTextTypeSerialization: NSObject\n- (NSString *)textPartFromTexts:(NSArray *)texts type:(JWTTokenTextType)type;\n@end\n\n@interface JWTTokenTextTypeAppearance: NSObject\n- (NSArray <JWTTokenTextTypeAppearanceAttributes *>*)attributesForText:(NSString *)text;\n- (NSAttributedString *)attributedStringForText:(NSString *)text;\n@end\n"}
76
c
#include "ordenacao.h" #include<stdio.h> #include<string.h> #include <stdlib.h> #define MAX_STR 1200 int main(){ TLista lista; int qtd; listaInicia(&lista); lerQuantidade(&qtd); lerLista(&lista, qtd); TLista_Imprime(&lista); return 0; }
17.93
14
(translation_unit) "#include "ordenacao.h"\n#include<stdio.h>\n#include<string.h>\n#include <stdlib.h>\n#define MAX_STR 1200\n\nint main(){\n TLista lista;\n int qtd;\n\n listaInicia(&lista);\n lerQuantidade(&qtd);\n\n lerLista(&lista, qtd);\n\n TLista_Imprime(&lista);\n\n return 0;\n}" (preproc_include) "#include "ordenacao.h"\n" (#include) "#include" (string_literal) ""ordenacao.h"" (") """ (string_content) "ordenacao.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>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_def) "#define MAX_STR 1200\n" (#define) "#define" (identifier) "MAX_STR" (preproc_arg) "1200" (function_definition) "int main(){\n TLista lista;\n int qtd;\n\n listaInicia(&lista);\n lerQuantidade(&qtd);\n\n lerLista(&lista, qtd);\n\n TLista_Imprime(&lista);\n\n return 0;\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n TLista lista;\n int qtd;\n\n listaInicia(&lista);\n lerQuantidade(&qtd);\n\n lerLista(&lista, qtd);\n\n TLista_Imprime(&lista);\n\n return 0;\n}" ({) "{" (declaration) "TLista lista;" (type_identifier) "TLista" (identifier) "lista" (;) ";" (declaration) "int qtd;" (primitive_type) "int" (identifier) "qtd" (;) ";" (expression_statement) "listaInicia(&lista);" (call_expression) "listaInicia(&lista)" (identifier) "listaInicia" (argument_list) "(&lista)" (() "(" (pointer_expression) "&lista" (&) "&" (identifier) "lista" ()) ")" (;) ";" (expression_statement) "lerQuantidade(&qtd);" (call_expression) "lerQuantidade(&qtd)" (identifier) "lerQuantidade" (argument_list) "(&qtd)" (() "(" (pointer_expression) "&qtd" (&) "&" (identifier) "qtd" ()) ")" (;) ";" (expression_statement) "lerLista(&lista, qtd);" (call_expression) "lerLista(&lista, qtd)" (identifier) "lerLista" (argument_list) "(&lista, qtd)" (() "(" (pointer_expression) "&lista" (&) "&" (identifier) "lista" (,) "," (identifier) "qtd" ()) ")" (;) ";" (expression_statement) "TLista_Imprime(&lista);" (call_expression) "TLista_Imprime(&lista)" (identifier) "TLista_Imprime" (argument_list) "(&lista)" (() "(" (pointer_expression) "&lista" (&) "&" (identifier) "lista" ()) ")" (;) ";" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}"
84
0
{"language": "c", "success": true, "metadata": {"lines": 14, "avg_line_length": 17.93, "nodes": 50, "errors": 0, "source_hash": "ce6e3e8311eada8937646a222764386e78f814a15d8d3e847dcc8cb7ebc3eec6", "categorized_nodes": 40}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"ordenacao.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": "\"ordenacao.h\"", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 22}}, {"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": 8}, "end_point": {"row": 1, "column": 17}}, {"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 <stdlib.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": "<stdlib.h>", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 19}}, {"id": 12, "type": "preproc_def", "text": "#define MAX_STR 1200\n", "parent": null, "children": [13, 14, 15], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 13, "type": "#define", "text": "#define", "parent": 12, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 14, "type": "identifier", "text": "MAX_STR", "parent": 12, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 15}}, {"id": 15, "type": "preproc_arg", "text": "1200", "parent": 12, "children": [], "start_point": {"row": 4, "column": 16}, "end_point": {"row": 4, "column": 20}}, {"id": 16, "type": "function_definition", "text": "int main(){\n TLista lista;\n int qtd;\n\n listaInicia(&lista);\n lerQuantidade(&qtd);\n\n lerLista(&lista, qtd);\n\n TLista_Imprime(&lista);\n\n return 0;\n}", "parent": null, "children": [17, 18], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 17, "type": "primitive_type", "text": "int", "parent": 16, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 3}}, {"id": 18, "type": "function_declarator", "text": "main()", "parent": 16, "children": [19, 20], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 10}}, {"id": 19, "type": "identifier", "text": "main", "parent": 18, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 8}}, {"id": 20, "type": "parameter_list", "text": "()", "parent": 18, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 10}}, {"id": 21, "type": "declaration", "text": "TLista lista;", "parent": 16, "children": [22, 23], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 17}}, {"id": 22, "type": "type_identifier", "text": "TLista", "parent": 21, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 10}}, {"id": 23, "type": "identifier", "text": "lista", "parent": 21, "children": [], "start_point": {"row": 7, "column": 11}, "end_point": {"row": 7, "column": 16}}, {"id": 24, "type": "declaration", "text": "int qtd;", "parent": 16, "children": [25, 26], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 12}}, {"id": 25, "type": "primitive_type", "text": "int", "parent": 24, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 7}}, {"id": 26, "type": "identifier", "text": "qtd", "parent": 24, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 11}}, {"id": 27, "type": "call_expression", "text": "listaInicia(&lista)", "parent": 16, "children": [28, 29], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 23}}, {"id": 28, "type": "identifier", "text": "listaInicia", "parent": 27, "children": [], "start_point": {"row": 10, "column": 4}, "end_point": {"row": 10, "column": 15}}, {"id": 29, "type": "argument_list", "text": "(&lista)", "parent": 27, "children": [30], "start_point": {"row": 10, "column": 15}, "end_point": {"row": 10, "column": 23}}, {"id": 30, "type": "pointer_expression", "text": "&lista", "parent": 29, "children": [31], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 22}}, {"id": 31, "type": "identifier", "text": "lista", "parent": 30, "children": [], "start_point": {"row": 10, "column": 17}, "end_point": {"row": 10, "column": 22}}, {"id": 32, "type": "call_expression", "text": "lerQuantidade(&qtd)", "parent": 16, "children": [33, 34], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 23}}, {"id": 33, "type": "identifier", "text": "lerQuantidade", "parent": 32, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 17}}, {"id": 34, "type": "argument_list", "text": "(&qtd)", "parent": 32, "children": [35], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 23}}, {"id": 35, "type": "pointer_expression", "text": "&qtd", "parent": 34, "children": [36], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 22}}, {"id": 36, "type": "identifier", "text": "qtd", "parent": 35, "children": [], "start_point": {"row": 11, "column": 19}, "end_point": {"row": 11, "column": 22}}, {"id": 37, "type": "call_expression", "text": "lerLista(&lista, qtd)", "parent": 16, "children": [38, 39], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 25}}, {"id": 38, "type": "identifier", "text": "lerLista", "parent": 37, "children": [], "start_point": {"row": 13, "column": 4}, "end_point": {"row": 13, "column": 12}}, {"id": 39, "type": "argument_list", "text": "(&lista, qtd)", "parent": 37, "children": [40, 42], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 25}}, {"id": 40, "type": "pointer_expression", "text": "&lista", "parent": 39, "children": [41], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 19}}, {"id": 41, "type": "identifier", "text": "lista", "parent": 40, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 19}}, {"id": 42, "type": "identifier", "text": "qtd", "parent": 39, "children": [], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 24}}, {"id": 43, "type": "call_expression", "text": "TLista_Imprime(&lista)", "parent": 16, "children": [44, 45], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 26}}, {"id": 44, "type": "identifier", "text": "TLista_Imprime", "parent": 43, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 18}}, {"id": 45, "type": "argument_list", "text": "(&lista)", "parent": 43, "children": [46], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 26}}, {"id": 46, "type": "pointer_expression", "text": "&lista", "parent": 45, "children": [47], "start_point": {"row": 15, "column": 19}, "end_point": {"row": 15, "column": 25}}, {"id": 47, "type": "identifier", "text": "lista", "parent": 46, "children": [], "start_point": {"row": 15, "column": 20}, "end_point": {"row": 15, "column": 25}}, {"id": 48, "type": "return_statement", "text": "return 0;", "parent": 16, "children": [49], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 13}}, {"id": 49, "type": "number_literal", "text": "0", "parent": 48, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 12}}]}, "node_categories": {"declarations": {"functions": [16, 18], "variables": [21, 24], "classes": [], "imports": [0, 1, 3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [27, 30, 32, 35, 37, 40, 43, 46], "assignments": [], "loops": [], "conditionals": [14, 19, 22, 23, 26, 28, 31, 33, 36, 38, 41, 42, 44, 47], "returns": [48], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 49], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 16, "universal_type": "function", "name": "main", "text_snippet": "int main(){\n TLista lista;\n int qtd;\n\n listaInicia(&lista);\n lerQuantidade(&qtd);\n\n l"}, {"node_id": 18, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"ordenacao.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"}, {"node_id": 9, "text": "#include <stdlib.h>\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#include \"ordenacao.h\"\n#include<stdio.h>\n#include<string.h>\n#include <stdlib.h>\n#define MAX_STR 1200\n\nint main(){\n TLista lista;\n int qtd;\n\n listaInicia(&lista);\n lerQuantidade(&qtd);\n\n lerLista(&lista, qtd);\n\n TLista_Imprime(&lista);\n\n return 0;\n}"}
77
c
#pragma once #include <DKMsgOnlyWnd.h> #include <list> class VTSCurrentBase : public DKMsgOnlyWnd { public: VTSCurrentBase(); virtual ~VTSCurrentBase(); BOOL InitReceive(CHAR* pPacket, UINT nDataLength); BOOL Receive(CHAR* pPacket, UINT nDataLength); CHAR* GetBuffer(UINT nDataLength); BOOL IsUpdated() { return m_nID > m_nNotifyID; } protected: std::list<std::pair<CHAR*, UINT> > m_buffers; virtual BOOL OnInitReceive(CHAR* pPacket, UINT nDataLength) = 0; virtual BOOL OnReceive(CHAR* pPacket, UINT nDataLength) = 0; BOOL OnRecv(WPARAM wParam, LPARAM lParam); BOOL OnInitRecv(WPARAM wParam, LPARAM lParam); CCriticalSection m_sync; CCriticalSection m_syncBuffer; CHAR* m_pPacket; UINT m_nLen; int m_nNotifyID; volatile int m_nID; };
25.17
29
(translation_unit) "#pragma once\n\n#include <DKMsgOnlyWnd.h>\n#include <list>\n\nclass VTSCurrentBase : public DKMsgOnlyWnd\n{\npublic:\n VTSCurrentBase();\n virtual ~VTSCurrentBase();\n\n BOOL InitReceive(CHAR* pPacket, UINT nDataLength);\n BOOL Receive(CHAR* pPacket, UINT nDataLength);\n\n CHAR* GetBuffer(UINT nDataLength);\n\n BOOL IsUpdated() \n {\n return m_nID > m_nNotifyID;\n }\nprotected:\n\n std::list<std::pair<CHAR*, UINT> > m_buffers;\n\n virtual BOOL OnInitReceive(CHAR* pPacket, UINT nDataLength) = 0;\n virtual BOOL OnReceive(CHAR* pPacket, UINT nDataLength) = 0;\n\n BOOL OnRecv(WPARAM wParam, LPARAM lParam);\n BOOL OnInitRecv(WPARAM wParam, LPARAM lParam);\n\n CCriticalSection m_sync;\n CCriticalSection m_syncBuffer;\n CHAR* m_pPacket;\n UINT m_nLen;\n int m_nNotifyID;\n \n volatile int m_nID;\n};\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <DKMsgOnlyWnd.h>\n" (#include) "#include" (system_lib_string) "<DKMsgOnlyWnd.h>" (preproc_include) "#include <list>\n" (#include) "#include" (system_lib_string) "<list>" (function_definition) "class VTSCurrentBase : public DKMsgOnlyWnd\n{\npublic:\n VTSCurrentBase();\n virtual ~VTSCurrentBase();\n\n BOOL InitReceive(CHAR* pPacket, UINT nDataLength);\n BOOL Receive(CHAR* pPacket, UINT nDataLength);\n\n CHAR* GetBuffer(UINT nDataLength);\n\n BOOL IsUpdated() \n {\n return m_nID > m_nNotifyID;\n }\nprotected:\n\n std::list<std::pair<CHAR*, UINT> > m_buffers;\n\n virtual BOOL OnInitReceive(CHAR* pPacket, UINT nDataLength) = 0;\n virtual BOOL OnReceive(CHAR* pPacket, UINT nDataLength) = 0;\n\n BOOL OnRecv(WPARAM wParam, LPARAM lParam);\n BOOL OnInitRecv(WPARAM wParam, LPARAM lParam);\n\n CCriticalSection m_sync;\n CCriticalSection m_syncBuffer;\n CHAR* m_pPacket;\n UINT m_nLen;\n int m_nNotifyID;\n \n volatile int m_nID;\n}" (type_identifier) "class" (identifier) "VTSCurrentBase" (ERROR) ": public DKMsgOnlyWnd" (:) ":" (identifier) "public" (identifier) "DKMsgOnlyWnd" (compound_statement) "{\npublic:\n VTSCurrentBase();\n virtual ~VTSCurrentBase();\n\n BOOL InitReceive(CHAR* pPacket, UINT nDataLength);\n BOOL Receive(CHAR* pPacket, UINT nDataLength);\n\n CHAR* GetBuffer(UINT nDataLength);\n\n BOOL IsUpdated() \n {\n return m_nID > m_nNotifyID;\n }\nprotected:\n\n std::list<std::pair<CHAR*, UINT> > m_buffers;\n\n virtual BOOL OnInitReceive(CHAR* pPacket, UINT nDataLength) = 0;\n virtual BOOL OnReceive(CHAR* pPacket, UINT nDataLength) = 0;\n\n BOOL OnRecv(WPARAM wParam, LPARAM lParam);\n BOOL OnInitRecv(WPARAM wParam, LPARAM lParam);\n\n CCriticalSection m_sync;\n CCriticalSection m_syncBuffer;\n CHAR* m_pPacket;\n UINT m_nLen;\n int m_nNotifyID;\n \n volatile int m_nID;\n}" ({) "{" (labeled_statement) "public:\n VTSCurrentBase();" (statement_identifier) "public" (:) ":" (expression_statement) "VTSCurrentBase();" (call_expression) "VTSCurrentBase()" (identifier) "VTSCurrentBase" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "virtual ~VTSCurrentBase();" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "VTSCurrentBase()" (identifier) "VTSCurrentBase" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "BOOL InitReceive(CHAR* pPacket, UINT nDataLength);" (type_identifier) "BOOL" (function_declarator) "InitReceive(CHAR* pPacket, UINT nDataLength)" (identifier) "InitReceive" (parameter_list) "(CHAR* pPacket, UINT nDataLength)" (() "(" (parameter_declaration) "CHAR* pPacket" (type_identifier) "CHAR" (pointer_declarator) "* pPacket" (*) "*" (identifier) "pPacket" (,) "," (parameter_declaration) "UINT nDataLength" (type_identifier) "UINT" (identifier) "nDataLength" ()) ")" (;) ";" (declaration) "BOOL Receive(CHAR* pPacket, UINT nDataLength);" (type_identifier) "BOOL" (function_declarator) "Receive(CHAR* pPacket, UINT nDataLength)" (identifier) "Receive" (parameter_list) "(CHAR* pPacket, UINT nDataLength)" (() "(" (parameter_declaration) "CHAR* pPacket" (type_identifier) "CHAR" (pointer_declarator) "* pPacket" (*) "*" (identifier) "pPacket" (,) "," (parameter_declaration) "UINT nDataLength" (type_identifier) "UINT" (identifier) "nDataLength" ()) ")" (;) ";" (declaration) "CHAR* GetBuffer(UINT nDataLength);" (type_identifier) "CHAR" (pointer_declarator) "* GetBuffer(UINT nDataLength)" (*) "*" (function_declarator) "GetBuffer(UINT nDataLength)" (identifier) "GetBuffer" (parameter_list) "(UINT nDataLength)" (() "(" (parameter_declaration) "UINT nDataLength" (type_identifier) "UINT" (identifier) "nDataLength" ()) ")" (;) ";" (function_definition) "BOOL IsUpdated() \n {\n return m_nID > m_nNotifyID;\n }" (type_identifier) "BOOL" (function_declarator) "IsUpdated()" (identifier) "IsUpdated" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n return m_nID > m_nNotifyID;\n }" ({) "{" (return_statement) "return m_nID > m_nNotifyID;" (return) "return" (binary_expression) "m_nID > m_nNotifyID" (identifier) "m_nID" (>) ">" (identifier) "m_nNotifyID" (;) ";" (}) "}" (labeled_statement) "protected:\n\n std::list<std::pair<CHAR*, UINT> > m_buffers;" (statement_identifier) "protected" (:) ":" (expression_statement) "std::list<std::pair<CHAR*, UINT> > m_buffers;" (binary_expression) "std::list<std::pair<CHAR*, UINT> > m_buffers" (identifier) "std" (ERROR) "::list<std::pair<CHAR*, UINT>" (:) ":" (:) ":" (binary_expression) "list<std" (identifier) "list" (<) "<" (identifier) "std" (:) ":" (:) ":" (binary_expression) "pair<CHAR*, UINT" (identifier) "pair" (<) "<" (binary_expression) "CHAR*, UINT" (identifier) "CHAR" (*) "*" (ERROR) "," (,) "," (identifier) "UINT" (>) ">" (>) ">" (identifier) "m_buffers" (;) ";" (declaration) "virtual BOOL OnInitReceive(CHAR* pPacket, UINT nDataLength) = 0;" (type_identifier) "virtual" (ERROR) "BOOL" (identifier) "BOOL" (init_declarator) "OnInitReceive(CHAR* pPacket, UINT nDataLength) = 0" (function_declarator) "OnInitReceive(CHAR* pPacket, UINT nDataLength)" (identifier) "OnInitReceive" (parameter_list) "(CHAR* pPacket, UINT nDataLength)" (() "(" (parameter_declaration) "CHAR* pPacket" (type_identifier) "CHAR" (pointer_declarator) "* pPacket" (*) "*" (identifier) "pPacket" (,) "," (parameter_declaration) "UINT nDataLength" (type_identifier) "UINT" (identifier) "nDataLength" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "virtual BOOL OnReceive(CHAR* pPacket, UINT nDataLength) = 0;" (type_identifier) "virtual" (ERROR) "BOOL" (identifier) "BOOL" (init_declarator) "OnReceive(CHAR* pPacket, UINT nDataLength) = 0" (function_declarator) "OnReceive(CHAR* pPacket, UINT nDataLength)" (identifier) "OnReceive" (parameter_list) "(CHAR* pPacket, UINT nDataLength)" (() "(" (parameter_declaration) "CHAR* pPacket" (type_identifier) "CHAR" (pointer_declarator) "* pPacket" (*) "*" (identifier) "pPacket" (,) "," (parameter_declaration) "UINT nDataLength" (type_identifier) "UINT" (identifier) "nDataLength" ()) ")" (=) "=" (number_literal) "0" (;) ";" (declaration) "BOOL OnRecv(WPARAM wParam, LPARAM lParam);" (type_identifier) "BOOL" (function_declarator) "OnRecv(WPARAM wParam, LPARAM lParam)" (identifier) "OnRecv" (parameter_list) "(WPARAM wParam, LPARAM lParam)" (() "(" (parameter_declaration) "WPARAM wParam" (type_identifier) "WPARAM" (identifier) "wParam" (,) "," (parameter_declaration) "LPARAM lParam" (type_identifier) "LPARAM" (identifier) "lParam" ()) ")" (;) ";" (declaration) "BOOL OnInitRecv(WPARAM wParam, LPARAM lParam);" (type_identifier) "BOOL" (function_declarator) "OnInitRecv(WPARAM wParam, LPARAM lParam)" (identifier) "OnInitRecv" (parameter_list) "(WPARAM wParam, LPARAM lParam)" (() "(" (parameter_declaration) "WPARAM wParam" (type_identifier) "WPARAM" (identifier) "wParam" (,) "," (parameter_declaration) "LPARAM lParam" (type_identifier) "LPARAM" (identifier) "lParam" ()) ")" (;) ";" (declaration) "CCriticalSection m_sync;" (type_identifier) "CCriticalSection" (identifier) "m_sync" (;) ";" (declaration) "CCriticalSection m_syncBuffer;" (type_identifier) "CCriticalSection" (identifier) "m_syncBuffer" (;) ";" (declaration) "CHAR* m_pPacket;" (type_identifier) "CHAR" (pointer_declarator) "* m_pPacket" (*) "*" (identifier) "m_pPacket" (;) ";" (declaration) "UINT m_nLen;" (type_identifier) "UINT" (identifier) "m_nLen" (;) ";" (declaration) "int m_nNotifyID;" (primitive_type) "int" (identifier) "m_nNotifyID" (;) ";" (declaration) "volatile int m_nID;" (type_qualifier) "volatile" (volatile) "volatile" (primitive_type) "int" (identifier) "m_nID" (;) ";" (}) "}" (expression_statement) ";" (;) ";"
236
6
{"language": "c", "success": true, "metadata": {"lines": 29, "avg_line_length": 25.17, "nodes": 168, "errors": 0, "source_hash": "602fac550fb3484545a3ecfb3ff7052fba26281933ca772d3cfd1826512dab24", "categorized_nodes": 123}, "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 <DKMsgOnlyWnd.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": "<DKMsgOnlyWnd.h>", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 25}}, {"id": 6, "type": "preproc_include", "text": "#include <list>\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": "<list>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 15}}, {"id": 9, "type": "function_definition", "text": "class VTSCurrentBase : public DKMsgOnlyWnd\n{\npublic:\n\tVTSCurrentBase();\n\tvirtual ~VTSCurrentBase();\n\n\tBOOL InitReceive(CHAR* pPacket, UINT nDataLength);\n\tBOOL Receive(CHAR* pPacket, UINT nDataLength);\n\n\tCHAR* GetBuffer(UINT nDataLength);\n\n\tBOOL IsUpdated() \n\t{\n\t\treturn m_nID > m_nNotifyID;\n\t}\nprotected:\n\n\tstd::list<std::pair<CHAR*, UINT> >\t\tm_buffers;\n\n\tvirtual BOOL OnInitReceive(CHAR* pPacket, UINT nDataLength) = 0;\n\tvirtual BOOL OnReceive(CHAR* pPacket, UINT nDataLength) = 0;\n\n\tBOOL OnRecv(WPARAM wParam, LPARAM lParam);\n\tBOOL OnInitRecv(WPARAM wParam, LPARAM lParam);\n\n\tCCriticalSection m_sync;\n\tCCriticalSection m_syncBuffer;\n\tCHAR* m_pPacket;\n\tUINT m_nLen;\n\tint m_nNotifyID;\n\t\n\tvolatile int m_nID;\n}", "parent": null, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 10, "type": "identifier", "text": "VTSCurrentBase", "parent": 9, "children": [], "start_point": {"row": 5, "column": 6}, "end_point": {"row": 5, "column": 20}}, {"id": 11, "type": "ERROR", "text": ": public DKMsgOnlyWnd", "parent": 9, "children": [12], "start_point": {"row": 5, "column": 21}, "end_point": {"row": 5, "column": 42}}, {"id": 12, "type": "identifier", "text": "DKMsgOnlyWnd", "parent": 11, "children": [], "start_point": {"row": 5, "column": 30}, "end_point": {"row": 5, "column": 42}}, {"id": 13, "type": "labeled_statement", "text": "public:\n\tVTSCurrentBase();", "parent": 9, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 18}}, {"id": 14, "type": "call_expression", "text": "VTSCurrentBase()", "parent": 13, "children": [15, 16], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 17}}, {"id": 15, "type": "identifier", "text": "VTSCurrentBase", "parent": 14, "children": [], "start_point": {"row": 8, "column": 1}, "end_point": {"row": 8, "column": 15}}, {"id": 16, "type": "argument_list", "text": "()", "parent": 14, "children": [], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 17}}, {"id": 17, "type": "declaration", "text": "virtual ~VTSCurrentBase();", "parent": 9, "children": [18, 19, 21], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 27}}, {"id": 18, "type": "type_identifier", "text": "virtual", "parent": 17, "children": [], "start_point": {"row": 9, "column": 1}, "end_point": {"row": 9, "column": 8}}, {"id": 19, "type": "ERROR", "text": "~", "parent": 17, "children": [20], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 10}}, {"id": 20, "type": "~", "text": "~", "parent": 19, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 10}}, {"id": 21, "type": "function_declarator", "text": "VTSCurrentBase()", "parent": 17, "children": [22, 23], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 26}}, {"id": 22, "type": "identifier", "text": "VTSCurrentBase", "parent": 21, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 24}}, {"id": 23, "type": "parameter_list", "text": "()", "parent": 21, "children": [], "start_point": {"row": 9, "column": 24}, "end_point": {"row": 9, "column": 26}}, {"id": 24, "type": "declaration", "text": "BOOL InitReceive(CHAR* pPacket, UINT nDataLength);", "parent": 9, "children": [25, 26], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 51}}, {"id": 25, "type": "type_identifier", "text": "BOOL", "parent": 24, "children": [], "start_point": {"row": 11, "column": 1}, "end_point": {"row": 11, "column": 5}}, {"id": 26, "type": "function_declarator", "text": "InitReceive(CHAR* pPacket, UINT nDataLength)", "parent": 24, "children": [27, 28], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 50}}, {"id": 27, "type": "identifier", "text": "InitReceive", "parent": 26, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 17}}, {"id": 28, "type": "parameter_list", "text": "(CHAR* pPacket, UINT nDataLength)", "parent": 26, "children": [29, 34], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 50}}, {"id": 29, "type": "parameter_declaration", "text": "CHAR* pPacket", "parent": 28, "children": [30, 31], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 31}}, {"id": 30, "type": "type_identifier", "text": "CHAR", "parent": 29, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 22}}, {"id": 31, "type": "pointer_declarator", "text": "* pPacket", "parent": 29, "children": [32, 33], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 31}}, {"id": 32, "type": "*", "text": "*", "parent": 31, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 23}}, {"id": 33, "type": "identifier", "text": "pPacket", "parent": 31, "children": [], "start_point": {"row": 11, "column": 24}, "end_point": {"row": 11, "column": 31}}, {"id": 34, "type": "parameter_declaration", "text": "UINT nDataLength", "parent": 28, "children": [35, 36], "start_point": {"row": 11, "column": 33}, "end_point": {"row": 11, "column": 49}}, {"id": 35, "type": "type_identifier", "text": "UINT", "parent": 34, "children": [], "start_point": {"row": 11, "column": 33}, "end_point": {"row": 11, "column": 37}}, {"id": 36, "type": "identifier", "text": "nDataLength", "parent": 34, "children": [], "start_point": {"row": 11, "column": 38}, "end_point": {"row": 11, "column": 49}}, {"id": 37, "type": "declaration", "text": "BOOL Receive(CHAR* pPacket, UINT nDataLength);", "parent": 9, "children": [38, 39], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 47}}, {"id": 38, "type": "type_identifier", "text": "BOOL", "parent": 37, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 5}}, {"id": 39, "type": "function_declarator", "text": "Receive(CHAR* pPacket, UINT nDataLength)", "parent": 37, "children": [40, 41], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 46}}, {"id": 40, "type": "identifier", "text": "Receive", "parent": 39, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 13}}, {"id": 41, "type": "parameter_list", "text": "(CHAR* pPacket, UINT nDataLength)", "parent": 39, "children": [42, 47], "start_point": {"row": 12, "column": 13}, "end_point": {"row": 12, "column": 46}}, {"id": 42, "type": "parameter_declaration", "text": "CHAR* pPacket", "parent": 41, "children": [43, 44], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 27}}, {"id": 43, "type": "type_identifier", "text": "CHAR", "parent": 42, "children": [], "start_point": {"row": 12, "column": 14}, "end_point": {"row": 12, "column": 18}}, {"id": 44, "type": "pointer_declarator", "text": "* pPacket", "parent": 42, "children": [45, 46], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 27}}, {"id": 45, "type": "*", "text": "*", "parent": 44, "children": [], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 19}}, {"id": 46, "type": "identifier", "text": "pPacket", "parent": 44, "children": [], "start_point": {"row": 12, "column": 20}, "end_point": {"row": 12, "column": 27}}, {"id": 47, "type": "parameter_declaration", "text": "UINT nDataLength", "parent": 41, "children": [48, 49], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 45}}, {"id": 48, "type": "type_identifier", "text": "UINT", "parent": 47, "children": [], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 33}}, {"id": 49, "type": "identifier", "text": "nDataLength", "parent": 47, "children": [], "start_point": {"row": 12, "column": 34}, "end_point": {"row": 12, "column": 45}}, {"id": 50, "type": "declaration", "text": "CHAR* GetBuffer(UINT nDataLength);", "parent": 9, "children": [51, 52], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 35}}, {"id": 51, "type": "type_identifier", "text": "CHAR", "parent": 50, "children": [], "start_point": {"row": 14, "column": 1}, "end_point": {"row": 14, "column": 5}}, {"id": 52, "type": "pointer_declarator", "text": "* GetBuffer(UINT nDataLength)", "parent": 50, "children": [53, 54], "start_point": {"row": 14, "column": 5}, "end_point": {"row": 14, "column": 34}}, {"id": 53, "type": "*", "text": "*", "parent": 52, "children": [], "start_point": {"row": 14, "column": 5}, "end_point": {"row": 14, "column": 6}}, {"id": 54, "type": "function_declarator", "text": "GetBuffer(UINT nDataLength)", "parent": 52, "children": [55, 56], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 34}}, {"id": 55, "type": "identifier", "text": "GetBuffer", "parent": 54, "children": [], "start_point": {"row": 14, "column": 7}, "end_point": {"row": 14, "column": 16}}, {"id": 56, "type": "parameter_list", "text": "(UINT nDataLength)", "parent": 54, "children": [57], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 34}}, {"id": 57, "type": "parameter_declaration", "text": "UINT nDataLength", "parent": 56, "children": [58, 59], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 33}}, {"id": 58, "type": "type_identifier", "text": "UINT", "parent": 57, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 21}}, {"id": 59, "type": "identifier", "text": "nDataLength", "parent": 57, "children": [], "start_point": {"row": 14, "column": 22}, "end_point": {"row": 14, "column": 33}}, {"id": 60, "type": "function_definition", "text": "BOOL IsUpdated() \n\t{\n\t\treturn m_nID > m_nNotifyID;\n\t}", "parent": 9, "children": [61, 62], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 19, "column": 2}}, {"id": 61, "type": "type_identifier", "text": "BOOL", "parent": 60, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 5}}, {"id": 62, "type": "function_declarator", "text": "IsUpdated()", "parent": 60, "children": [63, 64], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 17}}, {"id": 63, "type": "identifier", "text": "IsUpdated", "parent": 62, "children": [], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 15}}, {"id": 64, "type": "parameter_list", "text": "()", "parent": 62, "children": [], "start_point": {"row": 16, "column": 15}, "end_point": {"row": 16, "column": 17}}, {"id": 65, "type": "return_statement", "text": "return m_nID > m_nNotifyID;", "parent": 60, "children": [66], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 29}}, {"id": 66, "type": "binary_expression", "text": "m_nID > m_nNotifyID", "parent": 65, "children": [67, 68, 69], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 28}}, {"id": 67, "type": "identifier", "text": "m_nID", "parent": 66, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 14}}, {"id": 68, "type": ">", "text": ">", "parent": 66, "children": [], "start_point": {"row": 18, "column": 15}, "end_point": {"row": 18, "column": 16}}, {"id": 69, "type": "identifier", "text": "m_nNotifyID", "parent": 66, "children": [], "start_point": {"row": 18, "column": 17}, "end_point": {"row": 18, "column": 28}}, {"id": 70, "type": "labeled_statement", "text": "protected:\n\n\tstd::list<std::pair<CHAR*, UINT> >\t\tm_buffers;", "parent": 9, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 22, "column": 47}}, {"id": 71, "type": "binary_expression", "text": "std::list<std::pair<CHAR*, UINT> >\t\tm_buffers", "parent": 70, "children": [72, 73, 86, 87], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 46}}, {"id": 72, "type": "identifier", "text": "std", "parent": 71, "children": [], "start_point": {"row": 22, "column": 1}, "end_point": {"row": 22, "column": 4}}, {"id": 73, "type": "ERROR", "text": "::list<std::pair<CHAR*, UINT>", "parent": 71, "children": [74, 78, 85], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 33}}, {"id": 74, "type": "binary_expression", "text": "list<std", "parent": 73, "children": [75, 76, 77], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 14}}, {"id": 75, "type": "identifier", "text": "list", "parent": 74, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 10}}, {"id": 76, "type": "<", "text": "<", "parent": 74, "children": [], "start_point": {"row": 22, "column": 10}, "end_point": {"row": 22, "column": 11}}, {"id": 77, "type": "identifier", "text": "std", "parent": 74, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 14}}, {"id": 78, "type": "binary_expression", "text": "pair<CHAR*, UINT", "parent": 73, "children": [79, 80, 81], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 32}}, {"id": 79, "type": "identifier", "text": "pair", "parent": 78, "children": [], "start_point": {"row": 22, "column": 16}, "end_point": {"row": 22, "column": 20}}, {"id": 80, "type": "<", "text": "<", "parent": 78, "children": [], "start_point": {"row": 22, "column": 20}, "end_point": {"row": 22, "column": 21}}, {"id": 81, "type": "binary_expression", "text": "CHAR*, UINT", "parent": 78, "children": [82, 83, 84], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 32}}, {"id": 82, "type": "identifier", "text": "CHAR", "parent": 81, "children": [], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 25}}, {"id": 83, "type": "*", "text": "*", "parent": 81, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 26}}, {"id": 84, "type": "identifier", "text": "UINT", "parent": 81, "children": [], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 32}}, {"id": 85, "type": ">", "text": ">", "parent": 73, "children": [], "start_point": {"row": 22, "column": 32}, "end_point": {"row": 22, "column": 33}}, {"id": 86, "type": ">", "text": ">", "parent": 71, "children": [], "start_point": {"row": 22, "column": 34}, "end_point": {"row": 22, "column": 35}}, {"id": 87, "type": "identifier", "text": "m_buffers", "parent": 71, "children": [], "start_point": {"row": 22, "column": 37}, "end_point": {"row": 22, "column": 46}}, {"id": 88, "type": "declaration", "text": "virtual BOOL OnInitReceive(CHAR* pPacket, UINT nDataLength) = 0;", "parent": 9, "children": [89, 90, 92], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 65}}, {"id": 89, "type": "type_identifier", "text": "virtual", "parent": 88, "children": [], "start_point": {"row": 24, "column": 1}, "end_point": {"row": 24, "column": 8}}, {"id": 90, "type": "ERROR", "text": "BOOL", "parent": 88, "children": [91], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 13}}, {"id": 91, "type": "identifier", "text": "BOOL", "parent": 90, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 13}}, {"id": 92, "type": "init_declarator", "text": "OnInitReceive(CHAR* pPacket, UINT nDataLength) = 0", "parent": 88, "children": [93, 104, 105], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 64}}, {"id": 93, "type": "function_declarator", "text": "OnInitReceive(CHAR* pPacket, UINT nDataLength)", "parent": 92, "children": [94, 95], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 60}}, {"id": 94, "type": "identifier", "text": "OnInitReceive", "parent": 93, "children": [], "start_point": {"row": 24, "column": 14}, "end_point": {"row": 24, "column": 27}}, {"id": 95, "type": "parameter_list", "text": "(CHAR* pPacket, UINT nDataLength)", "parent": 93, "children": [96, 101], "start_point": {"row": 24, "column": 27}, "end_point": {"row": 24, "column": 60}}, {"id": 96, "type": "parameter_declaration", "text": "CHAR* pPacket", "parent": 95, "children": [97, 98], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 41}}, {"id": 97, "type": "type_identifier", "text": "CHAR", "parent": 96, "children": [], "start_point": {"row": 24, "column": 28}, "end_point": {"row": 24, "column": 32}}, {"id": 98, "type": "pointer_declarator", "text": "* pPacket", "parent": 96, "children": [99, 100], "start_point": {"row": 24, "column": 32}, "end_point": {"row": 24, "column": 41}}, {"id": 99, "type": "*", "text": "*", "parent": 98, "children": [], "start_point": {"row": 24, "column": 32}, "end_point": {"row": 24, "column": 33}}, {"id": 100, "type": "identifier", "text": "pPacket", "parent": 98, "children": [], "start_point": {"row": 24, "column": 34}, "end_point": {"row": 24, "column": 41}}, {"id": 101, "type": "parameter_declaration", "text": "UINT nDataLength", "parent": 95, "children": [102, 103], "start_point": {"row": 24, "column": 43}, "end_point": {"row": 24, "column": 59}}, {"id": 102, "type": "type_identifier", "text": "UINT", "parent": 101, "children": [], "start_point": {"row": 24, "column": 43}, "end_point": {"row": 24, "column": 47}}, {"id": 103, "type": "identifier", "text": "nDataLength", "parent": 101, "children": [], "start_point": {"row": 24, "column": 48}, "end_point": {"row": 24, "column": 59}}, {"id": 104, "type": "=", "text": "=", "parent": 92, "children": [], "start_point": {"row": 24, "column": 61}, "end_point": {"row": 24, "column": 62}}, {"id": 105, "type": "number_literal", "text": "0", "parent": 92, "children": [], "start_point": {"row": 24, "column": 63}, "end_point": {"row": 24, "column": 64}}, {"id": 106, "type": "declaration", "text": "virtual BOOL OnReceive(CHAR* pPacket, UINT nDataLength) = 0;", "parent": 9, "children": [107, 108, 110], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 61}}, {"id": 107, "type": "type_identifier", "text": "virtual", "parent": 106, "children": [], "start_point": {"row": 25, "column": 1}, "end_point": {"row": 25, "column": 8}}, {"id": 108, "type": "ERROR", "text": "BOOL", "parent": 106, "children": [109], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 13}}, {"id": 109, "type": "identifier", "text": "BOOL", "parent": 108, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 13}}, {"id": 110, "type": "init_declarator", "text": "OnReceive(CHAR* pPacket, UINT nDataLength) = 0", "parent": 106, "children": [111, 122, 123], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 60}}, {"id": 111, "type": "function_declarator", "text": "OnReceive(CHAR* pPacket, UINT nDataLength)", "parent": 110, "children": [112, 113], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 56}}, {"id": 112, "type": "identifier", "text": "OnReceive", "parent": 111, "children": [], "start_point": {"row": 25, "column": 14}, "end_point": {"row": 25, "column": 23}}, {"id": 113, "type": "parameter_list", "text": "(CHAR* pPacket, UINT nDataLength)", "parent": 111, "children": [114, 119], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 56}}, {"id": 114, "type": "parameter_declaration", "text": "CHAR* pPacket", "parent": 113, "children": [115, 116], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 37}}, {"id": 115, "type": "type_identifier", "text": "CHAR", "parent": 114, "children": [], "start_point": {"row": 25, "column": 24}, "end_point": {"row": 25, "column": 28}}, {"id": 116, "type": "pointer_declarator", "text": "* pPacket", "parent": 114, "children": [117, 118], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 37}}, {"id": 117, "type": "*", "text": "*", "parent": 116, "children": [], "start_point": {"row": 25, "column": 28}, "end_point": {"row": 25, "column": 29}}, {"id": 118, "type": "identifier", "text": "pPacket", "parent": 116, "children": [], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 37}}, {"id": 119, "type": "parameter_declaration", "text": "UINT nDataLength", "parent": 113, "children": [120, 121], "start_point": {"row": 25, "column": 39}, "end_point": {"row": 25, "column": 55}}, {"id": 120, "type": "type_identifier", "text": "UINT", "parent": 119, "children": [], "start_point": {"row": 25, "column": 39}, "end_point": {"row": 25, "column": 43}}, {"id": 121, "type": "identifier", "text": "nDataLength", "parent": 119, "children": [], "start_point": {"row": 25, "column": 44}, "end_point": {"row": 25, "column": 55}}, {"id": 122, "type": "=", "text": "=", "parent": 110, "children": [], "start_point": {"row": 25, "column": 57}, "end_point": {"row": 25, "column": 58}}, {"id": 123, "type": "number_literal", "text": "0", "parent": 110, "children": [], "start_point": {"row": 25, "column": 59}, "end_point": {"row": 25, "column": 60}}, {"id": 124, "type": "declaration", "text": "BOOL OnRecv(WPARAM wParam, LPARAM lParam);", "parent": 9, "children": [125, 126], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 43}}, {"id": 125, "type": "type_identifier", "text": "BOOL", "parent": 124, "children": [], "start_point": {"row": 27, "column": 1}, "end_point": {"row": 27, "column": 5}}, {"id": 126, "type": "function_declarator", "text": "OnRecv(WPARAM wParam, LPARAM lParam)", "parent": 124, "children": [127, 128], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 42}}, {"id": 127, "type": "identifier", "text": "OnRecv", "parent": 126, "children": [], "start_point": {"row": 27, "column": 6}, "end_point": {"row": 27, "column": 12}}, {"id": 128, "type": "parameter_list", "text": "(WPARAM wParam, LPARAM lParam)", "parent": 126, "children": [129, 132], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 42}}, {"id": 129, "type": "parameter_declaration", "text": "WPARAM wParam", "parent": 128, "children": [130, 131], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 26}}, {"id": 130, "type": "type_identifier", "text": "WPARAM", "parent": 129, "children": [], "start_point": {"row": 27, "column": 13}, "end_point": {"row": 27, "column": 19}}, {"id": 131, "type": "identifier", "text": "wParam", "parent": 129, "children": [], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 26}}, {"id": 132, "type": "parameter_declaration", "text": "LPARAM lParam", "parent": 128, "children": [133, 134], "start_point": {"row": 27, "column": 28}, "end_point": {"row": 27, "column": 41}}, {"id": 133, "type": "type_identifier", "text": "LPARAM", "parent": 132, "children": [], "start_point": {"row": 27, "column": 28}, "end_point": {"row": 27, "column": 34}}, {"id": 134, "type": "identifier", "text": "lParam", "parent": 132, "children": [], "start_point": {"row": 27, "column": 35}, "end_point": {"row": 27, "column": 41}}, {"id": 135, "type": "declaration", "text": "BOOL OnInitRecv(WPARAM wParam, LPARAM lParam);", "parent": 9, "children": [136, 137], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 47}}, {"id": 136, "type": "type_identifier", "text": "BOOL", "parent": 135, "children": [], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 28, "column": 5}}, {"id": 137, "type": "function_declarator", "text": "OnInitRecv(WPARAM wParam, LPARAM lParam)", "parent": 135, "children": [138, 139], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 46}}, {"id": 138, "type": "identifier", "text": "OnInitRecv", "parent": 137, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 16}}, {"id": 139, "type": "parameter_list", "text": "(WPARAM wParam, LPARAM lParam)", "parent": 137, "children": [140, 143], "start_point": {"row": 28, "column": 16}, "end_point": {"row": 28, "column": 46}}, {"id": 140, "type": "parameter_declaration", "text": "WPARAM wParam", "parent": 139, "children": [141, 142], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 30}}, {"id": 141, "type": "type_identifier", "text": "WPARAM", "parent": 140, "children": [], "start_point": {"row": 28, "column": 17}, "end_point": {"row": 28, "column": 23}}, {"id": 142, "type": "identifier", "text": "wParam", "parent": 140, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 30}}, {"id": 143, "type": "parameter_declaration", "text": "LPARAM lParam", "parent": 139, "children": [144, 145], "start_point": {"row": 28, "column": 32}, "end_point": {"row": 28, "column": 45}}, {"id": 144, "type": "type_identifier", "text": "LPARAM", "parent": 143, "children": [], "start_point": {"row": 28, "column": 32}, "end_point": {"row": 28, "column": 38}}, {"id": 145, "type": "identifier", "text": "lParam", "parent": 143, "children": [], "start_point": {"row": 28, "column": 39}, "end_point": {"row": 28, "column": 45}}, {"id": 146, "type": "declaration", "text": "CCriticalSection m_sync;", "parent": 9, "children": [147, 148], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 25}}, {"id": 147, "type": "type_identifier", "text": "CCriticalSection", "parent": 146, "children": [], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 30, "column": 17}}, {"id": 148, "type": "identifier", "text": "m_sync", "parent": 146, "children": [], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 24}}, {"id": 149, "type": "declaration", "text": "CCriticalSection m_syncBuffer;", "parent": 9, "children": [150, 151], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 31}}, {"id": 150, "type": "type_identifier", "text": "CCriticalSection", "parent": 149, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 17}}, {"id": 151, "type": "identifier", "text": "m_syncBuffer", "parent": 149, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 30}}, {"id": 152, "type": "declaration", "text": "CHAR* m_pPacket;", "parent": 9, "children": [153, 154], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 17}}, {"id": 153, "type": "type_identifier", "text": "CHAR", "parent": 152, "children": [], "start_point": {"row": 32, "column": 1}, "end_point": {"row": 32, "column": 5}}, {"id": 154, "type": "pointer_declarator", "text": "* m_pPacket", "parent": 152, "children": [155, 156], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 16}}, {"id": 155, "type": "*", "text": "*", "parent": 154, "children": [], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 6}}, {"id": 156, "type": "identifier", "text": "m_pPacket", "parent": 154, "children": [], "start_point": {"row": 32, "column": 7}, "end_point": {"row": 32, "column": 16}}, {"id": 157, "type": "declaration", "text": "UINT m_nLen;", "parent": 9, "children": [158, 159], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 13}}, {"id": 158, "type": "type_identifier", "text": "UINT", "parent": 157, "children": [], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 33, "column": 5}}, {"id": 159, "type": "identifier", "text": "m_nLen", "parent": 157, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 12}}, {"id": 160, "type": "declaration", "text": "int m_nNotifyID;", "parent": 9, "children": [161, 162], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 17}}, {"id": 161, "type": "primitive_type", "text": "int", "parent": 160, "children": [], "start_point": {"row": 34, "column": 1}, "end_point": {"row": 34, "column": 4}}, {"id": 162, "type": "identifier", "text": "m_nNotifyID", "parent": 160, "children": [], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 16}}, {"id": 163, "type": "declaration", "text": "volatile int m_nID;", "parent": 9, "children": [164, 166, 167], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 20}}, {"id": 164, "type": "type_qualifier", "text": "volatile", "parent": 163, "children": [165], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 9}}, {"id": 165, "type": "volatile", "text": "volatile", "parent": 164, "children": [], "start_point": {"row": 36, "column": 1}, "end_point": {"row": 36, "column": 9}}, {"id": 166, "type": "primitive_type", "text": "int", "parent": 163, "children": [], "start_point": {"row": 36, "column": 10}, "end_point": {"row": 36, "column": 13}}, {"id": 167, "type": "identifier", "text": "m_nID", "parent": 163, "children": [], "start_point": {"row": 36, "column": 14}, "end_point": {"row": 36, "column": 19}}]}, "node_categories": {"declarations": {"functions": [9, 21, 26, 39, 54, 60, 62, 93, 111, 126, 137], "variables": [17, 24, 29, 34, 37, 42, 47, 50, 57, 88, 96, 101, 106, 114, 119, 124, 129, 132, 135, 140, 143, 146, 149, 152, 157, 160, 163], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [14, 66, 71, 74, 78, 81], "assignments": [], "loops": [], "conditionals": [10, 12, 15, 18, 22, 25, 27, 30, 33, 35, 36, 38, 40, 43, 46, 48, 49, 51, 55, 58, 59, 61, 63, 67, 69, 72, 75, 77, 79, 82, 84, 87, 89, 91, 94, 97, 100, 102, 103, 107, 109, 112, 115, 118, 120, 121, 125, 127, 130, 131, 133, 134, 136, 138, 141, 142, 144, 145, 147, 148, 150, 151, 153, 156, 158, 159, 162, 164, 167], "returns": [65], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 105, 123], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 9, "universal_type": "function", "name": "VTSCurrentBase", "text_snippet": "class VTSCurrentBase : public DKMsgOnlyWnd\n{\npublic:\n\tVTSCurrentBase();\n\tvirtual ~VTSCurrentBase();\n"}, {"node_id": 21, "universal_type": "function", "name": "unknown", "text_snippet": "VTSCurrentBase()"}, {"node_id": 26, "universal_type": "function", "name": "unknown", "text_snippet": "InitReceive(CHAR* pPacket, UINT nDataLength)"}, {"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "Receive(CHAR* pPacket, UINT nDataLength)"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "GetBuffer(UINT nDataLength)"}, {"node_id": 60, "universal_type": "function", "name": "unknown", "text_snippet": "BOOL IsUpdated() \n\t{\n\t\treturn m_nID > m_nNotifyID;\n\t}"}, {"node_id": 62, "universal_type": "function", "name": "unknown", "text_snippet": "IsUpdated()"}, {"node_id": 93, "universal_type": "function", "name": "unknown", "text_snippet": "OnInitReceive(CHAR* pPacket, UINT nDataLength)"}, {"node_id": 111, "universal_type": "function", "name": "unknown", "text_snippet": "OnReceive(CHAR* pPacket, UINT nDataLength)"}, {"node_id": 126, "universal_type": "function", "name": "unknown", "text_snippet": "OnRecv(WPARAM wParam, LPARAM lParam)"}, {"node_id": 137, "universal_type": "function", "name": "unknown", "text_snippet": "OnInitRecv(WPARAM wParam, LPARAM lParam)"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include <DKMsgOnlyWnd.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <list>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include <DKMsgOnlyWnd.h>\n#include <list>\n\nclass VTSCurrentBase : public DKMsgOnlyWnd\n{\npublic:\n\tVTSCurrentBase();\n\tvirtual ~VTSCurrentBase();\n\n\tBOOL InitReceive(CHAR* pPacket, UINT nDataLength);\n\tBOOL Receive(CHAR* pPacket, UINT nDataLength);\n\n\tCHAR* GetBuffer(UINT nDataLength);\n\n\tBOOL IsUpdated() \n\t{\n\t\treturn m_nID > m_nNotifyID;\n\t}\nprotected:\n\n\tstd::list<std::pair<CHAR*, UINT> >\t\tm_buffers;\n\n\tvirtual BOOL OnInitReceive(CHAR* pPacket, UINT nDataLength) = 0;\n\tvirtual BOOL OnReceive(CHAR* pPacket, UINT nDataLength) = 0;\n\n\tBOOL OnRecv(WPARAM wParam, LPARAM lParam);\n\tBOOL OnInitRecv(WPARAM wParam, LPARAM lParam);\n\n\tCCriticalSection m_sync;\n\tCCriticalSection m_syncBuffer;\n\tCHAR* m_pPacket;\n\tUINT m_nLen;\n\tint m_nNotifyID;\n\t\n\tvolatile int m_nID;\n};\n"}
78
c
#pragma once #include "fetch_event.h" #include "../status.h" namespace core { namespace wim { class fetch_event_status : public fetch_event { private: status status_; std::string aimid_; public: virtual ~fetch_event_status() = default; virtual int32_t parse(const rapidjson::Value& _node_event_data) override; virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override; const status& get_status() const noexcept { return status_; } const std::string& get_aimid() const noexcept { return aimid_; } }; } }
31.86
21
(translation_unit) "#pragma once\n\n#include "fetch_event.h"\n#include "../status.h"\n\nnamespace core\n{\n namespace wim\n {\n class fetch_event_status : public fetch_event\n {\n private:\n status status_;\n std::string aimid_;\n\n public:\n virtual ~fetch_event_status() = default;\n\n virtual int32_t parse(const rapidjson::Value& _node_event_data) override;\n virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override;\n\n const status& get_status() const noexcept { return status_; }\n const std::string& get_aimid() const noexcept { return aimid_; }\n };\n }\n}\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "fetch_event.h"\n" (#include) "#include" (string_literal) ""fetch_event.h"" (") """ (string_content) "fetch_event.h" (") """ (preproc_include) "#include "../status.h"\n" (#include) "#include" (string_literal) ""../status.h"" (") """ (string_content) "../status.h" (") """ (function_definition) "namespace core\n{\n namespace wim\n {\n class fetch_event_status : public fetch_event\n {\n private:\n status status_;\n std::string aimid_;\n\n public:\n virtual ~fetch_event_status() = default;\n\n virtual int32_t parse(const rapidjson::Value& _node_event_data) override;\n virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override;\n\n const status& get_status() const noexcept { return status_; }\n const std::string& get_aimid() const noexcept { return aimid_; }\n };\n }\n}" (type_identifier) "namespace" (identifier) "core" (compound_statement) "{\n namespace wim\n {\n class fetch_event_status : public fetch_event\n {\n private:\n status status_;\n std::string aimid_;\n\n public:\n virtual ~fetch_event_status() = default;\n\n virtual int32_t parse(const rapidjson::Value& _node_event_data) override;\n virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override;\n\n const status& get_status() const noexcept { return status_; }\n const std::string& get_aimid() const noexcept { return aimid_; }\n };\n }\n}" ({) "{" (function_definition) "namespace wim\n {\n class fetch_event_status : public fetch_event\n {\n private:\n status status_;\n std::string aimid_;\n\n public:\n virtual ~fetch_event_status() = default;\n\n virtual int32_t parse(const rapidjson::Value& _node_event_data) override;\n virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override;\n\n const status& get_status() const noexcept { return status_; }\n const std::string& get_aimid() const noexcept { return aimid_; }\n };\n }" (type_identifier) "namespace" (identifier) "wim" (compound_statement) "{\n class fetch_event_status : public fetch_event\n {\n private:\n status status_;\n std::string aimid_;\n\n public:\n virtual ~fetch_event_status() = default;\n\n virtual int32_t parse(const rapidjson::Value& _node_event_data) override;\n virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override;\n\n const status& get_status() const noexcept { return status_; }\n const std::string& get_aimid() const noexcept { return aimid_; }\n };\n }" ({) "{" (function_definition) "class fetch_event_status : public fetch_event\n {\n private:\n status status_;\n std::string aimid_;\n\n public:\n virtual ~fetch_event_status() = default;\n\n virtual int32_t parse(const rapidjson::Value& _node_event_data) override;\n virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override;\n\n const status& get_status() const noexcept { return status_; }\n const std::string& get_aimid() const noexcept { return aimid_; }\n }" (type_identifier) "class" (identifier) "fetch_event_status" (ERROR) ": public fetch_event" (:) ":" (identifier) "public" (identifier) "fetch_event" (compound_statement) "{\n private:\n status status_;\n std::string aimid_;\n\n public:\n virtual ~fetch_event_status() = default;\n\n virtual int32_t parse(const rapidjson::Value& _node_event_data) override;\n virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override;\n\n const status& get_status() const noexcept { return status_; }\n const std::string& get_aimid() const noexcept { return aimid_; }\n }" ({) "{" (labeled_statement) "private:\n status status_;" (statement_identifier) "private" (:) ":" (declaration) "status status_;" (type_identifier) "status" (identifier) "status_" (;) ";" (labeled_statement) "std::string aimid_;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string aimid_;" (type_identifier) "string" (identifier) "aimid_" (;) ";" (labeled_statement) "public:\n virtual ~fetch_event_status() = default;" (statement_identifier) "public" (:) ":" (declaration) "virtual ~fetch_event_status() = default;" (type_identifier) "virtual" (ERROR) "~" (~) "~" (init_declarator) "fetch_event_status() = default" (function_declarator) "fetch_event_status()" (identifier) "fetch_event_status" (parameter_list) "()" (() "(" ()) ")" (=) "=" (identifier) "default" (;) ";" (ERROR) "virtual int32_t parse(const rapidjson::Value& _node_event_data) override" (type_identifier) "virtual" (ERROR) "int32_t" (identifier) "int32_t" (function_declarator) "parse(const rapidjson::Value& _node_event_data) override" (identifier) "parse" (parameter_list) "(const rapidjson::Value& _node_event_data)" (() "(" (parameter_declaration) "const rapidjson::Value& _node_event_data" (type_qualifier) "const" (const) "const" (type_identifier) "rapidjson" (ERROR) "::Value&" (:) ":" (:) ":" (identifier) "Value" (&) "&" (identifier) "_node_event_data" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (ERROR) "virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override" (type_identifier) "virtual" (ERROR) "void" (identifier) "void" (function_declarator) "on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override" (identifier) "on_im" (parameter_list) "(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete)" (() "(" (parameter_declaration) "std::shared_ptr<core::wim::im> _im" (type_identifier) "std" (ERROR) "::shared_ptr<core::wim::im>" (:) ":" (:) ":" (identifier) "shared_ptr" (<) "<" (identifier) "core" (:) ":" (:) ":" (identifier) "wim" (:) ":" (:) ":" (identifier) "im" (>) ">" (identifier) "_im" (,) "," (parameter_declaration) "std::shared_ptr<auto_callback> _on_complete" (type_identifier) "std" (ERROR) "::shared_ptr<auto_callback>" (:) ":" (:) ":" (identifier) "shared_ptr" (<) "<" (identifier) "auto_callback" (>) ">" (identifier) "_on_complete" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (function_definition) "const status& get_status() const noexcept { return status_; }\n const std::string& get_aimid() const noexcept { return aimid_; }" (type_qualifier) "const" (const) "const" (type_identifier) "status" (ERROR) "&" (&) "&" (function_declarator) "get_status()" (identifier) "get_status" (parameter_list) "()" (() "(" ()) ")" (declaration) "const noexcept { return status_;" (type_qualifier) "const" (const) "const" (type_identifier) "noexcept" (ERROR) "{ return" ({) "{" (return) "return" (identifier) "status_" (;) ";" (ERROR) "}\n const std::string& get_aimid() const noexcept" (}) "}" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (function_declarator) "get_aimid() const noexcept" (identifier) "get_aimid" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (identifier) "noexcept" (compound_statement) "{ return aimid_; }" ({) "{" (return_statement) "return aimid_;" (return) "return" (identifier) "aimid_" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (}) "}"
177
14
{"language": "c", "success": true, "metadata": {"lines": 21, "avg_line_length": 31.86, "nodes": 97, "errors": 0, "source_hash": "5f02389394537fc301cb958b122b04322cf80b8c046ae0b41c5c728f79e2ec84", "categorized_nodes": 68}, "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 \"fetch_event.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": "\"fetch_event.h\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 24}}, {"id": 6, "type": "preproc_include", "text": "#include \"../status.h\"\n", "parent": null, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"../status.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 22}}, {"id": 9, "type": "function_definition", "text": "namespace core\n{\n namespace wim\n {\n class fetch_event_status : public fetch_event\n {\n private:\n status status_;\n std::string aimid_;\n\n public:\n virtual ~fetch_event_status() = default;\n\n virtual int32_t parse(const rapidjson::Value& _node_event_data) override;\n virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override;\n\n const status& get_status() const noexcept { return status_; }\n const std::string& get_aimid() const noexcept { return aimid_; }\n };\n }\n}", "parent": null, "children": [10, 11], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 25, "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": "core", "parent": 9, "children": [], "start_point": {"row": 5, "column": 10}, "end_point": {"row": 5, "column": 14}}, {"id": 12, "type": "function_definition", "text": "namespace wim\n {\n class fetch_event_status : public fetch_event\n {\n private:\n status status_;\n std::string aimid_;\n\n public:\n virtual ~fetch_event_status() = default;\n\n virtual int32_t parse(const rapidjson::Value& _node_event_data) override;\n virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override;\n\n const status& get_status() const noexcept { return status_; }\n const std::string& get_aimid() const noexcept { return aimid_; }\n };\n }", "parent": 9, "children": [13, 14], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 24, "column": 5}}, {"id": 13, "type": "type_identifier", "text": "namespace", "parent": 12, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 13}}, {"id": 14, "type": "identifier", "text": "wim", "parent": 12, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 17}}, {"id": 15, "type": "function_definition", "text": "class fetch_event_status : public fetch_event\n {\n private:\n status status_;\n std::string aimid_;\n\n public:\n virtual ~fetch_event_status() = default;\n\n virtual int32_t parse(const rapidjson::Value& _node_event_data) override;\n virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override;\n\n const status& get_status() const noexcept { return status_; }\n const std::string& get_aimid() const noexcept { return aimid_; }\n }", "parent": 12, "children": [16, 17], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 23, "column": 9}}, {"id": 16, "type": "identifier", "text": "fetch_event_status", "parent": 15, "children": [], "start_point": {"row": 9, "column": 14}, "end_point": {"row": 9, "column": 32}}, {"id": 17, "type": "ERROR", "text": ": public fetch_event", "parent": 15, "children": [18], "start_point": {"row": 9, "column": 33}, "end_point": {"row": 9, "column": 53}}, {"id": 18, "type": "identifier", "text": "fetch_event", "parent": 17, "children": [], "start_point": {"row": 9, "column": 42}, "end_point": {"row": 9, "column": 53}}, {"id": 19, "type": "labeled_statement", "text": "private:\n status status_;", "parent": 15, "children": [20], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 12, "column": 27}}, {"id": 20, "type": "declaration", "text": "status status_;", "parent": 19, "children": [21, 22], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 27}}, {"id": 21, "type": "type_identifier", "text": "status", "parent": 20, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 18}}, {"id": 22, "type": "identifier", "text": "status_", "parent": 20, "children": [], "start_point": {"row": 12, "column": 19}, "end_point": {"row": 12, "column": 26}}, {"id": 23, "type": "labeled_statement", "text": "std::string aimid_;", "parent": 15, "children": [24, 25], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 31}}, {"id": 24, "type": "statement_identifier", "text": "std", "parent": 23, "children": [], "start_point": {"row": 13, "column": 12}, "end_point": {"row": 13, "column": 15}}, {"id": 25, "type": "declaration", "text": "string aimid_;", "parent": 23, "children": [26, 27], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 31}}, {"id": 26, "type": "type_identifier", "text": "string", "parent": 25, "children": [], "start_point": {"row": 13, "column": 17}, "end_point": {"row": 13, "column": 23}}, {"id": 27, "type": "identifier", "text": "aimid_", "parent": 25, "children": [], "start_point": {"row": 13, "column": 24}, "end_point": {"row": 13, "column": 30}}, {"id": 28, "type": "labeled_statement", "text": "public:\n virtual ~fetch_event_status() = default;", "parent": 15, "children": [29], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 16, "column": 52}}, {"id": 29, "type": "declaration", "text": "virtual ~fetch_event_status() = default;", "parent": 28, "children": [30, 31, 33], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 52}}, {"id": 30, "type": "type_identifier", "text": "virtual", "parent": 29, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 19}}, {"id": 31, "type": "ERROR", "text": "~", "parent": 29, "children": [32], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 21}}, {"id": 32, "type": "~", "text": "~", "parent": 31, "children": [], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 21}}, {"id": 33, "type": "init_declarator", "text": "fetch_event_status() = default", "parent": 29, "children": [34, 37, 38], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 51}}, {"id": 34, "type": "function_declarator", "text": "fetch_event_status()", "parent": 33, "children": [35, 36], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 41}}, {"id": 35, "type": "identifier", "text": "fetch_event_status", "parent": 34, "children": [], "start_point": {"row": 16, "column": 21}, "end_point": {"row": 16, "column": 39}}, {"id": 36, "type": "parameter_list", "text": "()", "parent": 34, "children": [], "start_point": {"row": 16, "column": 39}, "end_point": {"row": 16, "column": 41}}, {"id": 37, "type": "=", "text": "=", "parent": 33, "children": [], "start_point": {"row": 16, "column": 42}, "end_point": {"row": 16, "column": 43}}, {"id": 38, "type": "identifier", "text": "default", "parent": 33, "children": [], "start_point": {"row": 16, "column": 44}, "end_point": {"row": 16, "column": 51}}, {"id": 39, "type": "ERROR", "text": "virtual int32_t parse(const rapidjson::Value& _node_event_data) override", "parent": 15, "children": [40, 41, 43], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 84}}, {"id": 40, "type": "type_identifier", "text": "virtual", "parent": 39, "children": [], "start_point": {"row": 18, "column": 12}, "end_point": {"row": 18, "column": 19}}, {"id": 41, "type": "ERROR", "text": "int32_t", "parent": 39, "children": [42], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 27}}, {"id": 42, "type": "identifier", "text": "int32_t", "parent": 41, "children": [], "start_point": {"row": 18, "column": 20}, "end_point": {"row": 18, "column": 27}}, {"id": 43, "type": "function_declarator", "text": "parse(const rapidjson::Value& _node_event_data) override", "parent": 39, "children": [44, 45, 51], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 84}}, {"id": 44, "type": "identifier", "text": "parse", "parent": 43, "children": [], "start_point": {"row": 18, "column": 28}, "end_point": {"row": 18, "column": 33}}, {"id": 45, "type": "parameter_list", "text": "(const rapidjson::Value& _node_event_data)", "parent": 43, "children": [46], "start_point": {"row": 18, "column": 33}, "end_point": {"row": 18, "column": 75}}, {"id": 46, "type": "parameter_declaration", "text": "const rapidjson::Value& _node_event_data", "parent": 45, "children": [47, 48, 50], "start_point": {"row": 18, "column": 34}, "end_point": {"row": 18, "column": 74}}, {"id": 47, "type": "type_identifier", "text": "rapidjson", "parent": 46, "children": [], "start_point": {"row": 18, "column": 40}, "end_point": {"row": 18, "column": 49}}, {"id": 48, "type": "ERROR", "text": "::Value&", "parent": 46, "children": [49], "start_point": {"row": 18, "column": 49}, "end_point": {"row": 18, "column": 57}}, {"id": 49, "type": "identifier", "text": "Value", "parent": 48, "children": [], "start_point": {"row": 18, "column": 51}, "end_point": {"row": 18, "column": 56}}, {"id": 50, "type": "identifier", "text": "_node_event_data", "parent": 46, "children": [], "start_point": {"row": 18, "column": 58}, "end_point": {"row": 18, "column": 74}}, {"id": 51, "type": "identifier", "text": "override", "parent": 43, "children": [], "start_point": {"row": 18, "column": 76}, "end_point": {"row": 18, "column": 84}}, {"id": 52, "type": "ERROR", "text": "virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override", "parent": 15, "children": [53, 54, 56], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 120}}, {"id": 53, "type": "type_identifier", "text": "virtual", "parent": 52, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 19}}, {"id": 54, "type": "ERROR", "text": "void", "parent": 52, "children": [55], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 24}}, {"id": 55, "type": "identifier", "text": "void", "parent": 54, "children": [], "start_point": {"row": 19, "column": 20}, "end_point": {"row": 19, "column": 24}}, {"id": 56, "type": "function_declarator", "text": "on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override", "parent": 52, "children": [57, 58, 77], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 120}}, {"id": 57, "type": "identifier", "text": "on_im", "parent": 56, "children": [], "start_point": {"row": 19, "column": 25}, "end_point": {"row": 19, "column": 30}}, {"id": 58, "type": "parameter_list", "text": "(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete)", "parent": 56, "children": [59, 69], "start_point": {"row": 19, "column": 30}, "end_point": {"row": 19, "column": 111}}, {"id": 59, "type": "parameter_declaration", "text": "std::shared_ptr<core::wim::im> _im", "parent": 58, "children": [60, 61, 68], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 65}}, {"id": 60, "type": "type_identifier", "text": "std", "parent": 59, "children": [], "start_point": {"row": 19, "column": 31}, "end_point": {"row": 19, "column": 34}}, {"id": 61, "type": "ERROR", "text": "::shared_ptr<core::wim::im>", "parent": 59, "children": [62, 63, 64, 65, 66, 67], "start_point": {"row": 19, "column": 34}, "end_point": {"row": 19, "column": 61}}, {"id": 62, "type": "identifier", "text": "shared_ptr", "parent": 61, "children": [], "start_point": {"row": 19, "column": 36}, "end_point": {"row": 19, "column": 46}}, {"id": 63, "type": "<", "text": "<", "parent": 61, "children": [], "start_point": {"row": 19, "column": 46}, "end_point": {"row": 19, "column": 47}}, {"id": 64, "type": "identifier", "text": "core", "parent": 61, "children": [], "start_point": {"row": 19, "column": 47}, "end_point": {"row": 19, "column": 51}}, {"id": 65, "type": "identifier", "text": "wim", "parent": 61, "children": [], "start_point": {"row": 19, "column": 53}, "end_point": {"row": 19, "column": 56}}, {"id": 66, "type": "identifier", "text": "im", "parent": 61, "children": [], "start_point": {"row": 19, "column": 58}, "end_point": {"row": 19, "column": 60}}, {"id": 67, "type": ">", "text": ">", "parent": 61, "children": [], "start_point": {"row": 19, "column": 60}, "end_point": {"row": 19, "column": 61}}, {"id": 68, "type": "identifier", "text": "_im", "parent": 59, "children": [], "start_point": {"row": 19, "column": 62}, "end_point": {"row": 19, "column": 65}}, {"id": 69, "type": "parameter_declaration", "text": "std::shared_ptr<auto_callback> _on_complete", "parent": 58, "children": [70, 71, 76], "start_point": {"row": 19, "column": 67}, "end_point": {"row": 19, "column": 110}}, {"id": 70, "type": "type_identifier", "text": "std", "parent": 69, "children": [], "start_point": {"row": 19, "column": 67}, "end_point": {"row": 19, "column": 70}}, {"id": 71, "type": "ERROR", "text": "::shared_ptr<auto_callback>", "parent": 69, "children": [72, 73, 74, 75], "start_point": {"row": 19, "column": 70}, "end_point": {"row": 19, "column": 97}}, {"id": 72, "type": "identifier", "text": "shared_ptr", "parent": 71, "children": [], "start_point": {"row": 19, "column": 72}, "end_point": {"row": 19, "column": 82}}, {"id": 73, "type": "<", "text": "<", "parent": 71, "children": [], "start_point": {"row": 19, "column": 82}, "end_point": {"row": 19, "column": 83}}, {"id": 74, "type": "identifier", "text": "auto_callback", "parent": 71, "children": [], "start_point": {"row": 19, "column": 83}, "end_point": {"row": 19, "column": 96}}, {"id": 75, "type": ">", "text": ">", "parent": 71, "children": [], "start_point": {"row": 19, "column": 96}, "end_point": {"row": 19, "column": 97}}, {"id": 76, "type": "identifier", "text": "_on_complete", "parent": 69, "children": [], "start_point": {"row": 19, "column": 98}, "end_point": {"row": 19, "column": 110}}, {"id": 77, "type": "identifier", "text": "override", "parent": 56, "children": [], "start_point": {"row": 19, "column": 112}, "end_point": {"row": 19, "column": 120}}, {"id": 78, "type": "function_definition", "text": "const status& get_status() const noexcept { return status_; }\n const std::string& get_aimid() const noexcept { return aimid_; }", "parent": 15, "children": [79, 80, 83, 87], "start_point": {"row": 21, "column": 12}, "end_point": {"row": 22, "column": 76}}, {"id": 79, "type": "type_identifier", "text": "status", "parent": 78, "children": [], "start_point": {"row": 21, "column": 18}, "end_point": {"row": 21, "column": 24}}, {"id": 80, "type": "function_declarator", "text": "get_status()", "parent": 78, "children": [81, 82], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 38}}, {"id": 81, "type": "identifier", "text": "get_status", "parent": 80, "children": [], "start_point": {"row": 21, "column": 26}, "end_point": {"row": 21, "column": 36}}, {"id": 82, "type": "parameter_list", "text": "()", "parent": 80, "children": [], "start_point": {"row": 21, "column": 36}, "end_point": {"row": 21, "column": 38}}, {"id": 83, "type": "declaration", "text": "const noexcept { return status_;", "parent": 78, "children": [84, 85, 86], "start_point": {"row": 21, "column": 39}, "end_point": {"row": 21, "column": 71}}, {"id": 84, "type": "type_identifier", "text": "noexcept", "parent": 83, "children": [], "start_point": {"row": 21, "column": 45}, "end_point": {"row": 21, "column": 53}}, {"id": 85, "type": "ERROR", "text": "{ return", "parent": 83, "children": [], "start_point": {"row": 21, "column": 54}, "end_point": {"row": 21, "column": 62}}, {"id": 86, "type": "identifier", "text": "status_", "parent": 83, "children": [], "start_point": {"row": 21, "column": 63}, "end_point": {"row": 21, "column": 70}}, {"id": 87, "type": "ERROR", "text": "}\n const std::string& get_aimid() const noexcept", "parent": 78, "children": [88, 89, 91], "start_point": {"row": 21, "column": 72}, "end_point": {"row": 22, "column": 57}}, {"id": 88, "type": "type_identifier", "text": "std", "parent": 87, "children": [], "start_point": {"row": 22, "column": 18}, "end_point": {"row": 22, "column": 21}}, {"id": 89, "type": "ERROR", "text": "::string&", "parent": 87, "children": [90], "start_point": {"row": 22, "column": 21}, "end_point": {"row": 22, "column": 30}}, {"id": 90, "type": "identifier", "text": "string", "parent": 89, "children": [], "start_point": {"row": 22, "column": 23}, "end_point": {"row": 22, "column": 29}}, {"id": 91, "type": "function_declarator", "text": "get_aimid() const noexcept", "parent": 87, "children": [92, 93, 94], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 57}}, {"id": 92, "type": "identifier", "text": "get_aimid", "parent": 91, "children": [], "start_point": {"row": 22, "column": 31}, "end_point": {"row": 22, "column": 40}}, {"id": 93, "type": "parameter_list", "text": "()", "parent": 91, "children": [], "start_point": {"row": 22, "column": 40}, "end_point": {"row": 22, "column": 42}}, {"id": 94, "type": "identifier", "text": "noexcept", "parent": 91, "children": [], "start_point": {"row": 22, "column": 49}, "end_point": {"row": 22, "column": 57}}, {"id": 95, "type": "return_statement", "text": "return aimid_;", "parent": 78, "children": [96], "start_point": {"row": 22, "column": 60}, "end_point": {"row": 22, "column": 74}}, {"id": 96, "type": "identifier", "text": "aimid_", "parent": 95, "children": [], "start_point": {"row": 22, "column": 67}, "end_point": {"row": 22, "column": 73}}]}, "node_categories": {"declarations": {"functions": [9, 12, 15, 34, 43, 56, 78, 80, 91], "variables": [20, 25, 29, 46, 59, 69, 83], "classes": [], "imports": [3, 4, 6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [10, 11, 13, 14, 16, 18, 21, 22, 24, 26, 27, 30, 35, 38, 40, 42, 44, 47, 49, 50, 51, 53, 55, 57, 60, 62, 64, 65, 66, 68, 70, 72, 74, 76, 77, 79, 81, 84, 86, 88, 90, 92, 94, 96], "returns": [95], "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": "fetch_event_status", "text_snippet": "namespace core\n{\n namespace wim\n {\n class fetch_event_status : public fetch_event\n "}, {"node_id": 12, "universal_type": "function", "name": "fetch_event_status", "text_snippet": "namespace wim\n {\n class fetch_event_status : public fetch_event\n {\n private:"}, {"node_id": 15, "universal_type": "function", "name": "fetch_event_status", "text_snippet": "class fetch_event_status : public fetch_event\n {\n private:\n status status_;"}, {"node_id": 34, "universal_type": "function", "name": "unknown", "text_snippet": "fetch_event_status()"}, {"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "parse(const rapidjson::Value& _node_event_data) override"}, {"node_id": 56, "universal_type": "function", "name": "unknown", "text_snippet": "on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override"}, {"node_id": 78, "universal_type": "function", "name": "unknown", "text_snippet": "const status& get_status() const noexcept { return status_; }\n const std::string& get_aim"}, {"node_id": 80, "universal_type": "function", "name": "unknown", "text_snippet": "get_status()"}, {"node_id": 91, "universal_type": "function", "name": "unknown", "text_snippet": "get_aimid() const noexcept"}], "class_declarations": [], "import_statements": [{"node_id": 3, "text": "#include \"fetch_event.h\"\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"../status.h\"\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include \"fetch_event.h\"\n#include \"../status.h\"\n\nnamespace core\n{\n namespace wim\n {\n class fetch_event_status : public fetch_event\n {\n private:\n status status_;\n std::string aimid_;\n\n public:\n virtual ~fetch_event_status() = default;\n\n virtual int32_t parse(const rapidjson::Value& _node_event_data) override;\n virtual void on_im(std::shared_ptr<core::wim::im> _im, std::shared_ptr<auto_callback> _on_complete) override;\n\n const status& get_status() const noexcept { return status_; }\n const std::string& get_aimid() const noexcept { return aimid_; }\n };\n }\n}\n"}
79
c
/* SPDX-License-Identifier: GPL-2.0 */ /* * Written by <NAME>, 1996 (<EMAIL>). * * (C) SGI 2006, <NAME> * Cleaned up and restructured to ease the addition of alternative * implementations of SLAB allocators. * (C) Linux Foundation 2008-2013 * Unified interface for all slab allocators */ #ifndef __RTOCHIUS_SLAB_H_ #define __RTOCHIUS_SLAB_H_ #include <rtochius/gfp.h> #include <rtochius/slab_def.h> #include <rtochius/memory.h> #define SLAB_RED_ZONE ((slab_flags_t)0x00000400U) /* DEBUG: Red zone objs in a cache */ #define SLAB_POISON ((slab_flags_t)0x00000800U) /* DEBUG: Poison objects */ #define SLAB_HWCACHE_ALIGN ((slab_flags_t)0x00002000U) /* Align objs on cache lines */ #define SLAB_CACHE_DMA ((slab_flags_t)0x00004000U) /* Use GFP_DMA memory */ #define SLAB_STORE_USER ((slab_flags_t)0x00010000U) /* DEBUG: Store the last owner for bug hunting */ #define SLAB_PANIC ((slab_flags_t)0x00040000U) /* Panic if kmem_cache_create() fails */ /* * ZERO_SIZE_PTR will be returned for zero sized kmalloc requests. * * Dereferencing ZERO_SIZE_PTR will lead to a distinct access fault. * * ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can. * Both make kfree a no-op. */ #define ZERO_SIZE_PTR ((void *)16) #define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \ (unsigned long)ZERO_SIZE_PTR) /* * Setting ARCH_SLAB_MINALIGN in arch headers allows a different alignment. * Intended for arches that get misalignment faults even for 64 bit integer * aligned buffers. */ #ifndef ARCH_SLAB_MINALIGN #define ARCH_SLAB_MINALIGN __alignof__(unsigned long long) #endif void kmem_cache_init(void); int slab_is_available(void); struct kmem_cache *kmem_cache_create(const char *name, size_t size, size_t align, unsigned long flags, void (*ctor)(struct kmem_cache *, void *)); void kmem_cache_destroy(struct kmem_cache *s); void *kmem_cache_alloc(struct kmem_cache *, gfp_t); void kmem_cache_free(struct kmem_cache *, void *); unsigned int kmem_cache_size(struct kmem_cache *); const char *kmem_cache_name(struct kmem_cache *); int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); void kfree(const void *); size_t ksize(const void *); void *__kmalloc(size_t size, gfp_t flags); static __always_inline void *kmalloc(size_t size, gfp_t flags) { if (__builtin_constant_p(size)) { if (size > PAGE_SIZE / 2) return (void *)__get_free_pages(flags, get_order(size)); if (!(flags & GFP_DMA)) { struct kmem_cache *s = kmalloc_slab(size); if (!s) return ZERO_SIZE_PTR; return kmem_cache_alloc(s, flags); } } return __kmalloc(size, flags); } /* * Shortcuts */ static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags) { return kmem_cache_alloc(k, flags | __GFP_ZERO); } /** * kzalloc - allocate memory. The memory is set to zero. * @size: how many bytes of memory are required. * @flags: the type of memory to allocate (see kmalloc). */ static inline void *kzalloc(size_t size, gfp_t flags) { return kmalloc(size, flags | __GFP_ZERO); } /** * kmalloc_array - allocate memory for an array. * @n: number of elements. * @size: element size. * @flags: the type of memory to allocate (see kmalloc). */ static inline void *kmalloc_array(size_t n, size_t size, gfp_t flags) { size_t bytes; if (unlikely(check_mul_overflow(n, size, &bytes))) return NULL; if (__builtin_constant_p(n) && __builtin_constant_p(size)) return kmalloc(bytes, flags); return __kmalloc(bytes, flags); } /** * kcalloc - allocate memory for an array. The memory is set to zero. * @n: number of elements. * @size: element size. * @flags: the type of memory to allocate (see kmalloc). */ static inline void *kcalloc(size_t n, size_t size, gfp_t flags) { return kmalloc_array(n, size, flags | __GFP_ZERO); } #endif /* !__RTOCHIUS_SLAB_H_ */
33.48
111
(translation_unit) "/* SPDX-License-Identifier: GPL-2.0 */\n/*\n * Written by <NAME>, 1996 (<EMAIL>).\n *\n * (C) SGI 2006, <NAME>\n * Cleaned up and restructured to ease the addition of alternative\n * implementations of SLAB allocators.\n * (C) Linux Foundation 2008-2013\n * Unified interface for all slab allocators\n */\n\n#ifndef __RTOCHIUS_SLAB_H_\n#define __RTOCHIUS_SLAB_H_\n\n#include <rtochius/gfp.h>\n#include <rtochius/slab_def.h>\n#include <rtochius/memory.h>\n\n#define SLAB_RED_ZONE ((slab_flags_t)0x00000400U) /* DEBUG: Red zone objs in a cache */\n#define SLAB_POISON ((slab_flags_t)0x00000800U) /* DEBUG: Poison objects */\n#define SLAB_HWCACHE_ALIGN ((slab_flags_t)0x00002000U) /* Align objs on cache lines */\n#define SLAB_CACHE_DMA ((slab_flags_t)0x00004000U) /* Use GFP_DMA memory */\n#define SLAB_STORE_USER ((slab_flags_t)0x00010000U) /* DEBUG: Store the last owner for bug hunting */\n#define SLAB_PANIC ((slab_flags_t)0x00040000U) /* Panic if kmem_cache_create() fails */\n\n/*\n * ZERO_SIZE_PTR will be returned for zero sized kmalloc requests.\n *\n * Dereferencing ZERO_SIZE_PTR will lead to a distinct access fault.\n *\n * ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can.\n * Both make kfree a no-op.\n */\n#define ZERO_SIZE_PTR ((void *)16)\n\n#define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \\n (unsigned long)ZERO_SIZE_PTR)\n\n/*\n * Setting ARCH_SLAB_MINALIGN in arch headers allows a different alignment.\n * Intended for arches that get misalignment faults even for 64 bit integer\n * aligned buffers.\n */\n#ifndef ARCH_SLAB_MINALIGN\n#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)\n#endif\n\nvoid kmem_cache_init(void);\nint slab_is_available(void);\n\nstruct kmem_cache *kmem_cache_create(const char *name, size_t size,\n size_t align, unsigned long flags,\n void (*ctor)(struct kmem_cache *, void *));\nvoid kmem_cache_destroy(struct kmem_cache *s);\nvoid *kmem_cache_alloc(struct kmem_cache *, gfp_t);\nvoid kmem_cache_free(struct kmem_cache *, void *);\n\nunsigned int kmem_cache_size(struct kmem_cache *);\nconst char *kmem_cache_name(struct kmem_cache *);\nint kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);\n\nvoid kfree(const void *);\nsize_t ksize(const void *);\n\nvoid *__kmalloc(size_t size, gfp_t flags);\n\nstatic __always_inline void *kmalloc(size_t size, gfp_t flags)\n{\n if (__builtin_constant_p(size)) {\n if (size > PAGE_SIZE / 2)\n return (void *)__get_free_pages(flags,\n get_order(size));\n\n if (!(flags & GFP_DMA)) {\n struct kmem_cache *s = kmalloc_slab(size);\n\n if (!s)\n return ZERO_SIZE_PTR;\n\n return kmem_cache_alloc(s, flags);\n }\n }\n return __kmalloc(size, flags);\n}\n\n/*\n * Shortcuts\n */\nstatic inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)\n{\n return kmem_cache_alloc(k, flags | __GFP_ZERO);\n}\n\n/**\n * kzalloc - allocate memory. The memory is set to zero.\n * @size: how many bytes of memory are required.\n * @flags: the type of memory to allocate (see kmalloc).\n */\nstatic inline void *kzalloc(size_t size, gfp_t flags)\n{\n return kmalloc(size, flags | __GFP_ZERO);\n}\n\n/**\n * kmalloc_array - allocate memory for an array.\n * @n: number of elements.\n * @size: element size.\n * @flags: the type of memory to allocate (see kmalloc).\n */\nstatic inline void *kmalloc_array(size_t n, size_t size, gfp_t flags)\n{\n size_t bytes;\n\n if (unlikely(check_mul_overflow(n, size, &bytes)))\n return NULL;\n if (__builtin_constant_p(n) && __builtin_constant_p(size))\n return kmalloc(bytes, flags);\n return __kmalloc(bytes, flags);\n}\n\n/**\n * kcalloc - allocate memory for an array. The memory is set to zero.\n * @n: number of elements.\n * @size: element size.\n * @flags: the type of memory to allocate (see kmalloc).\n */\nstatic inline void *kcalloc(size_t n, size_t size, gfp_t flags)\n{\n return kmalloc_array(n, size, flags | __GFP_ZERO);\n}\n\n#endif /* !__RTOCHIUS_SLAB_H_ */\n" (comment) "/* SPDX-License-Identifier: GPL-2.0 */" (comment) "/*\n * Written by <NAME>, 1996 (<EMAIL>).\n *\n * (C) SGI 2006, <NAME>\n * Cleaned up and restructured to ease the addition of alternative\n * implementations of SLAB allocators.\n * (C) Linux Foundation 2008-2013\n * Unified interface for all slab allocators\n */" (preproc_ifdef) "#ifndef __RTOCHIUS_SLAB_H_\n#define __RTOCHIUS_SLAB_H_\n\n#include <rtochius/gfp.h>\n#include <rtochius/slab_def.h>\n#include <rtochius/memory.h>\n\n#define SLAB_RED_ZONE ((slab_flags_t)0x00000400U) /* DEBUG: Red zone objs in a cache */\n#define SLAB_POISON ((slab_flags_t)0x00000800U) /* DEBUG: Poison objects */\n#define SLAB_HWCACHE_ALIGN ((slab_flags_t)0x00002000U) /* Align objs on cache lines */\n#define SLAB_CACHE_DMA ((slab_flags_t)0x00004000U) /* Use GFP_DMA memory */\n#define SLAB_STORE_USER ((slab_flags_t)0x00010000U) /* DEBUG: Store the last owner for bug hunting */\n#define SLAB_PANIC ((slab_flags_t)0x00040000U) /* Panic if kmem_cache_create() fails */\n\n/*\n * ZERO_SIZE_PTR will be returned for zero sized kmalloc requests.\n *\n * Dereferencing ZERO_SIZE_PTR will lead to a distinct access fault.\n *\n * ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can.\n * Both make kfree a no-op.\n */\n#define ZERO_SIZE_PTR ((void *)16)\n\n#define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \\n (unsigned long)ZERO_SIZE_PTR)\n\n/*\n * Setting ARCH_SLAB_MINALIGN in arch headers allows a different alignment.\n * Intended for arches that get misalignment faults even for 64 bit integer\n * aligned buffers.\n */\n#ifndef ARCH_SLAB_MINALIGN\n#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)\n#endif\n\nvoid kmem_cache_init(void);\nint slab_is_available(void);\n\nstruct kmem_cache *kmem_cache_create(const char *name, size_t size,\n size_t align, unsigned long flags,\n void (*ctor)(struct kmem_cache *, void *));\nvoid kmem_cache_destroy(struct kmem_cache *s);\nvoid *kmem_cache_alloc(struct kmem_cache *, gfp_t);\nvoid kmem_cache_free(struct kmem_cache *, void *);\n\nunsigned int kmem_cache_size(struct kmem_cache *);\nconst char *kmem_cache_name(struct kmem_cache *);\nint kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);\n\nvoid kfree(const void *);\nsize_t ksize(const void *);\n\nvoid *__kmalloc(size_t size, gfp_t flags);\n\nstatic __always_inline void *kmalloc(size_t size, gfp_t flags)\n{\n if (__builtin_constant_p(size)) {\n if (size > PAGE_SIZE / 2)\n return (void *)__get_free_pages(flags,\n get_order(size));\n\n if (!(flags & GFP_DMA)) {\n struct kmem_cache *s = kmalloc_slab(size);\n\n if (!s)\n return ZERO_SIZE_PTR;\n\n return kmem_cache_alloc(s, flags);\n }\n }\n return __kmalloc(size, flags);\n}\n\n/*\n * Shortcuts\n */\nstatic inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)\n{\n return kmem_cache_alloc(k, flags | __GFP_ZERO);\n}\n\n/**\n * kzalloc - allocate memory. The memory is set to zero.\n * @size: how many bytes of memory are required.\n * @flags: the type of memory to allocate (see kmalloc).\n */\nstatic inline void *kzalloc(size_t size, gfp_t flags)\n{\n return kmalloc(size, flags | __GFP_ZERO);\n}\n\n/**\n * kmalloc_array - allocate memory for an array.\n * @n: number of elements.\n * @size: element size.\n * @flags: the type of memory to allocate (see kmalloc).\n */\nstatic inline void *kmalloc_array(size_t n, size_t size, gfp_t flags)\n{\n size_t bytes;\n\n if (unlikely(check_mul_overflow(n, size, &bytes)))\n return NULL;\n if (__builtin_constant_p(n) && __builtin_constant_p(size))\n return kmalloc(bytes, flags);\n return __kmalloc(bytes, flags);\n}\n\n/**\n * kcalloc - allocate memory for an array. The memory is set to zero.\n * @n: number of elements.\n * @size: element size.\n * @flags: the type of memory to allocate (see kmalloc).\n */\nstatic inline void *kcalloc(size_t n, size_t size, gfp_t flags)\n{\n return kmalloc_array(n, size, flags | __GFP_ZERO);\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "__RTOCHIUS_SLAB_H_" (preproc_def) "#define __RTOCHIUS_SLAB_H_\n" (#define) "#define" (identifier) "__RTOCHIUS_SLAB_H_" (preproc_include) "#include <rtochius/gfp.h>\n" (#include) "#include" (system_lib_string) "<rtochius/gfp.h>" (preproc_include) "#include <rtochius/slab_def.h>\n" (#include) "#include" (system_lib_string) "<rtochius/slab_def.h>" (preproc_include) "#include <rtochius/memory.h>\n" (#include) "#include" (system_lib_string) "<rtochius/memory.h>" (preproc_def) "#define SLAB_RED_ZONE ((slab_flags_t)0x00000400U) /* DEBUG: Red zone objs in a cache */\n" (#define) "#define" (identifier) "SLAB_RED_ZONE" (preproc_arg) "((slab_flags_t)0x00000400U) " (comment) "/* DEBUG: Red zone objs in a cache */" (preproc_def) "#define SLAB_POISON ((slab_flags_t)0x00000800U) /* DEBUG: Poison objects */\n" (#define) "#define" (identifier) "SLAB_POISON" (preproc_arg) "((slab_flags_t)0x00000800U) " (comment) "/* DEBUG: Poison objects */" (preproc_def) "#define SLAB_HWCACHE_ALIGN ((slab_flags_t)0x00002000U) /* Align objs on cache lines */\n" (#define) "#define" (identifier) "SLAB_HWCACHE_ALIGN" (preproc_arg) "((slab_flags_t)0x00002000U) " (comment) "/* Align objs on cache lines */" (preproc_def) "#define SLAB_CACHE_DMA ((slab_flags_t)0x00004000U) /* Use GFP_DMA memory */\n" (#define) "#define" (identifier) "SLAB_CACHE_DMA" (preproc_arg) "((slab_flags_t)0x00004000U) " (comment) "/* Use GFP_DMA memory */" (preproc_def) "#define SLAB_STORE_USER ((slab_flags_t)0x00010000U) /* DEBUG: Store the last owner for bug hunting */\n" (#define) "#define" (identifier) "SLAB_STORE_USER" (preproc_arg) "((slab_flags_t)0x00010000U) " (comment) "/* DEBUG: Store the last owner for bug hunting */" (preproc_def) "#define SLAB_PANIC ((slab_flags_t)0x00040000U) /* Panic if kmem_cache_create() fails */\n" (#define) "#define" (identifier) "SLAB_PANIC" (preproc_arg) "((slab_flags_t)0x00040000U) " (comment) "/* Panic if kmem_cache_create() fails */" (comment) "/*\n * ZERO_SIZE_PTR will be returned for zero sized kmalloc requests.\n *\n * Dereferencing ZERO_SIZE_PTR will lead to a distinct access fault.\n *\n * ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can.\n * Both make kfree a no-op.\n */" (preproc_def) "#define ZERO_SIZE_PTR ((void *)16)\n" (#define) "#define" (identifier) "ZERO_SIZE_PTR" (preproc_arg) "((void *)16)" (preproc_function_def) "#define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \\n (unsigned long)ZERO_SIZE_PTR)\n" (#define) "#define" (identifier) "ZERO_OR_NULL_PTR" (preproc_params) "(x)" (() "(" (identifier) "x" ()) ")" (preproc_arg) "((unsigned long)(x) <= \\n (unsigned long)ZERO_SIZE_PTR)" (comment) "/*\n * Setting ARCH_SLAB_MINALIGN in arch headers allows a different alignment.\n * Intended for arches that get misalignment faults even for 64 bit integer\n * aligned buffers.\n */" (preproc_ifdef) "#ifndef ARCH_SLAB_MINALIGN\n#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)\n#endif" (#ifndef) "#ifndef" (identifier) "ARCH_SLAB_MINALIGN" (preproc_def) "#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)\n" (#define) "#define" (identifier) "ARCH_SLAB_MINALIGN" (preproc_arg) "__alignof__(unsigned long long)" (#endif) "#endif" (declaration) "void kmem_cache_init(void);" (primitive_type) "void" (function_declarator) "kmem_cache_init(void)" (identifier) "kmem_cache_init" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "int slab_is_available(void);" (primitive_type) "int" (function_declarator) "slab_is_available(void)" (identifier) "slab_is_available" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (;) ";" (declaration) "struct kmem_cache *kmem_cache_create(const char *name, size_t size,\n size_t align, unsigned long flags,\n void (*ctor)(struct kmem_cache *, void *));" (struct_specifier) "struct kmem_cache" (struct) "struct" (type_identifier) "kmem_cache" (pointer_declarator) "*kmem_cache_create(const char *name, size_t size,\n size_t align, unsigned long flags,\n void (*ctor)(struct kmem_cache *, void *))" (*) "*" (function_declarator) "kmem_cache_create(const char *name, size_t size,\n size_t align, unsigned long flags,\n void (*ctor)(struct kmem_cache *, void *))" (identifier) "kmem_cache_create" (parameter_list) "(const char *name, size_t size,\n size_t align, unsigned long flags,\n void (*ctor)(struct kmem_cache *, void *))" (() "(" (parameter_declaration) "const char *name" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*name" (*) "*" (identifier) "name" (,) "," (parameter_declaration) "size_t size" (primitive_type) "size_t" (identifier) "size" (,) "," (parameter_declaration) "size_t align" (primitive_type) "size_t" (identifier) "align" (,) "," (parameter_declaration) "unsigned long flags" (sized_type_specifier) "unsigned long" (unsigned) "unsigned" (long) "long" (identifier) "flags" (,) "," (parameter_declaration) "void (*ctor)(struct kmem_cache *, void *)" (primitive_type) "void" (function_declarator) "(*ctor)(struct kmem_cache *, void *)" (parenthesized_declarator) "(*ctor)" (() "(" (pointer_declarator) "*ctor" (*) "*" (identifier) "ctor" ()) ")" (parameter_list) "(struct kmem_cache *, void *)" (() "(" (parameter_declaration) "struct kmem_cache *" (struct_specifier) "struct kmem_cache" (struct) "struct" (type_identifier) "kmem_cache" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" ()) ")" (;) ";" (declaration) "void kmem_cache_destroy(struct kmem_cache *s);" (primitive_type) "void" (function_declarator) "kmem_cache_destroy(struct kmem_cache *s)" (identifier) "kmem_cache_destroy" (parameter_list) "(struct kmem_cache *s)" (() "(" (parameter_declaration) "struct kmem_cache *s" (struct_specifier) "struct kmem_cache" (struct) "struct" (type_identifier) "kmem_cache" (pointer_declarator) "*s" (*) "*" (identifier) "s" ()) ")" (;) ";" (declaration) "void *kmem_cache_alloc(struct kmem_cache *, gfp_t);" (primitive_type) "void" (pointer_declarator) "*kmem_cache_alloc(struct kmem_cache *, gfp_t)" (*) "*" (function_declarator) "kmem_cache_alloc(struct kmem_cache *, gfp_t)" (identifier) "kmem_cache_alloc" (parameter_list) "(struct kmem_cache *, gfp_t)" (() "(" (parameter_declaration) "struct kmem_cache *" (struct_specifier) "struct kmem_cache" (struct) "struct" (type_identifier) "kmem_cache" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "gfp_t" (type_identifier) "gfp_t" ()) ")" (;) ";" (declaration) "void kmem_cache_free(struct kmem_cache *, void *);" (primitive_type) "void" (function_declarator) "kmem_cache_free(struct kmem_cache *, void *)" (identifier) "kmem_cache_free" (parameter_list) "(struct kmem_cache *, void *)" (() "(" (parameter_declaration) "struct kmem_cache *" (struct_specifier) "struct kmem_cache" (struct) "struct" (type_identifier) "kmem_cache" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (declaration) "unsigned int kmem_cache_size(struct kmem_cache *);" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (function_declarator) "kmem_cache_size(struct kmem_cache *)" (identifier) "kmem_cache_size" (parameter_list) "(struct kmem_cache *)" (() "(" (parameter_declaration) "struct kmem_cache *" (struct_specifier) "struct kmem_cache" (struct) "struct" (type_identifier) "kmem_cache" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (declaration) "const char *kmem_cache_name(struct kmem_cache *);" (type_qualifier) "const" (const) "const" (primitive_type) "char" (pointer_declarator) "*kmem_cache_name(struct kmem_cache *)" (*) "*" (function_declarator) "kmem_cache_name(struct kmem_cache *)" (identifier) "kmem_cache_name" (parameter_list) "(struct kmem_cache *)" (() "(" (parameter_declaration) "struct kmem_cache *" (struct_specifier) "struct kmem_cache" (struct) "struct" (type_identifier) "kmem_cache" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (declaration) "int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);" (primitive_type) "int" (function_declarator) "kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr)" (identifier) "kmem_ptr_validate" (parameter_list) "(struct kmem_cache *cachep, const void *ptr)" (() "(" (parameter_declaration) "struct kmem_cache *cachep" (struct_specifier) "struct kmem_cache" (struct) "struct" (type_identifier) "kmem_cache" (pointer_declarator) "*cachep" (*) "*" (identifier) "cachep" (,) "," (parameter_declaration) "const void *ptr" (type_qualifier) "const" (const) "const" (primitive_type) "void" (pointer_declarator) "*ptr" (*) "*" (identifier) "ptr" ()) ")" (;) ";" (declaration) "void kfree(const void *);" (primitive_type) "void" (function_declarator) "kfree(const void *)" (identifier) "kfree" (parameter_list) "(const void *)" (() "(" (parameter_declaration) "const void *" (type_qualifier) "const" (const) "const" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (declaration) "size_t ksize(const void *);" (primitive_type) "size_t" (function_declarator) "ksize(const void *)" (identifier) "ksize" (parameter_list) "(const void *)" (() "(" (parameter_declaration) "const void *" (type_qualifier) "const" (const) "const" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (;) ";" (declaration) "void *__kmalloc(size_t size, gfp_t flags);" (primitive_type) "void" (pointer_declarator) "*__kmalloc(size_t size, gfp_t flags)" (*) "*" (function_declarator) "__kmalloc(size_t size, gfp_t flags)" (identifier) "__kmalloc" (parameter_list) "(size_t size, gfp_t flags)" (() "(" (parameter_declaration) "size_t size" (primitive_type) "size_t" (identifier) "size" (,) "," (parameter_declaration) "gfp_t flags" (type_identifier) "gfp_t" (identifier) "flags" ()) ")" (;) ";" (function_definition) "static __always_inline void *kmalloc(size_t size, gfp_t flags)\n{\n if (__builtin_constant_p(size)) {\n if (size > PAGE_SIZE / 2)\n return (void *)__get_free_pages(flags,\n get_order(size));\n\n if (!(flags & GFP_DMA)) {\n struct kmem_cache *s = kmalloc_slab(size);\n\n if (!s)\n return ZERO_SIZE_PTR;\n\n return kmem_cache_alloc(s, flags);\n }\n }\n return __kmalloc(size, flags);\n}" (storage_class_specifier) "static" (static) "static" (type_identifier) "__always_inline" (ERROR) "void" (identifier) "void" (pointer_declarator) "*kmalloc(size_t size, gfp_t flags)" (*) "*" (function_declarator) "kmalloc(size_t size, gfp_t flags)" (identifier) "kmalloc" (parameter_list) "(size_t size, gfp_t flags)" (() "(" (parameter_declaration) "size_t size" (primitive_type) "size_t" (identifier) "size" (,) "," (parameter_declaration) "gfp_t flags" (type_identifier) "gfp_t" (identifier) "flags" ()) ")" (compound_statement) "{\n if (__builtin_constant_p(size)) {\n if (size > PAGE_SIZE / 2)\n return (void *)__get_free_pages(flags,\n get_order(size));\n\n if (!(flags & GFP_DMA)) {\n struct kmem_cache *s = kmalloc_slab(size);\n\n if (!s)\n return ZERO_SIZE_PTR;\n\n return kmem_cache_alloc(s, flags);\n }\n }\n return __kmalloc(size, flags);\n}" ({) "{" (if_statement) "if (__builtin_constant_p(size)) {\n if (size > PAGE_SIZE / 2)\n return (void *)__get_free_pages(flags,\n get_order(size));\n\n if (!(flags & GFP_DMA)) {\n struct kmem_cache *s = kmalloc_slab(size);\n\n if (!s)\n return ZERO_SIZE_PTR;\n\n return kmem_cache_alloc(s, flags);\n }\n }" (if) "if" (parenthesized_expression) "(__builtin_constant_p(size))" (() "(" (call_expression) "__builtin_constant_p(size)" (identifier) "__builtin_constant_p" (argument_list) "(size)" (() "(" (identifier) "size" ()) ")" ()) ")" (compound_statement) "{\n if (size > PAGE_SIZE / 2)\n return (void *)__get_free_pages(flags,\n get_order(size));\n\n if (!(flags & GFP_DMA)) {\n struct kmem_cache *s = kmalloc_slab(size);\n\n if (!s)\n return ZERO_SIZE_PTR;\n\n return kmem_cache_alloc(s, flags);\n }\n }" ({) "{" (if_statement) "if (size > PAGE_SIZE / 2)\n return (void *)__get_free_pages(flags,\n get_order(size));" (if) "if" (parenthesized_expression) "(size > PAGE_SIZE / 2)" (() "(" (binary_expression) "size > PAGE_SIZE / 2" (identifier) "size" (>) ">" (binary_expression) "PAGE_SIZE / 2" (identifier) "PAGE_SIZE" (/) "/" (number_literal) "2" ()) ")" (return_statement) "return (void *)__get_free_pages(flags,\n get_order(size));" (return) "return" (cast_expression) "(void *)__get_free_pages(flags,\n get_order(size))" (() "(" (type_descriptor) "void *" (primitive_type) "void" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "__get_free_pages(flags,\n get_order(size))" (identifier) "__get_free_pages" (argument_list) "(flags,\n get_order(size))" (() "(" (identifier) "flags" (,) "," (call_expression) "get_order(size)" (identifier) "get_order" (argument_list) "(size)" (() "(" (identifier) "size" ()) ")" ()) ")" (;) ";" (if_statement) "if (!(flags & GFP_DMA)) {\n struct kmem_cache *s = kmalloc_slab(size);\n\n if (!s)\n return ZERO_SIZE_PTR;\n\n return kmem_cache_alloc(s, flags);\n }" (if) "if" (parenthesized_expression) "(!(flags & GFP_DMA))" (() "(" (unary_expression) "!(flags & GFP_DMA)" (!) "!" (parenthesized_expression) "(flags & GFP_DMA)" (() "(" (binary_expression) "flags & GFP_DMA" (identifier) "flags" (&) "&" (identifier) "GFP_DMA" ()) ")" ()) ")" (compound_statement) "{\n struct kmem_cache *s = kmalloc_slab(size);\n\n if (!s)\n return ZERO_SIZE_PTR;\n\n return kmem_cache_alloc(s, flags);\n }" ({) "{" (declaration) "struct kmem_cache *s = kmalloc_slab(size);" (struct_specifier) "struct kmem_cache" (struct) "struct" (type_identifier) "kmem_cache" (init_declarator) "*s = kmalloc_slab(size)" (pointer_declarator) "*s" (*) "*" (identifier) "s" (=) "=" (call_expression) "kmalloc_slab(size)" (identifier) "kmalloc_slab" (argument_list) "(size)" (() "(" (identifier) "size" ()) ")" (;) ";" (if_statement) "if (!s)\n return ZERO_SIZE_PTR;" (if) "if" (parenthesized_expression) "(!s)" (() "(" (unary_expression) "!s" (!) "!" (identifier) "s" ()) ")" (return_statement) "return ZERO_SIZE_PTR;" (return) "return" (identifier) "ZERO_SIZE_PTR" (;) ";" (return_statement) "return kmem_cache_alloc(s, flags);" (return) "return" (call_expression) "kmem_cache_alloc(s, flags)" (identifier) "kmem_cache_alloc" (argument_list) "(s, flags)" (() "(" (identifier) "s" (,) "," (identifier) "flags" ()) ")" (;) ";" (}) "}" (}) "}" (return_statement) "return __kmalloc(size, flags);" (return) "return" (call_expression) "__kmalloc(size, flags)" (identifier) "__kmalloc" (argument_list) "(size, flags)" (() "(" (identifier) "size" (,) "," (identifier) "flags" ()) ")" (;) ";" (}) "}" (comment) "/*\n * Shortcuts\n */" (function_definition) "static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)\n{\n return kmem_cache_alloc(k, flags | __GFP_ZERO);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (pointer_declarator) "*kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)" (*) "*" (function_declarator) "kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)" (identifier) "kmem_cache_zalloc" (parameter_list) "(struct kmem_cache *k, gfp_t flags)" (() "(" (parameter_declaration) "struct kmem_cache *k" (struct_specifier) "struct kmem_cache" (struct) "struct" (type_identifier) "kmem_cache" (pointer_declarator) "*k" (*) "*" (identifier) "k" (,) "," (parameter_declaration) "gfp_t flags" (type_identifier) "gfp_t" (identifier) "flags" ()) ")" (compound_statement) "{\n return kmem_cache_alloc(k, flags | __GFP_ZERO);\n}" ({) "{" (return_statement) "return kmem_cache_alloc(k, flags | __GFP_ZERO);" (return) "return" (call_expression) "kmem_cache_alloc(k, flags | __GFP_ZERO)" (identifier) "kmem_cache_alloc" (argument_list) "(k, flags | __GFP_ZERO)" (() "(" (identifier) "k" (,) "," (binary_expression) "flags | __GFP_ZERO" (identifier) "flags" (|) "|" (identifier) "__GFP_ZERO" ()) ")" (;) ";" (}) "}" (comment) "/**\n * kzalloc - allocate memory. The memory is set to zero.\n * @size: how many bytes of memory are required.\n * @flags: the type of memory to allocate (see kmalloc).\n */" (function_definition) "static inline void *kzalloc(size_t size, gfp_t flags)\n{\n return kmalloc(size, flags | __GFP_ZERO);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (pointer_declarator) "*kzalloc(size_t size, gfp_t flags)" (*) "*" (function_declarator) "kzalloc(size_t size, gfp_t flags)" (identifier) "kzalloc" (parameter_list) "(size_t size, gfp_t flags)" (() "(" (parameter_declaration) "size_t size" (primitive_type) "size_t" (identifier) "size" (,) "," (parameter_declaration) "gfp_t flags" (type_identifier) "gfp_t" (identifier) "flags" ()) ")" (compound_statement) "{\n return kmalloc(size, flags | __GFP_ZERO);\n}" ({) "{" (return_statement) "return kmalloc(size, flags | __GFP_ZERO);" (return) "return" (call_expression) "kmalloc(size, flags | __GFP_ZERO)" (identifier) "kmalloc" (argument_list) "(size, flags | __GFP_ZERO)" (() "(" (identifier) "size" (,) "," (binary_expression) "flags | __GFP_ZERO" (identifier) "flags" (|) "|" (identifier) "__GFP_ZERO" ()) ")" (;) ";" (}) "}" (comment) "/**\n * kmalloc_array - allocate memory for an array.\n * @n: number of elements.\n * @size: element size.\n * @flags: the type of memory to allocate (see kmalloc).\n */" (function_definition) "static inline void *kmalloc_array(size_t n, size_t size, gfp_t flags)\n{\n size_t bytes;\n\n if (unlikely(check_mul_overflow(n, size, &bytes)))\n return NULL;\n if (__builtin_constant_p(n) && __builtin_constant_p(size))\n return kmalloc(bytes, flags);\n return __kmalloc(bytes, flags);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (pointer_declarator) "*kmalloc_array(size_t n, size_t size, gfp_t flags)" (*) "*" (function_declarator) "kmalloc_array(size_t n, size_t size, gfp_t flags)" (identifier) "kmalloc_array" (parameter_list) "(size_t n, size_t size, gfp_t flags)" (() "(" (parameter_declaration) "size_t n" (primitive_type) "size_t" (identifier) "n" (,) "," (parameter_declaration) "size_t size" (primitive_type) "size_t" (identifier) "size" (,) "," (parameter_declaration) "gfp_t flags" (type_identifier) "gfp_t" (identifier) "flags" ()) ")" (compound_statement) "{\n size_t bytes;\n\n if (unlikely(check_mul_overflow(n, size, &bytes)))\n return NULL;\n if (__builtin_constant_p(n) && __builtin_constant_p(size))\n return kmalloc(bytes, flags);\n return __kmalloc(bytes, flags);\n}" ({) "{" (declaration) "size_t bytes;" (primitive_type) "size_t" (identifier) "bytes" (;) ";" (if_statement) "if (unlikely(check_mul_overflow(n, size, &bytes)))\n return NULL;" (if) "if" (parenthesized_expression) "(unlikely(check_mul_overflow(n, size, &bytes)))" (() "(" (call_expression) "unlikely(check_mul_overflow(n, size, &bytes))" (identifier) "unlikely" (argument_list) "(check_mul_overflow(n, size, &bytes))" (() "(" (call_expression) "check_mul_overflow(n, size, &bytes)" (identifier) "check_mul_overflow" (argument_list) "(n, size, &bytes)" (() "(" (identifier) "n" (,) "," (identifier) "size" (,) "," (pointer_expression) "&bytes" (&) "&" (identifier) "bytes" ()) ")" ()) ")" ()) ")" (return_statement) "return NULL;" (return) "return" (null) "NULL" (NULL) "NULL" (;) ";" (if_statement) "if (__builtin_constant_p(n) && __builtin_constant_p(size))\n return kmalloc(bytes, flags);" (if) "if" (parenthesized_expression) "(__builtin_constant_p(n) && __builtin_constant_p(size))" (() "(" (binary_expression) "__builtin_constant_p(n) && __builtin_constant_p(size)" (call_expression) "__builtin_constant_p(n)" (identifier) "__builtin_constant_p" (argument_list) "(n)" (() "(" (identifier) "n" ()) ")" (&&) "&&" (call_expression) "__builtin_constant_p(size)" (identifier) "__builtin_constant_p" (argument_list) "(size)" (() "(" (identifier) "size" ()) ")" ()) ")" (return_statement) "return kmalloc(bytes, flags);" (return) "return" (call_expression) "kmalloc(bytes, flags)" (identifier) "kmalloc" (argument_list) "(bytes, flags)" (() "(" (identifier) "bytes" (,) "," (identifier) "flags" ()) ")" (;) ";" (return_statement) "return __kmalloc(bytes, flags);" (return) "return" (call_expression) "__kmalloc(bytes, flags)" (identifier) "__kmalloc" (argument_list) "(bytes, flags)" (() "(" (identifier) "bytes" (,) "," (identifier) "flags" ()) ")" (;) ";" (}) "}" (comment) "/**\n * kcalloc - allocate memory for an array. The memory is set to zero.\n * @n: number of elements.\n * @size: element size.\n * @flags: the type of memory to allocate (see kmalloc).\n */" (function_definition) "static inline void *kcalloc(size_t n, size_t size, gfp_t flags)\n{\n return kmalloc_array(n, size, flags | __GFP_ZERO);\n}" (storage_class_specifier) "static" (static) "static" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "void" (pointer_declarator) "*kcalloc(size_t n, size_t size, gfp_t flags)" (*) "*" (function_declarator) "kcalloc(size_t n, size_t size, gfp_t flags)" (identifier) "kcalloc" (parameter_list) "(size_t n, size_t size, gfp_t flags)" (() "(" (parameter_declaration) "size_t n" (primitive_type) "size_t" (identifier) "n" (,) "," (parameter_declaration) "size_t size" (primitive_type) "size_t" (identifier) "size" (,) "," (parameter_declaration) "gfp_t flags" (type_identifier) "gfp_t" (identifier) "flags" ()) ")" (compound_statement) "{\n return kmalloc_array(n, size, flags | __GFP_ZERO);\n}" ({) "{" (return_statement) "return kmalloc_array(n, size, flags | __GFP_ZERO);" (return) "return" (call_expression) "kmalloc_array(n, size, flags | __GFP_ZERO)" (identifier) "kmalloc_array" (argument_list) "(n, size, flags | __GFP_ZERO)" (() "(" (identifier) "n" (,) "," (identifier) "size" (,) "," (binary_expression) "flags | __GFP_ZERO" (identifier) "flags" (|) "|" (identifier) "__GFP_ZERO" ()) ")" (;) ";" (}) "}" (#endif) "#endif" (comment) "/* !__RTOCHIUS_SLAB_H_ */"
667
1
{"language": "c", "success": true, "metadata": {"lines": 111, "avg_line_length": 33.48, "nodes": 452, "errors": 0, "source_hash": "293b047221e3088655631a78ecaee787dac2b8608d90aaae06f4c19127b960b6", "categorized_nodes": 284}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __RTOCHIUS_SLAB_H_\n#define\t__RTOCHIUS_SLAB_H_\n\n#include <rtochius/gfp.h>\n#include <rtochius/slab_def.h>\n#include <rtochius/memory.h>\n\n#define SLAB_RED_ZONE\t\t((slab_flags_t)0x00000400U)\t/* DEBUG: Red zone objs in a cache */\n#define SLAB_POISON\t\t\t((slab_flags_t)0x00000800U)\t/* DEBUG: Poison objects */\n#define SLAB_HWCACHE_ALIGN\t((slab_flags_t)0x00002000U)\t/* Align objs on cache lines */\n#define SLAB_CACHE_DMA\t\t((slab_flags_t)0x00004000U)\t/* Use GFP_DMA memory */\n#define SLAB_STORE_USER\t\t((slab_flags_t)0x00010000U)\t/* DEBUG: Store the last owner for bug hunting */\n#define SLAB_PANIC\t\t\t((slab_flags_t)0x00040000U)\t/* Panic if kmem_cache_create() fails */\n\n/*\n * ZERO_SIZE_PTR will be returned for zero sized kmalloc requests.\n *\n * Dereferencing ZERO_SIZE_PTR will lead to a distinct access fault.\n *\n * ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can.\n * Both make kfree a no-op.\n */\n#define ZERO_SIZE_PTR ((void *)16)\n\n#define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \\\n\t\t\t\t(unsigned long)ZERO_SIZE_PTR)\n\n/*\n * Setting ARCH_SLAB_MINALIGN in arch headers allows a different alignment.\n * Intended for arches that get misalignment faults even for 64 bit integer\n * aligned buffers.\n */\n#ifndef ARCH_SLAB_MINALIGN\n#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)\n#endif\n\nvoid kmem_cache_init(void);\nint slab_is_available(void);\n\nstruct kmem_cache *kmem_cache_create(const char *name, size_t size,\n\t\tsize_t align, unsigned long flags,\n\t\tvoid (*ctor)(struct kmem_cache *, void *));\nvoid kmem_cache_destroy(struct kmem_cache *s);\nvoid *kmem_cache_alloc(struct kmem_cache *, gfp_t);\nvoid kmem_cache_free(struct kmem_cache *, void *);\n\nunsigned int kmem_cache_size(struct kmem_cache *);\nconst char *kmem_cache_name(struct kmem_cache *);\nint kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);\n\nvoid kfree(const void *);\nsize_t ksize(const void *);\n\nvoid *__kmalloc(size_t size, gfp_t flags);\n\nstatic __always_inline void *kmalloc(size_t size, gfp_t flags)\n{\n\tif (__builtin_constant_p(size)) {\n\t\tif (size > PAGE_SIZE / 2)\n\t\t\treturn (void *)__get_free_pages(flags,\n\t\t\t\t\t\t\tget_order(size));\n\n\t\tif (!(flags & GFP_DMA)) {\n\t\t\tstruct kmem_cache *s = kmalloc_slab(size);\n\n\t\t\tif (!s)\n\t\t\t\treturn ZERO_SIZE_PTR;\n\n\t\t\treturn kmem_cache_alloc(s, flags);\n\t\t}\n\t}\n\treturn __kmalloc(size, flags);\n}\n\n/*\n * Shortcuts\n */\nstatic inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)\n{\n\treturn kmem_cache_alloc(k, flags | __GFP_ZERO);\n}\n\n/**\n * kzalloc - allocate memory. The memory is set to zero.\n * @size: how many bytes of memory are required.\n * @flags: the type of memory to allocate (see kmalloc).\n */\nstatic inline void *kzalloc(size_t size, gfp_t flags)\n{\n\treturn kmalloc(size, flags | __GFP_ZERO);\n}\n\n/**\n * kmalloc_array - allocate memory for an array.\n * @n: number of elements.\n * @size: element size.\n * @flags: the type of memory to allocate (see kmalloc).\n */\nstatic inline void *kmalloc_array(size_t n, size_t size, gfp_t flags)\n{\n\tsize_t bytes;\n\n\tif (unlikely(check_mul_overflow(n, size, &bytes)))\n\t\treturn NULL;\n\tif (__builtin_constant_p(n) && __builtin_constant_p(size))\n\t\treturn kmalloc(bytes, flags);\n\treturn __kmalloc(bytes, flags);\n}\n\n/**\n * kcalloc - allocate memory for an array. The memory is set to zero.\n * @n: number of elements.\n * @size: element size.\n * @flags: the type of memory to allocate (see kmalloc).\n */\nstatic inline void *kcalloc(size_t n, size_t size, gfp_t flags)\n{\n\treturn kmalloc_array(n, size, flags | __GFP_ZERO);\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 19, 23, 27, 31, 35, 39, 43, 49, 57, 64, 71, 114, 126, 141, 156, 169, 182, 199, 208, 217, 230, 314, 341, 364, 424, 451], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 131, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 2, "type": "identifier", "text": "__RTOCHIUS_SLAB_H_", "parent": 0, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 26}}, {"id": 3, "type": "preproc_def", "text": "#define\t__RTOCHIUS_SLAB_H_\n", "parent": 0, "children": [4, 5], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 5, "type": "identifier", "text": "__RTOCHIUS_SLAB_H_", "parent": 3, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 26}}, {"id": 6, "type": "preproc_include", "text": "#include <rtochius/gfp.h>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<rtochius/gfp.h>", "parent": 6, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 25}}, {"id": 9, "type": "preproc_include", "text": "#include <rtochius/slab_def.h>\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": "system_lib_string", "text": "<rtochius/slab_def.h>", "parent": 9, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 30}}, {"id": 12, "type": "preproc_include", "text": "#include <rtochius/memory.h>\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": "system_lib_string", "text": "<rtochius/memory.h>", "parent": 12, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 28}}, {"id": 15, "type": "preproc_def", "text": "#define SLAB_RED_ZONE\t\t((slab_flags_t)0x00000400U)\t/* DEBUG: Red zone objs in a cache */\n", "parent": 0, "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": "SLAB_RED_ZONE", "parent": 15, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 21}}, {"id": 18, "type": "preproc_arg", "text": "((slab_flags_t)0x00000400U)\t", "parent": 15, "children": [], "start_point": {"row": 18, "column": 23}, "end_point": {"row": 18, "column": 51}}, {"id": 19, "type": "preproc_def", "text": "#define SLAB_POISON\t\t\t((slab_flags_t)0x00000800U)\t/* DEBUG: Poison objects */\n", "parent": 0, "children": [20, 21, 22], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 20, "type": "#define", "text": "#define", "parent": 19, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 21, "type": "identifier", "text": "SLAB_POISON", "parent": 19, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 19}}, {"id": 22, "type": "preproc_arg", "text": "((slab_flags_t)0x00000800U)\t", "parent": 19, "children": [], "start_point": {"row": 19, "column": 22}, "end_point": {"row": 19, "column": 50}}, {"id": 23, "type": "preproc_def", "text": "#define SLAB_HWCACHE_ALIGN\t((slab_flags_t)0x00002000U)\t/* Align objs on cache lines */\n", "parent": 0, "children": [24, 25, 26], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 24, "type": "#define", "text": "#define", "parent": 23, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 25, "type": "identifier", "text": "SLAB_HWCACHE_ALIGN", "parent": 23, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 26}}, {"id": 26, "type": "preproc_arg", "text": "((slab_flags_t)0x00002000U)\t", "parent": 23, "children": [], "start_point": {"row": 20, "column": 27}, "end_point": {"row": 20, "column": 55}}, {"id": 27, "type": "preproc_def", "text": "#define SLAB_CACHE_DMA\t\t((slab_flags_t)0x00004000U)\t/* Use GFP_DMA memory */\n", "parent": 0, "children": [28, 29, 30], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 28, "type": "#define", "text": "#define", "parent": 27, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 29, "type": "identifier", "text": "SLAB_CACHE_DMA", "parent": 27, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 22}}, {"id": 30, "type": "preproc_arg", "text": "((slab_flags_t)0x00004000U)\t", "parent": 27, "children": [], "start_point": {"row": 21, "column": 24}, "end_point": {"row": 21, "column": 52}}, {"id": 31, "type": "preproc_def", "text": "#define SLAB_STORE_USER\t\t((slab_flags_t)0x00010000U)\t/* DEBUG: Store the last owner for bug hunting */\n", "parent": 0, "children": [32, 33, 34], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 32, "type": "#define", "text": "#define", "parent": 31, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 33, "type": "identifier", "text": "SLAB_STORE_USER", "parent": 31, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 23}}, {"id": 34, "type": "preproc_arg", "text": "((slab_flags_t)0x00010000U)\t", "parent": 31, "children": [], "start_point": {"row": 22, "column": 25}, "end_point": {"row": 22, "column": 53}}, {"id": 35, "type": "preproc_def", "text": "#define SLAB_PANIC\t\t\t((slab_flags_t)0x00040000U)\t/* Panic if kmem_cache_create() fails */\n", "parent": 0, "children": [36, 37, 38], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 36, "type": "#define", "text": "#define", "parent": 35, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 37, "type": "identifier", "text": "SLAB_PANIC", "parent": 35, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 18}}, {"id": 38, "type": "preproc_arg", "text": "((slab_flags_t)0x00040000U)\t", "parent": 35, "children": [], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 49}}, {"id": 39, "type": "preproc_def", "text": "#define ZERO_SIZE_PTR ((void *)16)\n", "parent": 0, "children": [40, 41, 42], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 40, "type": "#define", "text": "#define", "parent": 39, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 41, "type": "identifier", "text": "ZERO_SIZE_PTR", "parent": 39, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 21}}, {"id": 42, "type": "preproc_arg", "text": "((void *)16)", "parent": 39, "children": [], "start_point": {"row": 33, "column": 22}, "end_point": {"row": 33, "column": 34}}, {"id": 43, "type": "preproc_function_def", "text": "#define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \\\n\t\t\t\t(unsigned long)ZERO_SIZE_PTR)\n", "parent": 0, "children": [44, 45, 46, 48], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 44, "type": "#define", "text": "#define", "parent": 43, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 7}}, {"id": 45, "type": "identifier", "text": "ZERO_OR_NULL_PTR", "parent": 43, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 24}}, {"id": 46, "type": "preproc_params", "text": "(x)", "parent": 43, "children": [47], "start_point": {"row": 35, "column": 24}, "end_point": {"row": 35, "column": 27}}, {"id": 47, "type": "identifier", "text": "x", "parent": 46, "children": [], "start_point": {"row": 35, "column": 25}, "end_point": {"row": 35, "column": 26}}, {"id": 48, "type": "preproc_arg", "text": "((unsigned long)(x) <= \\\n\t\t\t\t(unsigned long)ZERO_SIZE_PTR)", "parent": 43, "children": [], "start_point": {"row": 35, "column": 28}, "end_point": {"row": 36, "column": 33}}, {"id": 49, "type": "preproc_ifdef", "text": "#ifndef ARCH_SLAB_MINALIGN\n#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)\n#endif", "parent": 0, "children": [50, 51, 52, 56], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 45, "column": 6}}, {"id": 50, "type": "#ifndef", "text": "#ifndef", "parent": 49, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 7}}, {"id": 51, "type": "identifier", "text": "ARCH_SLAB_MINALIGN", "parent": 49, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 26}}, {"id": 52, "type": "preproc_def", "text": "#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)\n", "parent": 49, "children": [53, 54, 55], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 45, "column": 0}}, {"id": 53, "type": "#define", "text": "#define", "parent": 52, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 54, "type": "identifier", "text": "ARCH_SLAB_MINALIGN", "parent": 52, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 26}}, {"id": 55, "type": "preproc_arg", "text": "__alignof__(unsigned long long)", "parent": 52, "children": [], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 58}}, {"id": 56, "type": "#endif", "text": "#endif", "parent": 49, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 6}}, {"id": 57, "type": "declaration", "text": "void kmem_cache_init(void);", "parent": 0, "children": [58, 59], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 27}}, {"id": 58, "type": "primitive_type", "text": "void", "parent": 57, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 4}}, {"id": 59, "type": "function_declarator", "text": "kmem_cache_init(void)", "parent": 57, "children": [60, 61], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 26}}, {"id": 60, "type": "identifier", "text": "kmem_cache_init", "parent": 59, "children": [], "start_point": {"row": 47, "column": 5}, "end_point": {"row": 47, "column": 20}}, {"id": 61, "type": "parameter_list", "text": "(void)", "parent": 59, "children": [62], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 26}}, {"id": 62, "type": "parameter_declaration", "text": "void", "parent": 61, "children": [63], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 25}}, {"id": 63, "type": "primitive_type", "text": "void", "parent": 62, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 25}}, {"id": 64, "type": "declaration", "text": "int slab_is_available(void);", "parent": 0, "children": [65, 66], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 28}}, {"id": 65, "type": "primitive_type", "text": "int", "parent": 64, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 3}}, {"id": 66, "type": "function_declarator", "text": "slab_is_available(void)", "parent": 64, "children": [67, 68], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 27}}, {"id": 67, "type": "identifier", "text": "slab_is_available", "parent": 66, "children": [], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 21}}, {"id": 68, "type": "parameter_list", "text": "(void)", "parent": 66, "children": [69], "start_point": {"row": 48, "column": 21}, "end_point": {"row": 48, "column": 27}}, {"id": 69, "type": "parameter_declaration", "text": "void", "parent": 68, "children": [70], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 26}}, {"id": 70, "type": "primitive_type", "text": "void", "parent": 69, "children": [], "start_point": {"row": 48, "column": 22}, "end_point": {"row": 48, "column": 26}}, {"id": 71, "type": "declaration", "text": "struct kmem_cache *kmem_cache_create(const char *name, size_t size,\n\t\tsize_t align, unsigned long flags,\n\t\tvoid (*ctor)(struct kmem_cache *, void *));", "parent": 0, "children": [72, 75], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 52, "column": 45}}, {"id": 72, "type": "struct_specifier", "text": "struct kmem_cache", "parent": 71, "children": [73, 74], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 17}}, {"id": 73, "type": "struct", "text": "struct", "parent": 72, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 6}}, {"id": 74, "type": "type_identifier", "text": "kmem_cache", "parent": 72, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 17}}, {"id": 75, "type": "pointer_declarator", "text": "*kmem_cache_create(const char *name, size_t size,\n\t\tsize_t align, unsigned long flags,\n\t\tvoid (*ctor)(struct kmem_cache *, void *))", "parent": 71, "children": [76, 77], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 52, "column": 44}}, {"id": 76, "type": "*", "text": "*", "parent": 75, "children": [], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 19}}, {"id": 77, "type": "function_declarator", "text": "kmem_cache_create(const char *name, size_t size,\n\t\tsize_t align, unsigned long flags,\n\t\tvoid (*ctor)(struct kmem_cache *, void *))", "parent": 75, "children": [78, 79], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 52, "column": 44}}, {"id": 78, "type": "identifier", "text": "kmem_cache_create", "parent": 77, "children": [], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 36}}, {"id": 79, "type": "parameter_list", "text": "(const char *name, size_t size,\n\t\tsize_t align, unsigned long flags,\n\t\tvoid (*ctor)(struct kmem_cache *, void *))", "parent": 77, "children": [80, 85, 88, 91, 96], "start_point": {"row": 50, "column": 36}, "end_point": {"row": 52, "column": 44}}, {"id": 80, "type": "parameter_declaration", "text": "const char *name", "parent": 79, "children": [81, 82], "start_point": {"row": 50, "column": 37}, "end_point": {"row": 50, "column": 53}}, {"id": 81, "type": "primitive_type", "text": "char", "parent": 80, "children": [], "start_point": {"row": 50, "column": 43}, "end_point": {"row": 50, "column": 47}}, {"id": 82, "type": "pointer_declarator", "text": "*name", "parent": 80, "children": [83, 84], "start_point": {"row": 50, "column": 48}, "end_point": {"row": 50, "column": 53}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 50, "column": 48}, "end_point": {"row": 50, "column": 49}}, {"id": 84, "type": "identifier", "text": "name", "parent": 82, "children": [], "start_point": {"row": 50, "column": 49}, "end_point": {"row": 50, "column": 53}}, {"id": 85, "type": "parameter_declaration", "text": "size_t size", "parent": 79, "children": [86, 87], "start_point": {"row": 50, "column": 55}, "end_point": {"row": 50, "column": 66}}, {"id": 86, "type": "primitive_type", "text": "size_t", "parent": 85, "children": [], "start_point": {"row": 50, "column": 55}, "end_point": {"row": 50, "column": 61}}, {"id": 87, "type": "identifier", "text": "size", "parent": 85, "children": [], "start_point": {"row": 50, "column": 62}, "end_point": {"row": 50, "column": 66}}, {"id": 88, "type": "parameter_declaration", "text": "size_t align", "parent": 79, "children": [89, 90], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 14}}, {"id": 89, "type": "primitive_type", "text": "size_t", "parent": 88, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 8}}, {"id": 90, "type": "identifier", "text": "align", "parent": 88, "children": [], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 14}}, {"id": 91, "type": "parameter_declaration", "text": "unsigned long flags", "parent": 79, "children": [92, 95], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 35}}, {"id": 92, "type": "sized_type_specifier", "text": "unsigned long", "parent": 91, "children": [93, 94], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 29}}, {"id": 93, "type": "unsigned", "text": "unsigned", "parent": 92, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 24}}, {"id": 94, "type": "long", "text": "long", "parent": 92, "children": [], "start_point": {"row": 51, "column": 25}, "end_point": {"row": 51, "column": 29}}, {"id": 95, "type": "identifier", "text": "flags", "parent": 91, "children": [], "start_point": {"row": 51, "column": 30}, "end_point": {"row": 51, "column": 35}}, {"id": 96, "type": "parameter_declaration", "text": "void (*ctor)(struct kmem_cache *, void *)", "parent": 79, "children": [97, 98], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 43}}, {"id": 97, "type": "primitive_type", "text": "void", "parent": 96, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 6}}, {"id": 98, "type": "function_declarator", "text": "(*ctor)(struct kmem_cache *, void *)", "parent": 96, "children": [99, 103], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 43}}, {"id": 99, "type": "parenthesized_declarator", "text": "(*ctor)", "parent": 98, "children": [100], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 14}}, {"id": 100, "type": "pointer_declarator", "text": "*ctor", "parent": 99, "children": [101, 102], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 13}}, {"id": 101, "type": "*", "text": "*", "parent": 100, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 9}}, {"id": 102, "type": "identifier", "text": "ctor", "parent": 100, "children": [], "start_point": {"row": 52, "column": 9}, "end_point": {"row": 52, "column": 13}}, {"id": 103, "type": "parameter_list", "text": "(struct kmem_cache *, void *)", "parent": 98, "children": [104, 110], "start_point": {"row": 52, "column": 14}, "end_point": {"row": 52, "column": 43}}, {"id": 104, "type": "parameter_declaration", "text": "struct kmem_cache *", "parent": 103, "children": [105, 108], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 34}}, {"id": 105, "type": "struct_specifier", "text": "struct kmem_cache", "parent": 104, "children": [106, 107], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 32}}, {"id": 106, "type": "struct", "text": "struct", "parent": 105, "children": [], "start_point": {"row": 52, "column": 15}, "end_point": {"row": 52, "column": 21}}, {"id": 107, "type": "type_identifier", "text": "kmem_cache", "parent": 105, "children": [], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 32}}, {"id": 108, "type": "abstract_pointer_declarator", "text": "*", "parent": 104, "children": [109], "start_point": {"row": 52, "column": 33}, "end_point": {"row": 52, "column": 34}}, {"id": 109, "type": "*", "text": "*", "parent": 108, "children": [], "start_point": {"row": 52, "column": 33}, "end_point": {"row": 52, "column": 34}}, {"id": 110, "type": "parameter_declaration", "text": "void *", "parent": 103, "children": [111, 112], "start_point": {"row": 52, "column": 36}, "end_point": {"row": 52, "column": 42}}, {"id": 111, "type": "primitive_type", "text": "void", "parent": 110, "children": [], "start_point": {"row": 52, "column": 36}, "end_point": {"row": 52, "column": 40}}, {"id": 112, "type": "abstract_pointer_declarator", "text": "*", "parent": 110, "children": [113], "start_point": {"row": 52, "column": 41}, "end_point": {"row": 52, "column": 42}}, {"id": 113, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 52, "column": 41}, "end_point": {"row": 52, "column": 42}}, {"id": 114, "type": "declaration", "text": "void kmem_cache_destroy(struct kmem_cache *s);", "parent": 0, "children": [115, 116], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 46}}, {"id": 115, "type": "primitive_type", "text": "void", "parent": 114, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 4}}, {"id": 116, "type": "function_declarator", "text": "kmem_cache_destroy(struct kmem_cache *s)", "parent": 114, "children": [117, 118], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 45}}, {"id": 117, "type": "identifier", "text": "kmem_cache_destroy", "parent": 116, "children": [], "start_point": {"row": 53, "column": 5}, "end_point": {"row": 53, "column": 23}}, {"id": 118, "type": "parameter_list", "text": "(struct kmem_cache *s)", "parent": 116, "children": [119], "start_point": {"row": 53, "column": 23}, "end_point": {"row": 53, "column": 45}}, {"id": 119, "type": "parameter_declaration", "text": "struct kmem_cache *s", "parent": 118, "children": [120, 123], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 44}}, {"id": 120, "type": "struct_specifier", "text": "struct kmem_cache", "parent": 119, "children": [121, 122], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 41}}, {"id": 121, "type": "struct", "text": "struct", "parent": 120, "children": [], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 30}}, {"id": 122, "type": "type_identifier", "text": "kmem_cache", "parent": 120, "children": [], "start_point": {"row": 53, "column": 31}, "end_point": {"row": 53, "column": 41}}, {"id": 123, "type": "pointer_declarator", "text": "*s", "parent": 119, "children": [124, 125], "start_point": {"row": 53, "column": 42}, "end_point": {"row": 53, "column": 44}}, {"id": 124, "type": "*", "text": "*", "parent": 123, "children": [], "start_point": {"row": 53, "column": 42}, "end_point": {"row": 53, "column": 43}}, {"id": 125, "type": "identifier", "text": "s", "parent": 123, "children": [], "start_point": {"row": 53, "column": 43}, "end_point": {"row": 53, "column": 44}}, {"id": 126, "type": "declaration", "text": "void *kmem_cache_alloc(struct kmem_cache *, gfp_t);", "parent": 0, "children": [127, 128], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 51}}, {"id": 127, "type": "primitive_type", "text": "void", "parent": 126, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 4}}, {"id": 128, "type": "pointer_declarator", "text": "*kmem_cache_alloc(struct kmem_cache *, gfp_t)", "parent": 126, "children": [129, 130], "start_point": {"row": 54, "column": 5}, "end_point": {"row": 54, "column": 50}}, {"id": 129, "type": "*", "text": "*", "parent": 128, "children": [], "start_point": {"row": 54, "column": 5}, "end_point": {"row": 54, "column": 6}}, {"id": 130, "type": "function_declarator", "text": "kmem_cache_alloc(struct kmem_cache *, gfp_t)", "parent": 128, "children": [131, 132], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 50}}, {"id": 131, "type": "identifier", "text": "kmem_cache_alloc", "parent": 130, "children": [], "start_point": {"row": 54, "column": 6}, "end_point": {"row": 54, "column": 22}}, {"id": 132, "type": "parameter_list", "text": "(struct kmem_cache *, gfp_t)", "parent": 130, "children": [133, 139], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 50}}, {"id": 133, "type": "parameter_declaration", "text": "struct kmem_cache *", "parent": 132, "children": [134, 137], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 42}}, {"id": 134, "type": "struct_specifier", "text": "struct kmem_cache", "parent": 133, "children": [135, 136], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 40}}, {"id": 135, "type": "struct", "text": "struct", "parent": 134, "children": [], "start_point": {"row": 54, "column": 23}, "end_point": {"row": 54, "column": 29}}, {"id": 136, "type": "type_identifier", "text": "kmem_cache", "parent": 134, "children": [], "start_point": {"row": 54, "column": 30}, "end_point": {"row": 54, "column": 40}}, {"id": 137, "type": "abstract_pointer_declarator", "text": "*", "parent": 133, "children": [138], "start_point": {"row": 54, "column": 41}, "end_point": {"row": 54, "column": 42}}, {"id": 138, "type": "*", "text": "*", "parent": 137, "children": [], "start_point": {"row": 54, "column": 41}, "end_point": {"row": 54, "column": 42}}, {"id": 139, "type": "parameter_declaration", "text": "gfp_t", "parent": 132, "children": [140], "start_point": {"row": 54, "column": 44}, "end_point": {"row": 54, "column": 49}}, {"id": 140, "type": "type_identifier", "text": "gfp_t", "parent": 139, "children": [], "start_point": {"row": 54, "column": 44}, "end_point": {"row": 54, "column": 49}}, {"id": 141, "type": "declaration", "text": "void kmem_cache_free(struct kmem_cache *, void *);", "parent": 0, "children": [142, 143], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 50}}, {"id": 142, "type": "primitive_type", "text": "void", "parent": 141, "children": [], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 4}}, {"id": 143, "type": "function_declarator", "text": "kmem_cache_free(struct kmem_cache *, void *)", "parent": 141, "children": [144, 145], "start_point": {"row": 55, "column": 5}, "end_point": {"row": 55, "column": 49}}, {"id": 144, "type": "identifier", "text": "kmem_cache_free", "parent": 143, "children": [], "start_point": {"row": 55, "column": 5}, "end_point": {"row": 55, "column": 20}}, {"id": 145, "type": "parameter_list", "text": "(struct kmem_cache *, void *)", "parent": 143, "children": [146, 152], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 49}}, {"id": 146, "type": "parameter_declaration", "text": "struct kmem_cache *", "parent": 145, "children": [147, 150], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 40}}, {"id": 147, "type": "struct_specifier", "text": "struct kmem_cache", "parent": 146, "children": [148, 149], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 38}}, {"id": 148, "type": "struct", "text": "struct", "parent": 147, "children": [], "start_point": {"row": 55, "column": 21}, "end_point": {"row": 55, "column": 27}}, {"id": 149, "type": "type_identifier", "text": "kmem_cache", "parent": 147, "children": [], "start_point": {"row": 55, "column": 28}, "end_point": {"row": 55, "column": 38}}, {"id": 150, "type": "abstract_pointer_declarator", "text": "*", "parent": 146, "children": [151], "start_point": {"row": 55, "column": 39}, "end_point": {"row": 55, "column": 40}}, {"id": 151, "type": "*", "text": "*", "parent": 150, "children": [], "start_point": {"row": 55, "column": 39}, "end_point": {"row": 55, "column": 40}}, {"id": 152, "type": "parameter_declaration", "text": "void *", "parent": 145, "children": [153, 154], "start_point": {"row": 55, "column": 42}, "end_point": {"row": 55, "column": 48}}, {"id": 153, "type": "primitive_type", "text": "void", "parent": 152, "children": [], "start_point": {"row": 55, "column": 42}, "end_point": {"row": 55, "column": 46}}, {"id": 154, "type": "abstract_pointer_declarator", "text": "*", "parent": 152, "children": [155], "start_point": {"row": 55, "column": 47}, "end_point": {"row": 55, "column": 48}}, {"id": 155, "type": "*", "text": "*", "parent": 154, "children": [], "start_point": {"row": 55, "column": 47}, "end_point": {"row": 55, "column": 48}}, {"id": 156, "type": "declaration", "text": "unsigned int kmem_cache_size(struct kmem_cache *);", "parent": 0, "children": [157, 160], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 50}}, {"id": 157, "type": "sized_type_specifier", "text": "unsigned int", "parent": 156, "children": [158, 159], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 12}}, {"id": 158, "type": "unsigned", "text": "unsigned", "parent": 157, "children": [], "start_point": {"row": 57, "column": 0}, "end_point": {"row": 57, "column": 8}}, {"id": 159, "type": "primitive_type", "text": "int", "parent": 157, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 12}}, {"id": 160, "type": "function_declarator", "text": "kmem_cache_size(struct kmem_cache *)", "parent": 156, "children": [161, 162], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 49}}, {"id": 161, "type": "identifier", "text": "kmem_cache_size", "parent": 160, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 28}}, {"id": 162, "type": "parameter_list", "text": "(struct kmem_cache *)", "parent": 160, "children": [163], "start_point": {"row": 57, "column": 28}, "end_point": {"row": 57, "column": 49}}, {"id": 163, "type": "parameter_declaration", "text": "struct kmem_cache *", "parent": 162, "children": [164, 167], "start_point": {"row": 57, "column": 29}, "end_point": {"row": 57, "column": 48}}, {"id": 164, "type": "struct_specifier", "text": "struct kmem_cache", "parent": 163, "children": [165, 166], "start_point": {"row": 57, "column": 29}, "end_point": {"row": 57, "column": 46}}, {"id": 165, "type": "struct", "text": "struct", "parent": 164, "children": [], "start_point": {"row": 57, "column": 29}, "end_point": {"row": 57, "column": 35}}, {"id": 166, "type": "type_identifier", "text": "kmem_cache", "parent": 164, "children": [], "start_point": {"row": 57, "column": 36}, "end_point": {"row": 57, "column": 46}}, {"id": 167, "type": "abstract_pointer_declarator", "text": "*", "parent": 163, "children": [168], "start_point": {"row": 57, "column": 47}, "end_point": {"row": 57, "column": 48}}, {"id": 168, "type": "*", "text": "*", "parent": 167, "children": [], "start_point": {"row": 57, "column": 47}, "end_point": {"row": 57, "column": 48}}, {"id": 169, "type": "declaration", "text": "const char *kmem_cache_name(struct kmem_cache *);", "parent": 0, "children": [170, 171], "start_point": {"row": 58, "column": 0}, "end_point": {"row": 58, "column": 49}}, {"id": 170, "type": "primitive_type", "text": "char", "parent": 169, "children": [], "start_point": {"row": 58, "column": 6}, "end_point": {"row": 58, "column": 10}}, {"id": 171, "type": "pointer_declarator", "text": "*kmem_cache_name(struct kmem_cache *)", "parent": 169, "children": [172, 173], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 48}}, {"id": 172, "type": "*", "text": "*", "parent": 171, "children": [], "start_point": {"row": 58, "column": 11}, "end_point": {"row": 58, "column": 12}}, {"id": 173, "type": "function_declarator", "text": "kmem_cache_name(struct kmem_cache *)", "parent": 171, "children": [174, 175], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 48}}, {"id": 174, "type": "identifier", "text": "kmem_cache_name", "parent": 173, "children": [], "start_point": {"row": 58, "column": 12}, "end_point": {"row": 58, "column": 27}}, {"id": 175, "type": "parameter_list", "text": "(struct kmem_cache *)", "parent": 173, "children": [176], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 48}}, {"id": 176, "type": "parameter_declaration", "text": "struct kmem_cache *", "parent": 175, "children": [177, 180], "start_point": {"row": 58, "column": 28}, "end_point": {"row": 58, "column": 47}}, {"id": 177, "type": "struct_specifier", "text": "struct kmem_cache", "parent": 176, "children": [178, 179], "start_point": {"row": 58, "column": 28}, "end_point": {"row": 58, "column": 45}}, {"id": 178, "type": "struct", "text": "struct", "parent": 177, "children": [], "start_point": {"row": 58, "column": 28}, "end_point": {"row": 58, "column": 34}}, {"id": 179, "type": "type_identifier", "text": "kmem_cache", "parent": 177, "children": [], "start_point": {"row": 58, "column": 35}, "end_point": {"row": 58, "column": 45}}, {"id": 180, "type": "abstract_pointer_declarator", "text": "*", "parent": 176, "children": [181], "start_point": {"row": 58, "column": 46}, "end_point": {"row": 58, "column": 47}}, {"id": 181, "type": "*", "text": "*", "parent": 180, "children": [], "start_point": {"row": 58, "column": 46}, "end_point": {"row": 58, "column": 47}}, {"id": 182, "type": "declaration", "text": "int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);", "parent": 0, "children": [183, 184], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 66}}, {"id": 183, "type": "primitive_type", "text": "int", "parent": 182, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 3}}, {"id": 184, "type": "function_declarator", "text": "kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr)", "parent": 182, "children": [185, 186], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 65}}, {"id": 185, "type": "identifier", "text": "kmem_ptr_validate", "parent": 184, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 21}}, {"id": 186, "type": "parameter_list", "text": "(struct kmem_cache *cachep, const void *ptr)", "parent": 184, "children": [187, 194], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 65}}, {"id": 187, "type": "parameter_declaration", "text": "struct kmem_cache *cachep", "parent": 186, "children": [188, 191], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 47}}, {"id": 188, "type": "struct_specifier", "text": "struct kmem_cache", "parent": 187, "children": [189, 190], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 39}}, {"id": 189, "type": "struct", "text": "struct", "parent": 188, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 28}}, {"id": 190, "type": "type_identifier", "text": "kmem_cache", "parent": 188, "children": [], "start_point": {"row": 59, "column": 29}, "end_point": {"row": 59, "column": 39}}, {"id": 191, "type": "pointer_declarator", "text": "*cachep", "parent": 187, "children": [192, 193], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 47}}, {"id": 192, "type": "*", "text": "*", "parent": 191, "children": [], "start_point": {"row": 59, "column": 40}, "end_point": {"row": 59, "column": 41}}, {"id": 193, "type": "identifier", "text": "cachep", "parent": 191, "children": [], "start_point": {"row": 59, "column": 41}, "end_point": {"row": 59, "column": 47}}, {"id": 194, "type": "parameter_declaration", "text": "const void *ptr", "parent": 186, "children": [195, 196], "start_point": {"row": 59, "column": 49}, "end_point": {"row": 59, "column": 64}}, {"id": 195, "type": "primitive_type", "text": "void", "parent": 194, "children": [], "start_point": {"row": 59, "column": 55}, "end_point": {"row": 59, "column": 59}}, {"id": 196, "type": "pointer_declarator", "text": "*ptr", "parent": 194, "children": [197, 198], "start_point": {"row": 59, "column": 60}, "end_point": {"row": 59, "column": 64}}, {"id": 197, "type": "*", "text": "*", "parent": 196, "children": [], "start_point": {"row": 59, "column": 60}, "end_point": {"row": 59, "column": 61}}, {"id": 198, "type": "identifier", "text": "ptr", "parent": 196, "children": [], "start_point": {"row": 59, "column": 61}, "end_point": {"row": 59, "column": 64}}, {"id": 199, "type": "declaration", "text": "void kfree(const void *);", "parent": 0, "children": [200, 201], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 25}}, {"id": 200, "type": "primitive_type", "text": "void", "parent": 199, "children": [], "start_point": {"row": 61, "column": 0}, "end_point": {"row": 61, "column": 4}}, {"id": 201, "type": "function_declarator", "text": "kfree(const void *)", "parent": 199, "children": [202, 203], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 24}}, {"id": 202, "type": "identifier", "text": "kfree", "parent": 201, "children": [], "start_point": {"row": 61, "column": 5}, "end_point": {"row": 61, "column": 10}}, {"id": 203, "type": "parameter_list", "text": "(const void *)", "parent": 201, "children": [204], "start_point": {"row": 61, "column": 10}, "end_point": {"row": 61, "column": 24}}, {"id": 204, "type": "parameter_declaration", "text": "const void *", "parent": 203, "children": [205, 206], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 23}}, {"id": 205, "type": "primitive_type", "text": "void", "parent": 204, "children": [], "start_point": {"row": 61, "column": 17}, "end_point": {"row": 61, "column": 21}}, {"id": 206, "type": "abstract_pointer_declarator", "text": "*", "parent": 204, "children": [207], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 23}}, {"id": 207, "type": "*", "text": "*", "parent": 206, "children": [], "start_point": {"row": 61, "column": 22}, "end_point": {"row": 61, "column": 23}}, {"id": 208, "type": "declaration", "text": "size_t ksize(const void *);", "parent": 0, "children": [209, 210], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 27}}, {"id": 209, "type": "primitive_type", "text": "size_t", "parent": 208, "children": [], "start_point": {"row": 62, "column": 0}, "end_point": {"row": 62, "column": 6}}, {"id": 210, "type": "function_declarator", "text": "ksize(const void *)", "parent": 208, "children": [211, 212], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 26}}, {"id": 211, "type": "identifier", "text": "ksize", "parent": 210, "children": [], "start_point": {"row": 62, "column": 7}, "end_point": {"row": 62, "column": 12}}, {"id": 212, "type": "parameter_list", "text": "(const void *)", "parent": 210, "children": [213], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 26}}, {"id": 213, "type": "parameter_declaration", "text": "const void *", "parent": 212, "children": [214, 215], "start_point": {"row": 62, "column": 13}, "end_point": {"row": 62, "column": 25}}, {"id": 214, "type": "primitive_type", "text": "void", "parent": 213, "children": [], "start_point": {"row": 62, "column": 19}, "end_point": {"row": 62, "column": 23}}, {"id": 215, "type": "abstract_pointer_declarator", "text": "*", "parent": 213, "children": [216], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 25}}, {"id": 216, "type": "*", "text": "*", "parent": 215, "children": [], "start_point": {"row": 62, "column": 24}, "end_point": {"row": 62, "column": 25}}, {"id": 217, "type": "declaration", "text": "void *__kmalloc(size_t size, gfp_t flags);", "parent": 0, "children": [218, 219], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 42}}, {"id": 218, "type": "primitive_type", "text": "void", "parent": 217, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 4}}, {"id": 219, "type": "pointer_declarator", "text": "*__kmalloc(size_t size, gfp_t flags)", "parent": 217, "children": [220, 221], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 41}}, {"id": 220, "type": "*", "text": "*", "parent": 219, "children": [], "start_point": {"row": 64, "column": 5}, "end_point": {"row": 64, "column": 6}}, {"id": 221, "type": "function_declarator", "text": "__kmalloc(size_t size, gfp_t flags)", "parent": 219, "children": [222, 223], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 41}}, {"id": 222, "type": "identifier", "text": "__kmalloc", "parent": 221, "children": [], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 15}}, {"id": 223, "type": "parameter_list", "text": "(size_t size, gfp_t flags)", "parent": 221, "children": [224, 227], "start_point": {"row": 64, "column": 15}, "end_point": {"row": 64, "column": 41}}, {"id": 224, "type": "parameter_declaration", "text": "size_t size", "parent": 223, "children": [225, 226], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 27}}, {"id": 225, "type": "primitive_type", "text": "size_t", "parent": 224, "children": [], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 22}}, {"id": 226, "type": "identifier", "text": "size", "parent": 224, "children": [], "start_point": {"row": 64, "column": 23}, "end_point": {"row": 64, "column": 27}}, {"id": 227, "type": "parameter_declaration", "text": "gfp_t flags", "parent": 223, "children": [228, 229], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 40}}, {"id": 228, "type": "type_identifier", "text": "gfp_t", "parent": 227, "children": [], "start_point": {"row": 64, "column": 29}, "end_point": {"row": 64, "column": 34}}, {"id": 229, "type": "identifier", "text": "flags", "parent": 227, "children": [], "start_point": {"row": 64, "column": 35}, "end_point": {"row": 64, "column": 40}}, {"id": 230, "type": "function_definition", "text": "static __always_inline void *kmalloc(size_t size, gfp_t flags)\n{\n\tif (__builtin_constant_p(size)) {\n\t\tif (size > PAGE_SIZE / 2)\n\t\t\treturn (void *)__get_free_pages(flags,\n\t\t\t\t\t\t\tget_order(size));\n\n\t\tif (!(flags & GFP_DMA)) {\n\t\t\tstruct kmem_cache *s = kmalloc_slab(size);\n\n\t\t\tif (!s)\n\t\t\t\treturn ZERO_SIZE_PTR;\n\n\t\t\treturn kmem_cache_alloc(s, flags);\n\t\t}\n\t}\n\treturn __kmalloc(size, flags);\n}", "parent": 0, "children": [231, 232, 234], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 83, "column": 1}}, {"id": 231, "type": "type_identifier", "text": "__always_inline", "parent": 230, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 22}}, {"id": 232, "type": "ERROR", "text": "void", "parent": 230, "children": [233], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 27}}, {"id": 233, "type": "identifier", "text": "void", "parent": 232, "children": [], "start_point": {"row": 66, "column": 23}, "end_point": {"row": 66, "column": 27}}, {"id": 234, "type": "pointer_declarator", "text": "*kmalloc(size_t size, gfp_t flags)", "parent": 230, "children": [235, 236], "start_point": {"row": 66, "column": 28}, "end_point": {"row": 66, "column": 62}}, {"id": 235, "type": "*", "text": "*", "parent": 234, "children": [], "start_point": {"row": 66, "column": 28}, "end_point": {"row": 66, "column": 29}}, {"id": 236, "type": "function_declarator", "text": "kmalloc(size_t size, gfp_t flags)", "parent": 234, "children": [237, 238], "start_point": {"row": 66, "column": 29}, "end_point": {"row": 66, "column": 62}}, {"id": 237, "type": "identifier", "text": "kmalloc", "parent": 236, "children": [], "start_point": {"row": 66, "column": 29}, "end_point": {"row": 66, "column": 36}}, {"id": 238, "type": "parameter_list", "text": "(size_t size, gfp_t flags)", "parent": 236, "children": [239, 242], "start_point": {"row": 66, "column": 36}, "end_point": {"row": 66, "column": 62}}, {"id": 239, "type": "parameter_declaration", "text": "size_t size", "parent": 238, "children": [240, 241], "start_point": {"row": 66, "column": 37}, "end_point": {"row": 66, "column": 48}}, {"id": 240, "type": "primitive_type", "text": "size_t", "parent": 239, "children": [], "start_point": {"row": 66, "column": 37}, "end_point": {"row": 66, "column": 43}}, {"id": 241, "type": "identifier", "text": "size", "parent": 239, "children": [], "start_point": {"row": 66, "column": 44}, "end_point": {"row": 66, "column": 48}}, {"id": 242, "type": "parameter_declaration", "text": "gfp_t flags", "parent": 238, "children": [243, 244], "start_point": {"row": 66, "column": 50}, "end_point": {"row": 66, "column": 61}}, {"id": 243, "type": "type_identifier", "text": "gfp_t", "parent": 242, "children": [], "start_point": {"row": 66, "column": 50}, "end_point": {"row": 66, "column": 55}}, {"id": 244, "type": "identifier", "text": "flags", "parent": 242, "children": [], "start_point": {"row": 66, "column": 56}, "end_point": {"row": 66, "column": 61}}, {"id": 245, "type": "if_statement", "text": "if (__builtin_constant_p(size)) {\n\t\tif (size > PAGE_SIZE / 2)\n\t\t\treturn (void *)__get_free_pages(flags,\n\t\t\t\t\t\t\tget_order(size));\n\n\t\tif (!(flags & GFP_DMA)) {\n\t\t\tstruct kmem_cache *s = kmalloc_slab(size);\n\n\t\t\tif (!s)\n\t\t\t\treturn ZERO_SIZE_PTR;\n\n\t\t\treturn kmem_cache_alloc(s, flags);\n\t\t}\n\t}", "parent": 230, "children": [246], "start_point": {"row": 68, "column": 1}, "end_point": {"row": 81, "column": 2}}, {"id": 246, "type": "parenthesized_expression", "text": "(__builtin_constant_p(size))", "parent": 245, "children": [247], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 32}}, {"id": 247, "type": "call_expression", "text": "__builtin_constant_p(size)", "parent": 246, "children": [248, 249], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 31}}, {"id": 248, "type": "identifier", "text": "__builtin_constant_p", "parent": 247, "children": [], "start_point": {"row": 68, "column": 5}, "end_point": {"row": 68, "column": 25}}, {"id": 249, "type": "argument_list", "text": "(size)", "parent": 247, "children": [250], "start_point": {"row": 68, "column": 25}, "end_point": {"row": 68, "column": 31}}, {"id": 250, "type": "identifier", "text": "size", "parent": 249, "children": [], "start_point": {"row": 68, "column": 26}, "end_point": {"row": 68, "column": 30}}, {"id": 251, "type": "if_statement", "text": "if (size > PAGE_SIZE / 2)\n\t\t\treturn (void *)__get_free_pages(flags,\n\t\t\t\t\t\t\tget_order(size));", "parent": 245, "children": [252, 260], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 71, "column": 24}}, {"id": 252, "type": "parenthesized_expression", "text": "(size > PAGE_SIZE / 2)", "parent": 251, "children": [253], "start_point": {"row": 69, "column": 5}, "end_point": {"row": 69, "column": 27}}, {"id": 253, "type": "binary_expression", "text": "size > PAGE_SIZE / 2", "parent": 252, "children": [254, 255, 256], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 26}}, {"id": 254, "type": "identifier", "text": "size", "parent": 253, "children": [], "start_point": {"row": 69, "column": 6}, "end_point": {"row": 69, "column": 10}}, {"id": 255, "type": ">", "text": ">", "parent": 253, "children": [], "start_point": {"row": 69, "column": 11}, "end_point": {"row": 69, "column": 12}}, {"id": 256, "type": "binary_expression", "text": "PAGE_SIZE / 2", "parent": 253, "children": [257, 258, 259], "start_point": {"row": 69, "column": 13}, "end_point": {"row": 69, "column": 26}}, {"id": 257, "type": "identifier", "text": "PAGE_SIZE", "parent": 256, "children": [], "start_point": {"row": 69, "column": 13}, "end_point": {"row": 69, "column": 22}}, {"id": 258, "type": "/", "text": "/", "parent": 256, "children": [], "start_point": {"row": 69, "column": 23}, "end_point": {"row": 69, "column": 24}}, {"id": 259, "type": "number_literal", "text": "2", "parent": 256, "children": [], "start_point": {"row": 69, "column": 25}, "end_point": {"row": 69, "column": 26}}, {"id": 260, "type": "return_statement", "text": "return (void *)__get_free_pages(flags,\n\t\t\t\t\t\t\tget_order(size));", "parent": 251, "children": [261], "start_point": {"row": 70, "column": 3}, "end_point": {"row": 71, "column": 24}}, {"id": 261, "type": "cast_expression", "text": "(void *)__get_free_pages(flags,\n\t\t\t\t\t\t\tget_order(size))", "parent": 260, "children": [262, 266], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 71, "column": 23}}, {"id": 262, "type": "type_descriptor", "text": "void *", "parent": 261, "children": [263, 264], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 17}}, {"id": 263, "type": "primitive_type", "text": "void", "parent": 262, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 15}}, {"id": 264, "type": "abstract_pointer_declarator", "text": "*", "parent": 262, "children": [265], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 17}}, {"id": 265, "type": "*", "text": "*", "parent": 264, "children": [], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 17}}, {"id": 266, "type": "call_expression", "text": "__get_free_pages(flags,\n\t\t\t\t\t\t\tget_order(size))", "parent": 261, "children": [267, 268], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 71, "column": 23}}, {"id": 267, "type": "identifier", "text": "__get_free_pages", "parent": 266, "children": [], "start_point": {"row": 70, "column": 18}, "end_point": {"row": 70, "column": 34}}, {"id": 268, "type": "argument_list", "text": "(flags,\n\t\t\t\t\t\t\tget_order(size))", "parent": 266, "children": [269, 270], "start_point": {"row": 70, "column": 34}, "end_point": {"row": 71, "column": 23}}, {"id": 269, "type": "identifier", "text": "flags", "parent": 268, "children": [], "start_point": {"row": 70, "column": 35}, "end_point": {"row": 70, "column": 40}}, {"id": 270, "type": "call_expression", "text": "get_order(size)", "parent": 268, "children": [271, 272], "start_point": {"row": 71, "column": 7}, "end_point": {"row": 71, "column": 22}}, {"id": 271, "type": "identifier", "text": "get_order", "parent": 270, "children": [], "start_point": {"row": 71, "column": 7}, "end_point": {"row": 71, "column": 16}}, {"id": 272, "type": "argument_list", "text": "(size)", "parent": 270, "children": [273], "start_point": {"row": 71, "column": 16}, "end_point": {"row": 71, "column": 22}}, {"id": 273, "type": "identifier", "text": "size", "parent": 272, "children": [], "start_point": {"row": 71, "column": 17}, "end_point": {"row": 71, "column": 21}}, {"id": 274, "type": "if_statement", "text": "if (!(flags & GFP_DMA)) {\n\t\t\tstruct kmem_cache *s = kmalloc_slab(size);\n\n\t\t\tif (!s)\n\t\t\t\treturn ZERO_SIZE_PTR;\n\n\t\t\treturn kmem_cache_alloc(s, flags);\n\t\t}", "parent": 245, "children": [275], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 80, "column": 3}}, {"id": 275, "type": "parenthesized_expression", "text": "(!(flags & GFP_DMA))", "parent": 274, "children": [276], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 25}}, {"id": 276, "type": "unary_expression", "text": "!(flags & GFP_DMA)", "parent": 275, "children": [277, 278], "start_point": {"row": 73, "column": 6}, "end_point": {"row": 73, "column": 24}}, {"id": 277, "type": "!", "text": "!", "parent": 276, "children": [], "start_point": {"row": 73, "column": 6}, "end_point": {"row": 73, "column": 7}}, {"id": 278, "type": "parenthesized_expression", "text": "(flags & GFP_DMA)", "parent": 276, "children": [279], "start_point": {"row": 73, "column": 7}, "end_point": {"row": 73, "column": 24}}, {"id": 279, "type": "binary_expression", "text": "flags & GFP_DMA", "parent": 278, "children": [280, 281], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 23}}, {"id": 280, "type": "identifier", "text": "flags", "parent": 279, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 13}}, {"id": 281, "type": "identifier", "text": "GFP_DMA", "parent": 279, "children": [], "start_point": {"row": 73, "column": 16}, "end_point": {"row": 73, "column": 23}}, {"id": 282, "type": "declaration", "text": "struct kmem_cache *s = kmalloc_slab(size);", "parent": 274, "children": [283, 286], "start_point": {"row": 74, "column": 3}, "end_point": {"row": 74, "column": 45}}, {"id": 283, "type": "struct_specifier", "text": "struct kmem_cache", "parent": 282, "children": [284, 285], "start_point": {"row": 74, "column": 3}, "end_point": {"row": 74, "column": 20}}, {"id": 284, "type": "struct", "text": "struct", "parent": 283, "children": [], "start_point": {"row": 74, "column": 3}, "end_point": {"row": 74, "column": 9}}, {"id": 285, "type": "type_identifier", "text": "kmem_cache", "parent": 283, "children": [], "start_point": {"row": 74, "column": 10}, "end_point": {"row": 74, "column": 20}}, {"id": 286, "type": "init_declarator", "text": "*s = kmalloc_slab(size)", "parent": 282, "children": [287, 290, 291], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 44}}, {"id": 287, "type": "pointer_declarator", "text": "*s", "parent": 286, "children": [288, 289], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 23}}, {"id": 288, "type": "*", "text": "*", "parent": 287, "children": [], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 22}}, {"id": 289, "type": "identifier", "text": "s", "parent": 287, "children": [], "start_point": {"row": 74, "column": 22}, "end_point": {"row": 74, "column": 23}}, {"id": 290, "type": "=", "text": "=", "parent": 286, "children": [], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 25}}, {"id": 291, "type": "call_expression", "text": "kmalloc_slab(size)", "parent": 286, "children": [292, 293], "start_point": {"row": 74, "column": 26}, "end_point": {"row": 74, "column": 44}}, {"id": 292, "type": "identifier", "text": "kmalloc_slab", "parent": 291, "children": [], "start_point": {"row": 74, "column": 26}, "end_point": {"row": 74, "column": 38}}, {"id": 293, "type": "argument_list", "text": "(size)", "parent": 291, "children": [294], "start_point": {"row": 74, "column": 38}, "end_point": {"row": 74, "column": 44}}, {"id": 294, "type": "identifier", "text": "size", "parent": 293, "children": [], "start_point": {"row": 74, "column": 39}, "end_point": {"row": 74, "column": 43}}, {"id": 295, "type": "if_statement", "text": "if (!s)\n\t\t\t\treturn ZERO_SIZE_PTR;", "parent": 274, "children": [296, 300], "start_point": {"row": 76, "column": 3}, "end_point": {"row": 77, "column": 25}}, {"id": 296, "type": "parenthesized_expression", "text": "(!s)", "parent": 295, "children": [297], "start_point": {"row": 76, "column": 6}, "end_point": {"row": 76, "column": 10}}, {"id": 297, "type": "unary_expression", "text": "!s", "parent": 296, "children": [298, 299], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 9}}, {"id": 298, "type": "!", "text": "!", "parent": 297, "children": [], "start_point": {"row": 76, "column": 7}, "end_point": {"row": 76, "column": 8}}, {"id": 299, "type": "identifier", "text": "s", "parent": 297, "children": [], "start_point": {"row": 76, "column": 8}, "end_point": {"row": 76, "column": 9}}, {"id": 300, "type": "return_statement", "text": "return ZERO_SIZE_PTR;", "parent": 295, "children": [301], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 25}}, {"id": 301, "type": "identifier", "text": "ZERO_SIZE_PTR", "parent": 300, "children": [], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 24}}, {"id": 302, "type": "return_statement", "text": "return kmem_cache_alloc(s, flags);", "parent": 274, "children": [303], "start_point": {"row": 79, "column": 3}, "end_point": {"row": 79, "column": 37}}, {"id": 303, "type": "call_expression", "text": "kmem_cache_alloc(s, flags)", "parent": 302, "children": [304, 305], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 36}}, {"id": 304, "type": "identifier", "text": "kmem_cache_alloc", "parent": 303, "children": [], "start_point": {"row": 79, "column": 10}, "end_point": {"row": 79, "column": 26}}, {"id": 305, "type": "argument_list", "text": "(s, flags)", "parent": 303, "children": [306, 307], "start_point": {"row": 79, "column": 26}, "end_point": {"row": 79, "column": 36}}, {"id": 306, "type": "identifier", "text": "s", "parent": 305, "children": [], "start_point": {"row": 79, "column": 27}, "end_point": {"row": 79, "column": 28}}, {"id": 307, "type": "identifier", "text": "flags", "parent": 305, "children": [], "start_point": {"row": 79, "column": 30}, "end_point": {"row": 79, "column": 35}}, {"id": 308, "type": "return_statement", "text": "return __kmalloc(size, flags);", "parent": 230, "children": [309], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 31}}, {"id": 309, "type": "call_expression", "text": "__kmalloc(size, flags)", "parent": 308, "children": [310, 311], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 30}}, {"id": 310, "type": "identifier", "text": "__kmalloc", "parent": 309, "children": [], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 17}}, {"id": 311, "type": "argument_list", "text": "(size, flags)", "parent": 309, "children": [312, 313], "start_point": {"row": 82, "column": 17}, "end_point": {"row": 82, "column": 30}}, {"id": 312, "type": "identifier", "text": "size", "parent": 311, "children": [], "start_point": {"row": 82, "column": 18}, "end_point": {"row": 82, "column": 22}}, {"id": 313, "type": "identifier", "text": "flags", "parent": 311, "children": [], "start_point": {"row": 82, "column": 24}, "end_point": {"row": 82, "column": 29}}, {"id": 314, "type": "function_definition", "text": "static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)\n{\n\treturn kmem_cache_alloc(k, flags | __GFP_ZERO);\n}", "parent": 0, "children": [315, 317, 318], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 91, "column": 1}}, {"id": 315, "type": "storage_class_specifier", "text": "inline", "parent": 314, "children": [316], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 13}}, {"id": 316, "type": "inline", "text": "inline", "parent": 315, "children": [], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 13}}, {"id": 317, "type": "primitive_type", "text": "void", "parent": 314, "children": [], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 18}}, {"id": 318, "type": "pointer_declarator", "text": "*kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)", "parent": 314, "children": [319, 320], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 72}}, {"id": 319, "type": "*", "text": "*", "parent": 318, "children": [], "start_point": {"row": 88, "column": 19}, "end_point": {"row": 88, "column": 20}}, {"id": 320, "type": "function_declarator", "text": "kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)", "parent": 318, "children": [321, 322], "start_point": {"row": 88, "column": 20}, "end_point": {"row": 88, "column": 72}}, {"id": 321, "type": "identifier", "text": "kmem_cache_zalloc", "parent": 320, "children": [], "start_point": {"row": 88, "column": 20}, "end_point": {"row": 88, "column": 37}}, {"id": 322, "type": "parameter_list", "text": "(struct kmem_cache *k, gfp_t flags)", "parent": 320, "children": [323, 330], "start_point": {"row": 88, "column": 37}, "end_point": {"row": 88, "column": 72}}, {"id": 323, "type": "parameter_declaration", "text": "struct kmem_cache *k", "parent": 322, "children": [324, 327], "start_point": {"row": 88, "column": 38}, "end_point": {"row": 88, "column": 58}}, {"id": 324, "type": "struct_specifier", "text": "struct kmem_cache", "parent": 323, "children": [325, 326], "start_point": {"row": 88, "column": 38}, "end_point": {"row": 88, "column": 55}}, {"id": 325, "type": "struct", "text": "struct", "parent": 324, "children": [], "start_point": {"row": 88, "column": 38}, "end_point": {"row": 88, "column": 44}}, {"id": 326, "type": "type_identifier", "text": "kmem_cache", "parent": 324, "children": [], "start_point": {"row": 88, "column": 45}, "end_point": {"row": 88, "column": 55}}, {"id": 327, "type": "pointer_declarator", "text": "*k", "parent": 323, "children": [328, 329], "start_point": {"row": 88, "column": 56}, "end_point": {"row": 88, "column": 58}}, {"id": 328, "type": "*", "text": "*", "parent": 327, "children": [], "start_point": {"row": 88, "column": 56}, "end_point": {"row": 88, "column": 57}}, {"id": 329, "type": "identifier", "text": "k", "parent": 327, "children": [], "start_point": {"row": 88, "column": 57}, "end_point": {"row": 88, "column": 58}}, {"id": 330, "type": "parameter_declaration", "text": "gfp_t flags", "parent": 322, "children": [331, 332], "start_point": {"row": 88, "column": 60}, "end_point": {"row": 88, "column": 71}}, {"id": 331, "type": "type_identifier", "text": "gfp_t", "parent": 330, "children": [], "start_point": {"row": 88, "column": 60}, "end_point": {"row": 88, "column": 65}}, {"id": 332, "type": "identifier", "text": "flags", "parent": 330, "children": [], "start_point": {"row": 88, "column": 66}, "end_point": {"row": 88, "column": 71}}, {"id": 333, "type": "return_statement", "text": "return kmem_cache_alloc(k, flags | __GFP_ZERO);", "parent": 314, "children": [334], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 48}}, {"id": 334, "type": "call_expression", "text": "kmem_cache_alloc(k, flags | __GFP_ZERO)", "parent": 333, "children": [335, 336], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 47}}, {"id": 335, "type": "identifier", "text": "kmem_cache_alloc", "parent": 334, "children": [], "start_point": {"row": 90, "column": 8}, "end_point": {"row": 90, "column": 24}}, {"id": 336, "type": "argument_list", "text": "(k, flags | __GFP_ZERO)", "parent": 334, "children": [337, 338], "start_point": {"row": 90, "column": 24}, "end_point": {"row": 90, "column": 47}}, {"id": 337, "type": "identifier", "text": "k", "parent": 336, "children": [], "start_point": {"row": 90, "column": 25}, "end_point": {"row": 90, "column": 26}}, {"id": 338, "type": "binary_expression", "text": "flags | __GFP_ZERO", "parent": 336, "children": [339, 340], "start_point": {"row": 90, "column": 28}, "end_point": {"row": 90, "column": 46}}, {"id": 339, "type": "identifier", "text": "flags", "parent": 338, "children": [], "start_point": {"row": 90, "column": 28}, "end_point": {"row": 90, "column": 33}}, {"id": 340, "type": "identifier", "text": "__GFP_ZERO", "parent": 338, "children": [], "start_point": {"row": 90, "column": 36}, "end_point": {"row": 90, "column": 46}}, {"id": 341, "type": "function_definition", "text": "static inline void *kzalloc(size_t size, gfp_t flags)\n{\n\treturn kmalloc(size, flags | __GFP_ZERO);\n}", "parent": 0, "children": [342, 344, 345], "start_point": {"row": 98, "column": 0}, "end_point": {"row": 101, "column": 1}}, {"id": 342, "type": "storage_class_specifier", "text": "inline", "parent": 341, "children": [343], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 13}}, {"id": 343, "type": "inline", "text": "inline", "parent": 342, "children": [], "start_point": {"row": 98, "column": 7}, "end_point": {"row": 98, "column": 13}}, {"id": 344, "type": "primitive_type", "text": "void", "parent": 341, "children": [], "start_point": {"row": 98, "column": 14}, "end_point": {"row": 98, "column": 18}}, {"id": 345, "type": "pointer_declarator", "text": "*kzalloc(size_t size, gfp_t flags)", "parent": 341, "children": [346, 347], "start_point": {"row": 98, "column": 19}, "end_point": {"row": 98, "column": 53}}, {"id": 346, "type": "*", "text": "*", "parent": 345, "children": [], "start_point": {"row": 98, "column": 19}, "end_point": {"row": 98, "column": 20}}, {"id": 347, "type": "function_declarator", "text": "kzalloc(size_t size, gfp_t flags)", "parent": 345, "children": [348, 349], "start_point": {"row": 98, "column": 20}, "end_point": {"row": 98, "column": 53}}, {"id": 348, "type": "identifier", "text": "kzalloc", "parent": 347, "children": [], "start_point": {"row": 98, "column": 20}, "end_point": {"row": 98, "column": 27}}, {"id": 349, "type": "parameter_list", "text": "(size_t size, gfp_t flags)", "parent": 347, "children": [350, 353], "start_point": {"row": 98, "column": 27}, "end_point": {"row": 98, "column": 53}}, {"id": 350, "type": "parameter_declaration", "text": "size_t size", "parent": 349, "children": [351, 352], "start_point": {"row": 98, "column": 28}, "end_point": {"row": 98, "column": 39}}, {"id": 351, "type": "primitive_type", "text": "size_t", "parent": 350, "children": [], "start_point": {"row": 98, "column": 28}, "end_point": {"row": 98, "column": 34}}, {"id": 352, "type": "identifier", "text": "size", "parent": 350, "children": [], "start_point": {"row": 98, "column": 35}, "end_point": {"row": 98, "column": 39}}, {"id": 353, "type": "parameter_declaration", "text": "gfp_t flags", "parent": 349, "children": [354, 355], "start_point": {"row": 98, "column": 41}, "end_point": {"row": 98, "column": 52}}, {"id": 354, "type": "type_identifier", "text": "gfp_t", "parent": 353, "children": [], "start_point": {"row": 98, "column": 41}, "end_point": {"row": 98, "column": 46}}, {"id": 355, "type": "identifier", "text": "flags", "parent": 353, "children": [], "start_point": {"row": 98, "column": 47}, "end_point": {"row": 98, "column": 52}}, {"id": 356, "type": "return_statement", "text": "return kmalloc(size, flags | __GFP_ZERO);", "parent": 341, "children": [357], "start_point": {"row": 100, "column": 1}, "end_point": {"row": 100, "column": 42}}, {"id": 357, "type": "call_expression", "text": "kmalloc(size, flags | __GFP_ZERO)", "parent": 356, "children": [358, 359], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 41}}, {"id": 358, "type": "identifier", "text": "kmalloc", "parent": 357, "children": [], "start_point": {"row": 100, "column": 8}, "end_point": {"row": 100, "column": 15}}, {"id": 359, "type": "argument_list", "text": "(size, flags | __GFP_ZERO)", "parent": 357, "children": [360, 361], "start_point": {"row": 100, "column": 15}, "end_point": {"row": 100, "column": 41}}, {"id": 360, "type": "identifier", "text": "size", "parent": 359, "children": [], "start_point": {"row": 100, "column": 16}, "end_point": {"row": 100, "column": 20}}, {"id": 361, "type": "binary_expression", "text": "flags | __GFP_ZERO", "parent": 359, "children": [362, 363], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 40}}, {"id": 362, "type": "identifier", "text": "flags", "parent": 361, "children": [], "start_point": {"row": 100, "column": 22}, "end_point": {"row": 100, "column": 27}}, {"id": 363, "type": "identifier", "text": "__GFP_ZERO", "parent": 361, "children": [], "start_point": {"row": 100, "column": 30}, "end_point": {"row": 100, "column": 40}}, {"id": 364, "type": "function_definition", "text": "static inline void *kmalloc_array(size_t n, size_t size, gfp_t flags)\n{\n\tsize_t bytes;\n\n\tif (unlikely(check_mul_overflow(n, size, &bytes)))\n\t\treturn NULL;\n\tif (__builtin_constant_p(n) && __builtin_constant_p(size))\n\t\treturn kmalloc(bytes, flags);\n\treturn __kmalloc(bytes, flags);\n}", "parent": 0, "children": [365, 367, 368], "start_point": {"row": 109, "column": 0}, "end_point": {"row": 118, "column": 1}}, {"id": 365, "type": "storage_class_specifier", "text": "inline", "parent": 364, "children": [366], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 13}}, {"id": 366, "type": "inline", "text": "inline", "parent": 365, "children": [], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 13}}, {"id": 367, "type": "primitive_type", "text": "void", "parent": 364, "children": [], "start_point": {"row": 109, "column": 14}, "end_point": {"row": 109, "column": 18}}, {"id": 368, "type": "pointer_declarator", "text": "*kmalloc_array(size_t n, size_t size, gfp_t flags)", "parent": 364, "children": [369, 370], "start_point": {"row": 109, "column": 19}, "end_point": {"row": 109, "column": 69}}, {"id": 369, "type": "*", "text": "*", "parent": 368, "children": [], "start_point": {"row": 109, "column": 19}, "end_point": {"row": 109, "column": 20}}, {"id": 370, "type": "function_declarator", "text": "kmalloc_array(size_t n, size_t size, gfp_t flags)", "parent": 368, "children": [371, 372], "start_point": {"row": 109, "column": 20}, "end_point": {"row": 109, "column": 69}}, {"id": 371, "type": "identifier", "text": "kmalloc_array", "parent": 370, "children": [], "start_point": {"row": 109, "column": 20}, "end_point": {"row": 109, "column": 33}}, {"id": 372, "type": "parameter_list", "text": "(size_t n, size_t size, gfp_t flags)", "parent": 370, "children": [373, 376, 379], "start_point": {"row": 109, "column": 33}, "end_point": {"row": 109, "column": 69}}, {"id": 373, "type": "parameter_declaration", "text": "size_t n", "parent": 372, "children": [374, 375], "start_point": {"row": 109, "column": 34}, "end_point": {"row": 109, "column": 42}}, {"id": 374, "type": "primitive_type", "text": "size_t", "parent": 373, "children": [], "start_point": {"row": 109, "column": 34}, "end_point": {"row": 109, "column": 40}}, {"id": 375, "type": "identifier", "text": "n", "parent": 373, "children": [], "start_point": {"row": 109, "column": 41}, "end_point": {"row": 109, "column": 42}}, {"id": 376, "type": "parameter_declaration", "text": "size_t size", "parent": 372, "children": [377, 378], "start_point": {"row": 109, "column": 44}, "end_point": {"row": 109, "column": 55}}, {"id": 377, "type": "primitive_type", "text": "size_t", "parent": 376, "children": [], "start_point": {"row": 109, "column": 44}, "end_point": {"row": 109, "column": 50}}, {"id": 378, "type": "identifier", "text": "size", "parent": 376, "children": [], "start_point": {"row": 109, "column": 51}, "end_point": {"row": 109, "column": 55}}, {"id": 379, "type": "parameter_declaration", "text": "gfp_t flags", "parent": 372, "children": [380, 381], "start_point": {"row": 109, "column": 57}, "end_point": {"row": 109, "column": 68}}, {"id": 380, "type": "type_identifier", "text": "gfp_t", "parent": 379, "children": [], "start_point": {"row": 109, "column": 57}, "end_point": {"row": 109, "column": 62}}, {"id": 381, "type": "identifier", "text": "flags", "parent": 379, "children": [], "start_point": {"row": 109, "column": 63}, "end_point": {"row": 109, "column": 68}}, {"id": 382, "type": "declaration", "text": "size_t bytes;", "parent": 364, "children": [383, 384], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 14}}, {"id": 383, "type": "primitive_type", "text": "size_t", "parent": 382, "children": [], "start_point": {"row": 111, "column": 1}, "end_point": {"row": 111, "column": 7}}, {"id": 384, "type": "identifier", "text": "bytes", "parent": 382, "children": [], "start_point": {"row": 111, "column": 8}, "end_point": {"row": 111, "column": 13}}, {"id": 385, "type": "if_statement", "text": "if (unlikely(check_mul_overflow(n, size, &bytes)))\n\t\treturn NULL;", "parent": 364, "children": [386, 397], "start_point": {"row": 113, "column": 1}, "end_point": {"row": 114, "column": 14}}, {"id": 386, "type": "parenthesized_expression", "text": "(unlikely(check_mul_overflow(n, size, &bytes)))", "parent": 385, "children": [387], "start_point": {"row": 113, "column": 4}, "end_point": {"row": 113, "column": 51}}, {"id": 387, "type": "call_expression", "text": "unlikely(check_mul_overflow(n, size, &bytes))", "parent": 386, "children": [388, 389], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 50}}, {"id": 388, "type": "identifier", "text": "unlikely", "parent": 387, "children": [], "start_point": {"row": 113, "column": 5}, "end_point": {"row": 113, "column": 13}}, {"id": 389, "type": "argument_list", "text": "(check_mul_overflow(n, size, &bytes))", "parent": 387, "children": [390], "start_point": {"row": 113, "column": 13}, "end_point": {"row": 113, "column": 50}}, {"id": 390, "type": "call_expression", "text": "check_mul_overflow(n, size, &bytes)", "parent": 389, "children": [391, 392], "start_point": {"row": 113, "column": 14}, "end_point": {"row": 113, "column": 49}}, {"id": 391, "type": "identifier", "text": "check_mul_overflow", "parent": 390, "children": [], "start_point": {"row": 113, "column": 14}, "end_point": {"row": 113, "column": 32}}, {"id": 392, "type": "argument_list", "text": "(n, size, &bytes)", "parent": 390, "children": [393, 394, 395], "start_point": {"row": 113, "column": 32}, "end_point": {"row": 113, "column": 49}}, {"id": 393, "type": "identifier", "text": "n", "parent": 392, "children": [], "start_point": {"row": 113, "column": 33}, "end_point": {"row": 113, "column": 34}}, {"id": 394, "type": "identifier", "text": "size", "parent": 392, "children": [], "start_point": {"row": 113, "column": 36}, "end_point": {"row": 113, "column": 40}}, {"id": 395, "type": "pointer_expression", "text": "&bytes", "parent": 392, "children": [396], "start_point": {"row": 113, "column": 42}, "end_point": {"row": 113, "column": 48}}, {"id": 396, "type": "identifier", "text": "bytes", "parent": 395, "children": [], "start_point": {"row": 113, "column": 43}, "end_point": {"row": 113, "column": 48}}, {"id": 397, "type": "return_statement", "text": "return NULL;", "parent": 385, "children": [398], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 14}}, {"id": 398, "type": "null", "text": "NULL", "parent": 397, "children": [399], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 13}}, {"id": 399, "type": "NULL", "text": "NULL", "parent": 398, "children": [], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 13}}, {"id": 400, "type": "if_statement", "text": "if (__builtin_constant_p(n) && __builtin_constant_p(size))\n\t\treturn kmalloc(bytes, flags);", "parent": 364, "children": [401, 412], "start_point": {"row": 115, "column": 1}, "end_point": {"row": 116, "column": 31}}, {"id": 401, "type": "parenthesized_expression", "text": "(__builtin_constant_p(n) && __builtin_constant_p(size))", "parent": 400, "children": [402], "start_point": {"row": 115, "column": 4}, "end_point": {"row": 115, "column": 59}}, {"id": 402, "type": "binary_expression", "text": "__builtin_constant_p(n) && __builtin_constant_p(size)", "parent": 401, "children": [403, 407, 408], "start_point": {"row": 115, "column": 5}, "end_point": {"row": 115, "column": 58}}, {"id": 403, "type": "call_expression", "text": "__builtin_constant_p(n)", "parent": 402, "children": [404, 405], "start_point": {"row": 115, "column": 5}, "end_point": {"row": 115, "column": 28}}, {"id": 404, "type": "identifier", "text": "__builtin_constant_p", "parent": 403, "children": [], "start_point": {"row": 115, "column": 5}, "end_point": {"row": 115, "column": 25}}, {"id": 405, "type": "argument_list", "text": "(n)", "parent": 403, "children": [406], "start_point": {"row": 115, "column": 25}, "end_point": {"row": 115, "column": 28}}, {"id": 406, "type": "identifier", "text": "n", "parent": 405, "children": [], "start_point": {"row": 115, "column": 26}, "end_point": {"row": 115, "column": 27}}, {"id": 407, "type": "&&", "text": "&&", "parent": 402, "children": [], "start_point": {"row": 115, "column": 29}, "end_point": {"row": 115, "column": 31}}, {"id": 408, "type": "call_expression", "text": "__builtin_constant_p(size)", "parent": 402, "children": [409, 410], "start_point": {"row": 115, "column": 32}, "end_point": {"row": 115, "column": 58}}, {"id": 409, "type": "identifier", "text": "__builtin_constant_p", "parent": 408, "children": [], "start_point": {"row": 115, "column": 32}, "end_point": {"row": 115, "column": 52}}, {"id": 410, "type": "argument_list", "text": "(size)", "parent": 408, "children": [411], "start_point": {"row": 115, "column": 52}, "end_point": {"row": 115, "column": 58}}, {"id": 411, "type": "identifier", "text": "size", "parent": 410, "children": [], "start_point": {"row": 115, "column": 53}, "end_point": {"row": 115, "column": 57}}, {"id": 412, "type": "return_statement", "text": "return kmalloc(bytes, flags);", "parent": 400, "children": [413], "start_point": {"row": 116, "column": 2}, "end_point": {"row": 116, "column": 31}}, {"id": 413, "type": "call_expression", "text": "kmalloc(bytes, flags)", "parent": 412, "children": [414, 415], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 30}}, {"id": 414, "type": "identifier", "text": "kmalloc", "parent": 413, "children": [], "start_point": {"row": 116, "column": 9}, "end_point": {"row": 116, "column": 16}}, {"id": 415, "type": "argument_list", "text": "(bytes, flags)", "parent": 413, "children": [416, 417], "start_point": {"row": 116, "column": 16}, "end_point": {"row": 116, "column": 30}}, {"id": 416, "type": "identifier", "text": "bytes", "parent": 415, "children": [], "start_point": {"row": 116, "column": 17}, "end_point": {"row": 116, "column": 22}}, {"id": 417, "type": "identifier", "text": "flags", "parent": 415, "children": [], "start_point": {"row": 116, "column": 24}, "end_point": {"row": 116, "column": 29}}, {"id": 418, "type": "return_statement", "text": "return __kmalloc(bytes, flags);", "parent": 364, "children": [419], "start_point": {"row": 117, "column": 1}, "end_point": {"row": 117, "column": 32}}, {"id": 419, "type": "call_expression", "text": "__kmalloc(bytes, flags)", "parent": 418, "children": [420, 421], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 31}}, {"id": 420, "type": "identifier", "text": "__kmalloc", "parent": 419, "children": [], "start_point": {"row": 117, "column": 8}, "end_point": {"row": 117, "column": 17}}, {"id": 421, "type": "argument_list", "text": "(bytes, flags)", "parent": 419, "children": [422, 423], "start_point": {"row": 117, "column": 17}, "end_point": {"row": 117, "column": 31}}, {"id": 422, "type": "identifier", "text": "bytes", "parent": 421, "children": [], "start_point": {"row": 117, "column": 18}, "end_point": {"row": 117, "column": 23}}, {"id": 423, "type": "identifier", "text": "flags", "parent": 421, "children": [], "start_point": {"row": 117, "column": 25}, "end_point": {"row": 117, "column": 30}}, {"id": 424, "type": "function_definition", "text": "static inline void *kcalloc(size_t n, size_t size, gfp_t flags)\n{\n\treturn kmalloc_array(n, size, flags | __GFP_ZERO);\n}", "parent": 0, "children": [425, 427, 428], "start_point": {"row": 126, "column": 0}, "end_point": {"row": 129, "column": 1}}, {"id": 425, "type": "storage_class_specifier", "text": "inline", "parent": 424, "children": [426], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 13}}, {"id": 426, "type": "inline", "text": "inline", "parent": 425, "children": [], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 13}}, {"id": 427, "type": "primitive_type", "text": "void", "parent": 424, "children": [], "start_point": {"row": 126, "column": 14}, "end_point": {"row": 126, "column": 18}}, {"id": 428, "type": "pointer_declarator", "text": "*kcalloc(size_t n, size_t size, gfp_t flags)", "parent": 424, "children": [429, 430], "start_point": {"row": 126, "column": 19}, "end_point": {"row": 126, "column": 63}}, {"id": 429, "type": "*", "text": "*", "parent": 428, "children": [], "start_point": {"row": 126, "column": 19}, "end_point": {"row": 126, "column": 20}}, {"id": 430, "type": "function_declarator", "text": "kcalloc(size_t n, size_t size, gfp_t flags)", "parent": 428, "children": [431, 432], "start_point": {"row": 126, "column": 20}, "end_point": {"row": 126, "column": 63}}, {"id": 431, "type": "identifier", "text": "kcalloc", "parent": 430, "children": [], "start_point": {"row": 126, "column": 20}, "end_point": {"row": 126, "column": 27}}, {"id": 432, "type": "parameter_list", "text": "(size_t n, size_t size, gfp_t flags)", "parent": 430, "children": [433, 436, 439], "start_point": {"row": 126, "column": 27}, "end_point": {"row": 126, "column": 63}}, {"id": 433, "type": "parameter_declaration", "text": "size_t n", "parent": 432, "children": [434, 435], "start_point": {"row": 126, "column": 28}, "end_point": {"row": 126, "column": 36}}, {"id": 434, "type": "primitive_type", "text": "size_t", "parent": 433, "children": [], "start_point": {"row": 126, "column": 28}, "end_point": {"row": 126, "column": 34}}, {"id": 435, "type": "identifier", "text": "n", "parent": 433, "children": [], "start_point": {"row": 126, "column": 35}, "end_point": {"row": 126, "column": 36}}, {"id": 436, "type": "parameter_declaration", "text": "size_t size", "parent": 432, "children": [437, 438], "start_point": {"row": 126, "column": 38}, "end_point": {"row": 126, "column": 49}}, {"id": 437, "type": "primitive_type", "text": "size_t", "parent": 436, "children": [], "start_point": {"row": 126, "column": 38}, "end_point": {"row": 126, "column": 44}}, {"id": 438, "type": "identifier", "text": "size", "parent": 436, "children": [], "start_point": {"row": 126, "column": 45}, "end_point": {"row": 126, "column": 49}}, {"id": 439, "type": "parameter_declaration", "text": "gfp_t flags", "parent": 432, "children": [440, 441], "start_point": {"row": 126, "column": 51}, "end_point": {"row": 126, "column": 62}}, {"id": 440, "type": "type_identifier", "text": "gfp_t", "parent": 439, "children": [], "start_point": {"row": 126, "column": 51}, "end_point": {"row": 126, "column": 56}}, {"id": 441, "type": "identifier", "text": "flags", "parent": 439, "children": [], "start_point": {"row": 126, "column": 57}, "end_point": {"row": 126, "column": 62}}, {"id": 442, "type": "return_statement", "text": "return kmalloc_array(n, size, flags | __GFP_ZERO);", "parent": 424, "children": [443], "start_point": {"row": 128, "column": 1}, "end_point": {"row": 128, "column": 51}}, {"id": 443, "type": "call_expression", "text": "kmalloc_array(n, size, flags | __GFP_ZERO)", "parent": 442, "children": [444, 445], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 50}}, {"id": 444, "type": "identifier", "text": "kmalloc_array", "parent": 443, "children": [], "start_point": {"row": 128, "column": 8}, "end_point": {"row": 128, "column": 21}}, {"id": 445, "type": "argument_list", "text": "(n, size, flags | __GFP_ZERO)", "parent": 443, "children": [446, 447, 448], "start_point": {"row": 128, "column": 21}, "end_point": {"row": 128, "column": 50}}, {"id": 446, "type": "identifier", "text": "n", "parent": 445, "children": [], "start_point": {"row": 128, "column": 22}, "end_point": {"row": 128, "column": 23}}, {"id": 447, "type": "identifier", "text": "size", "parent": 445, "children": [], "start_point": {"row": 128, "column": 25}, "end_point": {"row": 128, "column": 29}}, {"id": 448, "type": "binary_expression", "text": "flags | __GFP_ZERO", "parent": 445, "children": [449, 450], "start_point": {"row": 128, "column": 31}, "end_point": {"row": 128, "column": 49}}, {"id": 449, "type": "identifier", "text": "flags", "parent": 448, "children": [], "start_point": {"row": 128, "column": 31}, "end_point": {"row": 128, "column": 36}}, {"id": 450, "type": "identifier", "text": "__GFP_ZERO", "parent": 448, "children": [], "start_point": {"row": 128, "column": 39}, "end_point": {"row": 128, "column": 49}}, {"id": 451, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 131, "column": 6}}]}, "node_categories": {"declarations": {"functions": [43, 59, 66, 77, 98, 116, 130, 143, 160, 173, 184, 201, 210, 221, 230, 236, 314, 320, 341, 347, 364, 370, 424, 430], "variables": [57, 62, 64, 69, 71, 80, 85, 88, 91, 96, 104, 110, 114, 119, 126, 133, 139, 141, 146, 152, 156, 163, 169, 176, 182, 187, 194, 199, 204, 208, 213, 217, 224, 227, 239, 242, 282, 323, 330, 350, 353, 373, 376, 379, 382, 433, 436, 439], "classes": [72, 73, 105, 106, 120, 121, 134, 135, 147, 148, 164, 165, 177, 178, 188, 189, 283, 284, 315, 324, 325, 342, 365, 425], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [246, 247, 252, 253, 256, 261, 266, 270, 275, 276, 278, 279, 291, 296, 297, 303, 309, 334, 338, 357, 361, 386, 387, 390, 395, 401, 402, 403, 408, 413, 419, 443, 448], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 17, 21, 25, 29, 33, 37, 41, 45, 47, 49, 50, 51, 54, 56, 60, 67, 74, 78, 84, 87, 90, 92, 95, 102, 107, 117, 122, 125, 131, 136, 140, 144, 149, 157, 161, 166, 174, 179, 185, 190, 193, 198, 202, 211, 222, 226, 228, 229, 231, 233, 237, 241, 243, 244, 245, 248, 250, 251, 254, 257, 267, 269, 271, 273, 274, 280, 281, 285, 289, 292, 294, 295, 299, 301, 304, 306, 307, 310, 312, 313, 321, 326, 329, 331, 332, 335, 337, 339, 340, 348, 352, 354, 355, 358, 360, 362, 363, 371, 375, 378, 380, 381, 384, 385, 388, 391, 393, 394, 396, 400, 404, 406, 409, 411, 414, 416, 417, 420, 422, 423, 431, 435, 438, 440, 441, 444, 446, 447, 449, 450, 451], "returns": [260, 300, 302, 308, 333, 356, 397, 412, 418, 442], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 259], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 43, "universal_type": "function", "name": "unknown", "text_snippet": "#define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \\\n\t\t\t\t(unsigned long)ZERO_SIZE_PTR)\n"}, {"node_id": 59, "universal_type": "function", "name": "unknown", "text_snippet": "kmem_cache_init(void)"}, {"node_id": 66, "universal_type": "function", "name": "unknown", "text_snippet": "slab_is_available(void)"}, {"node_id": 77, "universal_type": "function", "name": "", "text_snippet": "kmem_cache_create(const char *name, size_t size,\n\t\tsize_t align, unsigned long flags,\n\t\tvoid (*ctor)"}, {"node_id": 98, "universal_type": "function", "name": "*)", "text_snippet": "(*ctor)(struct kmem_cache *, void *)"}, {"node_id": 116, "universal_type": "function", "name": "unknown", "text_snippet": "kmem_cache_destroy(struct kmem_cache *s)"}, {"node_id": 130, "universal_type": "function", "name": "unknown", "text_snippet": "kmem_cache_alloc(struct kmem_cache *, gfp_t)"}, {"node_id": 143, "universal_type": "function", "name": "*)", "text_snippet": "kmem_cache_free(struct kmem_cache *, void *)"}, {"node_id": 160, "universal_type": "function", "name": "unknown", "text_snippet": "kmem_cache_size(struct kmem_cache *)"}, {"node_id": 173, "universal_type": "function", "name": "unknown", "text_snippet": "kmem_cache_name(struct kmem_cache *)"}, {"node_id": 184, "universal_type": "function", "name": "*ptr)", "text_snippet": "kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr)"}, {"node_id": 201, "universal_type": "function", "name": "*)", "text_snippet": "kfree(const void *)"}, {"node_id": 210, "universal_type": "function", "name": "*)", "text_snippet": "ksize(const void *)"}, {"node_id": 221, "universal_type": "function", "name": "unknown", "text_snippet": "__kmalloc(size_t size, gfp_t flags)"}, {"node_id": 230, "universal_type": "function", "name": "*kmalloc", "text_snippet": "static __always_inline void *kmalloc(size_t size, gfp_t flags)\n{\n\tif (__builtin_constant_p(size)) {\n"}, {"node_id": 236, "universal_type": "function", "name": "unknown", "text_snippet": "kmalloc(size_t size, gfp_t flags)"}, {"node_id": 314, "universal_type": "function", "name": "*kmem_cache_zalloc", "text_snippet": "static inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)\n{\n\treturn kmem_cache_alloc("}, {"node_id": 320, "universal_type": "function", "name": "unknown", "text_snippet": "kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)"}, {"node_id": 341, "universal_type": "function", "name": "*kzalloc", "text_snippet": "static inline void *kzalloc(size_t size, gfp_t flags)\n{\n\treturn kmalloc(size, flags | __GFP_ZERO);\n}"}, {"node_id": 347, "universal_type": "function", "name": "unknown", "text_snippet": "kzalloc(size_t size, gfp_t flags)"}, {"node_id": 364, "universal_type": "function", "name": "*kmalloc_array", "text_snippet": "static inline void *kmalloc_array(size_t n, size_t size, gfp_t flags)\n{\n\tsize_t bytes;\n\n\tif (unlikel"}, {"node_id": 370, "universal_type": "function", "name": "unknown", "text_snippet": "kmalloc_array(size_t n, size_t size, gfp_t flags)"}, {"node_id": 424, "universal_type": "function", "name": "*kcalloc", "text_snippet": "static inline void *kcalloc(size_t n, size_t size, gfp_t flags)\n{\n\treturn kmalloc_array(n, size, fla"}, {"node_id": 430, "universal_type": "function", "name": "unknown", "text_snippet": "kcalloc(size_t n, size_t size, gfp_t flags)"}], "class_declarations": [{"node_id": 72, "universal_type": "class", "name": "kmem_cache", "text_snippet": "struct kmem_cache"}, {"node_id": 73, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 105, "universal_type": "class", "name": "kmem_cache", "text_snippet": "struct kmem_cache"}, {"node_id": 106, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 120, "universal_type": "class", "name": "kmem_cache", "text_snippet": "struct kmem_cache"}, {"node_id": 121, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 134, "universal_type": "class", "name": "kmem_cache", "text_snippet": "struct kmem_cache"}, {"node_id": 135, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 147, "universal_type": "class", "name": "kmem_cache", "text_snippet": "struct kmem_cache"}, {"node_id": 148, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 164, "universal_type": "class", "name": "kmem_cache", "text_snippet": "struct kmem_cache"}, {"node_id": 165, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 177, "universal_type": "class", "name": "kmem_cache", "text_snippet": "struct kmem_cache"}, {"node_id": 178, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 188, "universal_type": "class", "name": "kmem_cache", "text_snippet": "struct kmem_cache"}, {"node_id": 189, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 283, "universal_type": "class", "name": "kmem_cache", "text_snippet": "struct kmem_cache"}, {"node_id": 284, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 315, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 324, "universal_type": "class", "name": "kmem_cache", "text_snippet": "struct kmem_cache"}, {"node_id": 325, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 342, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 365, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 425, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 6, "text": "#include <rtochius/gfp.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <rtochius/slab_def.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <rtochius/memory.h>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "/* SPDX-License-Identifier: GPL-2.0 */\n/*\n * Written by <NAME>, 1996 (<EMAIL>).\n *\n * (C) SGI 2006, <NAME>\n * \tCleaned up and restructured to ease the addition of alternative\n * \timplementations of SLAB allocators.\n * (C) Linux Foundation 2008-2013\n * Unified interface for all slab allocators\n */\n\n#ifndef __RTOCHIUS_SLAB_H_\n#define\t__RTOCHIUS_SLAB_H_\n\n#include <rtochius/gfp.h>\n#include <rtochius/slab_def.h>\n#include <rtochius/memory.h>\n\n#define SLAB_RED_ZONE\t\t((slab_flags_t)0x00000400U)\t/* DEBUG: Red zone objs in a cache */\n#define SLAB_POISON\t\t\t((slab_flags_t)0x00000800U)\t/* DEBUG: Poison objects */\n#define SLAB_HWCACHE_ALIGN\t((slab_flags_t)0x00002000U)\t/* Align objs on cache lines */\n#define SLAB_CACHE_DMA\t\t((slab_flags_t)0x00004000U)\t/* Use GFP_DMA memory */\n#define SLAB_STORE_USER\t\t((slab_flags_t)0x00010000U)\t/* DEBUG: Store the last owner for bug hunting */\n#define SLAB_PANIC\t\t\t((slab_flags_t)0x00040000U)\t/* Panic if kmem_cache_create() fails */\n\n/*\n * ZERO_SIZE_PTR will be returned for zero sized kmalloc requests.\n *\n * Dereferencing ZERO_SIZE_PTR will lead to a distinct access fault.\n *\n * ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can.\n * Both make kfree a no-op.\n */\n#define ZERO_SIZE_PTR ((void *)16)\n\n#define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \\\n\t\t\t\t(unsigned long)ZERO_SIZE_PTR)\n\n/*\n * Setting ARCH_SLAB_MINALIGN in arch headers allows a different alignment.\n * Intended for arches that get misalignment faults even for 64 bit integer\n * aligned buffers.\n */\n#ifndef ARCH_SLAB_MINALIGN\n#define ARCH_SLAB_MINALIGN __alignof__(unsigned long long)\n#endif\n\nvoid kmem_cache_init(void);\nint slab_is_available(void);\n\nstruct kmem_cache *kmem_cache_create(const char *name, size_t size,\n\t\tsize_t align, unsigned long flags,\n\t\tvoid (*ctor)(struct kmem_cache *, void *));\nvoid kmem_cache_destroy(struct kmem_cache *s);\nvoid *kmem_cache_alloc(struct kmem_cache *, gfp_t);\nvoid kmem_cache_free(struct kmem_cache *, void *);\n\nunsigned int kmem_cache_size(struct kmem_cache *);\nconst char *kmem_cache_name(struct kmem_cache *);\nint kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);\n\nvoid kfree(const void *);\nsize_t ksize(const void *);\n\nvoid *__kmalloc(size_t size, gfp_t flags);\n\nstatic __always_inline void *kmalloc(size_t size, gfp_t flags)\n{\n\tif (__builtin_constant_p(size)) {\n\t\tif (size > PAGE_SIZE / 2)\n\t\t\treturn (void *)__get_free_pages(flags,\n\t\t\t\t\t\t\tget_order(size));\n\n\t\tif (!(flags & GFP_DMA)) {\n\t\t\tstruct kmem_cache *s = kmalloc_slab(size);\n\n\t\t\tif (!s)\n\t\t\t\treturn ZERO_SIZE_PTR;\n\n\t\t\treturn kmem_cache_alloc(s, flags);\n\t\t}\n\t}\n\treturn __kmalloc(size, flags);\n}\n\n/*\n * Shortcuts\n */\nstatic inline void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags)\n{\n\treturn kmem_cache_alloc(k, flags | __GFP_ZERO);\n}\n\n/**\n * kzalloc - allocate memory. The memory is set to zero.\n * @size: how many bytes of memory are required.\n * @flags: the type of memory to allocate (see kmalloc).\n */\nstatic inline void *kzalloc(size_t size, gfp_t flags)\n{\n\treturn kmalloc(size, flags | __GFP_ZERO);\n}\n\n/**\n * kmalloc_array - allocate memory for an array.\n * @n: number of elements.\n * @size: element size.\n * @flags: the type of memory to allocate (see kmalloc).\n */\nstatic inline void *kmalloc_array(size_t n, size_t size, gfp_t flags)\n{\n\tsize_t bytes;\n\n\tif (unlikely(check_mul_overflow(n, size, &bytes)))\n\t\treturn NULL;\n\tif (__builtin_constant_p(n) && __builtin_constant_p(size))\n\t\treturn kmalloc(bytes, flags);\n\treturn __kmalloc(bytes, flags);\n}\n\n/**\n * kcalloc - allocate memory for an array. The memory is set to zero.\n * @n: number of elements.\n * @size: element size.\n * @flags: the type of memory to allocate (see kmalloc).\n */\nstatic inline void *kcalloc(size_t n, size_t size, gfp_t flags)\n{\n\treturn kmalloc_array(n, size, flags | __GFP_ZERO);\n}\n\n#endif /* !__RTOCHIUS_SLAB_H_ */\n"}
80
c
// // Created by buran on 12/03/18. // #ifndef TWITCHXX_API_H #define TWITCHXX_API_H #include <memory> #include <RequestOnce.h> #include <RequestWait.h> namespace TwitchXX { class UserAccessToken; class MakeRequest_Impl; class UserAccessToken; /// Main API class incapsulating access tokens and requests class Api { public: /// Construct Api object out of options map explicit Api(const options& opt); /// Get non-waitng request object (will throw TwitchException with CODE=429 - TOO MANY REQUESTS) RequestOnce reqOnce() const { return _requestOnce; } /// Get waiting request object (will wait for next time frame upon reaching the threshold) RequestWait reqWait() const { return _requestWait; } /// Get application token const std::string& getApiKey() const { return _api_key; } /// Get client secret const std::string& getClientSecret() const { return _client_secret; } private: std::shared_ptr<MakeRequest_Impl> _requestImpl; std::shared_ptr<UserAccessToken> _userToken; RequestOnce _requestOnce; RequestWait _requestWait; std::string _api_key; std::string _client_secret; }; } #endif //TWITCHXX_API_H
26.64
50
(translation_unit) "//\n// Created by buran on 12/03/18.\n//\n\n#ifndef TWITCHXX_API_H\n#define TWITCHXX_API_H\n\n#include <memory>\n\n#include <RequestOnce.h>\n#include <RequestWait.h>\n\nnamespace TwitchXX\n{\n class UserAccessToken;\n class MakeRequest_Impl;\n class UserAccessToken;\n\n /// Main API class incapsulating access tokens and requests\n class Api\n {\n public:\n /// Construct Api object out of options map\n explicit Api(const options& opt);\n\n /// Get non-waitng request object (will throw TwitchException with CODE=429 - TOO MANY REQUESTS)\n RequestOnce reqOnce() const\n {\n return _requestOnce;\n }\n\n /// Get waiting request object (will wait for next time frame upon reaching the threshold)\n RequestWait reqWait() const\n {\n return _requestWait;\n }\n\n /// Get application token\n const std::string& getApiKey() const\n {\n return _api_key;\n }\n\n /// Get client secret\n const std::string& getClientSecret() const\n {\n return _client_secret;\n }\n\n private:\n std::shared_ptr<MakeRequest_Impl> _requestImpl;\n std::shared_ptr<UserAccessToken> _userToken;\n RequestOnce _requestOnce;\n RequestWait _requestWait;\n std::string _api_key;\n std::string _client_secret;\n };\n}\n\n\n#endif //TWITCHXX_API_H\n" (comment) "//" (comment) "// Created by buran on 12/03/18." (comment) "//" (preproc_ifdef) "#ifndef TWITCHXX_API_H\n#define TWITCHXX_API_H\n\n#include <memory>\n\n#include <RequestOnce.h>\n#include <RequestWait.h>\n\nnamespace TwitchXX\n{\n class UserAccessToken;\n class MakeRequest_Impl;\n class UserAccessToken;\n\n /// Main API class incapsulating access tokens and requests\n class Api\n {\n public:\n /// Construct Api object out of options map\n explicit Api(const options& opt);\n\n /// Get non-waitng request object (will throw TwitchException with CODE=429 - TOO MANY REQUESTS)\n RequestOnce reqOnce() const\n {\n return _requestOnce;\n }\n\n /// Get waiting request object (will wait for next time frame upon reaching the threshold)\n RequestWait reqWait() const\n {\n return _requestWait;\n }\n\n /// Get application token\n const std::string& getApiKey() const\n {\n return _api_key;\n }\n\n /// Get client secret\n const std::string& getClientSecret() const\n {\n return _client_secret;\n }\n\n private:\n std::shared_ptr<MakeRequest_Impl> _requestImpl;\n std::shared_ptr<UserAccessToken> _userToken;\n RequestOnce _requestOnce;\n RequestWait _requestWait;\n std::string _api_key;\n std::string _client_secret;\n };\n}\n\n\n#endif" (#ifndef) "#ifndef" (identifier) "TWITCHXX_API_H" (preproc_def) "#define TWITCHXX_API_H\n" (#define) "#define" (identifier) "TWITCHXX_API_H" (preproc_include) "#include <memory>\n" (#include) "#include" (system_lib_string) "<memory>" (preproc_include) "#include <RequestOnce.h>\n" (#include) "#include" (system_lib_string) "<RequestOnce.h>" (preproc_include) "#include <RequestWait.h>\n" (#include) "#include" (system_lib_string) "<RequestWait.h>" (function_definition) "namespace TwitchXX\n{\n class UserAccessToken;\n class MakeRequest_Impl;\n class UserAccessToken;\n\n /// Main API class incapsulating access tokens and requests\n class Api\n {\n public:\n /// Construct Api object out of options map\n explicit Api(const options& opt);\n\n /// Get non-waitng request object (will throw TwitchException with CODE=429 - TOO MANY REQUESTS)\n RequestOnce reqOnce() const\n {\n return _requestOnce;\n }\n\n /// Get waiting request object (will wait for next time frame upon reaching the threshold)\n RequestWait reqWait() const\n {\n return _requestWait;\n }\n\n /// Get application token\n const std::string& getApiKey() const\n {\n return _api_key;\n }\n\n /// Get client secret\n const std::string& getClientSecret() const\n {\n return _client_secret;\n }\n\n private:\n std::shared_ptr<MakeRequest_Impl> _requestImpl;\n std::shared_ptr<UserAccessToken> _userToken;\n RequestOnce _requestOnce;\n RequestWait _requestWait;\n std::string _api_key;\n std::string _client_secret;\n };\n}" (type_identifier) "namespace" (identifier) "TwitchXX" (compound_statement) "{\n class UserAccessToken;\n class MakeRequest_Impl;\n class UserAccessToken;\n\n /// Main API class incapsulating access tokens and requests\n class Api\n {\n public:\n /// Construct Api object out of options map\n explicit Api(const options& opt);\n\n /// Get non-waitng request object (will throw TwitchException with CODE=429 - TOO MANY REQUESTS)\n RequestOnce reqOnce() const\n {\n return _requestOnce;\n }\n\n /// Get waiting request object (will wait for next time frame upon reaching the threshold)\n RequestWait reqWait() const\n {\n return _requestWait;\n }\n\n /// Get application token\n const std::string& getApiKey() const\n {\n return _api_key;\n }\n\n /// Get client secret\n const std::string& getClientSecret() const\n {\n return _client_secret;\n }\n\n private:\n std::shared_ptr<MakeRequest_Impl> _requestImpl;\n std::shared_ptr<UserAccessToken> _userToken;\n RequestOnce _requestOnce;\n RequestWait _requestWait;\n std::string _api_key;\n std::string _client_secret;\n };\n}" ({) "{" (declaration) "class UserAccessToken;" (type_identifier) "class" (identifier) "UserAccessToken" (;) ";" (declaration) "class MakeRequest_Impl;" (type_identifier) "class" (identifier) "MakeRequest_Impl" (;) ";" (declaration) "class UserAccessToken;" (type_identifier) "class" (identifier) "UserAccessToken" (;) ";" (comment) "/// Main API class incapsulating access tokens and requests" (function_definition) "class Api\n {\n public:\n /// Construct Api object out of options map\n explicit Api(const options& opt);\n\n /// Get non-waitng request object (will throw TwitchException with CODE=429 - TOO MANY REQUESTS)\n RequestOnce reqOnce() const\n {\n return _requestOnce;\n }\n\n /// Get waiting request object (will wait for next time frame upon reaching the threshold)\n RequestWait reqWait() const\n {\n return _requestWait;\n }\n\n /// Get application token\n const std::string& getApiKey() const\n {\n return _api_key;\n }\n\n /// Get client secret\n const std::string& getClientSecret() const\n {\n return _client_secret;\n }\n\n private:\n std::shared_ptr<MakeRequest_Impl> _requestImpl;\n std::shared_ptr<UserAccessToken> _userToken;\n RequestOnce _requestOnce;\n RequestWait _requestWait;\n std::string _api_key;\n std::string _client_secret;\n }" (type_identifier) "class" (identifier) "Api" (compound_statement) "{\n public:\n /// Construct Api object out of options map\n explicit Api(const options& opt);\n\n /// Get non-waitng request object (will throw TwitchException with CODE=429 - TOO MANY REQUESTS)\n RequestOnce reqOnce() const\n {\n return _requestOnce;\n }\n\n /// Get waiting request object (will wait for next time frame upon reaching the threshold)\n RequestWait reqWait() const\n {\n return _requestWait;\n }\n\n /// Get application token\n const std::string& getApiKey() const\n {\n return _api_key;\n }\n\n /// Get client secret\n const std::string& getClientSecret() const\n {\n return _client_secret;\n }\n\n private:\n std::shared_ptr<MakeRequest_Impl> _requestImpl;\n std::shared_ptr<UserAccessToken> _userToken;\n RequestOnce _requestOnce;\n RequestWait _requestWait;\n std::string _api_key;\n std::string _client_secret;\n }" ({) "{" (labeled_statement) "public:\n /// Construct Api object out of options map\n explicit Api(const options& opt);" (statement_identifier) "public" (:) ":" (comment) "/// Construct Api object out of options map" (declaration) "explicit Api(const options& opt);" (type_identifier) "explicit" (function_declarator) "Api(const options& opt)" (identifier) "Api" (parameter_list) "(const options& opt)" (() "(" (parameter_declaration) "const options& opt" (type_qualifier) "const" (const) "const" (type_identifier) "options" (ERROR) "&" (&) "&" (identifier) "opt" ()) ")" (;) ";" (comment) "/// Get non-waitng request object (will throw TwitchException with CODE=429 - TOO MANY REQUESTS)" (ERROR) "RequestOnce reqOnce() const" (type_identifier) "RequestOnce" (function_declarator) "reqOnce()" (identifier) "reqOnce" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return _requestOnce;\n }" ({) "{" (return_statement) "return _requestOnce;" (return) "return" (identifier) "_requestOnce" (;) ";" (}) "}" (comment) "/// Get waiting request object (will wait for next time frame upon reaching the threshold)" (ERROR) "RequestWait reqWait() const" (type_identifier) "RequestWait" (function_declarator) "reqWait()" (identifier) "reqWait" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return _requestWait;\n }" ({) "{" (return_statement) "return _requestWait;" (return) "return" (identifier) "_requestWait" (;) ";" (}) "}" (comment) "/// Get application token" (ERROR) "const std::string& getApiKey() const" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (function_declarator) "getApiKey()" (identifier) "getApiKey" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return _api_key;\n }" ({) "{" (return_statement) "return _api_key;" (return) "return" (identifier) "_api_key" (;) ";" (}) "}" (comment) "/// Get client secret" (ERROR) "const std::string& getClientSecret() const" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string&" (:) ":" (:) ":" (identifier) "string" (&) "&" (function_declarator) "getClientSecret()" (identifier) "getClientSecret" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n return _client_secret;\n }" ({) "{" (return_statement) "return _client_secret;" (return) "return" (identifier) "_client_secret" (;) ";" (}) "}" (labeled_statement) "private:\n std::shared_ptr<MakeRequest_Impl> _requestImpl;" (statement_identifier) "private" (:) ":" (labeled_statement) "std::shared_ptr<MakeRequest_Impl> _requestImpl;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "shared_ptr<MakeRequest_Impl> _requestImpl;" (binary_expression) "shared_ptr<MakeRequest_Impl> _requestImpl" (binary_expression) "shared_ptr<MakeRequest_Impl" (identifier) "shared_ptr" (<) "<" (identifier) "MakeRequest_Impl" (>) ">" (identifier) "_requestImpl" (;) ";" (labeled_statement) "std::shared_ptr<UserAccessToken> _userToken;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (expression_statement) "shared_ptr<UserAccessToken> _userToken;" (binary_expression) "shared_ptr<UserAccessToken> _userToken" (binary_expression) "shared_ptr<UserAccessToken" (identifier) "shared_ptr" (<) "<" (identifier) "UserAccessToken" (>) ">" (identifier) "_userToken" (;) ";" (declaration) "RequestOnce _requestOnce;" (type_identifier) "RequestOnce" (identifier) "_requestOnce" (;) ";" (declaration) "RequestWait _requestWait;" (type_identifier) "RequestWait" (identifier) "_requestWait" (;) ";" (labeled_statement) "std::string _api_key;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string _api_key;" (type_identifier) "string" (identifier) "_api_key" (;) ";" (labeled_statement) "std::string _client_secret;" (statement_identifier) "std" (:) ":" (ERROR) ":" (:) ":" (declaration) "string _client_secret;" (type_identifier) "string" (identifier) "_client_secret" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (#endif) "#endif" (comment) "//TWITCHXX_API_H"
206
11
{"language": "c", "success": true, "metadata": {"lines": 50, "avg_line_length": 26.64, "nodes": 103, "errors": 0, "source_hash": "de3a157972935d8d23bc635c6eaebe6950efa97ba84c1d0502a24331359a8fd3", "categorized_nodes": 80}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef TWITCHXX_API_H\n#define TWITCHXX_API_H\n\n#include <memory>\n\n#include <RequestOnce.h>\n#include <RequestWait.h>\n\nnamespace TwitchXX\n{\n class UserAccessToken;\n class MakeRequest_Impl;\n class UserAccessToken;\n\n /// Main API class incapsulating access tokens and requests\n class Api\n {\n public:\n /// Construct Api object out of options map\n explicit Api(const options& opt);\n\n /// Get non-waitng request object (will throw TwitchException with CODE=429 - TOO MANY REQUESTS)\n RequestOnce reqOnce() const\n {\n return _requestOnce;\n }\n\n /// Get waiting request object (will wait for next time frame upon reaching the threshold)\n RequestWait reqWait() const\n {\n return _requestWait;\n }\n\n /// Get application token\n const std::string& getApiKey() const\n {\n return _api_key;\n }\n\n /// Get client secret\n const std::string& getClientSecret() const\n {\n return _client_secret;\n }\n\n private:\n std::shared_ptr<MakeRequest_Impl> _requestImpl;\n std::shared_ptr<UserAccessToken> _userToken;\n RequestOnce _requestOnce;\n RequestWait _requestWait;\n std::string _api_key;\n std::string _client_secret;\n };\n}\n\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 102], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 60, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 2, "type": "identifier", "text": "TWITCHXX_API_H", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 22}}, {"id": 3, "type": "preproc_def", "text": "#define TWITCHXX_API_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": "TWITCHXX_API_H", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include <memory>\n", "parent": 0, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 8, "type": "system_lib_string", "text": "<memory>", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 17}}, {"id": 9, "type": "preproc_include", "text": "#include <RequestOnce.h>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 10, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<RequestOnce.h>", "parent": 9, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 24}}, {"id": 12, "type": "preproc_include", "text": "#include <RequestWait.h>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<RequestWait.h>", "parent": 12, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 24}}, {"id": 15, "type": "function_definition", "text": "namespace TwitchXX\n{\n class UserAccessToken;\n class MakeRequest_Impl;\n class UserAccessToken;\n\n /// Main API class incapsulating access tokens and requests\n class Api\n {\n public:\n /// Construct Api object out of options map\n explicit Api(const options& opt);\n\n /// Get non-waitng request object (will throw TwitchException with CODE=429 - TOO MANY REQUESTS)\n RequestOnce reqOnce() const\n {\n return _requestOnce;\n }\n\n /// Get waiting request object (will wait for next time frame upon reaching the threshold)\n RequestWait reqWait() const\n {\n return _requestWait;\n }\n\n /// Get application token\n const std::string& getApiKey() const\n {\n return _api_key;\n }\n\n /// Get client secret\n const std::string& getClientSecret() const\n {\n return _client_secret;\n }\n\n private:\n std::shared_ptr<MakeRequest_Impl> _requestImpl;\n std::shared_ptr<UserAccessToken> _userToken;\n RequestOnce _requestOnce;\n RequestWait _requestWait;\n std::string _api_key;\n std::string _client_secret;\n };\n}", "parent": 0, "children": [16, 17], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 57, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 9}}, {"id": 17, "type": "identifier", "text": "TwitchXX", "parent": 15, "children": [], "start_point": {"row": 12, "column": 10}, "end_point": {"row": 12, "column": 18}}, {"id": 18, "type": "declaration", "text": "class UserAccessToken;", "parent": 15, "children": [19], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 26}}, {"id": 19, "type": "identifier", "text": "UserAccessToken", "parent": 18, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 25}}, {"id": 20, "type": "declaration", "text": "class MakeRequest_Impl;", "parent": 15, "children": [21], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 27}}, {"id": 21, "type": "identifier", "text": "MakeRequest_Impl", "parent": 20, "children": [], "start_point": {"row": 15, "column": 10}, "end_point": {"row": 15, "column": 26}}, {"id": 22, "type": "declaration", "text": "class UserAccessToken;", "parent": 15, "children": [23], "start_point": {"row": 16, "column": 4}, "end_point": {"row": 16, "column": 26}}, {"id": 23, "type": "identifier", "text": "UserAccessToken", "parent": 22, "children": [], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 25}}, {"id": 24, "type": "function_definition", "text": "class Api\n {\n public:\n /// Construct Api object out of options map\n explicit Api(const options& opt);\n\n /// Get non-waitng request object (will throw TwitchException with CODE=429 - TOO MANY REQUESTS)\n RequestOnce reqOnce() const\n {\n return _requestOnce;\n }\n\n /// Get waiting request object (will wait for next time frame upon reaching the threshold)\n RequestWait reqWait() const\n {\n return _requestWait;\n }\n\n /// Get application token\n const std::string& getApiKey() const\n {\n return _api_key;\n }\n\n /// Get client secret\n const std::string& getClientSecret() const\n {\n return _client_secret;\n }\n\n private:\n std::shared_ptr<MakeRequest_Impl> _requestImpl;\n std::shared_ptr<UserAccessToken> _userToken;\n RequestOnce _requestOnce;\n RequestWait _requestWait;\n std::string _api_key;\n std::string _client_secret;\n }", "parent": 15, "children": [25], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 56, "column": 5}}, {"id": 25, "type": "identifier", "text": "Api", "parent": 24, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 13}}, {"id": 26, "type": "labeled_statement", "text": "public:\n /// Construct Api object out of options map\n explicit Api(const options& opt);", "parent": 24, "children": [27], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 23, "column": 41}}, {"id": 27, "type": "declaration", "text": "explicit Api(const options& opt);", "parent": 26, "children": [28, 29], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 41}}, {"id": 28, "type": "type_identifier", "text": "explicit", "parent": 27, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 16}}, {"id": 29, "type": "function_declarator", "text": "Api(const options& opt)", "parent": 27, "children": [30, 31], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 40}}, {"id": 30, "type": "identifier", "text": "Api", "parent": 29, "children": [], "start_point": {"row": 23, "column": 17}, "end_point": {"row": 23, "column": 20}}, {"id": 31, "type": "parameter_list", "text": "(const options& opt)", "parent": 29, "children": [32], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 40}}, {"id": 32, "type": "parameter_declaration", "text": "const options& opt", "parent": 31, "children": [33, 34], "start_point": {"row": 23, "column": 21}, "end_point": {"row": 23, "column": 39}}, {"id": 33, "type": "type_identifier", "text": "options", "parent": 32, "children": [], "start_point": {"row": 23, "column": 27}, "end_point": {"row": 23, "column": 34}}, {"id": 34, "type": "identifier", "text": "opt", "parent": 32, "children": [], "start_point": {"row": 23, "column": 36}, "end_point": {"row": 23, "column": 39}}, {"id": 35, "type": "ERROR", "text": "RequestOnce reqOnce() const", "parent": 24, "children": [36, 37], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 35}}, {"id": 36, "type": "type_identifier", "text": "RequestOnce", "parent": 35, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 19}}, {"id": 37, "type": "function_declarator", "text": "reqOnce()", "parent": 35, "children": [38, 39], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 29}}, {"id": 38, "type": "identifier", "text": "reqOnce", "parent": 37, "children": [], "start_point": {"row": 26, "column": 20}, "end_point": {"row": 26, "column": 27}}, {"id": 39, "type": "parameter_list", "text": "()", "parent": 37, "children": [], "start_point": {"row": 26, "column": 27}, "end_point": {"row": 26, "column": 29}}, {"id": 40, "type": "return_statement", "text": "return _requestOnce;", "parent": 24, "children": [41], "start_point": {"row": 28, "column": 12}, "end_point": {"row": 28, "column": 32}}, {"id": 41, "type": "identifier", "text": "_requestOnce", "parent": 40, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 31}}, {"id": 42, "type": "ERROR", "text": "RequestWait reqWait() const", "parent": 24, "children": [43, 44], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 35}}, {"id": 43, "type": "type_identifier", "text": "RequestWait", "parent": 42, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 19}}, {"id": 44, "type": "function_declarator", "text": "reqWait()", "parent": 42, "children": [45, 46], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 29}}, {"id": 45, "type": "identifier", "text": "reqWait", "parent": 44, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 27}}, {"id": 46, "type": "parameter_list", "text": "()", "parent": 44, "children": [], "start_point": {"row": 32, "column": 27}, "end_point": {"row": 32, "column": 29}}, {"id": 47, "type": "return_statement", "text": "return _requestWait;", "parent": 24, "children": [48], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 32}}, {"id": 48, "type": "identifier", "text": "_requestWait", "parent": 47, "children": [], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 31}}, {"id": 49, "type": "ERROR", "text": "const std::string& getApiKey() const", "parent": 24, "children": [50, 51, 53], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 44}}, {"id": 50, "type": "type_identifier", "text": "std", "parent": 49, "children": [], "start_point": {"row": 38, "column": 14}, "end_point": {"row": 38, "column": 17}}, {"id": 51, "type": "ERROR", "text": "::string&", "parent": 49, "children": [52], "start_point": {"row": 38, "column": 17}, "end_point": {"row": 38, "column": 26}}, {"id": 52, "type": "identifier", "text": "string", "parent": 51, "children": [], "start_point": {"row": 38, "column": 19}, "end_point": {"row": 38, "column": 25}}, {"id": 53, "type": "function_declarator", "text": "getApiKey()", "parent": 49, "children": [54, 55], "start_point": {"row": 38, "column": 27}, "end_point": {"row": 38, "column": 38}}, {"id": 54, "type": "identifier", "text": "getApiKey", "parent": 53, "children": [], "start_point": {"row": 38, "column": 27}, "end_point": {"row": 38, "column": 36}}, {"id": 55, "type": "parameter_list", "text": "()", "parent": 53, "children": [], "start_point": {"row": 38, "column": 36}, "end_point": {"row": 38, "column": 38}}, {"id": 56, "type": "return_statement", "text": "return _api_key;", "parent": 24, "children": [57], "start_point": {"row": 40, "column": 12}, "end_point": {"row": 40, "column": 28}}, {"id": 57, "type": "identifier", "text": "_api_key", "parent": 56, "children": [], "start_point": {"row": 40, "column": 19}, "end_point": {"row": 40, "column": 27}}, {"id": 58, "type": "ERROR", "text": "const std::string& getClientSecret() const", "parent": 24, "children": [59, 60, 62], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 50}}, {"id": 59, "type": "type_identifier", "text": "std", "parent": 58, "children": [], "start_point": {"row": 44, "column": 14}, "end_point": {"row": 44, "column": 17}}, {"id": 60, "type": "ERROR", "text": "::string&", "parent": 58, "children": [61], "start_point": {"row": 44, "column": 17}, "end_point": {"row": 44, "column": 26}}, {"id": 61, "type": "identifier", "text": "string", "parent": 60, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 25}}, {"id": 62, "type": "function_declarator", "text": "getClientSecret()", "parent": 58, "children": [63, 64], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 44}}, {"id": 63, "type": "identifier", "text": "getClientSecret", "parent": 62, "children": [], "start_point": {"row": 44, "column": 27}, "end_point": {"row": 44, "column": 42}}, {"id": 64, "type": "parameter_list", "text": "()", "parent": 62, "children": [], "start_point": {"row": 44, "column": 42}, "end_point": {"row": 44, "column": 44}}, {"id": 65, "type": "return_statement", "text": "return _client_secret;", "parent": 24, "children": [66], "start_point": {"row": 46, "column": 12}, "end_point": {"row": 46, "column": 34}}, {"id": 66, "type": "identifier", "text": "_client_secret", "parent": 65, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 33}}, {"id": 67, "type": "labeled_statement", "text": "private:\n std::shared_ptr<MakeRequest_Impl> _requestImpl;", "parent": 24, "children": [68], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 50, "column": 55}}, {"id": 68, "type": "labeled_statement", "text": "std::shared_ptr<MakeRequest_Impl> _requestImpl;", "parent": 67, "children": [69], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 55}}, {"id": 69, "type": "statement_identifier", "text": "std", "parent": 68, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 11}}, {"id": 70, "type": "binary_expression", "text": "shared_ptr<MakeRequest_Impl> _requestImpl", "parent": 68, "children": [71, 75, 76], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 54}}, {"id": 71, "type": "binary_expression", "text": "shared_ptr<MakeRequest_Impl", "parent": 70, "children": [72, 73, 74], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 40}}, {"id": 72, "type": "identifier", "text": "shared_ptr", "parent": 71, "children": [], "start_point": {"row": 50, "column": 13}, "end_point": {"row": 50, "column": 23}}, {"id": 73, "type": "<", "text": "<", "parent": 71, "children": [], "start_point": {"row": 50, "column": 23}, "end_point": {"row": 50, "column": 24}}, {"id": 74, "type": "identifier", "text": "MakeRequest_Impl", "parent": 71, "children": [], "start_point": {"row": 50, "column": 24}, "end_point": {"row": 50, "column": 40}}, {"id": 75, "type": ">", "text": ">", "parent": 70, "children": [], "start_point": {"row": 50, "column": 40}, "end_point": {"row": 50, "column": 41}}, {"id": 76, "type": "identifier", "text": "_requestImpl", "parent": 70, "children": [], "start_point": {"row": 50, "column": 42}, "end_point": {"row": 50, "column": 54}}, {"id": 77, "type": "labeled_statement", "text": "std::shared_ptr<UserAccessToken> _userToken;", "parent": 24, "children": [78], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 52}}, {"id": 78, "type": "statement_identifier", "text": "std", "parent": 77, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 11}}, {"id": 79, "type": "binary_expression", "text": "shared_ptr<UserAccessToken> _userToken", "parent": 77, "children": [80, 84, 85], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 51}}, {"id": 80, "type": "binary_expression", "text": "shared_ptr<UserAccessToken", "parent": 79, "children": [81, 82, 83], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 39}}, {"id": 81, "type": "identifier", "text": "shared_ptr", "parent": 80, "children": [], "start_point": {"row": 51, "column": 13}, "end_point": {"row": 51, "column": 23}}, {"id": 82, "type": "<", "text": "<", "parent": 80, "children": [], "start_point": {"row": 51, "column": 23}, "end_point": {"row": 51, "column": 24}}, {"id": 83, "type": "identifier", "text": "UserAccessToken", "parent": 80, "children": [], "start_point": {"row": 51, "column": 24}, "end_point": {"row": 51, "column": 39}}, {"id": 84, "type": ">", "text": ">", "parent": 79, "children": [], "start_point": {"row": 51, "column": 39}, "end_point": {"row": 51, "column": 40}}, {"id": 85, "type": "identifier", "text": "_userToken", "parent": 79, "children": [], "start_point": {"row": 51, "column": 41}, "end_point": {"row": 51, "column": 51}}, {"id": 86, "type": "declaration", "text": "RequestOnce _requestOnce;", "parent": 24, "children": [87, 88], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 33}}, {"id": 87, "type": "type_identifier", "text": "RequestOnce", "parent": 86, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 19}}, {"id": 88, "type": "identifier", "text": "_requestOnce", "parent": 86, "children": [], "start_point": {"row": 52, "column": 20}, "end_point": {"row": 52, "column": 32}}, {"id": 89, "type": "declaration", "text": "RequestWait _requestWait;", "parent": 24, "children": [90, 91], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 33}}, {"id": 90, "type": "type_identifier", "text": "RequestWait", "parent": 89, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 19}}, {"id": 91, "type": "identifier", "text": "_requestWait", "parent": 89, "children": [], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 32}}, {"id": 92, "type": "labeled_statement", "text": "std::string _api_key;", "parent": 24, "children": [93, 94], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 29}}, {"id": 93, "type": "statement_identifier", "text": "std", "parent": 92, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 11}}, {"id": 94, "type": "declaration", "text": "string _api_key;", "parent": 92, "children": [95, 96], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 29}}, {"id": 95, "type": "type_identifier", "text": "string", "parent": 94, "children": [], "start_point": {"row": 54, "column": 13}, "end_point": {"row": 54, "column": 19}}, {"id": 96, "type": "identifier", "text": "_api_key", "parent": 94, "children": [], "start_point": {"row": 54, "column": 20}, "end_point": {"row": 54, "column": 28}}, {"id": 97, "type": "labeled_statement", "text": "std::string _client_secret;", "parent": 24, "children": [98, 99], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 35}}, {"id": 98, "type": "statement_identifier", "text": "std", "parent": 97, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 11}}, {"id": 99, "type": "declaration", "text": "string _client_secret;", "parent": 97, "children": [100, 101], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 35}}, {"id": 100, "type": "type_identifier", "text": "string", "parent": 99, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 19}}, {"id": 101, "type": "identifier", "text": "_client_secret", "parent": 99, "children": [], "start_point": {"row": 55, "column": 20}, "end_point": {"row": 55, "column": 34}}, {"id": 102, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 60, "column": 0}, "end_point": {"row": 60, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 24, 29, 37, 44, 53, 62], "variables": [18, 20, 22, 27, 32, 86, 89, 94, 99], "classes": [], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [70, 71, 79, 80], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 16, 17, 19, 21, 23, 25, 28, 30, 33, 34, 36, 38, 41, 43, 45, 48, 50, 52, 54, 57, 59, 61, 63, 66, 69, 72, 74, 76, 78, 81, 83, 85, 87, 88, 90, 91, 93, 95, 96, 98, 100, 101, 102], "returns": [40, 47, 56, 65], "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": "UserAccessToken;", "text_snippet": "namespace TwitchXX\n{\n class UserAccessToken;\n class MakeRequest_Impl;\n class UserAccessToke"}, {"node_id": 24, "universal_type": "function", "name": "Api", "text_snippet": "class Api\n {\n public:\n /// Construct Api object out of options map\n explicit Api"}, {"node_id": 29, "universal_type": "function", "name": "unknown", "text_snippet": "Api(const options& opt)"}, {"node_id": 37, "universal_type": "function", "name": "unknown", "text_snippet": "reqOnce()"}, {"node_id": 44, "universal_type": "function", "name": "unknown", "text_snippet": "reqWait()"}, {"node_id": 53, "universal_type": "function", "name": "unknown", "text_snippet": "getApiKey()"}, {"node_id": 62, "universal_type": "function", "name": "unknown", "text_snippet": "getClientSecret()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <memory>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <RequestOnce.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <RequestWait.h>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "//\n// Created by buran on 12/03/18.\n//\n\n#ifndef TWITCHXX_API_H\n#define TWITCHXX_API_H\n\n#include <memory>\n\n#include <RequestOnce.h>\n#include <RequestWait.h>\n\nnamespace TwitchXX\n{\n class UserAccessToken;\n class MakeRequest_Impl;\n class UserAccessToken;\n\n /// Main API class incapsulating access tokens and requests\n class Api\n {\n public:\n /// Construct Api object out of options map\n explicit Api(const options& opt);\n\n /// Get non-waitng request object (will throw TwitchException with CODE=429 - TOO MANY REQUESTS)\n RequestOnce reqOnce() const\n {\n return _requestOnce;\n }\n\n /// Get waiting request object (will wait for next time frame upon reaching the threshold)\n RequestWait reqWait() const\n {\n return _requestWait;\n }\n\n /// Get application token\n const std::string& getApiKey() const\n {\n return _api_key;\n }\n\n /// Get client secret\n const std::string& getClientSecret() const\n {\n return _client_secret;\n }\n\n private:\n std::shared_ptr<MakeRequest_Impl> _requestImpl;\n std::shared_ptr<UserAccessToken> _userToken;\n RequestOnce _requestOnce;\n RequestWait _requestWait;\n std::string _api_key;\n std::string _client_secret;\n };\n}\n\n\n#endif //TWITCHXX_API_H\n"}
81
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. * *************************************************************/ #include "system.h" #include <osl/mutex.h> #include <osl/diagnose.h> #include <pthread.h> #include <stdlib.h> #if defined LINUX /* bad hack */ int pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int); #define pthread_mutexattr_settype pthread_mutexattr_setkind_np #define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP #endif /* Implementation notes: oslMutex hides a pointer to the oslMutexImpl structure, which ist needed to manage recursive locks on a mutex. */ typedef struct _oslMutexImpl { pthread_mutex_t mutex; } oslMutexImpl; /*****************************************************************************/ /* osl_createMutex */ /*****************************************************************************/ oslMutex SAL_CALL osl_createMutex() { oslMutexImpl* pMutex = (oslMutexImpl*) malloc(sizeof(oslMutexImpl)); pthread_mutexattr_t aMutexAttr; int nRet=0; OSL_ASSERT(pMutex); if ( pMutex == NULL ) { return 0; } pthread_mutexattr_init(&aMutexAttr); nRet = pthread_mutexattr_settype(&aMutexAttr, PTHREAD_MUTEX_RECURSIVE); nRet = pthread_mutex_init(&(pMutex->mutex), &aMutexAttr); if ( nRet != 0 ) { OSL_TRACE("osl_createMutex : mutex init failed. Errno: %d; %s\n", nRet, strerror(nRet)); free(pMutex); pMutex = NULL; } pthread_mutexattr_destroy(&aMutexAttr); return (oslMutex) pMutex; } /*****************************************************************************/ /* osl_destroyMutex */ /*****************************************************************************/ void SAL_CALL osl_destroyMutex(oslMutex Mutex) { oslMutexImpl* pMutex = (oslMutexImpl*) Mutex; OSL_ASSERT(pMutex); if ( pMutex != NULL ) { int nRet=0; nRet = pthread_mutex_destroy(&(pMutex->mutex)); if ( nRet != 0 ) { OSL_TRACE("osl_destroyMutex : mutex destroy failed. Errno: %d; %s\n", nRet, strerror(nRet)); } free(pMutex); } return; } /*****************************************************************************/ /* osl_acquireMutex */ /*****************************************************************************/ sal_Bool SAL_CALL osl_acquireMutex(oslMutex Mutex) { oslMutexImpl* pMutex = (oslMutexImpl*) Mutex; OSL_ASSERT(pMutex); if ( pMutex != NULL ) { int nRet=0; nRet = pthread_mutex_lock(&(pMutex->mutex)); if ( nRet != 0 ) { OSL_TRACE("osl_acquireMutex : mutex lock failed. Errno: %d; %s\n", nRet, strerror(nRet)); return sal_False; } return sal_True; } /* not initialized */ return sal_False; } /*****************************************************************************/ /* osl_tryToAcquireMutex */ /*****************************************************************************/ sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex Mutex) { oslMutexImpl* pMutex = (oslMutexImpl*) Mutex; OSL_ASSERT(pMutex); if ( pMutex ) { int nRet = 0; nRet = pthread_mutex_trylock(&(pMutex->mutex)); if ( nRet != 0 ) return sal_False; return sal_True; } /* not initialized */ return sal_False; } /*****************************************************************************/ /* osl_releaseMutex */ /*****************************************************************************/ sal_Bool SAL_CALL osl_releaseMutex(oslMutex Mutex) { oslMutexImpl* pMutex = (oslMutexImpl*) Mutex; OSL_ASSERT(pMutex); if ( pMutex ) { int nRet=0; nRet = pthread_mutex_unlock(&(pMutex->mutex)); if ( nRet != 0 ) { OSL_TRACE("osl_releaseMutex : mutex unlock failed. Errno: %d; %s\n", nRet, strerror(nRet)); return sal_False; } return sal_True; } /* not initialized */ return sal_False; } /*****************************************************************************/ /* osl_getGlobalMutex */ /*****************************************************************************/ static oslMutexImpl globalMutexImpl; static void globalMutexInitImpl(void) { pthread_mutexattr_t attr; if (pthread_mutexattr_init(&attr) != 0 || pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) || pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0 || pthread_mutexattr_destroy(&attr) != 0) { abort(); } } oslMutex * SAL_CALL osl_getGlobalMutex() { /* necessary to get a "oslMutex *" */ static oslMutex globalMutex = (oslMutex) &globalMutexImpl; static pthread_once_t once = PTHREAD_ONCE_INIT; if (pthread_once(&once, &globalMutexInitImpl) != 0) { abort(); } return &globalMutex; }
29.52
189
(translation_unit) "/**************************************************************\n * \n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * "License"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n * \n *************************************************************/\n\n\n\n#include "system.h"\n\n#include <osl/mutex.h>\n#include <osl/diagnose.h>\n\n#include <pthread.h>\n#include <stdlib.h>\n\n#if defined LINUX /* bad hack */\nint pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int);\n#define pthread_mutexattr_settype pthread_mutexattr_setkind_np\n#define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP\n#endif\n\n/*\n Implementation notes:\n oslMutex hides a pointer to the oslMutexImpl structure, which\n ist needed to manage recursive locks on a mutex.\n \n*/\n\ntypedef struct _oslMutexImpl\n{\n pthread_mutex_t mutex;\n} oslMutexImpl;\n\n\n/*****************************************************************************/\n/* osl_createMutex */\n/*****************************************************************************/\noslMutex SAL_CALL osl_createMutex() \n{\n oslMutexImpl* pMutex = (oslMutexImpl*) malloc(sizeof(oslMutexImpl));\n pthread_mutexattr_t aMutexAttr;\n int nRet=0;\n \n OSL_ASSERT(pMutex);\n\n if ( pMutex == NULL )\n {\n return 0;\n }\n \n pthread_mutexattr_init(&aMutexAttr);\n\n nRet = pthread_mutexattr_settype(&aMutexAttr, PTHREAD_MUTEX_RECURSIVE);\n \n nRet = pthread_mutex_init(&(pMutex->mutex), &aMutexAttr);\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_createMutex : mutex init failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n \n free(pMutex);\n pMutex = NULL;\n }\n\n pthread_mutexattr_destroy(&aMutexAttr);\n \n return (oslMutex) pMutex;\n}\n\n/*****************************************************************************/\n/* osl_destroyMutex */\n/*****************************************************************************/\nvoid SAL_CALL osl_destroyMutex(oslMutex Mutex)\n{\n oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n\n OSL_ASSERT(pMutex);\n \n if ( pMutex != NULL )\n {\n int nRet=0;\n \n nRet = pthread_mutex_destroy(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_destroyMutex : mutex destroy failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n }\n\n free(pMutex);\n }\n \n return;\n}\n\n/*****************************************************************************/\n/* osl_acquireMutex */\n/*****************************************************************************/\nsal_Bool SAL_CALL osl_acquireMutex(oslMutex Mutex) \n{\n oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n \n OSL_ASSERT(pMutex);\n\n if ( pMutex != NULL )\n {\n int nRet=0;\n \n nRet = pthread_mutex_lock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_acquireMutex : mutex lock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }\n return sal_True; \n }\n\n /* not initialized */\n return sal_False;\n}\n\n/*****************************************************************************/\n/* osl_tryToAcquireMutex */\n/*****************************************************************************/\nsal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex Mutex) \n{\n oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n\n OSL_ASSERT(pMutex);\n\n if ( pMutex ) \n {\n int nRet = 0;\n nRet = pthread_mutex_trylock(&(pMutex->mutex));\n if ( nRet != 0 )\n return sal_False;\n \n return sal_True;\n }\n \n /* not initialized */\n return sal_False;\n}\n\n/*****************************************************************************/\n/* osl_releaseMutex */\n/*****************************************************************************/\nsal_Bool SAL_CALL osl_releaseMutex(oslMutex Mutex) \n{\n oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n \n OSL_ASSERT(pMutex);\n\n if ( pMutex ) \n {\n int nRet=0;\n nRet = pthread_mutex_unlock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_releaseMutex : mutex unlock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }\n \n return sal_True;\n } \n\n /* not initialized */\n return sal_False;\n}\n\n/*****************************************************************************/\n/* osl_getGlobalMutex */\n/*****************************************************************************/\n\nstatic oslMutexImpl globalMutexImpl;\n\nstatic void globalMutexInitImpl(void) {\n pthread_mutexattr_t attr;\n if (pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) ||\n pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0 ||\n pthread_mutexattr_destroy(&attr) != 0)\n {\n abort();\n }\n}\n\noslMutex * SAL_CALL osl_getGlobalMutex() \n{\n /* necessary to get a "oslMutex *" */\n static oslMutex globalMutex = (oslMutex) &globalMutexImpl;\n\n static pthread_once_t once = PTHREAD_ONCE_INIT;\n if (pthread_once(&once, &globalMutexInitImpl) != 0) {\n abort();\n }\n \n return &globalMutex;\n}\n" (comment) "/**************************************************************\n * \n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * "License"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n * \n *************************************************************/" (preproc_include) "#include "system.h"\n" (#include) "#include" (string_literal) ""system.h"" (") """ (string_content) "system.h" (") """ (preproc_include) "#include <osl/mutex.h>\n" (#include) "#include" (system_lib_string) "<osl/mutex.h>" (preproc_include) "#include <osl/diagnose.h>\n" (#include) "#include" (system_lib_string) "<osl/diagnose.h>" (preproc_include) "#include <pthread.h>\n" (#include) "#include" (system_lib_string) "<pthread.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (preproc_if) "#if defined LINUX /* bad hack */\nint pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int);\n#define pthread_mutexattr_settype pthread_mutexattr_setkind_np\n#define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP\n#endif" (#if) "#if" (preproc_defined) "defined LINUX" (defined) "defined" (identifier) "LINUX" (comment) "/* bad hack */" ( ) "\n" (declaration) "int pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int);" (primitive_type) "int" (function_declarator) "pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int)" (identifier) "pthread_mutexattr_setkind_np" (parameter_list) "(pthread_mutexattr_t *, int)" (() "(" (parameter_declaration) "pthread_mutexattr_t *" (type_identifier) "pthread_mutexattr_t" (abstract_pointer_declarator) "*" (*) "*" (,) "," (parameter_declaration) "int" (primitive_type) "int" ()) ")" (;) ";" (preproc_def) "#define pthread_mutexattr_settype pthread_mutexattr_setkind_np\n" (#define) "#define" (identifier) "pthread_mutexattr_settype" (preproc_arg) "pthread_mutexattr_setkind_np" (preproc_def) "#define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP\n" (#define) "#define" (identifier) "PTHREAD_MUTEX_RECURSIVE" (preproc_arg) "PTHREAD_MUTEX_RECURSIVE_NP" (#endif) "#endif" (comment) "/*\n Implementation notes:\n oslMutex hides a pointer to the oslMutexImpl structure, which\n ist needed to manage recursive locks on a mutex.\n \n*/" (type_definition) "typedef struct _oslMutexImpl\n{\n pthread_mutex_t mutex;\n} oslMutexImpl;" (typedef) "typedef" (struct_specifier) "struct _oslMutexImpl\n{\n pthread_mutex_t mutex;\n}" (struct) "struct" (type_identifier) "_oslMutexImpl" (field_declaration_list) "{\n pthread_mutex_t mutex;\n}" ({) "{" (field_declaration) "pthread_mutex_t mutex;" (type_identifier) "pthread_mutex_t" (field_identifier) "mutex" (;) ";" (}) "}" (type_identifier) "oslMutexImpl" (;) ";" (comment) "/*****************************************************************************/" (comment) "/* osl_createMutex */" (comment) "/*****************************************************************************/" (function_definition) "oslMutex SAL_CALL osl_createMutex() \n{\n oslMutexImpl* pMutex = (oslMutexImpl*) malloc(sizeof(oslMutexImpl));\n pthread_mutexattr_t aMutexAttr;\n int nRet=0;\n \n OSL_ASSERT(pMutex);\n\n if ( pMutex == NULL )\n {\n return 0;\n }\n \n pthread_mutexattr_init(&aMutexAttr);\n\n nRet = pthread_mutexattr_settype(&aMutexAttr, PTHREAD_MUTEX_RECURSIVE);\n \n nRet = pthread_mutex_init(&(pMutex->mutex), &aMutexAttr);\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_createMutex : mutex init failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n \n free(pMutex);\n pMutex = NULL;\n }\n\n pthread_mutexattr_destroy(&aMutexAttr);\n \n return (oslMutex) pMutex;\n}" (type_identifier) "oslMutex" (ERROR) "SAL_CALL" (identifier) "SAL_CALL" (function_declarator) "osl_createMutex()" (identifier) "osl_createMutex" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n oslMutexImpl* pMutex = (oslMutexImpl*) malloc(sizeof(oslMutexImpl));\n pthread_mutexattr_t aMutexAttr;\n int nRet=0;\n \n OSL_ASSERT(pMutex);\n\n if ( pMutex == NULL )\n {\n return 0;\n }\n \n pthread_mutexattr_init(&aMutexAttr);\n\n nRet = pthread_mutexattr_settype(&aMutexAttr, PTHREAD_MUTEX_RECURSIVE);\n \n nRet = pthread_mutex_init(&(pMutex->mutex), &aMutexAttr);\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_createMutex : mutex init failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n \n free(pMutex);\n pMutex = NULL;\n }\n\n pthread_mutexattr_destroy(&aMutexAttr);\n \n return (oslMutex) pMutex;\n}" ({) "{" (declaration) "oslMutexImpl* pMutex = (oslMutexImpl*) malloc(sizeof(oslMutexImpl));" (type_identifier) "oslMutexImpl" (init_declarator) "* pMutex = (oslMutexImpl*) malloc(sizeof(oslMutexImpl))" (pointer_declarator) "* pMutex" (*) "*" (identifier) "pMutex" (=) "=" (cast_expression) "(oslMutexImpl*) malloc(sizeof(oslMutexImpl))" (() "(" (type_descriptor) "oslMutexImpl*" (type_identifier) "oslMutexImpl" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (call_expression) "malloc(sizeof(oslMutexImpl))" (identifier) "malloc" (argument_list) "(sizeof(oslMutexImpl))" (() "(" (sizeof_expression) "sizeof(oslMutexImpl)" (sizeof) "sizeof" (parenthesized_expression) "(oslMutexImpl)" (() "(" (identifier) "oslMutexImpl" ()) ")" ()) ")" (;) ";" (declaration) "pthread_mutexattr_t aMutexAttr;" (type_identifier) "pthread_mutexattr_t" (identifier) "aMutexAttr" (;) ";" (declaration) "int nRet=0;" (primitive_type) "int" (init_declarator) "nRet=0" (identifier) "nRet" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "OSL_ASSERT(pMutex);" (call_expression) "OSL_ASSERT(pMutex)" (identifier) "OSL_ASSERT" (argument_list) "(pMutex)" (() "(" (identifier) "pMutex" ()) ")" (;) ";" (if_statement) "if ( pMutex == NULL )\n {\n return 0;\n }" (if) "if" (parenthesized_expression) "( pMutex == NULL )" (() "(" (binary_expression) "pMutex == NULL" (identifier) "pMutex" (==) "==" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n return 0;\n }" ({) "{" (return_statement) "return 0;" (return) "return" (number_literal) "0" (;) ";" (}) "}" (expression_statement) "pthread_mutexattr_init(&aMutexAttr);" (call_expression) "pthread_mutexattr_init(&aMutexAttr)" (identifier) "pthread_mutexattr_init" (argument_list) "(&aMutexAttr)" (() "(" (pointer_expression) "&aMutexAttr" (&) "&" (identifier) "aMutexAttr" ()) ")" (;) ";" (expression_statement) "nRet = pthread_mutexattr_settype(&aMutexAttr, PTHREAD_MUTEX_RECURSIVE);" (assignment_expression) "nRet = pthread_mutexattr_settype(&aMutexAttr, PTHREAD_MUTEX_RECURSIVE)" (identifier) "nRet" (=) "=" (call_expression) "pthread_mutexattr_settype(&aMutexAttr, PTHREAD_MUTEX_RECURSIVE)" (identifier) "pthread_mutexattr_settype" (argument_list) "(&aMutexAttr, PTHREAD_MUTEX_RECURSIVE)" (() "(" (pointer_expression) "&aMutexAttr" (&) "&" (identifier) "aMutexAttr" (,) "," (identifier) "PTHREAD_MUTEX_RECURSIVE" ()) ")" (;) ";" (expression_statement) "nRet = pthread_mutex_init(&(pMutex->mutex), &aMutexAttr);" (assignment_expression) "nRet = pthread_mutex_init(&(pMutex->mutex), &aMutexAttr)" (identifier) "nRet" (=) "=" (call_expression) "pthread_mutex_init(&(pMutex->mutex), &aMutexAttr)" (identifier) "pthread_mutex_init" (argument_list) "(&(pMutex->mutex), &aMutexAttr)" (() "(" (pointer_expression) "&(pMutex->mutex)" (&) "&" (parenthesized_expression) "(pMutex->mutex)" (() "(" (field_expression) "pMutex->mutex" (identifier) "pMutex" (->) "->" (field_identifier) "mutex" ()) ")" (,) "," (pointer_expression) "&aMutexAttr" (&) "&" (identifier) "aMutexAttr" ()) ")" (;) ";" (if_statement) "if ( nRet != 0 )\n {\n OSL_TRACE("osl_createMutex : mutex init failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n \n free(pMutex);\n pMutex = NULL;\n }" (if) "if" (parenthesized_expression) "( nRet != 0 )" (() "(" (binary_expression) "nRet != 0" (identifier) "nRet" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n OSL_TRACE("osl_createMutex : mutex init failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n \n free(pMutex);\n pMutex = NULL;\n }" ({) "{" (expression_statement) "OSL_TRACE("osl_createMutex : mutex init failed. Errno: %d; %s\n", \n nRet, strerror(nRet));" (call_expression) "OSL_TRACE("osl_createMutex : mutex init failed. Errno: %d; %s\n", \n nRet, strerror(nRet))" (identifier) "OSL_TRACE" (argument_list) "("osl_createMutex : mutex init failed. Errno: %d; %s\n", \n nRet, strerror(nRet))" (() "(" (string_literal) ""osl_createMutex : mutex init failed. Errno: %d; %s\n"" (") """ (string_content) "osl_createMutex : mutex init failed. Errno: %d; %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "nRet" (,) "," (call_expression) "strerror(nRet)" (identifier) "strerror" (argument_list) "(nRet)" (() "(" (identifier) "nRet" ()) ")" ()) ")" (;) ";" (expression_statement) "free(pMutex);" (call_expression) "free(pMutex)" (identifier) "free" (argument_list) "(pMutex)" (() "(" (identifier) "pMutex" ()) ")" (;) ";" (expression_statement) "pMutex = NULL;" (assignment_expression) "pMutex = NULL" (identifier) "pMutex" (=) "=" (null) "NULL" (NULL) "NULL" (;) ";" (}) "}" (expression_statement) "pthread_mutexattr_destroy(&aMutexAttr);" (call_expression) "pthread_mutexattr_destroy(&aMutexAttr)" (identifier) "pthread_mutexattr_destroy" (argument_list) "(&aMutexAttr)" (() "(" (pointer_expression) "&aMutexAttr" (&) "&" (identifier) "aMutexAttr" ()) ")" (;) ";" (return_statement) "return (oslMutex) pMutex;" (return) "return" (cast_expression) "(oslMutex) pMutex" (() "(" (type_descriptor) "oslMutex" (type_identifier) "oslMutex" ()) ")" (identifier) "pMutex" (;) ";" (}) "}" (comment) "/*****************************************************************************/" (comment) "/* osl_destroyMutex */" (comment) "/*****************************************************************************/" (function_definition) "void SAL_CALL osl_destroyMutex(oslMutex Mutex)\n{\n oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n\n OSL_ASSERT(pMutex);\n \n if ( pMutex != NULL )\n {\n int nRet=0;\n \n nRet = pthread_mutex_destroy(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_destroyMutex : mutex destroy failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n }\n\n free(pMutex);\n }\n \n return;\n}" (primitive_type) "void" (ERROR) "SAL_CALL" (identifier) "SAL_CALL" (function_declarator) "osl_destroyMutex(oslMutex Mutex)" (identifier) "osl_destroyMutex" (parameter_list) "(oslMutex Mutex)" (() "(" (parameter_declaration) "oslMutex Mutex" (type_identifier) "oslMutex" (identifier) "Mutex" ()) ")" (compound_statement) "{\n oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n\n OSL_ASSERT(pMutex);\n \n if ( pMutex != NULL )\n {\n int nRet=0;\n \n nRet = pthread_mutex_destroy(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_destroyMutex : mutex destroy failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n }\n\n free(pMutex);\n }\n \n return;\n}" ({) "{" (declaration) "oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;" (type_identifier) "oslMutexImpl" (init_declarator) "* pMutex = (oslMutexImpl*) Mutex" (pointer_declarator) "* pMutex" (*) "*" (identifier) "pMutex" (=) "=" (cast_expression) "(oslMutexImpl*) Mutex" (() "(" (type_descriptor) "oslMutexImpl*" (type_identifier) "oslMutexImpl" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "Mutex" (;) ";" (expression_statement) "OSL_ASSERT(pMutex);" (call_expression) "OSL_ASSERT(pMutex)" (identifier) "OSL_ASSERT" (argument_list) "(pMutex)" (() "(" (identifier) "pMutex" ()) ")" (;) ";" (if_statement) "if ( pMutex != NULL )\n {\n int nRet=0;\n \n nRet = pthread_mutex_destroy(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_destroyMutex : mutex destroy failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n }\n\n free(pMutex);\n }" (if) "if" (parenthesized_expression) "( pMutex != NULL )" (() "(" (binary_expression) "pMutex != NULL" (identifier) "pMutex" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n int nRet=0;\n \n nRet = pthread_mutex_destroy(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_destroyMutex : mutex destroy failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n }\n\n free(pMutex);\n }" ({) "{" (declaration) "int nRet=0;" (primitive_type) "int" (init_declarator) "nRet=0" (identifier) "nRet" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "nRet = pthread_mutex_destroy(&(pMutex->mutex));" (assignment_expression) "nRet = pthread_mutex_destroy(&(pMutex->mutex))" (identifier) "nRet" (=) "=" (call_expression) "pthread_mutex_destroy(&(pMutex->mutex))" (identifier) "pthread_mutex_destroy" (argument_list) "(&(pMutex->mutex))" (() "(" (pointer_expression) "&(pMutex->mutex)" (&) "&" (parenthesized_expression) "(pMutex->mutex)" (() "(" (field_expression) "pMutex->mutex" (identifier) "pMutex" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (if_statement) "if ( nRet != 0 )\n {\n OSL_TRACE("osl_destroyMutex : mutex destroy failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n }" (if) "if" (parenthesized_expression) "( nRet != 0 )" (() "(" (binary_expression) "nRet != 0" (identifier) "nRet" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n OSL_TRACE("osl_destroyMutex : mutex destroy failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n }" ({) "{" (expression_statement) "OSL_TRACE("osl_destroyMutex : mutex destroy failed. Errno: %d; %s\n", \n nRet, strerror(nRet));" (call_expression) "OSL_TRACE("osl_destroyMutex : mutex destroy failed. Errno: %d; %s\n", \n nRet, strerror(nRet))" (identifier) "OSL_TRACE" (argument_list) "("osl_destroyMutex : mutex destroy failed. Errno: %d; %s\n", \n nRet, strerror(nRet))" (() "(" (string_literal) ""osl_destroyMutex : mutex destroy failed. Errno: %d; %s\n"" (") """ (string_content) "osl_destroyMutex : mutex destroy failed. Errno: %d; %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "nRet" (,) "," (call_expression) "strerror(nRet)" (identifier) "strerror" (argument_list) "(nRet)" (() "(" (identifier) "nRet" ()) ")" ()) ")" (;) ";" (}) "}" (expression_statement) "free(pMutex);" (call_expression) "free(pMutex)" (identifier) "free" (argument_list) "(pMutex)" (() "(" (identifier) "pMutex" ()) ")" (;) ";" (}) "}" (return_statement) "return;" (return) "return" (;) ";" (}) "}" (comment) "/*****************************************************************************/" (comment) "/* osl_acquireMutex */" (comment) "/*****************************************************************************/" (function_definition) "sal_Bool SAL_CALL osl_acquireMutex(oslMutex Mutex) \n{\n oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n \n OSL_ASSERT(pMutex);\n\n if ( pMutex != NULL )\n {\n int nRet=0;\n \n nRet = pthread_mutex_lock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_acquireMutex : mutex lock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }\n return sal_True; \n }\n\n /* not initialized */\n return sal_False;\n}" (type_identifier) "sal_Bool" (ERROR) "SAL_CALL" (identifier) "SAL_CALL" (function_declarator) "osl_acquireMutex(oslMutex Mutex)" (identifier) "osl_acquireMutex" (parameter_list) "(oslMutex Mutex)" (() "(" (parameter_declaration) "oslMutex Mutex" (type_identifier) "oslMutex" (identifier) "Mutex" ()) ")" (compound_statement) "{\n oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n \n OSL_ASSERT(pMutex);\n\n if ( pMutex != NULL )\n {\n int nRet=0;\n \n nRet = pthread_mutex_lock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_acquireMutex : mutex lock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }\n return sal_True; \n }\n\n /* not initialized */\n return sal_False;\n}" ({) "{" (declaration) "oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;" (type_identifier) "oslMutexImpl" (init_declarator) "* pMutex = (oslMutexImpl*) Mutex" (pointer_declarator) "* pMutex" (*) "*" (identifier) "pMutex" (=) "=" (cast_expression) "(oslMutexImpl*) Mutex" (() "(" (type_descriptor) "oslMutexImpl*" (type_identifier) "oslMutexImpl" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "Mutex" (;) ";" (expression_statement) "OSL_ASSERT(pMutex);" (call_expression) "OSL_ASSERT(pMutex)" (identifier) "OSL_ASSERT" (argument_list) "(pMutex)" (() "(" (identifier) "pMutex" ()) ")" (;) ";" (if_statement) "if ( pMutex != NULL )\n {\n int nRet=0;\n \n nRet = pthread_mutex_lock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_acquireMutex : mutex lock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }\n return sal_True; \n }" (if) "if" (parenthesized_expression) "( pMutex != NULL )" (() "(" (binary_expression) "pMutex != NULL" (identifier) "pMutex" (!=) "!=" (null) "NULL" (NULL) "NULL" ()) ")" (compound_statement) "{\n int nRet=0;\n \n nRet = pthread_mutex_lock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_acquireMutex : mutex lock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }\n return sal_True; \n }" ({) "{" (declaration) "int nRet=0;" (primitive_type) "int" (init_declarator) "nRet=0" (identifier) "nRet" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "nRet = pthread_mutex_lock(&(pMutex->mutex));" (assignment_expression) "nRet = pthread_mutex_lock(&(pMutex->mutex))" (identifier) "nRet" (=) "=" (call_expression) "pthread_mutex_lock(&(pMutex->mutex))" (identifier) "pthread_mutex_lock" (argument_list) "(&(pMutex->mutex))" (() "(" (pointer_expression) "&(pMutex->mutex)" (&) "&" (parenthesized_expression) "(pMutex->mutex)" (() "(" (field_expression) "pMutex->mutex" (identifier) "pMutex" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (if_statement) "if ( nRet != 0 )\n {\n OSL_TRACE("osl_acquireMutex : mutex lock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }" (if) "if" (parenthesized_expression) "( nRet != 0 )" (() "(" (binary_expression) "nRet != 0" (identifier) "nRet" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n OSL_TRACE("osl_acquireMutex : mutex lock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }" ({) "{" (expression_statement) "OSL_TRACE("osl_acquireMutex : mutex lock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));" (call_expression) "OSL_TRACE("osl_acquireMutex : mutex lock failed. Errno: %d; %s\n", \n nRet, strerror(nRet))" (identifier) "OSL_TRACE" (argument_list) "("osl_acquireMutex : mutex lock failed. Errno: %d; %s\n", \n nRet, strerror(nRet))" (() "(" (string_literal) ""osl_acquireMutex : mutex lock failed. Errno: %d; %s\n"" (") """ (string_content) "osl_acquireMutex : mutex lock failed. Errno: %d; %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "nRet" (,) "," (call_expression) "strerror(nRet)" (identifier) "strerror" (argument_list) "(nRet)" (() "(" (identifier) "nRet" ()) ")" ()) ")" (;) ";" (return_statement) "return sal_False;" (return) "return" (identifier) "sal_False" (;) ";" (}) "}" (return_statement) "return sal_True;" (return) "return" (identifier) "sal_True" (;) ";" (}) "}" (comment) "/* not initialized */" (return_statement) "return sal_False;" (return) "return" (identifier) "sal_False" (;) ";" (}) "}" (comment) "/*****************************************************************************/" (comment) "/* osl_tryToAcquireMutex */" (comment) "/*****************************************************************************/" (function_definition) "sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex Mutex) \n{\n oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n\n OSL_ASSERT(pMutex);\n\n if ( pMutex ) \n {\n int nRet = 0;\n nRet = pthread_mutex_trylock(&(pMutex->mutex));\n if ( nRet != 0 )\n return sal_False;\n \n return sal_True;\n }\n \n /* not initialized */\n return sal_False;\n}" (type_identifier) "sal_Bool" (ERROR) "SAL_CALL" (identifier) "SAL_CALL" (function_declarator) "osl_tryToAcquireMutex(oslMutex Mutex)" (identifier) "osl_tryToAcquireMutex" (parameter_list) "(oslMutex Mutex)" (() "(" (parameter_declaration) "oslMutex Mutex" (type_identifier) "oslMutex" (identifier) "Mutex" ()) ")" (compound_statement) "{\n oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n\n OSL_ASSERT(pMutex);\n\n if ( pMutex ) \n {\n int nRet = 0;\n nRet = pthread_mutex_trylock(&(pMutex->mutex));\n if ( nRet != 0 )\n return sal_False;\n \n return sal_True;\n }\n \n /* not initialized */\n return sal_False;\n}" ({) "{" (declaration) "oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;" (type_identifier) "oslMutexImpl" (init_declarator) "* pMutex = (oslMutexImpl*) Mutex" (pointer_declarator) "* pMutex" (*) "*" (identifier) "pMutex" (=) "=" (cast_expression) "(oslMutexImpl*) Mutex" (() "(" (type_descriptor) "oslMutexImpl*" (type_identifier) "oslMutexImpl" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "Mutex" (;) ";" (expression_statement) "OSL_ASSERT(pMutex);" (call_expression) "OSL_ASSERT(pMutex)" (identifier) "OSL_ASSERT" (argument_list) "(pMutex)" (() "(" (identifier) "pMutex" ()) ")" (;) ";" (if_statement) "if ( pMutex ) \n {\n int nRet = 0;\n nRet = pthread_mutex_trylock(&(pMutex->mutex));\n if ( nRet != 0 )\n return sal_False;\n \n return sal_True;\n }" (if) "if" (parenthesized_expression) "( pMutex )" (() "(" (identifier) "pMutex" ()) ")" (compound_statement) "{\n int nRet = 0;\n nRet = pthread_mutex_trylock(&(pMutex->mutex));\n if ( nRet != 0 )\n return sal_False;\n \n return sal_True;\n }" ({) "{" (declaration) "int nRet = 0;" (primitive_type) "int" (init_declarator) "nRet = 0" (identifier) "nRet" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "nRet = pthread_mutex_trylock(&(pMutex->mutex));" (assignment_expression) "nRet = pthread_mutex_trylock(&(pMutex->mutex))" (identifier) "nRet" (=) "=" (call_expression) "pthread_mutex_trylock(&(pMutex->mutex))" (identifier) "pthread_mutex_trylock" (argument_list) "(&(pMutex->mutex))" (() "(" (pointer_expression) "&(pMutex->mutex)" (&) "&" (parenthesized_expression) "(pMutex->mutex)" (() "(" (field_expression) "pMutex->mutex" (identifier) "pMutex" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (if_statement) "if ( nRet != 0 )\n return sal_False;" (if) "if" (parenthesized_expression) "( nRet != 0 )" (() "(" (binary_expression) "nRet != 0" (identifier) "nRet" (!=) "!=" (number_literal) "0" ()) ")" (return_statement) "return sal_False;" (return) "return" (identifier) "sal_False" (;) ";" (return_statement) "return sal_True;" (return) "return" (identifier) "sal_True" (;) ";" (}) "}" (comment) "/* not initialized */" (return_statement) "return sal_False;" (return) "return" (identifier) "sal_False" (;) ";" (}) "}" (comment) "/*****************************************************************************/" (comment) "/* osl_releaseMutex */" (comment) "/*****************************************************************************/" (function_definition) "sal_Bool SAL_CALL osl_releaseMutex(oslMutex Mutex) \n{\n oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n \n OSL_ASSERT(pMutex);\n\n if ( pMutex ) \n {\n int nRet=0;\n nRet = pthread_mutex_unlock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_releaseMutex : mutex unlock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }\n \n return sal_True;\n } \n\n /* not initialized */\n return sal_False;\n}" (type_identifier) "sal_Bool" (ERROR) "SAL_CALL" (identifier) "SAL_CALL" (function_declarator) "osl_releaseMutex(oslMutex Mutex)" (identifier) "osl_releaseMutex" (parameter_list) "(oslMutex Mutex)" (() "(" (parameter_declaration) "oslMutex Mutex" (type_identifier) "oslMutex" (identifier) "Mutex" ()) ")" (compound_statement) "{\n oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n \n OSL_ASSERT(pMutex);\n\n if ( pMutex ) \n {\n int nRet=0;\n nRet = pthread_mutex_unlock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_releaseMutex : mutex unlock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }\n \n return sal_True;\n } \n\n /* not initialized */\n return sal_False;\n}" ({) "{" (declaration) "oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;" (type_identifier) "oslMutexImpl" (init_declarator) "* pMutex = (oslMutexImpl*) Mutex" (pointer_declarator) "* pMutex" (*) "*" (identifier) "pMutex" (=) "=" (cast_expression) "(oslMutexImpl*) Mutex" (() "(" (type_descriptor) "oslMutexImpl*" (type_identifier) "oslMutexImpl" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "Mutex" (;) ";" (expression_statement) "OSL_ASSERT(pMutex);" (call_expression) "OSL_ASSERT(pMutex)" (identifier) "OSL_ASSERT" (argument_list) "(pMutex)" (() "(" (identifier) "pMutex" ()) ")" (;) ";" (if_statement) "if ( pMutex ) \n {\n int nRet=0;\n nRet = pthread_mutex_unlock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_releaseMutex : mutex unlock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }\n \n return sal_True;\n }" (if) "if" (parenthesized_expression) "( pMutex )" (() "(" (identifier) "pMutex" ()) ")" (compound_statement) "{\n int nRet=0;\n nRet = pthread_mutex_unlock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE("osl_releaseMutex : mutex unlock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }\n \n return sal_True;\n }" ({) "{" (declaration) "int nRet=0;" (primitive_type) "int" (init_declarator) "nRet=0" (identifier) "nRet" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "nRet = pthread_mutex_unlock(&(pMutex->mutex));" (assignment_expression) "nRet = pthread_mutex_unlock(&(pMutex->mutex))" (identifier) "nRet" (=) "=" (call_expression) "pthread_mutex_unlock(&(pMutex->mutex))" (identifier) "pthread_mutex_unlock" (argument_list) "(&(pMutex->mutex))" (() "(" (pointer_expression) "&(pMutex->mutex)" (&) "&" (parenthesized_expression) "(pMutex->mutex)" (() "(" (field_expression) "pMutex->mutex" (identifier) "pMutex" (->) "->" (field_identifier) "mutex" ()) ")" ()) ")" (;) ";" (if_statement) "if ( nRet != 0 )\n {\n OSL_TRACE("osl_releaseMutex : mutex unlock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }" (if) "if" (parenthesized_expression) "( nRet != 0 )" (() "(" (binary_expression) "nRet != 0" (identifier) "nRet" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n OSL_TRACE("osl_releaseMutex : mutex unlock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));\n return sal_False;\n }" ({) "{" (expression_statement) "OSL_TRACE("osl_releaseMutex : mutex unlock failed. Errno: %d; %s\n", \n nRet, strerror(nRet));" (call_expression) "OSL_TRACE("osl_releaseMutex : mutex unlock failed. Errno: %d; %s\n", \n nRet, strerror(nRet))" (identifier) "OSL_TRACE" (argument_list) "("osl_releaseMutex : mutex unlock failed. Errno: %d; %s\n", \n nRet, strerror(nRet))" (() "(" (string_literal) ""osl_releaseMutex : mutex unlock failed. Errno: %d; %s\n"" (") """ (string_content) "osl_releaseMutex : mutex unlock failed. Errno: %d; %s" (escape_sequence) "\n" (") """ (,) "," (identifier) "nRet" (,) "," (call_expression) "strerror(nRet)" (identifier) "strerror" (argument_list) "(nRet)" (() "(" (identifier) "nRet" ()) ")" ()) ")" (;) ";" (return_statement) "return sal_False;" (return) "return" (identifier) "sal_False" (;) ";" (}) "}" (return_statement) "return sal_True;" (return) "return" (identifier) "sal_True" (;) ";" (}) "}" (comment) "/* not initialized */" (return_statement) "return sal_False;" (return) "return" (identifier) "sal_False" (;) ";" (}) "}" (comment) "/*****************************************************************************/" (comment) "/* osl_getGlobalMutex */" (comment) "/*****************************************************************************/" (declaration) "static oslMutexImpl globalMutexImpl;" (storage_class_specifier) "static" (static) "static" (type_identifier) "oslMutexImpl" (identifier) "globalMutexImpl" (;) ";" (function_definition) "static void globalMutexInitImpl(void) {\n pthread_mutexattr_t attr;\n if (pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) ||\n pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0 ||\n pthread_mutexattr_destroy(&attr) != 0)\n {\n abort();\n }\n}" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "globalMutexInitImpl(void)" (identifier) "globalMutexInitImpl" (parameter_list) "(void)" (() "(" (parameter_declaration) "void" (primitive_type) "void" ()) ")" (compound_statement) "{\n pthread_mutexattr_t attr;\n if (pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) ||\n pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0 ||\n pthread_mutexattr_destroy(&attr) != 0)\n {\n abort();\n }\n}" ({) "{" (declaration) "pthread_mutexattr_t attr;" (type_identifier) "pthread_mutexattr_t" (identifier) "attr" (;) ";" (if_statement) "if (pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) ||\n pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0 ||\n pthread_mutexattr_destroy(&attr) != 0)\n {\n abort();\n }" (if) "if" (parenthesized_expression) "(pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) ||\n pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0 ||\n pthread_mutexattr_destroy(&attr) != 0)" (() "(" (binary_expression) "pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) ||\n pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0 ||\n pthread_mutexattr_destroy(&attr) != 0" (binary_expression) "pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) ||\n pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0" (binary_expression) "pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)" (binary_expression) "pthread_mutexattr_init(&attr) != 0" (call_expression) "pthread_mutexattr_init(&attr)" (identifier) "pthread_mutexattr_init" (argument_list) "(&attr)" (() "(" (pointer_expression) "&attr" (&) "&" (identifier) "attr" ()) ")" (!=) "!=" (number_literal) "0" (||) "||" (call_expression) "pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)" (identifier) "pthread_mutexattr_settype" (argument_list) "(&attr, PTHREAD_MUTEX_RECURSIVE)" (() "(" (pointer_expression) "&attr" (&) "&" (identifier) "attr" (,) "," (identifier) "PTHREAD_MUTEX_RECURSIVE" ()) ")" (||) "||" (binary_expression) "pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0" (call_expression) "pthread_mutex_init(&globalMutexImpl.mutex, &attr)" (identifier) "pthread_mutex_init" (argument_list) "(&globalMutexImpl.mutex, &attr)" (() "(" (pointer_expression) "&globalMutexImpl.mutex" (&) "&" (field_expression) "globalMutexImpl.mutex" (identifier) "globalMutexImpl" (.) "." (field_identifier) "mutex" (,) "," (pointer_expression) "&attr" (&) "&" (identifier) "attr" ()) ")" (!=) "!=" (number_literal) "0" (||) "||" (binary_expression) "pthread_mutexattr_destroy(&attr) != 0" (call_expression) "pthread_mutexattr_destroy(&attr)" (identifier) "pthread_mutexattr_destroy" (argument_list) "(&attr)" (() "(" (pointer_expression) "&attr" (&) "&" (identifier) "attr" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n abort();\n }" ({) "{" (expression_statement) "abort();" (call_expression) "abort()" (identifier) "abort" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (}) "}" (ERROR) "oslMutex * SAL_CALL osl_getGlobalMutex()" (binary_expression) "oslMutex * SAL_CALL osl_getGlobalMutex()" (identifier) "oslMutex" (*) "*" (ERROR) "SAL_CALL" (identifier) "SAL_CALL" (call_expression) "osl_getGlobalMutex()" (identifier) "osl_getGlobalMutex" (argument_list) "()" (() "(" ()) ")" (compound_statement) "{\n /* necessary to get a "oslMutex *" */\n static oslMutex globalMutex = (oslMutex) &globalMutexImpl;\n\n static pthread_once_t once = PTHREAD_ONCE_INIT;\n if (pthread_once(&once, &globalMutexInitImpl) != 0) {\n abort();\n }\n \n return &globalMutex;\n}" ({) "{" (comment) "/* necessary to get a "oslMutex *" */" (declaration) "static oslMutex globalMutex = (oslMutex) &globalMutexImpl;" (storage_class_specifier) "static" (static) "static" (type_identifier) "oslMutex" (init_declarator) "globalMutex = (oslMutex) &globalMutexImpl" (identifier) "globalMutex" (=) "=" (binary_expression) "(oslMutex) &globalMutexImpl" (parenthesized_expression) "(oslMutex)" (() "(" (identifier) "oslMutex" ()) ")" (&) "&" (identifier) "globalMutexImpl" (;) ";" (declaration) "static pthread_once_t once = PTHREAD_ONCE_INIT;" (storage_class_specifier) "static" (static) "static" (type_identifier) "pthread_once_t" (init_declarator) "once = PTHREAD_ONCE_INIT" (identifier) "once" (=) "=" (identifier) "PTHREAD_ONCE_INIT" (;) ";" (if_statement) "if (pthread_once(&once, &globalMutexInitImpl) != 0) {\n abort();\n }" (if) "if" (parenthesized_expression) "(pthread_once(&once, &globalMutexInitImpl) != 0)" (() "(" (binary_expression) "pthread_once(&once, &globalMutexInitImpl) != 0" (call_expression) "pthread_once(&once, &globalMutexInitImpl)" (identifier) "pthread_once" (argument_list) "(&once, &globalMutexInitImpl)" (() "(" (pointer_expression) "&once" (&) "&" (identifier) "once" (,) "," (pointer_expression) "&globalMutexInitImpl" (&) "&" (identifier) "globalMutexInitImpl" ()) ")" (!=) "!=" (number_literal) "0" ()) ")" (compound_statement) "{\n abort();\n }" ({) "{" (expression_statement) "abort();" (call_expression) "abort()" (identifier) "abort" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (return_statement) "return &globalMutex;" (return) "return" (pointer_expression) "&globalMutex" (&) "&" (identifier) "globalMutex" (;) ";" (}) "}"
905
7
{"language": "c", "success": true, "metadata": {"lines": 189, "avg_line_length": 29.52, "nodes": 532, "errors": 0, "source_hash": "253134518ad0d4fdd822dd21828366ff21fffdddf981259bcaff23303bee9444", "categorized_nodes": 379}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"system.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": "\"system.h\"", "parent": 0, "children": [], "start_point": {"row": 23, "column": 9}, "end_point": {"row": 23, "column": 19}}, {"id": 3, "type": "preproc_include", "text": "#include <osl/mutex.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": "<osl/mutex.h>", "parent": 3, "children": [], "start_point": {"row": 25, "column": 9}, "end_point": {"row": 25, "column": 22}}, {"id": 6, "type": "preproc_include", "text": "#include <osl/diagnose.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": "<osl/diagnose.h>", "parent": 6, "children": [], "start_point": {"row": 26, "column": 9}, "end_point": {"row": 26, "column": 25}}, {"id": 9, "type": "preproc_include", "text": "#include <pthread.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": "<pthread.h>", "parent": 9, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 20}}, {"id": 12, "type": "preproc_include", "text": "#include <stdlib.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": "<stdlib.h>", "parent": 12, "children": [], "start_point": {"row": 29, "column": 9}, "end_point": {"row": 29, "column": 19}}, {"id": 15, "type": "preproc_if", "text": "#if defined LINUX /* bad hack */\nint pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int);\n#define pthread_mutexattr_settype pthread_mutexattr_setkind_np\n#define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP\n#endif", "parent": null, "children": [16, 17, 20, 21, 32, 36, 40], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 35, "column": 6}}, {"id": 16, "type": "#if", "text": "#if", "parent": 15, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 3}}, {"id": 17, "type": "preproc_defined", "text": "defined LINUX", "parent": 15, "children": [18, 19], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 17}}, {"id": 18, "type": "defined", "text": "defined", "parent": 17, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 11}}, {"id": 19, "type": "identifier", "text": "LINUX", "parent": 17, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 17}}, {"id": 20, "type": "\n", "text": "\n", "parent": 15, "children": [], "start_point": {"row": 31, "column": 32}, "end_point": {"row": 32, "column": 0}}, {"id": 21, "type": "declaration", "text": "int pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int);", "parent": 15, "children": [22, 23], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 61}}, {"id": 22, "type": "primitive_type", "text": "int", "parent": 21, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 3}}, {"id": 23, "type": "function_declarator", "text": "pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int)", "parent": 21, "children": [24, 25], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 60}}, {"id": 24, "type": "identifier", "text": "pthread_mutexattr_setkind_np", "parent": 23, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 32}}, {"id": 25, "type": "parameter_list", "text": "(pthread_mutexattr_t *, int)", "parent": 23, "children": [26, 30], "start_point": {"row": 32, "column": 32}, "end_point": {"row": 32, "column": 60}}, {"id": 26, "type": "parameter_declaration", "text": "pthread_mutexattr_t *", "parent": 25, "children": [27, 28], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 54}}, {"id": 27, "type": "type_identifier", "text": "pthread_mutexattr_t", "parent": 26, "children": [], "start_point": {"row": 32, "column": 33}, "end_point": {"row": 32, "column": 52}}, {"id": 28, "type": "abstract_pointer_declarator", "text": "*", "parent": 26, "children": [29], "start_point": {"row": 32, "column": 53}, "end_point": {"row": 32, "column": 54}}, {"id": 29, "type": "*", "text": "*", "parent": 28, "children": [], "start_point": {"row": 32, "column": 53}, "end_point": {"row": 32, "column": 54}}, {"id": 30, "type": "parameter_declaration", "text": "int", "parent": 25, "children": [31], "start_point": {"row": 32, "column": 56}, "end_point": {"row": 32, "column": 59}}, {"id": 31, "type": "primitive_type", "text": "int", "parent": 30, "children": [], "start_point": {"row": 32, "column": 56}, "end_point": {"row": 32, "column": 59}}, {"id": 32, "type": "preproc_def", "text": "#define pthread_mutexattr_settype pthread_mutexattr_setkind_np\n", "parent": 15, "children": [33, 34, 35], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 33, "type": "#define", "text": "#define", "parent": 32, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 34, "type": "identifier", "text": "pthread_mutexattr_settype", "parent": 32, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 33}}, {"id": 35, "type": "preproc_arg", "text": "pthread_mutexattr_setkind_np", "parent": 32, "children": [], "start_point": {"row": 33, "column": 34}, "end_point": {"row": 33, "column": 62}}, {"id": 36, "type": "preproc_def", "text": "#define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP\n", "parent": 15, "children": [37, 38, 39], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 37, "type": "#define", "text": "#define", "parent": 36, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 7}}, {"id": 38, "type": "identifier", "text": "PTHREAD_MUTEX_RECURSIVE", "parent": 36, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 31}}, {"id": 39, "type": "preproc_arg", "text": "PTHREAD_MUTEX_RECURSIVE_NP", "parent": 36, "children": [], "start_point": {"row": 34, "column": 32}, "end_point": {"row": 34, "column": 58}}, {"id": 40, "type": "#endif", "text": "#endif", "parent": 15, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 6}}, {"id": 41, "type": "type_definition", "text": "typedef struct _oslMutexImpl\n{\n\tpthread_mutex_t\tmutex;\n} oslMutexImpl;", "parent": null, "children": [42, 43, 49], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 47, "column": 15}}, {"id": 42, "type": "typedef", "text": "typedef", "parent": 41, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 43, "type": "struct_specifier", "text": "struct _oslMutexImpl\n{\n\tpthread_mutex_t\tmutex;\n}", "parent": 41, "children": [44, 45], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 47, "column": 1}}, {"id": 44, "type": "struct", "text": "struct", "parent": 43, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 14}}, {"id": 45, "type": "type_identifier", "text": "_oslMutexImpl", "parent": 43, "children": [], "start_point": {"row": 44, "column": 15}, "end_point": {"row": 44, "column": 28}}, {"id": 46, "type": "field_declaration", "text": "pthread_mutex_t\tmutex;", "parent": 43, "children": [47, 48], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 23}}, {"id": 47, "type": "type_identifier", "text": "pthread_mutex_t", "parent": 46, "children": [], "start_point": {"row": 46, "column": 1}, "end_point": {"row": 46, "column": 16}}, {"id": 48, "type": "field_identifier", "text": "mutex", "parent": 46, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 22}}, {"id": 49, "type": "type_identifier", "text": "oslMutexImpl", "parent": 41, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 14}}, {"id": 50, "type": "function_definition", "text": "oslMutex SAL_CALL osl_createMutex() \n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) malloc(sizeof(oslMutexImpl));\n pthread_mutexattr_t aMutexAttr;\n int nRet=0;\n \n\tOSL_ASSERT(pMutex);\n\n\tif ( pMutex == NULL )\n\t{\n\t\treturn 0;\n\t}\n \n pthread_mutexattr_init(&aMutexAttr);\n\n nRet = pthread_mutexattr_settype(&aMutexAttr, PTHREAD_MUTEX_RECURSIVE);\n \n nRet = pthread_mutex_init(&(pMutex->mutex), &aMutexAttr);\n\tif ( nRet != 0 )\n\t{\n\t OSL_TRACE(\"osl_createMutex : mutex init failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n \n\t free(pMutex);\n\t\tpMutex = NULL;\n\t}\n\n pthread_mutexattr_destroy(&aMutexAttr);\n \n\treturn (oslMutex) pMutex;\n}", "parent": null, "children": [51, 52, 54], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 83, "column": 1}}, {"id": 51, "type": "type_identifier", "text": "oslMutex", "parent": 50, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 8}}, {"id": 52, "type": "ERROR", "text": "SAL_CALL", "parent": 50, "children": [53], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 17}}, {"id": 53, "type": "identifier", "text": "SAL_CALL", "parent": 52, "children": [], "start_point": {"row": 53, "column": 9}, "end_point": {"row": 53, "column": 17}}, {"id": 54, "type": "function_declarator", "text": "osl_createMutex()", "parent": 50, "children": [55, 56], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 35}}, {"id": 55, "type": "identifier", "text": "osl_createMutex", "parent": 54, "children": [], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 53, "column": 33}}, {"id": 56, "type": "parameter_list", "text": "()", "parent": 54, "children": [], "start_point": {"row": 53, "column": 33}, "end_point": {"row": 53, "column": 35}}, {"id": 57, "type": "declaration", "text": "oslMutexImpl* pMutex = (oslMutexImpl*) malloc(sizeof(oslMutexImpl));", "parent": 50, "children": [58, 59], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 69}}, {"id": 58, "type": "type_identifier", "text": "oslMutexImpl", "parent": 57, "children": [], "start_point": {"row": 55, "column": 1}, "end_point": {"row": 55, "column": 13}}, {"id": 59, "type": "init_declarator", "text": "* pMutex = (oslMutexImpl*) malloc(sizeof(oslMutexImpl))", "parent": 57, "children": [60, 63, 64], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 68}}, {"id": 60, "type": "pointer_declarator", "text": "* pMutex", "parent": 59, "children": [61, 62], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 21}}, {"id": 61, "type": "*", "text": "*", "parent": 60, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 14}}, {"id": 62, "type": "identifier", "text": "pMutex", "parent": 60, "children": [], "start_point": {"row": 55, "column": 15}, "end_point": {"row": 55, "column": 21}}, {"id": 63, "type": "=", "text": "=", "parent": 59, "children": [], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 23}}, {"id": 64, "type": "cast_expression", "text": "(oslMutexImpl*) malloc(sizeof(oslMutexImpl))", "parent": 59, "children": [65, 69], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 55, "column": 68}}, {"id": 65, "type": "type_descriptor", "text": "oslMutexImpl*", "parent": 64, "children": [66, 67], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 38}}, {"id": 66, "type": "type_identifier", "text": "oslMutexImpl", "parent": 65, "children": [], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 37}}, {"id": 67, "type": "abstract_pointer_declarator", "text": "*", "parent": 65, "children": [68], "start_point": {"row": 55, "column": 37}, "end_point": {"row": 55, "column": 38}}, {"id": 68, "type": "*", "text": "*", "parent": 67, "children": [], "start_point": {"row": 55, "column": 37}, "end_point": {"row": 55, "column": 38}}, {"id": 69, "type": "call_expression", "text": "malloc(sizeof(oslMutexImpl))", "parent": 64, "children": [70, 71], "start_point": {"row": 55, "column": 40}, "end_point": {"row": 55, "column": 68}}, {"id": 70, "type": "identifier", "text": "malloc", "parent": 69, "children": [], "start_point": {"row": 55, "column": 40}, "end_point": {"row": 55, "column": 46}}, {"id": 71, "type": "argument_list", "text": "(sizeof(oslMutexImpl))", "parent": 69, "children": [72], "start_point": {"row": 55, "column": 46}, "end_point": {"row": 55, "column": 68}}, {"id": 72, "type": "sizeof_expression", "text": "sizeof(oslMutexImpl)", "parent": 71, "children": [73], "start_point": {"row": 55, "column": 47}, "end_point": {"row": 55, "column": 67}}, {"id": 73, "type": "parenthesized_expression", "text": "(oslMutexImpl)", "parent": 72, "children": [74], "start_point": {"row": 55, "column": 53}, "end_point": {"row": 55, "column": 67}}, {"id": 74, "type": "identifier", "text": "oslMutexImpl", "parent": 73, "children": [], "start_point": {"row": 55, "column": 54}, "end_point": {"row": 55, "column": 66}}, {"id": 75, "type": "declaration", "text": "pthread_mutexattr_t aMutexAttr;", "parent": 50, "children": [76, 77], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 35}}, {"id": 76, "type": "type_identifier", "text": "pthread_mutexattr_t", "parent": 75, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 23}}, {"id": 77, "type": "identifier", "text": "aMutexAttr", "parent": 75, "children": [], "start_point": {"row": 56, "column": 24}, "end_point": {"row": 56, "column": 34}}, {"id": 78, "type": "declaration", "text": "int nRet=0;", "parent": 50, "children": [79, 80], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 15}}, {"id": 79, "type": "primitive_type", "text": "int", "parent": 78, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 7}}, {"id": 80, "type": "init_declarator", "text": "nRet=0", "parent": 78, "children": [81, 82, 83], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 14}}, {"id": 81, "type": "identifier", "text": "nRet", "parent": 80, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 12}}, {"id": 82, "type": "=", "text": "=", "parent": 80, "children": [], "start_point": {"row": 57, "column": 12}, "end_point": {"row": 57, "column": 13}}, {"id": 83, "type": "number_literal", "text": "0", "parent": 80, "children": [], "start_point": {"row": 57, "column": 13}, "end_point": {"row": 57, "column": 14}}, {"id": 84, "type": "call_expression", "text": "OSL_ASSERT(pMutex)", "parent": 50, "children": [85, 86], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 19}}, {"id": 85, "type": "identifier", "text": "OSL_ASSERT", "parent": 84, "children": [], "start_point": {"row": 59, "column": 1}, "end_point": {"row": 59, "column": 11}}, {"id": 86, "type": "argument_list", "text": "(pMutex)", "parent": 84, "children": [87], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 19}}, {"id": 87, "type": "identifier", "text": "pMutex", "parent": 86, "children": [], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 18}}, {"id": 88, "type": "if_statement", "text": "if ( pMutex == NULL )\n\t{\n\t\treturn 0;\n\t}", "parent": 50, "children": [89], "start_point": {"row": 61, "column": 1}, "end_point": {"row": 64, "column": 2}}, {"id": 89, "type": "parenthesized_expression", "text": "( pMutex == NULL )", "parent": 88, "children": [90], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 22}}, {"id": 90, "type": "binary_expression", "text": "pMutex == NULL", "parent": 89, "children": [91, 92, 93], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 20}}, {"id": 91, "type": "identifier", "text": "pMutex", "parent": 90, "children": [], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 12}}, {"id": 92, "type": "==", "text": "==", "parent": 90, "children": [], "start_point": {"row": 61, "column": 13}, "end_point": {"row": 61, "column": 15}}, {"id": 93, "type": "null", "text": "NULL", "parent": 90, "children": [94], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 20}}, {"id": 94, "type": "NULL", "text": "NULL", "parent": 93, "children": [], "start_point": {"row": 61, "column": 16}, "end_point": {"row": 61, "column": 20}}, {"id": 95, "type": "return_statement", "text": "return 0;", "parent": 88, "children": [96], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 63, "column": 11}}, {"id": 96, "type": "number_literal", "text": "0", "parent": 95, "children": [], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 63, "column": 10}}, {"id": 97, "type": "call_expression", "text": "pthread_mutexattr_init(&aMutexAttr)", "parent": 50, "children": [98, 99], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 39}}, {"id": 98, "type": "identifier", "text": "pthread_mutexattr_init", "parent": 97, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 26}}, {"id": 99, "type": "argument_list", "text": "(&aMutexAttr)", "parent": 97, "children": [100], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 39}}, {"id": 100, "type": "pointer_expression", "text": "&aMutexAttr", "parent": 99, "children": [101], "start_point": {"row": 66, "column": 27}, "end_point": {"row": 66, "column": 38}}, {"id": 101, "type": "identifier", "text": "aMutexAttr", "parent": 100, "children": [], "start_point": {"row": 66, "column": 28}, "end_point": {"row": 66, "column": 38}}, {"id": 102, "type": "assignment_expression", "text": "nRet = pthread_mutexattr_settype(&aMutexAttr, PTHREAD_MUTEX_RECURSIVE)", "parent": 50, "children": [103, 104, 105], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 74}}, {"id": 103, "type": "identifier", "text": "nRet", "parent": 102, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 8}}, {"id": 104, "type": "=", "text": "=", "parent": 102, "children": [], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 10}}, {"id": 105, "type": "call_expression", "text": "pthread_mutexattr_settype(&aMutexAttr, PTHREAD_MUTEX_RECURSIVE)", "parent": 102, "children": [106, 107], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 74}}, {"id": 106, "type": "identifier", "text": "pthread_mutexattr_settype", "parent": 105, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 36}}, {"id": 107, "type": "argument_list", "text": "(&aMutexAttr, PTHREAD_MUTEX_RECURSIVE)", "parent": 105, "children": [108, 110], "start_point": {"row": 68, "column": 36}, "end_point": {"row": 68, "column": 74}}, {"id": 108, "type": "pointer_expression", "text": "&aMutexAttr", "parent": 107, "children": [109], "start_point": {"row": 68, "column": 37}, "end_point": {"row": 68, "column": 48}}, {"id": 109, "type": "identifier", "text": "aMutexAttr", "parent": 108, "children": [], "start_point": {"row": 68, "column": 38}, "end_point": {"row": 68, "column": 48}}, {"id": 110, "type": "identifier", "text": "PTHREAD_MUTEX_RECURSIVE", "parent": 107, "children": [], "start_point": {"row": 68, "column": 50}, "end_point": {"row": 68, "column": 73}}, {"id": 111, "type": "assignment_expression", "text": "nRet = pthread_mutex_init(&(pMutex->mutex), &aMutexAttr)", "parent": 50, "children": [112, 113, 114], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 60}}, {"id": 112, "type": "identifier", "text": "nRet", "parent": 111, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 8}}, {"id": 113, "type": "=", "text": "=", "parent": 111, "children": [], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 10}}, {"id": 114, "type": "call_expression", "text": "pthread_mutex_init(&(pMutex->mutex), &aMutexAttr)", "parent": 111, "children": [115, 116], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 60}}, {"id": 115, "type": "identifier", "text": "pthread_mutex_init", "parent": 114, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 29}}, {"id": 116, "type": "argument_list", "text": "(&(pMutex->mutex), &aMutexAttr)", "parent": 114, "children": [117, 122], "start_point": {"row": 70, "column": 29}, "end_point": {"row": 70, "column": 60}}, {"id": 117, "type": "pointer_expression", "text": "&(pMutex->mutex)", "parent": 116, "children": [118], "start_point": {"row": 70, "column": 30}, "end_point": {"row": 70, "column": 46}}, {"id": 118, "type": "parenthesized_expression", "text": "(pMutex->mutex)", "parent": 117, "children": [119], "start_point": {"row": 70, "column": 31}, "end_point": {"row": 70, "column": 46}}, {"id": 119, "type": "field_expression", "text": "pMutex->mutex", "parent": 118, "children": [120, 121], "start_point": {"row": 70, "column": 32}, "end_point": {"row": 70, "column": 45}}, {"id": 120, "type": "identifier", "text": "pMutex", "parent": 119, "children": [], "start_point": {"row": 70, "column": 32}, "end_point": {"row": 70, "column": 38}}, {"id": 121, "type": "field_identifier", "text": "mutex", "parent": 119, "children": [], "start_point": {"row": 70, "column": 40}, "end_point": {"row": 70, "column": 45}}, {"id": 122, "type": "pointer_expression", "text": "&aMutexAttr", "parent": 116, "children": [123], "start_point": {"row": 70, "column": 48}, "end_point": {"row": 70, "column": 59}}, {"id": 123, "type": "identifier", "text": "aMutexAttr", "parent": 122, "children": [], "start_point": {"row": 70, "column": 49}, "end_point": {"row": 70, "column": 59}}, {"id": 124, "type": "if_statement", "text": "if ( nRet != 0 )\n\t{\n\t OSL_TRACE(\"osl_createMutex : mutex init failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n \n\t free(pMutex);\n\t\tpMutex = NULL;\n\t}", "parent": 50, "children": [125], "start_point": {"row": 71, "column": 1}, "end_point": {"row": 78, "column": 2}}, {"id": 125, "type": "parenthesized_expression", "text": "( nRet != 0 )", "parent": 124, "children": [126], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 17}}, {"id": 126, "type": "binary_expression", "text": "nRet != 0", "parent": 125, "children": [127, 128, 129], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 15}}, {"id": 127, "type": "identifier", "text": "nRet", "parent": 126, "children": [], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 10}}, {"id": 128, "type": "!=", "text": "!=", "parent": 126, "children": [], "start_point": {"row": 71, "column": 11}, "end_point": {"row": 71, "column": 13}}, {"id": 129, "type": "number_literal", "text": "0", "parent": 126, "children": [], "start_point": {"row": 71, "column": 14}, "end_point": {"row": 71, "column": 15}}, {"id": 130, "type": "call_expression", "text": "OSL_TRACE(\"osl_createMutex : mutex init failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet))", "parent": 124, "children": [131, 132], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 74, "column": 39}}, {"id": 131, "type": "identifier", "text": "OSL_TRACE", "parent": 130, "children": [], "start_point": {"row": 73, "column": 5}, "end_point": {"row": 73, "column": 14}}, {"id": 132, "type": "argument_list", "text": "(\"osl_createMutex : mutex init failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet))", "parent": 130, "children": [133, 135, 136], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 74, "column": 39}}, {"id": 133, "type": "string_literal", "text": "\"osl_createMutex : mutex init failed. Errno: %d; %s\\n\"", "parent": 132, "children": [134], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 69}}, {"id": 134, "type": "escape_sequence", "text": "\\n", "parent": 133, "children": [], "start_point": {"row": 73, "column": 66}, "end_point": {"row": 73, "column": 68}}, {"id": 135, "type": "identifier", "text": "nRet", "parent": 132, "children": [], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 22}}, {"id": 136, "type": "call_expression", "text": "strerror(nRet)", "parent": 132, "children": [137, 138], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 38}}, {"id": 137, "type": "identifier", "text": "strerror", "parent": 136, "children": [], "start_point": {"row": 74, "column": 24}, "end_point": {"row": 74, "column": 32}}, {"id": 138, "type": "argument_list", "text": "(nRet)", "parent": 136, "children": [139], "start_point": {"row": 74, "column": 32}, "end_point": {"row": 74, "column": 38}}, {"id": 139, "type": "identifier", "text": "nRet", "parent": 138, "children": [], "start_point": {"row": 74, "column": 33}, "end_point": {"row": 74, "column": 37}}, {"id": 140, "type": "call_expression", "text": "free(pMutex)", "parent": 124, "children": [141, 142], "start_point": {"row": 76, "column": 5}, "end_point": {"row": 76, "column": 17}}, {"id": 141, "type": "identifier", "text": "free", "parent": 140, "children": [], "start_point": {"row": 76, "column": 5}, "end_point": {"row": 76, "column": 9}}, {"id": 142, "type": "argument_list", "text": "(pMutex)", "parent": 140, "children": [143], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 17}}, {"id": 143, "type": "identifier", "text": "pMutex", "parent": 142, "children": [], "start_point": {"row": 76, "column": 10}, "end_point": {"row": 76, "column": 16}}, {"id": 144, "type": "assignment_expression", "text": "pMutex = NULL", "parent": 124, "children": [145, 146, 147], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 15}}, {"id": 145, "type": "identifier", "text": "pMutex", "parent": 144, "children": [], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 8}}, {"id": 146, "type": "=", "text": "=", "parent": 144, "children": [], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 10}}, {"id": 147, "type": "null", "text": "NULL", "parent": 144, "children": [148], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 15}}, {"id": 148, "type": "NULL", "text": "NULL", "parent": 147, "children": [], "start_point": {"row": 77, "column": 11}, "end_point": {"row": 77, "column": 15}}, {"id": 149, "type": "call_expression", "text": "pthread_mutexattr_destroy(&aMutexAttr)", "parent": 50, "children": [150, 151], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 42}}, {"id": 150, "type": "identifier", "text": "pthread_mutexattr_destroy", "parent": 149, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 29}}, {"id": 151, "type": "argument_list", "text": "(&aMutexAttr)", "parent": 149, "children": [152], "start_point": {"row": 80, "column": 29}, "end_point": {"row": 80, "column": 42}}, {"id": 152, "type": "pointer_expression", "text": "&aMutexAttr", "parent": 151, "children": [153], "start_point": {"row": 80, "column": 30}, "end_point": {"row": 80, "column": 41}}, {"id": 153, "type": "identifier", "text": "aMutexAttr", "parent": 152, "children": [], "start_point": {"row": 80, "column": 31}, "end_point": {"row": 80, "column": 41}}, {"id": 154, "type": "return_statement", "text": "return (oslMutex) pMutex;", "parent": 50, "children": [155], "start_point": {"row": 82, "column": 1}, "end_point": {"row": 82, "column": 26}}, {"id": 155, "type": "cast_expression", "text": "(oslMutex) pMutex", "parent": 154, "children": [156, 158], "start_point": {"row": 82, "column": 8}, "end_point": {"row": 82, "column": 25}}, {"id": 156, "type": "type_descriptor", "text": "oslMutex", "parent": 155, "children": [157], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 17}}, {"id": 157, "type": "type_identifier", "text": "oslMutex", "parent": 156, "children": [], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 17}}, {"id": 158, "type": "identifier", "text": "pMutex", "parent": 155, "children": [], "start_point": {"row": 82, "column": 19}, "end_point": {"row": 82, "column": 25}}, {"id": 159, "type": "function_definition", "text": "void SAL_CALL osl_destroyMutex(oslMutex Mutex)\n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n\n OSL_ASSERT(pMutex);\n \n\tif ( pMutex != NULL )\n\t{\n int nRet=0;\n \n\t nRet = pthread_mutex_destroy(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE(\"osl_destroyMutex : mutex destroy failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n }\n\n\t\tfree(pMutex);\n\t}\n \n return;\n}", "parent": null, "children": [160, 161, 163], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 109, "column": 1}}, {"id": 160, "type": "primitive_type", "text": "void", "parent": 159, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 4}}, {"id": 161, "type": "ERROR", "text": "SAL_CALL", "parent": 159, "children": [162], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 13}}, {"id": 162, "type": "identifier", "text": "SAL_CALL", "parent": 161, "children": [], "start_point": {"row": 88, "column": 5}, "end_point": {"row": 88, "column": 13}}, {"id": 163, "type": "function_declarator", "text": "osl_destroyMutex(oslMutex Mutex)", "parent": 159, "children": [164, 165], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 46}}, {"id": 164, "type": "identifier", "text": "osl_destroyMutex", "parent": 163, "children": [], "start_point": {"row": 88, "column": 14}, "end_point": {"row": 88, "column": 30}}, {"id": 165, "type": "parameter_list", "text": "(oslMutex Mutex)", "parent": 163, "children": [166], "start_point": {"row": 88, "column": 30}, "end_point": {"row": 88, "column": 46}}, {"id": 166, "type": "parameter_declaration", "text": "oslMutex Mutex", "parent": 165, "children": [167, 168], "start_point": {"row": 88, "column": 31}, "end_point": {"row": 88, "column": 45}}, {"id": 167, "type": "type_identifier", "text": "oslMutex", "parent": 166, "children": [], "start_point": {"row": 88, "column": 31}, "end_point": {"row": 88, "column": 39}}, {"id": 168, "type": "identifier", "text": "Mutex", "parent": 166, "children": [], "start_point": {"row": 88, "column": 40}, "end_point": {"row": 88, "column": 45}}, {"id": 169, "type": "declaration", "text": "oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;", "parent": 159, "children": [170, 171], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 46}}, {"id": 170, "type": "type_identifier", "text": "oslMutexImpl", "parent": 169, "children": [], "start_point": {"row": 90, "column": 1}, "end_point": {"row": 90, "column": 13}}, {"id": 171, "type": "init_declarator", "text": "* pMutex = (oslMutexImpl*) Mutex", "parent": 169, "children": [172, 175, 176], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 45}}, {"id": 172, "type": "pointer_declarator", "text": "* pMutex", "parent": 171, "children": [173, 174], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 21}}, {"id": 173, "type": "*", "text": "*", "parent": 172, "children": [], "start_point": {"row": 90, "column": 13}, "end_point": {"row": 90, "column": 14}}, {"id": 174, "type": "identifier", "text": "pMutex", "parent": 172, "children": [], "start_point": {"row": 90, "column": 15}, "end_point": {"row": 90, "column": 21}}, {"id": 175, "type": "=", "text": "=", "parent": 171, "children": [], "start_point": {"row": 90, "column": 22}, "end_point": {"row": 90, "column": 23}}, {"id": 176, "type": "cast_expression", "text": "(oslMutexImpl*) Mutex", "parent": 171, "children": [177, 181], "start_point": {"row": 90, "column": 24}, "end_point": {"row": 90, "column": 45}}, {"id": 177, "type": "type_descriptor", "text": "oslMutexImpl*", "parent": 176, "children": [178, 179], "start_point": {"row": 90, "column": 25}, "end_point": {"row": 90, "column": 38}}, {"id": 178, "type": "type_identifier", "text": "oslMutexImpl", "parent": 177, "children": [], "start_point": {"row": 90, "column": 25}, "end_point": {"row": 90, "column": 37}}, {"id": 179, "type": "abstract_pointer_declarator", "text": "*", "parent": 177, "children": [180], "start_point": {"row": 90, "column": 37}, "end_point": {"row": 90, "column": 38}}, {"id": 180, "type": "*", "text": "*", "parent": 179, "children": [], "start_point": {"row": 90, "column": 37}, "end_point": {"row": 90, "column": 38}}, {"id": 181, "type": "identifier", "text": "Mutex", "parent": 176, "children": [], "start_point": {"row": 90, "column": 40}, "end_point": {"row": 90, "column": 45}}, {"id": 182, "type": "call_expression", "text": "OSL_ASSERT(pMutex)", "parent": 159, "children": [183, 184], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 22}}, {"id": 183, "type": "identifier", "text": "OSL_ASSERT", "parent": 182, "children": [], "start_point": {"row": 92, "column": 4}, "end_point": {"row": 92, "column": 14}}, {"id": 184, "type": "argument_list", "text": "(pMutex)", "parent": 182, "children": [185], "start_point": {"row": 92, "column": 14}, "end_point": {"row": 92, "column": 22}}, {"id": 185, "type": "identifier", "text": "pMutex", "parent": 184, "children": [], "start_point": {"row": 92, "column": 15}, "end_point": {"row": 92, "column": 21}}, {"id": 186, "type": "if_statement", "text": "if ( pMutex != NULL )\n\t{\n int nRet=0;\n \n\t nRet = pthread_mutex_destroy(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE(\"osl_destroyMutex : mutex destroy failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n }\n\n\t\tfree(pMutex);\n\t}", "parent": 159, "children": [187], "start_point": {"row": 94, "column": 1}, "end_point": {"row": 106, "column": 2}}, {"id": 187, "type": "parenthesized_expression", "text": "( pMutex != NULL )", "parent": 186, "children": [188], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 22}}, {"id": 188, "type": "binary_expression", "text": "pMutex != NULL", "parent": 187, "children": [189, 190, 191], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 20}}, {"id": 189, "type": "identifier", "text": "pMutex", "parent": 188, "children": [], "start_point": {"row": 94, "column": 6}, "end_point": {"row": 94, "column": 12}}, {"id": 190, "type": "!=", "text": "!=", "parent": 188, "children": [], "start_point": {"row": 94, "column": 13}, "end_point": {"row": 94, "column": 15}}, {"id": 191, "type": "null", "text": "NULL", "parent": 188, "children": [192], "start_point": {"row": 94, "column": 16}, "end_point": {"row": 94, "column": 20}}, {"id": 192, "type": "NULL", "text": "NULL", "parent": 191, "children": [], "start_point": {"row": 94, "column": 16}, "end_point": {"row": 94, "column": 20}}, {"id": 193, "type": "declaration", "text": "int nRet=0;", "parent": 186, "children": [194, 195], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 19}}, {"id": 194, "type": "primitive_type", "text": "int", "parent": 193, "children": [], "start_point": {"row": 96, "column": 8}, "end_point": {"row": 96, "column": 11}}, {"id": 195, "type": "init_declarator", "text": "nRet=0", "parent": 193, "children": [196, 197, 198], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 18}}, {"id": 196, "type": "identifier", "text": "nRet", "parent": 195, "children": [], "start_point": {"row": 96, "column": 12}, "end_point": {"row": 96, "column": 16}}, {"id": 197, "type": "=", "text": "=", "parent": 195, "children": [], "start_point": {"row": 96, "column": 16}, "end_point": {"row": 96, "column": 17}}, {"id": 198, "type": "number_literal", "text": "0", "parent": 195, "children": [], "start_point": {"row": 96, "column": 17}, "end_point": {"row": 96, "column": 18}}, {"id": 199, "type": "assignment_expression", "text": "nRet = pthread_mutex_destroy(&(pMutex->mutex))", "parent": 186, "children": [200, 201, 202], "start_point": {"row": 98, "column": 5}, "end_point": {"row": 98, "column": 51}}, {"id": 200, "type": "identifier", "text": "nRet", "parent": 199, "children": [], "start_point": {"row": 98, "column": 5}, "end_point": {"row": 98, "column": 9}}, {"id": 201, "type": "=", "text": "=", "parent": 199, "children": [], "start_point": {"row": 98, "column": 10}, "end_point": {"row": 98, "column": 11}}, {"id": 202, "type": "call_expression", "text": "pthread_mutex_destroy(&(pMutex->mutex))", "parent": 199, "children": [203, 204], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 51}}, {"id": 203, "type": "identifier", "text": "pthread_mutex_destroy", "parent": 202, "children": [], "start_point": {"row": 98, "column": 12}, "end_point": {"row": 98, "column": 33}}, {"id": 204, "type": "argument_list", "text": "(&(pMutex->mutex))", "parent": 202, "children": [205], "start_point": {"row": 98, "column": 33}, "end_point": {"row": 98, "column": 51}}, {"id": 205, "type": "pointer_expression", "text": "&(pMutex->mutex)", "parent": 204, "children": [206], "start_point": {"row": 98, "column": 34}, "end_point": {"row": 98, "column": 50}}, {"id": 206, "type": "parenthesized_expression", "text": "(pMutex->mutex)", "parent": 205, "children": [207], "start_point": {"row": 98, "column": 35}, "end_point": {"row": 98, "column": 50}}, {"id": 207, "type": "field_expression", "text": "pMutex->mutex", "parent": 206, "children": [208, 209], "start_point": {"row": 98, "column": 36}, "end_point": {"row": 98, "column": 49}}, {"id": 208, "type": "identifier", "text": "pMutex", "parent": 207, "children": [], "start_point": {"row": 98, "column": 36}, "end_point": {"row": 98, "column": 42}}, {"id": 209, "type": "field_identifier", "text": "mutex", "parent": 207, "children": [], "start_point": {"row": 98, "column": 44}, "end_point": {"row": 98, "column": 49}}, {"id": 210, "type": "if_statement", "text": "if ( nRet != 0 )\n {\n OSL_TRACE(\"osl_destroyMutex : mutex destroy failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n }", "parent": 186, "children": [211], "start_point": {"row": 99, "column": 8}, "end_point": {"row": 103, "column": 9}}, {"id": 211, "type": "parenthesized_expression", "text": "( nRet != 0 )", "parent": 210, "children": [212], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 24}}, {"id": 212, "type": "binary_expression", "text": "nRet != 0", "parent": 211, "children": [213, 214, 215], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 22}}, {"id": 213, "type": "identifier", "text": "nRet", "parent": 212, "children": [], "start_point": {"row": 99, "column": 13}, "end_point": {"row": 99, "column": 17}}, {"id": 214, "type": "!=", "text": "!=", "parent": 212, "children": [], "start_point": {"row": 99, "column": 18}, "end_point": {"row": 99, "column": 20}}, {"id": 215, "type": "number_literal", "text": "0", "parent": 212, "children": [], "start_point": {"row": 99, "column": 21}, "end_point": {"row": 99, "column": 22}}, {"id": 216, "type": "call_expression", "text": "OSL_TRACE(\"osl_destroyMutex : mutex destroy failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet))", "parent": 210, "children": [217, 218], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 102, "column": 43}}, {"id": 217, "type": "identifier", "text": "OSL_TRACE", "parent": 216, "children": [], "start_point": {"row": 101, "column": 12}, "end_point": {"row": 101, "column": 21}}, {"id": 218, "type": "argument_list", "text": "(\"osl_destroyMutex : mutex destroy failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet))", "parent": 216, "children": [219, 221, 222], "start_point": {"row": 101, "column": 21}, "end_point": {"row": 102, "column": 43}}, {"id": 219, "type": "string_literal", "text": "\"osl_destroyMutex : mutex destroy failed. Errno: %d; %s\\n\"", "parent": 218, "children": [220], "start_point": {"row": 101, "column": 22}, "end_point": {"row": 101, "column": 80}}, {"id": 220, "type": "escape_sequence", "text": "\\n", "parent": 219, "children": [], "start_point": {"row": 101, "column": 77}, "end_point": {"row": 101, "column": 79}}, {"id": 221, "type": "identifier", "text": "nRet", "parent": 218, "children": [], "start_point": {"row": 102, "column": 22}, "end_point": {"row": 102, "column": 26}}, {"id": 222, "type": "call_expression", "text": "strerror(nRet)", "parent": 218, "children": [223, 224], "start_point": {"row": 102, "column": 28}, "end_point": {"row": 102, "column": 42}}, {"id": 223, "type": "identifier", "text": "strerror", "parent": 222, "children": [], "start_point": {"row": 102, "column": 28}, "end_point": {"row": 102, "column": 36}}, {"id": 224, "type": "argument_list", "text": "(nRet)", "parent": 222, "children": [225], "start_point": {"row": 102, "column": 36}, "end_point": {"row": 102, "column": 42}}, {"id": 225, "type": "identifier", "text": "nRet", "parent": 224, "children": [], "start_point": {"row": 102, "column": 37}, "end_point": {"row": 102, "column": 41}}, {"id": 226, "type": "call_expression", "text": "free(pMutex)", "parent": 186, "children": [227, 228], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 14}}, {"id": 227, "type": "identifier", "text": "free", "parent": 226, "children": [], "start_point": {"row": 105, "column": 2}, "end_point": {"row": 105, "column": 6}}, {"id": 228, "type": "argument_list", "text": "(pMutex)", "parent": 226, "children": [229], "start_point": {"row": 105, "column": 6}, "end_point": {"row": 105, "column": 14}}, {"id": 229, "type": "identifier", "text": "pMutex", "parent": 228, "children": [], "start_point": {"row": 105, "column": 7}, "end_point": {"row": 105, "column": 13}}, {"id": 230, "type": "return_statement", "text": "return;", "parent": 159, "children": [], "start_point": {"row": 108, "column": 4}, "end_point": {"row": 108, "column": 11}}, {"id": 231, "type": "function_definition", "text": "sal_Bool SAL_CALL osl_acquireMutex(oslMutex Mutex) \n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n \n OSL_ASSERT(pMutex);\n\n\tif ( pMutex != NULL )\n\t{\n int nRet=0;\n \n nRet = pthread_mutex_lock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE(\"osl_acquireMutex : mutex lock failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n\t\t\treturn sal_False;\n }\n\t\treturn sal_True;\t\t\n\t}\n\n /* not initialized */\n return sal_False;\n}", "parent": null, "children": [232, 233, 235], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 136, "column": 1}}, {"id": 232, "type": "type_identifier", "text": "sal_Bool", "parent": 231, "children": [], "start_point": {"row": 114, "column": 0}, "end_point": {"row": 114, "column": 8}}, {"id": 233, "type": "ERROR", "text": "SAL_CALL", "parent": 231, "children": [234], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 17}}, {"id": 234, "type": "identifier", "text": "SAL_CALL", "parent": 233, "children": [], "start_point": {"row": 114, "column": 9}, "end_point": {"row": 114, "column": 17}}, {"id": 235, "type": "function_declarator", "text": "osl_acquireMutex(oslMutex Mutex)", "parent": 231, "children": [236, 237], "start_point": {"row": 114, "column": 18}, "end_point": {"row": 114, "column": 50}}, {"id": 236, "type": "identifier", "text": "osl_acquireMutex", "parent": 235, "children": [], "start_point": {"row": 114, "column": 18}, "end_point": {"row": 114, "column": 34}}, {"id": 237, "type": "parameter_list", "text": "(oslMutex Mutex)", "parent": 235, "children": [238], "start_point": {"row": 114, "column": 34}, "end_point": {"row": 114, "column": 50}}, {"id": 238, "type": "parameter_declaration", "text": "oslMutex Mutex", "parent": 237, "children": [239, 240], "start_point": {"row": 114, "column": 35}, "end_point": {"row": 114, "column": 49}}, {"id": 239, "type": "type_identifier", "text": "oslMutex", "parent": 238, "children": [], "start_point": {"row": 114, "column": 35}, "end_point": {"row": 114, "column": 43}}, {"id": 240, "type": "identifier", "text": "Mutex", "parent": 238, "children": [], "start_point": {"row": 114, "column": 44}, "end_point": {"row": 114, "column": 49}}, {"id": 241, "type": "declaration", "text": "oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;", "parent": 231, "children": [242, 243], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 46}}, {"id": 242, "type": "type_identifier", "text": "oslMutexImpl", "parent": 241, "children": [], "start_point": {"row": 116, "column": 1}, "end_point": {"row": 116, "column": 13}}, {"id": 243, "type": "init_declarator", "text": "* pMutex = (oslMutexImpl*) Mutex", "parent": 241, "children": [244, 247, 248], "start_point": {"row": 116, "column": 13}, "end_point": {"row": 116, "column": 45}}, {"id": 244, "type": "pointer_declarator", "text": "* pMutex", "parent": 243, "children": [245, 246], "start_point": {"row": 116, "column": 13}, "end_point": {"row": 116, "column": 21}}, {"id": 245, "type": "*", "text": "*", "parent": 244, "children": [], "start_point": {"row": 116, "column": 13}, "end_point": {"row": 116, "column": 14}}, {"id": 246, "type": "identifier", "text": "pMutex", "parent": 244, "children": [], "start_point": {"row": 116, "column": 15}, "end_point": {"row": 116, "column": 21}}, {"id": 247, "type": "=", "text": "=", "parent": 243, "children": [], "start_point": {"row": 116, "column": 22}, "end_point": {"row": 116, "column": 23}}, {"id": 248, "type": "cast_expression", "text": "(oslMutexImpl*) Mutex", "parent": 243, "children": [249, 253], "start_point": {"row": 116, "column": 24}, "end_point": {"row": 116, "column": 45}}, {"id": 249, "type": "type_descriptor", "text": "oslMutexImpl*", "parent": 248, "children": [250, 251], "start_point": {"row": 116, "column": 25}, "end_point": {"row": 116, "column": 38}}, {"id": 250, "type": "type_identifier", "text": "oslMutexImpl", "parent": 249, "children": [], "start_point": {"row": 116, "column": 25}, "end_point": {"row": 116, "column": 37}}, {"id": 251, "type": "abstract_pointer_declarator", "text": "*", "parent": 249, "children": [252], "start_point": {"row": 116, "column": 37}, "end_point": {"row": 116, "column": 38}}, {"id": 252, "type": "*", "text": "*", "parent": 251, "children": [], "start_point": {"row": 116, "column": 37}, "end_point": {"row": 116, "column": 38}}, {"id": 253, "type": "identifier", "text": "Mutex", "parent": 248, "children": [], "start_point": {"row": 116, "column": 40}, "end_point": {"row": 116, "column": 45}}, {"id": 254, "type": "call_expression", "text": "OSL_ASSERT(pMutex)", "parent": 231, "children": [255, 256], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 22}}, {"id": 255, "type": "identifier", "text": "OSL_ASSERT", "parent": 254, "children": [], "start_point": {"row": 118, "column": 4}, "end_point": {"row": 118, "column": 14}}, {"id": 256, "type": "argument_list", "text": "(pMutex)", "parent": 254, "children": [257], "start_point": {"row": 118, "column": 14}, "end_point": {"row": 118, "column": 22}}, {"id": 257, "type": "identifier", "text": "pMutex", "parent": 256, "children": [], "start_point": {"row": 118, "column": 15}, "end_point": {"row": 118, "column": 21}}, {"id": 258, "type": "if_statement", "text": "if ( pMutex != NULL )\n\t{\n int nRet=0;\n \n nRet = pthread_mutex_lock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE(\"osl_acquireMutex : mutex lock failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n\t\t\treturn sal_False;\n }\n\t\treturn sal_True;\t\t\n\t}", "parent": 231, "children": [259], "start_point": {"row": 120, "column": 1}, "end_point": {"row": 132, "column": 2}}, {"id": 259, "type": "parenthesized_expression", "text": "( pMutex != NULL )", "parent": 258, "children": [260], "start_point": {"row": 120, "column": 4}, "end_point": {"row": 120, "column": 22}}, {"id": 260, "type": "binary_expression", "text": "pMutex != NULL", "parent": 259, "children": [261, 262, 263], "start_point": {"row": 120, "column": 6}, "end_point": {"row": 120, "column": 20}}, {"id": 261, "type": "identifier", "text": "pMutex", "parent": 260, "children": [], "start_point": {"row": 120, "column": 6}, "end_point": {"row": 120, "column": 12}}, {"id": 262, "type": "!=", "text": "!=", "parent": 260, "children": [], "start_point": {"row": 120, "column": 13}, "end_point": {"row": 120, "column": 15}}, {"id": 263, "type": "null", "text": "NULL", "parent": 260, "children": [264], "start_point": {"row": 120, "column": 16}, "end_point": {"row": 120, "column": 20}}, {"id": 264, "type": "NULL", "text": "NULL", "parent": 263, "children": [], "start_point": {"row": 120, "column": 16}, "end_point": {"row": 120, "column": 20}}, {"id": 265, "type": "declaration", "text": "int nRet=0;", "parent": 258, "children": [266, 267], "start_point": {"row": 122, "column": 8}, "end_point": {"row": 122, "column": 19}}, {"id": 266, "type": "primitive_type", "text": "int", "parent": 265, "children": [], "start_point": {"row": 122, "column": 8}, "end_point": {"row": 122, "column": 11}}, {"id": 267, "type": "init_declarator", "text": "nRet=0", "parent": 265, "children": [268, 269, 270], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 18}}, {"id": 268, "type": "identifier", "text": "nRet", "parent": 267, "children": [], "start_point": {"row": 122, "column": 12}, "end_point": {"row": 122, "column": 16}}, {"id": 269, "type": "=", "text": "=", "parent": 267, "children": [], "start_point": {"row": 122, "column": 16}, "end_point": {"row": 122, "column": 17}}, {"id": 270, "type": "number_literal", "text": "0", "parent": 267, "children": [], "start_point": {"row": 122, "column": 17}, "end_point": {"row": 122, "column": 18}}, {"id": 271, "type": "assignment_expression", "text": "nRet = pthread_mutex_lock(&(pMutex->mutex))", "parent": 258, "children": [272, 273, 274], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 51}}, {"id": 272, "type": "identifier", "text": "nRet", "parent": 271, "children": [], "start_point": {"row": 124, "column": 8}, "end_point": {"row": 124, "column": 12}}, {"id": 273, "type": "=", "text": "=", "parent": 271, "children": [], "start_point": {"row": 124, "column": 13}, "end_point": {"row": 124, "column": 14}}, {"id": 274, "type": "call_expression", "text": "pthread_mutex_lock(&(pMutex->mutex))", "parent": 271, "children": [275, 276], "start_point": {"row": 124, "column": 15}, "end_point": {"row": 124, "column": 51}}, {"id": 275, "type": "identifier", "text": "pthread_mutex_lock", "parent": 274, "children": [], "start_point": {"row": 124, "column": 15}, "end_point": {"row": 124, "column": 33}}, {"id": 276, "type": "argument_list", "text": "(&(pMutex->mutex))", "parent": 274, "children": [277], "start_point": {"row": 124, "column": 33}, "end_point": {"row": 124, "column": 51}}, {"id": 277, "type": "pointer_expression", "text": "&(pMutex->mutex)", "parent": 276, "children": [278], "start_point": {"row": 124, "column": 34}, "end_point": {"row": 124, "column": 50}}, {"id": 278, "type": "parenthesized_expression", "text": "(pMutex->mutex)", "parent": 277, "children": [279], "start_point": {"row": 124, "column": 35}, "end_point": {"row": 124, "column": 50}}, {"id": 279, "type": "field_expression", "text": "pMutex->mutex", "parent": 278, "children": [280, 281], "start_point": {"row": 124, "column": 36}, "end_point": {"row": 124, "column": 49}}, {"id": 280, "type": "identifier", "text": "pMutex", "parent": 279, "children": [], "start_point": {"row": 124, "column": 36}, "end_point": {"row": 124, "column": 42}}, {"id": 281, "type": "field_identifier", "text": "mutex", "parent": 279, "children": [], "start_point": {"row": 124, "column": 44}, "end_point": {"row": 124, "column": 49}}, {"id": 282, "type": "if_statement", "text": "if ( nRet != 0 )\n {\n OSL_TRACE(\"osl_acquireMutex : mutex lock failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n\t\t\treturn sal_False;\n }", "parent": 258, "children": [283], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 130, "column": 9}}, {"id": 283, "type": "parenthesized_expression", "text": "( nRet != 0 )", "parent": 282, "children": [284], "start_point": {"row": 125, "column": 11}, "end_point": {"row": 125, "column": 24}}, {"id": 284, "type": "binary_expression", "text": "nRet != 0", "parent": 283, "children": [285, 286, 287], "start_point": {"row": 125, "column": 13}, "end_point": {"row": 125, "column": 22}}, {"id": 285, "type": "identifier", "text": "nRet", "parent": 284, "children": [], "start_point": {"row": 125, "column": 13}, "end_point": {"row": 125, "column": 17}}, {"id": 286, "type": "!=", "text": "!=", "parent": 284, "children": [], "start_point": {"row": 125, "column": 18}, "end_point": {"row": 125, "column": 20}}, {"id": 287, "type": "number_literal", "text": "0", "parent": 284, "children": [], "start_point": {"row": 125, "column": 21}, "end_point": {"row": 125, "column": 22}}, {"id": 288, "type": "call_expression", "text": "OSL_TRACE(\"osl_acquireMutex : mutex lock failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet))", "parent": 282, "children": [289, 290], "start_point": {"row": 127, "column": 12}, "end_point": {"row": 128, "column": 43}}, {"id": 289, "type": "identifier", "text": "OSL_TRACE", "parent": 288, "children": [], "start_point": {"row": 127, "column": 12}, "end_point": {"row": 127, "column": 21}}, {"id": 290, "type": "argument_list", "text": "(\"osl_acquireMutex : mutex lock failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet))", "parent": 288, "children": [291, 293, 294], "start_point": {"row": 127, "column": 21}, "end_point": {"row": 128, "column": 43}}, {"id": 291, "type": "string_literal", "text": "\"osl_acquireMutex : mutex lock failed. Errno: %d; %s\\n\"", "parent": 290, "children": [292], "start_point": {"row": 127, "column": 22}, "end_point": {"row": 127, "column": 77}}, {"id": 292, "type": "escape_sequence", "text": "\\n", "parent": 291, "children": [], "start_point": {"row": 127, "column": 74}, "end_point": {"row": 127, "column": 76}}, {"id": 293, "type": "identifier", "text": "nRet", "parent": 290, "children": [], "start_point": {"row": 128, "column": 22}, "end_point": {"row": 128, "column": 26}}, {"id": 294, "type": "call_expression", "text": "strerror(nRet)", "parent": 290, "children": [295, 296], "start_point": {"row": 128, "column": 28}, "end_point": {"row": 128, "column": 42}}, {"id": 295, "type": "identifier", "text": "strerror", "parent": 294, "children": [], "start_point": {"row": 128, "column": 28}, "end_point": {"row": 128, "column": 36}}, {"id": 296, "type": "argument_list", "text": "(nRet)", "parent": 294, "children": [297], "start_point": {"row": 128, "column": 36}, "end_point": {"row": 128, "column": 42}}, {"id": 297, "type": "identifier", "text": "nRet", "parent": 296, "children": [], "start_point": {"row": 128, "column": 37}, "end_point": {"row": 128, "column": 41}}, {"id": 298, "type": "return_statement", "text": "return sal_False;", "parent": 282, "children": [299], "start_point": {"row": 129, "column": 3}, "end_point": {"row": 129, "column": 20}}, {"id": 299, "type": "identifier", "text": "sal_False", "parent": 298, "children": [], "start_point": {"row": 129, "column": 10}, "end_point": {"row": 129, "column": 19}}, {"id": 300, "type": "return_statement", "text": "return sal_True;", "parent": 258, "children": [301], "start_point": {"row": 131, "column": 2}, "end_point": {"row": 131, "column": 18}}, {"id": 301, "type": "identifier", "text": "sal_True", "parent": 300, "children": [], "start_point": {"row": 131, "column": 9}, "end_point": {"row": 131, "column": 17}}, {"id": 302, "type": "return_statement", "text": "return sal_False;", "parent": 231, "children": [303], "start_point": {"row": 135, "column": 4}, "end_point": {"row": 135, "column": 21}}, {"id": 303, "type": "identifier", "text": "sal_False", "parent": 302, "children": [], "start_point": {"row": 135, "column": 11}, "end_point": {"row": 135, "column": 20}}, {"id": 304, "type": "function_definition", "text": "sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex Mutex) \n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n\n OSL_ASSERT(pMutex);\n\n\tif ( pMutex ) \n\t{\n\t\tint nRet = 0;\n nRet = pthread_mutex_trylock(&(pMutex->mutex));\n if ( nRet != 0 )\n return sal_False;\n \n\t\treturn sal_True;\n\t}\n \n /* not initialized */\n return sal_False;\n}", "parent": null, "children": [305, 306, 308], "start_point": {"row": 141, "column": 0}, "end_point": {"row": 159, "column": 1}}, {"id": 305, "type": "type_identifier", "text": "sal_Bool", "parent": 304, "children": [], "start_point": {"row": 141, "column": 0}, "end_point": {"row": 141, "column": 8}}, {"id": 306, "type": "ERROR", "text": "SAL_CALL", "parent": 304, "children": [307], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 17}}, {"id": 307, "type": "identifier", "text": "SAL_CALL", "parent": 306, "children": [], "start_point": {"row": 141, "column": 9}, "end_point": {"row": 141, "column": 17}}, {"id": 308, "type": "function_declarator", "text": "osl_tryToAcquireMutex(oslMutex Mutex)", "parent": 304, "children": [309, 310], "start_point": {"row": 141, "column": 18}, "end_point": {"row": 141, "column": 55}}, {"id": 309, "type": "identifier", "text": "osl_tryToAcquireMutex", "parent": 308, "children": [], "start_point": {"row": 141, "column": 18}, "end_point": {"row": 141, "column": 39}}, {"id": 310, "type": "parameter_list", "text": "(oslMutex Mutex)", "parent": 308, "children": [311], "start_point": {"row": 141, "column": 39}, "end_point": {"row": 141, "column": 55}}, {"id": 311, "type": "parameter_declaration", "text": "oslMutex Mutex", "parent": 310, "children": [312, 313], "start_point": {"row": 141, "column": 40}, "end_point": {"row": 141, "column": 54}}, {"id": 312, "type": "type_identifier", "text": "oslMutex", "parent": 311, "children": [], "start_point": {"row": 141, "column": 40}, "end_point": {"row": 141, "column": 48}}, {"id": 313, "type": "identifier", "text": "Mutex", "parent": 311, "children": [], "start_point": {"row": 141, "column": 49}, "end_point": {"row": 141, "column": 54}}, {"id": 314, "type": "declaration", "text": "oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;", "parent": 304, "children": [315, 316], "start_point": {"row": 143, "column": 1}, "end_point": {"row": 143, "column": 46}}, {"id": 315, "type": "type_identifier", "text": "oslMutexImpl", "parent": 314, "children": [], "start_point": {"row": 143, "column": 1}, "end_point": {"row": 143, "column": 13}}, {"id": 316, "type": "init_declarator", "text": "* pMutex = (oslMutexImpl*) Mutex", "parent": 314, "children": [317, 320, 321], "start_point": {"row": 143, "column": 13}, "end_point": {"row": 143, "column": 45}}, {"id": 317, "type": "pointer_declarator", "text": "* pMutex", "parent": 316, "children": [318, 319], "start_point": {"row": 143, "column": 13}, "end_point": {"row": 143, "column": 21}}, {"id": 318, "type": "*", "text": "*", "parent": 317, "children": [], "start_point": {"row": 143, "column": 13}, "end_point": {"row": 143, "column": 14}}, {"id": 319, "type": "identifier", "text": "pMutex", "parent": 317, "children": [], "start_point": {"row": 143, "column": 15}, "end_point": {"row": 143, "column": 21}}, {"id": 320, "type": "=", "text": "=", "parent": 316, "children": [], "start_point": {"row": 143, "column": 22}, "end_point": {"row": 143, "column": 23}}, {"id": 321, "type": "cast_expression", "text": "(oslMutexImpl*) Mutex", "parent": 316, "children": [322, 326], "start_point": {"row": 143, "column": 24}, "end_point": {"row": 143, "column": 45}}, {"id": 322, "type": "type_descriptor", "text": "oslMutexImpl*", "parent": 321, "children": [323, 324], "start_point": {"row": 143, "column": 25}, "end_point": {"row": 143, "column": 38}}, {"id": 323, "type": "type_identifier", "text": "oslMutexImpl", "parent": 322, "children": [], "start_point": {"row": 143, "column": 25}, "end_point": {"row": 143, "column": 37}}, {"id": 324, "type": "abstract_pointer_declarator", "text": "*", "parent": 322, "children": [325], "start_point": {"row": 143, "column": 37}, "end_point": {"row": 143, "column": 38}}, {"id": 325, "type": "*", "text": "*", "parent": 324, "children": [], "start_point": {"row": 143, "column": 37}, "end_point": {"row": 143, "column": 38}}, {"id": 326, "type": "identifier", "text": "Mutex", "parent": 321, "children": [], "start_point": {"row": 143, "column": 40}, "end_point": {"row": 143, "column": 45}}, {"id": 327, "type": "call_expression", "text": "OSL_ASSERT(pMutex)", "parent": 304, "children": [328, 329], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 22}}, {"id": 328, "type": "identifier", "text": "OSL_ASSERT", "parent": 327, "children": [], "start_point": {"row": 145, "column": 4}, "end_point": {"row": 145, "column": 14}}, {"id": 329, "type": "argument_list", "text": "(pMutex)", "parent": 327, "children": [330], "start_point": {"row": 145, "column": 14}, "end_point": {"row": 145, "column": 22}}, {"id": 330, "type": "identifier", "text": "pMutex", "parent": 329, "children": [], "start_point": {"row": 145, "column": 15}, "end_point": {"row": 145, "column": 21}}, {"id": 331, "type": "if_statement", "text": "if ( pMutex ) \n\t{\n\t\tint nRet = 0;\n nRet = pthread_mutex_trylock(&(pMutex->mutex));\n if ( nRet != 0 )\n return sal_False;\n \n\t\treturn sal_True;\n\t}", "parent": 304, "children": [332], "start_point": {"row": 147, "column": 1}, "end_point": {"row": 155, "column": 2}}, {"id": 332, "type": "parenthesized_expression", "text": "( pMutex )", "parent": 331, "children": [333], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 14}}, {"id": 333, "type": "identifier", "text": "pMutex", "parent": 332, "children": [], "start_point": {"row": 147, "column": 6}, "end_point": {"row": 147, "column": 12}}, {"id": 334, "type": "declaration", "text": "int nRet = 0;", "parent": 331, "children": [335, 336], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 149, "column": 15}}, {"id": 335, "type": "primitive_type", "text": "int", "parent": 334, "children": [], "start_point": {"row": 149, "column": 2}, "end_point": {"row": 149, "column": 5}}, {"id": 336, "type": "init_declarator", "text": "nRet = 0", "parent": 334, "children": [337, 338, 339], "start_point": {"row": 149, "column": 6}, "end_point": {"row": 149, "column": 14}}, {"id": 337, "type": "identifier", "text": "nRet", "parent": 336, "children": [], "start_point": {"row": 149, "column": 6}, "end_point": {"row": 149, "column": 10}}, {"id": 338, "type": "=", "text": "=", "parent": 336, "children": [], "start_point": {"row": 149, "column": 11}, "end_point": {"row": 149, "column": 12}}, {"id": 339, "type": "number_literal", "text": "0", "parent": 336, "children": [], "start_point": {"row": 149, "column": 13}, "end_point": {"row": 149, "column": 14}}, {"id": 340, "type": "assignment_expression", "text": "nRet = pthread_mutex_trylock(&(pMutex->mutex))", "parent": 331, "children": [341, 342, 343], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 54}}, {"id": 341, "type": "identifier", "text": "nRet", "parent": 340, "children": [], "start_point": {"row": 150, "column": 8}, "end_point": {"row": 150, "column": 12}}, {"id": 342, "type": "=", "text": "=", "parent": 340, "children": [], "start_point": {"row": 150, "column": 13}, "end_point": {"row": 150, "column": 14}}, {"id": 343, "type": "call_expression", "text": "pthread_mutex_trylock(&(pMutex->mutex))", "parent": 340, "children": [344, 345], "start_point": {"row": 150, "column": 15}, "end_point": {"row": 150, "column": 54}}, {"id": 344, "type": "identifier", "text": "pthread_mutex_trylock", "parent": 343, "children": [], "start_point": {"row": 150, "column": 15}, "end_point": {"row": 150, "column": 36}}, {"id": 345, "type": "argument_list", "text": "(&(pMutex->mutex))", "parent": 343, "children": [346], "start_point": {"row": 150, "column": 36}, "end_point": {"row": 150, "column": 54}}, {"id": 346, "type": "pointer_expression", "text": "&(pMutex->mutex)", "parent": 345, "children": [347], "start_point": {"row": 150, "column": 37}, "end_point": {"row": 150, "column": 53}}, {"id": 347, "type": "parenthesized_expression", "text": "(pMutex->mutex)", "parent": 346, "children": [348], "start_point": {"row": 150, "column": 38}, "end_point": {"row": 150, "column": 53}}, {"id": 348, "type": "field_expression", "text": "pMutex->mutex", "parent": 347, "children": [349, 350], "start_point": {"row": 150, "column": 39}, "end_point": {"row": 150, "column": 52}}, {"id": 349, "type": "identifier", "text": "pMutex", "parent": 348, "children": [], "start_point": {"row": 150, "column": 39}, "end_point": {"row": 150, "column": 45}}, {"id": 350, "type": "field_identifier", "text": "mutex", "parent": 348, "children": [], "start_point": {"row": 150, "column": 47}, "end_point": {"row": 150, "column": 52}}, {"id": 351, "type": "if_statement", "text": "if ( nRet != 0 )\n return sal_False;", "parent": 331, "children": [352, 357], "start_point": {"row": 151, "column": 8}, "end_point": {"row": 152, "column": 29}}, {"id": 352, "type": "parenthesized_expression", "text": "( nRet != 0 )", "parent": 351, "children": [353], "start_point": {"row": 151, "column": 11}, "end_point": {"row": 151, "column": 25}}, {"id": 353, "type": "binary_expression", "text": "nRet != 0", "parent": 352, "children": [354, 355, 356], "start_point": {"row": 151, "column": 13}, "end_point": {"row": 151, "column": 22}}, {"id": 354, "type": "identifier", "text": "nRet", "parent": 353, "children": [], "start_point": {"row": 151, "column": 13}, "end_point": {"row": 151, "column": 17}}, {"id": 355, "type": "!=", "text": "!=", "parent": 353, "children": [], "start_point": {"row": 151, "column": 18}, "end_point": {"row": 151, "column": 20}}, {"id": 356, "type": "number_literal", "text": "0", "parent": 353, "children": [], "start_point": {"row": 151, "column": 21}, "end_point": {"row": 151, "column": 22}}, {"id": 357, "type": "return_statement", "text": "return sal_False;", "parent": 351, "children": [358], "start_point": {"row": 152, "column": 12}, "end_point": {"row": 152, "column": 29}}, {"id": 358, "type": "identifier", "text": "sal_False", "parent": 357, "children": [], "start_point": {"row": 152, "column": 19}, "end_point": {"row": 152, "column": 28}}, {"id": 359, "type": "return_statement", "text": "return sal_True;", "parent": 331, "children": [360], "start_point": {"row": 154, "column": 2}, "end_point": {"row": 154, "column": 18}}, {"id": 360, "type": "identifier", "text": "sal_True", "parent": 359, "children": [], "start_point": {"row": 154, "column": 9}, "end_point": {"row": 154, "column": 17}}, {"id": 361, "type": "return_statement", "text": "return sal_False;", "parent": 304, "children": [362], "start_point": {"row": 158, "column": 4}, "end_point": {"row": 158, "column": 21}}, {"id": 362, "type": "identifier", "text": "sal_False", "parent": 361, "children": [], "start_point": {"row": 158, "column": 11}, "end_point": {"row": 158, "column": 20}}, {"id": 363, "type": "function_definition", "text": "sal_Bool SAL_CALL osl_releaseMutex(oslMutex Mutex) \n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n \n OSL_ASSERT(pMutex);\n\n\tif ( pMutex ) \n\t{\n int nRet=0;\n nRet = pthread_mutex_unlock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE(\"osl_releaseMutex : mutex unlock failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n\t\t\treturn sal_False;\n }\n \n return sal_True;\n\t} \n\n /* not initialized */\n return sal_False;\n}", "parent": null, "children": [364, 365, 367], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 186, "column": 1}}, {"id": 364, "type": "type_identifier", "text": "sal_Bool", "parent": 363, "children": [], "start_point": {"row": 164, "column": 0}, "end_point": {"row": 164, "column": 8}}, {"id": 365, "type": "ERROR", "text": "SAL_CALL", "parent": 363, "children": [366], "start_point": {"row": 164, "column": 9}, "end_point": {"row": 164, "column": 17}}, {"id": 366, "type": "identifier", "text": "SAL_CALL", "parent": 365, "children": [], "start_point": {"row": 164, "column": 9}, "end_point": {"row": 164, "column": 17}}, {"id": 367, "type": "function_declarator", "text": "osl_releaseMutex(oslMutex Mutex)", "parent": 363, "children": [368, 369], "start_point": {"row": 164, "column": 18}, "end_point": {"row": 164, "column": 50}}, {"id": 368, "type": "identifier", "text": "osl_releaseMutex", "parent": 367, "children": [], "start_point": {"row": 164, "column": 18}, "end_point": {"row": 164, "column": 34}}, {"id": 369, "type": "parameter_list", "text": "(oslMutex Mutex)", "parent": 367, "children": [370], "start_point": {"row": 164, "column": 34}, "end_point": {"row": 164, "column": 50}}, {"id": 370, "type": "parameter_declaration", "text": "oslMutex Mutex", "parent": 369, "children": [371, 372], "start_point": {"row": 164, "column": 35}, "end_point": {"row": 164, "column": 49}}, {"id": 371, "type": "type_identifier", "text": "oslMutex", "parent": 370, "children": [], "start_point": {"row": 164, "column": 35}, "end_point": {"row": 164, "column": 43}}, {"id": 372, "type": "identifier", "text": "Mutex", "parent": 370, "children": [], "start_point": {"row": 164, "column": 44}, "end_point": {"row": 164, "column": 49}}, {"id": 373, "type": "declaration", "text": "oslMutexImpl* pMutex = (oslMutexImpl*) Mutex;", "parent": 363, "children": [374, 375], "start_point": {"row": 166, "column": 1}, "end_point": {"row": 166, "column": 46}}, {"id": 374, "type": "type_identifier", "text": "oslMutexImpl", "parent": 373, "children": [], "start_point": {"row": 166, "column": 1}, "end_point": {"row": 166, "column": 13}}, {"id": 375, "type": "init_declarator", "text": "* pMutex = (oslMutexImpl*) Mutex", "parent": 373, "children": [376, 379, 380], "start_point": {"row": 166, "column": 13}, "end_point": {"row": 166, "column": 45}}, {"id": 376, "type": "pointer_declarator", "text": "* pMutex", "parent": 375, "children": [377, 378], "start_point": {"row": 166, "column": 13}, "end_point": {"row": 166, "column": 21}}, {"id": 377, "type": "*", "text": "*", "parent": 376, "children": [], "start_point": {"row": 166, "column": 13}, "end_point": {"row": 166, "column": 14}}, {"id": 378, "type": "identifier", "text": "pMutex", "parent": 376, "children": [], "start_point": {"row": 166, "column": 15}, "end_point": {"row": 166, "column": 21}}, {"id": 379, "type": "=", "text": "=", "parent": 375, "children": [], "start_point": {"row": 166, "column": 22}, "end_point": {"row": 166, "column": 23}}, {"id": 380, "type": "cast_expression", "text": "(oslMutexImpl*) Mutex", "parent": 375, "children": [381, 385], "start_point": {"row": 166, "column": 24}, "end_point": {"row": 166, "column": 45}}, {"id": 381, "type": "type_descriptor", "text": "oslMutexImpl*", "parent": 380, "children": [382, 383], "start_point": {"row": 166, "column": 25}, "end_point": {"row": 166, "column": 38}}, {"id": 382, "type": "type_identifier", "text": "oslMutexImpl", "parent": 381, "children": [], "start_point": {"row": 166, "column": 25}, "end_point": {"row": 166, "column": 37}}, {"id": 383, "type": "abstract_pointer_declarator", "text": "*", "parent": 381, "children": [384], "start_point": {"row": 166, "column": 37}, "end_point": {"row": 166, "column": 38}}, {"id": 384, "type": "*", "text": "*", "parent": 383, "children": [], "start_point": {"row": 166, "column": 37}, "end_point": {"row": 166, "column": 38}}, {"id": 385, "type": "identifier", "text": "Mutex", "parent": 380, "children": [], "start_point": {"row": 166, "column": 40}, "end_point": {"row": 166, "column": 45}}, {"id": 386, "type": "call_expression", "text": "OSL_ASSERT(pMutex)", "parent": 363, "children": [387, 388], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 22}}, {"id": 387, "type": "identifier", "text": "OSL_ASSERT", "parent": 386, "children": [], "start_point": {"row": 168, "column": 4}, "end_point": {"row": 168, "column": 14}}, {"id": 388, "type": "argument_list", "text": "(pMutex)", "parent": 386, "children": [389], "start_point": {"row": 168, "column": 14}, "end_point": {"row": 168, "column": 22}}, {"id": 389, "type": "identifier", "text": "pMutex", "parent": 388, "children": [], "start_point": {"row": 168, "column": 15}, "end_point": {"row": 168, "column": 21}}, {"id": 390, "type": "if_statement", "text": "if ( pMutex ) \n\t{\n int nRet=0;\n nRet = pthread_mutex_unlock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE(\"osl_releaseMutex : mutex unlock failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n\t\t\treturn sal_False;\n }\n \n return sal_True;\n\t}", "parent": 363, "children": [391], "start_point": {"row": 170, "column": 1}, "end_point": {"row": 182, "column": 2}}, {"id": 391, "type": "parenthesized_expression", "text": "( pMutex )", "parent": 390, "children": [392], "start_point": {"row": 170, "column": 4}, "end_point": {"row": 170, "column": 14}}, {"id": 392, "type": "identifier", "text": "pMutex", "parent": 391, "children": [], "start_point": {"row": 170, "column": 6}, "end_point": {"row": 170, "column": 12}}, {"id": 393, "type": "declaration", "text": "int nRet=0;", "parent": 390, "children": [394, 395], "start_point": {"row": 172, "column": 8}, "end_point": {"row": 172, "column": 19}}, {"id": 394, "type": "primitive_type", "text": "int", "parent": 393, "children": [], "start_point": {"row": 172, "column": 8}, "end_point": {"row": 172, "column": 11}}, {"id": 395, "type": "init_declarator", "text": "nRet=0", "parent": 393, "children": [396, 397, 398], "start_point": {"row": 172, "column": 12}, "end_point": {"row": 172, "column": 18}}, {"id": 396, "type": "identifier", "text": "nRet", "parent": 395, "children": [], "start_point": {"row": 172, "column": 12}, "end_point": {"row": 172, "column": 16}}, {"id": 397, "type": "=", "text": "=", "parent": 395, "children": [], "start_point": {"row": 172, "column": 16}, "end_point": {"row": 172, "column": 17}}, {"id": 398, "type": "number_literal", "text": "0", "parent": 395, "children": [], "start_point": {"row": 172, "column": 17}, "end_point": {"row": 172, "column": 18}}, {"id": 399, "type": "assignment_expression", "text": "nRet = pthread_mutex_unlock(&(pMutex->mutex))", "parent": 390, "children": [400, 401, 402], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 53}}, {"id": 400, "type": "identifier", "text": "nRet", "parent": 399, "children": [], "start_point": {"row": 173, "column": 8}, "end_point": {"row": 173, "column": 12}}, {"id": 401, "type": "=", "text": "=", "parent": 399, "children": [], "start_point": {"row": 173, "column": 13}, "end_point": {"row": 173, "column": 14}}, {"id": 402, "type": "call_expression", "text": "pthread_mutex_unlock(&(pMutex->mutex))", "parent": 399, "children": [403, 404], "start_point": {"row": 173, "column": 15}, "end_point": {"row": 173, "column": 53}}, {"id": 403, "type": "identifier", "text": "pthread_mutex_unlock", "parent": 402, "children": [], "start_point": {"row": 173, "column": 15}, "end_point": {"row": 173, "column": 35}}, {"id": 404, "type": "argument_list", "text": "(&(pMutex->mutex))", "parent": 402, "children": [405], "start_point": {"row": 173, "column": 35}, "end_point": {"row": 173, "column": 53}}, {"id": 405, "type": "pointer_expression", "text": "&(pMutex->mutex)", "parent": 404, "children": [406], "start_point": {"row": 173, "column": 36}, "end_point": {"row": 173, "column": 52}}, {"id": 406, "type": "parenthesized_expression", "text": "(pMutex->mutex)", "parent": 405, "children": [407], "start_point": {"row": 173, "column": 37}, "end_point": {"row": 173, "column": 52}}, {"id": 407, "type": "field_expression", "text": "pMutex->mutex", "parent": 406, "children": [408, 409], "start_point": {"row": 173, "column": 38}, "end_point": {"row": 173, "column": 51}}, {"id": 408, "type": "identifier", "text": "pMutex", "parent": 407, "children": [], "start_point": {"row": 173, "column": 38}, "end_point": {"row": 173, "column": 44}}, {"id": 409, "type": "field_identifier", "text": "mutex", "parent": 407, "children": [], "start_point": {"row": 173, "column": 46}, "end_point": {"row": 173, "column": 51}}, {"id": 410, "type": "if_statement", "text": "if ( nRet != 0 )\n {\n OSL_TRACE(\"osl_releaseMutex : mutex unlock failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n\t\t\treturn sal_False;\n }", "parent": 390, "children": [411], "start_point": {"row": 174, "column": 8}, "end_point": {"row": 179, "column": 9}}, {"id": 411, "type": "parenthesized_expression", "text": "( nRet != 0 )", "parent": 410, "children": [412], "start_point": {"row": 174, "column": 11}, "end_point": {"row": 174, "column": 24}}, {"id": 412, "type": "binary_expression", "text": "nRet != 0", "parent": 411, "children": [413, 414, 415], "start_point": {"row": 174, "column": 13}, "end_point": {"row": 174, "column": 22}}, {"id": 413, "type": "identifier", "text": "nRet", "parent": 412, "children": [], "start_point": {"row": 174, "column": 13}, "end_point": {"row": 174, "column": 17}}, {"id": 414, "type": "!=", "text": "!=", "parent": 412, "children": [], "start_point": {"row": 174, "column": 18}, "end_point": {"row": 174, "column": 20}}, {"id": 415, "type": "number_literal", "text": "0", "parent": 412, "children": [], "start_point": {"row": 174, "column": 21}, "end_point": {"row": 174, "column": 22}}, {"id": 416, "type": "call_expression", "text": "OSL_TRACE(\"osl_releaseMutex : mutex unlock failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet))", "parent": 410, "children": [417, 418], "start_point": {"row": 176, "column": 12}, "end_point": {"row": 177, "column": 43}}, {"id": 417, "type": "identifier", "text": "OSL_TRACE", "parent": 416, "children": [], "start_point": {"row": 176, "column": 12}, "end_point": {"row": 176, "column": 21}}, {"id": 418, "type": "argument_list", "text": "(\"osl_releaseMutex : mutex unlock failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet))", "parent": 416, "children": [419, 421, 422], "start_point": {"row": 176, "column": 21}, "end_point": {"row": 177, "column": 43}}, {"id": 419, "type": "string_literal", "text": "\"osl_releaseMutex : mutex unlock failed. Errno: %d; %s\\n\"", "parent": 418, "children": [420], "start_point": {"row": 176, "column": 22}, "end_point": {"row": 176, "column": 79}}, {"id": 420, "type": "escape_sequence", "text": "\\n", "parent": 419, "children": [], "start_point": {"row": 176, "column": 76}, "end_point": {"row": 176, "column": 78}}, {"id": 421, "type": "identifier", "text": "nRet", "parent": 418, "children": [], "start_point": {"row": 177, "column": 22}, "end_point": {"row": 177, "column": 26}}, {"id": 422, "type": "call_expression", "text": "strerror(nRet)", "parent": 418, "children": [423, 424], "start_point": {"row": 177, "column": 28}, "end_point": {"row": 177, "column": 42}}, {"id": 423, "type": "identifier", "text": "strerror", "parent": 422, "children": [], "start_point": {"row": 177, "column": 28}, "end_point": {"row": 177, "column": 36}}, {"id": 424, "type": "argument_list", "text": "(nRet)", "parent": 422, "children": [425], "start_point": {"row": 177, "column": 36}, "end_point": {"row": 177, "column": 42}}, {"id": 425, "type": "identifier", "text": "nRet", "parent": 424, "children": [], "start_point": {"row": 177, "column": 37}, "end_point": {"row": 177, "column": 41}}, {"id": 426, "type": "return_statement", "text": "return sal_False;", "parent": 410, "children": [427], "start_point": {"row": 178, "column": 3}, "end_point": {"row": 178, "column": 20}}, {"id": 427, "type": "identifier", "text": "sal_False", "parent": 426, "children": [], "start_point": {"row": 178, "column": 10}, "end_point": {"row": 178, "column": 19}}, {"id": 428, "type": "return_statement", "text": "return sal_True;", "parent": 390, "children": [429], "start_point": {"row": 181, "column": 8}, "end_point": {"row": 181, "column": 24}}, {"id": 429, "type": "identifier", "text": "sal_True", "parent": 428, "children": [], "start_point": {"row": 181, "column": 15}, "end_point": {"row": 181, "column": 23}}, {"id": 430, "type": "return_statement", "text": "return sal_False;", "parent": 363, "children": [431], "start_point": {"row": 185, "column": 4}, "end_point": {"row": 185, "column": 21}}, {"id": 431, "type": "identifier", "text": "sal_False", "parent": 430, "children": [], "start_point": {"row": 185, "column": 11}, "end_point": {"row": 185, "column": 20}}, {"id": 432, "type": "declaration", "text": "static oslMutexImpl globalMutexImpl;", "parent": null, "children": [433, 434], "start_point": {"row": 192, "column": 0}, "end_point": {"row": 192, "column": 36}}, {"id": 433, "type": "type_identifier", "text": "oslMutexImpl", "parent": 432, "children": [], "start_point": {"row": 192, "column": 7}, "end_point": {"row": 192, "column": 19}}, {"id": 434, "type": "identifier", "text": "globalMutexImpl", "parent": 432, "children": [], "start_point": {"row": 192, "column": 20}, "end_point": {"row": 192, "column": 35}}, {"id": 435, "type": "function_definition", "text": "static void globalMutexInitImpl(void) {\n pthread_mutexattr_t attr;\n if (pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) ||\n pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0 ||\n pthread_mutexattr_destroy(&attr) != 0)\n {\n abort();\n }\n}", "parent": null, "children": [436, 437], "start_point": {"row": 194, "column": 0}, "end_point": {"row": 203, "column": 1}}, {"id": 436, "type": "primitive_type", "text": "void", "parent": 435, "children": [], "start_point": {"row": 194, "column": 7}, "end_point": {"row": 194, "column": 11}}, {"id": 437, "type": "function_declarator", "text": "globalMutexInitImpl(void)", "parent": 435, "children": [438, 439], "start_point": {"row": 194, "column": 12}, "end_point": {"row": 194, "column": 37}}, {"id": 438, "type": "identifier", "text": "globalMutexInitImpl", "parent": 437, "children": [], "start_point": {"row": 194, "column": 12}, "end_point": {"row": 194, "column": 31}}, {"id": 439, "type": "parameter_list", "text": "(void)", "parent": 437, "children": [440], "start_point": {"row": 194, "column": 31}, "end_point": {"row": 194, "column": 37}}, {"id": 440, "type": "parameter_declaration", "text": "void", "parent": 439, "children": [441], "start_point": {"row": 194, "column": 32}, "end_point": {"row": 194, "column": 36}}, {"id": 441, "type": "primitive_type", "text": "void", "parent": 440, "children": [], "start_point": {"row": 194, "column": 32}, "end_point": {"row": 194, "column": 36}}, {"id": 442, "type": "declaration", "text": "pthread_mutexattr_t attr;", "parent": 435, "children": [443, 444], "start_point": {"row": 195, "column": 4}, "end_point": {"row": 195, "column": 29}}, {"id": 443, "type": "type_identifier", "text": "pthread_mutexattr_t", "parent": 442, "children": [], "start_point": {"row": 195, "column": 4}, "end_point": {"row": 195, "column": 23}}, {"id": 444, "type": "identifier", "text": "attr", "parent": 442, "children": [], "start_point": {"row": 195, "column": 24}, "end_point": {"row": 195, "column": 28}}, {"id": 445, "type": "if_statement", "text": "if (pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) ||\n pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0 ||\n pthread_mutexattr_destroy(&attr) != 0)\n {\n abort();\n }", "parent": 435, "children": [446], "start_point": {"row": 196, "column": 4}, "end_point": {"row": 202, "column": 5}}, {"id": 446, "type": "parenthesized_expression", "text": "(pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) ||\n pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0 ||\n pthread_mutexattr_destroy(&attr) != 0)", "parent": 445, "children": [447], "start_point": {"row": 196, "column": 7}, "end_point": {"row": 199, "column": 46}}, {"id": 447, "type": "binary_expression", "text": "pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) ||\n pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0 ||\n pthread_mutexattr_destroy(&attr) != 0", "parent": 446, "children": [448, 478, 479], "start_point": {"row": 196, "column": 8}, "end_point": {"row": 199, "column": 45}}, {"id": 448, "type": "binary_expression", "text": "pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) ||\n pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0", "parent": 447, "children": [449, 465, 466], "start_point": {"row": 196, "column": 8}, "end_point": {"row": 198, "column": 62}}, {"id": 449, "type": "binary_expression", "text": "pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)", "parent": 448, "children": [450, 458, 459], "start_point": {"row": 196, "column": 8}, "end_point": {"row": 197, "column": 65}}, {"id": 450, "type": "binary_expression", "text": "pthread_mutexattr_init(&attr) != 0", "parent": 449, "children": [451, 456, 457], "start_point": {"row": 196, "column": 8}, "end_point": {"row": 196, "column": 42}}, {"id": 451, "type": "call_expression", "text": "pthread_mutexattr_init(&attr)", "parent": 450, "children": [452, 453], "start_point": {"row": 196, "column": 8}, "end_point": {"row": 196, "column": 37}}, {"id": 452, "type": "identifier", "text": "pthread_mutexattr_init", "parent": 451, "children": [], "start_point": {"row": 196, "column": 8}, "end_point": {"row": 196, "column": 30}}, {"id": 453, "type": "argument_list", "text": "(&attr)", "parent": 451, "children": [454], "start_point": {"row": 196, "column": 30}, "end_point": {"row": 196, "column": 37}}, {"id": 454, "type": "pointer_expression", "text": "&attr", "parent": 453, "children": [455], "start_point": {"row": 196, "column": 31}, "end_point": {"row": 196, "column": 36}}, {"id": 455, "type": "identifier", "text": "attr", "parent": 454, "children": [], "start_point": {"row": 196, "column": 32}, "end_point": {"row": 196, "column": 36}}, {"id": 456, "type": "!=", "text": "!=", "parent": 450, "children": [], "start_point": {"row": 196, "column": 38}, "end_point": {"row": 196, "column": 40}}, {"id": 457, "type": "number_literal", "text": "0", "parent": 450, "children": [], "start_point": {"row": 196, "column": 41}, "end_point": {"row": 196, "column": 42}}, {"id": 458, "type": "||", "text": "||", "parent": 449, "children": [], "start_point": {"row": 196, "column": 43}, "end_point": {"row": 196, "column": 45}}, {"id": 459, "type": "call_expression", "text": "pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)", "parent": 449, "children": [460, 461], "start_point": {"row": 197, "column": 8}, "end_point": {"row": 197, "column": 65}}, {"id": 460, "type": "identifier", "text": "pthread_mutexattr_settype", "parent": 459, "children": [], "start_point": {"row": 197, "column": 8}, "end_point": {"row": 197, "column": 33}}, {"id": 461, "type": "argument_list", "text": "(&attr, PTHREAD_MUTEX_RECURSIVE)", "parent": 459, "children": [462, 464], "start_point": {"row": 197, "column": 33}, "end_point": {"row": 197, "column": 65}}, {"id": 462, "type": "pointer_expression", "text": "&attr", "parent": 461, "children": [463], "start_point": {"row": 197, "column": 34}, "end_point": {"row": 197, "column": 39}}, {"id": 463, "type": "identifier", "text": "attr", "parent": 462, "children": [], "start_point": {"row": 197, "column": 35}, "end_point": {"row": 197, "column": 39}}, {"id": 464, "type": "identifier", "text": "PTHREAD_MUTEX_RECURSIVE", "parent": 461, "children": [], "start_point": {"row": 197, "column": 41}, "end_point": {"row": 197, "column": 64}}, {"id": 465, "type": "||", "text": "||", "parent": 448, "children": [], "start_point": {"row": 197, "column": 66}, "end_point": {"row": 197, "column": 68}}, {"id": 466, "type": "binary_expression", "text": "pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0", "parent": 448, "children": [467, 476, 477], "start_point": {"row": 198, "column": 8}, "end_point": {"row": 198, "column": 62}}, {"id": 467, "type": "call_expression", "text": "pthread_mutex_init(&globalMutexImpl.mutex, &attr)", "parent": 466, "children": [468, 469], "start_point": {"row": 198, "column": 8}, "end_point": {"row": 198, "column": 57}}, {"id": 468, "type": "identifier", "text": "pthread_mutex_init", "parent": 467, "children": [], "start_point": {"row": 198, "column": 8}, "end_point": {"row": 198, "column": 26}}, {"id": 469, "type": "argument_list", "text": "(&globalMutexImpl.mutex, &attr)", "parent": 467, "children": [470, 474], "start_point": {"row": 198, "column": 26}, "end_point": {"row": 198, "column": 57}}, {"id": 470, "type": "pointer_expression", "text": "&globalMutexImpl.mutex", "parent": 469, "children": [471], "start_point": {"row": 198, "column": 27}, "end_point": {"row": 198, "column": 49}}, {"id": 471, "type": "field_expression", "text": "globalMutexImpl.mutex", "parent": 470, "children": [472, 473], "start_point": {"row": 198, "column": 28}, "end_point": {"row": 198, "column": 49}}, {"id": 472, "type": "identifier", "text": "globalMutexImpl", "parent": 471, "children": [], "start_point": {"row": 198, "column": 28}, "end_point": {"row": 198, "column": 43}}, {"id": 473, "type": "field_identifier", "text": "mutex", "parent": 471, "children": [], "start_point": {"row": 198, "column": 44}, "end_point": {"row": 198, "column": 49}}, {"id": 474, "type": "pointer_expression", "text": "&attr", "parent": 469, "children": [475], "start_point": {"row": 198, "column": 51}, "end_point": {"row": 198, "column": 56}}, {"id": 475, "type": "identifier", "text": "attr", "parent": 474, "children": [], "start_point": {"row": 198, "column": 52}, "end_point": {"row": 198, "column": 56}}, {"id": 476, "type": "!=", "text": "!=", "parent": 466, "children": [], "start_point": {"row": 198, "column": 58}, "end_point": {"row": 198, "column": 60}}, {"id": 477, "type": "number_literal", "text": "0", "parent": 466, "children": [], "start_point": {"row": 198, "column": 61}, "end_point": {"row": 198, "column": 62}}, {"id": 478, "type": "||", "text": "||", "parent": 447, "children": [], "start_point": {"row": 198, "column": 63}, "end_point": {"row": 198, "column": 65}}, {"id": 479, "type": "binary_expression", "text": "pthread_mutexattr_destroy(&attr) != 0", "parent": 447, "children": [480, 485, 486], "start_point": {"row": 199, "column": 8}, "end_point": {"row": 199, "column": 45}}, {"id": 480, "type": "call_expression", "text": "pthread_mutexattr_destroy(&attr)", "parent": 479, "children": [481, 482], "start_point": {"row": 199, "column": 8}, "end_point": {"row": 199, "column": 40}}, {"id": 481, "type": "identifier", "text": "pthread_mutexattr_destroy", "parent": 480, "children": [], "start_point": {"row": 199, "column": 8}, "end_point": {"row": 199, "column": 33}}, {"id": 482, "type": "argument_list", "text": "(&attr)", "parent": 480, "children": [483], "start_point": {"row": 199, "column": 33}, "end_point": {"row": 199, "column": 40}}, {"id": 483, "type": "pointer_expression", "text": "&attr", "parent": 482, "children": [484], "start_point": {"row": 199, "column": 34}, "end_point": {"row": 199, "column": 39}}, {"id": 484, "type": "identifier", "text": "attr", "parent": 483, "children": [], "start_point": {"row": 199, "column": 35}, "end_point": {"row": 199, "column": 39}}, {"id": 485, "type": "!=", "text": "!=", "parent": 479, "children": [], "start_point": {"row": 199, "column": 41}, "end_point": {"row": 199, "column": 43}}, {"id": 486, "type": "number_literal", "text": "0", "parent": 479, "children": [], "start_point": {"row": 199, "column": 44}, "end_point": {"row": 199, "column": 45}}, {"id": 487, "type": "call_expression", "text": "abort()", "parent": 445, "children": [488, 489], "start_point": {"row": 201, "column": 8}, "end_point": {"row": 201, "column": 15}}, {"id": 488, "type": "identifier", "text": "abort", "parent": 487, "children": [], "start_point": {"row": 201, "column": 8}, "end_point": {"row": 201, "column": 13}}, {"id": 489, "type": "argument_list", "text": "()", "parent": 487, "children": [], "start_point": {"row": 201, "column": 13}, "end_point": {"row": 201, "column": 15}}, {"id": 490, "type": "ERROR", "text": "oslMutex * SAL_CALL osl_getGlobalMutex()", "parent": null, "children": [491], "start_point": {"row": 205, "column": 0}, "end_point": {"row": 205, "column": 40}}, {"id": 491, "type": "binary_expression", "text": "oslMutex * SAL_CALL osl_getGlobalMutex()", "parent": 490, "children": [492, 493, 494, 496], "start_point": {"row": 205, "column": 0}, "end_point": {"row": 205, "column": 40}}, {"id": 492, "type": "identifier", "text": "oslMutex", "parent": 491, "children": [], "start_point": {"row": 205, "column": 0}, "end_point": {"row": 205, "column": 8}}, {"id": 493, "type": "*", "text": "*", "parent": 491, "children": [], "start_point": {"row": 205, "column": 9}, "end_point": {"row": 205, "column": 10}}, {"id": 494, "type": "ERROR", "text": "SAL_CALL", "parent": 491, "children": [495], "start_point": {"row": 205, "column": 11}, "end_point": {"row": 205, "column": 19}}, {"id": 495, "type": "identifier", "text": "SAL_CALL", "parent": 494, "children": [], "start_point": {"row": 205, "column": 11}, "end_point": {"row": 205, "column": 19}}, {"id": 496, "type": "call_expression", "text": "osl_getGlobalMutex()", "parent": 491, "children": [497, 498], "start_point": {"row": 205, "column": 20}, "end_point": {"row": 205, "column": 40}}, {"id": 497, "type": "identifier", "text": "osl_getGlobalMutex", "parent": 496, "children": [], "start_point": {"row": 205, "column": 20}, "end_point": {"row": 205, "column": 38}}, {"id": 498, "type": "argument_list", "text": "()", "parent": 496, "children": [], "start_point": {"row": 205, "column": 38}, "end_point": {"row": 205, "column": 40}}, {"id": 499, "type": "declaration", "text": "static oslMutex globalMutex = (oslMutex) &globalMutexImpl;", "parent": null, "children": [500, 501], "start_point": {"row": 208, "column": 1}, "end_point": {"row": 208, "column": 59}}, {"id": 500, "type": "type_identifier", "text": "oslMutex", "parent": 499, "children": [], "start_point": {"row": 208, "column": 8}, "end_point": {"row": 208, "column": 16}}, {"id": 501, "type": "init_declarator", "text": "globalMutex = (oslMutex) &globalMutexImpl", "parent": 499, "children": [502, 503, 504], "start_point": {"row": 208, "column": 17}, "end_point": {"row": 208, "column": 58}}, {"id": 502, "type": "identifier", "text": "globalMutex", "parent": 501, "children": [], "start_point": {"row": 208, "column": 17}, "end_point": {"row": 208, "column": 28}}, {"id": 503, "type": "=", "text": "=", "parent": 501, "children": [], "start_point": {"row": 208, "column": 29}, "end_point": {"row": 208, "column": 30}}, {"id": 504, "type": "binary_expression", "text": "(oslMutex) &globalMutexImpl", "parent": 501, "children": [505, 507], "start_point": {"row": 208, "column": 31}, "end_point": {"row": 208, "column": 58}}, {"id": 505, "type": "parenthesized_expression", "text": "(oslMutex)", "parent": 504, "children": [506], "start_point": {"row": 208, "column": 31}, "end_point": {"row": 208, "column": 41}}, {"id": 506, "type": "identifier", "text": "oslMutex", "parent": 505, "children": [], "start_point": {"row": 208, "column": 32}, "end_point": {"row": 208, "column": 40}}, {"id": 507, "type": "identifier", "text": "globalMutexImpl", "parent": 504, "children": [], "start_point": {"row": 208, "column": 43}, "end_point": {"row": 208, "column": 58}}, {"id": 508, "type": "declaration", "text": "static pthread_once_t once = PTHREAD_ONCE_INIT;", "parent": null, "children": [509, 510], "start_point": {"row": 210, "column": 4}, "end_point": {"row": 210, "column": 51}}, {"id": 509, "type": "type_identifier", "text": "pthread_once_t", "parent": 508, "children": [], "start_point": {"row": 210, "column": 11}, "end_point": {"row": 210, "column": 25}}, {"id": 510, "type": "init_declarator", "text": "once = PTHREAD_ONCE_INIT", "parent": 508, "children": [511, 512, 513], "start_point": {"row": 210, "column": 26}, "end_point": {"row": 210, "column": 50}}, {"id": 511, "type": "identifier", "text": "once", "parent": 510, "children": [], "start_point": {"row": 210, "column": 26}, "end_point": {"row": 210, "column": 30}}, {"id": 512, "type": "=", "text": "=", "parent": 510, "children": [], "start_point": {"row": 210, "column": 31}, "end_point": {"row": 210, "column": 32}}, {"id": 513, "type": "identifier", "text": "PTHREAD_ONCE_INIT", "parent": 510, "children": [], "start_point": {"row": 210, "column": 33}, "end_point": {"row": 210, "column": 50}}, {"id": 514, "type": "if_statement", "text": "if (pthread_once(&once, &globalMutexInitImpl) != 0) {\n abort();\n }", "parent": null, "children": [515], "start_point": {"row": 211, "column": 4}, "end_point": {"row": 213, "column": 5}}, {"id": 515, "type": "parenthesized_expression", "text": "(pthread_once(&once, &globalMutexInitImpl) != 0)", "parent": 514, "children": [516], "start_point": {"row": 211, "column": 7}, "end_point": {"row": 211, "column": 55}}, {"id": 516, "type": "binary_expression", "text": "pthread_once(&once, &globalMutexInitImpl) != 0", "parent": 515, "children": [517, 524, 525], "start_point": {"row": 211, "column": 8}, "end_point": {"row": 211, "column": 54}}, {"id": 517, "type": "call_expression", "text": "pthread_once(&once, &globalMutexInitImpl)", "parent": 516, "children": [518, 519], "start_point": {"row": 211, "column": 8}, "end_point": {"row": 211, "column": 49}}, {"id": 518, "type": "identifier", "text": "pthread_once", "parent": 517, "children": [], "start_point": {"row": 211, "column": 8}, "end_point": {"row": 211, "column": 20}}, {"id": 519, "type": "argument_list", "text": "(&once, &globalMutexInitImpl)", "parent": 517, "children": [520, 522], "start_point": {"row": 211, "column": 20}, "end_point": {"row": 211, "column": 49}}, {"id": 520, "type": "pointer_expression", "text": "&once", "parent": 519, "children": [521], "start_point": {"row": 211, "column": 21}, "end_point": {"row": 211, "column": 26}}, {"id": 521, "type": "identifier", "text": "once", "parent": 520, "children": [], "start_point": {"row": 211, "column": 22}, "end_point": {"row": 211, "column": 26}}, {"id": 522, "type": "pointer_expression", "text": "&globalMutexInitImpl", "parent": 519, "children": [523], "start_point": {"row": 211, "column": 28}, "end_point": {"row": 211, "column": 48}}, {"id": 523, "type": "identifier", "text": "globalMutexInitImpl", "parent": 522, "children": [], "start_point": {"row": 211, "column": 29}, "end_point": {"row": 211, "column": 48}}, {"id": 524, "type": "!=", "text": "!=", "parent": 516, "children": [], "start_point": {"row": 211, "column": 50}, "end_point": {"row": 211, "column": 52}}, {"id": 525, "type": "number_literal", "text": "0", "parent": 516, "children": [], "start_point": {"row": 211, "column": 53}, "end_point": {"row": 211, "column": 54}}, {"id": 526, "type": "call_expression", "text": "abort()", "parent": 514, "children": [527, 528], "start_point": {"row": 212, "column": 8}, "end_point": {"row": 212, "column": 15}}, {"id": 527, "type": "identifier", "text": "abort", "parent": 526, "children": [], "start_point": {"row": 212, "column": 8}, "end_point": {"row": 212, "column": 13}}, {"id": 528, "type": "argument_list", "text": "()", "parent": 526, "children": [], "start_point": {"row": 212, "column": 13}, "end_point": {"row": 212, "column": 15}}, {"id": 529, "type": "return_statement", "text": "return &globalMutex;", "parent": null, "children": [530], "start_point": {"row": 215, "column": 1}, "end_point": {"row": 215, "column": 21}}, {"id": 530, "type": "pointer_expression", "text": "&globalMutex", "parent": 529, "children": [531], "start_point": {"row": 215, "column": 8}, "end_point": {"row": 215, "column": 20}}, {"id": 531, "type": "identifier", "text": "globalMutex", "parent": 530, "children": [], "start_point": {"row": 215, "column": 9}, "end_point": {"row": 215, "column": 20}}]}, "node_categories": {"declarations": {"functions": [23, 50, 54, 159, 163, 231, 235, 304, 308, 363, 367, 435, 437], "variables": [21, 26, 30, 41, 46, 57, 75, 78, 166, 169, 193, 238, 241, 265, 311, 314, 334, 370, 373, 393, 432, 440, 442, 499, 508], "classes": [43, 44], "imports": [0, 1, 3, 4, 6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [64, 69, 72, 73, 84, 89, 90, 97, 100, 105, 108, 114, 117, 118, 119, 122, 125, 126, 130, 136, 140, 149, 152, 155, 176, 182, 187, 188, 202, 205, 206, 207, 211, 212, 216, 222, 226, 248, 254, 259, 260, 274, 277, 278, 279, 283, 284, 288, 294, 321, 327, 332, 343, 346, 347, 348, 352, 353, 380, 386, 391, 402, 405, 406, 407, 411, 412, 416, 422, 446, 447, 448, 449, 450, 451, 454, 459, 462, 466, 467, 470, 471, 474, 479, 480, 483, 487, 491, 496, 504, 505, 515, 516, 517, 520, 522, 526, 530], "assignments": [102, 111, 144, 199, 271, 340, 399], "loops": [], "conditionals": [15, 16, 19, 24, 27, 34, 38, 40, 45, 47, 48, 49, 51, 53, 55, 58, 62, 66, 70, 74, 76, 77, 81, 85, 87, 88, 91, 98, 101, 103, 106, 109, 110, 112, 115, 120, 121, 123, 124, 127, 131, 135, 137, 139, 141, 143, 145, 150, 153, 157, 158, 162, 164, 167, 168, 170, 174, 178, 181, 183, 185, 186, 189, 196, 200, 203, 208, 209, 210, 213, 217, 221, 223, 225, 227, 229, 232, 234, 236, 239, 240, 242, 246, 250, 253, 255, 257, 258, 261, 268, 272, 275, 280, 281, 282, 285, 289, 293, 295, 297, 299, 301, 303, 305, 307, 309, 312, 313, 315, 319, 323, 326, 328, 330, 331, 333, 337, 341, 344, 349, 350, 351, 354, 358, 360, 362, 364, 366, 368, 371, 372, 374, 378, 382, 385, 387, 389, 390, 392, 396, 400, 403, 408, 409, 410, 413, 417, 421, 423, 425, 427, 429, 431, 433, 434, 438, 443, 444, 445, 452, 455, 460, 463, 464, 468, 472, 473, 475, 481, 484, 488, 492, 495, 497, 500, 502, 506, 507, 509, 511, 513, 514, 518, 521, 523, 527, 531], "returns": [95, 154, 230, 298, 300, 302, 357, 359, 361, 426, 428, 430, 529], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 8, 11, 14, 83, 96, 129, 133, 198, 215, 219, 270, 287, 291, 339, 356, 398, 415, 419, 457, 477, 486, 525], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 23, "universal_type": "function", "name": "unknown", "text_snippet": "pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int)"}, {"node_id": 50, "universal_type": "function", "name": "nRet=0;", "text_snippet": "oslMutex SAL_CALL osl_createMutex() \n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) malloc(sizeof(oslMute"}, {"node_id": 54, "universal_type": "function", "name": "unknown", "text_snippet": "osl_createMutex()"}, {"node_id": 159, "universal_type": "function", "name": "SAL_CALL", "text_snippet": "void SAL_CALL osl_destroyMutex(oslMutex Mutex)\n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n\n "}, {"node_id": 163, "universal_type": "function", "name": "unknown", "text_snippet": "osl_destroyMutex(oslMutex Mutex)"}, {"node_id": 231, "universal_type": "function", "name": "nRet=0;", "text_snippet": "sal_Bool SAL_CALL osl_acquireMutex(oslMutex Mutex) \n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) Mutex;"}, {"node_id": 235, "universal_type": "function", "name": "unknown", "text_snippet": "osl_acquireMutex(oslMutex Mutex)"}, {"node_id": 304, "universal_type": "function", "name": "nRet", "text_snippet": "sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex Mutex) \n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) M"}, {"node_id": 308, "universal_type": "function", "name": "unknown", "text_snippet": "osl_tryToAcquireMutex(oslMutex Mutex)"}, {"node_id": 363, "universal_type": "function", "name": "nRet=0;", "text_snippet": "sal_Bool SAL_CALL osl_releaseMutex(oslMutex Mutex) \n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) Mutex;"}, {"node_id": 367, "universal_type": "function", "name": "unknown", "text_snippet": "osl_releaseMutex(oslMutex Mutex)"}, {"node_id": 435, "universal_type": "function", "name": "globalMutexInitImpl", "text_snippet": "static void globalMutexInitImpl(void) {\n pthread_mutexattr_t attr;\n if (pthread_mutexattr_init"}, {"node_id": 437, "universal_type": "function", "name": "unknown", "text_snippet": "globalMutexInitImpl(void)"}], "class_declarations": [{"node_id": 43, "universal_type": "class", "name": "_oslMutexImpl", "text_snippet": "struct _oslMutexImpl\n{\n\tpthread_mutex_t\tmutex;\n}"}, {"node_id": 44, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 0, "text": "#include \"system.h\"\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <osl/mutex.h>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include <osl/diagnose.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <pthread.h>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <stdlib.h>\n"}, {"node_id": 13, "text": "#include"}]}, "original_source_code": "/**************************************************************\n * \n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n * \n *************************************************************/\n\n\n\n#include \"system.h\"\n\n#include <osl/mutex.h>\n#include <osl/diagnose.h>\n\n#include <pthread.h>\n#include <stdlib.h>\n\n#if defined LINUX /* bad hack */\nint pthread_mutexattr_setkind_np(pthread_mutexattr_t *, int);\n#define pthread_mutexattr_settype pthread_mutexattr_setkind_np\n#define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP\n#endif\n\n/*\n\tImplementation notes:\n\toslMutex hides a pointer to the oslMutexImpl structure, which\n\tist needed to manage recursive locks on a mutex.\n\t\n*/\n\ntypedef struct _oslMutexImpl\n{\n\tpthread_mutex_t\tmutex;\n} oslMutexImpl;\n\n\n/*****************************************************************************/\n/* osl_createMutex */\n/*****************************************************************************/\noslMutex SAL_CALL osl_createMutex() \n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) malloc(sizeof(oslMutexImpl));\n pthread_mutexattr_t aMutexAttr;\n int nRet=0;\n \n\tOSL_ASSERT(pMutex);\n\n\tif ( pMutex == NULL )\n\t{\n\t\treturn 0;\n\t}\n \n pthread_mutexattr_init(&aMutexAttr);\n\n nRet = pthread_mutexattr_settype(&aMutexAttr, PTHREAD_MUTEX_RECURSIVE);\n \n nRet = pthread_mutex_init(&(pMutex->mutex), &aMutexAttr);\n\tif ( nRet != 0 )\n\t{\n\t OSL_TRACE(\"osl_createMutex : mutex init failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n \n\t free(pMutex);\n\t\tpMutex = NULL;\n\t}\n\n pthread_mutexattr_destroy(&aMutexAttr);\n \n\treturn (oslMutex) pMutex;\n}\n\n/*****************************************************************************/\n/* osl_destroyMutex */\n/*****************************************************************************/\nvoid SAL_CALL osl_destroyMutex(oslMutex Mutex)\n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n\n OSL_ASSERT(pMutex);\n \n\tif ( pMutex != NULL )\n\t{\n int nRet=0;\n \n\t nRet = pthread_mutex_destroy(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE(\"osl_destroyMutex : mutex destroy failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n }\n\n\t\tfree(pMutex);\n\t}\n \n return;\n}\n\n/*****************************************************************************/\n/* osl_acquireMutex */\n/*****************************************************************************/\nsal_Bool SAL_CALL osl_acquireMutex(oslMutex Mutex) \n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n \n OSL_ASSERT(pMutex);\n\n\tif ( pMutex != NULL )\n\t{\n int nRet=0;\n \n nRet = pthread_mutex_lock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE(\"osl_acquireMutex : mutex lock failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n\t\t\treturn sal_False;\n }\n\t\treturn sal_True;\t\t\n\t}\n\n /* not initialized */\n return sal_False;\n}\n\n/*****************************************************************************/\n/* osl_tryToAcquireMutex */\n/*****************************************************************************/\nsal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex Mutex) \n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n\n OSL_ASSERT(pMutex);\n\n\tif ( pMutex ) \n\t{\n\t\tint nRet = 0;\n nRet = pthread_mutex_trylock(&(pMutex->mutex));\n if ( nRet != 0 )\n return sal_False;\n \n\t\treturn sal_True;\n\t}\n \n /* not initialized */\n return sal_False;\n}\n\n/*****************************************************************************/\n/* osl_releaseMutex */\n/*****************************************************************************/\nsal_Bool SAL_CALL osl_releaseMutex(oslMutex Mutex) \n{\n\toslMutexImpl* pMutex = (oslMutexImpl*) Mutex;\n \n OSL_ASSERT(pMutex);\n\n\tif ( pMutex ) \n\t{\n int nRet=0;\n nRet = pthread_mutex_unlock(&(pMutex->mutex));\n if ( nRet != 0 )\n {\n OSL_TRACE(\"osl_releaseMutex : mutex unlock failed. Errno: %d; %s\\n\", \n nRet, strerror(nRet));\n\t\t\treturn sal_False;\n }\n \n return sal_True;\n\t} \n\n /* not initialized */\n return sal_False;\n}\n\n/*****************************************************************************/\n/* osl_getGlobalMutex */\n/*****************************************************************************/\n\nstatic oslMutexImpl globalMutexImpl;\n\nstatic void globalMutexInitImpl(void) {\n pthread_mutexattr_t attr;\n if (pthread_mutexattr_init(&attr) != 0 ||\n pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) ||\n pthread_mutex_init(&globalMutexImpl.mutex, &attr) != 0 ||\n pthread_mutexattr_destroy(&attr) != 0)\n {\n abort();\n }\n}\n\noslMutex * SAL_CALL osl_getGlobalMutex() \n{\n\t/* necessary to get a \"oslMutex *\" */\n\tstatic oslMutex globalMutex = (oslMutex) &globalMutexImpl;\n\n static pthread_once_t once = PTHREAD_ONCE_INIT;\n if (pthread_once(&once, &globalMutexInitImpl) != 0) {\n abort();\n }\n \n\treturn &globalMutex;\n}\n"}
82
c
/** * Copyright (2013) JDS Uniphase. All rights reserved. * * Author: <NAME> (<EMAIL>) */ #ifndef XTREME_CS_JOB_CRITERIA_H_ #define XTREME_CS_JOB_CRITERIA_H_ #include "xtreme/common/criteria.h" #include "xtreme/cs/job_type_def.h" namespace xtreme { namespace jobm { class JobCriteria : public ICriteria { public: virtual bool Match(EventPtr& p_event) { if (p_event->type() != xtreme::kEVENT_JOB ) return false; Event* pEvent = p_event.get(); if (!pEvent) return false; JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent); if (action_type_combine_ & pJobEvent->action_type()) return true; return false; } explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) { } virtual ~JobCriteria() { } protected: uint16_t action_type_combine_; }; } } #endif // XTREME_CS_JOB_CRITERIA_H_
24.88
34
(translation_unit) "/**\n * Copyright (2013) JDS Uniphase. All rights reserved.\n *\n * Author: <NAME> (<EMAIL>)\n */\n#ifndef XTREME_CS_JOB_CRITERIA_H_\n#define XTREME_CS_JOB_CRITERIA_H_\n#include "xtreme/common/criteria.h"\n#include "xtreme/cs/job_type_def.h"\n\nnamespace xtreme {\nnamespace jobm {\nclass JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }\n explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }\n virtual ~JobCriteria() {\n }\n\n protected:\n uint16_t action_type_combine_;\n};\n}\n}\n#endif // XTREME_CS_JOB_CRITERIA_H_\n" (comment) "/**\n * Copyright (2013) JDS Uniphase. All rights reserved.\n *\n * Author: <NAME> (<EMAIL>)\n */" (preproc_ifdef) "#ifndef XTREME_CS_JOB_CRITERIA_H_\n#define XTREME_CS_JOB_CRITERIA_H_\n#include "xtreme/common/criteria.h"\n#include "xtreme/cs/job_type_def.h"\n\nnamespace xtreme {\nnamespace jobm {\nclass JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }\n explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }\n virtual ~JobCriteria() {\n }\n\n protected:\n uint16_t action_type_combine_;\n};\n}\n}\n#endif" (#ifndef) "#ifndef" (identifier) "XTREME_CS_JOB_CRITERIA_H_" (preproc_def) "#define XTREME_CS_JOB_CRITERIA_H_\n" (#define) "#define" (identifier) "XTREME_CS_JOB_CRITERIA_H_" (preproc_include) "#include "xtreme/common/criteria.h"\n" (#include) "#include" (string_literal) ""xtreme/common/criteria.h"" (") """ (string_content) "xtreme/common/criteria.h" (") """ (preproc_include) "#include "xtreme/cs/job_type_def.h"\n" (#include) "#include" (string_literal) ""xtreme/cs/job_type_def.h"" (") """ (string_content) "xtreme/cs/job_type_def.h" (") """ (function_definition) "namespace xtreme {\nnamespace jobm {\nclass JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }\n explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }\n virtual ~JobCriteria() {\n }\n\n protected:\n uint16_t action_type_combine_;\n};\n}\n}" (type_identifier) "namespace" (identifier) "xtreme" (compound_statement) "{\nnamespace jobm {\nclass JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }\n explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }\n virtual ~JobCriteria() {\n }\n\n protected:\n uint16_t action_type_combine_;\n};\n}\n}" ({) "{" (function_definition) "namespace jobm {\nclass JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }\n explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }\n virtual ~JobCriteria() {\n }\n\n protected:\n uint16_t action_type_combine_;\n};\n}" (type_identifier) "namespace" (identifier) "jobm" (compound_statement) "{\nclass JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }\n explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }\n virtual ~JobCriteria() {\n }\n\n protected:\n uint16_t action_type_combine_;\n};\n}" ({) "{" (function_definition) "class JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }\n explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }\n virtual ~JobCriteria() {\n }\n\n protected:\n uint16_t action_type_combine_;\n}" (type_identifier) "class" (identifier) "JobCriteria" (ERROR) ": public ICriteria" (:) ":" (identifier) "public" (identifier) "ICriteria" (compound_statement) "{\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }\n explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }\n virtual ~JobCriteria() {\n }\n\n protected:\n uint16_t action_type_combine_;\n}" ({) "{" (labeled_statement) "public:\n virtual bool" (statement_identifier) "public" (:) ":" (declaration) "virtual bool" (type_identifier) "virtual" (identifier) "bool" (;) "" (expression_statement) "Match(EventPtr& p_event)" (call_expression) "Match(EventPtr& p_event)" (identifier) "Match" (argument_list) "(EventPtr& p_event)" (() "(" (binary_expression) "EventPtr& p_event" (identifier) "EventPtr" (&) "&" (identifier) "p_event" ()) ")" (;) "" (compound_statement) "{\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }" ({) "{" (if_statement) "if (p_event->type() != xtreme::kEVENT_JOB )\n return false;" (if) "if" (parenthesized_expression) "(p_event->type() != xtreme::kEVENT_JOB )" (() "(" (binary_expression) "p_event->type() != xtreme" (call_expression) "p_event->type()" (field_expression) "p_event->type" (identifier) "p_event" (->) "->" (field_identifier) "type" (argument_list) "()" (() "(" ()) ")" (!=) "!=" (identifier) "xtreme" (ERROR) "::kEVENT_JOB" (:) ":" (:) ":" (identifier) "kEVENT_JOB" ()) ")" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (declaration) "Event* pEvent = p_event.get();" (type_identifier) "Event" (init_declarator) "* pEvent = p_event.get()" (pointer_declarator) "* pEvent" (*) "*" (identifier) "pEvent" (=) "=" (call_expression) "p_event.get()" (field_expression) "p_event.get" (identifier) "p_event" (.) "." (field_identifier) "get" (argument_list) "()" (() "(" ()) ")" (;) ";" (if_statement) "if (!pEvent)\n return false;" (if) "if" (parenthesized_expression) "(!pEvent)" (() "(" (unary_expression) "!pEvent" (!) "!" (identifier) "pEvent" ()) ")" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (declaration) "JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);" (type_identifier) "JobEvent" (init_declarator) "* pJobEvent = static_cast<JobEvent*>(pEvent)" (pointer_declarator) "* pJobEvent" (*) "*" (identifier) "pJobEvent" (=) "=" (binary_expression) "static_cast<JobEvent*>(pEvent)" (binary_expression) "static_cast<JobEvent" (identifier) "static_cast" (<) "<" (identifier) "JobEvent" (ERROR) "*" (*) "*" (>) ">" (parenthesized_expression) "(pEvent)" (() "(" (identifier) "pEvent" ()) ")" (;) ";" (if_statement) "if (action_type_combine_ & pJobEvent->action_type())\n return true;" (if) "if" (parenthesized_expression) "(action_type_combine_ & pJobEvent->action_type())" (() "(" (binary_expression) "action_type_combine_ & pJobEvent->action_type()" (identifier) "action_type_combine_" (&) "&" (call_expression) "pJobEvent->action_type()" (field_expression) "pJobEvent->action_type" (identifier) "pJobEvent" (->) "->" (field_identifier) "action_type" (argument_list) "()" (() "(" ()) ")" ()) ")" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (function_definition) "explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }" (type_identifier) "explicit" (function_declarator) "JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine)" (identifier) "JobCriteria" (parameter_list) "(uint16_t action_type_combine)" (() "(" (parameter_declaration) "uint16_t action_type_combine" (primitive_type) "uint16_t" (identifier) "action_type_combine" ()) ")" (ERROR) ":" (:) ":" (call_expression) "action_type_combine_(action_type_combine)" (identifier) "action_type_combine_" (argument_list) "(action_type_combine)" (() "(" (identifier) "action_type_combine" ()) ")" (compound_statement) "{\n }" ({) "{" (}) "}" (function_definition) "virtual ~JobCriteria() {\n }" (type_identifier) "virtual" (ERROR) "~" (~) "~" (function_declarator) "JobCriteria()" (identifier) "JobCriteria" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n }" ({) "{" (}) "}" (labeled_statement) "protected:\n uint16_t action_type_combine_;" (statement_identifier) "protected" (:) ":" (declaration) "uint16_t action_type_combine_;" (primitive_type) "uint16_t" (identifier) "action_type_combine_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (}) "}" (#endif) "#endif" (comment) "// XTREME_CS_JOB_CRITERIA_H_"
203
5
{"language": "c", "success": true, "metadata": {"lines": 34, "avg_line_length": 24.88, "nodes": 119, "errors": 0, "source_hash": "5b74ce481278401c52ab9853d593647ba037fffaa9a67886f78d869a28aa6a69", "categorized_nodes": 84}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef XTREME_CS_JOB_CRITERIA_H_\n#define XTREME_CS_JOB_CRITERIA_H_\n#include \"xtreme/common/criteria.h\"\n#include \"xtreme/cs/job_type_def.h\"\n\nnamespace xtreme {\nnamespace jobm {\nclass JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }\n explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }\n virtual ~JobCriteria() {\n }\n\n protected:\n uint16_t action_type_combine_;\n};\n}\n}\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 118], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 35, "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": "XTREME_CS_JOB_CRITERIA_H_", "parent": 0, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 33}}, {"id": 3, "type": "preproc_def", "text": "#define XTREME_CS_JOB_CRITERIA_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": "XTREME_CS_JOB_CRITERIA_H_", "parent": 3, "children": [], "start_point": {"row": 6, "column": 8}, "end_point": {"row": 6, "column": 33}}, {"id": 6, "type": "preproc_include", "text": "#include \"xtreme/common/criteria.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"xtreme/common/criteria.h\"", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 35}}, {"id": 9, "type": "preproc_include", "text": "#include \"xtreme/cs/job_type_def.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": "\"xtreme/cs/job_type_def.h\"", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 35}}, {"id": 12, "type": "function_definition", "text": "namespace xtreme {\nnamespace jobm {\nclass JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }\n explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }\n virtual ~JobCriteria() {\n }\n\n protected:\n uint16_t action_type_combine_;\n};\n}\n}", "parent": 0, "children": [13, 14], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 34, "column": 1}}, {"id": 13, "type": "type_identifier", "text": "namespace", "parent": 12, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 9}}, {"id": 14, "type": "identifier", "text": "xtreme", "parent": 12, "children": [], "start_point": {"row": 10, "column": 10}, "end_point": {"row": 10, "column": 16}}, {"id": 15, "type": "function_definition", "text": "namespace jobm {\nclass JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }\n explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }\n virtual ~JobCriteria() {\n }\n\n protected:\n uint16_t action_type_combine_;\n};\n}", "parent": 12, "children": [16, 17], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 33, "column": 1}}, {"id": 16, "type": "type_identifier", "text": "namespace", "parent": 15, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 9}}, {"id": 17, "type": "identifier", "text": "jobm", "parent": 15, "children": [], "start_point": {"row": 11, "column": 10}, "end_point": {"row": 11, "column": 14}}, {"id": 18, "type": "function_definition", "text": "class JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }\n explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }\n virtual ~JobCriteria() {\n }\n\n protected:\n uint16_t action_type_combine_;\n}", "parent": 15, "children": [19, 20], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 32, "column": 1}}, {"id": 19, "type": "identifier", "text": "JobCriteria", "parent": 18, "children": [], "start_point": {"row": 12, "column": 6}, "end_point": {"row": 12, "column": 17}}, {"id": 20, "type": "ERROR", "text": ": public ICriteria", "parent": 18, "children": [21], "start_point": {"row": 12, "column": 18}, "end_point": {"row": 12, "column": 36}}, {"id": 21, "type": "identifier", "text": "ICriteria", "parent": 20, "children": [], "start_point": {"row": 12, "column": 27}, "end_point": {"row": 12, "column": 36}}, {"id": 22, "type": "labeled_statement", "text": "public:\n virtual bool", "parent": 18, "children": [23], "start_point": {"row": 13, "column": 1}, "end_point": {"row": 14, "column": 14}}, {"id": 23, "type": "declaration", "text": "virtual bool", "parent": 22, "children": [24, 25], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 14}}, {"id": 24, "type": "type_identifier", "text": "virtual", "parent": 23, "children": [], "start_point": {"row": 14, "column": 2}, "end_point": {"row": 14, "column": 9}}, {"id": 25, "type": "identifier", "text": "bool", "parent": 23, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 14}}, {"id": 26, "type": "call_expression", "text": "Match(EventPtr& p_event)", "parent": 18, "children": [27, 28], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 39}}, {"id": 27, "type": "identifier", "text": "Match", "parent": 26, "children": [], "start_point": {"row": 14, "column": 15}, "end_point": {"row": 14, "column": 20}}, {"id": 28, "type": "argument_list", "text": "(EventPtr& p_event)", "parent": 26, "children": [29], "start_point": {"row": 14, "column": 20}, "end_point": {"row": 14, "column": 39}}, {"id": 29, "type": "binary_expression", "text": "EventPtr& p_event", "parent": 28, "children": [30, 31], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 38}}, {"id": 30, "type": "identifier", "text": "EventPtr", "parent": 29, "children": [], "start_point": {"row": 14, "column": 21}, "end_point": {"row": 14, "column": 29}}, {"id": 31, "type": "identifier", "text": "p_event", "parent": 29, "children": [], "start_point": {"row": 14, "column": 31}, "end_point": {"row": 14, "column": 38}}, {"id": 32, "type": "if_statement", "text": "if (p_event->type() != xtreme::kEVENT_JOB )\n return false;", "parent": 18, "children": [33, 44], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 16, "column": 19}}, {"id": 33, "type": "parenthesized_expression", "text": "(p_event->type() != xtreme::kEVENT_JOB )", "parent": 32, "children": [34, 42], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 47}}, {"id": 34, "type": "binary_expression", "text": "p_event->type() != xtreme", "parent": 33, "children": [35, 40, 41], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 33}}, {"id": 35, "type": "call_expression", "text": "p_event->type()", "parent": 34, "children": [36, 39], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 23}}, {"id": 36, "type": "field_expression", "text": "p_event->type", "parent": 35, "children": [37, 38], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 21}}, {"id": 37, "type": "identifier", "text": "p_event", "parent": 36, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 15}}, {"id": 38, "type": "field_identifier", "text": "type", "parent": 36, "children": [], "start_point": {"row": 15, "column": 17}, "end_point": {"row": 15, "column": 21}}, {"id": 39, "type": "argument_list", "text": "()", "parent": 35, "children": [], "start_point": {"row": 15, "column": 21}, "end_point": {"row": 15, "column": 23}}, {"id": 40, "type": "!=", "text": "!=", "parent": 34, "children": [], "start_point": {"row": 15, "column": 24}, "end_point": {"row": 15, "column": 26}}, {"id": 41, "type": "identifier", "text": "xtreme", "parent": 34, "children": [], "start_point": {"row": 15, "column": 27}, "end_point": {"row": 15, "column": 33}}, {"id": 42, "type": "ERROR", "text": "::kEVENT_JOB", "parent": 33, "children": [43], "start_point": {"row": 15, "column": 33}, "end_point": {"row": 15, "column": 45}}, {"id": 43, "type": "identifier", "text": "kEVENT_JOB", "parent": 42, "children": [], "start_point": {"row": 15, "column": 35}, "end_point": {"row": 15, "column": 45}}, {"id": 44, "type": "return_statement", "text": "return false;", "parent": 32, "children": [45], "start_point": {"row": 16, "column": 6}, "end_point": {"row": 16, "column": 19}}, {"id": 45, "type": "false", "text": "false", "parent": 44, "children": [], "start_point": {"row": 16, "column": 13}, "end_point": {"row": 16, "column": 18}}, {"id": 46, "type": "declaration", "text": "Event* pEvent = p_event.get();", "parent": 18, "children": [47, 48], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 34}}, {"id": 47, "type": "type_identifier", "text": "Event", "parent": 46, "children": [], "start_point": {"row": 17, "column": 4}, "end_point": {"row": 17, "column": 9}}, {"id": 48, "type": "init_declarator", "text": "* pEvent = p_event.get()", "parent": 46, "children": [49, 52, 53], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 33}}, {"id": 49, "type": "pointer_declarator", "text": "* pEvent", "parent": 48, "children": [50, 51], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 17}}, {"id": 50, "type": "*", "text": "*", "parent": 49, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 10}}, {"id": 51, "type": "identifier", "text": "pEvent", "parent": 49, "children": [], "start_point": {"row": 17, "column": 11}, "end_point": {"row": 17, "column": 17}}, {"id": 52, "type": "=", "text": "=", "parent": 48, "children": [], "start_point": {"row": 17, "column": 18}, "end_point": {"row": 17, "column": 19}}, {"id": 53, "type": "call_expression", "text": "p_event.get()", "parent": 48, "children": [54, 57], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 33}}, {"id": 54, "type": "field_expression", "text": "p_event.get", "parent": 53, "children": [55, 56], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 31}}, {"id": 55, "type": "identifier", "text": "p_event", "parent": 54, "children": [], "start_point": {"row": 17, "column": 20}, "end_point": {"row": 17, "column": 27}}, {"id": 56, "type": "field_identifier", "text": "get", "parent": 54, "children": [], "start_point": {"row": 17, "column": 28}, "end_point": {"row": 17, "column": 31}}, {"id": 57, "type": "argument_list", "text": "()", "parent": 53, "children": [], "start_point": {"row": 17, "column": 31}, "end_point": {"row": 17, "column": 33}}, {"id": 58, "type": "if_statement", "text": "if (!pEvent)\n return false;", "parent": 18, "children": [59, 63], "start_point": {"row": 18, "column": 4}, "end_point": {"row": 19, "column": 19}}, {"id": 59, "type": "parenthesized_expression", "text": "(!pEvent)", "parent": 58, "children": [60], "start_point": {"row": 18, "column": 7}, "end_point": {"row": 18, "column": 16}}, {"id": 60, "type": "unary_expression", "text": "!pEvent", "parent": 59, "children": [61, 62], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 15}}, {"id": 61, "type": "!", "text": "!", "parent": 60, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 9}}, {"id": 62, "type": "identifier", "text": "pEvent", "parent": 60, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 15}}, {"id": 63, "type": "return_statement", "text": "return false;", "parent": 58, "children": [64], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 19}}, {"id": 64, "type": "false", "text": "false", "parent": 63, "children": [], "start_point": {"row": 19, "column": 13}, "end_point": {"row": 19, "column": 18}}, {"id": 65, "type": "declaration", "text": "JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);", "parent": 18, "children": [66, 67], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 57}}, {"id": 66, "type": "type_identifier", "text": "JobEvent", "parent": 65, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 12}}, {"id": 67, "type": "init_declarator", "text": "* pJobEvent = static_cast<JobEvent*>(pEvent)", "parent": 65, "children": [68, 71, 72], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 56}}, {"id": 68, "type": "pointer_declarator", "text": "* pJobEvent", "parent": 67, "children": [69, 70], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 23}}, {"id": 69, "type": "*", "text": "*", "parent": 68, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 13}}, {"id": 70, "type": "identifier", "text": "pJobEvent", "parent": 68, "children": [], "start_point": {"row": 20, "column": 14}, "end_point": {"row": 20, "column": 23}}, {"id": 71, "type": "=", "text": "=", "parent": 67, "children": [], "start_point": {"row": 20, "column": 24}, "end_point": {"row": 20, "column": 25}}, {"id": 72, "type": "binary_expression", "text": "static_cast<JobEvent*>(pEvent)", "parent": 67, "children": [73, 77, 79, 80], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 56}}, {"id": 73, "type": "binary_expression", "text": "static_cast<JobEvent", "parent": 72, "children": [74, 75, 76], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 46}}, {"id": 74, "type": "identifier", "text": "static_cast", "parent": 73, "children": [], "start_point": {"row": 20, "column": 26}, "end_point": {"row": 20, "column": 37}}, {"id": 75, "type": "<", "text": "<", "parent": 73, "children": [], "start_point": {"row": 20, "column": 37}, "end_point": {"row": 20, "column": 38}}, {"id": 76, "type": "identifier", "text": "JobEvent", "parent": 73, "children": [], "start_point": {"row": 20, "column": 38}, "end_point": {"row": 20, "column": 46}}, {"id": 77, "type": "ERROR", "text": "*", "parent": 72, "children": [78], "start_point": {"row": 20, "column": 46}, "end_point": {"row": 20, "column": 47}}, {"id": 78, "type": "*", "text": "*", "parent": 77, "children": [], "start_point": {"row": 20, "column": 46}, "end_point": {"row": 20, "column": 47}}, {"id": 79, "type": ">", "text": ">", "parent": 72, "children": [], "start_point": {"row": 20, "column": 47}, "end_point": {"row": 20, "column": 48}}, {"id": 80, "type": "parenthesized_expression", "text": "(pEvent)", "parent": 72, "children": [81], "start_point": {"row": 20, "column": 48}, "end_point": {"row": 20, "column": 56}}, {"id": 81, "type": "identifier", "text": "pEvent", "parent": 80, "children": [], "start_point": {"row": 20, "column": 49}, "end_point": {"row": 20, "column": 55}}, {"id": 82, "type": "if_statement", "text": "if (action_type_combine_ & pJobEvent->action_type())\n return true;", "parent": 18, "children": [83, 91], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 22, "column": 18}}, {"id": 83, "type": "parenthesized_expression", "text": "(action_type_combine_ & pJobEvent->action_type())", "parent": 82, "children": [84], "start_point": {"row": 21, "column": 7}, "end_point": {"row": 21, "column": 56}}, {"id": 84, "type": "binary_expression", "text": "action_type_combine_ & pJobEvent->action_type()", "parent": 83, "children": [85, 86], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 55}}, {"id": 85, "type": "identifier", "text": "action_type_combine_", "parent": 84, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 28}}, {"id": 86, "type": "call_expression", "text": "pJobEvent->action_type()", "parent": 84, "children": [87, 90], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 55}}, {"id": 87, "type": "field_expression", "text": "pJobEvent->action_type", "parent": 86, "children": [88, 89], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 53}}, {"id": 88, "type": "identifier", "text": "pJobEvent", "parent": 87, "children": [], "start_point": {"row": 21, "column": 31}, "end_point": {"row": 21, "column": 40}}, {"id": 89, "type": "field_identifier", "text": "action_type", "parent": 87, "children": [], "start_point": {"row": 21, "column": 42}, "end_point": {"row": 21, "column": 53}}, {"id": 90, "type": "argument_list", "text": "()", "parent": 86, "children": [], "start_point": {"row": 21, "column": 53}, "end_point": {"row": 21, "column": 55}}, {"id": 91, "type": "return_statement", "text": "return true;", "parent": 82, "children": [92], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 18}}, {"id": 92, "type": "true", "text": "true", "parent": 91, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 17}}, {"id": 93, "type": "return_statement", "text": "return false;", "parent": 18, "children": [94], "start_point": {"row": 23, "column": 4}, "end_point": {"row": 23, "column": 17}}, {"id": 94, "type": "false", "text": "false", "parent": 93, "children": [], "start_point": {"row": 23, "column": 11}, "end_point": {"row": 23, "column": 16}}, {"id": 95, "type": "function_definition", "text": "explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }", "parent": 18, "children": [96, 97], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 26, "column": 3}}, {"id": 96, "type": "type_identifier", "text": "explicit", "parent": 95, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 10}}, {"id": 97, "type": "function_declarator", "text": "JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine)", "parent": 95, "children": [98, 99, 103], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 96}}, {"id": 98, "type": "identifier", "text": "JobCriteria", "parent": 97, "children": [], "start_point": {"row": 25, "column": 11}, "end_point": {"row": 25, "column": 22}}, {"id": 99, "type": "parameter_list", "text": "(uint16_t action_type_combine)", "parent": 97, "children": [100], "start_point": {"row": 25, "column": 22}, "end_point": {"row": 25, "column": 52}}, {"id": 100, "type": "parameter_declaration", "text": "uint16_t action_type_combine", "parent": 99, "children": [101, 102], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 51}}, {"id": 101, "type": "primitive_type", "text": "uint16_t", "parent": 100, "children": [], "start_point": {"row": 25, "column": 23}, "end_point": {"row": 25, "column": 31}}, {"id": 102, "type": "identifier", "text": "action_type_combine", "parent": 100, "children": [], "start_point": {"row": 25, "column": 32}, "end_point": {"row": 25, "column": 51}}, {"id": 103, "type": "call_expression", "text": "action_type_combine_(action_type_combine)", "parent": 97, "children": [104, 105], "start_point": {"row": 25, "column": 55}, "end_point": {"row": 25, "column": 96}}, {"id": 104, "type": "identifier", "text": "action_type_combine_", "parent": 103, "children": [], "start_point": {"row": 25, "column": 55}, "end_point": {"row": 25, "column": 75}}, {"id": 105, "type": "argument_list", "text": "(action_type_combine)", "parent": 103, "children": [106], "start_point": {"row": 25, "column": 75}, "end_point": {"row": 25, "column": 96}}, {"id": 106, "type": "identifier", "text": "action_type_combine", "parent": 105, "children": [], "start_point": {"row": 25, "column": 76}, "end_point": {"row": 25, "column": 95}}, {"id": 107, "type": "function_definition", "text": "virtual ~JobCriteria() {\n }", "parent": 18, "children": [108, 109, 111], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 28, "column": 3}}, {"id": 108, "type": "type_identifier", "text": "virtual", "parent": 107, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 9}}, {"id": 109, "type": "ERROR", "text": "~", "parent": 107, "children": [110], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 11}}, {"id": 110, "type": "~", "text": "~", "parent": 109, "children": [], "start_point": {"row": 27, "column": 10}, "end_point": {"row": 27, "column": 11}}, {"id": 111, "type": "function_declarator", "text": "JobCriteria()", "parent": 107, "children": [112, 113], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 24}}, {"id": 112, "type": "identifier", "text": "JobCriteria", "parent": 111, "children": [], "start_point": {"row": 27, "column": 11}, "end_point": {"row": 27, "column": 22}}, {"id": 113, "type": "parameter_list", "text": "()", "parent": 111, "children": [], "start_point": {"row": 27, "column": 22}, "end_point": {"row": 27, "column": 24}}, {"id": 114, "type": "labeled_statement", "text": "protected:\n uint16_t action_type_combine_;", "parent": 18, "children": [115], "start_point": {"row": 30, "column": 1}, "end_point": {"row": 31, "column": 32}}, {"id": 115, "type": "declaration", "text": "uint16_t action_type_combine_;", "parent": 114, "children": [116, 117], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 32}}, {"id": 116, "type": "primitive_type", "text": "uint16_t", "parent": 115, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 10}}, {"id": 117, "type": "identifier", "text": "action_type_combine_", "parent": 115, "children": [], "start_point": {"row": 31, "column": 11}, "end_point": {"row": 31, "column": 31}}, {"id": 118, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 6}}]}, "node_categories": {"declarations": {"functions": [12, 15, 18, 95, 97, 107, 111], "variables": [23, 46, 65, 100, 115], "classes": [], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [26, 29, 33, 34, 35, 36, 53, 54, 59, 60, 72, 73, 80, 83, 84, 86, 87, 103], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 13, 14, 16, 17, 19, 21, 24, 25, 27, 30, 31, 32, 37, 38, 41, 43, 47, 51, 55, 56, 58, 62, 66, 70, 74, 76, 81, 82, 85, 88, 89, 96, 98, 102, 104, 106, 108, 112, 117, 118], "returns": [44, 63, 91, 93], "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": "JobCriteria", "text_snippet": "namespace xtreme {\nnamespace jobm {\nclass JobCriteria : public ICriteria {\n public:\n virtual bool M"}, {"node_id": 15, "universal_type": "function", "name": "JobCriteria", "text_snippet": "namespace jobm {\nclass JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_ev"}, {"node_id": 18, "universal_type": "function", "name": "JobCriteria", "text_snippet": "class JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_"}, {"node_id": 95, "universal_type": "function", "name": "unknown", "text_snippet": "explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }"}, {"node_id": 97, "universal_type": "function", "name": "unknown", "text_snippet": "JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine)"}, {"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "virtual ~JobCriteria() {\n }"}, {"node_id": 111, "universal_type": "function", "name": "unknown", "text_snippet": "JobCriteria()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include \"xtreme/common/criteria.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"xtreme/cs/job_type_def.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "/**\n * Copyright (2013) JDS Uniphase. All rights reserved.\n *\n * Author: <NAME> (<EMAIL>)\n */\n#ifndef XTREME_CS_JOB_CRITERIA_H_\n#define XTREME_CS_JOB_CRITERIA_H_\n#include \"xtreme/common/criteria.h\"\n#include \"xtreme/cs/job_type_def.h\"\n\nnamespace xtreme {\nnamespace jobm {\nclass JobCriteria : public ICriteria {\n public:\n virtual bool Match(EventPtr& p_event) {\n if (p_event->type() != xtreme::kEVENT_JOB )\n return false;\n Event* pEvent = p_event.get();\n if (!pEvent)\n return false;\n JobEvent* pJobEvent = static_cast<JobEvent*>(pEvent);\n if (action_type_combine_ & pJobEvent->action_type())\n return true;\n return false;\n }\n explicit JobCriteria(uint16_t action_type_combine) : action_type_combine_(action_type_combine) {\n }\n virtual ~JobCriteria() {\n }\n\n protected:\n uint16_t action_type_combine_;\n};\n}\n}\n#endif // XTREME_CS_JOB_CRITERIA_H_\n"}
83
c
#ifndef _GB_GBCONFIG_H #define _GB_GBCONFIG_H //Timer options #define cfg_use_time_show //#define cfg_use_time_per_line //64 bits (slow) vs 32 bits (fast) //#define cfg_use_tstates_64bits //Fast direct registers #define cfg_use_direct_RegA #define cfg_use_direct_RegB #define cfg_use_direct_RegC #define cfg_use_direct_RegD #define cfg_use_direct_RegE #define cfg_use_direct_RegH #define cfg_use_direct_RegL #define cfg_use_direct_REG_Ax #define cfg_use_direct_REG_Fx #define cfg_use_direct_REG_Bx #define cfg_use_direct_REG_Cx #define cfg_use_direct_REG_Dx #define cfg_use_direct_REG_Ex #define cfg_use_direct_REG_Hx #define cfg_use_direct_REG_Lx #define cfg_use_direct_REG_AFx #define cfg_use_direct_REG_BC #define cfg_use_direct_REG_BCx #define cfg_use_direct_REG_DE #define cfg_use_direct_REG_DEx #define cfg_use_direct_REG_HL #define cfg_use_direct_REG_HLx #define cfg_use_direct_REG_PC #define cfg_use_direct_REG_SP #define cfg_use_direct_REG_IX #define cfg_use_direct_REG_IY #define cfg_use_direct_REG_I #define cfg_use_direct_MemPtr #define cfg_use_direct_CarryFlag #define cfg_use_direct_IFF1 #define cfg_use_direct_IFF2 #define cfg_use_direct_NMI #define cfg_use_direct_triggerNMI #define cfg_use_direct_IM #define cfg_use_direct_Halted #define cfg_use_direct_PinReset #define cfg_use_direct_PendingEI //Options simulator #define cfg_use_finish_fast #define cfg_use_z80RAM_fast #define cfg_use_z80Ports_fast #define cfg_use_time_fast //#define cfg_use_test_fps_48k #endif
24.83
60
(translation_unit) "#ifndef _GB_GBCONFIG_H \n #define _GB_GBCONFIG_H \n \n//Timer options \n#define cfg_use_time_show \n//#define cfg_use_time_per_line \n//64 bits (slow) vs 32 bits (fast) \n//#define cfg_use_tstates_64bits \n \n//Fast direct registers \n#define cfg_use_direct_RegA \n#define cfg_use_direct_RegB \n#define cfg_use_direct_RegC \n#define cfg_use_direct_RegD \n#define cfg_use_direct_RegE \n#define cfg_use_direct_RegH \n#define cfg_use_direct_RegL \n \n#define cfg_use_direct_REG_Ax \n#define cfg_use_direct_REG_Fx \n#define cfg_use_direct_REG_Bx \n#define cfg_use_direct_REG_Cx \n#define cfg_use_direct_REG_Dx \n#define cfg_use_direct_REG_Ex \n#define cfg_use_direct_REG_Hx \n#define cfg_use_direct_REG_Lx \n \n#define cfg_use_direct_REG_AFx \n#define cfg_use_direct_REG_BC \n#define cfg_use_direct_REG_BCx \n#define cfg_use_direct_REG_DE \n#define cfg_use_direct_REG_DEx \n#define cfg_use_direct_REG_HL \n#define cfg_use_direct_REG_HLx \n \n#define cfg_use_direct_REG_PC \n#define cfg_use_direct_REG_SP \n#define cfg_use_direct_REG_IX \n#define cfg_use_direct_REG_IY \n#define cfg_use_direct_REG_I \n#define cfg_use_direct_MemPtr \n#define cfg_use_direct_CarryFlag \n \n#define cfg_use_direct_IFF1 \n#define cfg_use_direct_IFF2 \n#define cfg_use_direct_NMI \n#define cfg_use_direct_triggerNMI \n#define cfg_use_direct_IM \n#define cfg_use_direct_Halted \n#define cfg_use_direct_PinReset \n#define cfg_use_direct_PendingEI \n \n//Options simulator \n#define cfg_use_finish_fast \n#define cfg_use_z80RAM_fast \n#define cfg_use_z80Ports_fast \n#define cfg_use_time_fast \n//#define cfg_use_test_fps_48k \n \n#endif \n" (preproc_ifdef) "#ifndef _GB_GBCONFIG_H \n #define _GB_GBCONFIG_H \n \n//Timer options \n#define cfg_use_time_show \n//#define cfg_use_time_per_line \n//64 bits (slow) vs 32 bits (fast) \n//#define cfg_use_tstates_64bits \n \n//Fast direct registers \n#define cfg_use_direct_RegA \n#define cfg_use_direct_RegB \n#define cfg_use_direct_RegC \n#define cfg_use_direct_RegD \n#define cfg_use_direct_RegE \n#define cfg_use_direct_RegH \n#define cfg_use_direct_RegL \n \n#define cfg_use_direct_REG_Ax \n#define cfg_use_direct_REG_Fx \n#define cfg_use_direct_REG_Bx \n#define cfg_use_direct_REG_Cx \n#define cfg_use_direct_REG_Dx \n#define cfg_use_direct_REG_Ex \n#define cfg_use_direct_REG_Hx \n#define cfg_use_direct_REG_Lx \n \n#define cfg_use_direct_REG_AFx \n#define cfg_use_direct_REG_BC \n#define cfg_use_direct_REG_BCx \n#define cfg_use_direct_REG_DE \n#define cfg_use_direct_REG_DEx \n#define cfg_use_direct_REG_HL \n#define cfg_use_direct_REG_HLx \n \n#define cfg_use_direct_REG_PC \n#define cfg_use_direct_REG_SP \n#define cfg_use_direct_REG_IX \n#define cfg_use_direct_REG_IY \n#define cfg_use_direct_REG_I \n#define cfg_use_direct_MemPtr \n#define cfg_use_direct_CarryFlag \n \n#define cfg_use_direct_IFF1 \n#define cfg_use_direct_IFF2 \n#define cfg_use_direct_NMI \n#define cfg_use_direct_triggerNMI \n#define cfg_use_direct_IM \n#define cfg_use_direct_Halted \n#define cfg_use_direct_PinReset \n#define cfg_use_direct_PendingEI \n \n//Options simulator \n#define cfg_use_finish_fast \n#define cfg_use_z80RAM_fast \n#define cfg_use_z80Ports_fast \n#define cfg_use_time_fast \n//#define cfg_use_test_fps_48k \n \n#endif" (#ifndef) "#ifndef" (identifier) "_GB_GBCONFIG_H" (preproc_def) "#define _GB_GBCONFIG_H \n" (#define) "#define" (identifier) "_GB_GBCONFIG_H" (comment) "//Timer options " (preproc_def) "#define cfg_use_time_show \n" (#define) "#define" (identifier) "cfg_use_time_show" (comment) "//#define cfg_use_time_per_line " (comment) "//64 bits (slow) vs 32 bits (fast) " (comment) "//#define cfg_use_tstates_64bits " (comment) "//Fast direct registers " (preproc_def) "#define cfg_use_direct_RegA \n" (#define) "#define" (identifier) "cfg_use_direct_RegA" (preproc_def) "#define cfg_use_direct_RegB \n" (#define) "#define" (identifier) "cfg_use_direct_RegB" (preproc_def) "#define cfg_use_direct_RegC \n" (#define) "#define" (identifier) "cfg_use_direct_RegC" (preproc_def) "#define cfg_use_direct_RegD \n" (#define) "#define" (identifier) "cfg_use_direct_RegD" (preproc_def) "#define cfg_use_direct_RegE \n" (#define) "#define" (identifier) "cfg_use_direct_RegE" (preproc_def) "#define cfg_use_direct_RegH \n" (#define) "#define" (identifier) "cfg_use_direct_RegH" (preproc_def) "#define cfg_use_direct_RegL \n" (#define) "#define" (identifier) "cfg_use_direct_RegL" (preproc_def) "#define cfg_use_direct_REG_Ax \n" (#define) "#define" (identifier) "cfg_use_direct_REG_Ax" (preproc_def) "#define cfg_use_direct_REG_Fx \n" (#define) "#define" (identifier) "cfg_use_direct_REG_Fx" (preproc_def) "#define cfg_use_direct_REG_Bx \n" (#define) "#define" (identifier) "cfg_use_direct_REG_Bx" (preproc_def) "#define cfg_use_direct_REG_Cx \n" (#define) "#define" (identifier) "cfg_use_direct_REG_Cx" (preproc_def) "#define cfg_use_direct_REG_Dx \n" (#define) "#define" (identifier) "cfg_use_direct_REG_Dx" (preproc_def) "#define cfg_use_direct_REG_Ex \n" (#define) "#define" (identifier) "cfg_use_direct_REG_Ex" (preproc_def) "#define cfg_use_direct_REG_Hx \n" (#define) "#define" (identifier) "cfg_use_direct_REG_Hx" (preproc_def) "#define cfg_use_direct_REG_Lx \n" (#define) "#define" (identifier) "cfg_use_direct_REG_Lx" (preproc_def) "#define cfg_use_direct_REG_AFx \n" (#define) "#define" (identifier) "cfg_use_direct_REG_AFx" (preproc_def) "#define cfg_use_direct_REG_BC \n" (#define) "#define" (identifier) "cfg_use_direct_REG_BC" (preproc_def) "#define cfg_use_direct_REG_BCx \n" (#define) "#define" (identifier) "cfg_use_direct_REG_BCx" (preproc_def) "#define cfg_use_direct_REG_DE \n" (#define) "#define" (identifier) "cfg_use_direct_REG_DE" (preproc_def) "#define cfg_use_direct_REG_DEx \n" (#define) "#define" (identifier) "cfg_use_direct_REG_DEx" (preproc_def) "#define cfg_use_direct_REG_HL \n" (#define) "#define" (identifier) "cfg_use_direct_REG_HL" (preproc_def) "#define cfg_use_direct_REG_HLx \n" (#define) "#define" (identifier) "cfg_use_direct_REG_HLx" (preproc_def) "#define cfg_use_direct_REG_PC \n" (#define) "#define" (identifier) "cfg_use_direct_REG_PC" (preproc_def) "#define cfg_use_direct_REG_SP \n" (#define) "#define" (identifier) "cfg_use_direct_REG_SP" (preproc_def) "#define cfg_use_direct_REG_IX \n" (#define) "#define" (identifier) "cfg_use_direct_REG_IX" (preproc_def) "#define cfg_use_direct_REG_IY \n" (#define) "#define" (identifier) "cfg_use_direct_REG_IY" (preproc_def) "#define cfg_use_direct_REG_I \n" (#define) "#define" (identifier) "cfg_use_direct_REG_I" (preproc_def) "#define cfg_use_direct_MemPtr \n" (#define) "#define" (identifier) "cfg_use_direct_MemPtr" (preproc_def) "#define cfg_use_direct_CarryFlag \n" (#define) "#define" (identifier) "cfg_use_direct_CarryFlag" (preproc_def) "#define cfg_use_direct_IFF1 \n" (#define) "#define" (identifier) "cfg_use_direct_IFF1" (preproc_def) "#define cfg_use_direct_IFF2 \n" (#define) "#define" (identifier) "cfg_use_direct_IFF2" (preproc_def) "#define cfg_use_direct_NMI \n" (#define) "#define" (identifier) "cfg_use_direct_NMI" (preproc_def) "#define cfg_use_direct_triggerNMI \n" (#define) "#define" (identifier) "cfg_use_direct_triggerNMI" (preproc_def) "#define cfg_use_direct_IM \n" (#define) "#define" (identifier) "cfg_use_direct_IM" (preproc_def) "#define cfg_use_direct_Halted \n" (#define) "#define" (identifier) "cfg_use_direct_Halted" (preproc_def) "#define cfg_use_direct_PinReset \n" (#define) "#define" (identifier) "cfg_use_direct_PinReset" (preproc_def) "#define cfg_use_direct_PendingEI \n" (#define) "#define" (identifier) "cfg_use_direct_PendingEI" (comment) "//Options simulator " (preproc_def) "#define cfg_use_finish_fast \n" (#define) "#define" (identifier) "cfg_use_finish_fast" (preproc_def) "#define cfg_use_z80RAM_fast \n" (#define) "#define" (identifier) "cfg_use_z80RAM_fast" (preproc_def) "#define cfg_use_z80Ports_fast \n" (#define) "#define" (identifier) "cfg_use_z80Ports_fast" (preproc_def) "#define cfg_use_time_fast \n" (#define) "#define" (identifier) "cfg_use_time_fast" (comment) "//#define cfg_use_test_fps_48k " (#endif) "#endif"
141
0
{"language": "c", "success": true, "metadata": {"lines": 60, "avg_line_length": 24.83, "nodes": 133, "errors": 0, "source_hash": "58652e62deb1d3cf65421cc7c09e8a10b5b1ffaf8a9a9d1d0329c935e10d6bdf", "categorized_nodes": 47}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef _GB_GBCONFIG_H\r\n #define _GB_GBCONFIG_H\r\n\r\n//Timer options\r\n#define cfg_use_time_show\r\n//#define cfg_use_time_per_line\r\n//64 bits (slow) vs 32 bits (fast)\r\n//#define cfg_use_tstates_64bits\r\n\r\n//Fast direct registers\r\n#define cfg_use_direct_RegA\r\n#define cfg_use_direct_RegB\r\n#define cfg_use_direct_RegC\r\n#define cfg_use_direct_RegD\r\n#define cfg_use_direct_RegE\r\n#define cfg_use_direct_RegH\r\n#define cfg_use_direct_RegL\r\n\r\n#define cfg_use_direct_REG_Ax\r\n#define cfg_use_direct_REG_Fx\r\n#define cfg_use_direct_REG_Bx\r\n#define cfg_use_direct_REG_Cx\r\n#define cfg_use_direct_REG_Dx\r\n#define cfg_use_direct_REG_Ex\r\n#define cfg_use_direct_REG_Hx\r\n#define cfg_use_direct_REG_Lx\r\n\r\n#define cfg_use_direct_REG_AFx\r\n#define cfg_use_direct_REG_BC\r\n#define cfg_use_direct_REG_BCx\r\n#define cfg_use_direct_REG_DE\r\n#define cfg_use_direct_REG_DEx\r\n#define cfg_use_direct_REG_HL\r\n#define cfg_use_direct_REG_HLx\r\n\r\n#define cfg_use_direct_REG_PC\r\n#define cfg_use_direct_REG_SP\r\n#define cfg_use_direct_REG_IX\r\n#define cfg_use_direct_REG_IY\r\n#define cfg_use_direct_REG_I\r\n#define cfg_use_direct_MemPtr\r\n#define cfg_use_direct_CarryFlag\r\n\r\n#define cfg_use_direct_IFF1\r\n#define cfg_use_direct_IFF2\r\n#define cfg_use_direct_NMI\r\n#define cfg_use_direct_triggerNMI\r\n#define cfg_use_direct_IM\r\n#define cfg_use_direct_Halted\r\n#define cfg_use_direct_PinReset\r\n#define cfg_use_direct_PendingEI\r\n\r\n//Options simulator\r\n#define cfg_use_finish_fast\r\n#define cfg_use_z80RAM_fast\r\n#define cfg_use_z80Ports_fast\r\n#define cfg_use_time_fast\r\n//#define cfg_use_test_fps_48k\r\n\r\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, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 59, "column": 6}}, {"id": 1, "type": "#ifndef", "text": "#ifndef", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 7}}, {"id": 2, "type": "identifier", "text": "_GB_GBCONFIG_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 22}}, {"id": 3, "type": "preproc_def", "text": "#define _GB_GBCONFIG_H\r\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 1}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 1}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "identifier", "text": "_GB_GBCONFIG_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 23}}, {"id": 6, "type": "preproc_def", "text": "#define cfg_use_time_show\r\n", "parent": 0, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 5, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 7}}, {"id": 8, "type": "identifier", "text": "cfg_use_time_show", "parent": 6, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 25}}, {"id": 9, "type": "preproc_def", "text": "#define cfg_use_direct_RegA\r\n", "parent": 0, "children": [10, 11], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 10, "type": "#define", "text": "#define", "parent": 9, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 7}}, {"id": 11, "type": "identifier", "text": "cfg_use_direct_RegA", "parent": 9, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 27}}, {"id": 12, "type": "preproc_def", "text": "#define cfg_use_direct_RegB\r\n", "parent": 0, "children": [13, 14], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 13, "type": "#define", "text": "#define", "parent": 12, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 7}}, {"id": 14, "type": "identifier", "text": "cfg_use_direct_RegB", "parent": 12, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 27}}, {"id": 15, "type": "preproc_def", "text": "#define cfg_use_direct_RegC\r\n", "parent": 0, "children": [16, 17], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 16, "type": "#define", "text": "#define", "parent": 15, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 17, "type": "identifier", "text": "cfg_use_direct_RegC", "parent": 15, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 27}}, {"id": 18, "type": "preproc_def", "text": "#define cfg_use_direct_RegD\r\n", "parent": 0, "children": [19, 20], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 19, "type": "#define", "text": "#define", "parent": 18, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 7}}, {"id": 20, "type": "identifier", "text": "cfg_use_direct_RegD", "parent": 18, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 27}}, {"id": 21, "type": "preproc_def", "text": "#define cfg_use_direct_RegE\r\n", "parent": 0, "children": [22, 23], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 22, "type": "#define", "text": "#define", "parent": 21, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 23, "type": "identifier", "text": "cfg_use_direct_RegE", "parent": 21, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 27}}, {"id": 24, "type": "preproc_def", "text": "#define cfg_use_direct_RegH\r\n", "parent": 0, "children": [25, 26], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 25, "type": "#define", "text": "#define", "parent": 24, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 7}}, {"id": 26, "type": "identifier", "text": "cfg_use_direct_RegH", "parent": 24, "children": [], "start_point": {"row": 15, "column": 8}, "end_point": {"row": 15, "column": 27}}, {"id": 27, "type": "preproc_def", "text": "#define cfg_use_direct_RegL\r\n", "parent": 0, "children": [28, 29], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 28, "type": "#define", "text": "#define", "parent": 27, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 7}}, {"id": 29, "type": "identifier", "text": "cfg_use_direct_RegL", "parent": 27, "children": [], "start_point": {"row": 16, "column": 8}, "end_point": {"row": 16, "column": 27}}, {"id": 30, "type": "preproc_def", "text": "#define cfg_use_direct_REG_Ax\r\n", "parent": 0, "children": [31, 32], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 31, "type": "#define", "text": "#define", "parent": 30, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 32, "type": "identifier", "text": "cfg_use_direct_REG_Ax", "parent": 30, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 29}}, {"id": 33, "type": "preproc_def", "text": "#define cfg_use_direct_REG_Fx\r\n", "parent": 0, "children": [34, 35], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 34, "type": "#define", "text": "#define", "parent": 33, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 35, "type": "identifier", "text": "cfg_use_direct_REG_Fx", "parent": 33, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 29}}, {"id": 36, "type": "preproc_def", "text": "#define cfg_use_direct_REG_Bx\r\n", "parent": 0, "children": [37, 38], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 37, "type": "#define", "text": "#define", "parent": 36, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 7}}, {"id": 38, "type": "identifier", "text": "cfg_use_direct_REG_Bx", "parent": 36, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 29}}, {"id": 39, "type": "preproc_def", "text": "#define cfg_use_direct_REG_Cx\r\n", "parent": 0, "children": [40, 41], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 40, "type": "#define", "text": "#define", "parent": 39, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 7}}, {"id": 41, "type": "identifier", "text": "cfg_use_direct_REG_Cx", "parent": 39, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 29}}, {"id": 42, "type": "preproc_def", "text": "#define cfg_use_direct_REG_Dx\r\n", "parent": 0, "children": [43, 44], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 43, "type": "#define", "text": "#define", "parent": 42, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 7}}, {"id": 44, "type": "identifier", "text": "cfg_use_direct_REG_Dx", "parent": 42, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 29}}, {"id": 45, "type": "preproc_def", "text": "#define cfg_use_direct_REG_Ex\r\n", "parent": 0, "children": [46, 47], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 24, "column": 0}}, {"id": 46, "type": "#define", "text": "#define", "parent": 45, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 7}}, {"id": 47, "type": "identifier", "text": "cfg_use_direct_REG_Ex", "parent": 45, "children": [], "start_point": {"row": 23, "column": 8}, "end_point": {"row": 23, "column": 29}}, {"id": 48, "type": "preproc_def", "text": "#define cfg_use_direct_REG_Hx\r\n", "parent": 0, "children": [49, 50], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 49, "type": "#define", "text": "#define", "parent": 48, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 50, "type": "identifier", "text": "cfg_use_direct_REG_Hx", "parent": 48, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 29}}, {"id": 51, "type": "preproc_def", "text": "#define cfg_use_direct_REG_Lx\r\n", "parent": 0, "children": [52, 53], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 26, "column": 0}}, {"id": 52, "type": "#define", "text": "#define", "parent": 51, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 7}}, {"id": 53, "type": "identifier", "text": "cfg_use_direct_REG_Lx", "parent": 51, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 29}}, {"id": 54, "type": "preproc_def", "text": "#define cfg_use_direct_REG_AFx\r\n", "parent": 0, "children": [55, 56], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 55, "type": "#define", "text": "#define", "parent": 54, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 7}}, {"id": 56, "type": "identifier", "text": "cfg_use_direct_REG_AFx", "parent": 54, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 30}}, {"id": 57, "type": "preproc_def", "text": "#define cfg_use_direct_REG_BC\r\n", "parent": 0, "children": [58, 59], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 58, "type": "#define", "text": "#define", "parent": 57, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 7}}, {"id": 59, "type": "identifier", "text": "cfg_use_direct_REG_BC", "parent": 57, "children": [], "start_point": {"row": 28, "column": 8}, "end_point": {"row": 28, "column": 29}}, {"id": 60, "type": "preproc_def", "text": "#define cfg_use_direct_REG_BCx\r\n", "parent": 0, "children": [61, 62], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 61, "type": "#define", "text": "#define", "parent": 60, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 62, "type": "identifier", "text": "cfg_use_direct_REG_BCx", "parent": 60, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 30}}, {"id": 63, "type": "preproc_def", "text": "#define cfg_use_direct_REG_DE\r\n", "parent": 0, "children": [64, 65], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 31, "column": 0}}, {"id": 64, "type": "#define", "text": "#define", "parent": 63, "children": [], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 7}}, {"id": 65, "type": "identifier", "text": "cfg_use_direct_REG_DE", "parent": 63, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 29}}, {"id": 66, "type": "preproc_def", "text": "#define cfg_use_direct_REG_DEx\r\n", "parent": 0, "children": [67, 68], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 32, "column": 0}}, {"id": 67, "type": "#define", "text": "#define", "parent": 66, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 7}}, {"id": 68, "type": "identifier", "text": "cfg_use_direct_REG_DEx", "parent": 66, "children": [], "start_point": {"row": 31, "column": 8}, "end_point": {"row": 31, "column": 30}}, {"id": 69, "type": "preproc_def", "text": "#define cfg_use_direct_REG_HL\r\n", "parent": 0, "children": [70, 71], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 33, "column": 0}}, {"id": 70, "type": "#define", "text": "#define", "parent": 69, "children": [], "start_point": {"row": 32, "column": 0}, "end_point": {"row": 32, "column": 7}}, {"id": 71, "type": "identifier", "text": "cfg_use_direct_REG_HL", "parent": 69, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 29}}, {"id": 72, "type": "preproc_def", "text": "#define cfg_use_direct_REG_HLx\r\n", "parent": 0, "children": [73, 74], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 34, "column": 0}}, {"id": 73, "type": "#define", "text": "#define", "parent": 72, "children": [], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 33, "column": 7}}, {"id": 74, "type": "identifier", "text": "cfg_use_direct_REG_HLx", "parent": 72, "children": [], "start_point": {"row": 33, "column": 8}, "end_point": {"row": 33, "column": 30}}, {"id": 75, "type": "preproc_def", "text": "#define cfg_use_direct_REG_PC\r\n", "parent": 0, "children": [76, 77], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 36, "column": 0}}, {"id": 76, "type": "#define", "text": "#define", "parent": 75, "children": [], "start_point": {"row": 35, "column": 0}, "end_point": {"row": 35, "column": 7}}, {"id": 77, "type": "identifier", "text": "cfg_use_direct_REG_PC", "parent": 75, "children": [], "start_point": {"row": 35, "column": 8}, "end_point": {"row": 35, "column": 29}}, {"id": 78, "type": "preproc_def", "text": "#define cfg_use_direct_REG_SP\r\n", "parent": 0, "children": [79, 80], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 0}}, {"id": 79, "type": "#define", "text": "#define", "parent": 78, "children": [], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 36, "column": 7}}, {"id": 80, "type": "identifier", "text": "cfg_use_direct_REG_SP", "parent": 78, "children": [], "start_point": {"row": 36, "column": 8}, "end_point": {"row": 36, "column": 29}}, {"id": 81, "type": "preproc_def", "text": "#define cfg_use_direct_REG_IX\r\n", "parent": 0, "children": [82, 83], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 38, "column": 0}}, {"id": 82, "type": "#define", "text": "#define", "parent": 81, "children": [], "start_point": {"row": 37, "column": 0}, "end_point": {"row": 37, "column": 7}}, {"id": 83, "type": "identifier", "text": "cfg_use_direct_REG_IX", "parent": 81, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 29}}, {"id": 84, "type": "preproc_def", "text": "#define cfg_use_direct_REG_IY\r\n", "parent": 0, "children": [85, 86], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 39, "column": 0}}, {"id": 85, "type": "#define", "text": "#define", "parent": 84, "children": [], "start_point": {"row": 38, "column": 0}, "end_point": {"row": 38, "column": 7}}, {"id": 86, "type": "identifier", "text": "cfg_use_direct_REG_IY", "parent": 84, "children": [], "start_point": {"row": 38, "column": 8}, "end_point": {"row": 38, "column": 29}}, {"id": 87, "type": "preproc_def", "text": "#define cfg_use_direct_REG_I\r\n", "parent": 0, "children": [88, 89], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 40, "column": 0}}, {"id": 88, "type": "#define", "text": "#define", "parent": 87, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 7}}, {"id": 89, "type": "identifier", "text": "cfg_use_direct_REG_I", "parent": 87, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 28}}, {"id": 90, "type": "preproc_def", "text": "#define cfg_use_direct_MemPtr\r\n", "parent": 0, "children": [91, 92], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 41, "column": 0}}, {"id": 91, "type": "#define", "text": "#define", "parent": 90, "children": [], "start_point": {"row": 40, "column": 0}, "end_point": {"row": 40, "column": 7}}, {"id": 92, "type": "identifier", "text": "cfg_use_direct_MemPtr", "parent": 90, "children": [], "start_point": {"row": 40, "column": 8}, "end_point": {"row": 40, "column": 29}}, {"id": 93, "type": "preproc_def", "text": "#define cfg_use_direct_CarryFlag\r\n", "parent": 0, "children": [94, 95], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 42, "column": 0}}, {"id": 94, "type": "#define", "text": "#define", "parent": 93, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 7}}, {"id": 95, "type": "identifier", "text": "cfg_use_direct_CarryFlag", "parent": 93, "children": [], "start_point": {"row": 41, "column": 8}, "end_point": {"row": 41, "column": 32}}, {"id": 96, "type": "preproc_def", "text": "#define cfg_use_direct_IFF1\r\n", "parent": 0, "children": [97, 98], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 44, "column": 0}}, {"id": 97, "type": "#define", "text": "#define", "parent": 96, "children": [], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 43, "column": 7}}, {"id": 98, "type": "identifier", "text": "cfg_use_direct_IFF1", "parent": 96, "children": [], "start_point": {"row": 43, "column": 8}, "end_point": {"row": 43, "column": 27}}, {"id": 99, "type": "preproc_def", "text": "#define cfg_use_direct_IFF2\r\n", "parent": 0, "children": [100, 101], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 45, "column": 0}}, {"id": 100, "type": "#define", "text": "#define", "parent": 99, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 101, "type": "identifier", "text": "cfg_use_direct_IFF2", "parent": 99, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 27}}, {"id": 102, "type": "preproc_def", "text": "#define cfg_use_direct_NMI\r\n", "parent": 0, "children": [103, 104], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 46, "column": 0}}, {"id": 103, "type": "#define", "text": "#define", "parent": 102, "children": [], "start_point": {"row": 45, "column": 0}, "end_point": {"row": 45, "column": 7}}, {"id": 104, "type": "identifier", "text": "cfg_use_direct_NMI", "parent": 102, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 26}}, {"id": 105, "type": "preproc_def", "text": "#define cfg_use_direct_triggerNMI\r\n", "parent": 0, "children": [106, 107], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 47, "column": 0}}, {"id": 106, "type": "#define", "text": "#define", "parent": 105, "children": [], "start_point": {"row": 46, "column": 0}, "end_point": {"row": 46, "column": 7}}, {"id": 107, "type": "identifier", "text": "cfg_use_direct_triggerNMI", "parent": 105, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 33}}, {"id": 108, "type": "preproc_def", "text": "#define cfg_use_direct_IM\r\n", "parent": 0, "children": [109, 110], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 48, "column": 0}}, {"id": 109, "type": "#define", "text": "#define", "parent": 108, "children": [], "start_point": {"row": 47, "column": 0}, "end_point": {"row": 47, "column": 7}}, {"id": 110, "type": "identifier", "text": "cfg_use_direct_IM", "parent": 108, "children": [], "start_point": {"row": 47, "column": 8}, "end_point": {"row": 47, "column": 25}}, {"id": 111, "type": "preproc_def", "text": "#define cfg_use_direct_Halted\r\n", "parent": 0, "children": [112, 113], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 49, "column": 0}}, {"id": 112, "type": "#define", "text": "#define", "parent": 111, "children": [], "start_point": {"row": 48, "column": 0}, "end_point": {"row": 48, "column": 7}}, {"id": 113, "type": "identifier", "text": "cfg_use_direct_Halted", "parent": 111, "children": [], "start_point": {"row": 48, "column": 8}, "end_point": {"row": 48, "column": 29}}, {"id": 114, "type": "preproc_def", "text": "#define cfg_use_direct_PinReset\r\n", "parent": 0, "children": [115, 116], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 50, "column": 0}}, {"id": 115, "type": "#define", "text": "#define", "parent": 114, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 7}}, {"id": 116, "type": "identifier", "text": "cfg_use_direct_PinReset", "parent": 114, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 31}}, {"id": 117, "type": "preproc_def", "text": "#define cfg_use_direct_PendingEI\r\n", "parent": 0, "children": [118, 119], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 51, "column": 0}}, {"id": 118, "type": "#define", "text": "#define", "parent": 117, "children": [], "start_point": {"row": 50, "column": 0}, "end_point": {"row": 50, "column": 7}}, {"id": 119, "type": "identifier", "text": "cfg_use_direct_PendingEI", "parent": 117, "children": [], "start_point": {"row": 50, "column": 8}, "end_point": {"row": 50, "column": 32}}, {"id": 120, "type": "preproc_def", "text": "#define cfg_use_finish_fast\r\n", "parent": 0, "children": [121, 122], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 54, "column": 0}}, {"id": 121, "type": "#define", "text": "#define", "parent": 120, "children": [], "start_point": {"row": 53, "column": 0}, "end_point": {"row": 53, "column": 7}}, {"id": 122, "type": "identifier", "text": "cfg_use_finish_fast", "parent": 120, "children": [], "start_point": {"row": 53, "column": 8}, "end_point": {"row": 53, "column": 27}}, {"id": 123, "type": "preproc_def", "text": "#define cfg_use_z80RAM_fast\r\n", "parent": 0, "children": [124, 125], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 55, "column": 0}}, {"id": 124, "type": "#define", "text": "#define", "parent": 123, "children": [], "start_point": {"row": 54, "column": 0}, "end_point": {"row": 54, "column": 7}}, {"id": 125, "type": "identifier", "text": "cfg_use_z80RAM_fast", "parent": 123, "children": [], "start_point": {"row": 54, "column": 8}, "end_point": {"row": 54, "column": 27}}, {"id": 126, "type": "preproc_def", "text": "#define cfg_use_z80Ports_fast\r\n", "parent": 0, "children": [127, 128], "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": "cfg_use_z80Ports_fast", "parent": 126, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 29}}, {"id": 129, "type": "preproc_def", "text": "#define cfg_use_time_fast\r\n", "parent": 0, "children": [130, 131], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 57, "column": 0}}, {"id": 130, "type": "#define", "text": "#define", "parent": 129, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 7}}, {"id": 131, "type": "identifier", "text": "cfg_use_time_fast", "parent": 129, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 25}}, {"id": 132, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 59, "column": 0}, "end_point": {"row": 59, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98, 101, 104, 107, 110, 113, 116, 119, 122, 125, 128, 131, 132], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "#ifndef _GB_GBCONFIG_H\r\n #define _GB_GBCONFIG_H\r\n\r\n//Timer options\r\n#define cfg_use_time_show\r\n//#define cfg_use_time_per_line\r\n//64 bits (slow) vs 32 bits (fast)\r\n//#define cfg_use_tstates_64bits\r\n\r\n//Fast direct registers\r\n#define cfg_use_direct_RegA\r\n#define cfg_use_direct_RegB\r\n#define cfg_use_direct_RegC\r\n#define cfg_use_direct_RegD\r\n#define cfg_use_direct_RegE\r\n#define cfg_use_direct_RegH\r\n#define cfg_use_direct_RegL\r\n\r\n#define cfg_use_direct_REG_Ax\r\n#define cfg_use_direct_REG_Fx\r\n#define cfg_use_direct_REG_Bx\r\n#define cfg_use_direct_REG_Cx\r\n#define cfg_use_direct_REG_Dx\r\n#define cfg_use_direct_REG_Ex\r\n#define cfg_use_direct_REG_Hx\r\n#define cfg_use_direct_REG_Lx\r\n\r\n#define cfg_use_direct_REG_AFx\r\n#define cfg_use_direct_REG_BC\r\n#define cfg_use_direct_REG_BCx\r\n#define cfg_use_direct_REG_DE\r\n#define cfg_use_direct_REG_DEx\r\n#define cfg_use_direct_REG_HL\r\n#define cfg_use_direct_REG_HLx\r\n\r\n#define cfg_use_direct_REG_PC\r\n#define cfg_use_direct_REG_SP\r\n#define cfg_use_direct_REG_IX\r\n#define cfg_use_direct_REG_IY\r\n#define cfg_use_direct_REG_I\r\n#define cfg_use_direct_MemPtr\r\n#define cfg_use_direct_CarryFlag\r\n\r\n#define cfg_use_direct_IFF1\r\n#define cfg_use_direct_IFF2\r\n#define cfg_use_direct_NMI\r\n#define cfg_use_direct_triggerNMI\r\n#define cfg_use_direct_IM\r\n#define cfg_use_direct_Halted\r\n#define cfg_use_direct_PinReset\r\n#define cfg_use_direct_PendingEI\r\n\r\n//Options simulator\r\n#define cfg_use_finish_fast\r\n#define cfg_use_z80RAM_fast\r\n#define cfg_use_z80Ports_fast\r\n#define cfg_use_time_fast\r\n//#define cfg_use_test_fps_48k\r\n\r\n#endif\r\n"}
84
c
#ifndef __GLOBALS_H #define __GLOBALS_H #include "types.h" #define DEBUG #define STACK_SIZE 1024*4 #define PROGRAM_SIZE 1024*4 extern unsigned char stack[]; extern unsigned char *instructions; void push_int(uint16_t val); uint16_t pop_int(); uint16_t fetch_int(); OPCODE_TYPE fetch_op(); #endif // __GLOBALS_H
16.58
19
(translation_unit) "#ifndef __GLOBALS_H \n#define __GLOBALS_H \n \n#include "types.h" \n \n#define DEBUG \n \n#define STACK_SIZE 1024*4 \n#define PROGRAM_SIZE 1024*4 \n \nextern unsigned char stack[]; \nextern unsigned char *instructions; \n \nvoid push_int(uint16_t val); \nuint16_t pop_int(); \nuint16_t fetch_int(); \nOPCODE_TYPE fetch_op(); \n \n#endif // __GLOBALS_H" (preproc_ifdef) "#ifndef __GLOBALS_H \n#define __GLOBALS_H \n \n#include "types.h" \n \n#define DEBUG \n \n#define STACK_SIZE 1024*4 \n#define PROGRAM_SIZE 1024*4 \n \nextern unsigned char stack[]; \nextern unsigned char *instructions; \n \nvoid push_int(uint16_t val); \nuint16_t pop_int(); \nuint16_t fetch_int(); \nOPCODE_TYPE fetch_op(); \n \n#endif" (#ifndef) "#ifndef" (identifier) "__GLOBALS_H" (preproc_def) "#define __GLOBALS_H \n" (#define) "#define" (identifier) "__GLOBALS_H" (preproc_include) "#include "types.h" \n" (#include) "#include" (string_literal) ""types.h"" (") """ (string_content) "types.h" (") """ (preproc_def) "#define DEBUG \n" (#define) "#define" (identifier) "DEBUG" (preproc_def) "#define STACK_SIZE 1024*4 \n" (#define) "#define" (identifier) "STACK_SIZE" (preproc_arg) "1024*4 " (preproc_def) "#define PROGRAM_SIZE 1024*4 \n" (#define) "#define" (identifier) "PROGRAM_SIZE" (preproc_arg) "1024*4 " (declaration) "extern unsigned char stack[];" (storage_class_specifier) "extern" (extern) "extern" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (array_declarator) "stack[]" (identifier) "stack" ([) "[" (]) "]" (;) ";" (declaration) "extern unsigned char *instructions;" (storage_class_specifier) "extern" (extern) "extern" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "*instructions" (*) "*" (identifier) "instructions" (;) ";" (declaration) "void push_int(uint16_t val);" (primitive_type) "void" (function_declarator) "push_int(uint16_t val)" (identifier) "push_int" (parameter_list) "(uint16_t val)" (() "(" (parameter_declaration) "uint16_t val" (primitive_type) "uint16_t" (identifier) "val" ()) ")" (;) ";" (declaration) "uint16_t pop_int();" (primitive_type) "uint16_t" (function_declarator) "pop_int()" (identifier) "pop_int" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "uint16_t fetch_int();" (primitive_type) "uint16_t" (function_declarator) "fetch_int()" (identifier) "fetch_int" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "OPCODE_TYPE fetch_op();" (type_identifier) "OPCODE_TYPE" (function_declarator) "fetch_op()" (identifier) "fetch_op" (parameter_list) "()" (() "(" ()) ")" (;) ";" (#endif) "#endif" (comment) "// __GLOBALS_H"
82
0
{"language": "c", "success": true, "metadata": {"lines": 19, "avg_line_length": 16.58, "nodes": 61, "errors": 0, "source_hash": "06b01488398a8ad3625bf640b5eb65175d26aa913f2611cdc0ba5e672a312513", "categorized_nodes": 34}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef __GLOBALS_H\r\n#define __GLOBALS_H\r\n\r\n#include \"types.h\"\r\n\r\n#define DEBUG\r\n\r\n#define STACK_SIZE 1024*4\r\n#define PROGRAM_SIZE 1024*4\r\n\r\nextern unsigned char stack[];\r\nextern unsigned char *instructions;\r\n\r\nvoid push_int(uint16_t val);\r\nuint16_t pop_int();\r\nuint16_t fetch_int();\r\nOPCODE_TYPE fetch_op();\r\n\r\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 16, 20, 28, 37, 45, 50, 55, 60], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 18, "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": "__GLOBALS_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_def", "text": "#define __GLOBALS_H\r\n", "parent": 0, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#define", "text": "#define", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 5, "type": "identifier", "text": "__GLOBALS_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include \"types.h\"\r\n", "parent": 0, "children": [7, 8], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"types.h\"", "parent": 6, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 18}}, {"id": 9, "type": "preproc_def", "text": "#define DEBUG\r\n", "parent": 0, "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": "DEBUG", "parent": 9, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 13}}, {"id": 12, "type": "preproc_def", "text": "#define STACK_SIZE 1024*4\r\n", "parent": 0, "children": [13, 14, 15], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 13, "type": "#define", "text": "#define", "parent": 12, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 7}}, {"id": 14, "type": "identifier", "text": "STACK_SIZE", "parent": 12, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 18}}, {"id": 15, "type": "preproc_arg", "text": "1024*4\r", "parent": 12, "children": [], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 26}}, {"id": 16, "type": "preproc_def", "text": "#define PROGRAM_SIZE 1024*4\r\n", "parent": 0, "children": [17, 18, 19], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 9, "column": 0}}, {"id": 17, "type": "#define", "text": "#define", "parent": 16, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 7}}, {"id": 18, "type": "identifier", "text": "PROGRAM_SIZE", "parent": 16, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 20}}, {"id": 19, "type": "preproc_arg", "text": "1024*4\r", "parent": 16, "children": [], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 28}}, {"id": 20, "type": "declaration", "text": "extern unsigned char stack[];", "parent": 0, "children": [21, 23, 26], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 29}}, {"id": 21, "type": "storage_class_specifier", "text": "extern", "parent": 20, "children": [22], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 22, "type": "extern", "text": "extern", "parent": 21, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}, {"id": 23, "type": "sized_type_specifier", "text": "unsigned char", "parent": 20, "children": [24, 25], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 20}}, {"id": 24, "type": "unsigned", "text": "unsigned", "parent": 23, "children": [], "start_point": {"row": 10, "column": 7}, "end_point": {"row": 10, "column": 15}}, {"id": 25, "type": "primitive_type", "text": "char", "parent": 23, "children": [], "start_point": {"row": 10, "column": 16}, "end_point": {"row": 10, "column": 20}}, {"id": 26, "type": "array_declarator", "text": "stack[]", "parent": 20, "children": [27], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 28}}, {"id": 27, "type": "identifier", "text": "stack", "parent": 26, "children": [], "start_point": {"row": 10, "column": 21}, "end_point": {"row": 10, "column": 26}}, {"id": 28, "type": "declaration", "text": "extern unsigned char *instructions;", "parent": 0, "children": [29, 31, 34], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 35}}, {"id": 29, "type": "storage_class_specifier", "text": "extern", "parent": 28, "children": [30], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 30, "type": "extern", "text": "extern", "parent": 29, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 6}}, {"id": 31, "type": "sized_type_specifier", "text": "unsigned char", "parent": 28, "children": [32, 33], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 20}}, {"id": 32, "type": "unsigned", "text": "unsigned", "parent": 31, "children": [], "start_point": {"row": 11, "column": 7}, "end_point": {"row": 11, "column": 15}}, {"id": 33, "type": "primitive_type", "text": "char", "parent": 31, "children": [], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 20}}, {"id": 34, "type": "pointer_declarator", "text": "*instructions", "parent": 28, "children": [35, 36], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 34}}, {"id": 35, "type": "*", "text": "*", "parent": 34, "children": [], "start_point": {"row": 11, "column": 21}, "end_point": {"row": 11, "column": 22}}, {"id": 36, "type": "identifier", "text": "instructions", "parent": 34, "children": [], "start_point": {"row": 11, "column": 22}, "end_point": {"row": 11, "column": 34}}, {"id": 37, "type": "declaration", "text": "void push_int(uint16_t val);", "parent": 0, "children": [38, 39], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 28}}, {"id": 38, "type": "primitive_type", "text": "void", "parent": 37, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 4}}, {"id": 39, "type": "function_declarator", "text": "push_int(uint16_t val)", "parent": 37, "children": [40, 41], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 27}}, {"id": 40, "type": "identifier", "text": "push_int", "parent": 39, "children": [], "start_point": {"row": 13, "column": 5}, "end_point": {"row": 13, "column": 13}}, {"id": 41, "type": "parameter_list", "text": "(uint16_t val)", "parent": 39, "children": [42], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 27}}, {"id": 42, "type": "parameter_declaration", "text": "uint16_t val", "parent": 41, "children": [43, 44], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 26}}, {"id": 43, "type": "primitive_type", "text": "uint16_t", "parent": 42, "children": [], "start_point": {"row": 13, "column": 14}, "end_point": {"row": 13, "column": 22}}, {"id": 44, "type": "identifier", "text": "val", "parent": 42, "children": [], "start_point": {"row": 13, "column": 23}, "end_point": {"row": 13, "column": 26}}, {"id": 45, "type": "declaration", "text": "uint16_t pop_int();", "parent": 0, "children": [46, 47], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 19}}, {"id": 46, "type": "primitive_type", "text": "uint16_t", "parent": 45, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 47, "type": "function_declarator", "text": "pop_int()", "parent": 45, "children": [48, 49], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 18}}, {"id": 48, "type": "identifier", "text": "pop_int", "parent": 47, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 16}}, {"id": 49, "type": "parameter_list", "text": "()", "parent": 47, "children": [], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 18}}, {"id": 50, "type": "declaration", "text": "uint16_t fetch_int();", "parent": 0, "children": [51, 52], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 21}}, {"id": 51, "type": "primitive_type", "text": "uint16_t", "parent": 50, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 52, "type": "function_declarator", "text": "fetch_int()", "parent": 50, "children": [53, 54], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 20}}, {"id": 53, "type": "identifier", "text": "fetch_int", "parent": 52, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 18}}, {"id": 54, "type": "parameter_list", "text": "()", "parent": 52, "children": [], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 20}}, {"id": 55, "type": "declaration", "text": "OPCODE_TYPE fetch_op();", "parent": 0, "children": [56, 57], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 23}}, {"id": 56, "type": "type_identifier", "text": "OPCODE_TYPE", "parent": 55, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 11}}, {"id": 57, "type": "function_declarator", "text": "fetch_op()", "parent": 55, "children": [58, 59], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 22}}, {"id": 58, "type": "identifier", "text": "fetch_op", "parent": 57, "children": [], "start_point": {"row": 16, "column": 12}, "end_point": {"row": 16, "column": 20}}, {"id": 59, "type": "parameter_list", "text": "()", "parent": 57, "children": [], "start_point": {"row": 16, "column": 20}, "end_point": {"row": 16, "column": 22}}, {"id": 60, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 6}}]}, "node_categories": {"declarations": {"functions": [39, 47, 52, 57], "variables": [20, 28, 37, 42, 45, 50, 55], "classes": [21, 29], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 11, 14, 18, 23, 27, 31, 36, 40, 44, 48, 53, 56, 58, 60], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 39, "universal_type": "function", "name": "unknown", "text_snippet": "push_int(uint16_t val)"}, {"node_id": 47, "universal_type": "function", "name": "unknown", "text_snippet": "pop_int()"}, {"node_id": 52, "universal_type": "function", "name": "unknown", "text_snippet": "fetch_int()"}, {"node_id": 57, "universal_type": "function", "name": "unknown", "text_snippet": "fetch_op()"}], "class_declarations": [{"node_id": 21, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 29, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 6, "text": "#include \"types.h\"\r\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "#ifndef __GLOBALS_H\r\n#define __GLOBALS_H\r\n\r\n#include \"types.h\"\r\n\r\n#define DEBUG\r\n\r\n#define STACK_SIZE 1024*4\r\n#define PROGRAM_SIZE 1024*4\r\n\r\nextern unsigned char stack[];\r\nextern unsigned char *instructions;\r\n\r\nvoid push_int(uint16_t val);\r\nuint16_t pop_int();\r\nuint16_t fetch_int();\r\nOPCODE_TYPE fetch_op();\r\n\r\n#endif // __GLOBALS_H"}
85
c
// // Copyright (c) 2019 The Aquarium Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // ContextGL.h: Defines the accessing to graphics API of OpenGL. #ifndef CONTEXTGL_H #define CONTEXTGL_H #include <vector> #define GLFW_INCLUDE_NONE #include "GLFW/glfw3.h" #ifdef EGL_EGL_PROTOTYPES #include <memory> #include "EGL/egl.h" #include "EGL/eglext.h" #include "EGL/eglext_angle.h" #include "EGL/eglplatform.h" #include "angle_gl.h" #else #include "glad/glad.h" #endif #include "../Aquarium.h" #include "../Context.h" class BufferGL; class TextureGL; class ContextGL : public Context { public: static ContextGL *create(BACKENDTYPE backendType); ~ContextGL() override; bool initialize( BACKENDTYPE backend, const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)> &toggleBitset, int windowWidth, int windowHeight) override; void setWindowTitle(const std::string &text) override; bool ShouldQuit() override; void KeyBoardQuit() override; void DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)> &toggleBitset) override; void Terminate() override; void showWindow() override; void updateFPS(const FPSTimer &fpsTimer, int *fishCount, std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)> *toggleBitset) override; void destoryImgUI() override; void preFrame() override; void enableBlend(bool flag) const; Model *createModel(Aquarium *aquarium, MODELGROUP type, MODELNAME name, bool blend) override; int getUniformLocation(unsigned int programId, const std::string &name) const; int getAttribLocation(unsigned int programId, const std::string &name) const; void setUniform(int index, const float *v, int type) const; void setTexture(const TextureGL &texture, int index, int unit) const; void setAttribs(const BufferGL &bufferGL, int index) const; void setIndices(const BufferGL &bufferGL) const; void drawElements(const BufferGL &buffer) const; Buffer *createBuffer(int numComponents, std::vector<float> *buffer, bool isIndex) override; Buffer *createBuffer(int numComponents, std::vector<unsigned short> *buffer, bool isIndex) override; unsigned int generateBuffer(); void deleteBuffer(unsigned int buf); void bindBuffer(unsigned int target, unsigned int buf); void uploadBuffer(unsigned int target, const std::vector<float> &buf); void uploadBuffer(unsigned int target, const std::vector<unsigned short> &buf); Program *createProgram(const std::string &mVId, const std::string &mFId) override; unsigned int generateProgram(); void setProgram(unsigned int program); void deleteProgram(unsigned int program); bool compileProgram(unsigned int programId, const std::string &VertexShaderCode, const std::string &FragmentShaderCode); void bindVAO(unsigned int vao) const; unsigned int generateVAO(); void deleteVAO(unsigned int vao); Texture *createTexture(const std::string &name, const std::string &url) override; Texture *createTexture(const std::string &name, const std::vector<std::string> &urls) override; unsigned int generateTexture(); void bindTexture(unsigned int target, unsigned int texture); void deleteTexture(unsigned int texture); void uploadTexture(unsigned int target, unsigned int format, int width, int height, unsigned char *pixel); void setParameter(unsigned int target, unsigned int pname, int param); void generateMipmap(unsigned int target); void updateAllFishData() override; protected: explicit ContextGL(BACKENDTYPE backendType); private: void initState(); void initAvailableToggleBitset(BACKENDTYPE backendType) override; static void framebufferResizeCallback(GLFWwindow *window, int width, int height); GLFWwindow *mWindow; std::string mGLSLVersion; #ifdef EGL_EGL_PROTOTYPES EGLBoolean FindEGLConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *config); EGLContext createContext(EGLContext share) const; EGLSurface mSurface; EGLContext mContext; EGLDisplay mDisplay; EGLConfig mConfig; #endif }; #endif // CONTEXTGL_H
38.32
119
(translation_unit) "//\n// Copyright (c) 2019 The Aquarium Project Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n//\n// ContextGL.h: Defines the accessing to graphics API of OpenGL.\n\n#ifndef CONTEXTGL_H\n#define CONTEXTGL_H\n\n#include <vector>\n\n#define GLFW_INCLUDE_NONE\n#include "GLFW/glfw3.h"\n\n#ifdef EGL_EGL_PROTOTYPES\n#include <memory>\n\n#include "EGL/egl.h"\n#include "EGL/eglext.h"\n#include "EGL/eglext_angle.h"\n#include "EGL/eglplatform.h"\n#include "angle_gl.h"\n#else\n#include "glad/glad.h"\n#endif\n\n#include "../Aquarium.h"\n#include "../Context.h"\n\nclass BufferGL;\nclass TextureGL;\n\nclass ContextGL : public Context {\npublic:\n static ContextGL *create(BACKENDTYPE backendType);\n\n ~ContextGL() override;\n\n bool initialize(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)> &toggleBitset,\n int windowWidth,\n int windowHeight) override;\n void setWindowTitle(const std::string &text) override;\n bool ShouldQuit() override;\n void KeyBoardQuit() override;\n void DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset) override;\n void Terminate() override;\n void showWindow() override;\n void updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset) override;\n void destoryImgUI() override;\n\n void preFrame() override;\n void enableBlend(bool flag) const;\n\n Model *createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override;\n int getUniformLocation(unsigned int programId, const std::string &name) const;\n int getAttribLocation(unsigned int programId, const std::string &name) const;\n void setUniform(int index, const float *v, int type) const;\n void setTexture(const TextureGL &texture, int index, int unit) const;\n void setAttribs(const BufferGL &bufferGL, int index) const;\n void setIndices(const BufferGL &bufferGL) const;\n void drawElements(const BufferGL &buffer) const;\n\n Buffer *createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override;\n Buffer *createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override;\n unsigned int generateBuffer();\n void deleteBuffer(unsigned int buf);\n void bindBuffer(unsigned int target, unsigned int buf);\n void uploadBuffer(unsigned int target, const std::vector<float> &buf);\n void uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf);\n\n Program *createProgram(const std::string &mVId,\n const std::string &mFId) override;\n unsigned int generateProgram();\n void setProgram(unsigned int program);\n void deleteProgram(unsigned int program);\n bool compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode);\n void bindVAO(unsigned int vao) const;\n unsigned int generateVAO();\n void deleteVAO(unsigned int vao);\n\n Texture *createTexture(const std::string &name,\n const std::string &url) override;\n Texture *createTexture(const std::string &name,\n const std::vector<std::string> &urls) override;\n unsigned int generateTexture();\n void bindTexture(unsigned int target, unsigned int texture);\n void deleteTexture(unsigned int texture);\n void uploadTexture(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel);\n void setParameter(unsigned int target, unsigned int pname, int param);\n void generateMipmap(unsigned int target);\n void updateAllFishData() override;\n\nprotected:\n explicit ContextGL(BACKENDTYPE backendType);\n\nprivate:\n void initState();\n void initAvailableToggleBitset(BACKENDTYPE backendType) override;\n static void framebufferResizeCallback(GLFWwindow *window,\n int width,\n int height);\n\n GLFWwindow *mWindow;\n std::string mGLSLVersion;\n\n#ifdef EGL_EGL_PROTOTYPES\n EGLBoolean FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config);\n EGLContext createContext(EGLContext share) const;\n\n EGLSurface mSurface;\n EGLContext mContext;\n EGLDisplay mDisplay;\n EGLConfig mConfig;\n#endif\n};\n\n#endif // CONTEXTGL_H\n" (comment) "//" (comment) "// Copyright (c) 2019 The Aquarium Project Authors. All rights reserved." (comment) "// Use of this source code is governed by a BSD-style license that can be" (comment) "// found in the LICENSE file." (comment) "//" (comment) "// ContextGL.h: Defines the accessing to graphics API of OpenGL." (preproc_ifdef) "#ifndef CONTEXTGL_H\n#define CONTEXTGL_H\n\n#include <vector>\n\n#define GLFW_INCLUDE_NONE\n#include "GLFW/glfw3.h"\n\n#ifdef EGL_EGL_PROTOTYPES\n#include <memory>\n\n#include "EGL/egl.h"\n#include "EGL/eglext.h"\n#include "EGL/eglext_angle.h"\n#include "EGL/eglplatform.h"\n#include "angle_gl.h"\n#else\n#include "glad/glad.h"\n#endif\n\n#include "../Aquarium.h"\n#include "../Context.h"\n\nclass BufferGL;\nclass TextureGL;\n\nclass ContextGL : public Context {\npublic:\n static ContextGL *create(BACKENDTYPE backendType);\n\n ~ContextGL() override;\n\n bool initialize(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)> &toggleBitset,\n int windowWidth,\n int windowHeight) override;\n void setWindowTitle(const std::string &text) override;\n bool ShouldQuit() override;\n void KeyBoardQuit() override;\n void DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset) override;\n void Terminate() override;\n void showWindow() override;\n void updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset) override;\n void destoryImgUI() override;\n\n void preFrame() override;\n void enableBlend(bool flag) const;\n\n Model *createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override;\n int getUniformLocation(unsigned int programId, const std::string &name) const;\n int getAttribLocation(unsigned int programId, const std::string &name) const;\n void setUniform(int index, const float *v, int type) const;\n void setTexture(const TextureGL &texture, int index, int unit) const;\n void setAttribs(const BufferGL &bufferGL, int index) const;\n void setIndices(const BufferGL &bufferGL) const;\n void drawElements(const BufferGL &buffer) const;\n\n Buffer *createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override;\n Buffer *createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override;\n unsigned int generateBuffer();\n void deleteBuffer(unsigned int buf);\n void bindBuffer(unsigned int target, unsigned int buf);\n void uploadBuffer(unsigned int target, const std::vector<float> &buf);\n void uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf);\n\n Program *createProgram(const std::string &mVId,\n const std::string &mFId) override;\n unsigned int generateProgram();\n void setProgram(unsigned int program);\n void deleteProgram(unsigned int program);\n bool compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode);\n void bindVAO(unsigned int vao) const;\n unsigned int generateVAO();\n void deleteVAO(unsigned int vao);\n\n Texture *createTexture(const std::string &name,\n const std::string &url) override;\n Texture *createTexture(const std::string &name,\n const std::vector<std::string> &urls) override;\n unsigned int generateTexture();\n void bindTexture(unsigned int target, unsigned int texture);\n void deleteTexture(unsigned int texture);\n void uploadTexture(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel);\n void setParameter(unsigned int target, unsigned int pname, int param);\n void generateMipmap(unsigned int target);\n void updateAllFishData() override;\n\nprotected:\n explicit ContextGL(BACKENDTYPE backendType);\n\nprivate:\n void initState();\n void initAvailableToggleBitset(BACKENDTYPE backendType) override;\n static void framebufferResizeCallback(GLFWwindow *window,\n int width,\n int height);\n\n GLFWwindow *mWindow;\n std::string mGLSLVersion;\n\n#ifdef EGL_EGL_PROTOTYPES\n EGLBoolean FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config);\n EGLContext createContext(EGLContext share) const;\n\n EGLSurface mSurface;\n EGLContext mContext;\n EGLDisplay mDisplay;\n EGLConfig mConfig;\n#endif\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "CONTEXTGL_H" (preproc_def) "#define CONTEXTGL_H\n" (#define) "#define" (identifier) "CONTEXTGL_H" (preproc_include) "#include <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (preproc_def) "#define GLFW_INCLUDE_NONE\n" (#define) "#define" (identifier) "GLFW_INCLUDE_NONE" (preproc_include) "#include "GLFW/glfw3.h"\n" (#include) "#include" (string_literal) ""GLFW/glfw3.h"" (") """ (string_content) "GLFW/glfw3.h" (") """ (preproc_ifdef) "#ifdef EGL_EGL_PROTOTYPES\n#include <memory>\n\n#include "EGL/egl.h"\n#include "EGL/eglext.h"\n#include "EGL/eglext_angle.h"\n#include "EGL/eglplatform.h"\n#include "angle_gl.h"\n#else\n#include "glad/glad.h"\n#endif" (#ifdef) "#ifdef" (identifier) "EGL_EGL_PROTOTYPES" (preproc_include) "#include <memory>\n" (#include) "#include" (system_lib_string) "<memory>" (preproc_include) "#include "EGL/egl.h"\n" (#include) "#include" (string_literal) ""EGL/egl.h"" (") """ (string_content) "EGL/egl.h" (") """ (preproc_include) "#include "EGL/eglext.h"\n" (#include) "#include" (string_literal) ""EGL/eglext.h"" (") """ (string_content) "EGL/eglext.h" (") """ (preproc_include) "#include "EGL/eglext_angle.h"\n" (#include) "#include" (string_literal) ""EGL/eglext_angle.h"" (") """ (string_content) "EGL/eglext_angle.h" (") """ (preproc_include) "#include "EGL/eglplatform.h"\n" (#include) "#include" (string_literal) ""EGL/eglplatform.h"" (") """ (string_content) "EGL/eglplatform.h" (") """ (preproc_include) "#include "angle_gl.h"\n" (#include) "#include" (string_literal) ""angle_gl.h"" (") """ (string_content) "angle_gl.h" (") """ (preproc_else) "#else\n#include "glad/glad.h"\n" (#else) "#else" (preproc_include) "#include "glad/glad.h"\n" (#include) "#include" (string_literal) ""glad/glad.h"" (") """ (string_content) "glad/glad.h" (") """ (#endif) "#endif" (preproc_include) "#include "../Aquarium.h"\n" (#include) "#include" (string_literal) ""../Aquarium.h"" (") """ (string_content) "../Aquarium.h" (") """ (preproc_include) "#include "../Context.h"\n" (#include) "#include" (string_literal) ""../Context.h"" (") """ (string_content) "../Context.h" (") """ (declaration) "class BufferGL;" (type_identifier) "class" (identifier) "BufferGL" (;) ";" (declaration) "class TextureGL;" (type_identifier) "class" (identifier) "TextureGL" (;) ";" (function_definition) "class ContextGL : public Context {\npublic:\n static ContextGL *create(BACKENDTYPE backendType);\n\n ~ContextGL() override;\n\n bool initialize(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)> &toggleBitset,\n int windowWidth,\n int windowHeight) override;\n void setWindowTitle(const std::string &text) override;\n bool ShouldQuit() override;\n void KeyBoardQuit() override;\n void DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset) override;\n void Terminate() override;\n void showWindow() override;\n void updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset) override;\n void destoryImgUI() override;\n\n void preFrame() override;\n void enableBlend(bool flag) const;\n\n Model *createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override;\n int getUniformLocation(unsigned int programId, const std::string &name) const;\n int getAttribLocation(unsigned int programId, const std::string &name) const;\n void setUniform(int index, const float *v, int type) const;\n void setTexture(const TextureGL &texture, int index, int unit) const;\n void setAttribs(const BufferGL &bufferGL, int index) const;\n void setIndices(const BufferGL &bufferGL) const;\n void drawElements(const BufferGL &buffer) const;\n\n Buffer *createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override;\n Buffer *createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override;\n unsigned int generateBuffer();\n void deleteBuffer(unsigned int buf);\n void bindBuffer(unsigned int target, unsigned int buf);\n void uploadBuffer(unsigned int target, const std::vector<float> &buf);\n void uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf);\n\n Program *createProgram(const std::string &mVId,\n const std::string &mFId) override;\n unsigned int generateProgram();\n void setProgram(unsigned int program);\n void deleteProgram(unsigned int program);\n bool compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode);\n void bindVAO(unsigned int vao) const;\n unsigned int generateVAO();\n void deleteVAO(unsigned int vao);\n\n Texture *createTexture(const std::string &name,\n const std::string &url) override;\n Texture *createTexture(const std::string &name,\n const std::vector<std::string> &urls) override;\n unsigned int generateTexture();\n void bindTexture(unsigned int target, unsigned int texture);\n void deleteTexture(unsigned int texture);\n void uploadTexture(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel);\n void setParameter(unsigned int target, unsigned int pname, int param);\n void generateMipmap(unsigned int target);\n void updateAllFishData() override;\n\nprotected:\n explicit ContextGL(BACKENDTYPE backendType);\n\nprivate:\n void initState();\n void initAvailableToggleBitset(BACKENDTYPE backendType) override;\n static void framebufferResizeCallback(GLFWwindow *window,\n int width,\n int height);\n\n GLFWwindow *mWindow;\n std::string mGLSLVersion;\n\n#ifdef EGL_EGL_PROTOTYPES\n EGLBoolean FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config);\n EGLContext createContext(EGLContext share) const;\n\n EGLSurface mSurface;\n EGLContext mContext;\n EGLDisplay mDisplay;\n EGLConfig mConfig;\n#endif\n}" (type_identifier) "class" (identifier) "ContextGL" (ERROR) ": public Context" (:) ":" (identifier) "public" (identifier) "Context" (compound_statement) "{\npublic:\n static ContextGL *create(BACKENDTYPE backendType);\n\n ~ContextGL() override;\n\n bool initialize(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)> &toggleBitset,\n int windowWidth,\n int windowHeight) override;\n void setWindowTitle(const std::string &text) override;\n bool ShouldQuit() override;\n void KeyBoardQuit() override;\n void DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset) override;\n void Terminate() override;\n void showWindow() override;\n void updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset) override;\n void destoryImgUI() override;\n\n void preFrame() override;\n void enableBlend(bool flag) const;\n\n Model *createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override;\n int getUniformLocation(unsigned int programId, const std::string &name) const;\n int getAttribLocation(unsigned int programId, const std::string &name) const;\n void setUniform(int index, const float *v, int type) const;\n void setTexture(const TextureGL &texture, int index, int unit) const;\n void setAttribs(const BufferGL &bufferGL, int index) const;\n void setIndices(const BufferGL &bufferGL) const;\n void drawElements(const BufferGL &buffer) const;\n\n Buffer *createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override;\n Buffer *createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override;\n unsigned int generateBuffer();\n void deleteBuffer(unsigned int buf);\n void bindBuffer(unsigned int target, unsigned int buf);\n void uploadBuffer(unsigned int target, const std::vector<float> &buf);\n void uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf);\n\n Program *createProgram(const std::string &mVId,\n const std::string &mFId) override;\n unsigned int generateProgram();\n void setProgram(unsigned int program);\n void deleteProgram(unsigned int program);\n bool compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode);\n void bindVAO(unsigned int vao) const;\n unsigned int generateVAO();\n void deleteVAO(unsigned int vao);\n\n Texture *createTexture(const std::string &name,\n const std::string &url) override;\n Texture *createTexture(const std::string &name,\n const std::vector<std::string> &urls) override;\n unsigned int generateTexture();\n void bindTexture(unsigned int target, unsigned int texture);\n void deleteTexture(unsigned int texture);\n void uploadTexture(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel);\n void setParameter(unsigned int target, unsigned int pname, int param);\n void generateMipmap(unsigned int target);\n void updateAllFishData() override;\n\nprotected:\n explicit ContextGL(BACKENDTYPE backendType);\n\nprivate:\n void initState();\n void initAvailableToggleBitset(BACKENDTYPE backendType) override;\n static void framebufferResizeCallback(GLFWwindow *window,\n int width,\n int height);\n\n GLFWwindow *mWindow;\n std::string mGLSLVersion;\n\n#ifdef EGL_EGL_PROTOTYPES\n EGLBoolean FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config);\n EGLContext createContext(EGLContext share) const;\n\n EGLSurface mSurface;\n EGLContext mContext;\n EGLDisplay mDisplay;\n EGLConfig mConfig;\n#endif\n}" ({) "{" (labeled_statement) "public:\n static ContextGL *create(BACKENDTYPE backendType);" (statement_identifier) "public" (:) ":" (declaration) "static ContextGL *create(BACKENDTYPE backendType);" (storage_class_specifier) "static" (static) "static" (type_identifier) "ContextGL" (pointer_declarator) "*create(BACKENDTYPE backendType)" (*) "*" (function_declarator) "create(BACKENDTYPE backendType)" (identifier) "create" (parameter_list) "(BACKENDTYPE backendType)" (() "(" (parameter_declaration) "BACKENDTYPE backendType" (type_identifier) "BACKENDTYPE" (identifier) "backendType" ()) ")" (;) ";" (expression_statement) "~ContextGL() override;" (unary_expression) "~ContextGL()" (~) "~" (call_expression) "ContextGL()" (identifier) "ContextGL" (argument_list) "()" (() "(" ()) ")" (ERROR) "override" (identifier) "override" (;) ";" (ERROR) "bool initialize(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>" (primitive_type) "bool" (function_declarator) "initialize(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)" (identifier) "initialize" (parameter_list) "(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)" (() "(" (parameter_declaration) "BACKENDTYPE backend" (type_identifier) "BACKENDTYPE" (identifier) "backend" (,) "," (parameter_declaration) "const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::bitset<static_cast<size_t>(TOGGLE::" (:) ":" (:) ":" (identifier) "bitset" (<) "<" (identifier) "static_cast" (<) "<" (primitive_type) "size_t" (>) ">" (() "(" (identifier) "TOGGLE" (:) ":" (:) ":" (identifier) "TOGGLEMAX" ()) ")" (>) ">" (expression_statement) "&toggleBitset,\n int windowWidth,\n int windowHeight) override;" (comma_expression) "&toggleBitset,\n int windowWidth,\n int windowHeight) override" (pointer_expression) "&toggleBitset" (&) "&" (identifier) "toggleBitset" (,) "," (ERROR) "int" (identifier) "int" (comma_expression) "windowWidth,\n int windowHeight) override" (identifier) "windowWidth" (,) "," (ERROR) "int windowHeight)" (identifier) "int" (identifier) "windowHeight" ()) ")" (identifier) "override" (;) ";" (ERROR) "void setWindowTitle(const std::string &text) override" (primitive_type) "void" (function_declarator) "setWindowTitle(const std::string &text) override" (identifier) "setWindowTitle" (parameter_list) "(const std::string &text)" (() "(" (parameter_declaration) "const std::string &text" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "text" ()) ")" (identifier) "override" (expression_statement) ";" (;) ";" (ERROR) "bool ShouldQuit() override;\n void KeyBoardQuit() override;\n void DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset) override;\n void Terminate() override;\n void showWindow() override;\n void updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset) override;\n void destoryImgUI() override;\n\n void preFrame() override;\n void enableBlend(bool flag) const;\n\n Model *createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override;\n int getUniformLocation(unsigned int programId, const std::string &name) const;\n int getAttribLocation(unsigned int programId, const std::string &name) const;\n void setUniform(int index, const float *v, int type) const;\n void setTexture(const TextureGL &texture, int index, int unit) const;\n void setAttribs(const BufferGL &bufferGL, int index) const;\n void setIndices(const BufferGL &bufferGL) const;\n void drawElements(const BufferGL &buffer) const;\n\n Buffer *createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override;\n Buffer *createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override;\n unsigned int generateBuffer();\n void deleteBuffer(unsigned int buf);\n void bindBuffer(unsigned int target, unsigned int buf);\n void uploadBuffer(unsigned int target, const std::vector<float> &buf);\n void uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf);\n\n Program *createProgram(const std::string &mVId,\n const std::string &mFId) override;\n unsigned int generateProgram();\n void setProgram(unsigned int program);\n void deleteProgram(unsigned int program);\n bool compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode);\n void bindVAO(unsigned int vao) const;\n unsigned int generateVAO();\n void deleteVAO(unsigned int vao);\n\n Texture *createTexture(const std::string &name,\n const std::string &url) override;\n Texture *createTexture(const std::string &name,\n const std::vector<std::string> &urls) override;\n unsigned int generateTexture();\n void bindTexture(unsigned int target, unsigned int texture);\n void deleteTexture(unsigned int texture);\n void uploadTexture(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel);\n void setParameter(unsigned int target, unsigned int pname, int param);\n void generateMipmap(unsigned int target);\n void updateAllFishData() override;\n\nprotected:\n explicit ContextGL(BACKENDTYPE backendType);\n\nprivate:\n void initState();\n void initAvailableToggleBitset(BACKENDTYPE backendType) override;\n static void framebufferResizeCallback(GLFWwindow *window,\n int width,\n int height);\n\n GLFWwindow *mWindow;\n std::string mGLSLVersion;\n\n#ifdef EGL_EGL_PROTOTYPES\n EGLBoolean FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config);\n EGLContext createContext(EGLContext share) const;\n\n EGLSurface mSurface;\n EGLContext mContext;\n EGLDisplay mDisplay;\n EGLConfig mConfig;\n#endif" (primitive_type) "bool" (function_declarator) "ShouldQuit()" (identifier) "ShouldQuit" (parameter_list) "()" (() "(" ()) ")" (declaration) "override;" (type_identifier) "override" (identifier) "" (;) ";" (ERROR) "void KeyBoardQuit() override;" (primitive_type) "void" (function_declarator) "KeyBoardQuit() override" (identifier) "KeyBoardQuit" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (;) ";" (declaration) "void DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset) override;" (primitive_type) "void" (ERROR) "DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset)" (function_declarator) "DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset" (identifier) "DoFlush" (parameter_list) "(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)" (() "(" (parameter_declaration) "const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::bitset<static_cast<size_t>(TOGGLE::" (:) ":" (:) ":" (identifier) "bitset" (<) "<" (identifier) "static_cast" (<) "<" (primitive_type) "size_t" (>) ">" (() "(" (identifier) "TOGGLE" (:) ":" (:) ":" (identifier) "TOGGLEMAX" ()) ")" (ERROR) ">\n &" (>) ">" (&) "&" (identifier) "toggleBitset" ()) ")" (identifier) "override" (;) ";" (ERROR) "void Terminate() override;\n void showWindow() override;" (primitive_type) "void" (function_declarator) "Terminate() override" (identifier) "Terminate" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (;) ";" (primitive_type) "void" (function_declarator) "showWindow() override" (identifier) "showWindow" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (;) ";" (declaration) "void updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset) override;" (primitive_type) "void" (ERROR) "updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset)" (function_declarator) "updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset" (identifier) "updateFPS" (parameter_list) "(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)" (() "(" (parameter_declaration) "const FPSTimer &fpsTimer" (type_qualifier) "const" (const) "const" (type_identifier) "FPSTimer" (ERROR) "&" (&) "&" (identifier) "fpsTimer" (,) "," (parameter_declaration) "int *fishCount" (primitive_type) "int" (pointer_declarator) "*fishCount" (*) "*" (identifier) "fishCount" (,) "," (parameter_declaration) "std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX" (type_identifier) "std" (ERROR) "::bitset<static_cast<size_t>(TOGGLE::" (:) ":" (:) ":" (identifier) "bitset" (<) "<" (identifier) "static_cast" (<) "<" (primitive_type) "size_t" (>) ">" (() "(" (identifier) "TOGGLE" (:) ":" (:) ":" (identifier) "TOGGLEMAX" ()) ")" (ERROR) ">\n *" (>) ">" (*) "*" (identifier) "toggleBitset" ()) ")" (identifier) "override" (;) ";" (ERROR) "void destoryImgUI() override;\n\n void preFrame() override;" (primitive_type) "void" (function_declarator) "destoryImgUI() override" (identifier) "destoryImgUI" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (;) ";" (primitive_type) "void" (function_declarator) "preFrame() override" (identifier) "preFrame" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (;) ";" (declaration) "void enableBlend(bool flag) const;\n\n Model *createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override;" (primitive_type) "void" (ERROR) "enableBlend(bool flag) const;\n\n Model" (function_declarator) "enableBlend(bool flag) const" (identifier) "enableBlend" (parameter_list) "(bool flag)" (() "(" (parameter_declaration) "bool flag" (primitive_type) "bool" (identifier) "flag" ()) ")" (identifier) "const" (;) ";" (identifier) "Model" (pointer_declarator) "*createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override" (*) "*" (function_declarator) "createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override" (identifier) "createModel" (parameter_list) "(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend)" (() "(" (parameter_declaration) "Aquarium *aquarium" (type_identifier) "Aquarium" (pointer_declarator) "*aquarium" (*) "*" (identifier) "aquarium" (,) "," (parameter_declaration) "MODELGROUP type" (type_identifier) "MODELGROUP" (identifier) "type" (,) "," (parameter_declaration) "MODELNAME name" (type_identifier) "MODELNAME" (identifier) "name" (,) "," (parameter_declaration) "bool blend" (primitive_type) "bool" (identifier) "blend" ()) ")" (identifier) "override" (;) ";" (ERROR) "int getUniformLocation(unsigned int programId, const std::string &name) const;\n int getAttribLocation(unsigned int programId, const std::string &name) const;\n void setUniform(int index, const float *v, int type) const;\n void setTexture(const TextureGL &texture, int index, int unit) const;\n void setAttribs(const BufferGL &bufferGL, int index) const;\n void setIndices(const BufferGL &bufferGL) const;" (primitive_type) "int" (function_declarator) "getUniformLocation(unsigned int programId, const std::string &name) const" (identifier) "getUniformLocation" (parameter_list) "(unsigned int programId, const std::string &name)" (() "(" (parameter_declaration) "unsigned int programId" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "programId" (,) "," (parameter_declaration) "const std::string &name" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "name" ()) ")" (identifier) "const" (;) ";" (primitive_type) "int" (function_declarator) "getAttribLocation(unsigned int programId, const std::string &name) const" (identifier) "getAttribLocation" (parameter_list) "(unsigned int programId, const std::string &name)" (() "(" (parameter_declaration) "unsigned int programId" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "programId" (,) "," (parameter_declaration) "const std::string &name" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "name" ()) ")" (identifier) "const" (;) ";" (primitive_type) "void" (function_declarator) "setUniform(int index, const float *v, int type) const" (identifier) "setUniform" (parameter_list) "(int index, const float *v, int type)" (() "(" (parameter_declaration) "int index" (primitive_type) "int" (identifier) "index" (,) "," (parameter_declaration) "const float *v" (type_qualifier) "const" (const) "const" (primitive_type) "float" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "int type" (primitive_type) "int" (identifier) "type" ()) ")" (identifier) "const" (;) ";" (primitive_type) "void" (function_declarator) "setTexture(const TextureGL &texture, int index, int unit) const" (identifier) "setTexture" (parameter_list) "(const TextureGL &texture, int index, int unit)" (() "(" (parameter_declaration) "const TextureGL &texture" (type_qualifier) "const" (const) "const" (type_identifier) "TextureGL" (ERROR) "&" (&) "&" (identifier) "texture" (,) "," (parameter_declaration) "int index" (primitive_type) "int" (identifier) "index" (,) "," (parameter_declaration) "int unit" (primitive_type) "int" (identifier) "unit" ()) ")" (identifier) "const" (;) ";" (primitive_type) "void" (function_declarator) "setAttribs(const BufferGL &bufferGL, int index) const" (identifier) "setAttribs" (parameter_list) "(const BufferGL &bufferGL, int index)" (() "(" (parameter_declaration) "const BufferGL &bufferGL" (type_qualifier) "const" (const) "const" (type_identifier) "BufferGL" (ERROR) "&" (&) "&" (identifier) "bufferGL" (,) "," (parameter_declaration) "int index" (primitive_type) "int" (identifier) "index" ()) ")" (identifier) "const" (;) ";" (primitive_type) "void" (function_declarator) "setIndices(const BufferGL &bufferGL) const" (identifier) "setIndices" (parameter_list) "(const BufferGL &bufferGL)" (() "(" (parameter_declaration) "const BufferGL &bufferGL" (type_qualifier) "const" (const) "const" (type_identifier) "BufferGL" (ERROR) "&" (&) "&" (identifier) "bufferGL" ()) ")" (identifier) "const" (;) ";" (declaration) "void drawElements(const BufferGL &buffer) const;\n\n Buffer *createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override;" (primitive_type) "void" (ERROR) "drawElements(const BufferGL &buffer) const;\n\n Buffer" (function_declarator) "drawElements(const BufferGL &buffer) const" (identifier) "drawElements" (parameter_list) "(const BufferGL &buffer)" (() "(" (parameter_declaration) "const BufferGL &buffer" (type_qualifier) "const" (const) "const" (type_identifier) "BufferGL" (ERROR) "&" (&) "&" (identifier) "buffer" ()) ")" (identifier) "const" (;) ";" (identifier) "Buffer" (pointer_declarator) "*createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override" (*) "*" (function_declarator) "createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override" (identifier) "createBuffer" (parameter_list) "(int numComponents,\n std::vector<float> *buffer,\n bool isIndex)" (() "(" (parameter_declaration) "int numComponents" (primitive_type) "int" (identifier) "numComponents" (,) "," (parameter_declaration) "std::vector<float> *buffer" (type_identifier) "std" (ERROR) "::vector<float>" (:) ":" (:) ":" (identifier) "vector" (<) "<" (primitive_type) "float" (>) ">" (pointer_declarator) "*buffer" (*) "*" (identifier) "buffer" (,) "," (parameter_declaration) "bool isIndex" (primitive_type) "bool" (identifier) "isIndex" ()) ")" (identifier) "override" (;) ";" (declaration) "Buffer *createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override;" (type_identifier) "Buffer" (pointer_declarator) "*createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override" (*) "*" (function_declarator) "createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override" (identifier) "createBuffer" (parameter_list) "(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex)" (() "(" (parameter_declaration) "int numComponents" (primitive_type) "int" (identifier) "numComponents" (,) "," (parameter_declaration) "std::vector<unsigned short> *buffer" (type_identifier) "std" (ERROR) "::vector<unsigned short>" (:) ":" (:) ":" (identifier) "vector" (<) "<" (unsigned) "unsigned" (short) "short" (>) ">" (pointer_declarator) "*buffer" (*) "*" (identifier) "buffer" (,) "," (parameter_declaration) "bool isIndex" (primitive_type) "bool" (identifier) "isIndex" ()) ")" (identifier) "override" (;) ";" (declaration) "unsigned int generateBuffer();" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (function_declarator) "generateBuffer()" (identifier) "generateBuffer" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void deleteBuffer(unsigned int buf);" (primitive_type) "void" (function_declarator) "deleteBuffer(unsigned int buf)" (identifier) "deleteBuffer" (parameter_list) "(unsigned int buf)" (() "(" (parameter_declaration) "unsigned int buf" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "buf" ()) ")" (;) ";" (declaration) "void bindBuffer(unsigned int target, unsigned int buf);" (primitive_type) "void" (function_declarator) "bindBuffer(unsigned int target, unsigned int buf)" (identifier) "bindBuffer" (parameter_list) "(unsigned int target, unsigned int buf)" (() "(" (parameter_declaration) "unsigned int target" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "target" (,) "," (parameter_declaration) "unsigned int buf" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "buf" ()) ")" (;) ";" (declaration) "void uploadBuffer(unsigned int target, const std::vector<float> &buf);" (primitive_type) "void" (function_declarator) "uploadBuffer(unsigned int target, const std::vector<float> &buf)" (identifier) "uploadBuffer" (parameter_list) "(unsigned int target, const std::vector<float> &buf)" (() "(" (parameter_declaration) "unsigned int target" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "target" (,) "," (parameter_declaration) "const std::vector<float> &buf" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::vector<float> &" (:) ":" (:) ":" (identifier) "vector" (<) "<" (primitive_type) "float" (>) ">" (&) "&" (identifier) "buf" ()) ")" (;) ";" (declaration) "void uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf);" (primitive_type) "void" (function_declarator) "uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf)" (identifier) "uploadBuffer" (parameter_list) "(unsigned int target,\n const std::vector<unsigned short> &buf)" (() "(" (parameter_declaration) "unsigned int target" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "target" (,) "," (parameter_declaration) "const std::vector<unsigned short> &buf" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::vector<unsigned short> &" (:) ":" (:) ":" (identifier) "vector" (<) "<" (unsigned) "unsigned" (short) "short" (>) ">" (&) "&" (identifier) "buf" ()) ")" (;) ";" (declaration) "Program *createProgram(const std::string &mVId,\n const std::string &mFId) override;" (type_identifier) "Program" (pointer_declarator) "*createProgram(const std::string &mVId,\n const std::string &mFId) override" (*) "*" (function_declarator) "createProgram(const std::string &mVId,\n const std::string &mFId) override" (identifier) "createProgram" (parameter_list) "(const std::string &mVId,\n const std::string &mFId)" (() "(" (parameter_declaration) "const std::string &mVId" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "mVId" (,) "," (parameter_declaration) "const std::string &mFId" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "mFId" ()) ")" (identifier) "override" (;) ";" (declaration) "unsigned int generateProgram();" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (function_declarator) "generateProgram()" (identifier) "generateProgram" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void setProgram(unsigned int program);" (primitive_type) "void" (function_declarator) "setProgram(unsigned int program)" (identifier) "setProgram" (parameter_list) "(unsigned int program)" (() "(" (parameter_declaration) "unsigned int program" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "program" ()) ")" (;) ";" (declaration) "void deleteProgram(unsigned int program);" (primitive_type) "void" (function_declarator) "deleteProgram(unsigned int program)" (identifier) "deleteProgram" (parameter_list) "(unsigned int program)" (() "(" (parameter_declaration) "unsigned int program" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "program" ()) ")" (;) ";" (declaration) "bool compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode);" (primitive_type) "bool" (function_declarator) "compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode)" (identifier) "compileProgram" (parameter_list) "(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode)" (() "(" (parameter_declaration) "unsigned int programId" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "programId" (,) "," (parameter_declaration) "const std::string &VertexShaderCode" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "VertexShaderCode" (,) "," (parameter_declaration) "const std::string &FragmentShaderCode" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "FragmentShaderCode" ()) ")" (;) ";" (ERROR) "void bindVAO(unsigned int vao) const;" (primitive_type) "void" (function_declarator) "bindVAO(unsigned int vao) const" (identifier) "bindVAO" (parameter_list) "(unsigned int vao)" (() "(" (parameter_declaration) "unsigned int vao" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "vao" ()) ")" (identifier) "const" (;) ";" (declaration) "unsigned int generateVAO();" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (function_declarator) "generateVAO()" (identifier) "generateVAO" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void deleteVAO(unsigned int vao);" (primitive_type) "void" (function_declarator) "deleteVAO(unsigned int vao)" (identifier) "deleteVAO" (parameter_list) "(unsigned int vao)" (() "(" (parameter_declaration) "unsigned int vao" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "vao" ()) ")" (;) ";" (declaration) "Texture *createTexture(const std::string &name,\n const std::string &url) override;" (type_identifier) "Texture" (pointer_declarator) "*createTexture(const std::string &name,\n const std::string &url) override" (*) "*" (function_declarator) "createTexture(const std::string &name,\n const std::string &url) override" (identifier) "createTexture" (parameter_list) "(const std::string &name,\n const std::string &url)" (() "(" (parameter_declaration) "const std::string &name" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "name" (,) "," (parameter_declaration) "const std::string &url" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "url" ()) ")" (identifier) "override" (;) ";" (declaration) "Texture *createTexture(const std::string &name,\n const std::vector<std::string> &urls) override;" (type_identifier) "Texture" (pointer_declarator) "*createTexture(const std::string &name,\n const std::vector<std::string> &urls) override" (*) "*" (function_declarator) "createTexture(const std::string &name,\n const std::vector<std::string> &urls) override" (identifier) "createTexture" (parameter_list) "(const std::string &name,\n const std::vector<std::string> &urls)" (() "(" (parameter_declaration) "const std::string &name" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::string &" (:) ":" (:) ":" (identifier) "string" (&) "&" (identifier) "name" (,) "," (parameter_declaration) "const std::vector<std::string> &urls" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::vector<std::string> &" (:) ":" (:) ":" (identifier) "vector" (<) "<" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (>) ">" (&) "&" (identifier) "urls" ()) ")" (identifier) "override" (;) ";" (declaration) "unsigned int generateTexture();" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (function_declarator) "generateTexture()" (identifier) "generateTexture" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void bindTexture(unsigned int target, unsigned int texture);" (primitive_type) "void" (function_declarator) "bindTexture(unsigned int target, unsigned int texture)" (identifier) "bindTexture" (parameter_list) "(unsigned int target, unsigned int texture)" (() "(" (parameter_declaration) "unsigned int target" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "target" (,) "," (parameter_declaration) "unsigned int texture" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "texture" ()) ")" (;) ";" (declaration) "void deleteTexture(unsigned int texture);" (primitive_type) "void" (function_declarator) "deleteTexture(unsigned int texture)" (identifier) "deleteTexture" (parameter_list) "(unsigned int texture)" (() "(" (parameter_declaration) "unsigned int texture" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "texture" ()) ")" (;) ";" (declaration) "void uploadTexture(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel);" (primitive_type) "void" (function_declarator) "uploadTexture(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel)" (identifier) "uploadTexture" (parameter_list) "(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel)" (() "(" (parameter_declaration) "unsigned int target" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "target" (,) "," (parameter_declaration) "unsigned int format" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "format" (,) "," (parameter_declaration) "int width" (primitive_type) "int" (identifier) "width" (,) "," (parameter_declaration) "int height" (primitive_type) "int" (identifier) "height" (,) "," (parameter_declaration) "unsigned char *pixel" (sized_type_specifier) "unsigned char" (unsigned) "unsigned" (primitive_type) "char" (pointer_declarator) "*pixel" (*) "*" (identifier) "pixel" ()) ")" (;) ";" (declaration) "void setParameter(unsigned int target, unsigned int pname, int param);" (primitive_type) "void" (function_declarator) "setParameter(unsigned int target, unsigned int pname, int param)" (identifier) "setParameter" (parameter_list) "(unsigned int target, unsigned int pname, int param)" (() "(" (parameter_declaration) "unsigned int target" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "target" (,) "," (parameter_declaration) "unsigned int pname" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "pname" (,) "," (parameter_declaration) "int param" (primitive_type) "int" (identifier) "param" ()) ")" (;) ";" (declaration) "void generateMipmap(unsigned int target);" (primitive_type) "void" (function_declarator) "generateMipmap(unsigned int target)" (identifier) "generateMipmap" (parameter_list) "(unsigned int target)" (() "(" (parameter_declaration) "unsigned int target" (sized_type_specifier) "unsigned int" (unsigned) "unsigned" (primitive_type) "int" (identifier) "target" ()) ")" (;) ";" (declaration) "void updateAllFishData() override;\n\nprotected:\n explicit ContextGL(BACKENDTYPE backendType);" (primitive_type) "void" (ERROR) "updateAllFishData() override;\n\nprotected:\n explicit" (function_declarator) "updateAllFishData() override" (identifier) "updateAllFishData" (parameter_list) "()" (() "(" ()) ")" (identifier) "override" (;) ";" (identifier) "protected" (:) ":" (identifier) "explicit" (function_declarator) "ContextGL(BACKENDTYPE backendType)" (identifier) "ContextGL" (parameter_list) "(BACKENDTYPE backendType)" (() "(" (parameter_declaration) "BACKENDTYPE backendType" (type_identifier) "BACKENDTYPE" (identifier) "backendType" ()) ")" (;) ";" (ERROR) "private:" (type_identifier) "private" (:) ":" (declaration) "void initState();" (primitive_type) "void" (function_declarator) "initState()" (identifier) "initState" (parameter_list) "()" (() "(" ()) ")" (;) ";" (ERROR) "void initAvailableToggleBitset(BACKENDTYPE backendType) override;" (primitive_type) "void" (function_declarator) "initAvailableToggleBitset(BACKENDTYPE backendType) override" (identifier) "initAvailableToggleBitset" (parameter_list) "(BACKENDTYPE backendType)" (() "(" (parameter_declaration) "BACKENDTYPE backendType" (type_identifier) "BACKENDTYPE" (identifier) "backendType" ()) ")" (identifier) "override" (;) ";" (declaration) "static void framebufferResizeCallback(GLFWwindow *window,\n int width,\n int height);" (storage_class_specifier) "static" (static) "static" (primitive_type) "void" (function_declarator) "framebufferResizeCallback(GLFWwindow *window,\n int width,\n int height)" (identifier) "framebufferResizeCallback" (parameter_list) "(GLFWwindow *window,\n int width,\n int height)" (() "(" (parameter_declaration) "GLFWwindow *window" (type_identifier) "GLFWwindow" (pointer_declarator) "*window" (*) "*" (identifier) "window" (,) "," (parameter_declaration) "int width" (primitive_type) "int" (identifier) "width" (,) "," (parameter_declaration) "int height" (primitive_type) "int" (identifier) "height" ()) ")" (;) ";" (declaration) "GLFWwindow *mWindow;" (type_identifier) "GLFWwindow" (pointer_declarator) "*mWindow" (*) "*" (identifier) "mWindow" (;) ";" (declaration) "std::string mGLSLVersion;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (identifier) "string" (identifier) "mGLSLVersion" (;) ";" (ERROR) "#ifdef" (#ifdef) "#ifdef" (declaration) "EGL_EGL_PROTOTYPES\n EGLBoolean FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config);" (type_identifier) "EGL_EGL_PROTOTYPES" (ERROR) "EGLBoolean" (identifier) "EGLBoolean" (function_declarator) "FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config)" (identifier) "FindEGLConfig" (parameter_list) "(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config)" (() "(" (parameter_declaration) "EGLDisplay dpy" (type_identifier) "EGLDisplay" (identifier) "dpy" (,) "," (parameter_declaration) "const EGLint *attrib_list" (type_qualifier) "const" (const) "const" (type_identifier) "EGLint" (pointer_declarator) "*attrib_list" (*) "*" (identifier) "attrib_list" (,) "," (parameter_declaration) "EGLConfig *config" (type_identifier) "EGLConfig" (pointer_declarator) "*config" (*) "*" (identifier) "config" ()) ")" (;) ";" (declaration) "EGLContext createContext(EGLContext share) const;\n\n EGLSurface mSurface;" (type_identifier) "EGLContext" (ERROR) "createContext(EGLContext share) const;\n\n EGLSurface" (function_declarator) "createContext(EGLContext share) const" (identifier) "createContext" (parameter_list) "(EGLContext share)" (() "(" (parameter_declaration) "EGLContext share" (type_identifier) "EGLContext" (identifier) "share" ()) ")" (identifier) "const" (;) ";" (identifier) "EGLSurface" (identifier) "mSurface" (;) ";" (declaration) "EGLContext mContext;" (type_identifier) "EGLContext" (identifier) "mContext" (;) ";" (declaration) "EGLDisplay mDisplay;" (type_identifier) "EGLDisplay" (identifier) "mDisplay" (;) ";" (declaration) "EGLConfig mConfig;" (type_identifier) "EGLConfig" (identifier) "mConfig" (;) ";" (#endif) "#endif" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// CONTEXTGL_H"
1,140
48
{"language": "c", "success": true, "metadata": {"lines": 119, "avg_line_length": 38.32, "nodes": 752, "errors": 0, "source_hash": "22be018a0f5fe3be57d8eb46908ce3dd90fd912f5d30b2c45b5b8a2c207f024f", "categorized_nodes": 480}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef CONTEXTGL_H\n#define CONTEXTGL_H\n\n#include <vector>\n\n#define GLFW_INCLUDE_NONE\n#include \"GLFW/glfw3.h\"\n\n#ifdef EGL_EGL_PROTOTYPES\n#include <memory>\n\n#include \"EGL/egl.h\"\n#include \"EGL/eglext.h\"\n#include \"EGL/eglext_angle.h\"\n#include \"EGL/eglplatform.h\"\n#include \"angle_gl.h\"\n#else\n#include \"glad/glad.h\"\n#endif\n\n#include \"../Aquarium.h\"\n#include \"../Context.h\"\n\nclass BufferGL;\nclass TextureGL;\n\nclass ContextGL : public Context {\npublic:\n static ContextGL *create(BACKENDTYPE backendType);\n\n ~ContextGL() override;\n\n bool initialize(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)> &toggleBitset,\n int windowWidth,\n int windowHeight) override;\n void setWindowTitle(const std::string &text) override;\n bool ShouldQuit() override;\n void KeyBoardQuit() override;\n void DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset) override;\n void Terminate() override;\n void showWindow() override;\n void updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset) override;\n void destoryImgUI() override;\n\n void preFrame() override;\n void enableBlend(bool flag) const;\n\n Model *createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override;\n int getUniformLocation(unsigned int programId, const std::string &name) const;\n int getAttribLocation(unsigned int programId, const std::string &name) const;\n void setUniform(int index, const float *v, int type) const;\n void setTexture(const TextureGL &texture, int index, int unit) const;\n void setAttribs(const BufferGL &bufferGL, int index) const;\n void setIndices(const BufferGL &bufferGL) const;\n void drawElements(const BufferGL &buffer) const;\n\n Buffer *createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override;\n Buffer *createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override;\n unsigned int generateBuffer();\n void deleteBuffer(unsigned int buf);\n void bindBuffer(unsigned int target, unsigned int buf);\n void uploadBuffer(unsigned int target, const std::vector<float> &buf);\n void uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf);\n\n Program *createProgram(const std::string &mVId,\n const std::string &mFId) override;\n unsigned int generateProgram();\n void setProgram(unsigned int program);\n void deleteProgram(unsigned int program);\n bool compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode);\n void bindVAO(unsigned int vao) const;\n unsigned int generateVAO();\n void deleteVAO(unsigned int vao);\n\n Texture *createTexture(const std::string &name,\n const std::string &url) override;\n Texture *createTexture(const std::string &name,\n const std::vector<std::string> &urls) override;\n unsigned int generateTexture();\n void bindTexture(unsigned int target, unsigned int texture);\n void deleteTexture(unsigned int texture);\n void uploadTexture(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel);\n void setParameter(unsigned int target, unsigned int pname, int param);\n void generateMipmap(unsigned int target);\n void updateAllFishData() override;\n\nprotected:\n explicit ContextGL(BACKENDTYPE backendType);\n\nprivate:\n void initState();\n void initAvailableToggleBitset(BACKENDTYPE backendType) override;\n static void framebufferResizeCallback(GLFWwindow *window,\n int width,\n int height);\n\n GLFWwindow *mWindow;\n std::string mGLSLVersion;\n\n#ifdef EGL_EGL_PROTOTYPES\n EGLBoolean FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config);\n EGLContext createContext(EGLContext share) const;\n\n EGLSurface mSurface;\n EGLContext mContext;\n EGLDisplay mDisplay;\n EGLConfig mConfig;\n#endif\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 42, 45, 48, 50, 52, 751], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 139, "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": "CONTEXTGL_H", "parent": 0, "children": [], "start_point": {"row": 7, "column": 8}, "end_point": {"row": 7, "column": 19}}, {"id": 3, "type": "preproc_def", "text": "#define CONTEXTGL_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": "CONTEXTGL_H", "parent": 3, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 19}}, {"id": 6, "type": "preproc_include", "text": "#include <vector>\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": "<vector>", "parent": 6, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 17}}, {"id": 9, "type": "preproc_def", "text": "#define GLFW_INCLUDE_NONE\n", "parent": 0, "children": [10, 11], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 10, "type": "#define", "text": "#define", "parent": 9, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 7}}, {"id": 11, "type": "identifier", "text": "GLFW_INCLUDE_NONE", "parent": 9, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 25}}, {"id": 12, "type": "preproc_include", "text": "#include \"GLFW/glfw3.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": "\"GLFW/glfw3.h\"", "parent": 12, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 23}}, {"id": 15, "type": "preproc_ifdef", "text": "#ifdef EGL_EGL_PROTOTYPES\n#include <memory>\n\n#include \"EGL/egl.h\"\n#include \"EGL/eglext.h\"\n#include \"EGL/eglext_angle.h\"\n#include \"EGL/eglplatform.h\"\n#include \"angle_gl.h\"\n#else\n#include \"glad/glad.h\"\n#endif", "parent": 0, "children": [16, 17, 18, 21, 24, 27, 30, 33, 36, 41], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 16, "type": "#ifdef", "text": "#ifdef", "parent": 15, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 6}}, {"id": 17, "type": "identifier", "text": "EGL_EGL_PROTOTYPES", "parent": 15, "children": [], "start_point": {"row": 15, "column": 7}, "end_point": {"row": 15, "column": 25}}, {"id": 18, "type": "preproc_include", "text": "#include <memory>\n", "parent": 15, "children": [19, 20], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 20, "type": "system_lib_string", "text": "<memory>", "parent": 18, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 17}}, {"id": 21, "type": "preproc_include", "text": "#include \"EGL/egl.h\"\n", "parent": 15, "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": "\"EGL/egl.h\"", "parent": 21, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 20}}, {"id": 24, "type": "preproc_include", "text": "#include \"EGL/eglext.h\"\n", "parent": 15, "children": [25, 26], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"EGL/eglext.h\"", "parent": 24, "children": [], "start_point": {"row": 19, "column": 9}, "end_point": {"row": 19, "column": 23}}, {"id": 27, "type": "preproc_include", "text": "#include \"EGL/eglext_angle.h\"\n", "parent": 15, "children": [28, 29], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"EGL/eglext_angle.h\"", "parent": 27, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 29}}, {"id": 30, "type": "preproc_include", "text": "#include \"EGL/eglplatform.h\"\n", "parent": 15, "children": [31, 32], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 22, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"EGL/eglplatform.h\"", "parent": 30, "children": [], "start_point": {"row": 21, "column": 9}, "end_point": {"row": 21, "column": 28}}, {"id": 33, "type": "preproc_include", "text": "#include \"angle_gl.h\"\n", "parent": 15, "children": [34, 35], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"angle_gl.h\"", "parent": 33, "children": [], "start_point": {"row": 22, "column": 9}, "end_point": {"row": 22, "column": 21}}, {"id": 36, "type": "preproc_else", "text": "#else\n#include \"glad/glad.h\"\n", "parent": 15, "children": [37, 38], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 37, "type": "#else", "text": "#else", "parent": 36, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 5}}, {"id": 38, "type": "preproc_include", "text": "#include \"glad/glad.h\"\n", "parent": 36, "children": [39, 40], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 25, "column": 0}}, {"id": 39, "type": "#include", "text": "#include", "parent": 38, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 8}}, {"id": 40, "type": "string_literal", "text": "\"glad/glad.h\"", "parent": 38, "children": [], "start_point": {"row": 24, "column": 9}, "end_point": {"row": 24, "column": 22}}, {"id": 41, "type": "#endif", "text": "#endif", "parent": 15, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 6}}, {"id": 42, "type": "preproc_include", "text": "#include \"../Aquarium.h\"\n", "parent": 0, "children": [43, 44], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 43, "type": "#include", "text": "#include", "parent": 42, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 8}}, {"id": 44, "type": "string_literal", "text": "\"../Aquarium.h\"", "parent": 42, "children": [], "start_point": {"row": 27, "column": 9}, "end_point": {"row": 27, "column": 24}}, {"id": 45, "type": "preproc_include", "text": "#include \"../Context.h\"\n", "parent": 0, "children": [46, 47], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 29, "column": 0}}, {"id": 46, "type": "#include", "text": "#include", "parent": 45, "children": [], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 8}}, {"id": 47, "type": "string_literal", "text": "\"../Context.h\"", "parent": 45, "children": [], "start_point": {"row": 28, "column": 9}, "end_point": {"row": 28, "column": 23}}, {"id": 48, "type": "declaration", "text": "class BufferGL;", "parent": 0, "children": [49], "start_point": {"row": 30, "column": 0}, "end_point": {"row": 30, "column": 15}}, {"id": 49, "type": "identifier", "text": "BufferGL", "parent": 48, "children": [], "start_point": {"row": 30, "column": 6}, "end_point": {"row": 30, "column": 14}}, {"id": 50, "type": "declaration", "text": "class TextureGL;", "parent": 0, "children": [51], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 16}}, {"id": 51, "type": "identifier", "text": "TextureGL", "parent": 50, "children": [], "start_point": {"row": 31, "column": 6}, "end_point": {"row": 31, "column": 15}}, {"id": 52, "type": "function_definition", "text": "class ContextGL : public Context {\npublic:\n static ContextGL *create(BACKENDTYPE backendType);\n\n ~ContextGL() override;\n\n bool initialize(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)> &toggleBitset,\n int windowWidth,\n int windowHeight) override;\n void setWindowTitle(const std::string &text) override;\n bool ShouldQuit() override;\n void KeyBoardQuit() override;\n void DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset) override;\n void Terminate() override;\n void showWindow() override;\n void updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset) override;\n void destoryImgUI() override;\n\n void preFrame() override;\n void enableBlend(bool flag) const;\n\n Model *createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override;\n int getUniformLocation(unsigned int programId, const std::string &name) const;\n int getAttribLocation(unsigned int programId, const std::string &name) const;\n void setUniform(int index, const float *v, int type) const;\n void setTexture(const TextureGL &texture, int index, int unit) const;\n void setAttribs(const BufferGL &bufferGL, int index) const;\n void setIndices(const BufferGL &bufferGL) const;\n void drawElements(const BufferGL &buffer) const;\n\n Buffer *createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override;\n Buffer *createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override;\n unsigned int generateBuffer();\n void deleteBuffer(unsigned int buf);\n void bindBuffer(unsigned int target, unsigned int buf);\n void uploadBuffer(unsigned int target, const std::vector<float> &buf);\n void uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf);\n\n Program *createProgram(const std::string &mVId,\n const std::string &mFId) override;\n unsigned int generateProgram();\n void setProgram(unsigned int program);\n void deleteProgram(unsigned int program);\n bool compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode);\n void bindVAO(unsigned int vao) const;\n unsigned int generateVAO();\n void deleteVAO(unsigned int vao);\n\n Texture *createTexture(const std::string &name,\n const std::string &url) override;\n Texture *createTexture(const std::string &name,\n const std::vector<std::string> &urls) override;\n unsigned int generateTexture();\n void bindTexture(unsigned int target, unsigned int texture);\n void deleteTexture(unsigned int texture);\n void uploadTexture(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel);\n void setParameter(unsigned int target, unsigned int pname, int param);\n void generateMipmap(unsigned int target);\n void updateAllFishData() override;\n\nprotected:\n explicit ContextGL(BACKENDTYPE backendType);\n\nprivate:\n void initState();\n void initAvailableToggleBitset(BACKENDTYPE backendType) override;\n static void framebufferResizeCallback(GLFWwindow *window,\n int width,\n int height);\n\n GLFWwindow *mWindow;\n std::string mGLSLVersion;\n\n#ifdef EGL_EGL_PROTOTYPES\n EGLBoolean FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config);\n EGLContext createContext(EGLContext share) const;\n\n EGLSurface mSurface;\n EGLContext mContext;\n EGLDisplay mDisplay;\n EGLConfig mConfig;\n#endif\n}", "parent": 0, "children": [53, 54], "start_point": {"row": 33, "column": 0}, "end_point": {"row": 137, "column": 1}}, {"id": 53, "type": "identifier", "text": "ContextGL", "parent": 52, "children": [], "start_point": {"row": 33, "column": 6}, "end_point": {"row": 33, "column": 15}}, {"id": 54, "type": "ERROR", "text": ": public Context", "parent": 52, "children": [55], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 32}}, {"id": 55, "type": "identifier", "text": "Context", "parent": 54, "children": [], "start_point": {"row": 33, "column": 25}, "end_point": {"row": 33, "column": 32}}, {"id": 56, "type": "labeled_statement", "text": "public:\n static ContextGL *create(BACKENDTYPE backendType);", "parent": 52, "children": [57], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 52}}, {"id": 57, "type": "declaration", "text": "static ContextGL *create(BACKENDTYPE backendType);", "parent": 56, "children": [58, 59], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 52}}, {"id": 58, "type": "type_identifier", "text": "ContextGL", "parent": 57, "children": [], "start_point": {"row": 35, "column": 9}, "end_point": {"row": 35, "column": 18}}, {"id": 59, "type": "pointer_declarator", "text": "*create(BACKENDTYPE backendType)", "parent": 57, "children": [60, 61], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 51}}, {"id": 60, "type": "*", "text": "*", "parent": 59, "children": [], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 20}}, {"id": 61, "type": "function_declarator", "text": "create(BACKENDTYPE backendType)", "parent": 59, "children": [62, 63], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 51}}, {"id": 62, "type": "identifier", "text": "create", "parent": 61, "children": [], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 26}}, {"id": 63, "type": "parameter_list", "text": "(BACKENDTYPE backendType)", "parent": 61, "children": [64], "start_point": {"row": 35, "column": 26}, "end_point": {"row": 35, "column": 51}}, {"id": 64, "type": "parameter_declaration", "text": "BACKENDTYPE backendType", "parent": 63, "children": [65, 66], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 50}}, {"id": 65, "type": "type_identifier", "text": "BACKENDTYPE", "parent": 64, "children": [], "start_point": {"row": 35, "column": 27}, "end_point": {"row": 35, "column": 38}}, {"id": 66, "type": "identifier", "text": "backendType", "parent": 64, "children": [], "start_point": {"row": 35, "column": 39}, "end_point": {"row": 35, "column": 50}}, {"id": 67, "type": "unary_expression", "text": "~ContextGL()", "parent": 52, "children": [68, 69], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 14}}, {"id": 68, "type": "~", "text": "~", "parent": 67, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 3}}, {"id": 69, "type": "call_expression", "text": "ContextGL()", "parent": 67, "children": [70, 71], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 14}}, {"id": 70, "type": "identifier", "text": "ContextGL", "parent": 69, "children": [], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 12}}, {"id": 71, "type": "argument_list", "text": "()", "parent": 69, "children": [], "start_point": {"row": 37, "column": 12}, "end_point": {"row": 37, "column": 14}}, {"id": 72, "type": "ERROR", "text": "override", "parent": 52, "children": [73], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 23}}, {"id": 73, "type": "identifier", "text": "override", "parent": 72, "children": [], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 23}}, {"id": 74, "type": "ERROR", "text": "bool initialize(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>", "parent": 52, "children": [75, 76, 93], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 41, "column": 63}}, {"id": 75, "type": "primitive_type", "text": "bool", "parent": 74, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 6}}, {"id": 76, "type": "function_declarator", "text": "initialize(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)", "parent": 74, "children": [77, 78], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 41, "column": 62}}, {"id": 77, "type": "identifier", "text": "initialize", "parent": 76, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 17}}, {"id": 78, "type": "parameter_list", "text": "(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)", "parent": 76, "children": [79, 82], "start_point": {"row": 39, "column": 17}, "end_point": {"row": 41, "column": 62}}, {"id": 79, "type": "parameter_declaration", "text": "BACKENDTYPE backend", "parent": 78, "children": [80, 81], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 25}}, {"id": 80, "type": "type_identifier", "text": "BACKENDTYPE", "parent": 79, "children": [], "start_point": {"row": 40, "column": 6}, "end_point": {"row": 40, "column": 17}}, {"id": 81, "type": "identifier", "text": "backend", "parent": 79, "children": [], "start_point": {"row": 40, "column": 18}, "end_point": {"row": 40, "column": 25}}, {"id": 82, "type": "parameter_declaration", "text": "const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX", "parent": 78, "children": [83, 84, 92], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 61}}, {"id": 83, "type": "type_identifier", "text": "std", "parent": 82, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 15}}, {"id": 84, "type": "ERROR", "text": "::bitset<static_cast<size_t>(TOGGLE::", "parent": 82, "children": [85, 86, 87, 88, 89, 90, 91], "start_point": {"row": 41, "column": 15}, "end_point": {"row": 41, "column": 52}}, {"id": 85, "type": "identifier", "text": "bitset", "parent": 84, "children": [], "start_point": {"row": 41, "column": 17}, "end_point": {"row": 41, "column": 23}}, {"id": 86, "type": "<", "text": "<", "parent": 84, "children": [], "start_point": {"row": 41, "column": 23}, "end_point": {"row": 41, "column": 24}}, {"id": 87, "type": "identifier", "text": "static_cast", "parent": 84, "children": [], "start_point": {"row": 41, "column": 24}, "end_point": {"row": 41, "column": 35}}, {"id": 88, "type": "<", "text": "<", "parent": 84, "children": [], "start_point": {"row": 41, "column": 35}, "end_point": {"row": 41, "column": 36}}, {"id": 89, "type": "primitive_type", "text": "size_t", "parent": 84, "children": [], "start_point": {"row": 41, "column": 36}, "end_point": {"row": 41, "column": 42}}, {"id": 90, "type": ">", "text": ">", "parent": 84, "children": [], "start_point": {"row": 41, "column": 42}, "end_point": {"row": 41, "column": 43}}, {"id": 91, "type": "identifier", "text": "TOGGLE", "parent": 84, "children": [], "start_point": {"row": 41, "column": 44}, "end_point": {"row": 41, "column": 50}}, {"id": 92, "type": "identifier", "text": "TOGGLEMAX", "parent": 82, "children": [], "start_point": {"row": 41, "column": 52}, "end_point": {"row": 41, "column": 61}}, {"id": 93, "type": ">", "text": ">", "parent": 74, "children": [], "start_point": {"row": 41, "column": 62}, "end_point": {"row": 41, "column": 63}}, {"id": 94, "type": "comma_expression", "text": "&toggleBitset,\n int windowWidth,\n int windowHeight) override", "parent": 52, "children": [95, 97, 99], "start_point": {"row": 41, "column": 64}, "end_point": {"row": 43, "column": 32}}, {"id": 95, "type": "pointer_expression", "text": "&toggleBitset", "parent": 94, "children": [96], "start_point": {"row": 41, "column": 64}, "end_point": {"row": 41, "column": 77}}, {"id": 96, "type": "identifier", "text": "toggleBitset", "parent": 95, "children": [], "start_point": {"row": 41, "column": 65}, "end_point": {"row": 41, "column": 77}}, {"id": 97, "type": "ERROR", "text": "int", "parent": 94, "children": [98], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 9}}, {"id": 98, "type": "identifier", "text": "int", "parent": 97, "children": [], "start_point": {"row": 42, "column": 6}, "end_point": {"row": 42, "column": 9}}, {"id": 99, "type": "comma_expression", "text": "windowWidth,\n int windowHeight) override", "parent": 94, "children": [100, 101, 104], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 43, "column": 32}}, {"id": 100, "type": "identifier", "text": "windowWidth", "parent": 99, "children": [], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 42, "column": 21}}, {"id": 101, "type": "ERROR", "text": "int windowHeight)", "parent": 99, "children": [102, 103], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 23}}, {"id": 102, "type": "identifier", "text": "int", "parent": 101, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 9}}, {"id": 103, "type": "identifier", "text": "windowHeight", "parent": 101, "children": [], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 22}}, {"id": 104, "type": "identifier", "text": "override", "parent": 99, "children": [], "start_point": {"row": 43, "column": 24}, "end_point": {"row": 43, "column": 32}}, {"id": 105, "type": "ERROR", "text": "void setWindowTitle(const std::string &text) override", "parent": 52, "children": [106, 107], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 55}}, {"id": 106, "type": "primitive_type", "text": "void", "parent": 105, "children": [], "start_point": {"row": 44, "column": 2}, "end_point": {"row": 44, "column": 6}}, {"id": 107, "type": "function_declarator", "text": "setWindowTitle(const std::string &text) override", "parent": 105, "children": [108, 109, 115], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 55}}, {"id": 108, "type": "identifier", "text": "setWindowTitle", "parent": 107, "children": [], "start_point": {"row": 44, "column": 7}, "end_point": {"row": 44, "column": 21}}, {"id": 109, "type": "parameter_list", "text": "(const std::string &text)", "parent": 107, "children": [110], "start_point": {"row": 44, "column": 21}, "end_point": {"row": 44, "column": 46}}, {"id": 110, "type": "parameter_declaration", "text": "const std::string &text", "parent": 109, "children": [111, 112, 114], "start_point": {"row": 44, "column": 22}, "end_point": {"row": 44, "column": 45}}, {"id": 111, "type": "type_identifier", "text": "std", "parent": 110, "children": [], "start_point": {"row": 44, "column": 28}, "end_point": {"row": 44, "column": 31}}, {"id": 112, "type": "ERROR", "text": "::string &", "parent": 110, "children": [113], "start_point": {"row": 44, "column": 31}, "end_point": {"row": 44, "column": 41}}, {"id": 113, "type": "identifier", "text": "string", "parent": 112, "children": [], "start_point": {"row": 44, "column": 33}, "end_point": {"row": 44, "column": 39}}, {"id": 114, "type": "identifier", "text": "text", "parent": 110, "children": [], "start_point": {"row": 44, "column": 41}, "end_point": {"row": 44, "column": 45}}, {"id": 115, "type": "identifier", "text": "override", "parent": 107, "children": [], "start_point": {"row": 44, "column": 47}, "end_point": {"row": 44, "column": 55}}, {"id": 116, "type": "ERROR", "text": "bool ShouldQuit() override;\n void KeyBoardQuit() override;\n void DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset) override;\n void Terminate() override;\n void showWindow() override;\n void updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset) override;\n void destoryImgUI() override;\n\n void preFrame() override;\n void enableBlend(bool flag) const;\n\n Model *createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override;\n int getUniformLocation(unsigned int programId, const std::string &name) const;\n int getAttribLocation(unsigned int programId, const std::string &name) const;\n void setUniform(int index, const float *v, int type) const;\n void setTexture(const TextureGL &texture, int index, int unit) const;\n void setAttribs(const BufferGL &bufferGL, int index) const;\n void setIndices(const BufferGL &bufferGL) const;\n void drawElements(const BufferGL &buffer) const;\n\n Buffer *createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override;\n Buffer *createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override;\n unsigned int generateBuffer();\n void deleteBuffer(unsigned int buf);\n void bindBuffer(unsigned int target, unsigned int buf);\n void uploadBuffer(unsigned int target, const std::vector<float> &buf);\n void uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf);\n\n Program *createProgram(const std::string &mVId,\n const std::string &mFId) override;\n unsigned int generateProgram();\n void setProgram(unsigned int program);\n void deleteProgram(unsigned int program);\n bool compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode);\n void bindVAO(unsigned int vao) const;\n unsigned int generateVAO();\n void deleteVAO(unsigned int vao);\n\n Texture *createTexture(const std::string &name,\n const std::string &url) override;\n Texture *createTexture(const std::string &name,\n const std::vector<std::string> &urls) override;\n unsigned int generateTexture();\n void bindTexture(unsigned int target, unsigned int texture);\n void deleteTexture(unsigned int texture);\n void uploadTexture(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel);\n void setParameter(unsigned int target, unsigned int pname, int param);\n void generateMipmap(unsigned int target);\n void updateAllFishData() override;\n\nprotected:\n explicit ContextGL(BACKENDTYPE backendType);\n\nprivate:\n void initState();\n void initAvailableToggleBitset(BACKENDTYPE backendType) override;\n static void framebufferResizeCallback(GLFWwindow *window,\n int width,\n int height);\n\n GLFWwindow *mWindow;\n std::string mGLSLVersion;\n\n#ifdef EGL_EGL_PROTOTYPES\n EGLBoolean FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config);\n EGLContext createContext(EGLContext share) const;\n\n EGLSurface mSurface;\n EGLContext mContext;\n EGLDisplay mDisplay;\n EGLConfig mConfig;\n#endif", "parent": 52, "children": [117, 118, 121, 124, 130, 151, 162, 192, 203, 233, 307, 339, 364, 371, 381, 396, 414, 433, 451, 458, 468, 478, 498, 508, 515, 525, 543, 565, 572, 587, 597, 625, 643, 653, 667, 668, 673, 682, 698, 703, 708, 710, 730, 741, 744, 747, 750], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 136, "column": 6}}, {"id": 117, "type": "primitive_type", "text": "bool", "parent": 116, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 6}}, {"id": 118, "type": "function_declarator", "text": "ShouldQuit()", "parent": 116, "children": [119, 120], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 19}}, {"id": 119, "type": "identifier", "text": "ShouldQuit", "parent": 118, "children": [], "start_point": {"row": 45, "column": 7}, "end_point": {"row": 45, "column": 17}}, {"id": 120, "type": "parameter_list", "text": "()", "parent": 118, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 19}}, {"id": 121, "type": "declaration", "text": "override;", "parent": 116, "children": [122, 123], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 29}}, {"id": 122, "type": "type_identifier", "text": "override", "parent": 121, "children": [], "start_point": {"row": 45, "column": 20}, "end_point": {"row": 45, "column": 28}}, {"id": 123, "type": "identifier", "text": "", "parent": 121, "children": [], "start_point": {"row": 45, "column": 28}, "end_point": {"row": 45, "column": 28}}, {"id": 124, "type": "ERROR", "text": "void KeyBoardQuit() override;", "parent": 116, "children": [125, 126], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 31}}, {"id": 125, "type": "primitive_type", "text": "void", "parent": 124, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 6}}, {"id": 126, "type": "function_declarator", "text": "KeyBoardQuit() override", "parent": 124, "children": [127, 128, 129], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 30}}, {"id": 127, "type": "identifier", "text": "KeyBoardQuit", "parent": 126, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 19}}, {"id": 128, "type": "parameter_list", "text": "()", "parent": 126, "children": [], "start_point": {"row": 46, "column": 19}, "end_point": {"row": 46, "column": 21}}, {"id": 129, "type": "identifier", "text": "override", "parent": 126, "children": [], "start_point": {"row": 46, "column": 22}, "end_point": {"row": 46, "column": 30}}, {"id": 130, "type": "declaration", "text": "void DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset) override;", "parent": 116, "children": [131, 132, 150], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 48, "column": 43}}, {"id": 131, "type": "primitive_type", "text": "void", "parent": 130, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 6}}, {"id": 132, "type": "ERROR", "text": "DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset)", "parent": 130, "children": [133], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 48, "column": 33}}, {"id": 133, "type": "function_declarator", "text": "DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset", "parent": 132, "children": [134, 135, 147, 149], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 48, "column": 32}}, {"id": 134, "type": "identifier", "text": "DoFlush", "parent": 133, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 14}}, {"id": 135, "type": "parameter_list", "text": "(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)", "parent": 133, "children": [136], "start_point": {"row": 47, "column": 14}, "end_point": {"row": 47, "column": 71}}, {"id": 136, "type": "parameter_declaration", "text": "const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX", "parent": 135, "children": [137, 138, 146], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 70}}, {"id": 137, "type": "type_identifier", "text": "std", "parent": 136, "children": [], "start_point": {"row": 47, "column": 21}, "end_point": {"row": 47, "column": 24}}, {"id": 138, "type": "ERROR", "text": "::bitset<static_cast<size_t>(TOGGLE::", "parent": 136, "children": [139, 140, 141, 142, 143, 144, 145], "start_point": {"row": 47, "column": 24}, "end_point": {"row": 47, "column": 61}}, {"id": 139, "type": "identifier", "text": "bitset", "parent": 138, "children": [], "start_point": {"row": 47, "column": 26}, "end_point": {"row": 47, "column": 32}}, {"id": 140, "type": "<", "text": "<", "parent": 138, "children": [], "start_point": {"row": 47, "column": 32}, "end_point": {"row": 47, "column": 33}}, {"id": 141, "type": "identifier", "text": "static_cast", "parent": 138, "children": [], "start_point": {"row": 47, "column": 33}, "end_point": {"row": 47, "column": 44}}, {"id": 142, "type": "<", "text": "<", "parent": 138, "children": [], "start_point": {"row": 47, "column": 44}, "end_point": {"row": 47, "column": 45}}, {"id": 143, "type": "primitive_type", "text": "size_t", "parent": 138, "children": [], "start_point": {"row": 47, "column": 45}, "end_point": {"row": 47, "column": 51}}, {"id": 144, "type": ">", "text": ">", "parent": 138, "children": [], "start_point": {"row": 47, "column": 51}, "end_point": {"row": 47, "column": 52}}, {"id": 145, "type": "identifier", "text": "TOGGLE", "parent": 138, "children": [], "start_point": {"row": 47, "column": 53}, "end_point": {"row": 47, "column": 59}}, {"id": 146, "type": "identifier", "text": "TOGGLEMAX", "parent": 136, "children": [], "start_point": {"row": 47, "column": 61}, "end_point": {"row": 47, "column": 70}}, {"id": 147, "type": "ERROR", "text": ">\n &", "parent": 133, "children": [148], "start_point": {"row": 47, "column": 71}, "end_point": {"row": 48, "column": 20}}, {"id": 148, "type": ">", "text": ">", "parent": 147, "children": [], "start_point": {"row": 47, "column": 71}, "end_point": {"row": 47, "column": 72}}, {"id": 149, "type": "identifier", "text": "toggleBitset", "parent": 133, "children": [], "start_point": {"row": 48, "column": 20}, "end_point": {"row": 48, "column": 32}}, {"id": 150, "type": "identifier", "text": "override", "parent": 130, "children": [], "start_point": {"row": 48, "column": 34}, "end_point": {"row": 48, "column": 42}}, {"id": 151, "type": "ERROR", "text": "void Terminate() override;\n void showWindow() override;", "parent": 116, "children": [152, 153, 157, 158], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 50, "column": 29}}, {"id": 152, "type": "primitive_type", "text": "void", "parent": 151, "children": [], "start_point": {"row": 49, "column": 2}, "end_point": {"row": 49, "column": 6}}, {"id": 153, "type": "function_declarator", "text": "Terminate() override", "parent": 151, "children": [154, 155, 156], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 27}}, {"id": 154, "type": "identifier", "text": "Terminate", "parent": 153, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 16}}, {"id": 155, "type": "parameter_list", "text": "()", "parent": 153, "children": [], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 18}}, {"id": 156, "type": "identifier", "text": "override", "parent": 153, "children": [], "start_point": {"row": 49, "column": 19}, "end_point": {"row": 49, "column": 27}}, {"id": 157, "type": "primitive_type", "text": "void", "parent": 151, "children": [], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 6}}, {"id": 158, "type": "function_declarator", "text": "showWindow() override", "parent": 151, "children": [159, 160, 161], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 28}}, {"id": 159, "type": "identifier", "text": "showWindow", "parent": 158, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 17}}, {"id": 160, "type": "parameter_list", "text": "()", "parent": 158, "children": [], "start_point": {"row": 50, "column": 17}, "end_point": {"row": 50, "column": 19}}, {"id": 161, "type": "identifier", "text": "override", "parent": 158, "children": [], "start_point": {"row": 50, "column": 20}, "end_point": {"row": 50, "column": 28}}, {"id": 162, "type": "declaration", "text": "void updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset) override;", "parent": 116, "children": [163, 164, 191], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 54, "column": 45}}, {"id": 163, "type": "primitive_type", "text": "void", "parent": 162, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 6}}, {"id": 164, "type": "ERROR", "text": "updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset)", "parent": 162, "children": [165], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 54, "column": 35}}, {"id": 165, "type": "function_declarator", "text": "updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset", "parent": 164, "children": [166, 167, 187, 190], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 54, "column": 34}}, {"id": 166, "type": "identifier", "text": "updateFPS", "parent": 165, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 16}}, {"id": 167, "type": "parameter_list", "text": "(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)", "parent": 165, "children": [168, 171, 176], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 53, "column": 67}}, {"id": 168, "type": "parameter_declaration", "text": "const FPSTimer &fpsTimer", "parent": 167, "children": [169, 170], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 41}}, {"id": 169, "type": "type_identifier", "text": "FPSTimer", "parent": 168, "children": [], "start_point": {"row": 51, "column": 23}, "end_point": {"row": 51, "column": 31}}, {"id": 170, "type": "identifier", "text": "fpsTimer", "parent": 168, "children": [], "start_point": {"row": 51, "column": 33}, "end_point": {"row": 51, "column": 41}}, {"id": 171, "type": "parameter_declaration", "text": "int *fishCount", "parent": 167, "children": [172, 173], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 31}}, {"id": 172, "type": "primitive_type", "text": "int", "parent": 171, "children": [], "start_point": {"row": 52, "column": 17}, "end_point": {"row": 52, "column": 20}}, {"id": 173, "type": "pointer_declarator", "text": "*fishCount", "parent": 171, "children": [174, 175], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 31}}, {"id": 174, "type": "*", "text": "*", "parent": 173, "children": [], "start_point": {"row": 52, "column": 21}, "end_point": {"row": 52, "column": 22}}, {"id": 175, "type": "identifier", "text": "fishCount", "parent": 173, "children": [], "start_point": {"row": 52, "column": 22}, "end_point": {"row": 52, "column": 31}}, {"id": 176, "type": "parameter_declaration", "text": "std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX", "parent": 167, "children": [177, 178, 186], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 66}}, {"id": 177, "type": "type_identifier", "text": "std", "parent": 176, "children": [], "start_point": {"row": 53, "column": 17}, "end_point": {"row": 53, "column": 20}}, {"id": 178, "type": "ERROR", "text": "::bitset<static_cast<size_t>(TOGGLE::", "parent": 176, "children": [179, 180, 181, 182, 183, 184, 185], "start_point": {"row": 53, "column": 20}, "end_point": {"row": 53, "column": 57}}, {"id": 179, "type": "identifier", "text": "bitset", "parent": 178, "children": [], "start_point": {"row": 53, "column": 22}, "end_point": {"row": 53, "column": 28}}, {"id": 180, "type": "<", "text": "<", "parent": 178, "children": [], "start_point": {"row": 53, "column": 28}, "end_point": {"row": 53, "column": 29}}, {"id": 181, "type": "identifier", "text": "static_cast", "parent": 178, "children": [], "start_point": {"row": 53, "column": 29}, "end_point": {"row": 53, "column": 40}}, {"id": 182, "type": "<", "text": "<", "parent": 178, "children": [], "start_point": {"row": 53, "column": 40}, "end_point": {"row": 53, "column": 41}}, {"id": 183, "type": "primitive_type", "text": "size_t", "parent": 178, "children": [], "start_point": {"row": 53, "column": 41}, "end_point": {"row": 53, "column": 47}}, {"id": 184, "type": ">", "text": ">", "parent": 178, "children": [], "start_point": {"row": 53, "column": 47}, "end_point": {"row": 53, "column": 48}}, {"id": 185, "type": "identifier", "text": "TOGGLE", "parent": 178, "children": [], "start_point": {"row": 53, "column": 49}, "end_point": {"row": 53, "column": 55}}, {"id": 186, "type": "identifier", "text": "TOGGLEMAX", "parent": 176, "children": [], "start_point": {"row": 53, "column": 57}, "end_point": {"row": 53, "column": 66}}, {"id": 187, "type": "ERROR", "text": ">\n *", "parent": 165, "children": [188, 189], "start_point": {"row": 53, "column": 67}, "end_point": {"row": 54, "column": 22}}, {"id": 188, "type": ">", "text": ">", "parent": 187, "children": [], "start_point": {"row": 53, "column": 67}, "end_point": {"row": 53, "column": 68}}, {"id": 189, "type": "*", "text": "*", "parent": 187, "children": [], "start_point": {"row": 54, "column": 21}, "end_point": {"row": 54, "column": 22}}, {"id": 190, "type": "identifier", "text": "toggleBitset", "parent": 165, "children": [], "start_point": {"row": 54, "column": 22}, "end_point": {"row": 54, "column": 34}}, {"id": 191, "type": "identifier", "text": "override", "parent": 162, "children": [], "start_point": {"row": 54, "column": 36}, "end_point": {"row": 54, "column": 44}}, {"id": 192, "type": "ERROR", "text": "void destoryImgUI() override;\n\n void preFrame() override;", "parent": 116, "children": [193, 194, 198, 199], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 57, "column": 27}}, {"id": 193, "type": "primitive_type", "text": "void", "parent": 192, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 6}}, {"id": 194, "type": "function_declarator", "text": "destoryImgUI() override", "parent": 192, "children": [195, 196, 197], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 30}}, {"id": 195, "type": "identifier", "text": "destoryImgUI", "parent": 194, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 19}}, {"id": 196, "type": "parameter_list", "text": "()", "parent": 194, "children": [], "start_point": {"row": 55, "column": 19}, "end_point": {"row": 55, "column": 21}}, {"id": 197, "type": "identifier", "text": "override", "parent": 194, "children": [], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 30}}, {"id": 198, "type": "primitive_type", "text": "void", "parent": 192, "children": [], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 6}}, {"id": 199, "type": "function_declarator", "text": "preFrame() override", "parent": 192, "children": [200, 201, 202], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 26}}, {"id": 200, "type": "identifier", "text": "preFrame", "parent": 199, "children": [], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 15}}, {"id": 201, "type": "parameter_list", "text": "()", "parent": 199, "children": [], "start_point": {"row": 57, "column": 15}, "end_point": {"row": 57, "column": 17}}, {"id": 202, "type": "identifier", "text": "override", "parent": 199, "children": [], "start_point": {"row": 57, "column": 18}, "end_point": {"row": 57, "column": 26}}, {"id": 203, "type": "declaration", "text": "void enableBlend(bool flag) const;\n\n Model *createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override;", "parent": 116, "children": [204, 205, 213], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 63, "column": 42}}, {"id": 204, "type": "primitive_type", "text": "void", "parent": 203, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 6}}, {"id": 205, "type": "ERROR", "text": "enableBlend(bool flag) const;\n\n Model", "parent": 203, "children": [206, 212], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 60, "column": 7}}, {"id": 206, "type": "function_declarator", "text": "enableBlend(bool flag) const", "parent": 205, "children": [207, 208], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 35}}, {"id": 207, "type": "identifier", "text": "enableBlend", "parent": 206, "children": [], "start_point": {"row": 58, "column": 7}, "end_point": {"row": 58, "column": 18}}, {"id": 208, "type": "parameter_list", "text": "(bool flag)", "parent": 206, "children": [209], "start_point": {"row": 58, "column": 18}, "end_point": {"row": 58, "column": 29}}, {"id": 209, "type": "parameter_declaration", "text": "bool flag", "parent": 208, "children": [210, 211], "start_point": {"row": 58, "column": 19}, "end_point": {"row": 58, "column": 28}}, {"id": 210, "type": "primitive_type", "text": "bool", "parent": 209, "children": [], "start_point": {"row": 58, "column": 19}, "end_point": {"row": 58, "column": 23}}, {"id": 211, "type": "identifier", "text": "flag", "parent": 209, "children": [], "start_point": {"row": 58, "column": 24}, "end_point": {"row": 58, "column": 28}}, {"id": 212, "type": "identifier", "text": "Model", "parent": 205, "children": [], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 7}}, {"id": 213, "type": "pointer_declarator", "text": "*createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override", "parent": 203, "children": [214, 215], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 63, "column": 41}}, {"id": 214, "type": "*", "text": "*", "parent": 213, "children": [], "start_point": {"row": 60, "column": 8}, "end_point": {"row": 60, "column": 9}}, {"id": 215, "type": "function_declarator", "text": "createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override", "parent": 213, "children": [216, 217, 232], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 63, "column": 41}}, {"id": 216, "type": "identifier", "text": "createModel", "parent": 215, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 20}}, {"id": 217, "type": "parameter_list", "text": "(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend)", "parent": 215, "children": [218, 223, 226, 229], "start_point": {"row": 60, "column": 20}, "end_point": {"row": 63, "column": 32}}, {"id": 218, "type": "parameter_declaration", "text": "Aquarium *aquarium", "parent": 217, "children": [219, 220], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 39}}, {"id": 219, "type": "type_identifier", "text": "Aquarium", "parent": 218, "children": [], "start_point": {"row": 60, "column": 21}, "end_point": {"row": 60, "column": 29}}, {"id": 220, "type": "pointer_declarator", "text": "*aquarium", "parent": 218, "children": [221, 222], "start_point": {"row": 60, "column": 30}, "end_point": {"row": 60, "column": 39}}, {"id": 221, "type": "*", "text": "*", "parent": 220, "children": [], "start_point": {"row": 60, "column": 30}, "end_point": {"row": 60, "column": 31}}, {"id": 222, "type": "identifier", "text": "aquarium", "parent": 220, "children": [], "start_point": {"row": 60, "column": 31}, "end_point": {"row": 60, "column": 39}}, {"id": 223, "type": "parameter_declaration", "text": "MODELGROUP type", "parent": 217, "children": [224, 225], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 36}}, {"id": 224, "type": "type_identifier", "text": "MODELGROUP", "parent": 223, "children": [], "start_point": {"row": 61, "column": 21}, "end_point": {"row": 61, "column": 31}}, {"id": 225, "type": "identifier", "text": "type", "parent": 223, "children": [], "start_point": {"row": 61, "column": 32}, "end_point": {"row": 61, "column": 36}}, {"id": 226, "type": "parameter_declaration", "text": "MODELNAME name", "parent": 217, "children": [227, 228], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 35}}, {"id": 227, "type": "type_identifier", "text": "MODELNAME", "parent": 226, "children": [], "start_point": {"row": 62, "column": 21}, "end_point": {"row": 62, "column": 30}}, {"id": 228, "type": "identifier", "text": "name", "parent": 226, "children": [], "start_point": {"row": 62, "column": 31}, "end_point": {"row": 62, "column": 35}}, {"id": 229, "type": "parameter_declaration", "text": "bool blend", "parent": 217, "children": [230, 231], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 31}}, {"id": 230, "type": "primitive_type", "text": "bool", "parent": 229, "children": [], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 25}}, {"id": 231, "type": "identifier", "text": "blend", "parent": 229, "children": [], "start_point": {"row": 63, "column": 26}, "end_point": {"row": 63, "column": 31}}, {"id": 232, "type": "identifier", "text": "override", "parent": 215, "children": [], "start_point": {"row": 63, "column": 33}, "end_point": {"row": 63, "column": 41}}, {"id": 233, "type": "ERROR", "text": "int getUniformLocation(unsigned int programId, const std::string &name) const;\n int getAttribLocation(unsigned int programId, const std::string &name) const;\n void setUniform(int index, const float *v, int type) const;\n void setTexture(const TextureGL &texture, int index, int unit) const;\n void setAttribs(const BufferGL &bufferGL, int index) const;\n void setIndices(const BufferGL &bufferGL) const;", "parent": 116, "children": [234, 235, 248, 249, 262, 263, 277, 278, 290, 291, 300, 301], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 69, "column": 50}}, {"id": 234, "type": "primitive_type", "text": "int", "parent": 233, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 5}}, {"id": 235, "type": "function_declarator", "text": "getUniformLocation(unsigned int programId, const std::string &name) const", "parent": 233, "children": [236, 237], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 79}}, {"id": 236, "type": "identifier", "text": "getUniformLocation", "parent": 235, "children": [], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 24}}, {"id": 237, "type": "parameter_list", "text": "(unsigned int programId, const std::string &name)", "parent": 235, "children": [238, 243], "start_point": {"row": 64, "column": 24}, "end_point": {"row": 64, "column": 73}}, {"id": 238, "type": "parameter_declaration", "text": "unsigned int programId", "parent": 237, "children": [239, 242], "start_point": {"row": 64, "column": 25}, "end_point": {"row": 64, "column": 47}}, {"id": 239, "type": "sized_type_specifier", "text": "unsigned int", "parent": 238, "children": [240, 241], "start_point": {"row": 64, "column": 25}, "end_point": {"row": 64, "column": 37}}, {"id": 240, "type": "unsigned", "text": "unsigned", "parent": 239, "children": [], "start_point": {"row": 64, "column": 25}, "end_point": {"row": 64, "column": 33}}, {"id": 241, "type": "primitive_type", "text": "int", "parent": 239, "children": [], "start_point": {"row": 64, "column": 34}, "end_point": {"row": 64, "column": 37}}, {"id": 242, "type": "identifier", "text": "programId", "parent": 238, "children": [], "start_point": {"row": 64, "column": 38}, "end_point": {"row": 64, "column": 47}}, {"id": 243, "type": "parameter_declaration", "text": "const std::string &name", "parent": 237, "children": [244, 245, 247], "start_point": {"row": 64, "column": 49}, "end_point": {"row": 64, "column": 72}}, {"id": 244, "type": "type_identifier", "text": "std", "parent": 243, "children": [], "start_point": {"row": 64, "column": 55}, "end_point": {"row": 64, "column": 58}}, {"id": 245, "type": "ERROR", "text": "::string &", "parent": 243, "children": [246], "start_point": {"row": 64, "column": 58}, "end_point": {"row": 64, "column": 68}}, {"id": 246, "type": "identifier", "text": "string", "parent": 245, "children": [], "start_point": {"row": 64, "column": 60}, "end_point": {"row": 64, "column": 66}}, {"id": 247, "type": "identifier", "text": "name", "parent": 243, "children": [], "start_point": {"row": 64, "column": 68}, "end_point": {"row": 64, "column": 72}}, {"id": 248, "type": "primitive_type", "text": "int", "parent": 233, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 5}}, {"id": 249, "type": "function_declarator", "text": "getAttribLocation(unsigned int programId, const std::string &name) const", "parent": 233, "children": [250, 251], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 78}}, {"id": 250, "type": "identifier", "text": "getAttribLocation", "parent": 249, "children": [], "start_point": {"row": 65, "column": 6}, "end_point": {"row": 65, "column": 23}}, {"id": 251, "type": "parameter_list", "text": "(unsigned int programId, const std::string &name)", "parent": 249, "children": [252, 257], "start_point": {"row": 65, "column": 23}, "end_point": {"row": 65, "column": 72}}, {"id": 252, "type": "parameter_declaration", "text": "unsigned int programId", "parent": 251, "children": [253, 256], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 46}}, {"id": 253, "type": "sized_type_specifier", "text": "unsigned int", "parent": 252, "children": [254, 255], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 36}}, {"id": 254, "type": "unsigned", "text": "unsigned", "parent": 253, "children": [], "start_point": {"row": 65, "column": 24}, "end_point": {"row": 65, "column": 32}}, {"id": 255, "type": "primitive_type", "text": "int", "parent": 253, "children": [], "start_point": {"row": 65, "column": 33}, "end_point": {"row": 65, "column": 36}}, {"id": 256, "type": "identifier", "text": "programId", "parent": 252, "children": [], "start_point": {"row": 65, "column": 37}, "end_point": {"row": 65, "column": 46}}, {"id": 257, "type": "parameter_declaration", "text": "const std::string &name", "parent": 251, "children": [258, 259, 261], "start_point": {"row": 65, "column": 48}, "end_point": {"row": 65, "column": 71}}, {"id": 258, "type": "type_identifier", "text": "std", "parent": 257, "children": [], "start_point": {"row": 65, "column": 54}, "end_point": {"row": 65, "column": 57}}, {"id": 259, "type": "ERROR", "text": "::string &", "parent": 257, "children": [260], "start_point": {"row": 65, "column": 57}, "end_point": {"row": 65, "column": 67}}, {"id": 260, "type": "identifier", "text": "string", "parent": 259, "children": [], "start_point": {"row": 65, "column": 59}, "end_point": {"row": 65, "column": 65}}, {"id": 261, "type": "identifier", "text": "name", "parent": 257, "children": [], "start_point": {"row": 65, "column": 67}, "end_point": {"row": 65, "column": 71}}, {"id": 262, "type": "primitive_type", "text": "void", "parent": 233, "children": [], "start_point": {"row": 66, "column": 2}, "end_point": {"row": 66, "column": 6}}, {"id": 263, "type": "function_declarator", "text": "setUniform(int index, const float *v, int type) const", "parent": 233, "children": [264, 265], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 60}}, {"id": 264, "type": "identifier", "text": "setUniform", "parent": 263, "children": [], "start_point": {"row": 66, "column": 7}, "end_point": {"row": 66, "column": 17}}, {"id": 265, "type": "parameter_list", "text": "(int index, const float *v, int type)", "parent": 263, "children": [266, 269, 274], "start_point": {"row": 66, "column": 17}, "end_point": {"row": 66, "column": 54}}, {"id": 266, "type": "parameter_declaration", "text": "int index", "parent": 265, "children": [267, 268], "start_point": {"row": 66, "column": 18}, "end_point": {"row": 66, "column": 27}}, {"id": 267, "type": "primitive_type", "text": "int", "parent": 266, "children": [], "start_point": {"row": 66, "column": 18}, "end_point": {"row": 66, "column": 21}}, {"id": 268, "type": "identifier", "text": "index", "parent": 266, "children": [], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 27}}, {"id": 269, "type": "parameter_declaration", "text": "const float *v", "parent": 265, "children": [270, 271], "start_point": {"row": 66, "column": 29}, "end_point": {"row": 66, "column": 43}}, {"id": 270, "type": "primitive_type", "text": "float", "parent": 269, "children": [], "start_point": {"row": 66, "column": 35}, "end_point": {"row": 66, "column": 40}}, {"id": 271, "type": "pointer_declarator", "text": "*v", "parent": 269, "children": [272, 273], "start_point": {"row": 66, "column": 41}, "end_point": {"row": 66, "column": 43}}, {"id": 272, "type": "*", "text": "*", "parent": 271, "children": [], "start_point": {"row": 66, "column": 41}, "end_point": {"row": 66, "column": 42}}, {"id": 273, "type": "identifier", "text": "v", "parent": 271, "children": [], "start_point": {"row": 66, "column": 42}, "end_point": {"row": 66, "column": 43}}, {"id": 274, "type": "parameter_declaration", "text": "int type", "parent": 265, "children": [275, 276], "start_point": {"row": 66, "column": 45}, "end_point": {"row": 66, "column": 53}}, {"id": 275, "type": "primitive_type", "text": "int", "parent": 274, "children": [], "start_point": {"row": 66, "column": 45}, "end_point": {"row": 66, "column": 48}}, {"id": 276, "type": "identifier", "text": "type", "parent": 274, "children": [], "start_point": {"row": 66, "column": 49}, "end_point": {"row": 66, "column": 53}}, {"id": 277, "type": "primitive_type", "text": "void", "parent": 233, "children": [], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 6}}, {"id": 278, "type": "function_declarator", "text": "setTexture(const TextureGL &texture, int index, int unit) const", "parent": 233, "children": [279, 280], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 70}}, {"id": 279, "type": "identifier", "text": "setTexture", "parent": 278, "children": [], "start_point": {"row": 67, "column": 7}, "end_point": {"row": 67, "column": 17}}, {"id": 280, "type": "parameter_list", "text": "(const TextureGL &texture, int index, int unit)", "parent": 278, "children": [281, 284, 287], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 64}}, {"id": 281, "type": "parameter_declaration", "text": "const TextureGL &texture", "parent": 280, "children": [282, 283], "start_point": {"row": 67, "column": 18}, "end_point": {"row": 67, "column": 42}}, {"id": 282, "type": "type_identifier", "text": "TextureGL", "parent": 281, "children": [], "start_point": {"row": 67, "column": 24}, "end_point": {"row": 67, "column": 33}}, {"id": 283, "type": "identifier", "text": "texture", "parent": 281, "children": [], "start_point": {"row": 67, "column": 35}, "end_point": {"row": 67, "column": 42}}, {"id": 284, "type": "parameter_declaration", "text": "int index", "parent": 280, "children": [285, 286], "start_point": {"row": 67, "column": 44}, "end_point": {"row": 67, "column": 53}}, {"id": 285, "type": "primitive_type", "text": "int", "parent": 284, "children": [], "start_point": {"row": 67, "column": 44}, "end_point": {"row": 67, "column": 47}}, {"id": 286, "type": "identifier", "text": "index", "parent": 284, "children": [], "start_point": {"row": 67, "column": 48}, "end_point": {"row": 67, "column": 53}}, {"id": 287, "type": "parameter_declaration", "text": "int unit", "parent": 280, "children": [288, 289], "start_point": {"row": 67, "column": 55}, "end_point": {"row": 67, "column": 63}}, {"id": 288, "type": "primitive_type", "text": "int", "parent": 287, "children": [], "start_point": {"row": 67, "column": 55}, "end_point": {"row": 67, "column": 58}}, {"id": 289, "type": "identifier", "text": "unit", "parent": 287, "children": [], "start_point": {"row": 67, "column": 59}, "end_point": {"row": 67, "column": 63}}, {"id": 290, "type": "primitive_type", "text": "void", "parent": 233, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 6}}, {"id": 291, "type": "function_declarator", "text": "setAttribs(const BufferGL &bufferGL, int index) const", "parent": 233, "children": [292, 293], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 60}}, {"id": 292, "type": "identifier", "text": "setAttribs", "parent": 291, "children": [], "start_point": {"row": 68, "column": 7}, "end_point": {"row": 68, "column": 17}}, {"id": 293, "type": "parameter_list", "text": "(const BufferGL &bufferGL, int index)", "parent": 291, "children": [294, 297], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 54}}, {"id": 294, "type": "parameter_declaration", "text": "const BufferGL &bufferGL", "parent": 293, "children": [295, 296], "start_point": {"row": 68, "column": 18}, "end_point": {"row": 68, "column": 42}}, {"id": 295, "type": "type_identifier", "text": "BufferGL", "parent": 294, "children": [], "start_point": {"row": 68, "column": 24}, "end_point": {"row": 68, "column": 32}}, {"id": 296, "type": "identifier", "text": "bufferGL", "parent": 294, "children": [], "start_point": {"row": 68, "column": 34}, "end_point": {"row": 68, "column": 42}}, {"id": 297, "type": "parameter_declaration", "text": "int index", "parent": 293, "children": [298, 299], "start_point": {"row": 68, "column": 44}, "end_point": {"row": 68, "column": 53}}, {"id": 298, "type": "primitive_type", "text": "int", "parent": 297, "children": [], "start_point": {"row": 68, "column": 44}, "end_point": {"row": 68, "column": 47}}, {"id": 299, "type": "identifier", "text": "index", "parent": 297, "children": [], "start_point": {"row": 68, "column": 48}, "end_point": {"row": 68, "column": 53}}, {"id": 300, "type": "primitive_type", "text": "void", "parent": 233, "children": [], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 6}}, {"id": 301, "type": "function_declarator", "text": "setIndices(const BufferGL &bufferGL) const", "parent": 233, "children": [302, 303], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 49}}, {"id": 302, "type": "identifier", "text": "setIndices", "parent": 301, "children": [], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 17}}, {"id": 303, "type": "parameter_list", "text": "(const BufferGL &bufferGL)", "parent": 301, "children": [304], "start_point": {"row": 69, "column": 17}, "end_point": {"row": 69, "column": 43}}, {"id": 304, "type": "parameter_declaration", "text": "const BufferGL &bufferGL", "parent": 303, "children": [305, 306], "start_point": {"row": 69, "column": 18}, "end_point": {"row": 69, "column": 42}}, {"id": 305, "type": "type_identifier", "text": "BufferGL", "parent": 304, "children": [], "start_point": {"row": 69, "column": 24}, "end_point": {"row": 69, "column": 32}}, {"id": 306, "type": "identifier", "text": "bufferGL", "parent": 304, "children": [], "start_point": {"row": 69, "column": 34}, "end_point": {"row": 69, "column": 42}}, {"id": 307, "type": "declaration", "text": "void drawElements(const BufferGL &buffer) const;\n\n Buffer *createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override;", "parent": 116, "children": [308, 309, 317], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 74, "column": 46}}, {"id": 308, "type": "primitive_type", "text": "void", "parent": 307, "children": [], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 6}}, {"id": 309, "type": "ERROR", "text": "drawElements(const BufferGL &buffer) const;\n\n Buffer", "parent": 307, "children": [310, 316], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 72, "column": 8}}, {"id": 310, "type": "function_declarator", "text": "drawElements(const BufferGL &buffer) const", "parent": 309, "children": [311, 312], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 49}}, {"id": 311, "type": "identifier", "text": "drawElements", "parent": 310, "children": [], "start_point": {"row": 70, "column": 7}, "end_point": {"row": 70, "column": 19}}, {"id": 312, "type": "parameter_list", "text": "(const BufferGL &buffer)", "parent": 310, "children": [313], "start_point": {"row": 70, "column": 19}, "end_point": {"row": 70, "column": 43}}, {"id": 313, "type": "parameter_declaration", "text": "const BufferGL &buffer", "parent": 312, "children": [314, 315], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 42}}, {"id": 314, "type": "type_identifier", "text": "BufferGL", "parent": 313, "children": [], "start_point": {"row": 70, "column": 26}, "end_point": {"row": 70, "column": 34}}, {"id": 315, "type": "identifier", "text": "buffer", "parent": 313, "children": [], "start_point": {"row": 70, "column": 36}, "end_point": {"row": 70, "column": 42}}, {"id": 316, "type": "identifier", "text": "Buffer", "parent": 309, "children": [], "start_point": {"row": 72, "column": 2}, "end_point": {"row": 72, "column": 8}}, {"id": 317, "type": "pointer_declarator", "text": "*createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override", "parent": 307, "children": [318, 319], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 74, "column": 45}}, {"id": 318, "type": "*", "text": "*", "parent": 317, "children": [], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 10}}, {"id": 319, "type": "function_declarator", "text": "createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override", "parent": 317, "children": [320, 321, 338], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 74, "column": 45}}, {"id": 320, "type": "identifier", "text": "createBuffer", "parent": 319, "children": [], "start_point": {"row": 72, "column": 10}, "end_point": {"row": 72, "column": 22}}, {"id": 321, "type": "parameter_list", "text": "(int numComponents,\n std::vector<float> *buffer,\n bool isIndex)", "parent": 319, "children": [322, 325, 335], "start_point": {"row": 72, "column": 22}, "end_point": {"row": 74, "column": 36}}, {"id": 322, "type": "parameter_declaration", "text": "int numComponents", "parent": 321, "children": [323, 324], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 40}}, {"id": 323, "type": "primitive_type", "text": "int", "parent": 322, "children": [], "start_point": {"row": 72, "column": 23}, "end_point": {"row": 72, "column": 26}}, {"id": 324, "type": "identifier", "text": "numComponents", "parent": 322, "children": [], "start_point": {"row": 72, "column": 27}, "end_point": {"row": 72, "column": 40}}, {"id": 325, "type": "parameter_declaration", "text": "std::vector<float> *buffer", "parent": 321, "children": [326, 327, 332], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 49}}, {"id": 326, "type": "type_identifier", "text": "std", "parent": 325, "children": [], "start_point": {"row": 73, "column": 23}, "end_point": {"row": 73, "column": 26}}, {"id": 327, "type": "ERROR", "text": "::vector<float>", "parent": 325, "children": [328, 329, 330, 331], "start_point": {"row": 73, "column": 26}, "end_point": {"row": 73, "column": 41}}, {"id": 328, "type": "identifier", "text": "vector", "parent": 327, "children": [], "start_point": {"row": 73, "column": 28}, "end_point": {"row": 73, "column": 34}}, {"id": 329, "type": "<", "text": "<", "parent": 327, "children": [], "start_point": {"row": 73, "column": 34}, "end_point": {"row": 73, "column": 35}}, {"id": 330, "type": "primitive_type", "text": "float", "parent": 327, "children": [], "start_point": {"row": 73, "column": 35}, "end_point": {"row": 73, "column": 40}}, {"id": 331, "type": ">", "text": ">", "parent": 327, "children": [], "start_point": {"row": 73, "column": 40}, "end_point": {"row": 73, "column": 41}}, {"id": 332, "type": "pointer_declarator", "text": "*buffer", "parent": 325, "children": [333, 334], "start_point": {"row": 73, "column": 42}, "end_point": {"row": 73, "column": 49}}, {"id": 333, "type": "*", "text": "*", "parent": 332, "children": [], "start_point": {"row": 73, "column": 42}, "end_point": {"row": 73, "column": 43}}, {"id": 334, "type": "identifier", "text": "buffer", "parent": 332, "children": [], "start_point": {"row": 73, "column": 43}, "end_point": {"row": 73, "column": 49}}, {"id": 335, "type": "parameter_declaration", "text": "bool isIndex", "parent": 321, "children": [336, 337], "start_point": {"row": 74, "column": 23}, "end_point": {"row": 74, "column": 35}}, {"id": 336, "type": "primitive_type", "text": "bool", "parent": 335, "children": [], "start_point": {"row": 74, "column": 23}, "end_point": {"row": 74, "column": 27}}, {"id": 337, "type": "identifier", "text": "isIndex", "parent": 335, "children": [], "start_point": {"row": 74, "column": 28}, "end_point": {"row": 74, "column": 35}}, {"id": 338, "type": "identifier", "text": "override", "parent": 319, "children": [], "start_point": {"row": 74, "column": 37}, "end_point": {"row": 74, "column": 45}}, {"id": 339, "type": "declaration", "text": "Buffer *createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override;", "parent": 116, "children": [340, 341], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 77, "column": 46}}, {"id": 340, "type": "type_identifier", "text": "Buffer", "parent": 339, "children": [], "start_point": {"row": 75, "column": 2}, "end_point": {"row": 75, "column": 8}}, {"id": 341, "type": "pointer_declarator", "text": "*createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override", "parent": 339, "children": [342, 343], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 77, "column": 45}}, {"id": 342, "type": "*", "text": "*", "parent": 341, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 10}}, {"id": 343, "type": "function_declarator", "text": "createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override", "parent": 341, "children": [344, 345, 363], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 77, "column": 45}}, {"id": 344, "type": "identifier", "text": "createBuffer", "parent": 343, "children": [], "start_point": {"row": 75, "column": 10}, "end_point": {"row": 75, "column": 22}}, {"id": 345, "type": "parameter_list", "text": "(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex)", "parent": 343, "children": [346, 349, 360], "start_point": {"row": 75, "column": 22}, "end_point": {"row": 77, "column": 36}}, {"id": 346, "type": "parameter_declaration", "text": "int numComponents", "parent": 345, "children": [347, 348], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 40}}, {"id": 347, "type": "primitive_type", "text": "int", "parent": 346, "children": [], "start_point": {"row": 75, "column": 23}, "end_point": {"row": 75, "column": 26}}, {"id": 348, "type": "identifier", "text": "numComponents", "parent": 346, "children": [], "start_point": {"row": 75, "column": 27}, "end_point": {"row": 75, "column": 40}}, {"id": 349, "type": "parameter_declaration", "text": "std::vector<unsigned short> *buffer", "parent": 345, "children": [350, 351, 357], "start_point": {"row": 76, "column": 23}, "end_point": {"row": 76, "column": 58}}, {"id": 350, "type": "type_identifier", "text": "std", "parent": 349, "children": [], "start_point": {"row": 76, "column": 23}, "end_point": {"row": 76, "column": 26}}, {"id": 351, "type": "ERROR", "text": "::vector<unsigned short>", "parent": 349, "children": [352, 353, 354, 355, 356], "start_point": {"row": 76, "column": 26}, "end_point": {"row": 76, "column": 50}}, {"id": 352, "type": "identifier", "text": "vector", "parent": 351, "children": [], "start_point": {"row": 76, "column": 28}, "end_point": {"row": 76, "column": 34}}, {"id": 353, "type": "<", "text": "<", "parent": 351, "children": [], "start_point": {"row": 76, "column": 34}, "end_point": {"row": 76, "column": 35}}, {"id": 354, "type": "unsigned", "text": "unsigned", "parent": 351, "children": [], "start_point": {"row": 76, "column": 35}, "end_point": {"row": 76, "column": 43}}, {"id": 355, "type": "short", "text": "short", "parent": 351, "children": [], "start_point": {"row": 76, "column": 44}, "end_point": {"row": 76, "column": 49}}, {"id": 356, "type": ">", "text": ">", "parent": 351, "children": [], "start_point": {"row": 76, "column": 49}, "end_point": {"row": 76, "column": 50}}, {"id": 357, "type": "pointer_declarator", "text": "*buffer", "parent": 349, "children": [358, 359], "start_point": {"row": 76, "column": 51}, "end_point": {"row": 76, "column": 58}}, {"id": 358, "type": "*", "text": "*", "parent": 357, "children": [], "start_point": {"row": 76, "column": 51}, "end_point": {"row": 76, "column": 52}}, {"id": 359, "type": "identifier", "text": "buffer", "parent": 357, "children": [], "start_point": {"row": 76, "column": 52}, "end_point": {"row": 76, "column": 58}}, {"id": 360, "type": "parameter_declaration", "text": "bool isIndex", "parent": 345, "children": [361, 362], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 35}}, {"id": 361, "type": "primitive_type", "text": "bool", "parent": 360, "children": [], "start_point": {"row": 77, "column": 23}, "end_point": {"row": 77, "column": 27}}, {"id": 362, "type": "identifier", "text": "isIndex", "parent": 360, "children": [], "start_point": {"row": 77, "column": 28}, "end_point": {"row": 77, "column": 35}}, {"id": 363, "type": "identifier", "text": "override", "parent": 343, "children": [], "start_point": {"row": 77, "column": 37}, "end_point": {"row": 77, "column": 45}}, {"id": 364, "type": "declaration", "text": "unsigned int generateBuffer();", "parent": 116, "children": [365, 368], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 32}}, {"id": 365, "type": "sized_type_specifier", "text": "unsigned int", "parent": 364, "children": [366, 367], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 14}}, {"id": 366, "type": "unsigned", "text": "unsigned", "parent": 365, "children": [], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 10}}, {"id": 367, "type": "primitive_type", "text": "int", "parent": 365, "children": [], "start_point": {"row": 78, "column": 11}, "end_point": {"row": 78, "column": 14}}, {"id": 368, "type": "function_declarator", "text": "generateBuffer()", "parent": 364, "children": [369, 370], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 31}}, {"id": 369, "type": "identifier", "text": "generateBuffer", "parent": 368, "children": [], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 78, "column": 29}}, {"id": 370, "type": "parameter_list", "text": "()", "parent": 368, "children": [], "start_point": {"row": 78, "column": 29}, "end_point": {"row": 78, "column": 31}}, {"id": 371, "type": "declaration", "text": "void deleteBuffer(unsigned int buf);", "parent": 116, "children": [372, 373], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 38}}, {"id": 372, "type": "primitive_type", "text": "void", "parent": 371, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 6}}, {"id": 373, "type": "function_declarator", "text": "deleteBuffer(unsigned int buf)", "parent": 371, "children": [374, 375], "start_point": {"row": 79, "column": 7}, "end_point": {"row": 79, "column": 37}}, {"id": 374, "type": "identifier", "text": "deleteBuffer", "parent": 373, "children": [], "start_point": {"row": 79, "column": 7}, "end_point": {"row": 79, "column": 19}}, {"id": 375, "type": "parameter_list", "text": "(unsigned int buf)", "parent": 373, "children": [376], "start_point": {"row": 79, "column": 19}, "end_point": {"row": 79, "column": 37}}, {"id": 376, "type": "parameter_declaration", "text": "unsigned int buf", "parent": 375, "children": [377, 380], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 36}}, {"id": 377, "type": "sized_type_specifier", "text": "unsigned int", "parent": 376, "children": [378, 379], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 32}}, {"id": 378, "type": "unsigned", "text": "unsigned", "parent": 377, "children": [], "start_point": {"row": 79, "column": 20}, "end_point": {"row": 79, "column": 28}}, {"id": 379, "type": "primitive_type", "text": "int", "parent": 377, "children": [], "start_point": {"row": 79, "column": 29}, "end_point": {"row": 79, "column": 32}}, {"id": 380, "type": "identifier", "text": "buf", "parent": 376, "children": [], "start_point": {"row": 79, "column": 33}, "end_point": {"row": 79, "column": 36}}, {"id": 381, "type": "declaration", "text": "void bindBuffer(unsigned int target, unsigned int buf);", "parent": 116, "children": [382, 383], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 57}}, {"id": 382, "type": "primitive_type", "text": "void", "parent": 381, "children": [], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 6}}, {"id": 383, "type": "function_declarator", "text": "bindBuffer(unsigned int target, unsigned int buf)", "parent": 381, "children": [384, 385], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 56}}, {"id": 384, "type": "identifier", "text": "bindBuffer", "parent": 383, "children": [], "start_point": {"row": 80, "column": 7}, "end_point": {"row": 80, "column": 17}}, {"id": 385, "type": "parameter_list", "text": "(unsigned int target, unsigned int buf)", "parent": 383, "children": [386, 391], "start_point": {"row": 80, "column": 17}, "end_point": {"row": 80, "column": 56}}, {"id": 386, "type": "parameter_declaration", "text": "unsigned int target", "parent": 385, "children": [387, 390], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 37}}, {"id": 387, "type": "sized_type_specifier", "text": "unsigned int", "parent": 386, "children": [388, 389], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 30}}, {"id": 388, "type": "unsigned", "text": "unsigned", "parent": 387, "children": [], "start_point": {"row": 80, "column": 18}, "end_point": {"row": 80, "column": 26}}, {"id": 389, "type": "primitive_type", "text": "int", "parent": 387, "children": [], "start_point": {"row": 80, "column": 27}, "end_point": {"row": 80, "column": 30}}, {"id": 390, "type": "identifier", "text": "target", "parent": 386, "children": [], "start_point": {"row": 80, "column": 31}, "end_point": {"row": 80, "column": 37}}, {"id": 391, "type": "parameter_declaration", "text": "unsigned int buf", "parent": 385, "children": [392, 395], "start_point": {"row": 80, "column": 39}, "end_point": {"row": 80, "column": 55}}, {"id": 392, "type": "sized_type_specifier", "text": "unsigned int", "parent": 391, "children": [393, 394], "start_point": {"row": 80, "column": 39}, "end_point": {"row": 80, "column": 51}}, {"id": 393, "type": "unsigned", "text": "unsigned", "parent": 392, "children": [], "start_point": {"row": 80, "column": 39}, "end_point": {"row": 80, "column": 47}}, {"id": 394, "type": "primitive_type", "text": "int", "parent": 392, "children": [], "start_point": {"row": 80, "column": 48}, "end_point": {"row": 80, "column": 51}}, {"id": 395, "type": "identifier", "text": "buf", "parent": 391, "children": [], "start_point": {"row": 80, "column": 52}, "end_point": {"row": 80, "column": 55}}, {"id": 396, "type": "declaration", "text": "void uploadBuffer(unsigned int target, const std::vector<float> &buf);", "parent": 116, "children": [397, 398], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 72}}, {"id": 397, "type": "primitive_type", "text": "void", "parent": 396, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 6}}, {"id": 398, "type": "function_declarator", "text": "uploadBuffer(unsigned int target, const std::vector<float> &buf)", "parent": 396, "children": [399, 400], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 71}}, {"id": 399, "type": "identifier", "text": "uploadBuffer", "parent": 398, "children": [], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 19}}, {"id": 400, "type": "parameter_list", "text": "(unsigned int target, const std::vector<float> &buf)", "parent": 398, "children": [401, 406], "start_point": {"row": 81, "column": 19}, "end_point": {"row": 81, "column": 71}}, {"id": 401, "type": "parameter_declaration", "text": "unsigned int target", "parent": 400, "children": [402, 405], "start_point": {"row": 81, "column": 20}, "end_point": {"row": 81, "column": 39}}, {"id": 402, "type": "sized_type_specifier", "text": "unsigned int", "parent": 401, "children": [403, 404], "start_point": {"row": 81, "column": 20}, "end_point": {"row": 81, "column": 32}}, {"id": 403, "type": "unsigned", "text": "unsigned", "parent": 402, "children": [], "start_point": {"row": 81, "column": 20}, "end_point": {"row": 81, "column": 28}}, {"id": 404, "type": "primitive_type", "text": "int", "parent": 402, "children": [], "start_point": {"row": 81, "column": 29}, "end_point": {"row": 81, "column": 32}}, {"id": 405, "type": "identifier", "text": "target", "parent": 401, "children": [], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 39}}, {"id": 406, "type": "parameter_declaration", "text": "const std::vector<float> &buf", "parent": 400, "children": [407, 408, 413], "start_point": {"row": 81, "column": 41}, "end_point": {"row": 81, "column": 70}}, {"id": 407, "type": "type_identifier", "text": "std", "parent": 406, "children": [], "start_point": {"row": 81, "column": 47}, "end_point": {"row": 81, "column": 50}}, {"id": 408, "type": "ERROR", "text": "::vector<float> &", "parent": 406, "children": [409, 410, 411, 412], "start_point": {"row": 81, "column": 50}, "end_point": {"row": 81, "column": 67}}, {"id": 409, "type": "identifier", "text": "vector", "parent": 408, "children": [], "start_point": {"row": 81, "column": 52}, "end_point": {"row": 81, "column": 58}}, {"id": 410, "type": "<", "text": "<", "parent": 408, "children": [], "start_point": {"row": 81, "column": 58}, "end_point": {"row": 81, "column": 59}}, {"id": 411, "type": "primitive_type", "text": "float", "parent": 408, "children": [], "start_point": {"row": 81, "column": 59}, "end_point": {"row": 81, "column": 64}}, {"id": 412, "type": ">", "text": ">", "parent": 408, "children": [], "start_point": {"row": 81, "column": 64}, "end_point": {"row": 81, "column": 65}}, {"id": 413, "type": "identifier", "text": "buf", "parent": 406, "children": [], "start_point": {"row": 81, "column": 67}, "end_point": {"row": 81, "column": 70}}, {"id": 414, "type": "declaration", "text": "void uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf);", "parent": 116, "children": [415, 416], "start_point": {"row": 82, "column": 2}, "end_point": {"row": 83, "column": 60}}, {"id": 415, "type": "primitive_type", "text": "void", "parent": 414, "children": [], "start_point": {"row": 82, "column": 2}, "end_point": {"row": 82, "column": 6}}, {"id": 416, "type": "function_declarator", "text": "uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf)", "parent": 414, "children": [417, 418], "start_point": {"row": 82, "column": 7}, "end_point": {"row": 83, "column": 59}}, {"id": 417, "type": "identifier", "text": "uploadBuffer", "parent": 416, "children": [], "start_point": {"row": 82, "column": 7}, "end_point": {"row": 82, "column": 19}}, {"id": 418, "type": "parameter_list", "text": "(unsigned int target,\n const std::vector<unsigned short> &buf)", "parent": 416, "children": [419, 424], "start_point": {"row": 82, "column": 19}, "end_point": {"row": 83, "column": 59}}, {"id": 419, "type": "parameter_declaration", "text": "unsigned int target", "parent": 418, "children": [420, 423], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 39}}, {"id": 420, "type": "sized_type_specifier", "text": "unsigned int", "parent": 419, "children": [421, 422], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 32}}, {"id": 421, "type": "unsigned", "text": "unsigned", "parent": 420, "children": [], "start_point": {"row": 82, "column": 20}, "end_point": {"row": 82, "column": 28}}, {"id": 422, "type": "primitive_type", "text": "int", "parent": 420, "children": [], "start_point": {"row": 82, "column": 29}, "end_point": {"row": 82, "column": 32}}, {"id": 423, "type": "identifier", "text": "target", "parent": 419, "children": [], "start_point": {"row": 82, "column": 33}, "end_point": {"row": 82, "column": 39}}, {"id": 424, "type": "parameter_declaration", "text": "const std::vector<unsigned short> &buf", "parent": 418, "children": [425, 426, 432], "start_point": {"row": 83, "column": 20}, "end_point": {"row": 83, "column": 58}}, {"id": 425, "type": "type_identifier", "text": "std", "parent": 424, "children": [], "start_point": {"row": 83, "column": 26}, "end_point": {"row": 83, "column": 29}}, {"id": 426, "type": "ERROR", "text": "::vector<unsigned short> &", "parent": 424, "children": [427, 428, 429, 430, 431], "start_point": {"row": 83, "column": 29}, "end_point": {"row": 83, "column": 55}}, {"id": 427, "type": "identifier", "text": "vector", "parent": 426, "children": [], "start_point": {"row": 83, "column": 31}, "end_point": {"row": 83, "column": 37}}, {"id": 428, "type": "<", "text": "<", "parent": 426, "children": [], "start_point": {"row": 83, "column": 37}, "end_point": {"row": 83, "column": 38}}, {"id": 429, "type": "unsigned", "text": "unsigned", "parent": 426, "children": [], "start_point": {"row": 83, "column": 38}, "end_point": {"row": 83, "column": 46}}, {"id": 430, "type": "short", "text": "short", "parent": 426, "children": [], "start_point": {"row": 83, "column": 47}, "end_point": {"row": 83, "column": 52}}, {"id": 431, "type": ">", "text": ">", "parent": 426, "children": [], "start_point": {"row": 83, "column": 52}, "end_point": {"row": 83, "column": 53}}, {"id": 432, "type": "identifier", "text": "buf", "parent": 424, "children": [], "start_point": {"row": 83, "column": 55}, "end_point": {"row": 83, "column": 58}}, {"id": 433, "type": "declaration", "text": "Program *createProgram(const std::string &mVId,\n const std::string &mFId) override;", "parent": 116, "children": [434, 435], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 86, "column": 59}}, {"id": 434, "type": "type_identifier", "text": "Program", "parent": 433, "children": [], "start_point": {"row": 85, "column": 2}, "end_point": {"row": 85, "column": 9}}, {"id": 435, "type": "pointer_declarator", "text": "*createProgram(const std::string &mVId,\n const std::string &mFId) override", "parent": 433, "children": [436, 437], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 86, "column": 58}}, {"id": 436, "type": "*", "text": "*", "parent": 435, "children": [], "start_point": {"row": 85, "column": 10}, "end_point": {"row": 85, "column": 11}}, {"id": 437, "type": "function_declarator", "text": "createProgram(const std::string &mVId,\n const std::string &mFId) override", "parent": 435, "children": [438, 439, 450], "start_point": {"row": 85, "column": 11}, "end_point": {"row": 86, "column": 58}}, {"id": 438, "type": "identifier", "text": "createProgram", "parent": 437, "children": [], "start_point": {"row": 85, "column": 11}, "end_point": {"row": 85, "column": 24}}, {"id": 439, "type": "parameter_list", "text": "(const std::string &mVId,\n const std::string &mFId)", "parent": 437, "children": [440, 445], "start_point": {"row": 85, "column": 24}, "end_point": {"row": 86, "column": 49}}, {"id": 440, "type": "parameter_declaration", "text": "const std::string &mVId", "parent": 439, "children": [441, 442, 444], "start_point": {"row": 85, "column": 25}, "end_point": {"row": 85, "column": 48}}, {"id": 441, "type": "type_identifier", "text": "std", "parent": 440, "children": [], "start_point": {"row": 85, "column": 31}, "end_point": {"row": 85, "column": 34}}, {"id": 442, "type": "ERROR", "text": "::string &", "parent": 440, "children": [443], "start_point": {"row": 85, "column": 34}, "end_point": {"row": 85, "column": 44}}, {"id": 443, "type": "identifier", "text": "string", "parent": 442, "children": [], "start_point": {"row": 85, "column": 36}, "end_point": {"row": 85, "column": 42}}, {"id": 444, "type": "identifier", "text": "mVId", "parent": 440, "children": [], "start_point": {"row": 85, "column": 44}, "end_point": {"row": 85, "column": 48}}, {"id": 445, "type": "parameter_declaration", "text": "const std::string &mFId", "parent": 439, "children": [446, 447, 449], "start_point": {"row": 86, "column": 25}, "end_point": {"row": 86, "column": 48}}, {"id": 446, "type": "type_identifier", "text": "std", "parent": 445, "children": [], "start_point": {"row": 86, "column": 31}, "end_point": {"row": 86, "column": 34}}, {"id": 447, "type": "ERROR", "text": "::string &", "parent": 445, "children": [448], "start_point": {"row": 86, "column": 34}, "end_point": {"row": 86, "column": 44}}, {"id": 448, "type": "identifier", "text": "string", "parent": 447, "children": [], "start_point": {"row": 86, "column": 36}, "end_point": {"row": 86, "column": 42}}, {"id": 449, "type": "identifier", "text": "mFId", "parent": 445, "children": [], "start_point": {"row": 86, "column": 44}, "end_point": {"row": 86, "column": 48}}, {"id": 450, "type": "identifier", "text": "override", "parent": 437, "children": [], "start_point": {"row": 86, "column": 50}, "end_point": {"row": 86, "column": 58}}, {"id": 451, "type": "declaration", "text": "unsigned int generateProgram();", "parent": 116, "children": [452, 455], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 33}}, {"id": 452, "type": "sized_type_specifier", "text": "unsigned int", "parent": 451, "children": [453, 454], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 14}}, {"id": 453, "type": "unsigned", "text": "unsigned", "parent": 452, "children": [], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 10}}, {"id": 454, "type": "primitive_type", "text": "int", "parent": 452, "children": [], "start_point": {"row": 87, "column": 11}, "end_point": {"row": 87, "column": 14}}, {"id": 455, "type": "function_declarator", "text": "generateProgram()", "parent": 451, "children": [456, 457], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 32}}, {"id": 456, "type": "identifier", "text": "generateProgram", "parent": 455, "children": [], "start_point": {"row": 87, "column": 15}, "end_point": {"row": 87, "column": 30}}, {"id": 457, "type": "parameter_list", "text": "()", "parent": 455, "children": [], "start_point": {"row": 87, "column": 30}, "end_point": {"row": 87, "column": 32}}, {"id": 458, "type": "declaration", "text": "void setProgram(unsigned int program);", "parent": 116, "children": [459, 460], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 40}}, {"id": 459, "type": "primitive_type", "text": "void", "parent": 458, "children": [], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 6}}, {"id": 460, "type": "function_declarator", "text": "setProgram(unsigned int program)", "parent": 458, "children": [461, 462], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 39}}, {"id": 461, "type": "identifier", "text": "setProgram", "parent": 460, "children": [], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 17}}, {"id": 462, "type": "parameter_list", "text": "(unsigned int program)", "parent": 460, "children": [463], "start_point": {"row": 88, "column": 17}, "end_point": {"row": 88, "column": 39}}, {"id": 463, "type": "parameter_declaration", "text": "unsigned int program", "parent": 462, "children": [464, 467], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 38}}, {"id": 464, "type": "sized_type_specifier", "text": "unsigned int", "parent": 463, "children": [465, 466], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 30}}, {"id": 465, "type": "unsigned", "text": "unsigned", "parent": 464, "children": [], "start_point": {"row": 88, "column": 18}, "end_point": {"row": 88, "column": 26}}, {"id": 466, "type": "primitive_type", "text": "int", "parent": 464, "children": [], "start_point": {"row": 88, "column": 27}, "end_point": {"row": 88, "column": 30}}, {"id": 467, "type": "identifier", "text": "program", "parent": 463, "children": [], "start_point": {"row": 88, "column": 31}, "end_point": {"row": 88, "column": 38}}, {"id": 468, "type": "declaration", "text": "void deleteProgram(unsigned int program);", "parent": 116, "children": [469, 470], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 43}}, {"id": 469, "type": "primitive_type", "text": "void", "parent": 468, "children": [], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 6}}, {"id": 470, "type": "function_declarator", "text": "deleteProgram(unsigned int program)", "parent": 468, "children": [471, 472], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 42}}, {"id": 471, "type": "identifier", "text": "deleteProgram", "parent": 470, "children": [], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 20}}, {"id": 472, "type": "parameter_list", "text": "(unsigned int program)", "parent": 470, "children": [473], "start_point": {"row": 89, "column": 20}, "end_point": {"row": 89, "column": 42}}, {"id": 473, "type": "parameter_declaration", "text": "unsigned int program", "parent": 472, "children": [474, 477], "start_point": {"row": 89, "column": 21}, "end_point": {"row": 89, "column": 41}}, {"id": 474, "type": "sized_type_specifier", "text": "unsigned int", "parent": 473, "children": [475, 476], "start_point": {"row": 89, "column": 21}, "end_point": {"row": 89, "column": 33}}, {"id": 475, "type": "unsigned", "text": "unsigned", "parent": 474, "children": [], "start_point": {"row": 89, "column": 21}, "end_point": {"row": 89, "column": 29}}, {"id": 476, "type": "primitive_type", "text": "int", "parent": 474, "children": [], "start_point": {"row": 89, "column": 30}, "end_point": {"row": 89, "column": 33}}, {"id": 477, "type": "identifier", "text": "program", "parent": 473, "children": [], "start_point": {"row": 89, "column": 34}, "end_point": {"row": 89, "column": 41}}, {"id": 478, "type": "declaration", "text": "bool compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode);", "parent": 116, "children": [479, 480], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 92, "column": 61}}, {"id": 479, "type": "primitive_type", "text": "bool", "parent": 478, "children": [], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 6}}, {"id": 480, "type": "function_declarator", "text": "compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode)", "parent": 478, "children": [481, 482], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 92, "column": 60}}, {"id": 481, "type": "identifier", "text": "compileProgram", "parent": 480, "children": [], "start_point": {"row": 90, "column": 7}, "end_point": {"row": 90, "column": 21}}, {"id": 482, "type": "parameter_list", "text": "(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode)", "parent": 480, "children": [483, 488, 493], "start_point": {"row": 90, "column": 21}, "end_point": {"row": 92, "column": 60}}, {"id": 483, "type": "parameter_declaration", "text": "unsigned int programId", "parent": 482, "children": [484, 487], "start_point": {"row": 90, "column": 22}, "end_point": {"row": 90, "column": 44}}, {"id": 484, "type": "sized_type_specifier", "text": "unsigned int", "parent": 483, "children": [485, 486], "start_point": {"row": 90, "column": 22}, "end_point": {"row": 90, "column": 34}}, {"id": 485, "type": "unsigned", "text": "unsigned", "parent": 484, "children": [], "start_point": {"row": 90, "column": 22}, "end_point": {"row": 90, "column": 30}}, {"id": 486, "type": "primitive_type", "text": "int", "parent": 484, "children": [], "start_point": {"row": 90, "column": 31}, "end_point": {"row": 90, "column": 34}}, {"id": 487, "type": "identifier", "text": "programId", "parent": 483, "children": [], "start_point": {"row": 90, "column": 35}, "end_point": {"row": 90, "column": 44}}, {"id": 488, "type": "parameter_declaration", "text": "const std::string &VertexShaderCode", "parent": 482, "children": [489, 490, 492], "start_point": {"row": 91, "column": 22}, "end_point": {"row": 91, "column": 57}}, {"id": 489, "type": "type_identifier", "text": "std", "parent": 488, "children": [], "start_point": {"row": 91, "column": 28}, "end_point": {"row": 91, "column": 31}}, {"id": 490, "type": "ERROR", "text": "::string &", "parent": 488, "children": [491], "start_point": {"row": 91, "column": 31}, "end_point": {"row": 91, "column": 41}}, {"id": 491, "type": "identifier", "text": "string", "parent": 490, "children": [], "start_point": {"row": 91, "column": 33}, "end_point": {"row": 91, "column": 39}}, {"id": 492, "type": "identifier", "text": "VertexShaderCode", "parent": 488, "children": [], "start_point": {"row": 91, "column": 41}, "end_point": {"row": 91, "column": 57}}, {"id": 493, "type": "parameter_declaration", "text": "const std::string &FragmentShaderCode", "parent": 482, "children": [494, 495, 497], "start_point": {"row": 92, "column": 22}, "end_point": {"row": 92, "column": 59}}, {"id": 494, "type": "type_identifier", "text": "std", "parent": 493, "children": [], "start_point": {"row": 92, "column": 28}, "end_point": {"row": 92, "column": 31}}, {"id": 495, "type": "ERROR", "text": "::string &", "parent": 493, "children": [496], "start_point": {"row": 92, "column": 31}, "end_point": {"row": 92, "column": 41}}, {"id": 496, "type": "identifier", "text": "string", "parent": 495, "children": [], "start_point": {"row": 92, "column": 33}, "end_point": {"row": 92, "column": 39}}, {"id": 497, "type": "identifier", "text": "FragmentShaderCode", "parent": 493, "children": [], "start_point": {"row": 92, "column": 41}, "end_point": {"row": 92, "column": 59}}, {"id": 498, "type": "ERROR", "text": "void bindVAO(unsigned int vao) const;", "parent": 116, "children": [499, 500], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 39}}, {"id": 499, "type": "primitive_type", "text": "void", "parent": 498, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 6}}, {"id": 500, "type": "function_declarator", "text": "bindVAO(unsigned int vao) const", "parent": 498, "children": [501, 502], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 38}}, {"id": 501, "type": "identifier", "text": "bindVAO", "parent": 500, "children": [], "start_point": {"row": 93, "column": 7}, "end_point": {"row": 93, "column": 14}}, {"id": 502, "type": "parameter_list", "text": "(unsigned int vao)", "parent": 500, "children": [503], "start_point": {"row": 93, "column": 14}, "end_point": {"row": 93, "column": 32}}, {"id": 503, "type": "parameter_declaration", "text": "unsigned int vao", "parent": 502, "children": [504, 507], "start_point": {"row": 93, "column": 15}, "end_point": {"row": 93, "column": 31}}, {"id": 504, "type": "sized_type_specifier", "text": "unsigned int", "parent": 503, "children": [505, 506], "start_point": {"row": 93, "column": 15}, "end_point": {"row": 93, "column": 27}}, {"id": 505, "type": "unsigned", "text": "unsigned", "parent": 504, "children": [], "start_point": {"row": 93, "column": 15}, "end_point": {"row": 93, "column": 23}}, {"id": 506, "type": "primitive_type", "text": "int", "parent": 504, "children": [], "start_point": {"row": 93, "column": 24}, "end_point": {"row": 93, "column": 27}}, {"id": 507, "type": "identifier", "text": "vao", "parent": 503, "children": [], "start_point": {"row": 93, "column": 28}, "end_point": {"row": 93, "column": 31}}, {"id": 508, "type": "declaration", "text": "unsigned int generateVAO();", "parent": 116, "children": [509, 512], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 29}}, {"id": 509, "type": "sized_type_specifier", "text": "unsigned int", "parent": 508, "children": [510, 511], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 14}}, {"id": 510, "type": "unsigned", "text": "unsigned", "parent": 509, "children": [], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 10}}, {"id": 511, "type": "primitive_type", "text": "int", "parent": 509, "children": [], "start_point": {"row": 94, "column": 11}, "end_point": {"row": 94, "column": 14}}, {"id": 512, "type": "function_declarator", "text": "generateVAO()", "parent": 508, "children": [513, 514], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 28}}, {"id": 513, "type": "identifier", "text": "generateVAO", "parent": 512, "children": [], "start_point": {"row": 94, "column": 15}, "end_point": {"row": 94, "column": 26}}, {"id": 514, "type": "parameter_list", "text": "()", "parent": 512, "children": [], "start_point": {"row": 94, "column": 26}, "end_point": {"row": 94, "column": 28}}, {"id": 515, "type": "declaration", "text": "void deleteVAO(unsigned int vao);", "parent": 116, "children": [516, 517], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 35}}, {"id": 516, "type": "primitive_type", "text": "void", "parent": 515, "children": [], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 6}}, {"id": 517, "type": "function_declarator", "text": "deleteVAO(unsigned int vao)", "parent": 515, "children": [518, 519], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 34}}, {"id": 518, "type": "identifier", "text": "deleteVAO", "parent": 517, "children": [], "start_point": {"row": 95, "column": 7}, "end_point": {"row": 95, "column": 16}}, {"id": 519, "type": "parameter_list", "text": "(unsigned int vao)", "parent": 517, "children": [520], "start_point": {"row": 95, "column": 16}, "end_point": {"row": 95, "column": 34}}, {"id": 520, "type": "parameter_declaration", "text": "unsigned int vao", "parent": 519, "children": [521, 524], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 33}}, {"id": 521, "type": "sized_type_specifier", "text": "unsigned int", "parent": 520, "children": [522, 523], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 29}}, {"id": 522, "type": "unsigned", "text": "unsigned", "parent": 521, "children": [], "start_point": {"row": 95, "column": 17}, "end_point": {"row": 95, "column": 25}}, {"id": 523, "type": "primitive_type", "text": "int", "parent": 521, "children": [], "start_point": {"row": 95, "column": 26}, "end_point": {"row": 95, "column": 29}}, {"id": 524, "type": "identifier", "text": "vao", "parent": 520, "children": [], "start_point": {"row": 95, "column": 30}, "end_point": {"row": 95, "column": 33}}, {"id": 525, "type": "declaration", "text": "Texture *createTexture(const std::string &name,\n const std::string &url) override;", "parent": 116, "children": [526, 527], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 98, "column": 58}}, {"id": 526, "type": "type_identifier", "text": "Texture", "parent": 525, "children": [], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 9}}, {"id": 527, "type": "pointer_declarator", "text": "*createTexture(const std::string &name,\n const std::string &url) override", "parent": 525, "children": [528, 529], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 98, "column": 57}}, {"id": 528, "type": "*", "text": "*", "parent": 527, "children": [], "start_point": {"row": 97, "column": 10}, "end_point": {"row": 97, "column": 11}}, {"id": 529, "type": "function_declarator", "text": "createTexture(const std::string &name,\n const std::string &url) override", "parent": 527, "children": [530, 531, 542], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 98, "column": 57}}, {"id": 530, "type": "identifier", "text": "createTexture", "parent": 529, "children": [], "start_point": {"row": 97, "column": 11}, "end_point": {"row": 97, "column": 24}}, {"id": 531, "type": "parameter_list", "text": "(const std::string &name,\n const std::string &url)", "parent": 529, "children": [532, 537], "start_point": {"row": 97, "column": 24}, "end_point": {"row": 98, "column": 48}}, {"id": 532, "type": "parameter_declaration", "text": "const std::string &name", "parent": 531, "children": [533, 534, 536], "start_point": {"row": 97, "column": 25}, "end_point": {"row": 97, "column": 48}}, {"id": 533, "type": "type_identifier", "text": "std", "parent": 532, "children": [], "start_point": {"row": 97, "column": 31}, "end_point": {"row": 97, "column": 34}}, {"id": 534, "type": "ERROR", "text": "::string &", "parent": 532, "children": [535], "start_point": {"row": 97, "column": 34}, "end_point": {"row": 97, "column": 44}}, {"id": 535, "type": "identifier", "text": "string", "parent": 534, "children": [], "start_point": {"row": 97, "column": 36}, "end_point": {"row": 97, "column": 42}}, {"id": 536, "type": "identifier", "text": "name", "parent": 532, "children": [], "start_point": {"row": 97, "column": 44}, "end_point": {"row": 97, "column": 48}}, {"id": 537, "type": "parameter_declaration", "text": "const std::string &url", "parent": 531, "children": [538, 539, 541], "start_point": {"row": 98, "column": 25}, "end_point": {"row": 98, "column": 47}}, {"id": 538, "type": "type_identifier", "text": "std", "parent": 537, "children": [], "start_point": {"row": 98, "column": 31}, "end_point": {"row": 98, "column": 34}}, {"id": 539, "type": "ERROR", "text": "::string &", "parent": 537, "children": [540], "start_point": {"row": 98, "column": 34}, "end_point": {"row": 98, "column": 44}}, {"id": 540, "type": "identifier", "text": "string", "parent": 539, "children": [], "start_point": {"row": 98, "column": 36}, "end_point": {"row": 98, "column": 42}}, {"id": 541, "type": "identifier", "text": "url", "parent": 537, "children": [], "start_point": {"row": 98, "column": 44}, "end_point": {"row": 98, "column": 47}}, {"id": 542, "type": "identifier", "text": "override", "parent": 529, "children": [], "start_point": {"row": 98, "column": 49}, "end_point": {"row": 98, "column": 57}}, {"id": 543, "type": "declaration", "text": "Texture *createTexture(const std::string &name,\n const std::vector<std::string> &urls) override;", "parent": 116, "children": [544, 545], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 100, "column": 72}}, {"id": 544, "type": "type_identifier", "text": "Texture", "parent": 543, "children": [], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 9}}, {"id": 545, "type": "pointer_declarator", "text": "*createTexture(const std::string &name,\n const std::vector<std::string> &urls) override", "parent": 543, "children": [546, 547], "start_point": {"row": 99, "column": 10}, "end_point": {"row": 100, "column": 71}}, {"id": 546, "type": "*", "text": "*", "parent": 545, "children": [], "start_point": {"row": 99, "column": 10}, "end_point": {"row": 99, "column": 11}}, {"id": 547, "type": "function_declarator", "text": "createTexture(const std::string &name,\n const std::vector<std::string> &urls) override", "parent": 545, "children": [548, 549, 564], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 100, "column": 71}}, {"id": 548, "type": "identifier", "text": "createTexture", "parent": 547, "children": [], "start_point": {"row": 99, "column": 11}, "end_point": {"row": 99, "column": 24}}, {"id": 549, "type": "parameter_list", "text": "(const std::string &name,\n const std::vector<std::string> &urls)", "parent": 547, "children": [550, 555], "start_point": {"row": 99, "column": 24}, "end_point": {"row": 100, "column": 62}}, {"id": 550, "type": "parameter_declaration", "text": "const std::string &name", "parent": 549, "children": [551, 552, 554], "start_point": {"row": 99, "column": 25}, "end_point": {"row": 99, "column": 48}}, {"id": 551, "type": "type_identifier", "text": "std", "parent": 550, "children": [], "start_point": {"row": 99, "column": 31}, "end_point": {"row": 99, "column": 34}}, {"id": 552, "type": "ERROR", "text": "::string &", "parent": 550, "children": [553], "start_point": {"row": 99, "column": 34}, "end_point": {"row": 99, "column": 44}}, {"id": 553, "type": "identifier", "text": "string", "parent": 552, "children": [], "start_point": {"row": 99, "column": 36}, "end_point": {"row": 99, "column": 42}}, {"id": 554, "type": "identifier", "text": "name", "parent": 550, "children": [], "start_point": {"row": 99, "column": 44}, "end_point": {"row": 99, "column": 48}}, {"id": 555, "type": "parameter_declaration", "text": "const std::vector<std::string> &urls", "parent": 549, "children": [556, 557, 563], "start_point": {"row": 100, "column": 25}, "end_point": {"row": 100, "column": 61}}, {"id": 556, "type": "type_identifier", "text": "std", "parent": 555, "children": [], "start_point": {"row": 100, "column": 31}, "end_point": {"row": 100, "column": 34}}, {"id": 557, "type": "ERROR", "text": "::vector<std::string> &", "parent": 555, "children": [558, 559, 560, 561, 562], "start_point": {"row": 100, "column": 34}, "end_point": {"row": 100, "column": 57}}, {"id": 558, "type": "identifier", "text": "vector", "parent": 557, "children": [], "start_point": {"row": 100, "column": 36}, "end_point": {"row": 100, "column": 42}}, {"id": 559, "type": "<", "text": "<", "parent": 557, "children": [], "start_point": {"row": 100, "column": 42}, "end_point": {"row": 100, "column": 43}}, {"id": 560, "type": "identifier", "text": "std", "parent": 557, "children": [], "start_point": {"row": 100, "column": 43}, "end_point": {"row": 100, "column": 46}}, {"id": 561, "type": "identifier", "text": "string", "parent": 557, "children": [], "start_point": {"row": 100, "column": 48}, "end_point": {"row": 100, "column": 54}}, {"id": 562, "type": ">", "text": ">", "parent": 557, "children": [], "start_point": {"row": 100, "column": 54}, "end_point": {"row": 100, "column": 55}}, {"id": 563, "type": "identifier", "text": "urls", "parent": 555, "children": [], "start_point": {"row": 100, "column": 57}, "end_point": {"row": 100, "column": 61}}, {"id": 564, "type": "identifier", "text": "override", "parent": 547, "children": [], "start_point": {"row": 100, "column": 63}, "end_point": {"row": 100, "column": 71}}, {"id": 565, "type": "declaration", "text": "unsigned int generateTexture();", "parent": 116, "children": [566, 569], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 33}}, {"id": 566, "type": "sized_type_specifier", "text": "unsigned int", "parent": 565, "children": [567, 568], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 14}}, {"id": 567, "type": "unsigned", "text": "unsigned", "parent": 566, "children": [], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 10}}, {"id": 568, "type": "primitive_type", "text": "int", "parent": 566, "children": [], "start_point": {"row": 101, "column": 11}, "end_point": {"row": 101, "column": 14}}, {"id": 569, "type": "function_declarator", "text": "generateTexture()", "parent": 565, "children": [570, 571], "start_point": {"row": 101, "column": 15}, "end_point": {"row": 101, "column": 32}}, {"id": 570, "type": "identifier", "text": "generateTexture", "parent": 569, "children": [], "start_point": {"row": 101, "column": 15}, "end_point": {"row": 101, "column": 30}}, {"id": 571, "type": "parameter_list", "text": "()", "parent": 569, "children": [], "start_point": {"row": 101, "column": 30}, "end_point": {"row": 101, "column": 32}}, {"id": 572, "type": "declaration", "text": "void bindTexture(unsigned int target, unsigned int texture);", "parent": 116, "children": [573, 574], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 62}}, {"id": 573, "type": "primitive_type", "text": "void", "parent": 572, "children": [], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 6}}, {"id": 574, "type": "function_declarator", "text": "bindTexture(unsigned int target, unsigned int texture)", "parent": 572, "children": [575, 576], "start_point": {"row": 102, "column": 7}, "end_point": {"row": 102, "column": 61}}, {"id": 575, "type": "identifier", "text": "bindTexture", "parent": 574, "children": [], "start_point": {"row": 102, "column": 7}, "end_point": {"row": 102, "column": 18}}, {"id": 576, "type": "parameter_list", "text": "(unsigned int target, unsigned int texture)", "parent": 574, "children": [577, 582], "start_point": {"row": 102, "column": 18}, "end_point": {"row": 102, "column": 61}}, {"id": 577, "type": "parameter_declaration", "text": "unsigned int target", "parent": 576, "children": [578, 581], "start_point": {"row": 102, "column": 19}, "end_point": {"row": 102, "column": 38}}, {"id": 578, "type": "sized_type_specifier", "text": "unsigned int", "parent": 577, "children": [579, 580], "start_point": {"row": 102, "column": 19}, "end_point": {"row": 102, "column": 31}}, {"id": 579, "type": "unsigned", "text": "unsigned", "parent": 578, "children": [], "start_point": {"row": 102, "column": 19}, "end_point": {"row": 102, "column": 27}}, {"id": 580, "type": "primitive_type", "text": "int", "parent": 578, "children": [], "start_point": {"row": 102, "column": 28}, "end_point": {"row": 102, "column": 31}}, {"id": 581, "type": "identifier", "text": "target", "parent": 577, "children": [], "start_point": {"row": 102, "column": 32}, "end_point": {"row": 102, "column": 38}}, {"id": 582, "type": "parameter_declaration", "text": "unsigned int texture", "parent": 576, "children": [583, 586], "start_point": {"row": 102, "column": 40}, "end_point": {"row": 102, "column": 60}}, {"id": 583, "type": "sized_type_specifier", "text": "unsigned int", "parent": 582, "children": [584, 585], "start_point": {"row": 102, "column": 40}, "end_point": {"row": 102, "column": 52}}, {"id": 584, "type": "unsigned", "text": "unsigned", "parent": 583, "children": [], "start_point": {"row": 102, "column": 40}, "end_point": {"row": 102, "column": 48}}, {"id": 585, "type": "primitive_type", "text": "int", "parent": 583, "children": [], "start_point": {"row": 102, "column": 49}, "end_point": {"row": 102, "column": 52}}, {"id": 586, "type": "identifier", "text": "texture", "parent": 582, "children": [], "start_point": {"row": 102, "column": 53}, "end_point": {"row": 102, "column": 60}}, {"id": 587, "type": "declaration", "text": "void deleteTexture(unsigned int texture);", "parent": 116, "children": [588, 589], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 43}}, {"id": 588, "type": "primitive_type", "text": "void", "parent": 587, "children": [], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 6}}, {"id": 589, "type": "function_declarator", "text": "deleteTexture(unsigned int texture)", "parent": 587, "children": [590, 591], "start_point": {"row": 103, "column": 7}, "end_point": {"row": 103, "column": 42}}, {"id": 590, "type": "identifier", "text": "deleteTexture", "parent": 589, "children": [], "start_point": {"row": 103, "column": 7}, "end_point": {"row": 103, "column": 20}}, {"id": 591, "type": "parameter_list", "text": "(unsigned int texture)", "parent": 589, "children": [592], "start_point": {"row": 103, "column": 20}, "end_point": {"row": 103, "column": 42}}, {"id": 592, "type": "parameter_declaration", "text": "unsigned int texture", "parent": 591, "children": [593, 596], "start_point": {"row": 103, "column": 21}, "end_point": {"row": 103, "column": 41}}, {"id": 593, "type": "sized_type_specifier", "text": "unsigned int", "parent": 592, "children": [594, 595], "start_point": {"row": 103, "column": 21}, "end_point": {"row": 103, "column": 33}}, {"id": 594, "type": "unsigned", "text": "unsigned", "parent": 593, "children": [], "start_point": {"row": 103, "column": 21}, "end_point": {"row": 103, "column": 29}}, {"id": 595, "type": "primitive_type", "text": "int", "parent": 593, "children": [], "start_point": {"row": 103, "column": 30}, "end_point": {"row": 103, "column": 33}}, {"id": 596, "type": "identifier", "text": "texture", "parent": 592, "children": [], "start_point": {"row": 103, "column": 34}, "end_point": {"row": 103, "column": 41}}, {"id": 597, "type": "declaration", "text": "void uploadTexture(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel);", "parent": 116, "children": [598, 599], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 108, "column": 43}}, {"id": 598, "type": "primitive_type", "text": "void", "parent": 597, "children": [], "start_point": {"row": 104, "column": 2}, "end_point": {"row": 104, "column": 6}}, {"id": 599, "type": "function_declarator", "text": "uploadTexture(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel)", "parent": 597, "children": [600, 601], "start_point": {"row": 104, "column": 7}, "end_point": {"row": 108, "column": 42}}, {"id": 600, "type": "identifier", "text": "uploadTexture", "parent": 599, "children": [], "start_point": {"row": 104, "column": 7}, "end_point": {"row": 104, "column": 20}}, {"id": 601, "type": "parameter_list", "text": "(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel)", "parent": 599, "children": [602, 607, 612, 615, 618], "start_point": {"row": 104, "column": 20}, "end_point": {"row": 108, "column": 42}}, {"id": 602, "type": "parameter_declaration", "text": "unsigned int target", "parent": 601, "children": [603, 606], "start_point": {"row": 104, "column": 21}, "end_point": {"row": 104, "column": 40}}, {"id": 603, "type": "sized_type_specifier", "text": "unsigned int", "parent": 602, "children": [604, 605], "start_point": {"row": 104, "column": 21}, "end_point": {"row": 104, "column": 33}}, {"id": 604, "type": "unsigned", "text": "unsigned", "parent": 603, "children": [], "start_point": {"row": 104, "column": 21}, "end_point": {"row": 104, "column": 29}}, {"id": 605, "type": "primitive_type", "text": "int", "parent": 603, "children": [], "start_point": {"row": 104, "column": 30}, "end_point": {"row": 104, "column": 33}}, {"id": 606, "type": "identifier", "text": "target", "parent": 602, "children": [], "start_point": {"row": 104, "column": 34}, "end_point": {"row": 104, "column": 40}}, {"id": 607, "type": "parameter_declaration", "text": "unsigned int format", "parent": 601, "children": [608, 611], "start_point": {"row": 105, "column": 21}, "end_point": {"row": 105, "column": 40}}, {"id": 608, "type": "sized_type_specifier", "text": "unsigned int", "parent": 607, "children": [609, 610], "start_point": {"row": 105, "column": 21}, "end_point": {"row": 105, "column": 33}}, {"id": 609, "type": "unsigned", "text": "unsigned", "parent": 608, "children": [], "start_point": {"row": 105, "column": 21}, "end_point": {"row": 105, "column": 29}}, {"id": 610, "type": "primitive_type", "text": "int", "parent": 608, "children": [], "start_point": {"row": 105, "column": 30}, "end_point": {"row": 105, "column": 33}}, {"id": 611, "type": "identifier", "text": "format", "parent": 607, "children": [], "start_point": {"row": 105, "column": 34}, "end_point": {"row": 105, "column": 40}}, {"id": 612, "type": "parameter_declaration", "text": "int width", "parent": 601, "children": [613, 614], "start_point": {"row": 106, "column": 21}, "end_point": {"row": 106, "column": 30}}, {"id": 613, "type": "primitive_type", "text": "int", "parent": 612, "children": [], "start_point": {"row": 106, "column": 21}, "end_point": {"row": 106, "column": 24}}, {"id": 614, "type": "identifier", "text": "width", "parent": 612, "children": [], "start_point": {"row": 106, "column": 25}, "end_point": {"row": 106, "column": 30}}, {"id": 615, "type": "parameter_declaration", "text": "int height", "parent": 601, "children": [616, 617], "start_point": {"row": 107, "column": 21}, "end_point": {"row": 107, "column": 31}}, {"id": 616, "type": "primitive_type", "text": "int", "parent": 615, "children": [], "start_point": {"row": 107, "column": 21}, "end_point": {"row": 107, "column": 24}}, {"id": 617, "type": "identifier", "text": "height", "parent": 615, "children": [], "start_point": {"row": 107, "column": 25}, "end_point": {"row": 107, "column": 31}}, {"id": 618, "type": "parameter_declaration", "text": "unsigned char *pixel", "parent": 601, "children": [619, 622], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 41}}, {"id": 619, "type": "sized_type_specifier", "text": "unsigned char", "parent": 618, "children": [620, 621], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 34}}, {"id": 620, "type": "unsigned", "text": "unsigned", "parent": 619, "children": [], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 29}}, {"id": 621, "type": "primitive_type", "text": "char", "parent": 619, "children": [], "start_point": {"row": 108, "column": 30}, "end_point": {"row": 108, "column": 34}}, {"id": 622, "type": "pointer_declarator", "text": "*pixel", "parent": 618, "children": [623, 624], "start_point": {"row": 108, "column": 35}, "end_point": {"row": 108, "column": 41}}, {"id": 623, "type": "*", "text": "*", "parent": 622, "children": [], "start_point": {"row": 108, "column": 35}, "end_point": {"row": 108, "column": 36}}, {"id": 624, "type": "identifier", "text": "pixel", "parent": 622, "children": [], "start_point": {"row": 108, "column": 36}, "end_point": {"row": 108, "column": 41}}, {"id": 625, "type": "declaration", "text": "void setParameter(unsigned int target, unsigned int pname, int param);", "parent": 116, "children": [626, 627], "start_point": {"row": 109, "column": 2}, "end_point": {"row": 109, "column": 72}}, {"id": 626, "type": "primitive_type", "text": "void", "parent": 625, "children": [], "start_point": {"row": 109, "column": 2}, "end_point": {"row": 109, "column": 6}}, {"id": 627, "type": "function_declarator", "text": "setParameter(unsigned int target, unsigned int pname, int param)", "parent": 625, "children": [628, 629], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 71}}, {"id": 628, "type": "identifier", "text": "setParameter", "parent": 627, "children": [], "start_point": {"row": 109, "column": 7}, "end_point": {"row": 109, "column": 19}}, {"id": 629, "type": "parameter_list", "text": "(unsigned int target, unsigned int pname, int param)", "parent": 627, "children": [630, 635, 640], "start_point": {"row": 109, "column": 19}, "end_point": {"row": 109, "column": 71}}, {"id": 630, "type": "parameter_declaration", "text": "unsigned int target", "parent": 629, "children": [631, 634], "start_point": {"row": 109, "column": 20}, "end_point": {"row": 109, "column": 39}}, {"id": 631, "type": "sized_type_specifier", "text": "unsigned int", "parent": 630, "children": [632, 633], "start_point": {"row": 109, "column": 20}, "end_point": {"row": 109, "column": 32}}, {"id": 632, "type": "unsigned", "text": "unsigned", "parent": 631, "children": [], "start_point": {"row": 109, "column": 20}, "end_point": {"row": 109, "column": 28}}, {"id": 633, "type": "primitive_type", "text": "int", "parent": 631, "children": [], "start_point": {"row": 109, "column": 29}, "end_point": {"row": 109, "column": 32}}, {"id": 634, "type": "identifier", "text": "target", "parent": 630, "children": [], "start_point": {"row": 109, "column": 33}, "end_point": {"row": 109, "column": 39}}, {"id": 635, "type": "parameter_declaration", "text": "unsigned int pname", "parent": 629, "children": [636, 639], "start_point": {"row": 109, "column": 41}, "end_point": {"row": 109, "column": 59}}, {"id": 636, "type": "sized_type_specifier", "text": "unsigned int", "parent": 635, "children": [637, 638], "start_point": {"row": 109, "column": 41}, "end_point": {"row": 109, "column": 53}}, {"id": 637, "type": "unsigned", "text": "unsigned", "parent": 636, "children": [], "start_point": {"row": 109, "column": 41}, "end_point": {"row": 109, "column": 49}}, {"id": 638, "type": "primitive_type", "text": "int", "parent": 636, "children": [], "start_point": {"row": 109, "column": 50}, "end_point": {"row": 109, "column": 53}}, {"id": 639, "type": "identifier", "text": "pname", "parent": 635, "children": [], "start_point": {"row": 109, "column": 54}, "end_point": {"row": 109, "column": 59}}, {"id": 640, "type": "parameter_declaration", "text": "int param", "parent": 629, "children": [641, 642], "start_point": {"row": 109, "column": 61}, "end_point": {"row": 109, "column": 70}}, {"id": 641, "type": "primitive_type", "text": "int", "parent": 640, "children": [], "start_point": {"row": 109, "column": 61}, "end_point": {"row": 109, "column": 64}}, {"id": 642, "type": "identifier", "text": "param", "parent": 640, "children": [], "start_point": {"row": 109, "column": 65}, "end_point": {"row": 109, "column": 70}}, {"id": 643, "type": "declaration", "text": "void generateMipmap(unsigned int target);", "parent": 116, "children": [644, 645], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 43}}, {"id": 644, "type": "primitive_type", "text": "void", "parent": 643, "children": [], "start_point": {"row": 110, "column": 2}, "end_point": {"row": 110, "column": 6}}, {"id": 645, "type": "function_declarator", "text": "generateMipmap(unsigned int target)", "parent": 643, "children": [646, 647], "start_point": {"row": 110, "column": 7}, "end_point": {"row": 110, "column": 42}}, {"id": 646, "type": "identifier", "text": "generateMipmap", "parent": 645, "children": [], "start_point": {"row": 110, "column": 7}, "end_point": {"row": 110, "column": 21}}, {"id": 647, "type": "parameter_list", "text": "(unsigned int target)", "parent": 645, "children": [648], "start_point": {"row": 110, "column": 21}, "end_point": {"row": 110, "column": 42}}, {"id": 648, "type": "parameter_declaration", "text": "unsigned int target", "parent": 647, "children": [649, 652], "start_point": {"row": 110, "column": 22}, "end_point": {"row": 110, "column": 41}}, {"id": 649, "type": "sized_type_specifier", "text": "unsigned int", "parent": 648, "children": [650, 651], "start_point": {"row": 110, "column": 22}, "end_point": {"row": 110, "column": 34}}, {"id": 650, "type": "unsigned", "text": "unsigned", "parent": 649, "children": [], "start_point": {"row": 110, "column": 22}, "end_point": {"row": 110, "column": 30}}, {"id": 651, "type": "primitive_type", "text": "int", "parent": 649, "children": [], "start_point": {"row": 110, "column": 31}, "end_point": {"row": 110, "column": 34}}, {"id": 652, "type": "identifier", "text": "target", "parent": 648, "children": [], "start_point": {"row": 110, "column": 35}, "end_point": {"row": 110, "column": 41}}, {"id": 653, "type": "declaration", "text": "void updateAllFishData() override;\n\nprotected:\n explicit ContextGL(BACKENDTYPE backendType);", "parent": 116, "children": [654, 655, 661], "start_point": {"row": 111, "column": 2}, "end_point": {"row": 114, "column": 46}}, {"id": 654, "type": "primitive_type", "text": "void", "parent": 653, "children": [], "start_point": {"row": 111, "column": 2}, "end_point": {"row": 111, "column": 6}}, {"id": 655, "type": "ERROR", "text": "updateAllFishData() override;\n\nprotected:\n explicit", "parent": 653, "children": [656, 660], "start_point": {"row": 111, "column": 7}, "end_point": {"row": 114, "column": 10}}, {"id": 656, "type": "function_declarator", "text": "updateAllFishData() override", "parent": 655, "children": [657, 658, 659], "start_point": {"row": 111, "column": 7}, "end_point": {"row": 111, "column": 35}}, {"id": 657, "type": "identifier", "text": "updateAllFishData", "parent": 656, "children": [], "start_point": {"row": 111, "column": 7}, "end_point": {"row": 111, "column": 24}}, {"id": 658, "type": "parameter_list", "text": "()", "parent": 656, "children": [], "start_point": {"row": 111, "column": 24}, "end_point": {"row": 111, "column": 26}}, {"id": 659, "type": "identifier", "text": "override", "parent": 656, "children": [], "start_point": {"row": 111, "column": 27}, "end_point": {"row": 111, "column": 35}}, {"id": 660, "type": "identifier", "text": "explicit", "parent": 655, "children": [], "start_point": {"row": 114, "column": 2}, "end_point": {"row": 114, "column": 10}}, {"id": 661, "type": "function_declarator", "text": "ContextGL(BACKENDTYPE backendType)", "parent": 653, "children": [662, 663], "start_point": {"row": 114, "column": 11}, "end_point": {"row": 114, "column": 45}}, {"id": 662, "type": "identifier", "text": "ContextGL", "parent": 661, "children": [], "start_point": {"row": 114, "column": 11}, "end_point": {"row": 114, "column": 20}}, {"id": 663, "type": "parameter_list", "text": "(BACKENDTYPE backendType)", "parent": 661, "children": [664], "start_point": {"row": 114, "column": 20}, "end_point": {"row": 114, "column": 45}}, {"id": 664, "type": "parameter_declaration", "text": "BACKENDTYPE backendType", "parent": 663, "children": [665, 666], "start_point": {"row": 114, "column": 21}, "end_point": {"row": 114, "column": 44}}, {"id": 665, "type": "type_identifier", "text": "BACKENDTYPE", "parent": 664, "children": [], "start_point": {"row": 114, "column": 21}, "end_point": {"row": 114, "column": 32}}, {"id": 666, "type": "identifier", "text": "backendType", "parent": 664, "children": [], "start_point": {"row": 114, "column": 33}, "end_point": {"row": 114, "column": 44}}, {"id": 667, "type": "ERROR", "text": "private:", "parent": 116, "children": [], "start_point": {"row": 116, "column": 0}, "end_point": {"row": 116, "column": 8}}, {"id": 668, "type": "declaration", "text": "void initState();", "parent": 116, "children": [669, 670], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 19}}, {"id": 669, "type": "primitive_type", "text": "void", "parent": 668, "children": [], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 6}}, {"id": 670, "type": "function_declarator", "text": "initState()", "parent": 668, "children": [671, 672], "start_point": {"row": 117, "column": 7}, "end_point": {"row": 117, "column": 18}}, {"id": 671, "type": "identifier", "text": "initState", "parent": 670, "children": [], "start_point": {"row": 117, "column": 7}, "end_point": {"row": 117, "column": 16}}, {"id": 672, "type": "parameter_list", "text": "()", "parent": 670, "children": [], "start_point": {"row": 117, "column": 16}, "end_point": {"row": 117, "column": 18}}, {"id": 673, "type": "ERROR", "text": "void initAvailableToggleBitset(BACKENDTYPE backendType) override;", "parent": 116, "children": [674, 675], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 118, "column": 67}}, {"id": 674, "type": "primitive_type", "text": "void", "parent": 673, "children": [], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 118, "column": 6}}, {"id": 675, "type": "function_declarator", "text": "initAvailableToggleBitset(BACKENDTYPE backendType) override", "parent": 673, "children": [676, 677, 681], "start_point": {"row": 118, "column": 7}, "end_point": {"row": 118, "column": 66}}, {"id": 676, "type": "identifier", "text": "initAvailableToggleBitset", "parent": 675, "children": [], "start_point": {"row": 118, "column": 7}, "end_point": {"row": 118, "column": 32}}, {"id": 677, "type": "parameter_list", "text": "(BACKENDTYPE backendType)", "parent": 675, "children": [678], "start_point": {"row": 118, "column": 32}, "end_point": {"row": 118, "column": 57}}, {"id": 678, "type": "parameter_declaration", "text": "BACKENDTYPE backendType", "parent": 677, "children": [679, 680], "start_point": {"row": 118, "column": 33}, "end_point": {"row": 118, "column": 56}}, {"id": 679, "type": "type_identifier", "text": "BACKENDTYPE", "parent": 678, "children": [], "start_point": {"row": 118, "column": 33}, "end_point": {"row": 118, "column": 44}}, {"id": 680, "type": "identifier", "text": "backendType", "parent": 678, "children": [], "start_point": {"row": 118, "column": 45}, "end_point": {"row": 118, "column": 56}}, {"id": 681, "type": "identifier", "text": "override", "parent": 675, "children": [], "start_point": {"row": 118, "column": 58}, "end_point": {"row": 118, "column": 66}}, {"id": 682, "type": "declaration", "text": "static void framebufferResizeCallback(GLFWwindow *window,\n int width,\n int height);", "parent": 116, "children": [683, 684], "start_point": {"row": 119, "column": 2}, "end_point": {"row": 121, "column": 52}}, {"id": 683, "type": "primitive_type", "text": "void", "parent": 682, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 13}}, {"id": 684, "type": "function_declarator", "text": "framebufferResizeCallback(GLFWwindow *window,\n int width,\n int height)", "parent": 682, "children": [685, 686], "start_point": {"row": 119, "column": 14}, "end_point": {"row": 121, "column": 51}}, {"id": 685, "type": "identifier", "text": "framebufferResizeCallback", "parent": 684, "children": [], "start_point": {"row": 119, "column": 14}, "end_point": {"row": 119, "column": 39}}, {"id": 686, "type": "parameter_list", "text": "(GLFWwindow *window,\n int width,\n int height)", "parent": 684, "children": [687, 692, 695], "start_point": {"row": 119, "column": 39}, "end_point": {"row": 121, "column": 51}}, {"id": 687, "type": "parameter_declaration", "text": "GLFWwindow *window", "parent": 686, "children": [688, 689], "start_point": {"row": 119, "column": 40}, "end_point": {"row": 119, "column": 58}}, {"id": 688, "type": "type_identifier", "text": "GLFWwindow", "parent": 687, "children": [], "start_point": {"row": 119, "column": 40}, "end_point": {"row": 119, "column": 50}}, {"id": 689, "type": "pointer_declarator", "text": "*window", "parent": 687, "children": [690, 691], "start_point": {"row": 119, "column": 51}, "end_point": {"row": 119, "column": 58}}, {"id": 690, "type": "*", "text": "*", "parent": 689, "children": [], "start_point": {"row": 119, "column": 51}, "end_point": {"row": 119, "column": 52}}, {"id": 691, "type": "identifier", "text": "window", "parent": 689, "children": [], "start_point": {"row": 119, "column": 52}, "end_point": {"row": 119, "column": 58}}, {"id": 692, "type": "parameter_declaration", "text": "int width", "parent": 686, "children": [693, 694], "start_point": {"row": 120, "column": 40}, "end_point": {"row": 120, "column": 49}}, {"id": 693, "type": "primitive_type", "text": "int", "parent": 692, "children": [], "start_point": {"row": 120, "column": 40}, "end_point": {"row": 120, "column": 43}}, {"id": 694, "type": "identifier", "text": "width", "parent": 692, "children": [], "start_point": {"row": 120, "column": 44}, "end_point": {"row": 120, "column": 49}}, {"id": 695, "type": "parameter_declaration", "text": "int height", "parent": 686, "children": [696, 697], "start_point": {"row": 121, "column": 40}, "end_point": {"row": 121, "column": 50}}, {"id": 696, "type": "primitive_type", "text": "int", "parent": 695, "children": [], "start_point": {"row": 121, "column": 40}, "end_point": {"row": 121, "column": 43}}, {"id": 697, "type": "identifier", "text": "height", "parent": 695, "children": [], "start_point": {"row": 121, "column": 44}, "end_point": {"row": 121, "column": 50}}, {"id": 698, "type": "declaration", "text": "GLFWwindow *mWindow;", "parent": 116, "children": [699, 700], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 22}}, {"id": 699, "type": "type_identifier", "text": "GLFWwindow", "parent": 698, "children": [], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 12}}, {"id": 700, "type": "pointer_declarator", "text": "*mWindow", "parent": 698, "children": [701, 702], "start_point": {"row": 123, "column": 13}, "end_point": {"row": 123, "column": 21}}, {"id": 701, "type": "*", "text": "*", "parent": 700, "children": [], "start_point": {"row": 123, "column": 13}, "end_point": {"row": 123, "column": 14}}, {"id": 702, "type": "identifier", "text": "mWindow", "parent": 700, "children": [], "start_point": {"row": 123, "column": 14}, "end_point": {"row": 123, "column": 21}}, {"id": 703, "type": "declaration", "text": "std::string mGLSLVersion;", "parent": 116, "children": [704, 705, 707], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 27}}, {"id": 704, "type": "type_identifier", "text": "std", "parent": 703, "children": [], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 5}}, {"id": 705, "type": "ERROR", "text": "::string", "parent": 703, "children": [706], "start_point": {"row": 124, "column": 5}, "end_point": {"row": 124, "column": 13}}, {"id": 706, "type": "identifier", "text": "string", "parent": 705, "children": [], "start_point": {"row": 124, "column": 7}, "end_point": {"row": 124, "column": 13}}, {"id": 707, "type": "identifier", "text": "mGLSLVersion", "parent": 703, "children": [], "start_point": {"row": 124, "column": 14}, "end_point": {"row": 124, "column": 26}}, {"id": 708, "type": "ERROR", "text": "#ifdef", "parent": 116, "children": [709], "start_point": {"row": 126, "column": 0}, "end_point": {"row": 126, "column": 6}}, {"id": 709, "type": "#ifdef", "text": "#ifdef", "parent": 708, "children": [], "start_point": {"row": 126, "column": 0}, "end_point": {"row": 126, "column": 6}}, {"id": 710, "type": "declaration", "text": "EGL_EGL_PROTOTYPES\n EGLBoolean FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config);", "parent": 116, "children": [711, 712, 714], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 129, "column": 46}}, {"id": 711, "type": "type_identifier", "text": "EGL_EGL_PROTOTYPES", "parent": 710, "children": [], "start_point": {"row": 126, "column": 7}, "end_point": {"row": 126, "column": 25}}, {"id": 712, "type": "ERROR", "text": "EGLBoolean", "parent": 710, "children": [713], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 127, "column": 12}}, {"id": 713, "type": "identifier", "text": "EGLBoolean", "parent": 712, "children": [], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 127, "column": 12}}, {"id": 714, "type": "function_declarator", "text": "FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config)", "parent": 710, "children": [715, 716], "start_point": {"row": 127, "column": 13}, "end_point": {"row": 129, "column": 45}}, {"id": 715, "type": "identifier", "text": "FindEGLConfig", "parent": 714, "children": [], "start_point": {"row": 127, "column": 13}, "end_point": {"row": 127, "column": 26}}, {"id": 716, "type": "parameter_list", "text": "(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config)", "parent": 714, "children": [717, 720, 725], "start_point": {"row": 127, "column": 26}, "end_point": {"row": 129, "column": 45}}, {"id": 717, "type": "parameter_declaration", "text": "EGLDisplay dpy", "parent": 716, "children": [718, 719], "start_point": {"row": 127, "column": 27}, "end_point": {"row": 127, "column": 41}}, {"id": 718, "type": "type_identifier", "text": "EGLDisplay", "parent": 717, "children": [], "start_point": {"row": 127, "column": 27}, "end_point": {"row": 127, "column": 37}}, {"id": 719, "type": "identifier", "text": "dpy", "parent": 717, "children": [], "start_point": {"row": 127, "column": 38}, "end_point": {"row": 127, "column": 41}}, {"id": 720, "type": "parameter_declaration", "text": "const EGLint *attrib_list", "parent": 716, "children": [721, 722], "start_point": {"row": 128, "column": 27}, "end_point": {"row": 128, "column": 52}}, {"id": 721, "type": "type_identifier", "text": "EGLint", "parent": 720, "children": [], "start_point": {"row": 128, "column": 33}, "end_point": {"row": 128, "column": 39}}, {"id": 722, "type": "pointer_declarator", "text": "*attrib_list", "parent": 720, "children": [723, 724], "start_point": {"row": 128, "column": 40}, "end_point": {"row": 128, "column": 52}}, {"id": 723, "type": "*", "text": "*", "parent": 722, "children": [], "start_point": {"row": 128, "column": 40}, "end_point": {"row": 128, "column": 41}}, {"id": 724, "type": "identifier", "text": "attrib_list", "parent": 722, "children": [], "start_point": {"row": 128, "column": 41}, "end_point": {"row": 128, "column": 52}}, {"id": 725, "type": "parameter_declaration", "text": "EGLConfig *config", "parent": 716, "children": [726, 727], "start_point": {"row": 129, "column": 27}, "end_point": {"row": 129, "column": 44}}, {"id": 726, "type": "type_identifier", "text": "EGLConfig", "parent": 725, "children": [], "start_point": {"row": 129, "column": 27}, "end_point": {"row": 129, "column": 36}}, {"id": 727, "type": "pointer_declarator", "text": "*config", "parent": 725, "children": [728, 729], "start_point": {"row": 129, "column": 37}, "end_point": {"row": 129, "column": 44}}, {"id": 728, "type": "*", "text": "*", "parent": 727, "children": [], "start_point": {"row": 129, "column": 37}, "end_point": {"row": 129, "column": 38}}, {"id": 729, "type": "identifier", "text": "config", "parent": 727, "children": [], "start_point": {"row": 129, "column": 38}, "end_point": {"row": 129, "column": 44}}, {"id": 730, "type": "declaration", "text": "EGLContext createContext(EGLContext share) const;\n\n EGLSurface mSurface;", "parent": 116, "children": [731, 732, 740], "start_point": {"row": 130, "column": 2}, "end_point": {"row": 132, "column": 22}}, {"id": 731, "type": "type_identifier", "text": "EGLContext", "parent": 730, "children": [], "start_point": {"row": 130, "column": 2}, "end_point": {"row": 130, "column": 12}}, {"id": 732, "type": "ERROR", "text": "createContext(EGLContext share) const;\n\n EGLSurface", "parent": 730, "children": [733, 739], "start_point": {"row": 130, "column": 13}, "end_point": {"row": 132, "column": 12}}, {"id": 733, "type": "function_declarator", "text": "createContext(EGLContext share) const", "parent": 732, "children": [734, 735], "start_point": {"row": 130, "column": 13}, "end_point": {"row": 130, "column": 50}}, {"id": 734, "type": "identifier", "text": "createContext", "parent": 733, "children": [], "start_point": {"row": 130, "column": 13}, "end_point": {"row": 130, "column": 26}}, {"id": 735, "type": "parameter_list", "text": "(EGLContext share)", "parent": 733, "children": [736], "start_point": {"row": 130, "column": 26}, "end_point": {"row": 130, "column": 44}}, {"id": 736, "type": "parameter_declaration", "text": "EGLContext share", "parent": 735, "children": [737, 738], "start_point": {"row": 130, "column": 27}, "end_point": {"row": 130, "column": 43}}, {"id": 737, "type": "type_identifier", "text": "EGLContext", "parent": 736, "children": [], "start_point": {"row": 130, "column": 27}, "end_point": {"row": 130, "column": 37}}, {"id": 738, "type": "identifier", "text": "share", "parent": 736, "children": [], "start_point": {"row": 130, "column": 38}, "end_point": {"row": 130, "column": 43}}, {"id": 739, "type": "identifier", "text": "EGLSurface", "parent": 732, "children": [], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 132, "column": 12}}, {"id": 740, "type": "identifier", "text": "mSurface", "parent": 730, "children": [], "start_point": {"row": 132, "column": 13}, "end_point": {"row": 132, "column": 21}}, {"id": 741, "type": "declaration", "text": "EGLContext mContext;", "parent": 116, "children": [742, 743], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 133, "column": 22}}, {"id": 742, "type": "type_identifier", "text": "EGLContext", "parent": 741, "children": [], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 133, "column": 12}}, {"id": 743, "type": "identifier", "text": "mContext", "parent": 741, "children": [], "start_point": {"row": 133, "column": 13}, "end_point": {"row": 133, "column": 21}}, {"id": 744, "type": "declaration", "text": "EGLDisplay mDisplay;", "parent": 116, "children": [745, 746], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 22}}, {"id": 745, "type": "type_identifier", "text": "EGLDisplay", "parent": 744, "children": [], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 12}}, {"id": 746, "type": "identifier", "text": "mDisplay", "parent": 744, "children": [], "start_point": {"row": 134, "column": 13}, "end_point": {"row": 134, "column": 21}}, {"id": 747, "type": "declaration", "text": "EGLConfig mConfig;", "parent": 116, "children": [748, 749], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 20}}, {"id": 748, "type": "type_identifier", "text": "EGLConfig", "parent": 747, "children": [], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 11}}, {"id": 749, "type": "identifier", "text": "mConfig", "parent": 747, "children": [], "start_point": {"row": 135, "column": 12}, "end_point": {"row": 135, "column": 19}}, {"id": 750, "type": "#endif", "text": "#endif", "parent": 116, "children": [], "start_point": {"row": 136, "column": 0}, "end_point": {"row": 136, "column": 6}}, {"id": 751, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 139, "column": 0}, "end_point": {"row": 139, "column": 6}}]}, "node_categories": {"declarations": {"functions": [52, 61, 76, 107, 118, 126, 133, 153, 158, 165, 194, 199, 206, 215, 235, 249, 263, 278, 291, 301, 310, 319, 343, 368, 373, 383, 398, 416, 437, 455, 460, 470, 480, 500, 512, 517, 529, 547, 569, 574, 589, 599, 627, 645, 656, 661, 670, 675, 684, 714, 733], "variables": [48, 50, 57, 64, 79, 82, 110, 121, 130, 136, 162, 168, 171, 176, 203, 209, 218, 223, 226, 229, 238, 243, 252, 257, 266, 269, 274, 281, 284, 287, 294, 297, 304, 307, 313, 322, 325, 335, 339, 346, 349, 360, 364, 371, 376, 381, 386, 391, 396, 401, 406, 414, 419, 424, 433, 440, 445, 451, 458, 463, 468, 473, 478, 483, 488, 493, 503, 508, 515, 520, 525, 532, 537, 543, 550, 555, 565, 572, 577, 582, 587, 592, 597, 602, 607, 612, 615, 618, 625, 630, 635, 640, 643, 648, 653, 664, 668, 678, 682, 687, 692, 695, 698, 703, 710, 717, 720, 725, 730, 736, 741, 744, 747], "classes": [], "imports": [6, 7, 12, 13, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 38, 39, 42, 43, 45, 46], "modules": [], "enums": []}, "statements": {"expressions": [67, 69, 94, 95, 99], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 11, 15, 16, 17, 41, 49, 51, 53, 55, 58, 62, 65, 66, 70, 73, 77, 80, 81, 83, 85, 87, 91, 92, 96, 98, 100, 102, 103, 104, 108, 111, 113, 114, 115, 119, 122, 123, 127, 129, 134, 137, 139, 141, 145, 146, 149, 150, 154, 156, 159, 161, 166, 169, 170, 175, 177, 179, 181, 185, 186, 190, 191, 195, 197, 200, 202, 207, 211, 212, 216, 219, 222, 224, 225, 227, 228, 231, 232, 236, 239, 242, 244, 246, 247, 250, 253, 256, 258, 260, 261, 264, 268, 273, 276, 279, 282, 283, 286, 289, 292, 295, 296, 299, 302, 305, 306, 311, 314, 315, 316, 320, 324, 326, 328, 334, 337, 338, 340, 344, 348, 350, 352, 359, 362, 363, 365, 369, 374, 377, 380, 384, 387, 390, 392, 395, 399, 402, 405, 407, 409, 413, 417, 420, 423, 425, 427, 432, 434, 438, 441, 443, 444, 446, 448, 449, 450, 452, 456, 461, 464, 467, 471, 474, 477, 481, 484, 487, 489, 491, 492, 494, 496, 497, 501, 504, 507, 509, 513, 518, 521, 524, 526, 530, 533, 535, 536, 538, 540, 541, 542, 544, 548, 551, 553, 554, 556, 558, 560, 561, 563, 564, 566, 570, 575, 578, 581, 583, 586, 590, 593, 596, 600, 603, 606, 608, 611, 614, 617, 619, 624, 628, 631, 634, 636, 639, 642, 646, 649, 652, 657, 659, 660, 662, 665, 666, 671, 676, 679, 680, 681, 685, 688, 691, 694, 697, 699, 702, 704, 706, 707, 709, 711, 713, 715, 718, 719, 721, 724, 726, 729, 731, 734, 737, 738, 739, 740, 742, 743, 745, 746, 748, 749, 750, 751], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 14, 20, 23, 26, 29, 32, 35, 40, 44, 47], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 52, "universal_type": "function", "name": "ContextGL", "text_snippet": "class ContextGL : public Context {\npublic:\n static ContextGL *create(BACKENDTYPE backendType);\n\n ~"}, {"node_id": 61, "universal_type": "function", "name": "unknown", "text_snippet": "create(BACKENDTYPE backendType)"}, {"node_id": 76, "universal_type": "function", "name": "unknown", "text_snippet": "initialize(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX"}, {"node_id": 107, "universal_type": "function", "name": "unknown", "text_snippet": "setWindowTitle(const std::string &text) override"}, {"node_id": 118, "universal_type": "function", "name": "unknown", "text_snippet": "ShouldQuit()"}, {"node_id": 126, "universal_type": "function", "name": "unknown", "text_snippet": "KeyBoardQuit() override"}, {"node_id": 133, "universal_type": "function", "name": "unknown", "text_snippet": "DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset"}, {"node_id": 153, "universal_type": "function", "name": "unknown", "text_snippet": "Terminate() override"}, {"node_id": 158, "universal_type": "function", "name": "unknown", "text_snippet": "showWindow() override"}, {"node_id": 165, "universal_type": "function", "name": "*fishCount,", "text_snippet": "updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<st"}, {"node_id": 194, "universal_type": "function", "name": "unknown", "text_snippet": "destoryImgUI() override"}, {"node_id": 199, "universal_type": "function", "name": "unknown", "text_snippet": "preFrame() override"}, {"node_id": 206, "universal_type": "function", "name": "unknown", "text_snippet": "enableBlend(bool flag) const"}, {"node_id": 215, "universal_type": "function", "name": "blend)", "text_snippet": "createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME"}, {"node_id": 235, "universal_type": "function", "name": "programId,", "text_snippet": "getUniformLocation(unsigned int programId, const std::string &name) const"}, {"node_id": 249, "universal_type": "function", "name": "programId,", "text_snippet": "getAttribLocation(unsigned int programId, const std::string &name) const"}, {"node_id": 263, "universal_type": "function", "name": "type)", "text_snippet": "setUniform(int index, const float *v, int type) const"}, {"node_id": 278, "universal_type": "function", "name": "index,", "text_snippet": "setTexture(const TextureGL &texture, int index, int unit) const"}, {"node_id": 291, "universal_type": "function", "name": "index)", "text_snippet": "setAttribs(const BufferGL &bufferGL, int index) const"}, {"node_id": 301, "universal_type": "function", "name": "unknown", "text_snippet": "setIndices(const BufferGL &bufferGL) const"}, {"node_id": 310, "universal_type": "function", "name": "unknown", "text_snippet": "drawElements(const BufferGL &buffer) const"}, {"node_id": 319, "universal_type": "function", "name": "isIndex)", "text_snippet": "createBuffer(int numComponents,\n std::vector<float> *buffer,\n "}, {"node_id": 343, "universal_type": "function", "name": "isIndex)", "text_snippet": "createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n "}, {"node_id": 368, "universal_type": "function", "name": "unknown", "text_snippet": "generateBuffer()"}, {"node_id": 373, "universal_type": "function", "name": "buf)", "text_snippet": "deleteBuffer(unsigned int buf)"}, {"node_id": 383, "universal_type": "function", "name": "target,", "text_snippet": "bindBuffer(unsigned int target, unsigned int buf)"}, {"node_id": 398, "universal_type": "function", "name": "target,", "text_snippet": "uploadBuffer(unsigned int target, const std::vector<float> &buf)"}, {"node_id": 416, "universal_type": "function", "name": "target,", "text_snippet": "uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf)"}, {"node_id": 437, "universal_type": "function", "name": "unknown", "text_snippet": "createProgram(const std::string &mVId,\n const std::string &mFId) override"}, {"node_id": 455, "universal_type": "function", "name": "unknown", "text_snippet": "generateProgram()"}, {"node_id": 460, "universal_type": "function", "name": "program)", "text_snippet": "setProgram(unsigned int program)"}, {"node_id": 470, "universal_type": "function", "name": "program)", "text_snippet": "deleteProgram(unsigned int program)"}, {"node_id": 480, "universal_type": "function", "name": "programId,", "text_snippet": "compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n "}, {"node_id": 500, "universal_type": "function", "name": "vao)", "text_snippet": "bindVAO(unsigned int vao) const"}, {"node_id": 512, "universal_type": "function", "name": "unknown", "text_snippet": "generateVAO()"}, {"node_id": 517, "universal_type": "function", "name": "vao)", "text_snippet": "deleteVAO(unsigned int vao)"}, {"node_id": 529, "universal_type": "function", "name": "unknown", "text_snippet": "createTexture(const std::string &name,\n const std::string &url) override"}, {"node_id": 547, "universal_type": "function", "name": "unknown", "text_snippet": "createTexture(const std::string &name,\n const std::vector<std::string> &urls"}, {"node_id": 569, "universal_type": "function", "name": "unknown", "text_snippet": "generateTexture()"}, {"node_id": 574, "universal_type": "function", "name": "target,", "text_snippet": "bindTexture(unsigned int target, unsigned int texture)"}, {"node_id": 589, "universal_type": "function", "name": "texture)", "text_snippet": "deleteTexture(unsigned int texture)"}, {"node_id": 599, "universal_type": "function", "name": "target,", "text_snippet": "uploadTexture(unsigned int target,\n unsigned int format,\n in"}, {"node_id": 627, "universal_type": "function", "name": "target,", "text_snippet": "setParameter(unsigned int target, unsigned int pname, int param)"}, {"node_id": 645, "universal_type": "function", "name": "target)", "text_snippet": "generateMipmap(unsigned int target)"}, {"node_id": 656, "universal_type": "function", "name": "unknown", "text_snippet": "updateAllFishData() override"}, {"node_id": 661, "universal_type": "function", "name": "unknown", "text_snippet": "ContextGL(BACKENDTYPE backendType)"}, {"node_id": 670, "universal_type": "function", "name": "unknown", "text_snippet": "initState()"}, {"node_id": 675, "universal_type": "function", "name": "unknown", "text_snippet": "initAvailableToggleBitset(BACKENDTYPE backendType) override"}, {"node_id": 684, "universal_type": "function", "name": "width,", "text_snippet": "framebufferResizeCallback(GLFWwindow *window,\n int width,\n "}, {"node_id": 714, "universal_type": "function", "name": "unknown", "text_snippet": "FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n "}, {"node_id": 733, "universal_type": "function", "name": "unknown", "text_snippet": "createContext(EGLContext share) const"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <vector>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 12, "text": "#include \"GLFW/glfw3.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 18, "text": "#include <memory>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"EGL/egl.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"EGL/eglext.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"EGL/eglext_angle.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"EGL/eglplatform.h\"\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"angle_gl.h\"\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 38, "text": "#include \"glad/glad.h\"\n"}, {"node_id": 39, "text": "#include"}, {"node_id": 42, "text": "#include \"../Aquarium.h\"\n"}, {"node_id": 43, "text": "#include"}, {"node_id": 45, "text": "#include \"../Context.h\"\n"}, {"node_id": 46, "text": "#include"}]}, "original_source_code": "//\n// Copyright (c) 2019 The Aquarium Project Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n//\n// ContextGL.h: Defines the accessing to graphics API of OpenGL.\n\n#ifndef CONTEXTGL_H\n#define CONTEXTGL_H\n\n#include <vector>\n\n#define GLFW_INCLUDE_NONE\n#include \"GLFW/glfw3.h\"\n\n#ifdef EGL_EGL_PROTOTYPES\n#include <memory>\n\n#include \"EGL/egl.h\"\n#include \"EGL/eglext.h\"\n#include \"EGL/eglext_angle.h\"\n#include \"EGL/eglplatform.h\"\n#include \"angle_gl.h\"\n#else\n#include \"glad/glad.h\"\n#endif\n\n#include \"../Aquarium.h\"\n#include \"../Context.h\"\n\nclass BufferGL;\nclass TextureGL;\n\nclass ContextGL : public Context {\npublic:\n static ContextGL *create(BACKENDTYPE backendType);\n\n ~ContextGL() override;\n\n bool initialize(\n BACKENDTYPE backend,\n const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)> &toggleBitset,\n int windowWidth,\n int windowHeight) override;\n void setWindowTitle(const std::string &text) override;\n bool ShouldQuit() override;\n void KeyBoardQuit() override;\n void DoFlush(const std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n &toggleBitset) override;\n void Terminate() override;\n void showWindow() override;\n void updateFPS(const FPSTimer &fpsTimer,\n int *fishCount,\n std::bitset<static_cast<size_t>(TOGGLE::TOGGLEMAX)>\n *toggleBitset) override;\n void destoryImgUI() override;\n\n void preFrame() override;\n void enableBlend(bool flag) const;\n\n Model *createModel(Aquarium *aquarium,\n MODELGROUP type,\n MODELNAME name,\n bool blend) override;\n int getUniformLocation(unsigned int programId, const std::string &name) const;\n int getAttribLocation(unsigned int programId, const std::string &name) const;\n void setUniform(int index, const float *v, int type) const;\n void setTexture(const TextureGL &texture, int index, int unit) const;\n void setAttribs(const BufferGL &bufferGL, int index) const;\n void setIndices(const BufferGL &bufferGL) const;\n void drawElements(const BufferGL &buffer) const;\n\n Buffer *createBuffer(int numComponents,\n std::vector<float> *buffer,\n bool isIndex) override;\n Buffer *createBuffer(int numComponents,\n std::vector<unsigned short> *buffer,\n bool isIndex) override;\n unsigned int generateBuffer();\n void deleteBuffer(unsigned int buf);\n void bindBuffer(unsigned int target, unsigned int buf);\n void uploadBuffer(unsigned int target, const std::vector<float> &buf);\n void uploadBuffer(unsigned int target,\n const std::vector<unsigned short> &buf);\n\n Program *createProgram(const std::string &mVId,\n const std::string &mFId) override;\n unsigned int generateProgram();\n void setProgram(unsigned int program);\n void deleteProgram(unsigned int program);\n bool compileProgram(unsigned int programId,\n const std::string &VertexShaderCode,\n const std::string &FragmentShaderCode);\n void bindVAO(unsigned int vao) const;\n unsigned int generateVAO();\n void deleteVAO(unsigned int vao);\n\n Texture *createTexture(const std::string &name,\n const std::string &url) override;\n Texture *createTexture(const std::string &name,\n const std::vector<std::string> &urls) override;\n unsigned int generateTexture();\n void bindTexture(unsigned int target, unsigned int texture);\n void deleteTexture(unsigned int texture);\n void uploadTexture(unsigned int target,\n unsigned int format,\n int width,\n int height,\n unsigned char *pixel);\n void setParameter(unsigned int target, unsigned int pname, int param);\n void generateMipmap(unsigned int target);\n void updateAllFishData() override;\n\nprotected:\n explicit ContextGL(BACKENDTYPE backendType);\n\nprivate:\n void initState();\n void initAvailableToggleBitset(BACKENDTYPE backendType) override;\n static void framebufferResizeCallback(GLFWwindow *window,\n int width,\n int height);\n\n GLFWwindow *mWindow;\n std::string mGLSLVersion;\n\n#ifdef EGL_EGL_PROTOTYPES\n EGLBoolean FindEGLConfig(EGLDisplay dpy,\n const EGLint *attrib_list,\n EGLConfig *config);\n EGLContext createContext(EGLContext share) const;\n\n EGLSurface mSurface;\n EGLContext mContext;\n EGLDisplay mDisplay;\n EGLConfig mConfig;\n#endif\n};\n\n#endif // CONTEXTGL_H\n"}
86
c
/** * Created by Crow on 11/13/18. * Copyright (c) 2018 Crow All rights reserved. * @author Crow * @brief this is for class Config -> to set the configuration for PlatinumServer * It's parse YAML file by the library yaml-cpp, You can find it on github * And Config mainly to provide an instance of Singleton. You can get it everywhere. * And you ask it the configuration is OK */ #ifndef PLATINUM_CONFIG_CONFIG_H #define PLATINUM_CONFIG_CONFIG_H #include <netinet/in.h> #include <cstring> #include <set> #include <string> #include <vector> #include <utility> namespace platinum { struct YAMLData { in_port_t port; int thread_num; bool log_enable; std::string index; std::string www_root; std::string default_root; std::string fcgi_root; std::string fcgi_listen_sock; std::pair<std::string, in_port_t> fcgi_inet_addr; std::string fcgi_unix_addr; std::set<std::string> method_list; std::set<std::string> static_resource; std::set<std::string> dynamic_resource; std::set<std::string> forbidden_resource; }; class Config { public: static Config &GetInstance(); Config(const Config &) = delete; Config operator=(const Config &) = delete; in_port_t port() const { return data_.port; } int thread_num() const { return data_.thread_num; } bool IsLogOn() const { return data_.log_enable; } std::string www_root() const { return data_.www_root; } std::string default_root() const { return data_.default_root; } std::string index() const { return data_.index; } std::string fcgi_root() const { return data_.fcgi_root; } std::string fcgi_unix() const { return data_.fcgi_unix_addr; } std::string fcgi_inet_ip() const { return data_.fcgi_inet_addr.first; } in_port_t fcgi_inet_port() const { return data_.fcgi_inet_addr.second; } bool IsInetAddr() const { return data_.fcgi_listen_sock == "inet"; } bool IsUnixAddr() const { return data_.fcgi_listen_sock == "unix"; } const std::set<std::string> &method_list() const { return data_.method_list; } const std::set<std::string> &static_resource() const { return data_.static_resource; } const std::set<std::string> &dynamic_resource() const { return data_.dynamic_resource; } const std::set<std::string> &forbidden_resource() const { return data_.forbidden_resource; } private: explicit Config(YAMLData &&data) : data_(data) { ; } static YAMLData GetData(); YAMLData data_; }; } #endif //PLATINUM_CONFIG_CONFIG_H
39.61
62
(translation_unit) "/**\n* Created by Crow on 11/13/18.\n* Copyright (c) 2018 Crow All rights reserved.\n* @author Crow\n* @brief this is for class Config -> to set the configuration for PlatinumServer\n* It's parse YAML file by the library yaml-cpp, You can find it on github\n* And Config mainly to provide an instance of Singleton. You can get it everywhere.\n* And you ask it the configuration is OK\n*/\n\n#ifndef PLATINUM_CONFIG_CONFIG_H\n#define PLATINUM_CONFIG_CONFIG_H\n\n#include <netinet/in.h>\n#include <cstring>\n#include <set>\n#include <string>\n#include <vector>\n#include <utility>\n\nnamespace platinum {\n\nstruct YAMLData {\n in_port_t port;\n int thread_num;\n\n bool log_enable;\n\n std::string index;\n std::string www_root;\n std::string default_root;\n std::string fcgi_root;\n\n std::string fcgi_listen_sock;\n std::pair<std::string, in_port_t> fcgi_inet_addr;\n std::string fcgi_unix_addr;\n\n std::set<std::string> method_list;\n std::set<std::string> static_resource;\n std::set<std::string> dynamic_resource;\n std::set<std::string> forbidden_resource;\n};\n\nclass Config {\n public:\n static Config &GetInstance();\n\n Config(const Config &) = delete;\n Config operator=(const Config &) = delete;\n\n in_port_t port() const { return data_.port; }\n int thread_num() const { return data_.thread_num; }\n\n bool IsLogOn() const { return data_.log_enable; }\n\n std::string www_root() const { return data_.www_root; }\n std::string default_root() const { return data_.default_root; }\n std::string index() const { return data_.index; }\n\n std::string fcgi_root() const { return data_.fcgi_root; }\n std::string fcgi_unix() const { return data_.fcgi_unix_addr; }\n std::string fcgi_inet_ip() const { return data_.fcgi_inet_addr.first; }\n in_port_t fcgi_inet_port() const { return data_.fcgi_inet_addr.second; }\n\n bool IsInetAddr() const { return data_.fcgi_listen_sock == "inet"; }\n bool IsUnixAddr() const { return data_.fcgi_listen_sock == "unix"; }\n\n const std::set<std::string> &method_list() const { return data_.method_list; }\n const std::set<std::string> &static_resource() const { return data_.static_resource; }\n const std::set<std::string> &dynamic_resource() const { return data_.dynamic_resource; }\n const std::set<std::string> &forbidden_resource() const { return data_.forbidden_resource; }\n\n private:\n explicit Config(YAMLData &&data) : data_(data) { ; }\n static YAMLData GetData();\n\n YAMLData data_;\n};\n\n}\n\n#endif //PLATINUM_CONFIG_CONFIG_H\n" (comment) "/**\n* Created by Crow on 11/13/18.\n* Copyright (c) 2018 Crow All rights reserved.\n* @author Crow\n* @brief this is for class Config -> to set the configuration for PlatinumServer\n* It's parse YAML file by the library yaml-cpp, You can find it on github\n* And Config mainly to provide an instance of Singleton. You can get it everywhere.\n* And you ask it the configuration is OK\n*/" (preproc_ifdef) "#ifndef PLATINUM_CONFIG_CONFIG_H\n#define PLATINUM_CONFIG_CONFIG_H\n\n#include <netinet/in.h>\n#include <cstring>\n#include <set>\n#include <string>\n#include <vector>\n#include <utility>\n\nnamespace platinum {\n\nstruct YAMLData {\n in_port_t port;\n int thread_num;\n\n bool log_enable;\n\n std::string index;\n std::string www_root;\n std::string default_root;\n std::string fcgi_root;\n\n std::string fcgi_listen_sock;\n std::pair<std::string, in_port_t> fcgi_inet_addr;\n std::string fcgi_unix_addr;\n\n std::set<std::string> method_list;\n std::set<std::string> static_resource;\n std::set<std::string> dynamic_resource;\n std::set<std::string> forbidden_resource;\n};\n\nclass Config {\n public:\n static Config &GetInstance();\n\n Config(const Config &) = delete;\n Config operator=(const Config &) = delete;\n\n in_port_t port() const { return data_.port; }\n int thread_num() const { return data_.thread_num; }\n\n bool IsLogOn() const { return data_.log_enable; }\n\n std::string www_root() const { return data_.www_root; }\n std::string default_root() const { return data_.default_root; }\n std::string index() const { return data_.index; }\n\n std::string fcgi_root() const { return data_.fcgi_root; }\n std::string fcgi_unix() const { return data_.fcgi_unix_addr; }\n std::string fcgi_inet_ip() const { return data_.fcgi_inet_addr.first; }\n in_port_t fcgi_inet_port() const { return data_.fcgi_inet_addr.second; }\n\n bool IsInetAddr() const { return data_.fcgi_listen_sock == "inet"; }\n bool IsUnixAddr() const { return data_.fcgi_listen_sock == "unix"; }\n\n const std::set<std::string> &method_list() const { return data_.method_list; }\n const std::set<std::string> &static_resource() const { return data_.static_resource; }\n const std::set<std::string> &dynamic_resource() const { return data_.dynamic_resource; }\n const std::set<std::string> &forbidden_resource() const { return data_.forbidden_resource; }\n\n private:\n explicit Config(YAMLData &&data) : data_(data) { ; }\n static YAMLData GetData();\n\n YAMLData data_;\n};\n\n}\n\n#endif" (#ifndef) "#ifndef" (identifier) "PLATINUM_CONFIG_CONFIG_H" (preproc_def) "#define PLATINUM_CONFIG_CONFIG_H\n" (#define) "#define" (identifier) "PLATINUM_CONFIG_CONFIG_H" (preproc_include) "#include <netinet/in.h>\n" (#include) "#include" (system_lib_string) "<netinet/in.h>" (preproc_include) "#include <cstring>\n" (#include) "#include" (system_lib_string) "<cstring>" (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 <vector>\n" (#include) "#include" (system_lib_string) "<vector>" (preproc_include) "#include <utility>\n" (#include) "#include" (system_lib_string) "<utility>" (function_definition) "namespace platinum {\n\nstruct YAMLData {\n in_port_t port;\n int thread_num;\n\n bool log_enable;\n\n std::string index;\n std::string www_root;\n std::string default_root;\n std::string fcgi_root;\n\n std::string fcgi_listen_sock;\n std::pair<std::string, in_port_t> fcgi_inet_addr;\n std::string fcgi_unix_addr;\n\n std::set<std::string> method_list;\n std::set<std::string> static_resource;\n std::set<std::string> dynamic_resource;\n std::set<std::string> forbidden_resource;\n};\n\nclass Config {\n public:\n static Config &GetInstance();\n\n Config(const Config &) = delete;\n Config operator=(const Config &) = delete;\n\n in_port_t port() const { return data_.port; }\n int thread_num() const { return data_.thread_num; }\n\n bool IsLogOn() const { return data_.log_enable; }\n\n std::string www_root() const { return data_.www_root; }\n std::string default_root() const { return data_.default_root; }\n std::string index() const { return data_.index; }\n\n std::string fcgi_root() const { return data_.fcgi_root; }\n std::string fcgi_unix() const { return data_.fcgi_unix_addr; }\n std::string fcgi_inet_ip() const { return data_.fcgi_inet_addr.first; }\n in_port_t fcgi_inet_port() const { return data_.fcgi_inet_addr.second; }\n\n bool IsInetAddr() const { return data_.fcgi_listen_sock == "inet"; }\n bool IsUnixAddr() const { return data_.fcgi_listen_sock == "unix"; }\n\n const std::set<std::string> &method_list() const { return data_.method_list; }\n const std::set<std::string> &static_resource() const { return data_.static_resource; }\n const std::set<std::string> &dynamic_resource() const { return data_.dynamic_resource; }\n const std::set<std::string> &forbidden_resource() const { return data_.forbidden_resource; }\n\n private:\n explicit Config(YAMLData &&data) : data_(data) { ; }\n static YAMLData GetData();\n\n YAMLData data_;\n};\n\n}" (type_identifier) "namespace" (identifier) "platinum" (compound_statement) "{\n\nstruct YAMLData {\n in_port_t port;\n int thread_num;\n\n bool log_enable;\n\n std::string index;\n std::string www_root;\n std::string default_root;\n std::string fcgi_root;\n\n std::string fcgi_listen_sock;\n std::pair<std::string, in_port_t> fcgi_inet_addr;\n std::string fcgi_unix_addr;\n\n std::set<std::string> method_list;\n std::set<std::string> static_resource;\n std::set<std::string> dynamic_resource;\n std::set<std::string> forbidden_resource;\n};\n\nclass Config {\n public:\n static Config &GetInstance();\n\n Config(const Config &) = delete;\n Config operator=(const Config &) = delete;\n\n in_port_t port() const { return data_.port; }\n int thread_num() const { return data_.thread_num; }\n\n bool IsLogOn() const { return data_.log_enable; }\n\n std::string www_root() const { return data_.www_root; }\n std::string default_root() const { return data_.default_root; }\n std::string index() const { return data_.index; }\n\n std::string fcgi_root() const { return data_.fcgi_root; }\n std::string fcgi_unix() const { return data_.fcgi_unix_addr; }\n std::string fcgi_inet_ip() const { return data_.fcgi_inet_addr.first; }\n in_port_t fcgi_inet_port() const { return data_.fcgi_inet_addr.second; }\n\n bool IsInetAddr() const { return data_.fcgi_listen_sock == "inet"; }\n bool IsUnixAddr() const { return data_.fcgi_listen_sock == "unix"; }\n\n const std::set<std::string> &method_list() const { return data_.method_list; }\n const std::set<std::string> &static_resource() const { return data_.static_resource; }\n const std::set<std::string> &dynamic_resource() const { return data_.dynamic_resource; }\n const std::set<std::string> &forbidden_resource() const { return data_.forbidden_resource; }\n\n private:\n explicit Config(YAMLData &&data) : data_(data) { ; }\n static YAMLData GetData();\n\n YAMLData data_;\n};\n\n}" ({) "{" (struct_specifier) "struct YAMLData {\n in_port_t port;\n int thread_num;\n\n bool log_enable;\n\n std::string index;\n std::string www_root;\n std::string default_root;\n std::string fcgi_root;\n\n std::string fcgi_listen_sock;\n std::pair<std::string, in_port_t> fcgi_inet_addr;\n std::string fcgi_unix_addr;\n\n std::set<std::string> method_list;\n std::set<std::string> static_resource;\n std::set<std::string> dynamic_resource;\n std::set<std::string> forbidden_resource;\n}" (struct) "struct" (type_identifier) "YAMLData" (field_declaration_list) "{\n in_port_t port;\n int thread_num;\n\n bool log_enable;\n\n std::string index;\n std::string www_root;\n std::string default_root;\n std::string fcgi_root;\n\n std::string fcgi_listen_sock;\n std::pair<std::string, in_port_t> fcgi_inet_addr;\n std::string fcgi_unix_addr;\n\n std::set<std::string> method_list;\n std::set<std::string> static_resource;\n std::set<std::string> dynamic_resource;\n std::set<std::string> forbidden_resource;\n}" ({) "{" (field_declaration) "in_port_t port;" (type_identifier) "in_port_t" (field_identifier) "port" (;) ";" (field_declaration) "int thread_num;" (primitive_type) "int" (field_identifier) "thread_num" (;) ";" (field_declaration) "bool log_enable;" (primitive_type) "bool" (field_identifier) "log_enable" (;) ";" (field_declaration) "std::string index;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "index" (;) ";" (field_declaration) "std::string www_root;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "www_root" (;) ";" (field_declaration) "std::string default_root;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "default_root" (;) ";" (field_declaration) "std::string fcgi_root;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "fcgi_root" (;) ";" (field_declaration) "std::string fcgi_listen_sock;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "fcgi_listen_sock" (;) ";" (field_declaration) "std::pair<std::string, in_port_t> fcgi_inet_addr;" (type_identifier) "std" (ERROR) "::pair<" (:) ":" (:) ":" (field_identifier) "pair" (<) "<" (field_identifier) "std" (ERROR) ":" (:) ":" (bitfield_clause) ":string" (:) ":" (identifier) "string" (,) "," (ERROR) "in_port_t>" (field_identifier) "in_port_t" (>) ">" (field_identifier) "fcgi_inet_addr" (;) ";" (field_declaration) "std::string fcgi_unix_addr;" (type_identifier) "std" (ERROR) "::string" (:) ":" (:) ":" (field_identifier) "string" (field_identifier) "fcgi_unix_addr" (;) ";" (field_declaration) "std::set<std::string> method_list;" (type_identifier) "std" (ERROR) "::set<" (:) ":" (:) ":" (field_identifier) "set" (<) "<" (field_identifier) "std" (ERROR) ":" (:) ":" (bitfield_clause) ":string> method_list" (:) ":" (binary_expression) "string> method_list" (identifier) "string" (>) ">" (identifier) "method_list" (;) ";" (field_declaration) "std::set<std::string> static_resource;" (type_identifier) "std" (ERROR) "::set<" (:) ":" (:) ":" (field_identifier) "set" (<) "<" (field_identifier) "std" (ERROR) ":" (:) ":" (bitfield_clause) ":string> static_resource" (:) ":" (binary_expression) "string> static_resource" (identifier) "string" (>) ">" (identifier) "static_resource" (;) ";" (field_declaration) "std::set<std::string> dynamic_resource;" (type_identifier) "std" (ERROR) "::set<" (:) ":" (:) ":" (field_identifier) "set" (<) "<" (field_identifier) "std" (ERROR) ":" (:) ":" (bitfield_clause) ":string> dynamic_resource" (:) ":" (binary_expression) "string> dynamic_resource" (identifier) "string" (>) ">" (identifier) "dynamic_resource" (;) ";" (field_declaration) "std::set<std::string> forbidden_resource;" (type_identifier) "std" (ERROR) "::set<" (:) ":" (:) ":" (field_identifier) "set" (<) "<" (field_identifier) "std" (ERROR) ":" (:) ":" (bitfield_clause) ":string> forbidden_resource" (:) ":" (binary_expression) "string> forbidden_resource" (identifier) "string" (>) ">" (identifier) "forbidden_resource" (;) ";" (}) "}" (;) ";" (function_definition) "class Config {\n public:\n static Config &GetInstance();\n\n Config(const Config &) = delete;\n Config operator=(const Config &) = delete;\n\n in_port_t port() const { return data_.port; }\n int thread_num() const { return data_.thread_num; }\n\n bool IsLogOn() const { return data_.log_enable; }\n\n std::string www_root() const { return data_.www_root; }\n std::string default_root() const { return data_.default_root; }\n std::string index() const { return data_.index; }\n\n std::string fcgi_root() const { return data_.fcgi_root; }\n std::string fcgi_unix() const { return data_.fcgi_unix_addr; }\n std::string fcgi_inet_ip() const { return data_.fcgi_inet_addr.first; }\n in_port_t fcgi_inet_port() const { return data_.fcgi_inet_addr.second; }\n\n bool IsInetAddr() const { return data_.fcgi_listen_sock == "inet"; }\n bool IsUnixAddr() const { return data_.fcgi_listen_sock == "unix"; }\n\n const std::set<std::string> &method_list() const { return data_.method_list; }\n const std::set<std::string> &static_resource() const { return data_.static_resource; }\n const std::set<std::string> &dynamic_resource() const { return data_.dynamic_resource; }\n const std::set<std::string> &forbidden_resource() const { return data_.forbidden_resource; }\n\n private:\n explicit Config(YAMLData &&data) : data_(data) { ; }\n static YAMLData GetData();\n\n YAMLData data_;\n}" (type_identifier) "class" (identifier) "Config" (compound_statement) "{\n public:\n static Config &GetInstance();\n\n Config(const Config &) = delete;\n Config operator=(const Config &) = delete;\n\n in_port_t port() const { return data_.port; }\n int thread_num() const { return data_.thread_num; }\n\n bool IsLogOn() const { return data_.log_enable; }\n\n std::string www_root() const { return data_.www_root; }\n std::string default_root() const { return data_.default_root; }\n std::string index() const { return data_.index; }\n\n std::string fcgi_root() const { return data_.fcgi_root; }\n std::string fcgi_unix() const { return data_.fcgi_unix_addr; }\n std::string fcgi_inet_ip() const { return data_.fcgi_inet_addr.first; }\n in_port_t fcgi_inet_port() const { return data_.fcgi_inet_addr.second; }\n\n bool IsInetAddr() const { return data_.fcgi_listen_sock == "inet"; }\n bool IsUnixAddr() const { return data_.fcgi_listen_sock == "unix"; }\n\n const std::set<std::string> &method_list() const { return data_.method_list; }\n const std::set<std::string> &static_resource() const { return data_.static_resource; }\n const std::set<std::string> &dynamic_resource() const { return data_.dynamic_resource; }\n const std::set<std::string> &forbidden_resource() const { return data_.forbidden_resource; }\n\n private:\n explicit Config(YAMLData &&data) : data_(data) { ; }\n static YAMLData GetData();\n\n YAMLData data_;\n}" ({) "{" (labeled_statement) "public:\n static Config &GetInstance();" (statement_identifier) "public" (:) ":" (declaration) "static Config &GetInstance();" (storage_class_specifier) "static" (static) "static" (type_identifier) "Config" (ERROR) "&" (&) "&" (function_declarator) "GetInstance()" (identifier) "GetInstance" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "Config(const Config &) = delete;" (macro_type_specifier) "Config(const Config &)" (identifier) "Config" (() "(" (type_descriptor) "const Config" (type_qualifier) "const" (const) "const" (type_identifier) "Config" (ERROR) "&" (&) "&" ()) ")" (ERROR) "=" (=) "=" (identifier) "delete" (;) ";" (declaration) "Config operator=(const Config &) = delete;" (type_identifier) "Config" (init_declarator) "operator=(const Config &) = delete" (identifier) "operator" (=) "=" (cast_expression) "(const Config &) = delete" (() "(" (type_descriptor) "const Config" (type_qualifier) "const" (const) "const" (type_identifier) "Config" (ERROR) "&" (&) "&" ()) ")" (ERROR) "=" (=) "=" (identifier) "delete" (;) ";" (ERROR) "in_port_t port() const" (type_identifier) "in_port_t" (function_declarator) "port()" (identifier) "port" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return data_.port; }" ({) "{" (return_statement) "return data_.port;" (return) "return" (field_expression) "data_.port" (identifier) "data_" (.) "." (field_identifier) "port" (;) ";" (}) "}" (ERROR) "int thread_num() const" (primitive_type) "int" (function_declarator) "thread_num()" (identifier) "thread_num" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return data_.thread_num; }" ({) "{" (return_statement) "return data_.thread_num;" (return) "return" (field_expression) "data_.thread_num" (identifier) "data_" (.) "." (field_identifier) "thread_num" (;) ";" (}) "}" (ERROR) "bool IsLogOn() const" (primitive_type) "bool" (function_declarator) "IsLogOn()" (identifier) "IsLogOn" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return data_.log_enable; }" ({) "{" (return_statement) "return data_.log_enable;" (return) "return" (field_expression) "data_.log_enable" (identifier) "data_" (.) "." (field_identifier) "log_enable" (;) ";" (}) "}" (labeled_statement) "std::string www_root() const { return data_.www_root; }" (statement_identifier) "std" (:) ":" (ERROR) ":string www_root() const" (:) ":" (type_identifier) "string" (function_declarator) "www_root() const" (identifier) "www_root" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ return data_.www_root; }" ({) "{" (return_statement) "return data_.www_root;" (return) "return" (field_expression) "data_.www_root" (identifier) "data_" (.) "." (field_identifier) "www_root" (;) ";" (}) "}" (labeled_statement) "std::string default_root() const { return data_.default_root; }" (statement_identifier) "std" (:) ":" (ERROR) ":string default_root() const" (:) ":" (type_identifier) "string" (function_declarator) "default_root() const" (identifier) "default_root" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ return data_.default_root; }" ({) "{" (return_statement) "return data_.default_root;" (return) "return" (field_expression) "data_.default_root" (identifier) "data_" (.) "." (field_identifier) "default_root" (;) ";" (}) "}" (labeled_statement) "std::string index() const { return data_.index; }" (statement_identifier) "std" (:) ":" (ERROR) ":string index() const" (:) ":" (type_identifier) "string" (function_declarator) "index() const" (identifier) "index" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ return data_.index; }" ({) "{" (return_statement) "return data_.index;" (return) "return" (field_expression) "data_.index" (identifier) "data_" (.) "." (field_identifier) "index" (;) ";" (}) "}" (labeled_statement) "std::string fcgi_root() const { return data_.fcgi_root; }" (statement_identifier) "std" (:) ":" (ERROR) ":string fcgi_root() const" (:) ":" (type_identifier) "string" (function_declarator) "fcgi_root() const" (identifier) "fcgi_root" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ return data_.fcgi_root; }" ({) "{" (return_statement) "return data_.fcgi_root;" (return) "return" (field_expression) "data_.fcgi_root" (identifier) "data_" (.) "." (field_identifier) "fcgi_root" (;) ";" (}) "}" (labeled_statement) "std::string fcgi_unix() const { return data_.fcgi_unix_addr; }" (statement_identifier) "std" (:) ":" (ERROR) ":string fcgi_unix() const" (:) ":" (type_identifier) "string" (function_declarator) "fcgi_unix() const" (identifier) "fcgi_unix" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ return data_.fcgi_unix_addr; }" ({) "{" (return_statement) "return data_.fcgi_unix_addr;" (return) "return" (field_expression) "data_.fcgi_unix_addr" (identifier) "data_" (.) "." (field_identifier) "fcgi_unix_addr" (;) ";" (}) "}" (labeled_statement) "std::string fcgi_inet_ip() const { return data_.fcgi_inet_addr.first; }" (statement_identifier) "std" (:) ":" (ERROR) ":string fcgi_inet_ip() const" (:) ":" (type_identifier) "string" (function_declarator) "fcgi_inet_ip() const" (identifier) "fcgi_inet_ip" (parameter_list) "()" (() "(" ()) ")" (identifier) "const" (compound_statement) "{ return data_.fcgi_inet_addr.first; }" ({) "{" (return_statement) "return data_.fcgi_inet_addr.first;" (return) "return" (field_expression) "data_.fcgi_inet_addr.first" (field_expression) "data_.fcgi_inet_addr" (identifier) "data_" (.) "." (field_identifier) "fcgi_inet_addr" (.) "." (field_identifier) "first" (;) ";" (}) "}" (ERROR) "in_port_t fcgi_inet_port() const" (type_identifier) "in_port_t" (function_declarator) "fcgi_inet_port()" (identifier) "fcgi_inet_port" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return data_.fcgi_inet_addr.second; }" ({) "{" (return_statement) "return data_.fcgi_inet_addr.second;" (return) "return" (field_expression) "data_.fcgi_inet_addr.second" (field_expression) "data_.fcgi_inet_addr" (identifier) "data_" (.) "." (field_identifier) "fcgi_inet_addr" (.) "." (field_identifier) "second" (;) ";" (}) "}" (ERROR) "bool IsInetAddr() const" (primitive_type) "bool" (function_declarator) "IsInetAddr()" (identifier) "IsInetAddr" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return data_.fcgi_listen_sock == "inet"; }" ({) "{" (return_statement) "return data_.fcgi_listen_sock == "inet";" (return) "return" (binary_expression) "data_.fcgi_listen_sock == "inet"" (field_expression) "data_.fcgi_listen_sock" (identifier) "data_" (.) "." (field_identifier) "fcgi_listen_sock" (==) "==" (string_literal) ""inet"" (") """ (string_content) "inet" (") """ (;) ";" (}) "}" (ERROR) "bool IsUnixAddr() const" (primitive_type) "bool" (function_declarator) "IsUnixAddr()" (identifier) "IsUnixAddr" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return data_.fcgi_listen_sock == "unix"; }" ({) "{" (return_statement) "return data_.fcgi_listen_sock == "unix";" (return) "return" (binary_expression) "data_.fcgi_listen_sock == "unix"" (field_expression) "data_.fcgi_listen_sock" (identifier) "data_" (.) "." (field_identifier) "fcgi_listen_sock" (==) "==" (string_literal) ""unix"" (") """ (string_content) "unix" (") """ (;) ";" (}) "}" (ERROR) "const std::set<std::string> &method_list() const" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::set<std::string> &" (:) ":" (:) ":" (identifier) "set" (<) "<" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (>) ">" (&) "&" (function_declarator) "method_list()" (identifier) "method_list" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return data_.method_list; }" ({) "{" (return_statement) "return data_.method_list;" (return) "return" (field_expression) "data_.method_list" (identifier) "data_" (.) "." (field_identifier) "method_list" (;) ";" (}) "}" (ERROR) "const std::set<std::string> &static_resource() const" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::set<std::string> &" (:) ":" (:) ":" (identifier) "set" (<) "<" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (>) ">" (&) "&" (function_declarator) "static_resource()" (identifier) "static_resource" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return data_.static_resource; }" ({) "{" (return_statement) "return data_.static_resource;" (return) "return" (field_expression) "data_.static_resource" (identifier) "data_" (.) "." (field_identifier) "static_resource" (;) ";" (}) "}" (ERROR) "const std::set<std::string> &dynamic_resource() const" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::set<std::string> &" (:) ":" (:) ":" (identifier) "set" (<) "<" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (>) ">" (&) "&" (function_declarator) "dynamic_resource()" (identifier) "dynamic_resource" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return data_.dynamic_resource; }" ({) "{" (return_statement) "return data_.dynamic_resource;" (return) "return" (field_expression) "data_.dynamic_resource" (identifier) "data_" (.) "." (field_identifier) "dynamic_resource" (;) ";" (}) "}" (ERROR) "const std::set<std::string> &forbidden_resource() const" (type_qualifier) "const" (const) "const" (type_identifier) "std" (ERROR) "::set<std::string> &" (:) ":" (:) ":" (identifier) "set" (<) "<" (identifier) "std" (:) ":" (:) ":" (identifier) "string" (>) ">" (&) "&" (function_declarator) "forbidden_resource()" (identifier) "forbidden_resource" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return data_.forbidden_resource; }" ({) "{" (return_statement) "return data_.forbidden_resource;" (return) "return" (field_expression) "data_.forbidden_resource" (identifier) "data_" (.) "." (field_identifier) "forbidden_resource" (;) ";" (}) "}" (labeled_statement) "private:\n explicit Config(YAMLData &&data) : data_(data) { ; }" (statement_identifier) "private" (:) ":" (ERROR) "explicit Config(YAMLData &&data) : data_(data)" (type_identifier) "explicit" (function_declarator) "Config(YAMLData &&data) : data_(data)" (identifier) "Config" (parameter_list) "(YAMLData &&data)" (() "(" (parameter_declaration) "YAMLData &&data" (type_identifier) "YAMLData" (ERROR) "&&" (&&) "&&" (identifier) "data" ()) ")" (ERROR) ":" (:) ":" (call_expression) "data_(data)" (identifier) "data_" (argument_list) "(data)" (() "(" (identifier) "data" ()) ")" (compound_statement) "{ ; }" ({) "{" (expression_statement) ";" (;) ";" (}) "}" (declaration) "static YAMLData GetData();" (storage_class_specifier) "static" (static) "static" (type_identifier) "YAMLData" (function_declarator) "GetData()" (identifier) "GetData" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "YAMLData data_;" (type_identifier) "YAMLData" (identifier) "data_" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (#endif) "#endif" (comment) "//PLATINUM_CONFIG_CONFIG_H"
678
45
{"language": "c", "success": true, "metadata": {"lines": 62, "avg_line_length": 39.61, "nodes": 364, "errors": 0, "source_hash": "81b7786ce643f120a835e8eeedacc220f0fb31691da5286256c41f749156627c", "categorized_nodes": 265}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef PLATINUM_CONFIG_CONFIG_H\n#define PLATINUM_CONFIG_CONFIG_H\n\n#include <netinet/in.h>\n#include <cstring>\n#include <set>\n#include <string>\n#include <vector>\n#include <utility>\n\nnamespace platinum {\n\nstruct YAMLData {\n in_port_t port;\n int thread_num;\n\n bool log_enable;\n\n std::string index;\n std::string www_root;\n std::string default_root;\n std::string fcgi_root;\n\n std::string fcgi_listen_sock;\n std::pair<std::string, in_port_t> fcgi_inet_addr;\n std::string fcgi_unix_addr;\n\n std::set<std::string> method_list;\n std::set<std::string> static_resource;\n std::set<std::string> dynamic_resource;\n std::set<std::string> forbidden_resource;\n};\n\nclass Config {\n public:\n static Config &GetInstance();\n\n Config(const Config &) = delete;\n Config operator=(const Config &) = delete;\n\n in_port_t port() const { return data_.port; }\n int thread_num() const { return data_.thread_num; }\n\n bool IsLogOn() const { return data_.log_enable; }\n\n std::string www_root() const { return data_.www_root; }\n std::string default_root() const { return data_.default_root; }\n std::string index() const { return data_.index; }\n\n std::string fcgi_root() const { return data_.fcgi_root; }\n std::string fcgi_unix() const { return data_.fcgi_unix_addr; }\n std::string fcgi_inet_ip() const { return data_.fcgi_inet_addr.first; }\n in_port_t fcgi_inet_port() const { return data_.fcgi_inet_addr.second; }\n\n bool IsInetAddr() const { return data_.fcgi_listen_sock == \"inet\"; }\n bool IsUnixAddr() const { return data_.fcgi_listen_sock == \"unix\"; }\n\n const std::set<std::string> &method_list() const { return data_.method_list; }\n const std::set<std::string> &static_resource() const { return data_.static_resource; }\n const std::set<std::string> &dynamic_resource() const { return data_.dynamic_resource; }\n const std::set<std::string> &forbidden_resource() const { return data_.forbidden_resource; }\n\n private:\n explicit Config(YAMLData &&data) : data_(data) { ; }\n static YAMLData GetData();\n\n YAMLData data_;\n};\n\n}\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 363], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 81, "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": "PLATINUM_CONFIG_CONFIG_H", "parent": 0, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 32}}, {"id": 3, "type": "preproc_def", "text": "#define PLATINUM_CONFIG_CONFIG_H\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": "PLATINUM_CONFIG_CONFIG_H", "parent": 3, "children": [], "start_point": {"row": 11, "column": 8}, "end_point": {"row": 11, "column": 32}}, {"id": 6, "type": "preproc_include", "text": "#include <netinet/in.h>\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": "system_lib_string", "text": "<netinet/in.h>", "parent": 6, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 23}}, {"id": 9, "type": "preproc_include", "text": "#include <cstring>\n", "parent": 0, "children": [10, 11], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 10, "type": "#include", "text": "#include", "parent": 9, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 11, "type": "system_lib_string", "text": "<cstring>", "parent": 9, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 18}}, {"id": 12, "type": "preproc_include", "text": "#include <set>\n", "parent": 0, "children": [13, 14], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 13, "type": "#include", "text": "#include", "parent": 12, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 14, "type": "system_lib_string", "text": "<set>", "parent": 12, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 14}}, {"id": 15, "type": "preproc_include", "text": "#include <string>\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": "system_lib_string", "text": "<string>", "parent": 15, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 17}}, {"id": 18, "type": "preproc_include", "text": "#include <vector>\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": "system_lib_string", "text": "<vector>", "parent": 18, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 17}}, {"id": 21, "type": "preproc_include", "text": "#include <utility>\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": "system_lib_string", "text": "<utility>", "parent": 21, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 18}}, {"id": 24, "type": "function_definition", "text": "namespace platinum {\n\nstruct YAMLData {\n in_port_t port;\n int thread_num;\n\n bool log_enable;\n\n std::string index;\n std::string www_root;\n std::string default_root;\n std::string fcgi_root;\n\n std::string fcgi_listen_sock;\n std::pair<std::string, in_port_t> fcgi_inet_addr;\n std::string fcgi_unix_addr;\n\n std::set<std::string> method_list;\n std::set<std::string> static_resource;\n std::set<std::string> dynamic_resource;\n std::set<std::string> forbidden_resource;\n};\n\nclass Config {\n public:\n static Config &GetInstance();\n\n Config(const Config &) = delete;\n Config operator=(const Config &) = delete;\n\n in_port_t port() const { return data_.port; }\n int thread_num() const { return data_.thread_num; }\n\n bool IsLogOn() const { return data_.log_enable; }\n\n std::string www_root() const { return data_.www_root; }\n std::string default_root() const { return data_.default_root; }\n std::string index() const { return data_.index; }\n\n std::string fcgi_root() const { return data_.fcgi_root; }\n std::string fcgi_unix() const { return data_.fcgi_unix_addr; }\n std::string fcgi_inet_ip() const { return data_.fcgi_inet_addr.first; }\n in_port_t fcgi_inet_port() const { return data_.fcgi_inet_addr.second; }\n\n bool IsInetAddr() const { return data_.fcgi_listen_sock == \"inet\"; }\n bool IsUnixAddr() const { return data_.fcgi_listen_sock == \"unix\"; }\n\n const std::set<std::string> &method_list() const { return data_.method_list; }\n const std::set<std::string> &static_resource() const { return data_.static_resource; }\n const std::set<std::string> &dynamic_resource() const { return data_.dynamic_resource; }\n const std::set<std::string> &forbidden_resource() const { return data_.forbidden_resource; }\n\n private:\n explicit Config(YAMLData &&data) : data_(data) { ; }\n static YAMLData GetData();\n\n YAMLData data_;\n};\n\n}", "parent": 0, "children": [25, 26], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 79, "column": 1}}, {"id": 25, "type": "type_identifier", "text": "namespace", "parent": 24, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 9}}, {"id": 26, "type": "identifier", "text": "platinum", "parent": 24, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 18}}, {"id": 27, "type": "struct_specifier", "text": "struct YAMLData {\n in_port_t port;\n int thread_num;\n\n bool log_enable;\n\n std::string index;\n std::string www_root;\n std::string default_root;\n std::string fcgi_root;\n\n std::string fcgi_listen_sock;\n std::pair<std::string, in_port_t> fcgi_inet_addr;\n std::string fcgi_unix_addr;\n\n std::set<std::string> method_list;\n std::set<std::string> static_resource;\n std::set<std::string> dynamic_resource;\n std::set<std::string> forbidden_resource;\n}", "parent": 24, "children": [28, 29], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 41, "column": 1}}, {"id": 28, "type": "struct", "text": "struct", "parent": 27, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 6}}, {"id": 29, "type": "type_identifier", "text": "YAMLData", "parent": 27, "children": [], "start_point": {"row": 22, "column": 7}, "end_point": {"row": 22, "column": 15}}, {"id": 30, "type": "field_declaration", "text": "in_port_t port;", "parent": 27, "children": [31, 32], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 17}}, {"id": 31, "type": "type_identifier", "text": "in_port_t", "parent": 30, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 11}}, {"id": 32, "type": "field_identifier", "text": "port", "parent": 30, "children": [], "start_point": {"row": 23, "column": 12}, "end_point": {"row": 23, "column": 16}}, {"id": 33, "type": "field_declaration", "text": "int thread_num;", "parent": 27, "children": [34, 35], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 17}}, {"id": 34, "type": "primitive_type", "text": "int", "parent": 33, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 5}}, {"id": 35, "type": "field_identifier", "text": "thread_num", "parent": 33, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 16}}, {"id": 36, "type": "field_declaration", "text": "bool log_enable;", "parent": 27, "children": [37, 38], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 18}}, {"id": 37, "type": "primitive_type", "text": "bool", "parent": 36, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 6}}, {"id": 38, "type": "field_identifier", "text": "log_enable", "parent": 36, "children": [], "start_point": {"row": 26, "column": 7}, "end_point": {"row": 26, "column": 17}}, {"id": 39, "type": "field_declaration", "text": "std::string index;", "parent": 27, "children": [40, 41, 43], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 20}}, {"id": 40, "type": "type_identifier", "text": "std", "parent": 39, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 5}}, {"id": 41, "type": "ERROR", "text": "::string", "parent": 39, "children": [42], "start_point": {"row": 28, "column": 5}, "end_point": {"row": 28, "column": 13}}, {"id": 42, "type": "field_identifier", "text": "string", "parent": 41, "children": [], "start_point": {"row": 28, "column": 7}, "end_point": {"row": 28, "column": 13}}, {"id": 43, "type": "field_identifier", "text": "index", "parent": 39, "children": [], "start_point": {"row": 28, "column": 14}, "end_point": {"row": 28, "column": 19}}, {"id": 44, "type": "field_declaration", "text": "std::string www_root;", "parent": 27, "children": [45, 46, 48], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 23}}, {"id": 45, "type": "type_identifier", "text": "std", "parent": 44, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 5}}, {"id": 46, "type": "ERROR", "text": "::string", "parent": 44, "children": [47], "start_point": {"row": 29, "column": 5}, "end_point": {"row": 29, "column": 13}}, {"id": 47, "type": "field_identifier", "text": "string", "parent": 46, "children": [], "start_point": {"row": 29, "column": 7}, "end_point": {"row": 29, "column": 13}}, {"id": 48, "type": "field_identifier", "text": "www_root", "parent": 44, "children": [], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 22}}, {"id": 49, "type": "field_declaration", "text": "std::string default_root;", "parent": 27, "children": [50, 51, 53], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 27}}, {"id": 50, "type": "type_identifier", "text": "std", "parent": 49, "children": [], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 5}}, {"id": 51, "type": "ERROR", "text": "::string", "parent": 49, "children": [52], "start_point": {"row": 30, "column": 5}, "end_point": {"row": 30, "column": 13}}, {"id": 52, "type": "field_identifier", "text": "string", "parent": 51, "children": [], "start_point": {"row": 30, "column": 7}, "end_point": {"row": 30, "column": 13}}, {"id": 53, "type": "field_identifier", "text": "default_root", "parent": 49, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 26}}, {"id": 54, "type": "field_declaration", "text": "std::string fcgi_root;", "parent": 27, "children": [55, 56, 58], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 24}}, {"id": 55, "type": "type_identifier", "text": "std", "parent": 54, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 5}}, {"id": 56, "type": "ERROR", "text": "::string", "parent": 54, "children": [57], "start_point": {"row": 31, "column": 5}, "end_point": {"row": 31, "column": 13}}, {"id": 57, "type": "field_identifier", "text": "string", "parent": 56, "children": [], "start_point": {"row": 31, "column": 7}, "end_point": {"row": 31, "column": 13}}, {"id": 58, "type": "field_identifier", "text": "fcgi_root", "parent": 54, "children": [], "start_point": {"row": 31, "column": 14}, "end_point": {"row": 31, "column": 23}}, {"id": 59, "type": "field_declaration", "text": "std::string fcgi_listen_sock;", "parent": 27, "children": [60, 61, 63], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 31}}, {"id": 60, "type": "type_identifier", "text": "std", "parent": 59, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 5}}, {"id": 61, "type": "ERROR", "text": "::string", "parent": 59, "children": [62], "start_point": {"row": 33, "column": 5}, "end_point": {"row": 33, "column": 13}}, {"id": 62, "type": "field_identifier", "text": "string", "parent": 61, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 13}}, {"id": 63, "type": "field_identifier", "text": "fcgi_listen_sock", "parent": 59, "children": [], "start_point": {"row": 33, "column": 14}, "end_point": {"row": 33, "column": 30}}, {"id": 64, "type": "field_declaration", "text": "std::pair<std::string, in_port_t> fcgi_inet_addr;", "parent": 27, "children": [65, 66, 69, 70, 72, 75], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 51}}, {"id": 65, "type": "type_identifier", "text": "std", "parent": 64, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 5}}, {"id": 66, "type": "ERROR", "text": "::pair<", "parent": 64, "children": [67, 68], "start_point": {"row": 34, "column": 5}, "end_point": {"row": 34, "column": 12}}, {"id": 67, "type": "field_identifier", "text": "pair", "parent": 66, "children": [], "start_point": {"row": 34, "column": 7}, "end_point": {"row": 34, "column": 11}}, {"id": 68, "type": "<", "text": "<", "parent": 66, "children": [], "start_point": {"row": 34, "column": 11}, "end_point": {"row": 34, "column": 12}}, {"id": 69, "type": "field_identifier", "text": "std", "parent": 64, "children": [], "start_point": {"row": 34, "column": 12}, "end_point": {"row": 34, "column": 15}}, {"id": 70, "type": "bitfield_clause", "text": ":string", "parent": 64, "children": [71], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 23}}, {"id": 71, "type": "identifier", "text": "string", "parent": 70, "children": [], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 23}}, {"id": 72, "type": "ERROR", "text": "in_port_t>", "parent": 64, "children": [73, 74], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 35}}, {"id": 73, "type": "field_identifier", "text": "in_port_t", "parent": 72, "children": [], "start_point": {"row": 34, "column": 25}, "end_point": {"row": 34, "column": 34}}, {"id": 74, "type": ">", "text": ">", "parent": 72, "children": [], "start_point": {"row": 34, "column": 34}, "end_point": {"row": 34, "column": 35}}, {"id": 75, "type": "field_identifier", "text": "fcgi_inet_addr", "parent": 64, "children": [], "start_point": {"row": 34, "column": 36}, "end_point": {"row": 34, "column": 50}}, {"id": 76, "type": "field_declaration", "text": "std::string fcgi_unix_addr;", "parent": 27, "children": [77, 78, 80], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 29}}, {"id": 77, "type": "type_identifier", "text": "std", "parent": 76, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 5}}, {"id": 78, "type": "ERROR", "text": "::string", "parent": 76, "children": [79], "start_point": {"row": 35, "column": 5}, "end_point": {"row": 35, "column": 13}}, {"id": 79, "type": "field_identifier", "text": "string", "parent": 78, "children": [], "start_point": {"row": 35, "column": 7}, "end_point": {"row": 35, "column": 13}}, {"id": 80, "type": "field_identifier", "text": "fcgi_unix_addr", "parent": 76, "children": [], "start_point": {"row": 35, "column": 14}, "end_point": {"row": 35, "column": 28}}, {"id": 81, "type": "field_declaration", "text": "std::set<std::string> method_list;", "parent": 27, "children": [82, 83, 86, 87], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 36}}, {"id": 82, "type": "type_identifier", "text": "std", "parent": 81, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 5}}, {"id": 83, "type": "ERROR", "text": "::set<", "parent": 81, "children": [84, 85], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 11}}, {"id": 84, "type": "field_identifier", "text": "set", "parent": 83, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 10}}, {"id": 85, "type": "<", "text": "<", "parent": 83, "children": [], "start_point": {"row": 37, "column": 10}, "end_point": {"row": 37, "column": 11}}, {"id": 86, "type": "field_identifier", "text": "std", "parent": 81, "children": [], "start_point": {"row": 37, "column": 11}, "end_point": {"row": 37, "column": 14}}, {"id": 87, "type": "bitfield_clause", "text": ":string> method_list", "parent": 81, "children": [88], "start_point": {"row": 37, "column": 15}, "end_point": {"row": 37, "column": 35}}, {"id": 88, "type": "binary_expression", "text": "string> method_list", "parent": 87, "children": [89, 90, 91], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 35}}, {"id": 89, "type": "identifier", "text": "string", "parent": 88, "children": [], "start_point": {"row": 37, "column": 16}, "end_point": {"row": 37, "column": 22}}, {"id": 90, "type": ">", "text": ">", "parent": 88, "children": [], "start_point": {"row": 37, "column": 22}, "end_point": {"row": 37, "column": 23}}, {"id": 91, "type": "identifier", "text": "method_list", "parent": 88, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 35}}, {"id": 92, "type": "field_declaration", "text": "std::set<std::string> static_resource;", "parent": 27, "children": [93, 94, 97, 98], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 40}}, {"id": 93, "type": "type_identifier", "text": "std", "parent": 92, "children": [], "start_point": {"row": 38, "column": 2}, "end_point": {"row": 38, "column": 5}}, {"id": 94, "type": "ERROR", "text": "::set<", "parent": 92, "children": [95, 96], "start_point": {"row": 38, "column": 5}, "end_point": {"row": 38, "column": 11}}, {"id": 95, "type": "field_identifier", "text": "set", "parent": 94, "children": [], "start_point": {"row": 38, "column": 7}, "end_point": {"row": 38, "column": 10}}, {"id": 96, "type": "<", "text": "<", "parent": 94, "children": [], "start_point": {"row": 38, "column": 10}, "end_point": {"row": 38, "column": 11}}, {"id": 97, "type": "field_identifier", "text": "std", "parent": 92, "children": [], "start_point": {"row": 38, "column": 11}, "end_point": {"row": 38, "column": 14}}, {"id": 98, "type": "bitfield_clause", "text": ":string> static_resource", "parent": 92, "children": [99], "start_point": {"row": 38, "column": 15}, "end_point": {"row": 38, "column": 39}}, {"id": 99, "type": "binary_expression", "text": "string> static_resource", "parent": 98, "children": [100, 101, 102], "start_point": {"row": 38, "column": 16}, "end_point": {"row": 38, "column": 39}}, {"id": 100, "type": "identifier", "text": "string", "parent": 99, "children": [], "start_point": {"row": 38, "column": 16}, "end_point": {"row": 38, "column": 22}}, {"id": 101, "type": ">", "text": ">", "parent": 99, "children": [], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 23}}, {"id": 102, "type": "identifier", "text": "static_resource", "parent": 99, "children": [], "start_point": {"row": 38, "column": 24}, "end_point": {"row": 38, "column": 39}}, {"id": 103, "type": "field_declaration", "text": "std::set<std::string> dynamic_resource;", "parent": 27, "children": [104, 105, 108, 109], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 41}}, {"id": 104, "type": "type_identifier", "text": "std", "parent": 103, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 5}}, {"id": 105, "type": "ERROR", "text": "::set<", "parent": 103, "children": [106, 107], "start_point": {"row": 39, "column": 5}, "end_point": {"row": 39, "column": 11}}, {"id": 106, "type": "field_identifier", "text": "set", "parent": 105, "children": [], "start_point": {"row": 39, "column": 7}, "end_point": {"row": 39, "column": 10}}, {"id": 107, "type": "<", "text": "<", "parent": 105, "children": [], "start_point": {"row": 39, "column": 10}, "end_point": {"row": 39, "column": 11}}, {"id": 108, "type": "field_identifier", "text": "std", "parent": 103, "children": [], "start_point": {"row": 39, "column": 11}, "end_point": {"row": 39, "column": 14}}, {"id": 109, "type": "bitfield_clause", "text": ":string> dynamic_resource", "parent": 103, "children": [110], "start_point": {"row": 39, "column": 15}, "end_point": {"row": 39, "column": 40}}, {"id": 110, "type": "binary_expression", "text": "string> dynamic_resource", "parent": 109, "children": [111, 112, 113], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 40}}, {"id": 111, "type": "identifier", "text": "string", "parent": 110, "children": [], "start_point": {"row": 39, "column": 16}, "end_point": {"row": 39, "column": 22}}, {"id": 112, "type": ">", "text": ">", "parent": 110, "children": [], "start_point": {"row": 39, "column": 22}, "end_point": {"row": 39, "column": 23}}, {"id": 113, "type": "identifier", "text": "dynamic_resource", "parent": 110, "children": [], "start_point": {"row": 39, "column": 24}, "end_point": {"row": 39, "column": 40}}, {"id": 114, "type": "field_declaration", "text": "std::set<std::string> forbidden_resource;", "parent": 27, "children": [115, 116, 119, 120], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 43}}, {"id": 115, "type": "type_identifier", "text": "std", "parent": 114, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 5}}, {"id": 116, "type": "ERROR", "text": "::set<", "parent": 114, "children": [117, 118], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 11}}, {"id": 117, "type": "field_identifier", "text": "set", "parent": 116, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 10}}, {"id": 118, "type": "<", "text": "<", "parent": 116, "children": [], "start_point": {"row": 40, "column": 10}, "end_point": {"row": 40, "column": 11}}, {"id": 119, "type": "field_identifier", "text": "std", "parent": 114, "children": [], "start_point": {"row": 40, "column": 11}, "end_point": {"row": 40, "column": 14}}, {"id": 120, "type": "bitfield_clause", "text": ":string> forbidden_resource", "parent": 114, "children": [121], "start_point": {"row": 40, "column": 15}, "end_point": {"row": 40, "column": 42}}, {"id": 121, "type": "binary_expression", "text": "string> forbidden_resource", "parent": 120, "children": [122, 123, 124], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 42}}, {"id": 122, "type": "identifier", "text": "string", "parent": 121, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 22}}, {"id": 123, "type": ">", "text": ">", "parent": 121, "children": [], "start_point": {"row": 40, "column": 22}, "end_point": {"row": 40, "column": 23}}, {"id": 124, "type": "identifier", "text": "forbidden_resource", "parent": 121, "children": [], "start_point": {"row": 40, "column": 24}, "end_point": {"row": 40, "column": 42}}, {"id": 125, "type": "function_definition", "text": "class Config {\n public:\n static Config &GetInstance();\n\n Config(const Config &) = delete;\n Config operator=(const Config &) = delete;\n\n in_port_t port() const { return data_.port; }\n int thread_num() const { return data_.thread_num; }\n\n bool IsLogOn() const { return data_.log_enable; }\n\n std::string www_root() const { return data_.www_root; }\n std::string default_root() const { return data_.default_root; }\n std::string index() const { return data_.index; }\n\n std::string fcgi_root() const { return data_.fcgi_root; }\n std::string fcgi_unix() const { return data_.fcgi_unix_addr; }\n std::string fcgi_inet_ip() const { return data_.fcgi_inet_addr.first; }\n in_port_t fcgi_inet_port() const { return data_.fcgi_inet_addr.second; }\n\n bool IsInetAddr() const { return data_.fcgi_listen_sock == \"inet\"; }\n bool IsUnixAddr() const { return data_.fcgi_listen_sock == \"unix\"; }\n\n const std::set<std::string> &method_list() const { return data_.method_list; }\n const std::set<std::string> &static_resource() const { return data_.static_resource; }\n const std::set<std::string> &dynamic_resource() const { return data_.dynamic_resource; }\n const std::set<std::string> &forbidden_resource() const { return data_.forbidden_resource; }\n\n private:\n explicit Config(YAMLData &&data) : data_(data) { ; }\n static YAMLData GetData();\n\n YAMLData data_;\n}", "parent": 24, "children": [126], "start_point": {"row": 43, "column": 0}, "end_point": {"row": 77, "column": 1}}, {"id": 126, "type": "identifier", "text": "Config", "parent": 125, "children": [], "start_point": {"row": 43, "column": 6}, "end_point": {"row": 43, "column": 12}}, {"id": 127, "type": "labeled_statement", "text": "public:\n static Config &GetInstance();", "parent": 125, "children": [128], "start_point": {"row": 44, "column": 1}, "end_point": {"row": 45, "column": 31}}, {"id": 128, "type": "declaration", "text": "static Config &GetInstance();", "parent": 127, "children": [129, 130], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 31}}, {"id": 129, "type": "type_identifier", "text": "Config", "parent": 128, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 15}}, {"id": 130, "type": "function_declarator", "text": "GetInstance()", "parent": 128, "children": [131, 132], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 30}}, {"id": 131, "type": "identifier", "text": "GetInstance", "parent": 130, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 28}}, {"id": 132, "type": "parameter_list", "text": "()", "parent": 130, "children": [], "start_point": {"row": 45, "column": 28}, "end_point": {"row": 45, "column": 30}}, {"id": 133, "type": "declaration", "text": "Config(const Config &) = delete;", "parent": 125, "children": [134, 138], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 34}}, {"id": 134, "type": "macro_type_specifier", "text": "Config(const Config &)", "parent": 133, "children": [135, 136], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 24}}, {"id": 135, "type": "identifier", "text": "Config", "parent": 134, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 8}}, {"id": 136, "type": "type_descriptor", "text": "const Config", "parent": 134, "children": [137], "start_point": {"row": 47, "column": 9}, "end_point": {"row": 47, "column": 21}}, {"id": 137, "type": "type_identifier", "text": "Config", "parent": 136, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 21}}, {"id": 138, "type": "ERROR", "text": "=", "parent": 133, "children": [139], "start_point": {"row": 47, "column": 25}, "end_point": {"row": 47, "column": 26}}, {"id": 139, "type": "=", "text": "=", "parent": 138, "children": [], "start_point": {"row": 47, "column": 25}, "end_point": {"row": 47, "column": 26}}, {"id": 140, "type": "declaration", "text": "Config operator=(const Config &) = delete;", "parent": 125, "children": [141, 142], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 44}}, {"id": 141, "type": "type_identifier", "text": "Config", "parent": 140, "children": [], "start_point": {"row": 48, "column": 2}, "end_point": {"row": 48, "column": 8}}, {"id": 142, "type": "init_declarator", "text": "operator=(const Config &) = delete", "parent": 140, "children": [143, 144, 145], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 43}}, {"id": 143, "type": "identifier", "text": "operator", "parent": 142, "children": [], "start_point": {"row": 48, "column": 9}, "end_point": {"row": 48, "column": 17}}, {"id": 144, "type": "=", "text": "=", "parent": 142, "children": [], "start_point": {"row": 48, "column": 17}, "end_point": {"row": 48, "column": 18}}, {"id": 145, "type": "cast_expression", "text": "(const Config &) = delete", "parent": 142, "children": [146, 148], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 43}}, {"id": 146, "type": "type_descriptor", "text": "const Config", "parent": 145, "children": [147], "start_point": {"row": 48, "column": 19}, "end_point": {"row": 48, "column": 31}}, {"id": 147, "type": "type_identifier", "text": "Config", "parent": 146, "children": [], "start_point": {"row": 48, "column": 25}, "end_point": {"row": 48, "column": 31}}, {"id": 148, "type": "ERROR", "text": "=", "parent": 145, "children": [149], "start_point": {"row": 48, "column": 35}, "end_point": {"row": 48, "column": 36}}, {"id": 149, "type": "=", "text": "=", "parent": 148, "children": [], "start_point": {"row": 48, "column": 35}, "end_point": {"row": 48, "column": 36}}, {"id": 150, "type": "ERROR", "text": "in_port_t port() const", "parent": 125, "children": [151, 152], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 24}}, {"id": 151, "type": "type_identifier", "text": "in_port_t", "parent": 150, "children": [], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 11}}, {"id": 152, "type": "function_declarator", "text": "port()", "parent": 150, "children": [153, 154], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 18}}, {"id": 153, "type": "identifier", "text": "port", "parent": 152, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 16}}, {"id": 154, "type": "parameter_list", "text": "()", "parent": 152, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 18}}, {"id": 155, "type": "return_statement", "text": "return data_.port;", "parent": 125, "children": [156], "start_point": {"row": 50, "column": 36}, "end_point": {"row": 50, "column": 54}}, {"id": 156, "type": "field_expression", "text": "data_.port", "parent": 155, "children": [157, 158], "start_point": {"row": 50, "column": 43}, "end_point": {"row": 50, "column": 53}}, {"id": 157, "type": "identifier", "text": "data_", "parent": 156, "children": [], "start_point": {"row": 50, "column": 43}, "end_point": {"row": 50, "column": 48}}, {"id": 158, "type": "field_identifier", "text": "port", "parent": 156, "children": [], "start_point": {"row": 50, "column": 49}, "end_point": {"row": 50, "column": 53}}, {"id": 159, "type": "ERROR", "text": "int thread_num() const", "parent": 125, "children": [160, 161], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 24}}, {"id": 160, "type": "primitive_type", "text": "int", "parent": 159, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 5}}, {"id": 161, "type": "function_declarator", "text": "thread_num()", "parent": 159, "children": [162, 163], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 18}}, {"id": 162, "type": "identifier", "text": "thread_num", "parent": 161, "children": [], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 16}}, {"id": 163, "type": "parameter_list", "text": "()", "parent": 161, "children": [], "start_point": {"row": 51, "column": 16}, "end_point": {"row": 51, "column": 18}}, {"id": 164, "type": "return_statement", "text": "return data_.thread_num;", "parent": 125, "children": [165], "start_point": {"row": 51, "column": 36}, "end_point": {"row": 51, "column": 60}}, {"id": 165, "type": "field_expression", "text": "data_.thread_num", "parent": 164, "children": [166, 167], "start_point": {"row": 51, "column": 43}, "end_point": {"row": 51, "column": 59}}, {"id": 166, "type": "identifier", "text": "data_", "parent": 165, "children": [], "start_point": {"row": 51, "column": 43}, "end_point": {"row": 51, "column": 48}}, {"id": 167, "type": "field_identifier", "text": "thread_num", "parent": 165, "children": [], "start_point": {"row": 51, "column": 49}, "end_point": {"row": 51, "column": 59}}, {"id": 168, "type": "ERROR", "text": "bool IsLogOn() const", "parent": 125, "children": [169, 170], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 22}}, {"id": 169, "type": "primitive_type", "text": "bool", "parent": 168, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 6}}, {"id": 170, "type": "function_declarator", "text": "IsLogOn()", "parent": 168, "children": [171, 172], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 16}}, {"id": 171, "type": "identifier", "text": "IsLogOn", "parent": 170, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 14}}, {"id": 172, "type": "parameter_list", "text": "()", "parent": 170, "children": [], "start_point": {"row": 53, "column": 14}, "end_point": {"row": 53, "column": 16}}, {"id": 173, "type": "return_statement", "text": "return data_.log_enable;", "parent": 125, "children": [174], "start_point": {"row": 53, "column": 36}, "end_point": {"row": 53, "column": 60}}, {"id": 174, "type": "field_expression", "text": "data_.log_enable", "parent": 173, "children": [175, 176], "start_point": {"row": 53, "column": 43}, "end_point": {"row": 53, "column": 59}}, {"id": 175, "type": "identifier", "text": "data_", "parent": 174, "children": [], "start_point": {"row": 53, "column": 43}, "end_point": {"row": 53, "column": 48}}, {"id": 176, "type": "field_identifier", "text": "log_enable", "parent": 174, "children": [], "start_point": {"row": 53, "column": 49}, "end_point": {"row": 53, "column": 59}}, {"id": 177, "type": "labeled_statement", "text": "std::string www_root() const { return data_.www_root; }", "parent": 125, "children": [178, 179], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 60}}, {"id": 178, "type": "statement_identifier", "text": "std", "parent": 177, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 5}}, {"id": 179, "type": "ERROR", "text": ":string www_root() const", "parent": 177, "children": [180, 181], "start_point": {"row": 55, "column": 6}, "end_point": {"row": 55, "column": 30}}, {"id": 180, "type": "type_identifier", "text": "string", "parent": 179, "children": [], "start_point": {"row": 55, "column": 7}, "end_point": {"row": 55, "column": 13}}, {"id": 181, "type": "function_declarator", "text": "www_root() const", "parent": 179, "children": [182, 183], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 30}}, {"id": 182, "type": "identifier", "text": "www_root", "parent": 181, "children": [], "start_point": {"row": 55, "column": 14}, "end_point": {"row": 55, "column": 22}}, {"id": 183, "type": "parameter_list", "text": "()", "parent": 181, "children": [], "start_point": {"row": 55, "column": 22}, "end_point": {"row": 55, "column": 24}}, {"id": 184, "type": "return_statement", "text": "return data_.www_root;", "parent": 177, "children": [185], "start_point": {"row": 55, "column": 36}, "end_point": {"row": 55, "column": 58}}, {"id": 185, "type": "field_expression", "text": "data_.www_root", "parent": 184, "children": [186, 187], "start_point": {"row": 55, "column": 43}, "end_point": {"row": 55, "column": 57}}, {"id": 186, "type": "identifier", "text": "data_", "parent": 185, "children": [], "start_point": {"row": 55, "column": 43}, "end_point": {"row": 55, "column": 48}}, {"id": 187, "type": "field_identifier", "text": "www_root", "parent": 185, "children": [], "start_point": {"row": 55, "column": 49}, "end_point": {"row": 55, "column": 57}}, {"id": 188, "type": "labeled_statement", "text": "std::string default_root() const { return data_.default_root; }", "parent": 125, "children": [189, 190], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 65}}, {"id": 189, "type": "statement_identifier", "text": "std", "parent": 188, "children": [], "start_point": {"row": 56, "column": 2}, "end_point": {"row": 56, "column": 5}}, {"id": 190, "type": "ERROR", "text": ":string default_root() const", "parent": 188, "children": [191, 192], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 34}}, {"id": 191, "type": "type_identifier", "text": "string", "parent": 190, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 13}}, {"id": 192, "type": "function_declarator", "text": "default_root() const", "parent": 190, "children": [193, 194], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 34}}, {"id": 193, "type": "identifier", "text": "default_root", "parent": 192, "children": [], "start_point": {"row": 56, "column": 14}, "end_point": {"row": 56, "column": 26}}, {"id": 194, "type": "parameter_list", "text": "()", "parent": 192, "children": [], "start_point": {"row": 56, "column": 26}, "end_point": {"row": 56, "column": 28}}, {"id": 195, "type": "return_statement", "text": "return data_.default_root;", "parent": 188, "children": [196], "start_point": {"row": 56, "column": 37}, "end_point": {"row": 56, "column": 63}}, {"id": 196, "type": "field_expression", "text": "data_.default_root", "parent": 195, "children": [197, 198], "start_point": {"row": 56, "column": 44}, "end_point": {"row": 56, "column": 62}}, {"id": 197, "type": "identifier", "text": "data_", "parent": 196, "children": [], "start_point": {"row": 56, "column": 44}, "end_point": {"row": 56, "column": 49}}, {"id": 198, "type": "field_identifier", "text": "default_root", "parent": 196, "children": [], "start_point": {"row": 56, "column": 50}, "end_point": {"row": 56, "column": 62}}, {"id": 199, "type": "labeled_statement", "text": "std::string index() const { return data_.index; }", "parent": 125, "children": [200, 201], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 57}}, {"id": 200, "type": "statement_identifier", "text": "std", "parent": 199, "children": [], "start_point": {"row": 57, "column": 2}, "end_point": {"row": 57, "column": 5}}, {"id": 201, "type": "ERROR", "text": ":string index() const", "parent": 199, "children": [202, 203], "start_point": {"row": 57, "column": 6}, "end_point": {"row": 57, "column": 27}}, {"id": 202, "type": "type_identifier", "text": "string", "parent": 201, "children": [], "start_point": {"row": 57, "column": 7}, "end_point": {"row": 57, "column": 13}}, {"id": 203, "type": "function_declarator", "text": "index() const", "parent": 201, "children": [204, 205], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 27}}, {"id": 204, "type": "identifier", "text": "index", "parent": 203, "children": [], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 19}}, {"id": 205, "type": "parameter_list", "text": "()", "parent": 203, "children": [], "start_point": {"row": 57, "column": 19}, "end_point": {"row": 57, "column": 21}}, {"id": 206, "type": "return_statement", "text": "return data_.index;", "parent": 199, "children": [207], "start_point": {"row": 57, "column": 36}, "end_point": {"row": 57, "column": 55}}, {"id": 207, "type": "field_expression", "text": "data_.index", "parent": 206, "children": [208, 209], "start_point": {"row": 57, "column": 43}, "end_point": {"row": 57, "column": 54}}, {"id": 208, "type": "identifier", "text": "data_", "parent": 207, "children": [], "start_point": {"row": 57, "column": 43}, "end_point": {"row": 57, "column": 48}}, {"id": 209, "type": "field_identifier", "text": "index", "parent": 207, "children": [], "start_point": {"row": 57, "column": 49}, "end_point": {"row": 57, "column": 54}}, {"id": 210, "type": "labeled_statement", "text": "std::string fcgi_root() const { return data_.fcgi_root; }", "parent": 125, "children": [211, 212], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 61}}, {"id": 211, "type": "statement_identifier", "text": "std", "parent": 210, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 5}}, {"id": 212, "type": "ERROR", "text": ":string fcgi_root() const", "parent": 210, "children": [213, 214], "start_point": {"row": 59, "column": 6}, "end_point": {"row": 59, "column": 31}}, {"id": 213, "type": "type_identifier", "text": "string", "parent": 212, "children": [], "start_point": {"row": 59, "column": 7}, "end_point": {"row": 59, "column": 13}}, {"id": 214, "type": "function_declarator", "text": "fcgi_root() const", "parent": 212, "children": [215, 216], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 31}}, {"id": 215, "type": "identifier", "text": "fcgi_root", "parent": 214, "children": [], "start_point": {"row": 59, "column": 14}, "end_point": {"row": 59, "column": 23}}, {"id": 216, "type": "parameter_list", "text": "()", "parent": 214, "children": [], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 25}}, {"id": 217, "type": "return_statement", "text": "return data_.fcgi_root;", "parent": 210, "children": [218], "start_point": {"row": 59, "column": 36}, "end_point": {"row": 59, "column": 59}}, {"id": 218, "type": "field_expression", "text": "data_.fcgi_root", "parent": 217, "children": [219, 220], "start_point": {"row": 59, "column": 43}, "end_point": {"row": 59, "column": 58}}, {"id": 219, "type": "identifier", "text": "data_", "parent": 218, "children": [], "start_point": {"row": 59, "column": 43}, "end_point": {"row": 59, "column": 48}}, {"id": 220, "type": "field_identifier", "text": "fcgi_root", "parent": 218, "children": [], "start_point": {"row": 59, "column": 49}, "end_point": {"row": 59, "column": 58}}, {"id": 221, "type": "labeled_statement", "text": "std::string fcgi_unix() const { return data_.fcgi_unix_addr; }", "parent": 125, "children": [222, 223], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 66}}, {"id": 222, "type": "statement_identifier", "text": "std", "parent": 221, "children": [], "start_point": {"row": 60, "column": 2}, "end_point": {"row": 60, "column": 5}}, {"id": 223, "type": "ERROR", "text": ":string fcgi_unix() const", "parent": 221, "children": [224, 225], "start_point": {"row": 60, "column": 6}, "end_point": {"row": 60, "column": 31}}, {"id": 224, "type": "type_identifier", "text": "string", "parent": 223, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 13}}, {"id": 225, "type": "function_declarator", "text": "fcgi_unix() const", "parent": 223, "children": [226, 227], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 31}}, {"id": 226, "type": "identifier", "text": "fcgi_unix", "parent": 225, "children": [], "start_point": {"row": 60, "column": 14}, "end_point": {"row": 60, "column": 23}}, {"id": 227, "type": "parameter_list", "text": "()", "parent": 225, "children": [], "start_point": {"row": 60, "column": 23}, "end_point": {"row": 60, "column": 25}}, {"id": 228, "type": "return_statement", "text": "return data_.fcgi_unix_addr;", "parent": 221, "children": [229], "start_point": {"row": 60, "column": 36}, "end_point": {"row": 60, "column": 64}}, {"id": 229, "type": "field_expression", "text": "data_.fcgi_unix_addr", "parent": 228, "children": [230, 231], "start_point": {"row": 60, "column": 43}, "end_point": {"row": 60, "column": 63}}, {"id": 230, "type": "identifier", "text": "data_", "parent": 229, "children": [], "start_point": {"row": 60, "column": 43}, "end_point": {"row": 60, "column": 48}}, {"id": 231, "type": "field_identifier", "text": "fcgi_unix_addr", "parent": 229, "children": [], "start_point": {"row": 60, "column": 49}, "end_point": {"row": 60, "column": 63}}, {"id": 232, "type": "labeled_statement", "text": "std::string fcgi_inet_ip() const { return data_.fcgi_inet_addr.first; }", "parent": 125, "children": [233, 234], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 73}}, {"id": 233, "type": "statement_identifier", "text": "std", "parent": 232, "children": [], "start_point": {"row": 61, "column": 2}, "end_point": {"row": 61, "column": 5}}, {"id": 234, "type": "ERROR", "text": ":string fcgi_inet_ip() const", "parent": 232, "children": [235, 236], "start_point": {"row": 61, "column": 6}, "end_point": {"row": 61, "column": 34}}, {"id": 235, "type": "type_identifier", "text": "string", "parent": 234, "children": [], "start_point": {"row": 61, "column": 7}, "end_point": {"row": 61, "column": 13}}, {"id": 236, "type": "function_declarator", "text": "fcgi_inet_ip() const", "parent": 234, "children": [237, 238], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 34}}, {"id": 237, "type": "identifier", "text": "fcgi_inet_ip", "parent": 236, "children": [], "start_point": {"row": 61, "column": 14}, "end_point": {"row": 61, "column": 26}}, {"id": 238, "type": "parameter_list", "text": "()", "parent": 236, "children": [], "start_point": {"row": 61, "column": 26}, "end_point": {"row": 61, "column": 28}}, {"id": 239, "type": "return_statement", "text": "return data_.fcgi_inet_addr.first;", "parent": 232, "children": [240], "start_point": {"row": 61, "column": 37}, "end_point": {"row": 61, "column": 71}}, {"id": 240, "type": "field_expression", "text": "data_.fcgi_inet_addr.first", "parent": 239, "children": [241, 244], "start_point": {"row": 61, "column": 44}, "end_point": {"row": 61, "column": 70}}, {"id": 241, "type": "field_expression", "text": "data_.fcgi_inet_addr", "parent": 240, "children": [242, 243], "start_point": {"row": 61, "column": 44}, "end_point": {"row": 61, "column": 64}}, {"id": 242, "type": "identifier", "text": "data_", "parent": 241, "children": [], "start_point": {"row": 61, "column": 44}, "end_point": {"row": 61, "column": 49}}, {"id": 243, "type": "field_identifier", "text": "fcgi_inet_addr", "parent": 241, "children": [], "start_point": {"row": 61, "column": 50}, "end_point": {"row": 61, "column": 64}}, {"id": 244, "type": "field_identifier", "text": "first", "parent": 240, "children": [], "start_point": {"row": 61, "column": 65}, "end_point": {"row": 61, "column": 70}}, {"id": 245, "type": "ERROR", "text": "in_port_t fcgi_inet_port() const", "parent": 125, "children": [246, 247], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 34}}, {"id": 246, "type": "type_identifier", "text": "in_port_t", "parent": 245, "children": [], "start_point": {"row": 62, "column": 2}, "end_point": {"row": 62, "column": 11}}, {"id": 247, "type": "function_declarator", "text": "fcgi_inet_port()", "parent": 245, "children": [248, 249], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 28}}, {"id": 248, "type": "identifier", "text": "fcgi_inet_port", "parent": 247, "children": [], "start_point": {"row": 62, "column": 12}, "end_point": {"row": 62, "column": 26}}, {"id": 249, "type": "parameter_list", "text": "()", "parent": 247, "children": [], "start_point": {"row": 62, "column": 26}, "end_point": {"row": 62, "column": 28}}, {"id": 250, "type": "return_statement", "text": "return data_.fcgi_inet_addr.second;", "parent": 125, "children": [251], "start_point": {"row": 62, "column": 37}, "end_point": {"row": 62, "column": 72}}, {"id": 251, "type": "field_expression", "text": "data_.fcgi_inet_addr.second", "parent": 250, "children": [252, 255], "start_point": {"row": 62, "column": 44}, "end_point": {"row": 62, "column": 71}}, {"id": 252, "type": "field_expression", "text": "data_.fcgi_inet_addr", "parent": 251, "children": [253, 254], "start_point": {"row": 62, "column": 44}, "end_point": {"row": 62, "column": 64}}, {"id": 253, "type": "identifier", "text": "data_", "parent": 252, "children": [], "start_point": {"row": 62, "column": 44}, "end_point": {"row": 62, "column": 49}}, {"id": 254, "type": "field_identifier", "text": "fcgi_inet_addr", "parent": 252, "children": [], "start_point": {"row": 62, "column": 50}, "end_point": {"row": 62, "column": 64}}, {"id": 255, "type": "field_identifier", "text": "second", "parent": 251, "children": [], "start_point": {"row": 62, "column": 65}, "end_point": {"row": 62, "column": 71}}, {"id": 256, "type": "ERROR", "text": "bool IsInetAddr() const", "parent": 125, "children": [257, 258], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 25}}, {"id": 257, "type": "primitive_type", "text": "bool", "parent": 256, "children": [], "start_point": {"row": 64, "column": 2}, "end_point": {"row": 64, "column": 6}}, {"id": 258, "type": "function_declarator", "text": "IsInetAddr()", "parent": 256, "children": [259, 260], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 19}}, {"id": 259, "type": "identifier", "text": "IsInetAddr", "parent": 258, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 17}}, {"id": 260, "type": "parameter_list", "text": "()", "parent": 258, "children": [], "start_point": {"row": 64, "column": 17}, "end_point": {"row": 64, "column": 19}}, {"id": 261, "type": "return_statement", "text": "return data_.fcgi_listen_sock == \"inet\";", "parent": 125, "children": [262], "start_point": {"row": 64, "column": 36}, "end_point": {"row": 64, "column": 76}}, {"id": 262, "type": "binary_expression", "text": "data_.fcgi_listen_sock == \"inet\"", "parent": 261, "children": [263, 266, 267], "start_point": {"row": 64, "column": 43}, "end_point": {"row": 64, "column": 75}}, {"id": 263, "type": "field_expression", "text": "data_.fcgi_listen_sock", "parent": 262, "children": [264, 265], "start_point": {"row": 64, "column": 43}, "end_point": {"row": 64, "column": 65}}, {"id": 264, "type": "identifier", "text": "data_", "parent": 263, "children": [], "start_point": {"row": 64, "column": 43}, "end_point": {"row": 64, "column": 48}}, {"id": 265, "type": "field_identifier", "text": "fcgi_listen_sock", "parent": 263, "children": [], "start_point": {"row": 64, "column": 49}, "end_point": {"row": 64, "column": 65}}, {"id": 266, "type": "==", "text": "==", "parent": 262, "children": [], "start_point": {"row": 64, "column": 66}, "end_point": {"row": 64, "column": 68}}, {"id": 267, "type": "string_literal", "text": "\"inet\"", "parent": 262, "children": [], "start_point": {"row": 64, "column": 69}, "end_point": {"row": 64, "column": 75}}, {"id": 268, "type": "ERROR", "text": "bool IsUnixAddr() const", "parent": 125, "children": [269, 270], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 25}}, {"id": 269, "type": "primitive_type", "text": "bool", "parent": 268, "children": [], "start_point": {"row": 65, "column": 2}, "end_point": {"row": 65, "column": 6}}, {"id": 270, "type": "function_declarator", "text": "IsUnixAddr()", "parent": 268, "children": [271, 272], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 19}}, {"id": 271, "type": "identifier", "text": "IsUnixAddr", "parent": 270, "children": [], "start_point": {"row": 65, "column": 7}, "end_point": {"row": 65, "column": 17}}, {"id": 272, "type": "parameter_list", "text": "()", "parent": 270, "children": [], "start_point": {"row": 65, "column": 17}, "end_point": {"row": 65, "column": 19}}, {"id": 273, "type": "return_statement", "text": "return data_.fcgi_listen_sock == \"unix\";", "parent": 125, "children": [274], "start_point": {"row": 65, "column": 36}, "end_point": {"row": 65, "column": 76}}, {"id": 274, "type": "binary_expression", "text": "data_.fcgi_listen_sock == \"unix\"", "parent": 273, "children": [275, 278, 279], "start_point": {"row": 65, "column": 43}, "end_point": {"row": 65, "column": 75}}, {"id": 275, "type": "field_expression", "text": "data_.fcgi_listen_sock", "parent": 274, "children": [276, 277], "start_point": {"row": 65, "column": 43}, "end_point": {"row": 65, "column": 65}}, {"id": 276, "type": "identifier", "text": "data_", "parent": 275, "children": [], "start_point": {"row": 65, "column": 43}, "end_point": {"row": 65, "column": 48}}, {"id": 277, "type": "field_identifier", "text": "fcgi_listen_sock", "parent": 275, "children": [], "start_point": {"row": 65, "column": 49}, "end_point": {"row": 65, "column": 65}}, {"id": 278, "type": "==", "text": "==", "parent": 274, "children": [], "start_point": {"row": 65, "column": 66}, "end_point": {"row": 65, "column": 68}}, {"id": 279, "type": "string_literal", "text": "\"unix\"", "parent": 274, "children": [], "start_point": {"row": 65, "column": 69}, "end_point": {"row": 65, "column": 75}}, {"id": 280, "type": "ERROR", "text": "const std::set<std::string> &method_list() const", "parent": 125, "children": [281, 282, 288], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 67, "column": 50}}, {"id": 281, "type": "type_identifier", "text": "std", "parent": 280, "children": [], "start_point": {"row": 67, "column": 8}, "end_point": {"row": 67, "column": 11}}, {"id": 282, "type": "ERROR", "text": "::set<std::string> &", "parent": 280, "children": [283, 284, 285, 286, 287], "start_point": {"row": 67, "column": 11}, "end_point": {"row": 67, "column": 31}}, {"id": 283, "type": "identifier", "text": "set", "parent": 282, "children": [], "start_point": {"row": 67, "column": 13}, "end_point": {"row": 67, "column": 16}}, {"id": 284, "type": "<", "text": "<", "parent": 282, "children": [], "start_point": {"row": 67, "column": 16}, "end_point": {"row": 67, "column": 17}}, {"id": 285, "type": "identifier", "text": "std", "parent": 282, "children": [], "start_point": {"row": 67, "column": 17}, "end_point": {"row": 67, "column": 20}}, {"id": 286, "type": "identifier", "text": "string", "parent": 282, "children": [], "start_point": {"row": 67, "column": 22}, "end_point": {"row": 67, "column": 28}}, {"id": 287, "type": ">", "text": ">", "parent": 282, "children": [], "start_point": {"row": 67, "column": 28}, "end_point": {"row": 67, "column": 29}}, {"id": 288, "type": "function_declarator", "text": "method_list()", "parent": 280, "children": [289, 290], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 67, "column": 44}}, {"id": 289, "type": "identifier", "text": "method_list", "parent": 288, "children": [], "start_point": {"row": 67, "column": 31}, "end_point": {"row": 67, "column": 42}}, {"id": 290, "type": "parameter_list", "text": "()", "parent": 288, "children": [], "start_point": {"row": 67, "column": 42}, "end_point": {"row": 67, "column": 44}}, {"id": 291, "type": "return_statement", "text": "return data_.method_list;", "parent": 125, "children": [292], "start_point": {"row": 67, "column": 62}, "end_point": {"row": 67, "column": 87}}, {"id": 292, "type": "field_expression", "text": "data_.method_list", "parent": 291, "children": [293, 294], "start_point": {"row": 67, "column": 69}, "end_point": {"row": 67, "column": 86}}, {"id": 293, "type": "identifier", "text": "data_", "parent": 292, "children": [], "start_point": {"row": 67, "column": 69}, "end_point": {"row": 67, "column": 74}}, {"id": 294, "type": "field_identifier", "text": "method_list", "parent": 292, "children": [], "start_point": {"row": 67, "column": 75}, "end_point": {"row": 67, "column": 86}}, {"id": 295, "type": "ERROR", "text": "const std::set<std::string> &static_resource() const", "parent": 125, "children": [296, 297, 303], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 54}}, {"id": 296, "type": "type_identifier", "text": "std", "parent": 295, "children": [], "start_point": {"row": 68, "column": 8}, "end_point": {"row": 68, "column": 11}}, {"id": 297, "type": "ERROR", "text": "::set<std::string> &", "parent": 295, "children": [298, 299, 300, 301, 302], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 31}}, {"id": 298, "type": "identifier", "text": "set", "parent": 297, "children": [], "start_point": {"row": 68, "column": 13}, "end_point": {"row": 68, "column": 16}}, {"id": 299, "type": "<", "text": "<", "parent": 297, "children": [], "start_point": {"row": 68, "column": 16}, "end_point": {"row": 68, "column": 17}}, {"id": 300, "type": "identifier", "text": "std", "parent": 297, "children": [], "start_point": {"row": 68, "column": 17}, "end_point": {"row": 68, "column": 20}}, {"id": 301, "type": "identifier", "text": "string", "parent": 297, "children": [], "start_point": {"row": 68, "column": 22}, "end_point": {"row": 68, "column": 28}}, {"id": 302, "type": ">", "text": ">", "parent": 297, "children": [], "start_point": {"row": 68, "column": 28}, "end_point": {"row": 68, "column": 29}}, {"id": 303, "type": "function_declarator", "text": "static_resource()", "parent": 295, "children": [304, 305], "start_point": {"row": 68, "column": 31}, "end_point": {"row": 68, "column": 48}}, {"id": 304, "type": "identifier", "text": "static_resource", "parent": 303, "children": [], "start_point": {"row": 68, "column": 31}, "end_point": {"row": 68, "column": 46}}, {"id": 305, "type": "parameter_list", "text": "()", "parent": 303, "children": [], "start_point": {"row": 68, "column": 46}, "end_point": {"row": 68, "column": 48}}, {"id": 306, "type": "return_statement", "text": "return data_.static_resource;", "parent": 125, "children": [307], "start_point": {"row": 68, "column": 62}, "end_point": {"row": 68, "column": 91}}, {"id": 307, "type": "field_expression", "text": "data_.static_resource", "parent": 306, "children": [308, 309], "start_point": {"row": 68, "column": 69}, "end_point": {"row": 68, "column": 90}}, {"id": 308, "type": "identifier", "text": "data_", "parent": 307, "children": [], "start_point": {"row": 68, "column": 69}, "end_point": {"row": 68, "column": 74}}, {"id": 309, "type": "field_identifier", "text": "static_resource", "parent": 307, "children": [], "start_point": {"row": 68, "column": 75}, "end_point": {"row": 68, "column": 90}}, {"id": 310, "type": "ERROR", "text": "const std::set<std::string> &dynamic_resource() const", "parent": 125, "children": [311, 312, 318], "start_point": {"row": 69, "column": 2}, "end_point": {"row": 69, "column": 55}}, {"id": 311, "type": "type_identifier", "text": "std", "parent": 310, "children": [], "start_point": {"row": 69, "column": 8}, "end_point": {"row": 69, "column": 11}}, {"id": 312, "type": "ERROR", "text": "::set<std::string> &", "parent": 310, "children": [313, 314, 315, 316, 317], "start_point": {"row": 69, "column": 11}, "end_point": {"row": 69, "column": 31}}, {"id": 313, "type": "identifier", "text": "set", "parent": 312, "children": [], "start_point": {"row": 69, "column": 13}, "end_point": {"row": 69, "column": 16}}, {"id": 314, "type": "<", "text": "<", "parent": 312, "children": [], "start_point": {"row": 69, "column": 16}, "end_point": {"row": 69, "column": 17}}, {"id": 315, "type": "identifier", "text": "std", "parent": 312, "children": [], "start_point": {"row": 69, "column": 17}, "end_point": {"row": 69, "column": 20}}, {"id": 316, "type": "identifier", "text": "string", "parent": 312, "children": [], "start_point": {"row": 69, "column": 22}, "end_point": {"row": 69, "column": 28}}, {"id": 317, "type": ">", "text": ">", "parent": 312, "children": [], "start_point": {"row": 69, "column": 28}, "end_point": {"row": 69, "column": 29}}, {"id": 318, "type": "function_declarator", "text": "dynamic_resource()", "parent": 310, "children": [319, 320], "start_point": {"row": 69, "column": 31}, "end_point": {"row": 69, "column": 49}}, {"id": 319, "type": "identifier", "text": "dynamic_resource", "parent": 318, "children": [], "start_point": {"row": 69, "column": 31}, "end_point": {"row": 69, "column": 47}}, {"id": 320, "type": "parameter_list", "text": "()", "parent": 318, "children": [], "start_point": {"row": 69, "column": 47}, "end_point": {"row": 69, "column": 49}}, {"id": 321, "type": "return_statement", "text": "return data_.dynamic_resource;", "parent": 125, "children": [322], "start_point": {"row": 69, "column": 62}, "end_point": {"row": 69, "column": 92}}, {"id": 322, "type": "field_expression", "text": "data_.dynamic_resource", "parent": 321, "children": [323, 324], "start_point": {"row": 69, "column": 69}, "end_point": {"row": 69, "column": 91}}, {"id": 323, "type": "identifier", "text": "data_", "parent": 322, "children": [], "start_point": {"row": 69, "column": 69}, "end_point": {"row": 69, "column": 74}}, {"id": 324, "type": "field_identifier", "text": "dynamic_resource", "parent": 322, "children": [], "start_point": {"row": 69, "column": 75}, "end_point": {"row": 69, "column": 91}}, {"id": 325, "type": "ERROR", "text": "const std::set<std::string> &forbidden_resource() const", "parent": 125, "children": [326, 327, 333], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 57}}, {"id": 326, "type": "type_identifier", "text": "std", "parent": 325, "children": [], "start_point": {"row": 70, "column": 8}, "end_point": {"row": 70, "column": 11}}, {"id": 327, "type": "ERROR", "text": "::set<std::string> &", "parent": 325, "children": [328, 329, 330, 331, 332], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 31}}, {"id": 328, "type": "identifier", "text": "set", "parent": 327, "children": [], "start_point": {"row": 70, "column": 13}, "end_point": {"row": 70, "column": 16}}, {"id": 329, "type": "<", "text": "<", "parent": 327, "children": [], "start_point": {"row": 70, "column": 16}, "end_point": {"row": 70, "column": 17}}, {"id": 330, "type": "identifier", "text": "std", "parent": 327, "children": [], "start_point": {"row": 70, "column": 17}, "end_point": {"row": 70, "column": 20}}, {"id": 331, "type": "identifier", "text": "string", "parent": 327, "children": [], "start_point": {"row": 70, "column": 22}, "end_point": {"row": 70, "column": 28}}, {"id": 332, "type": ">", "text": ">", "parent": 327, "children": [], "start_point": {"row": 70, "column": 28}, "end_point": {"row": 70, "column": 29}}, {"id": 333, "type": "function_declarator", "text": "forbidden_resource()", "parent": 325, "children": [334, 335], "start_point": {"row": 70, "column": 31}, "end_point": {"row": 70, "column": 51}}, {"id": 334, "type": "identifier", "text": "forbidden_resource", "parent": 333, "children": [], "start_point": {"row": 70, "column": 31}, "end_point": {"row": 70, "column": 49}}, {"id": 335, "type": "parameter_list", "text": "()", "parent": 333, "children": [], "start_point": {"row": 70, "column": 49}, "end_point": {"row": 70, "column": 51}}, {"id": 336, "type": "return_statement", "text": "return data_.forbidden_resource;", "parent": 125, "children": [337], "start_point": {"row": 70, "column": 62}, "end_point": {"row": 70, "column": 94}}, {"id": 337, "type": "field_expression", "text": "data_.forbidden_resource", "parent": 336, "children": [338, 339], "start_point": {"row": 70, "column": 69}, "end_point": {"row": 70, "column": 93}}, {"id": 338, "type": "identifier", "text": "data_", "parent": 337, "children": [], "start_point": {"row": 70, "column": 69}, "end_point": {"row": 70, "column": 74}}, {"id": 339, "type": "field_identifier", "text": "forbidden_resource", "parent": 337, "children": [], "start_point": {"row": 70, "column": 75}, "end_point": {"row": 70, "column": 93}}, {"id": 340, "type": "labeled_statement", "text": "private:\n explicit Config(YAMLData &&data) : data_(data) { ; }", "parent": 125, "children": [341], "start_point": {"row": 72, "column": 1}, "end_point": {"row": 73, "column": 54}}, {"id": 341, "type": "ERROR", "text": "explicit Config(YAMLData &&data) : data_(data)", "parent": 340, "children": [342, 343], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 48}}, {"id": 342, "type": "type_identifier", "text": "explicit", "parent": 341, "children": [], "start_point": {"row": 73, "column": 2}, "end_point": {"row": 73, "column": 10}}, {"id": 343, "type": "function_declarator", "text": "Config(YAMLData &&data) : data_(data)", "parent": 341, "children": [344, 345, 351], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 48}}, {"id": 344, "type": "identifier", "text": "Config", "parent": 343, "children": [], "start_point": {"row": 73, "column": 11}, "end_point": {"row": 73, "column": 17}}, {"id": 345, "type": "parameter_list", "text": "(YAMLData &&data)", "parent": 343, "children": [346], "start_point": {"row": 73, "column": 17}, "end_point": {"row": 73, "column": 34}}, {"id": 346, "type": "parameter_declaration", "text": "YAMLData &&data", "parent": 345, "children": [347, 348, 350], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 33}}, {"id": 347, "type": "type_identifier", "text": "YAMLData", "parent": 346, "children": [], "start_point": {"row": 73, "column": 18}, "end_point": {"row": 73, "column": 26}}, {"id": 348, "type": "ERROR", "text": "&&", "parent": 346, "children": [349], "start_point": {"row": 73, "column": 27}, "end_point": {"row": 73, "column": 29}}, {"id": 349, "type": "&&", "text": "&&", "parent": 348, "children": [], "start_point": {"row": 73, "column": 27}, "end_point": {"row": 73, "column": 29}}, {"id": 350, "type": "identifier", "text": "data", "parent": 346, "children": [], "start_point": {"row": 73, "column": 29}, "end_point": {"row": 73, "column": 33}}, {"id": 351, "type": "call_expression", "text": "data_(data)", "parent": 343, "children": [352, 353], "start_point": {"row": 73, "column": 37}, "end_point": {"row": 73, "column": 48}}, {"id": 352, "type": "identifier", "text": "data_", "parent": 351, "children": [], "start_point": {"row": 73, "column": 37}, "end_point": {"row": 73, "column": 42}}, {"id": 353, "type": "argument_list", "text": "(data)", "parent": 351, "children": [354], "start_point": {"row": 73, "column": 42}, "end_point": {"row": 73, "column": 48}}, {"id": 354, "type": "identifier", "text": "data", "parent": 353, "children": [], "start_point": {"row": 73, "column": 43}, "end_point": {"row": 73, "column": 47}}, {"id": 355, "type": "declaration", "text": "static YAMLData GetData();", "parent": 125, "children": [356, 357], "start_point": {"row": 74, "column": 2}, "end_point": {"row": 74, "column": 28}}, {"id": 356, "type": "type_identifier", "text": "YAMLData", "parent": 355, "children": [], "start_point": {"row": 74, "column": 9}, "end_point": {"row": 74, "column": 17}}, {"id": 357, "type": "function_declarator", "text": "GetData()", "parent": 355, "children": [358, 359], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 27}}, {"id": 358, "type": "identifier", "text": "GetData", "parent": 357, "children": [], "start_point": {"row": 74, "column": 18}, "end_point": {"row": 74, "column": 25}}, {"id": 359, "type": "parameter_list", "text": "()", "parent": 357, "children": [], "start_point": {"row": 74, "column": 25}, "end_point": {"row": 74, "column": 27}}, {"id": 360, "type": "declaration", "text": "YAMLData data_;", "parent": 125, "children": [361, 362], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 17}}, {"id": 361, "type": "type_identifier", "text": "YAMLData", "parent": 360, "children": [], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 10}}, {"id": 362, "type": "identifier", "text": "data_", "parent": 360, "children": [], "start_point": {"row": 76, "column": 11}, "end_point": {"row": 76, "column": 16}}, {"id": 363, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 81, "column": 0}, "end_point": {"row": 81, "column": 6}}]}, "node_categories": {"declarations": {"functions": [24, 125, 130, 152, 161, 170, 181, 192, 203, 214, 225, 236, 247, 258, 270, 288, 303, 318, 333, 343, 357], "variables": [30, 33, 36, 39, 44, 49, 54, 59, 64, 76, 81, 92, 103, 114, 128, 133, 140, 346, 355, 360], "classes": [27, 28], "imports": [6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22], "modules": [], "enums": []}, "statements": {"expressions": [88, 99, 110, 121, 145, 156, 165, 174, 185, 196, 207, 218, 229, 240, 241, 251, 252, 262, 263, 274, 275, 292, 307, 322, 337, 351], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 25, 26, 29, 31, 32, 35, 38, 40, 42, 43, 45, 47, 48, 50, 52, 53, 55, 57, 58, 60, 62, 63, 65, 67, 69, 71, 73, 75, 77, 79, 80, 82, 84, 86, 89, 91, 93, 95, 97, 100, 102, 104, 106, 108, 111, 113, 115, 117, 119, 122, 124, 126, 129, 131, 134, 135, 137, 141, 143, 147, 151, 153, 157, 158, 162, 166, 167, 171, 175, 176, 178, 180, 182, 186, 187, 189, 191, 193, 197, 198, 200, 202, 204, 208, 209, 211, 213, 215, 219, 220, 222, 224, 226, 230, 231, 233, 235, 237, 242, 243, 244, 246, 248, 253, 254, 255, 259, 264, 265, 271, 276, 277, 281, 283, 285, 286, 289, 293, 294, 296, 298, 300, 301, 304, 308, 309, 311, 313, 315, 316, 319, 323, 324, 326, 328, 330, 331, 334, 338, 339, 342, 344, 347, 350, 352, 354, 356, 358, 361, 362, 363], "returns": [155, 164, 173, 184, 195, 206, 217, 228, 239, 250, 261, 273, 291, 306, 321, 336], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 267, 279], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": [70, 87, 98, 109, 120]}}, "cross_language_map": {"function_declarations": [{"node_id": 24, "universal_type": "function", "name": "YAMLData", "text_snippet": "namespace platinum {\n\nstruct YAMLData {\n in_port_t port;\n int thread_num;\n\n bool log_enable;\n\n s"}, {"node_id": 125, "universal_type": "function", "name": "Config", "text_snippet": "class Config {\n public:\n static Config &GetInstance();\n\n Config(const Config &) = delete;\n Config"}, {"node_id": 130, "universal_type": "function", "name": "unknown", "text_snippet": "GetInstance()"}, {"node_id": 152, "universal_type": "function", "name": "unknown", "text_snippet": "port()"}, {"node_id": 161, "universal_type": "function", "name": "unknown", "text_snippet": "thread_num()"}, {"node_id": 170, "universal_type": "function", "name": "unknown", "text_snippet": "IsLogOn()"}, {"node_id": 181, "universal_type": "function", "name": "unknown", "text_snippet": "www_root() const"}, {"node_id": 192, "universal_type": "function", "name": "unknown", "text_snippet": "default_root() const"}, {"node_id": 203, "universal_type": "function", "name": "unknown", "text_snippet": "index() const"}, {"node_id": 214, "universal_type": "function", "name": "unknown", "text_snippet": "fcgi_root() const"}, {"node_id": 225, "universal_type": "function", "name": "unknown", "text_snippet": "fcgi_unix() const"}, {"node_id": 236, "universal_type": "function", "name": "unknown", "text_snippet": "fcgi_inet_ip() const"}, {"node_id": 247, "universal_type": "function", "name": "unknown", "text_snippet": "fcgi_inet_port()"}, {"node_id": 258, "universal_type": "function", "name": "unknown", "text_snippet": "IsInetAddr()"}, {"node_id": 270, "universal_type": "function", "name": "unknown", "text_snippet": "IsUnixAddr()"}, {"node_id": 288, "universal_type": "function", "name": "unknown", "text_snippet": "method_list()"}, {"node_id": 303, "universal_type": "function", "name": "unknown", "text_snippet": "static_resource()"}, {"node_id": 318, "universal_type": "function", "name": "unknown", "text_snippet": "dynamic_resource()"}, {"node_id": 333, "universal_type": "function", "name": "unknown", "text_snippet": "forbidden_resource()"}, {"node_id": 343, "universal_type": "function", "name": "unknown", "text_snippet": "Config(YAMLData &&data) : data_(data)"}, {"node_id": 357, "universal_type": "function", "name": "unknown", "text_snippet": "GetData()"}], "class_declarations": [{"node_id": 27, "universal_type": "class", "name": "YAMLData", "text_snippet": "struct YAMLData {\n in_port_t port;\n int thread_num;\n\n bool log_enable;\n\n std::string index;\n st"}, {"node_id": 28, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 6, "text": "#include <netinet/in.h>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include <cstring>\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include <set>\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include <string>\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include <vector>\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include <utility>\n"}, {"node_id": 22, "text": "#include"}]}, "original_source_code": "/**\n* Created by Crow on 11/13/18.\n* Copyright (c) 2018 Crow All rights reserved.\n* @author Crow\n* @brief this is for class Config -> to set the configuration for PlatinumServer\n* It's parse YAML file by the library yaml-cpp, You can find it on github\n* And Config mainly to provide an instance of Singleton. You can get it everywhere.\n* And you ask it the configuration is OK\n*/\n\n#ifndef PLATINUM_CONFIG_CONFIG_H\n#define PLATINUM_CONFIG_CONFIG_H\n\n#include <netinet/in.h>\n#include <cstring>\n#include <set>\n#include <string>\n#include <vector>\n#include <utility>\n\nnamespace platinum {\n\nstruct YAMLData {\n in_port_t port;\n int thread_num;\n\n bool log_enable;\n\n std::string index;\n std::string www_root;\n std::string default_root;\n std::string fcgi_root;\n\n std::string fcgi_listen_sock;\n std::pair<std::string, in_port_t> fcgi_inet_addr;\n std::string fcgi_unix_addr;\n\n std::set<std::string> method_list;\n std::set<std::string> static_resource;\n std::set<std::string> dynamic_resource;\n std::set<std::string> forbidden_resource;\n};\n\nclass Config {\n public:\n static Config &GetInstance();\n\n Config(const Config &) = delete;\n Config operator=(const Config &) = delete;\n\n in_port_t port() const { return data_.port; }\n int thread_num() const { return data_.thread_num; }\n\n bool IsLogOn() const { return data_.log_enable; }\n\n std::string www_root() const { return data_.www_root; }\n std::string default_root() const { return data_.default_root; }\n std::string index() const { return data_.index; }\n\n std::string fcgi_root() const { return data_.fcgi_root; }\n std::string fcgi_unix() const { return data_.fcgi_unix_addr; }\n std::string fcgi_inet_ip() const { return data_.fcgi_inet_addr.first; }\n in_port_t fcgi_inet_port() const { return data_.fcgi_inet_addr.second; }\n\n bool IsInetAddr() const { return data_.fcgi_listen_sock == \"inet\"; }\n bool IsUnixAddr() const { return data_.fcgi_listen_sock == \"unix\"; }\n\n const std::set<std::string> &method_list() const { return data_.method_list; }\n const std::set<std::string> &static_resource() const { return data_.static_resource; }\n const std::set<std::string> &dynamic_resource() const { return data_.dynamic_resource; }\n const std::set<std::string> &forbidden_resource() const { return data_.forbidden_resource; }\n\n private:\n explicit Config(YAMLData &&data) : data_(data) { ; }\n static YAMLData GetData();\n\n YAMLData data_;\n};\n\n}\n\n#endif //PLATINUM_CONFIG_CONFIG_H\n"}
87
c
// // DemoCallManager.h // ChatDemo-UI3.0 // // Created by XieYajie on 22/11/2016. // Copyright © 2016 XieYajie. All rights reserved. // #import <Foundation/Foundation.h> #import "EMCallOptions+NSCoding.h" @interface DemoCallManager : NSObject #if DEMO_CALL == 1 @property (strong, nonatomic) UIViewController *mainController; + (instancetype)sharedManager; - (void)saveCallOptions; - (void)makeCallWithUsername:(NSString *)aUsername type:(EMCallType)aType; - (void)answerCall:(NSString *)aCallId; - (void)hangupCallWithReason:(EMCallEndReason)aReason; #endif @end
28.65
20
(translation_unit) "//\n// DemoCallManager.h\n// ChatDemo-UI3.0\n//\n// Created by XieYajie on 22/11/2016.\n// Copyright © 2016 XieYajie. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n#import "EMCallOptions+NSCoding.h"\n\n@interface DemoCallManager : NSObject\n\n#if DEMO_CALL == 1\n\n@property (strong, nonatomic) UIViewController *mainController;\n\n+ (instancetype)sharedManager;\n\n- (void)saveCallOptions;\n\n- (void)makeCallWithUsername:(NSString *)aUsername\n type:(EMCallType)aType;\n\n- (void)answerCall:(NSString *)aCallId;\n\n- (void)hangupCallWithReason:(EMCallEndReason)aReason;\n\n#endif\n\n@end\n" (comment) "//" (comment) "// DemoCallManager.h" (comment) "// ChatDemo-UI3.0" (comment) "//" (comment) "// Created by XieYajie on 22/11/2016." (comment) "// Copyright © 2016 XieYajie. All rights reserved.\n" (comment) "/\n" (preproc_call) "import <Foundation/Foundation.h>\n\n" (preproc_directive) "import " (preproc_arg) "Foundation/Foundation.h>\n" (preproc_call) "import "EMCallOptions+NSCoding.h"\n\n" (preproc_directive) "import " (preproc_arg) "EMCallOptions+NSCoding.h"\n" (ERROR) "interface DemoCallManager : NSObject\n" (ERROR) "i" (type_identifier) "nterface " (identifier) "emoCallManager " (:) " " (identifier) "SObject\n" (preproc_if) "if DEMO_CALL == 1\n\n@property (strong, nonatomic) UIViewController *mainController;\n\n+ (instancetype)sharedManager;\n\n- (void)saveCallOptions;\n\n- (void)makeCallWithUsername:(NSString *)aUsername\n type:(EMCallType)aType;\n\n- (void)answerCall:(NSString *)aCallId;\n\n- (void)hangupCallWithReason:(EMCallEndReason)aReason;\n\n#endif\n" (#if) "if " (binary_expression) "EMO_CALL == 1\n" (identifier) "EMO_CALL " (==) "= " (number_literal) "\n" ( ) "\n@" (ERROR) "property (strong, nonatomic) " (ERROR) "p" (call_expression) "roperty (strong, nonatomic) " (identifier) "roperty " (argument_list) "strong, nonatomic) " (() "s" (identifier) "trong," (,) " " (identifier) "onatomic)" ()) " " (declaration) "IViewController *mainController;\n" (type_identifier) "IViewController " (pointer_declarator) "mainController;" (*) "m" (identifier) "ainController;" (;) "\n" (expression_statement) " (instancetype)sharedManager;\n" (unary_expression) " (instancetype)sharedManager;" (+) " " (cast_expression) "instancetype)sharedManager;" (() "i" (type_descriptor) "nstancetype)" (type_identifier) "nstancetype)" ()) "s" (identifier) "haredManager;" (;) "\n" (expression_statement) " (void)saveCallOptions;\n" (unary_expression) " (void)saveCallOptions;" (-) " " (cast_expression) "void)saveCallOptions;" (() "v" (type_descriptor) "oid)" (primitive_type) "oid)" ()) "s" (identifier) "aveCallOptions;" (;) "\n" (expression_statement) " (void)makeCallWithUsername:(NSString *)aUsername\n" (binary_expression) " (void)makeCallWithUsername:(NSString *)aUsername\n" (unary_expression) " (void)makeCallWithUsername:" (-) " " (cast_expression) "void)makeCallWithUsername:" (() "v" (type_descriptor) "oid)" (primitive_type) "oid)" ()) "m" (identifier) "akeCallWithUsername:" (ERROR) "(NSString " (:) "(" (() "N" (identifier) "SString " (*) ")" (ERROR) "a" ()) "a" (identifier) "Username\n" (;) "" (labeled_statement) "ype:(EMCallType)aType;\n" (statement_identifier) "ype:" (:) "(" (expression_statement) "EMCallType)aType;\n" (cast_expression) "EMCallType)aType;" (() "E" (type_descriptor) "MCallType)" (type_identifier) "MCallType)" ()) "a" (identifier) "Type;" (;) "\n" (expression_statement) " (void)answerCall:(NSString *)aCallId;\n" (binary_expression) " (void)answerCall:(NSString *)aCallId;" (unary_expression) " (void)answerCall:" (-) " " (cast_expression) "void)answerCall:" (() "v" (type_descriptor) "oid)" (primitive_type) "oid)" ()) "a" (identifier) "nswerCall:" (ERROR) "(NSString " (:) "(" (() "N" (identifier) "SString " (*) ")" (ERROR) "a" ()) "a" (identifier) "CallId;" (;) "\n" (expression_statement) " (void)hangupCallWithReason:(EMCallEndReason)aReason;\n" (unary_expression) " (void)hangupCallWithReason:" (-) " " (cast_expression) "void)hangupCallWithReason:" (() "v" (type_descriptor) "oid)" (primitive_type) "oid)" ()) "h" (identifier) "angupCallWithReason:" (ERROR) "(EMCallEndReason)aReason;" (:) "(" (() "E" (identifier) "MCallEndReason)" ()) "a" (identifier) "Reason;" (;) "\n" (#endif) "endif\n" (ERROR) "e" (ERROR) "e" (expression_statement) "nd\n" (identifier) "nd\n" (;) ""
134
11
{"language": "c", "success": true, "metadata": {"lines": 20, "avg_line_length": 28.65, "nodes": 80, "errors": 0, "source_hash": "7bd3a3e16bfadaccc703fd3e6c9dac4b60bb0a5a0d7a7331f600bd6348aab1fc", "categorized_nodes": 46}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "import <Foundation/Foundation.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": "Foundation/Foundation.h>\n", "parent": 0, "children": [], "start_point": {"row": 8, "column": 8}, "end_point": {"row": 8, "column": 33}}, {"id": 2, "type": "preproc_call", "text": "import \"EMCallOptions+NSCoding.h\"\n\n", "parent": null, "children": [3], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 11, "column": 0}}, {"id": 3, "type": "preproc_arg", "text": "EMCallOptions+NSCoding.h\"\n", "parent": 2, "children": [], "start_point": {"row": 10, "column": 8}, "end_point": {"row": 10, "column": 34}}, {"id": 4, "type": "ERROR", "text": "interface DemoCallManager : NSObject\n", "parent": null, "children": [5, 6, 7, 8], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 37}}, {"id": 5, "type": "ERROR", "text": "i", "parent": 4, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 1}}, {"id": 6, "type": "type_identifier", "text": "nterface ", "parent": 4, "children": [], "start_point": {"row": 12, "column": 1}, "end_point": {"row": 12, "column": 10}}, {"id": 7, "type": "identifier", "text": "emoCallManager ", "parent": 4, "children": [], "start_point": {"row": 12, "column": 11}, "end_point": {"row": 12, "column": 26}}, {"id": 8, "type": "identifier", "text": "SObject\n", "parent": 4, "children": [], "start_point": {"row": 12, "column": 29}, "end_point": {"row": 12, "column": 37}}, {"id": 9, "type": "preproc_if", "text": "if DEMO_CALL == 1\n\n@property (strong, nonatomic) UIViewController *mainController;\n\n+ (instancetype)sharedManager;\n\n- (void)saveCallOptions;\n\n- (void)makeCallWithUsername:(NSString *)aUsername\n type:(EMCallType)aType;\n\n- (void)answerCall:(NSString *)aCallId;\n\n- (void)hangupCallWithReason:(EMCallEndReason)aReason;\n\n#endif\n", "parent": null, "children": [10, 14, 15, 22, 50, 76], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 10, "type": "binary_expression", "text": "EMO_CALL == 1\n", "parent": 9, "children": [11, 12, 13], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 18}}, {"id": 11, "type": "identifier", "text": "EMO_CALL ", "parent": 10, "children": [], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 13}}, {"id": 12, "type": "==", "text": "= ", "parent": 10, "children": [], "start_point": {"row": 14, "column": 14}, "end_point": {"row": 14, "column": 16}}, {"id": 13, "type": "number_literal", "text": "\n", "parent": 10, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 18}}, {"id": 14, "type": "\n", "text": "\n@", "parent": 9, "children": [], "start_point": {"row": 14, "column": 18}, "end_point": {"row": 16, "column": 0}}, {"id": 15, "type": "ERROR", "text": "property (strong, nonatomic) ", "parent": 9, "children": [16, 17], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 29}}, {"id": 16, "type": "ERROR", "text": "p", "parent": 15, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 1}}, {"id": 17, "type": "call_expression", "text": "roperty (strong, nonatomic) ", "parent": 15, "children": [18, 19], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 29}}, {"id": 18, "type": "identifier", "text": "roperty ", "parent": 17, "children": [], "start_point": {"row": 16, "column": 1}, "end_point": {"row": 16, "column": 9}}, {"id": 19, "type": "argument_list", "text": "strong, nonatomic) ", "parent": 17, "children": [20, 21], "start_point": {"row": 16, "column": 10}, "end_point": {"row": 16, "column": 29}}, {"id": 20, "type": "identifier", "text": "trong,", "parent": 19, "children": [], "start_point": {"row": 16, "column": 11}, "end_point": {"row": 16, "column": 17}}, {"id": 21, "type": "identifier", "text": "onatomic)", "parent": 19, "children": [], "start_point": {"row": 16, "column": 19}, "end_point": {"row": 16, "column": 28}}, {"id": 22, "type": "declaration", "text": "IViewController *mainController;\n", "parent": 9, "children": [23, 24], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 63}}, {"id": 23, "type": "type_identifier", "text": "IViewController ", "parent": 22, "children": [], "start_point": {"row": 16, "column": 30}, "end_point": {"row": 16, "column": 46}}, {"id": 24, "type": "pointer_declarator", "text": "mainController;", "parent": 22, "children": [25, 26], "start_point": {"row": 16, "column": 47}, "end_point": {"row": 16, "column": 62}}, {"id": 25, "type": "*", "text": "m", "parent": 24, "children": [], "start_point": {"row": 16, "column": 47}, "end_point": {"row": 16, "column": 48}}, {"id": 26, "type": "identifier", "text": "ainController;", "parent": 24, "children": [], "start_point": {"row": 16, "column": 48}, "end_point": {"row": 16, "column": 62}}, {"id": 27, "type": "unary_expression", "text": " (instancetype)sharedManager;", "parent": 9, "children": [28, 29], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 29}}, {"id": 28, "type": "+", "text": " ", "parent": 27, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 1}}, {"id": 29, "type": "cast_expression", "text": "instancetype)sharedManager;", "parent": 27, "children": [30, 32], "start_point": {"row": 18, "column": 2}, "end_point": {"row": 18, "column": 29}}, {"id": 30, "type": "type_descriptor", "text": "nstancetype)", "parent": 29, "children": [31], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 15}}, {"id": 31, "type": "type_identifier", "text": "nstancetype)", "parent": 30, "children": [], "start_point": {"row": 18, "column": 3}, "end_point": {"row": 18, "column": 15}}, {"id": 32, "type": "identifier", "text": "haredManager;", "parent": 29, "children": [], "start_point": {"row": 18, "column": 16}, "end_point": {"row": 18, "column": 29}}, {"id": 33, "type": "unary_expression", "text": " (void)saveCallOptions;", "parent": 9, "children": [34, 35], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 23}}, {"id": 34, "type": "-", "text": " ", "parent": 33, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 1}}, {"id": 35, "type": "cast_expression", "text": "void)saveCallOptions;", "parent": 33, "children": [36, 38], "start_point": {"row": 20, "column": 2}, "end_point": {"row": 20, "column": 23}}, {"id": 36, "type": "type_descriptor", "text": "oid)", "parent": 35, "children": [37], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 7}}, {"id": 37, "type": "primitive_type", "text": "oid)", "parent": 36, "children": [], "start_point": {"row": 20, "column": 3}, "end_point": {"row": 20, "column": 7}}, {"id": 38, "type": "identifier", "text": "aveCallOptions;", "parent": 35, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 23}}, {"id": 39, "type": "binary_expression", "text": " (void)makeCallWithUsername:(NSString *)aUsername\n", "parent": 9, "children": [40, 46, 48, 49], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 50}}, {"id": 40, "type": "unary_expression", "text": " (void)makeCallWithUsername:", "parent": 39, "children": [41, 42], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 28}}, {"id": 41, "type": "-", "text": " ", "parent": 40, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 42, "type": "cast_expression", "text": "void)makeCallWithUsername:", "parent": 40, "children": [43, 45], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 28}}, {"id": 43, "type": "type_descriptor", "text": "oid)", "parent": 42, "children": [44], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 7}}, {"id": 44, "type": "primitive_type", "text": "oid)", "parent": 43, "children": [], "start_point": {"row": 22, "column": 3}, "end_point": {"row": 22, "column": 7}}, {"id": 45, "type": "identifier", "text": "akeCallWithUsername:", "parent": 42, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 28}}, {"id": 46, "type": "ERROR", "text": "(NSString ", "parent": 39, "children": [47], "start_point": {"row": 22, "column": 28}, "end_point": {"row": 22, "column": 38}}, {"id": 47, "type": "identifier", "text": "SString ", "parent": 46, "children": [], "start_point": {"row": 22, "column": 30}, "end_point": {"row": 22, "column": 38}}, {"id": 48, "type": "ERROR", "text": "a", "parent": 39, "children": [], "start_point": {"row": 22, "column": 40}, "end_point": {"row": 22, "column": 41}}, {"id": 49, "type": "identifier", "text": "Username\n", "parent": 39, "children": [], "start_point": {"row": 22, "column": 41}, "end_point": {"row": 22, "column": 50}}, {"id": 50, "type": "labeled_statement", "text": "ype:(EMCallType)aType;\n", "parent": 9, "children": [51], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 47}}, {"id": 51, "type": "statement_identifier", "text": "ype:", "parent": 50, "children": [], "start_point": {"row": 23, "column": 24}, "end_point": {"row": 23, "column": 28}}, {"id": 52, "type": "cast_expression", "text": "EMCallType)aType;", "parent": 50, "children": [53, 55], "start_point": {"row": 23, "column": 29}, "end_point": {"row": 23, "column": 46}}, {"id": 53, "type": "type_descriptor", "text": "MCallType)", "parent": 52, "children": [54], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 40}}, {"id": 54, "type": "type_identifier", "text": "MCallType)", "parent": 53, "children": [], "start_point": {"row": 23, "column": 30}, "end_point": {"row": 23, "column": 40}}, {"id": 55, "type": "identifier", "text": "Type;", "parent": 52, "children": [], "start_point": {"row": 23, "column": 41}, "end_point": {"row": 23, "column": 46}}, {"id": 56, "type": "binary_expression", "text": " (void)answerCall:(NSString *)aCallId;", "parent": 9, "children": [57, 63, 65, 66], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 38}}, {"id": 57, "type": "unary_expression", "text": " (void)answerCall:", "parent": 56, "children": [58, 59], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 18}}, {"id": 58, "type": "-", "text": " ", "parent": 57, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 1}}, {"id": 59, "type": "cast_expression", "text": "void)answerCall:", "parent": 57, "children": [60, 62], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 18}}, {"id": 60, "type": "type_descriptor", "text": "oid)", "parent": 59, "children": [61], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 61, "type": "primitive_type", "text": "oid)", "parent": 60, "children": [], "start_point": {"row": 25, "column": 3}, "end_point": {"row": 25, "column": 7}}, {"id": 62, "type": "identifier", "text": "nswerCall:", "parent": 59, "children": [], "start_point": {"row": 25, "column": 8}, "end_point": {"row": 25, "column": 18}}, {"id": 63, "type": "ERROR", "text": "(NSString ", "parent": 56, "children": [64], "start_point": {"row": 25, "column": 18}, "end_point": {"row": 25, "column": 28}}, {"id": 64, "type": "identifier", "text": "SString ", "parent": 63, "children": [], "start_point": {"row": 25, "column": 20}, "end_point": {"row": 25, "column": 28}}, {"id": 65, "type": "ERROR", "text": "a", "parent": 56, "children": [], "start_point": {"row": 25, "column": 30}, "end_point": {"row": 25, "column": 31}}, {"id": 66, "type": "identifier", "text": "CallId;", "parent": 56, "children": [], "start_point": {"row": 25, "column": 31}, "end_point": {"row": 25, "column": 38}}, {"id": 67, "type": "unary_expression", "text": " (void)hangupCallWithReason:", "parent": 9, "children": [68, 69], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 28}}, {"id": 68, "type": "-", "text": " ", "parent": 67, "children": [], "start_point": {"row": 27, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 69, "type": "cast_expression", "text": "void)hangupCallWithReason:", "parent": 67, "children": [70, 72], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 28}}, {"id": 70, "type": "type_descriptor", "text": "oid)", "parent": 69, "children": [71], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 7}}, {"id": 71, "type": "primitive_type", "text": "oid)", "parent": 70, "children": [], "start_point": {"row": 27, "column": 3}, "end_point": {"row": 27, "column": 7}}, {"id": 72, "type": "identifier", "text": "angupCallWithReason:", "parent": 69, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 28}}, {"id": 73, "type": "ERROR", "text": "(EMCallEndReason)aReason;", "parent": 9, "children": [74, 75], "start_point": {"row": 27, "column": 28}, "end_point": {"row": 27, "column": 53}}, {"id": 74, "type": "identifier", "text": "MCallEndReason)", "parent": 73, "children": [], "start_point": {"row": 27, "column": 30}, "end_point": {"row": 27, "column": 45}}, {"id": 75, "type": "identifier", "text": "Reason;", "parent": 73, "children": [], "start_point": {"row": 27, "column": 46}, "end_point": {"row": 27, "column": 53}}, {"id": 76, "type": "#endif", "text": "endif\n", "parent": 9, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 6}}, {"id": 77, "type": "ERROR", "text": "e", "parent": null, "children": [78], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 78, "type": "ERROR", "text": "e", "parent": 77, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 1}}, {"id": 79, "type": "identifier", "text": "nd\n", "parent": null, "children": [], "start_point": {"row": 31, "column": 1}, "end_point": {"row": 31, "column": 4}}]}, "node_categories": {"declarations": {"functions": [], "variables": [22], "classes": [], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [10, 17, 27, 29, 33, 35, 39, 40, 42, 52, 56, 57, 59, 67, 69], "assignments": [], "loops": [], "conditionals": [6, 7, 8, 9, 11, 18, 20, 21, 23, 26, 31, 32, 38, 45, 47, 49, 51, 54, 55, 62, 64, 66, 72, 74, 75, 76, 79], "returns": [], "exceptions": []}, "expressions": {"calls": [0, 2], "literals": [13], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": []}, "original_source_code": "//\n// DemoCallManager.h\n// ChatDemo-UI3.0\n//\n// Created by XieYajie on 22/11/2016.\n// Copyright \u00a9 2016 XieYajie. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n#import \"EMCallOptions+NSCoding.h\"\n\n@interface DemoCallManager : NSObject\n\n#if DEMO_CALL == 1\n\n@property (strong, nonatomic) UIViewController *mainController;\n\n+ (instancetype)sharedManager;\n\n- (void)saveCallOptions;\n\n- (void)makeCallWithUsername:(NSString *)aUsername\n type:(EMCallType)aType;\n\n- (void)answerCall:(NSString *)aCallId;\n\n- (void)hangupCallWithReason:(EMCallEndReason)aReason;\n\n#endif\n\n@end\n"}
88
c
// Copyright (c) 2017-2018 The LitecoinZ developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_QT_ADDRESSBOOKPAGE_H #define BITCOIN_QT_ADDRESSBOOKPAGE_H #include <QDialog> class AddressTableModel; class OptionsModel; class PlatformStyle; namespace Ui { class AddressBookPage; } QT_BEGIN_NAMESPACE class QItemSelection; class QMenu; class QModelIndex; class QSortFilterProxyModel; class QTableView; QT_END_NAMESPACE /** Dialog for Koto Address Book */ class AddressBookPage : public QDialog { Q_OBJECT public: explicit AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent = 0); ~AddressBookPage(); void setModel(AddressTableModel *model); private: Ui::AddressBookPage *ui; AddressTableModel *model; QSortFilterProxyModel *proxyModelReceivingZ; QSortFilterProxyModel *proxyModelReceivingT; QSortFilterProxyModel *proxyModelSendingT; QMenu *contextReceivingZMenu; QMenu *contextReceivingTMenu; QMenu *contextSendingTMenu; QAction *deleteSendingTAction; // to be able to explicitly disable it QString newReceivingZAddressToSelect; QString newReceivingTAddressToSelect; QString newSendingTAddressToSelect; const PlatformStyle *platformStyle; private Q_SLOTS: /** Delete currently selected address entry */ void on_deleteSendingTAddress_clicked(); /** Create a new address for receiving coins and / or add a new address book entry */ void on_newReceivingZAddress_clicked(); void on_newReceivingTAddress_clicked(); void on_newSendingTAddress_clicked(); /** Copy address of currently selected address entry to clipboard */ void on_copyReceivingZAddress_clicked(); void on_copyReceivingTAddress_clicked(); void on_copySendingTAddress_clicked(); /** Export button clicked */ void on_exportReceivingZAddress_clicked(); void on_exportReceivingTAddress_clicked(); void on_exportSendingTAddress_clicked(); /** Set button states based on selection */ void selectionReceivingZChanged(); void selectionReceivingTChanged(); void selectionSendingTChanged(); /** Spawn contextual menu (right mouse menu) for address book entry */ void contextualReceivingZMenu(const QPoint &point); void contextualReceivingTMenu(const QPoint &point); void contextualSendingTMenu(const QPoint &point); /** Copy label of currently selected address entry to clipboard (no button) */ void onCopyLabelReceivingZAction(); void onCopyLabelReceivingTAction(); void onCopyLabelSendingTAction(); /** Edit currently selected address entry (no button) */ void onEditReceivingTAction(); void onEditSendingTAction(); /** New entry/entries were added to address table */ void selectNewAddress(const QModelIndex &parent, int begin, int /*end*/); }; #endif // BITCOIN_QT_ADDRESSBOOKPAGE_H
38.44
75
(translation_unit) "// Copyright (c) 2017-2018 The LitecoinZ developers\n// Distributed under the MIT software license, see the accompanying\n// file COPYING or http://www.opensource.org/licenses/mit-license.php.\n\n#ifndef BITCOIN_QT_ADDRESSBOOKPAGE_H\n#define BITCOIN_QT_ADDRESSBOOKPAGE_H\n\n#include <QDialog>\n\nclass AddressTableModel;\nclass OptionsModel;\nclass PlatformStyle;\n\nnamespace Ui {\n class AddressBookPage;\n}\n\nQT_BEGIN_NAMESPACE\nclass QItemSelection;\nclass QMenu;\nclass QModelIndex;\nclass QSortFilterProxyModel;\nclass QTableView;\nQT_END_NAMESPACE\n\n/** Dialog for Koto Address Book */\nclass AddressBookPage : public QDialog\n{\n Q_OBJECT\n\npublic:\n explicit AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent = 0);\n ~AddressBookPage();\n\n void setModel(AddressTableModel *model);\n\nprivate:\n Ui::AddressBookPage *ui;\n AddressTableModel *model;\n QSortFilterProxyModel *proxyModelReceivingZ;\n QSortFilterProxyModel *proxyModelReceivingT;\n QSortFilterProxyModel *proxyModelSendingT;\n\n QMenu *contextReceivingZMenu;\n QMenu *contextReceivingTMenu;\n QMenu *contextSendingTMenu;\n\n QAction *deleteSendingTAction; // to be able to explicitly disable it\n\n QString newReceivingZAddressToSelect;\n QString newReceivingTAddressToSelect;\n QString newSendingTAddressToSelect;\n\n const PlatformStyle *platformStyle;\n\nprivate Q_SLOTS:\n /** Delete currently selected address entry */\n void on_deleteSendingTAddress_clicked();\n\n /** Create a new address for receiving coins and / or add a new address book entry */\n void on_newReceivingZAddress_clicked();\n void on_newReceivingTAddress_clicked();\n void on_newSendingTAddress_clicked();\n\n /** Copy address of currently selected address entry to clipboard */\n void on_copyReceivingZAddress_clicked();\n void on_copyReceivingTAddress_clicked();\n void on_copySendingTAddress_clicked();\n\n /** Export button clicked */\n void on_exportReceivingZAddress_clicked();\n void on_exportReceivingTAddress_clicked();\n void on_exportSendingTAddress_clicked();\n\n /** Set button states based on selection */\n void selectionReceivingZChanged();\n void selectionReceivingTChanged();\n void selectionSendingTChanged();\n\n /** Spawn contextual menu (right mouse menu) for address book entry */\n void contextualReceivingZMenu(const QPoint &point);\n void contextualReceivingTMenu(const QPoint &point);\n void contextualSendingTMenu(const QPoint &point);\n\n /** Copy label of currently selected address entry to clipboard (no button) */\n void onCopyLabelReceivingZAction();\n void onCopyLabelReceivingTAction();\n void onCopyLabelSendingTAction();\n\n /** Edit currently selected address entry (no button) */\n void onEditReceivingTAction();\n void onEditSendingTAction();\n\n /** New entry/entries were added to address table */\n void selectNewAddress(const QModelIndex &parent, int begin, int /*end*/);\n};\n\n#endif // BITCOIN_QT_ADDRESSBOOKPAGE_H\n" (comment) "// Copyright (c) 2017-2018 The LitecoinZ developers" (comment) "// Distributed under the MIT software license, see the accompanying" (comment) "// file COPYING or http://www.opensource.org/licenses/mit-license.php." (preproc_ifdef) "#ifndef BITCOIN_QT_ADDRESSBOOKPAGE_H\n#define BITCOIN_QT_ADDRESSBOOKPAGE_H\n\n#include <QDialog>\n\nclass AddressTableModel;\nclass OptionsModel;\nclass PlatformStyle;\n\nnamespace Ui {\n class AddressBookPage;\n}\n\nQT_BEGIN_NAMESPACE\nclass QItemSelection;\nclass QMenu;\nclass QModelIndex;\nclass QSortFilterProxyModel;\nclass QTableView;\nQT_END_NAMESPACE\n\n/** Dialog for Koto Address Book */\nclass AddressBookPage : public QDialog\n{\n Q_OBJECT\n\npublic:\n explicit AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent = 0);\n ~AddressBookPage();\n\n void setModel(AddressTableModel *model);\n\nprivate:\n Ui::AddressBookPage *ui;\n AddressTableModel *model;\n QSortFilterProxyModel *proxyModelReceivingZ;\n QSortFilterProxyModel *proxyModelReceivingT;\n QSortFilterProxyModel *proxyModelSendingT;\n\n QMenu *contextReceivingZMenu;\n QMenu *contextReceivingTMenu;\n QMenu *contextSendingTMenu;\n\n QAction *deleteSendingTAction; // to be able to explicitly disable it\n\n QString newReceivingZAddressToSelect;\n QString newReceivingTAddressToSelect;\n QString newSendingTAddressToSelect;\n\n const PlatformStyle *platformStyle;\n\nprivate Q_SLOTS:\n /** Delete currently selected address entry */\n void on_deleteSendingTAddress_clicked();\n\n /** Create a new address for receiving coins and / or add a new address book entry */\n void on_newReceivingZAddress_clicked();\n void on_newReceivingTAddress_clicked();\n void on_newSendingTAddress_clicked();\n\n /** Copy address of currently selected address entry to clipboard */\n void on_copyReceivingZAddress_clicked();\n void on_copyReceivingTAddress_clicked();\n void on_copySendingTAddress_clicked();\n\n /** Export button clicked */\n void on_exportReceivingZAddress_clicked();\n void on_exportReceivingTAddress_clicked();\n void on_exportSendingTAddress_clicked();\n\n /** Set button states based on selection */\n void selectionReceivingZChanged();\n void selectionReceivingTChanged();\n void selectionSendingTChanged();\n\n /** Spawn contextual menu (right mouse menu) for address book entry */\n void contextualReceivingZMenu(const QPoint &point);\n void contextualReceivingTMenu(const QPoint &point);\n void contextualSendingTMenu(const QPoint &point);\n\n /** Copy label of currently selected address entry to clipboard (no button) */\n void onCopyLabelReceivingZAction();\n void onCopyLabelReceivingTAction();\n void onCopyLabelSendingTAction();\n\n /** Edit currently selected address entry (no button) */\n void onEditReceivingTAction();\n void onEditSendingTAction();\n\n /** New entry/entries were added to address table */\n void selectNewAddress(const QModelIndex &parent, int begin, int /*end*/);\n};\n\n#endif" (#ifndef) "#ifndef" (identifier) "BITCOIN_QT_ADDRESSBOOKPAGE_H" (preproc_def) "#define BITCOIN_QT_ADDRESSBOOKPAGE_H\n" (#define) "#define" (identifier) "BITCOIN_QT_ADDRESSBOOKPAGE_H" (preproc_include) "#include <QDialog>\n" (#include) "#include" (system_lib_string) "<QDialog>" (declaration) "class AddressTableModel;" (type_identifier) "class" (identifier) "AddressTableModel" (;) ";" (declaration) "class OptionsModel;" (type_identifier) "class" (identifier) "OptionsModel" (;) ";" (declaration) "class PlatformStyle;" (type_identifier) "class" (identifier) "PlatformStyle" (;) ";" (function_definition) "namespace Ui {\n class AddressBookPage;\n}" (type_identifier) "namespace" (identifier) "Ui" (compound_statement) "{\n class AddressBookPage;\n}" ({) "{" (declaration) "class AddressBookPage;" (type_identifier) "class" (identifier) "AddressBookPage" (;) ";" (}) "}" (declaration) "QT_BEGIN_NAMESPACE\nclass QItemSelection;" (type_identifier) "QT_BEGIN_NAMESPACE" (ERROR) "class" (identifier) "class" (identifier) "QItemSelection" (;) ";" (declaration) "class QMenu;" (type_identifier) "class" (identifier) "QMenu" (;) ";" (declaration) "class QModelIndex;" (type_identifier) "class" (identifier) "QModelIndex" (;) ";" (declaration) "class QSortFilterProxyModel;" (type_identifier) "class" (identifier) "QSortFilterProxyModel" (;) ";" (declaration) "class QTableView;" (type_identifier) "class" (identifier) "QTableView" (;) ";" (declaration) "QT_END_NAMESPACE\n\n/** Dialog for Koto Address Book */\nclass" (type_identifier) "QT_END_NAMESPACE" (comment) "/** Dialog for Koto Address Book */" (identifier) "class" (;) "" (labeled_statement) "AddressBookPage : public QDialog\n{\n Q_OBJECT\n\npublic:\n explicit AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent = 0);" (statement_identifier) "AddressBookPage" (ERROR) ": public QDialog\n{\n Q_OBJECT\n\npublic" (:) ":" (ERROR) "public QDialog" (type_identifier) "public" (identifier) "QDialog" ({) "{" (type_identifier) "Q_OBJECT" (identifier) "public" (:) ":" (declaration) "explicit AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent = 0);" (type_identifier) "explicit" (init_declarator) "AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent = 0" (function_declarator) "AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent" (identifier) "AddressBookPage" (parameter_list) "(const PlatformStyle *platformStyle, QWidget *parent" (() "(" (parameter_declaration) "const PlatformStyle *platformStyle" (type_qualifier) "const" (const) "const" (type_identifier) "PlatformStyle" (pointer_declarator) "*platformStyle" (*) "*" (identifier) "platformStyle" (,) "," (parameter_declaration) "QWidget *parent" (type_identifier) "QWidget" (pointer_declarator) "*parent" (*) "*" (identifier) "parent" ()) "" (=) "=" (number_literal) "0" (ERROR) ")" ()) ")" (;) ";" (expression_statement) "~AddressBookPage();" (unary_expression) "~AddressBookPage()" (~) "~" (call_expression) "AddressBookPage()" (identifier) "AddressBookPage" (argument_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void setModel(AddressTableModel *model);" (primitive_type) "void" (function_declarator) "setModel(AddressTableModel *model)" (identifier) "setModel" (parameter_list) "(AddressTableModel *model)" (() "(" (parameter_declaration) "AddressTableModel *model" (type_identifier) "AddressTableModel" (pointer_declarator) "*model" (*) "*" (identifier) "model" ()) ")" (;) ";" (labeled_statement) "private:\n Ui::AddressBookPage *ui;" (statement_identifier) "private" (:) ":" (labeled_statement) "Ui::AddressBookPage *ui;" (statement_identifier) "Ui" (:) ":" (ERROR) ":" (:) ":" (declaration) "AddressBookPage *ui;" (type_identifier) "AddressBookPage" (pointer_declarator) "*ui" (*) "*" (identifier) "ui" (;) ";" (declaration) "AddressTableModel *model;" (type_identifier) "AddressTableModel" (pointer_declarator) "*model" (*) "*" (identifier) "model" (;) ";" (declaration) "QSortFilterProxyModel *proxyModelReceivingZ;" (type_identifier) "QSortFilterProxyModel" (pointer_declarator) "*proxyModelReceivingZ" (*) "*" (identifier) "proxyModelReceivingZ" (;) ";" (declaration) "QSortFilterProxyModel *proxyModelReceivingT;" (type_identifier) "QSortFilterProxyModel" (pointer_declarator) "*proxyModelReceivingT" (*) "*" (identifier) "proxyModelReceivingT" (;) ";" (declaration) "QSortFilterProxyModel *proxyModelSendingT;" (type_identifier) "QSortFilterProxyModel" (pointer_declarator) "*proxyModelSendingT" (*) "*" (identifier) "proxyModelSendingT" (;) ";" (declaration) "QMenu *contextReceivingZMenu;" (type_identifier) "QMenu" (pointer_declarator) "*contextReceivingZMenu" (*) "*" (identifier) "contextReceivingZMenu" (;) ";" (declaration) "QMenu *contextReceivingTMenu;" (type_identifier) "QMenu" (pointer_declarator) "*contextReceivingTMenu" (*) "*" (identifier) "contextReceivingTMenu" (;) ";" (declaration) "QMenu *contextSendingTMenu;" (type_identifier) "QMenu" (pointer_declarator) "*contextSendingTMenu" (*) "*" (identifier) "contextSendingTMenu" (;) ";" (declaration) "QAction *deleteSendingTAction;" (type_identifier) "QAction" (pointer_declarator) "*deleteSendingTAction" (*) "*" (identifier) "deleteSendingTAction" (;) ";" (comment) "// to be able to explicitly disable it" (declaration) "QString newReceivingZAddressToSelect;" (type_identifier) "QString" (identifier) "newReceivingZAddressToSelect" (;) ";" (declaration) "QString newReceivingTAddressToSelect;" (type_identifier) "QString" (identifier) "newReceivingTAddressToSelect" (;) ";" (declaration) "QString newSendingTAddressToSelect;" (type_identifier) "QString" (identifier) "newSendingTAddressToSelect" (;) ";" (declaration) "const PlatformStyle *platformStyle;" (type_qualifier) "const" (const) "const" (type_identifier) "PlatformStyle" (pointer_declarator) "*platformStyle" (*) "*" (identifier) "platformStyle" (;) ";" (ERROR) "private Q_SLOTS:" (type_identifier) "private" (identifier) "Q_SLOTS" (:) ":" (comment) "/** Delete currently selected address entry */" (declaration) "void on_deleteSendingTAddress_clicked();" (primitive_type) "void" (function_declarator) "on_deleteSendingTAddress_clicked()" (identifier) "on_deleteSendingTAddress_clicked" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/** Create a new address for receiving coins and / or add a new address book entry */" (declaration) "void on_newReceivingZAddress_clicked();" (primitive_type) "void" (function_declarator) "on_newReceivingZAddress_clicked()" (identifier) "on_newReceivingZAddress_clicked" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void on_newReceivingTAddress_clicked();" (primitive_type) "void" (function_declarator) "on_newReceivingTAddress_clicked()" (identifier) "on_newReceivingTAddress_clicked" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void on_newSendingTAddress_clicked();" (primitive_type) "void" (function_declarator) "on_newSendingTAddress_clicked()" (identifier) "on_newSendingTAddress_clicked" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/** Copy address of currently selected address entry to clipboard */" (declaration) "void on_copyReceivingZAddress_clicked();" (primitive_type) "void" (function_declarator) "on_copyReceivingZAddress_clicked()" (identifier) "on_copyReceivingZAddress_clicked" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void on_copyReceivingTAddress_clicked();" (primitive_type) "void" (function_declarator) "on_copyReceivingTAddress_clicked()" (identifier) "on_copyReceivingTAddress_clicked" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void on_copySendingTAddress_clicked();" (primitive_type) "void" (function_declarator) "on_copySendingTAddress_clicked()" (identifier) "on_copySendingTAddress_clicked" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/** Export button clicked */" (declaration) "void on_exportReceivingZAddress_clicked();" (primitive_type) "void" (function_declarator) "on_exportReceivingZAddress_clicked()" (identifier) "on_exportReceivingZAddress_clicked" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void on_exportReceivingTAddress_clicked();" (primitive_type) "void" (function_declarator) "on_exportReceivingTAddress_clicked()" (identifier) "on_exportReceivingTAddress_clicked" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void on_exportSendingTAddress_clicked();" (primitive_type) "void" (function_declarator) "on_exportSendingTAddress_clicked()" (identifier) "on_exportSendingTAddress_clicked" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/** Set button states based on selection */" (declaration) "void selectionReceivingZChanged();" (primitive_type) "void" (function_declarator) "selectionReceivingZChanged()" (identifier) "selectionReceivingZChanged" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void selectionReceivingTChanged();" (primitive_type) "void" (function_declarator) "selectionReceivingTChanged()" (identifier) "selectionReceivingTChanged" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void selectionSendingTChanged();" (primitive_type) "void" (function_declarator) "selectionSendingTChanged()" (identifier) "selectionSendingTChanged" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/** Spawn contextual menu (right mouse menu) for address book entry */" (declaration) "void contextualReceivingZMenu(const QPoint &point);" (primitive_type) "void" (function_declarator) "contextualReceivingZMenu(const QPoint &point)" (identifier) "contextualReceivingZMenu" (parameter_list) "(const QPoint &point)" (() "(" (parameter_declaration) "const QPoint &point" (type_qualifier) "const" (const) "const" (type_identifier) "QPoint" (ERROR) "&" (&) "&" (identifier) "point" ()) ")" (;) ";" (declaration) "void contextualReceivingTMenu(const QPoint &point);" (primitive_type) "void" (function_declarator) "contextualReceivingTMenu(const QPoint &point)" (identifier) "contextualReceivingTMenu" (parameter_list) "(const QPoint &point)" (() "(" (parameter_declaration) "const QPoint &point" (type_qualifier) "const" (const) "const" (type_identifier) "QPoint" (ERROR) "&" (&) "&" (identifier) "point" ()) ")" (;) ";" (declaration) "void contextualSendingTMenu(const QPoint &point);" (primitive_type) "void" (function_declarator) "contextualSendingTMenu(const QPoint &point)" (identifier) "contextualSendingTMenu" (parameter_list) "(const QPoint &point)" (() "(" (parameter_declaration) "const QPoint &point" (type_qualifier) "const" (const) "const" (type_identifier) "QPoint" (ERROR) "&" (&) "&" (identifier) "point" ()) ")" (;) ";" (comment) "/** Copy label of currently selected address entry to clipboard (no button) */" (declaration) "void onCopyLabelReceivingZAction();" (primitive_type) "void" (function_declarator) "onCopyLabelReceivingZAction()" (identifier) "onCopyLabelReceivingZAction" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void onCopyLabelReceivingTAction();" (primitive_type) "void" (function_declarator) "onCopyLabelReceivingTAction()" (identifier) "onCopyLabelReceivingTAction" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void onCopyLabelSendingTAction();" (primitive_type) "void" (function_declarator) "onCopyLabelSendingTAction()" (identifier) "onCopyLabelSendingTAction" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/** Edit currently selected address entry (no button) */" (declaration) "void onEditReceivingTAction();" (primitive_type) "void" (function_declarator) "onEditReceivingTAction()" (identifier) "onEditReceivingTAction" (parameter_list) "()" (() "(" ()) ")" (;) ";" (declaration) "void onEditSendingTAction();" (primitive_type) "void" (function_declarator) "onEditSendingTAction()" (identifier) "onEditSendingTAction" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "/** New entry/entries were added to address table */" (declaration) "void selectNewAddress(const QModelIndex &parent, int begin, int /*end*/);" (primitive_type) "void" (function_declarator) "selectNewAddress(const QModelIndex &parent, int begin, int /*end*/)" (identifier) "selectNewAddress" (parameter_list) "(const QModelIndex &parent, int begin, int /*end*/)" (() "(" (parameter_declaration) "const QModelIndex &parent" (type_qualifier) "const" (const) "const" (type_identifier) "QModelIndex" (ERROR) "&" (&) "&" (identifier) "parent" (,) "," (parameter_declaration) "int begin" (primitive_type) "int" (identifier) "begin" (,) "," (parameter_declaration) "int" (primitive_type) "int" (comment) "/*end*/" ()) ")" (;) ";" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "// BITCOIN_QT_ADDRESSBOOKPAGE_H"
435
11
{"language": "c", "success": true, "metadata": {"lines": 75, "avg_line_length": 38.44, "nodes": 263, "errors": 0, "source_hash": "06a8f8feafd0203e1e91a33b34f7003ac018270295ecdcc78572eed1d9d9b1e3", "categorized_nodes": 176}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef BITCOIN_QT_ADDRESSBOOKPAGE_H\n#define BITCOIN_QT_ADDRESSBOOKPAGE_H\n\n#include <QDialog>\n\nclass AddressTableModel;\nclass OptionsModel;\nclass PlatformStyle;\n\nnamespace Ui {\n class AddressBookPage;\n}\n\nQT_BEGIN_NAMESPACE\nclass QItemSelection;\nclass QMenu;\nclass QModelIndex;\nclass QSortFilterProxyModel;\nclass QTableView;\nQT_END_NAMESPACE\n\n/** Dialog for Koto Address Book */\nclass AddressBookPage : public QDialog\n{\n Q_OBJECT\n\npublic:\n explicit AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent = 0);\n ~AddressBookPage();\n\n void setModel(AddressTableModel *model);\n\nprivate:\n Ui::AddressBookPage *ui;\n AddressTableModel *model;\n QSortFilterProxyModel *proxyModelReceivingZ;\n QSortFilterProxyModel *proxyModelReceivingT;\n QSortFilterProxyModel *proxyModelSendingT;\n\n QMenu *contextReceivingZMenu;\n QMenu *contextReceivingTMenu;\n QMenu *contextSendingTMenu;\n\n QAction *deleteSendingTAction; // to be able to explicitly disable it\n\n QString newReceivingZAddressToSelect;\n QString newReceivingTAddressToSelect;\n QString newSendingTAddressToSelect;\n\n const PlatformStyle *platformStyle;\n\nprivate Q_SLOTS:\n /** Delete currently selected address entry */\n void on_deleteSendingTAddress_clicked();\n\n /** Create a new address for receiving coins and / or add a new address book entry */\n void on_newReceivingZAddress_clicked();\n void on_newReceivingTAddress_clicked();\n void on_newSendingTAddress_clicked();\n\n /** Copy address of currently selected address entry to clipboard */\n void on_copyReceivingZAddress_clicked();\n void on_copyReceivingTAddress_clicked();\n void on_copySendingTAddress_clicked();\n\n /** Export button clicked */\n void on_exportReceivingZAddress_clicked();\n void on_exportReceivingTAddress_clicked();\n void on_exportSendingTAddress_clicked();\n\n /** Set button states based on selection */\n void selectionReceivingZChanged();\n void selectionReceivingTChanged();\n void selectionSendingTChanged();\n\n /** Spawn contextual menu (right mouse menu) for address book entry */\n void contextualReceivingZMenu(const QPoint &point);\n void contextualReceivingTMenu(const QPoint &point);\n void contextualSendingTMenu(const QPoint &point);\n\n /** Copy label of currently selected address entry to clipboard (no button) */\n void onCopyLabelReceivingZAction();\n void onCopyLabelReceivingTAction();\n void onCopyLabelSendingTAction();\n\n /** Edit currently selected address entry (no button) */\n void onEditReceivingTAction();\n void onEditSendingTAction();\n\n /** New entry/entries were added to address table */\n void selectNewAddress(const QModelIndex &parent, int begin, int /*end*/);\n};\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 11, 13, 15, 20, 23, 25, 27, 29, 31, 33, 62, 72, 80, 85, 90, 95, 100, 105, 110, 115, 120, 123, 126, 129, 134, 136, 141, 146, 151, 156, 161, 166, 171, 176, 181, 186, 191, 196, 201, 209, 217, 225, 230, 235, 240, 245, 250, 262], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 97, "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": "BITCOIN_QT_ADDRESSBOOKPAGE_H", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 36}}, {"id": 3, "type": "preproc_def", "text": "#define BITCOIN_QT_ADDRESSBOOKPAGE_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": "BITCOIN_QT_ADDRESSBOOKPAGE_H", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 36}}, {"id": 6, "type": "preproc_include", "text": "#include <QDialog>\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": "<QDialog>", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 18}}, {"id": 9, "type": "declaration", "text": "class AddressTableModel;", "parent": 0, "children": [10], "start_point": {"row": 9, "column": 0}, "end_point": {"row": 9, "column": 24}}, {"id": 10, "type": "identifier", "text": "AddressTableModel", "parent": 9, "children": [], "start_point": {"row": 9, "column": 6}, "end_point": {"row": 9, "column": 23}}, {"id": 11, "type": "declaration", "text": "class OptionsModel;", "parent": 0, "children": [12], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 19}}, {"id": 12, "type": "identifier", "text": "OptionsModel", "parent": 11, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 18}}, {"id": 13, "type": "declaration", "text": "class PlatformStyle;", "parent": 0, "children": [14], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 20}}, {"id": 14, "type": "identifier", "text": "PlatformStyle", "parent": 13, "children": [], "start_point": {"row": 11, "column": 6}, "end_point": {"row": 11, "column": 19}}, {"id": 15, "type": "function_definition", "text": "namespace Ui {\n class AddressBookPage;\n}", "parent": 0, "children": [16, 17], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 15, "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": "Ui", "parent": 15, "children": [], "start_point": {"row": 13, "column": 10}, "end_point": {"row": 13, "column": 12}}, {"id": 18, "type": "declaration", "text": "class AddressBookPage;", "parent": 15, "children": [19], "start_point": {"row": 14, "column": 4}, "end_point": {"row": 14, "column": 26}}, {"id": 19, "type": "identifier", "text": "AddressBookPage", "parent": 18, "children": [], "start_point": {"row": 14, "column": 10}, "end_point": {"row": 14, "column": 25}}, {"id": 20, "type": "declaration", "text": "QT_BEGIN_NAMESPACE\nclass QItemSelection;", "parent": 0, "children": [21, 22], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 21}}, {"id": 21, "type": "type_identifier", "text": "QT_BEGIN_NAMESPACE", "parent": 20, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 18}}, {"id": 22, "type": "identifier", "text": "QItemSelection", "parent": 20, "children": [], "start_point": {"row": 18, "column": 6}, "end_point": {"row": 18, "column": 20}}, {"id": 23, "type": "declaration", "text": "class QMenu;", "parent": 0, "children": [24], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 12}}, {"id": 24, "type": "identifier", "text": "QMenu", "parent": 23, "children": [], "start_point": {"row": 19, "column": 6}, "end_point": {"row": 19, "column": 11}}, {"id": 25, "type": "declaration", "text": "class QModelIndex;", "parent": 0, "children": [26], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 18}}, {"id": 26, "type": "identifier", "text": "QModelIndex", "parent": 25, "children": [], "start_point": {"row": 20, "column": 6}, "end_point": {"row": 20, "column": 17}}, {"id": 27, "type": "declaration", "text": "class QSortFilterProxyModel;", "parent": 0, "children": [28], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 28}}, {"id": 28, "type": "identifier", "text": "QSortFilterProxyModel", "parent": 27, "children": [], "start_point": {"row": 21, "column": 6}, "end_point": {"row": 21, "column": 27}}, {"id": 29, "type": "declaration", "text": "class QTableView;", "parent": 0, "children": [30], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 17}}, {"id": 30, "type": "identifier", "text": "QTableView", "parent": 29, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 16}}, {"id": 31, "type": "declaration", "text": "QT_END_NAMESPACE\n\n/** Dialog for Koto Address Book */\nclass", "parent": 0, "children": [32], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 26, "column": 5}}, {"id": 32, "type": "type_identifier", "text": "QT_END_NAMESPACE", "parent": 31, "children": [], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 16}}, {"id": 33, "type": "labeled_statement", "text": "AddressBookPage : public QDialog\n{\n Q_OBJECT\n\npublic:\n explicit AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent = 0);", "parent": 0, "children": [34, 35, 39], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 31, "column": 86}}, {"id": 34, "type": "statement_identifier", "text": "AddressBookPage", "parent": 33, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 21}}, {"id": 35, "type": "ERROR", "text": ": public QDialog\n{\n Q_OBJECT\n\npublic", "parent": 33, "children": [36, 38], "start_point": {"row": 26, "column": 22}, "end_point": {"row": 30, "column": 6}}, {"id": 36, "type": "ERROR", "text": "public QDialog", "parent": 35, "children": [37], "start_point": {"row": 26, "column": 24}, "end_point": {"row": 26, "column": 38}}, {"id": 37, "type": "identifier", "text": "QDialog", "parent": 36, "children": [], "start_point": {"row": 26, "column": 31}, "end_point": {"row": 26, "column": 38}}, {"id": 38, "type": "type_identifier", "text": "Q_OBJECT", "parent": 35, "children": [], "start_point": {"row": 28, "column": 4}, "end_point": {"row": 28, "column": 12}}, {"id": 39, "type": "declaration", "text": "explicit AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent = 0);", "parent": 33, "children": [40, 41], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 86}}, {"id": 40, "type": "type_identifier", "text": "explicit", "parent": 39, "children": [], "start_point": {"row": 31, "column": 4}, "end_point": {"row": 31, "column": 12}}, {"id": 41, "type": "init_declarator", "text": "AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent = 0", "parent": 39, "children": [42, 55, 56], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 84}}, {"id": 42, "type": "function_declarator", "text": "AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent", "parent": 41, "children": [43, 44], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 80}}, {"id": 43, "type": "identifier", "text": "AddressBookPage", "parent": 42, "children": [], "start_point": {"row": 31, "column": 13}, "end_point": {"row": 31, "column": 28}}, {"id": 44, "type": "parameter_list", "text": "(const PlatformStyle *platformStyle, QWidget *parent", "parent": 42, "children": [45, 50], "start_point": {"row": 31, "column": 28}, "end_point": {"row": 31, "column": 80}}, {"id": 45, "type": "parameter_declaration", "text": "const PlatformStyle *platformStyle", "parent": 44, "children": [46, 47], "start_point": {"row": 31, "column": 29}, "end_point": {"row": 31, "column": 63}}, {"id": 46, "type": "type_identifier", "text": "PlatformStyle", "parent": 45, "children": [], "start_point": {"row": 31, "column": 35}, "end_point": {"row": 31, "column": 48}}, {"id": 47, "type": "pointer_declarator", "text": "*platformStyle", "parent": 45, "children": [48, 49], "start_point": {"row": 31, "column": 49}, "end_point": {"row": 31, "column": 63}}, {"id": 48, "type": "*", "text": "*", "parent": 47, "children": [], "start_point": {"row": 31, "column": 49}, "end_point": {"row": 31, "column": 50}}, {"id": 49, "type": "identifier", "text": "platformStyle", "parent": 47, "children": [], "start_point": {"row": 31, "column": 50}, "end_point": {"row": 31, "column": 63}}, {"id": 50, "type": "parameter_declaration", "text": "QWidget *parent", "parent": 44, "children": [51, 52], "start_point": {"row": 31, "column": 65}, "end_point": {"row": 31, "column": 80}}, {"id": 51, "type": "type_identifier", "text": "QWidget", "parent": 50, "children": [], "start_point": {"row": 31, "column": 65}, "end_point": {"row": 31, "column": 72}}, {"id": 52, "type": "pointer_declarator", "text": "*parent", "parent": 50, "children": [53, 54], "start_point": {"row": 31, "column": 73}, "end_point": {"row": 31, "column": 80}}, {"id": 53, "type": "*", "text": "*", "parent": 52, "children": [], "start_point": {"row": 31, "column": 73}, "end_point": {"row": 31, "column": 74}}, {"id": 54, "type": "identifier", "text": "parent", "parent": 52, "children": [], "start_point": {"row": 31, "column": 74}, "end_point": {"row": 31, "column": 80}}, {"id": 55, "type": "=", "text": "=", "parent": 41, "children": [], "start_point": {"row": 31, "column": 81}, "end_point": {"row": 31, "column": 82}}, {"id": 56, "type": "number_literal", "text": "0", "parent": 41, "children": [], "start_point": {"row": 31, "column": 83}, "end_point": {"row": 31, "column": 84}}, {"id": 57, "type": "unary_expression", "text": "~AddressBookPage()", "parent": 0, "children": [58, 59], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 22}}, {"id": 58, "type": "~", "text": "~", "parent": 57, "children": [], "start_point": {"row": 32, "column": 4}, "end_point": {"row": 32, "column": 5}}, {"id": 59, "type": "call_expression", "text": "AddressBookPage()", "parent": 57, "children": [60, 61], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 22}}, {"id": 60, "type": "identifier", "text": "AddressBookPage", "parent": 59, "children": [], "start_point": {"row": 32, "column": 5}, "end_point": {"row": 32, "column": 20}}, {"id": 61, "type": "argument_list", "text": "()", "parent": 59, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 22}}, {"id": 62, "type": "declaration", "text": "void setModel(AddressTableModel *model);", "parent": 0, "children": [63, 64], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 44}}, {"id": 63, "type": "primitive_type", "text": "void", "parent": 62, "children": [], "start_point": {"row": 34, "column": 4}, "end_point": {"row": 34, "column": 8}}, {"id": 64, "type": "function_declarator", "text": "setModel(AddressTableModel *model)", "parent": 62, "children": [65, 66], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 43}}, {"id": 65, "type": "identifier", "text": "setModel", "parent": 64, "children": [], "start_point": {"row": 34, "column": 9}, "end_point": {"row": 34, "column": 17}}, {"id": 66, "type": "parameter_list", "text": "(AddressTableModel *model)", "parent": 64, "children": [67], "start_point": {"row": 34, "column": 17}, "end_point": {"row": 34, "column": 43}}, {"id": 67, "type": "parameter_declaration", "text": "AddressTableModel *model", "parent": 66, "children": [68, 69], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 42}}, {"id": 68, "type": "type_identifier", "text": "AddressTableModel", "parent": 67, "children": [], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 35}}, {"id": 69, "type": "pointer_declarator", "text": "*model", "parent": 67, "children": [70, 71], "start_point": {"row": 34, "column": 36}, "end_point": {"row": 34, "column": 42}}, {"id": 70, "type": "*", "text": "*", "parent": 69, "children": [], "start_point": {"row": 34, "column": 36}, "end_point": {"row": 34, "column": 37}}, {"id": 71, "type": "identifier", "text": "model", "parent": 69, "children": [], "start_point": {"row": 34, "column": 37}, "end_point": {"row": 34, "column": 42}}, {"id": 72, "type": "labeled_statement", "text": "private:\n Ui::AddressBookPage *ui;", "parent": 0, "children": [73], "start_point": {"row": 36, "column": 0}, "end_point": {"row": 37, "column": 28}}, {"id": 73, "type": "labeled_statement", "text": "Ui::AddressBookPage *ui;", "parent": 72, "children": [74, 75], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 28}}, {"id": 74, "type": "statement_identifier", "text": "Ui", "parent": 73, "children": [], "start_point": {"row": 37, "column": 4}, "end_point": {"row": 37, "column": 6}}, {"id": 75, "type": "declaration", "text": "AddressBookPage *ui;", "parent": 73, "children": [76, 77], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 28}}, {"id": 76, "type": "type_identifier", "text": "AddressBookPage", "parent": 75, "children": [], "start_point": {"row": 37, "column": 8}, "end_point": {"row": 37, "column": 23}}, {"id": 77, "type": "pointer_declarator", "text": "*ui", "parent": 75, "children": [78, 79], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 27}}, {"id": 78, "type": "*", "text": "*", "parent": 77, "children": [], "start_point": {"row": 37, "column": 24}, "end_point": {"row": 37, "column": 25}}, {"id": 79, "type": "identifier", "text": "ui", "parent": 77, "children": [], "start_point": {"row": 37, "column": 25}, "end_point": {"row": 37, "column": 27}}, {"id": 80, "type": "declaration", "text": "AddressTableModel *model;", "parent": 0, "children": [81, 82], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 29}}, {"id": 81, "type": "type_identifier", "text": "AddressTableModel", "parent": 80, "children": [], "start_point": {"row": 38, "column": 4}, "end_point": {"row": 38, "column": 21}}, {"id": 82, "type": "pointer_declarator", "text": "*model", "parent": 80, "children": [83, 84], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 28}}, {"id": 83, "type": "*", "text": "*", "parent": 82, "children": [], "start_point": {"row": 38, "column": 22}, "end_point": {"row": 38, "column": 23}}, {"id": 84, "type": "identifier", "text": "model", "parent": 82, "children": [], "start_point": {"row": 38, "column": 23}, "end_point": {"row": 38, "column": 28}}, {"id": 85, "type": "declaration", "text": "QSortFilterProxyModel *proxyModelReceivingZ;", "parent": 0, "children": [86, 87], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 48}}, {"id": 86, "type": "type_identifier", "text": "QSortFilterProxyModel", "parent": 85, "children": [], "start_point": {"row": 39, "column": 4}, "end_point": {"row": 39, "column": 25}}, {"id": 87, "type": "pointer_declarator", "text": "*proxyModelReceivingZ", "parent": 85, "children": [88, 89], "start_point": {"row": 39, "column": 26}, "end_point": {"row": 39, "column": 47}}, {"id": 88, "type": "*", "text": "*", "parent": 87, "children": [], "start_point": {"row": 39, "column": 26}, "end_point": {"row": 39, "column": 27}}, {"id": 89, "type": "identifier", "text": "proxyModelReceivingZ", "parent": 87, "children": [], "start_point": {"row": 39, "column": 27}, "end_point": {"row": 39, "column": 47}}, {"id": 90, "type": "declaration", "text": "QSortFilterProxyModel *proxyModelReceivingT;", "parent": 0, "children": [91, 92], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 48}}, {"id": 91, "type": "type_identifier", "text": "QSortFilterProxyModel", "parent": 90, "children": [], "start_point": {"row": 40, "column": 4}, "end_point": {"row": 40, "column": 25}}, {"id": 92, "type": "pointer_declarator", "text": "*proxyModelReceivingT", "parent": 90, "children": [93, 94], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 47}}, {"id": 93, "type": "*", "text": "*", "parent": 92, "children": [], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 27}}, {"id": 94, "type": "identifier", "text": "proxyModelReceivingT", "parent": 92, "children": [], "start_point": {"row": 40, "column": 27}, "end_point": {"row": 40, "column": 47}}, {"id": 95, "type": "declaration", "text": "QSortFilterProxyModel *proxyModelSendingT;", "parent": 0, "children": [96, 97], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 46}}, {"id": 96, "type": "type_identifier", "text": "QSortFilterProxyModel", "parent": 95, "children": [], "start_point": {"row": 41, "column": 4}, "end_point": {"row": 41, "column": 25}}, {"id": 97, "type": "pointer_declarator", "text": "*proxyModelSendingT", "parent": 95, "children": [98, 99], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 45}}, {"id": 98, "type": "*", "text": "*", "parent": 97, "children": [], "start_point": {"row": 41, "column": 26}, "end_point": {"row": 41, "column": 27}}, {"id": 99, "type": "identifier", "text": "proxyModelSendingT", "parent": 97, "children": [], "start_point": {"row": 41, "column": 27}, "end_point": {"row": 41, "column": 45}}, {"id": 100, "type": "declaration", "text": "QMenu *contextReceivingZMenu;", "parent": 0, "children": [101, 102], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 33}}, {"id": 101, "type": "type_identifier", "text": "QMenu", "parent": 100, "children": [], "start_point": {"row": 43, "column": 4}, "end_point": {"row": 43, "column": 9}}, {"id": 102, "type": "pointer_declarator", "text": "*contextReceivingZMenu", "parent": 100, "children": [103, 104], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 32}}, {"id": 103, "type": "*", "text": "*", "parent": 102, "children": [], "start_point": {"row": 43, "column": 10}, "end_point": {"row": 43, "column": 11}}, {"id": 104, "type": "identifier", "text": "contextReceivingZMenu", "parent": 102, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 32}}, {"id": 105, "type": "declaration", "text": "QMenu *contextReceivingTMenu;", "parent": 0, "children": [106, 107], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 33}}, {"id": 106, "type": "type_identifier", "text": "QMenu", "parent": 105, "children": [], "start_point": {"row": 44, "column": 4}, "end_point": {"row": 44, "column": 9}}, {"id": 107, "type": "pointer_declarator", "text": "*contextReceivingTMenu", "parent": 105, "children": [108, 109], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 32}}, {"id": 108, "type": "*", "text": "*", "parent": 107, "children": [], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 11}}, {"id": 109, "type": "identifier", "text": "contextReceivingTMenu", "parent": 107, "children": [], "start_point": {"row": 44, "column": 11}, "end_point": {"row": 44, "column": 32}}, {"id": 110, "type": "declaration", "text": "QMenu *contextSendingTMenu;", "parent": 0, "children": [111, 112], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 31}}, {"id": 111, "type": "type_identifier", "text": "QMenu", "parent": 110, "children": [], "start_point": {"row": 45, "column": 4}, "end_point": {"row": 45, "column": 9}}, {"id": 112, "type": "pointer_declarator", "text": "*contextSendingTMenu", "parent": 110, "children": [113, 114], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 30}}, {"id": 113, "type": "*", "text": "*", "parent": 112, "children": [], "start_point": {"row": 45, "column": 10}, "end_point": {"row": 45, "column": 11}}, {"id": 114, "type": "identifier", "text": "contextSendingTMenu", "parent": 112, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 30}}, {"id": 115, "type": "declaration", "text": "QAction *deleteSendingTAction;", "parent": 0, "children": [116, 117], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 34}}, {"id": 116, "type": "type_identifier", "text": "QAction", "parent": 115, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 11}}, {"id": 117, "type": "pointer_declarator", "text": "*deleteSendingTAction", "parent": 115, "children": [118, 119], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 33}}, {"id": 118, "type": "*", "text": "*", "parent": 117, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 13}}, {"id": 119, "type": "identifier", "text": "deleteSendingTAction", "parent": 117, "children": [], "start_point": {"row": 47, "column": 13}, "end_point": {"row": 47, "column": 33}}, {"id": 120, "type": "declaration", "text": "QString newReceivingZAddressToSelect;", "parent": 0, "children": [121, 122], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 41}}, {"id": 121, "type": "type_identifier", "text": "QString", "parent": 120, "children": [], "start_point": {"row": 49, "column": 4}, "end_point": {"row": 49, "column": 11}}, {"id": 122, "type": "identifier", "text": "newReceivingZAddressToSelect", "parent": 120, "children": [], "start_point": {"row": 49, "column": 12}, "end_point": {"row": 49, "column": 40}}, {"id": 123, "type": "declaration", "text": "QString newReceivingTAddressToSelect;", "parent": 0, "children": [124, 125], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 41}}, {"id": 124, "type": "type_identifier", "text": "QString", "parent": 123, "children": [], "start_point": {"row": 50, "column": 4}, "end_point": {"row": 50, "column": 11}}, {"id": 125, "type": "identifier", "text": "newReceivingTAddressToSelect", "parent": 123, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 40}}, {"id": 126, "type": "declaration", "text": "QString newSendingTAddressToSelect;", "parent": 0, "children": [127, 128], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 39}}, {"id": 127, "type": "type_identifier", "text": "QString", "parent": 126, "children": [], "start_point": {"row": 51, "column": 4}, "end_point": {"row": 51, "column": 11}}, {"id": 128, "type": "identifier", "text": "newSendingTAddressToSelect", "parent": 126, "children": [], "start_point": {"row": 51, "column": 12}, "end_point": {"row": 51, "column": 38}}, {"id": 129, "type": "declaration", "text": "const PlatformStyle *platformStyle;", "parent": 0, "children": [130, 131], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 39}}, {"id": 130, "type": "type_identifier", "text": "PlatformStyle", "parent": 129, "children": [], "start_point": {"row": 53, "column": 10}, "end_point": {"row": 53, "column": 23}}, {"id": 131, "type": "pointer_declarator", "text": "*platformStyle", "parent": 129, "children": [132, 133], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 38}}, {"id": 132, "type": "*", "text": "*", "parent": 131, "children": [], "start_point": {"row": 53, "column": 24}, "end_point": {"row": 53, "column": 25}}, {"id": 133, "type": "identifier", "text": "platformStyle", "parent": 131, "children": [], "start_point": {"row": 53, "column": 25}, "end_point": {"row": 53, "column": 38}}, {"id": 134, "type": "ERROR", "text": "private Q_SLOTS:", "parent": 0, "children": [135], "start_point": {"row": 55, "column": 0}, "end_point": {"row": 55, "column": 16}}, {"id": 135, "type": "identifier", "text": "Q_SLOTS", "parent": 134, "children": [], "start_point": {"row": 55, "column": 8}, "end_point": {"row": 55, "column": 15}}, {"id": 136, "type": "declaration", "text": "void on_deleteSendingTAddress_clicked();", "parent": 0, "children": [137, 138], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 44}}, {"id": 137, "type": "primitive_type", "text": "void", "parent": 136, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 8}}, {"id": 138, "type": "function_declarator", "text": "on_deleteSendingTAddress_clicked()", "parent": 136, "children": [139, 140], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 43}}, {"id": 139, "type": "identifier", "text": "on_deleteSendingTAddress_clicked", "parent": 138, "children": [], "start_point": {"row": 57, "column": 9}, "end_point": {"row": 57, "column": 41}}, {"id": 140, "type": "parameter_list", "text": "()", "parent": 138, "children": [], "start_point": {"row": 57, "column": 41}, "end_point": {"row": 57, "column": 43}}, {"id": 141, "type": "declaration", "text": "void on_newReceivingZAddress_clicked();", "parent": 0, "children": [142, 143], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 43}}, {"id": 142, "type": "primitive_type", "text": "void", "parent": 141, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 8}}, {"id": 143, "type": "function_declarator", "text": "on_newReceivingZAddress_clicked()", "parent": 141, "children": [144, 145], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 42}}, {"id": 144, "type": "identifier", "text": "on_newReceivingZAddress_clicked", "parent": 143, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 40}}, {"id": 145, "type": "parameter_list", "text": "()", "parent": 143, "children": [], "start_point": {"row": 60, "column": 40}, "end_point": {"row": 60, "column": 42}}, {"id": 146, "type": "declaration", "text": "void on_newReceivingTAddress_clicked();", "parent": 0, "children": [147, 148], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 43}}, {"id": 147, "type": "primitive_type", "text": "void", "parent": 146, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 8}}, {"id": 148, "type": "function_declarator", "text": "on_newReceivingTAddress_clicked()", "parent": 146, "children": [149, 150], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 42}}, {"id": 149, "type": "identifier", "text": "on_newReceivingTAddress_clicked", "parent": 148, "children": [], "start_point": {"row": 61, "column": 9}, "end_point": {"row": 61, "column": 40}}, {"id": 150, "type": "parameter_list", "text": "()", "parent": 148, "children": [], "start_point": {"row": 61, "column": 40}, "end_point": {"row": 61, "column": 42}}, {"id": 151, "type": "declaration", "text": "void on_newSendingTAddress_clicked();", "parent": 0, "children": [152, 153], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 41}}, {"id": 152, "type": "primitive_type", "text": "void", "parent": 151, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 8}}, {"id": 153, "type": "function_declarator", "text": "on_newSendingTAddress_clicked()", "parent": 151, "children": [154, 155], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 40}}, {"id": 154, "type": "identifier", "text": "on_newSendingTAddress_clicked", "parent": 153, "children": [], "start_point": {"row": 62, "column": 9}, "end_point": {"row": 62, "column": 38}}, {"id": 155, "type": "parameter_list", "text": "()", "parent": 153, "children": [], "start_point": {"row": 62, "column": 38}, "end_point": {"row": 62, "column": 40}}, {"id": 156, "type": "declaration", "text": "void on_copyReceivingZAddress_clicked();", "parent": 0, "children": [157, 158], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 44}}, {"id": 157, "type": "primitive_type", "text": "void", "parent": 156, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 8}}, {"id": 158, "type": "function_declarator", "text": "on_copyReceivingZAddress_clicked()", "parent": 156, "children": [159, 160], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 43}}, {"id": 159, "type": "identifier", "text": "on_copyReceivingZAddress_clicked", "parent": 158, "children": [], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 41}}, {"id": 160, "type": "parameter_list", "text": "()", "parent": 158, "children": [], "start_point": {"row": 65, "column": 41}, "end_point": {"row": 65, "column": 43}}, {"id": 161, "type": "declaration", "text": "void on_copyReceivingTAddress_clicked();", "parent": 0, "children": [162, 163], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 44}}, {"id": 162, "type": "primitive_type", "text": "void", "parent": 161, "children": [], "start_point": {"row": 66, "column": 4}, "end_point": {"row": 66, "column": 8}}, {"id": 163, "type": "function_declarator", "text": "on_copyReceivingTAddress_clicked()", "parent": 161, "children": [164, 165], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 43}}, {"id": 164, "type": "identifier", "text": "on_copyReceivingTAddress_clicked", "parent": 163, "children": [], "start_point": {"row": 66, "column": 9}, "end_point": {"row": 66, "column": 41}}, {"id": 165, "type": "parameter_list", "text": "()", "parent": 163, "children": [], "start_point": {"row": 66, "column": 41}, "end_point": {"row": 66, "column": 43}}, {"id": 166, "type": "declaration", "text": "void on_copySendingTAddress_clicked();", "parent": 0, "children": [167, 168], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 42}}, {"id": 167, "type": "primitive_type", "text": "void", "parent": 166, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 8}}, {"id": 168, "type": "function_declarator", "text": "on_copySendingTAddress_clicked()", "parent": 166, "children": [169, 170], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 41}}, {"id": 169, "type": "identifier", "text": "on_copySendingTAddress_clicked", "parent": 168, "children": [], "start_point": {"row": 67, "column": 9}, "end_point": {"row": 67, "column": 39}}, {"id": 170, "type": "parameter_list", "text": "()", "parent": 168, "children": [], "start_point": {"row": 67, "column": 39}, "end_point": {"row": 67, "column": 41}}, {"id": 171, "type": "declaration", "text": "void on_exportReceivingZAddress_clicked();", "parent": 0, "children": [172, 173], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 46}}, {"id": 172, "type": "primitive_type", "text": "void", "parent": 171, "children": [], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 8}}, {"id": 173, "type": "function_declarator", "text": "on_exportReceivingZAddress_clicked()", "parent": 171, "children": [174, 175], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 45}}, {"id": 174, "type": "identifier", "text": "on_exportReceivingZAddress_clicked", "parent": 173, "children": [], "start_point": {"row": 70, "column": 9}, "end_point": {"row": 70, "column": 43}}, {"id": 175, "type": "parameter_list", "text": "()", "parent": 173, "children": [], "start_point": {"row": 70, "column": 43}, "end_point": {"row": 70, "column": 45}}, {"id": 176, "type": "declaration", "text": "void on_exportReceivingTAddress_clicked();", "parent": 0, "children": [177, 178], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 46}}, {"id": 177, "type": "primitive_type", "text": "void", "parent": 176, "children": [], "start_point": {"row": 71, "column": 4}, "end_point": {"row": 71, "column": 8}}, {"id": 178, "type": "function_declarator", "text": "on_exportReceivingTAddress_clicked()", "parent": 176, "children": [179, 180], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 45}}, {"id": 179, "type": "identifier", "text": "on_exportReceivingTAddress_clicked", "parent": 178, "children": [], "start_point": {"row": 71, "column": 9}, "end_point": {"row": 71, "column": 43}}, {"id": 180, "type": "parameter_list", "text": "()", "parent": 178, "children": [], "start_point": {"row": 71, "column": 43}, "end_point": {"row": 71, "column": 45}}, {"id": 181, "type": "declaration", "text": "void on_exportSendingTAddress_clicked();", "parent": 0, "children": [182, 183], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 44}}, {"id": 182, "type": "primitive_type", "text": "void", "parent": 181, "children": [], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 8}}, {"id": 183, "type": "function_declarator", "text": "on_exportSendingTAddress_clicked()", "parent": 181, "children": [184, 185], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 43}}, {"id": 184, "type": "identifier", "text": "on_exportSendingTAddress_clicked", "parent": 183, "children": [], "start_point": {"row": 72, "column": 9}, "end_point": {"row": 72, "column": 41}}, {"id": 185, "type": "parameter_list", "text": "()", "parent": 183, "children": [], "start_point": {"row": 72, "column": 41}, "end_point": {"row": 72, "column": 43}}, {"id": 186, "type": "declaration", "text": "void selectionReceivingZChanged();", "parent": 0, "children": [187, 188], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 38}}, {"id": 187, "type": "primitive_type", "text": "void", "parent": 186, "children": [], "start_point": {"row": 75, "column": 4}, "end_point": {"row": 75, "column": 8}}, {"id": 188, "type": "function_declarator", "text": "selectionReceivingZChanged()", "parent": 186, "children": [189, 190], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 37}}, {"id": 189, "type": "identifier", "text": "selectionReceivingZChanged", "parent": 188, "children": [], "start_point": {"row": 75, "column": 9}, "end_point": {"row": 75, "column": 35}}, {"id": 190, "type": "parameter_list", "text": "()", "parent": 188, "children": [], "start_point": {"row": 75, "column": 35}, "end_point": {"row": 75, "column": 37}}, {"id": 191, "type": "declaration", "text": "void selectionReceivingTChanged();", "parent": 0, "children": [192, 193], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 38}}, {"id": 192, "type": "primitive_type", "text": "void", "parent": 191, "children": [], "start_point": {"row": 76, "column": 4}, "end_point": {"row": 76, "column": 8}}, {"id": 193, "type": "function_declarator", "text": "selectionReceivingTChanged()", "parent": 191, "children": [194, 195], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 37}}, {"id": 194, "type": "identifier", "text": "selectionReceivingTChanged", "parent": 193, "children": [], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 35}}, {"id": 195, "type": "parameter_list", "text": "()", "parent": 193, "children": [], "start_point": {"row": 76, "column": 35}, "end_point": {"row": 76, "column": 37}}, {"id": 196, "type": "declaration", "text": "void selectionSendingTChanged();", "parent": 0, "children": [197, 198], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 36}}, {"id": 197, "type": "primitive_type", "text": "void", "parent": 196, "children": [], "start_point": {"row": 77, "column": 4}, "end_point": {"row": 77, "column": 8}}, {"id": 198, "type": "function_declarator", "text": "selectionSendingTChanged()", "parent": 196, "children": [199, 200], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 35}}, {"id": 199, "type": "identifier", "text": "selectionSendingTChanged", "parent": 198, "children": [], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 33}}, {"id": 200, "type": "parameter_list", "text": "()", "parent": 198, "children": [], "start_point": {"row": 77, "column": 33}, "end_point": {"row": 77, "column": 35}}, {"id": 201, "type": "declaration", "text": "void contextualReceivingZMenu(const QPoint &point);", "parent": 0, "children": [202, 203], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 55}}, {"id": 202, "type": "primitive_type", "text": "void", "parent": 201, "children": [], "start_point": {"row": 80, "column": 4}, "end_point": {"row": 80, "column": 8}}, {"id": 203, "type": "function_declarator", "text": "contextualReceivingZMenu(const QPoint &point)", "parent": 201, "children": [204, 205], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 54}}, {"id": 204, "type": "identifier", "text": "contextualReceivingZMenu", "parent": 203, "children": [], "start_point": {"row": 80, "column": 9}, "end_point": {"row": 80, "column": 33}}, {"id": 205, "type": "parameter_list", "text": "(const QPoint &point)", "parent": 203, "children": [206], "start_point": {"row": 80, "column": 33}, "end_point": {"row": 80, "column": 54}}, {"id": 206, "type": "parameter_declaration", "text": "const QPoint &point", "parent": 205, "children": [207, 208], "start_point": {"row": 80, "column": 34}, "end_point": {"row": 80, "column": 53}}, {"id": 207, "type": "type_identifier", "text": "QPoint", "parent": 206, "children": [], "start_point": {"row": 80, "column": 40}, "end_point": {"row": 80, "column": 46}}, {"id": 208, "type": "identifier", "text": "point", "parent": 206, "children": [], "start_point": {"row": 80, "column": 48}, "end_point": {"row": 80, "column": 53}}, {"id": 209, "type": "declaration", "text": "void contextualReceivingTMenu(const QPoint &point);", "parent": 0, "children": [210, 211], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 55}}, {"id": 210, "type": "primitive_type", "text": "void", "parent": 209, "children": [], "start_point": {"row": 81, "column": 4}, "end_point": {"row": 81, "column": 8}}, {"id": 211, "type": "function_declarator", "text": "contextualReceivingTMenu(const QPoint &point)", "parent": 209, "children": [212, 213], "start_point": {"row": 81, "column": 9}, "end_point": {"row": 81, "column": 54}}, {"id": 212, "type": "identifier", "text": "contextualReceivingTMenu", "parent": 211, "children": [], "start_point": {"row": 81, "column": 9}, "end_point": {"row": 81, "column": 33}}, {"id": 213, "type": "parameter_list", "text": "(const QPoint &point)", "parent": 211, "children": [214], "start_point": {"row": 81, "column": 33}, "end_point": {"row": 81, "column": 54}}, {"id": 214, "type": "parameter_declaration", "text": "const QPoint &point", "parent": 213, "children": [215, 216], "start_point": {"row": 81, "column": 34}, "end_point": {"row": 81, "column": 53}}, {"id": 215, "type": "type_identifier", "text": "QPoint", "parent": 214, "children": [], "start_point": {"row": 81, "column": 40}, "end_point": {"row": 81, "column": 46}}, {"id": 216, "type": "identifier", "text": "point", "parent": 214, "children": [], "start_point": {"row": 81, "column": 48}, "end_point": {"row": 81, "column": 53}}, {"id": 217, "type": "declaration", "text": "void contextualSendingTMenu(const QPoint &point);", "parent": 0, "children": [218, 219], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 53}}, {"id": 218, "type": "primitive_type", "text": "void", "parent": 217, "children": [], "start_point": {"row": 82, "column": 4}, "end_point": {"row": 82, "column": 8}}, {"id": 219, "type": "function_declarator", "text": "contextualSendingTMenu(const QPoint &point)", "parent": 217, "children": [220, 221], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 52}}, {"id": 220, "type": "identifier", "text": "contextualSendingTMenu", "parent": 219, "children": [], "start_point": {"row": 82, "column": 9}, "end_point": {"row": 82, "column": 31}}, {"id": 221, "type": "parameter_list", "text": "(const QPoint &point)", "parent": 219, "children": [222], "start_point": {"row": 82, "column": 31}, "end_point": {"row": 82, "column": 52}}, {"id": 222, "type": "parameter_declaration", "text": "const QPoint &point", "parent": 221, "children": [223, 224], "start_point": {"row": 82, "column": 32}, "end_point": {"row": 82, "column": 51}}, {"id": 223, "type": "type_identifier", "text": "QPoint", "parent": 222, "children": [], "start_point": {"row": 82, "column": 38}, "end_point": {"row": 82, "column": 44}}, {"id": 224, "type": "identifier", "text": "point", "parent": 222, "children": [], "start_point": {"row": 82, "column": 46}, "end_point": {"row": 82, "column": 51}}, {"id": 225, "type": "declaration", "text": "void onCopyLabelReceivingZAction();", "parent": 0, "children": [226, 227], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 39}}, {"id": 226, "type": "primitive_type", "text": "void", "parent": 225, "children": [], "start_point": {"row": 85, "column": 4}, "end_point": {"row": 85, "column": 8}}, {"id": 227, "type": "function_declarator", "text": "onCopyLabelReceivingZAction()", "parent": 225, "children": [228, 229], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 38}}, {"id": 228, "type": "identifier", "text": "onCopyLabelReceivingZAction", "parent": 227, "children": [], "start_point": {"row": 85, "column": 9}, "end_point": {"row": 85, "column": 36}}, {"id": 229, "type": "parameter_list", "text": "()", "parent": 227, "children": [], "start_point": {"row": 85, "column": 36}, "end_point": {"row": 85, "column": 38}}, {"id": 230, "type": "declaration", "text": "void onCopyLabelReceivingTAction();", "parent": 0, "children": [231, 232], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 39}}, {"id": 231, "type": "primitive_type", "text": "void", "parent": 230, "children": [], "start_point": {"row": 86, "column": 4}, "end_point": {"row": 86, "column": 8}}, {"id": 232, "type": "function_declarator", "text": "onCopyLabelReceivingTAction()", "parent": 230, "children": [233, 234], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 38}}, {"id": 233, "type": "identifier", "text": "onCopyLabelReceivingTAction", "parent": 232, "children": [], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 36}}, {"id": 234, "type": "parameter_list", "text": "()", "parent": 232, "children": [], "start_point": {"row": 86, "column": 36}, "end_point": {"row": 86, "column": 38}}, {"id": 235, "type": "declaration", "text": "void onCopyLabelSendingTAction();", "parent": 0, "children": [236, 237], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 37}}, {"id": 236, "type": "primitive_type", "text": "void", "parent": 235, "children": [], "start_point": {"row": 87, "column": 4}, "end_point": {"row": 87, "column": 8}}, {"id": 237, "type": "function_declarator", "text": "onCopyLabelSendingTAction()", "parent": 235, "children": [238, 239], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 36}}, {"id": 238, "type": "identifier", "text": "onCopyLabelSendingTAction", "parent": 237, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 34}}, {"id": 239, "type": "parameter_list", "text": "()", "parent": 237, "children": [], "start_point": {"row": 87, "column": 34}, "end_point": {"row": 87, "column": 36}}, {"id": 240, "type": "declaration", "text": "void onEditReceivingTAction();", "parent": 0, "children": [241, 242], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 34}}, {"id": 241, "type": "primitive_type", "text": "void", "parent": 240, "children": [], "start_point": {"row": 90, "column": 4}, "end_point": {"row": 90, "column": 8}}, {"id": 242, "type": "function_declarator", "text": "onEditReceivingTAction()", "parent": 240, "children": [243, 244], "start_point": {"row": 90, "column": 9}, "end_point": {"row": 90, "column": 33}}, {"id": 243, "type": "identifier", "text": "onEditReceivingTAction", "parent": 242, "children": [], "start_point": {"row": 90, "column": 9}, "end_point": {"row": 90, "column": 31}}, {"id": 244, "type": "parameter_list", "text": "()", "parent": 242, "children": [], "start_point": {"row": 90, "column": 31}, "end_point": {"row": 90, "column": 33}}, {"id": 245, "type": "declaration", "text": "void onEditSendingTAction();", "parent": 0, "children": [246, 247], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 32}}, {"id": 246, "type": "primitive_type", "text": "void", "parent": 245, "children": [], "start_point": {"row": 91, "column": 4}, "end_point": {"row": 91, "column": 8}}, {"id": 247, "type": "function_declarator", "text": "onEditSendingTAction()", "parent": 245, "children": [248, 249], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 31}}, {"id": 248, "type": "identifier", "text": "onEditSendingTAction", "parent": 247, "children": [], "start_point": {"row": 91, "column": 9}, "end_point": {"row": 91, "column": 29}}, {"id": 249, "type": "parameter_list", "text": "()", "parent": 247, "children": [], "start_point": {"row": 91, "column": 29}, "end_point": {"row": 91, "column": 31}}, {"id": 250, "type": "declaration", "text": "void selectNewAddress(const QModelIndex &parent, int begin, int /*end*/);", "parent": 0, "children": [251, 252], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 77}}, {"id": 251, "type": "primitive_type", "text": "void", "parent": 250, "children": [], "start_point": {"row": 94, "column": 4}, "end_point": {"row": 94, "column": 8}}, {"id": 252, "type": "function_declarator", "text": "selectNewAddress(const QModelIndex &parent, int begin, int /*end*/)", "parent": 250, "children": [253, 254], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 76}}, {"id": 253, "type": "identifier", "text": "selectNewAddress", "parent": 252, "children": [], "start_point": {"row": 94, "column": 9}, "end_point": {"row": 94, "column": 25}}, {"id": 254, "type": "parameter_list", "text": "(const QModelIndex &parent, int begin, int /*end*/)", "parent": 252, "children": [255, 258, 260], "start_point": {"row": 94, "column": 25}, "end_point": {"row": 94, "column": 76}}, {"id": 255, "type": "parameter_declaration", "text": "const QModelIndex &parent", "parent": 254, "children": [256, 257], "start_point": {"row": 94, "column": 26}, "end_point": {"row": 94, "column": 51}}, {"id": 256, "type": "type_identifier", "text": "QModelIndex", "parent": 255, "children": [], "start_point": {"row": 94, "column": 32}, "end_point": {"row": 94, "column": 43}}, {"id": 257, "type": "identifier", "text": "parent", "parent": 255, "children": [], "start_point": {"row": 94, "column": 45}, "end_point": {"row": 94, "column": 51}}, {"id": 258, "type": "parameter_declaration", "text": "int begin", "parent": 254, "children": [259], "start_point": {"row": 94, "column": 53}, "end_point": {"row": 94, "column": 62}}, {"id": 259, "type": "primitive_type", "text": "int", "parent": 258, "children": [], "start_point": {"row": 94, "column": 53}, "end_point": {"row": 94, "column": 56}}, {"id": 260, "type": "parameter_declaration", "text": "int", "parent": 254, "children": [261], "start_point": {"row": 94, "column": 64}, "end_point": {"row": 94, "column": 67}}, {"id": 261, "type": "primitive_type", "text": "int", "parent": 260, "children": [], "start_point": {"row": 94, "column": 64}, "end_point": {"row": 94, "column": 67}}, {"id": 262, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 97, "column": 0}, "end_point": {"row": 97, "column": 6}}]}, "node_categories": {"declarations": {"functions": [15, 42, 64, 138, 143, 148, 153, 158, 163, 168, 173, 178, 183, 188, 193, 198, 203, 211, 219, 227, 232, 237, 242, 247, 252], "variables": [9, 11, 13, 18, 20, 23, 25, 27, 29, 31, 39, 45, 50, 62, 67, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 123, 126, 129, 136, 141, 146, 151, 156, 161, 166, 171, 176, 181, 186, 191, 196, 201, 206, 209, 214, 217, 222, 225, 230, 235, 240, 245, 250, 255, 258, 260], "classes": [], "imports": [6, 7], "modules": [], "enums": []}, "statements": {"expressions": [57, 59], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 12, 14, 16, 17, 19, 21, 22, 24, 26, 28, 30, 32, 34, 37, 38, 40, 43, 46, 49, 51, 54, 60, 65, 68, 71, 74, 76, 79, 81, 84, 86, 89, 91, 94, 96, 99, 101, 104, 106, 109, 111, 114, 116, 119, 121, 122, 124, 125, 127, 128, 130, 133, 135, 139, 144, 149, 154, 159, 164, 169, 174, 179, 184, 189, 194, 199, 204, 207, 208, 212, 215, 216, 220, 223, 224, 228, 233, 238, 243, 248, 253, 256, 257, 262], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 56], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 15, "universal_type": "function", "name": "AddressBookPage;", "text_snippet": "namespace Ui {\n class AddressBookPage;\n}"}, {"node_id": 42, "universal_type": "function", "name": "unknown", "text_snippet": "AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent"}, {"node_id": 64, "universal_type": "function", "name": "unknown", "text_snippet": "setModel(AddressTableModel *model)"}, {"node_id": 138, "universal_type": "function", "name": "unknown", "text_snippet": "on_deleteSendingTAddress_clicked()"}, {"node_id": 143, "universal_type": "function", "name": "unknown", "text_snippet": "on_newReceivingZAddress_clicked()"}, {"node_id": 148, "universal_type": "function", "name": "unknown", "text_snippet": "on_newReceivingTAddress_clicked()"}, {"node_id": 153, "universal_type": "function", "name": "unknown", "text_snippet": "on_newSendingTAddress_clicked()"}, {"node_id": 158, "universal_type": "function", "name": "unknown", "text_snippet": "on_copyReceivingZAddress_clicked()"}, {"node_id": 163, "universal_type": "function", "name": "unknown", "text_snippet": "on_copyReceivingTAddress_clicked()"}, {"node_id": 168, "universal_type": "function", "name": "unknown", "text_snippet": "on_copySendingTAddress_clicked()"}, {"node_id": 173, "universal_type": "function", "name": "unknown", "text_snippet": "on_exportReceivingZAddress_clicked()"}, {"node_id": 178, "universal_type": "function", "name": "unknown", "text_snippet": "on_exportReceivingTAddress_clicked()"}, {"node_id": 183, "universal_type": "function", "name": "unknown", "text_snippet": "on_exportSendingTAddress_clicked()"}, {"node_id": 188, "universal_type": "function", "name": "unknown", "text_snippet": "selectionReceivingZChanged()"}, {"node_id": 193, "universal_type": "function", "name": "unknown", "text_snippet": "selectionReceivingTChanged()"}, {"node_id": 198, "universal_type": "function", "name": "unknown", "text_snippet": "selectionSendingTChanged()"}, {"node_id": 203, "universal_type": "function", "name": "unknown", "text_snippet": "contextualReceivingZMenu(const QPoint &point)"}, {"node_id": 211, "universal_type": "function", "name": "unknown", "text_snippet": "contextualReceivingTMenu(const QPoint &point)"}, {"node_id": 219, "universal_type": "function", "name": "unknown", "text_snippet": "contextualSendingTMenu(const QPoint &point)"}, {"node_id": 227, "universal_type": "function", "name": "unknown", "text_snippet": "onCopyLabelReceivingZAction()"}, {"node_id": 232, "universal_type": "function", "name": "unknown", "text_snippet": "onCopyLabelReceivingTAction()"}, {"node_id": 237, "universal_type": "function", "name": "unknown", "text_snippet": "onCopyLabelSendingTAction()"}, {"node_id": 242, "universal_type": "function", "name": "unknown", "text_snippet": "onEditReceivingTAction()"}, {"node_id": 247, "universal_type": "function", "name": "unknown", "text_snippet": "onEditSendingTAction()"}, {"node_id": 252, "universal_type": "function", "name": "begin,", "text_snippet": "selectNewAddress(const QModelIndex &parent, int begin, int /*end*/)"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <QDialog>\n"}, {"node_id": 7, "text": "#include"}]}, "original_source_code": "// Copyright (c) 2017-2018 The LitecoinZ developers\n// Distributed under the MIT software license, see the accompanying\n// file COPYING or http://www.opensource.org/licenses/mit-license.php.\n\n#ifndef BITCOIN_QT_ADDRESSBOOKPAGE_H\n#define BITCOIN_QT_ADDRESSBOOKPAGE_H\n\n#include <QDialog>\n\nclass AddressTableModel;\nclass OptionsModel;\nclass PlatformStyle;\n\nnamespace Ui {\n class AddressBookPage;\n}\n\nQT_BEGIN_NAMESPACE\nclass QItemSelection;\nclass QMenu;\nclass QModelIndex;\nclass QSortFilterProxyModel;\nclass QTableView;\nQT_END_NAMESPACE\n\n/** Dialog for Koto Address Book */\nclass AddressBookPage : public QDialog\n{\n Q_OBJECT\n\npublic:\n explicit AddressBookPage(const PlatformStyle *platformStyle, QWidget *parent = 0);\n ~AddressBookPage();\n\n void setModel(AddressTableModel *model);\n\nprivate:\n Ui::AddressBookPage *ui;\n AddressTableModel *model;\n QSortFilterProxyModel *proxyModelReceivingZ;\n QSortFilterProxyModel *proxyModelReceivingT;\n QSortFilterProxyModel *proxyModelSendingT;\n\n QMenu *contextReceivingZMenu;\n QMenu *contextReceivingTMenu;\n QMenu *contextSendingTMenu;\n\n QAction *deleteSendingTAction; // to be able to explicitly disable it\n\n QString newReceivingZAddressToSelect;\n QString newReceivingTAddressToSelect;\n QString newSendingTAddressToSelect;\n\n const PlatformStyle *platformStyle;\n\nprivate Q_SLOTS:\n /** Delete currently selected address entry */\n void on_deleteSendingTAddress_clicked();\n\n /** Create a new address for receiving coins and / or add a new address book entry */\n void on_newReceivingZAddress_clicked();\n void on_newReceivingTAddress_clicked();\n void on_newSendingTAddress_clicked();\n\n /** Copy address of currently selected address entry to clipboard */\n void on_copyReceivingZAddress_clicked();\n void on_copyReceivingTAddress_clicked();\n void on_copySendingTAddress_clicked();\n\n /** Export button clicked */\n void on_exportReceivingZAddress_clicked();\n void on_exportReceivingTAddress_clicked();\n void on_exportSendingTAddress_clicked();\n\n /** Set button states based on selection */\n void selectionReceivingZChanged();\n void selectionReceivingTChanged();\n void selectionSendingTChanged();\n\n /** Spawn contextual menu (right mouse menu) for address book entry */\n void contextualReceivingZMenu(const QPoint &point);\n void contextualReceivingTMenu(const QPoint &point);\n void contextualSendingTMenu(const QPoint &point);\n\n /** Copy label of currently selected address entry to clipboard (no button) */\n void onCopyLabelReceivingZAction();\n void onCopyLabelReceivingTAction();\n void onCopyLabelSendingTAction();\n\n /** Edit currently selected address entry (no button) */\n void onEditReceivingTAction();\n void onEditSendingTAction();\n\n /** New entry/entries were added to address table */\n void selectNewAddress(const QModelIndex &parent, int begin, int /*end*/);\n};\n\n#endif // BITCOIN_QT_ADDRESSBOOKPAGE_H\n"}
89
c
#include <stdio.h> #include <stdlib.h> /** * Return an array of size *returnSize. * Note: The returned array must be malloced, assume caller calls free(). */ int* productExceptSelf(int* nums, int numsSize, int* returnSize) { int* ans = malloc(sizeof(int) * numsSize); int k; for (k = 0; k < numsSize; k++) { ans[k] = 1; } *returnSize = numsSize; // i is the position of left product pointer, lp is left product // j is the position of right product pointer, rp is right product int i = 0; int j = numsSize - 1; int lp = 1; int rp = 1; for (; i < numsSize;) { // update ans elements ans[i] *= lp; ans[j] *= rp; lp *= nums[i++]; rp *= nums[j--]; } /* * for index i ans[0] *= 1 ans[1] *= nums[0] ans[2] *= (nums[0] * nums[1]) ... ans[n-3] *= (nums[0] * nums[1] * ... * nums[n-4]) ans[n-2] *= (nums[0] * nums[1] * ... * nums[n-3]) ans[n-1] *= (nums[0] * nums[1] * ... * nums[n-2]) * for index j ans[n-1] *= 1 ans[n-2] *= nums[n-1] ans[n-3] *= (nums[n-1] * nums[n-2]) ... ans[2] *= (nums[n-1] * nums[n-2] ... * nums[3]) ans[1] *= (nums[n-1] * nums[n-2] ... * nums[2]) ans[0] *= (nums[n-1] * nums[n-2] ... * nums[1]) */ return ans; } int main(){ int arr[] = {1, 2, 3, 4}; int size = sizeof(arr) / sizeof(int); int ret; int* res; int i; res = productExceptSelf(arr, size, &ret); for (i = 0; i < ret; i++) { printf("%d ", res[i]); } printf("\n"); }
26.02
58
(translation_unit) "#include <stdio.h>\n#include <stdlib.h>\n\n/**\n * Return an array of size *returnSize.\n * Note: The returned array must be malloced, assume caller calls free().\n */\nint* productExceptSelf(int* nums, int numsSize, int* returnSize) {\n int* ans = malloc(sizeof(int) * numsSize);\n int k;\n\n for (k = 0; k < numsSize; k++) {\n ans[k] = 1;\n }\n\n *returnSize = numsSize;\n\n // i is the position of left product pointer, lp is left product\n // j is the position of right product pointer, rp is right product\n int i = 0;\n int j = numsSize - 1;\n int lp = 1;\n int rp = 1;\n\n for (; i < numsSize;) {\n // update ans elements\n ans[i] *= lp;\n ans[j] *= rp;\n\n lp *= nums[i++];\n rp *= nums[j--];\n }\n\n /*\n * for index i \n ans[0] *= 1\n ans[1] *= nums[0]\n ans[2] *= (nums[0] * nums[1])\n ...\n ans[n-3] *= (nums[0] * nums[1] * ... * nums[n-4])\n ans[n-2] *= (nums[0] * nums[1] * ... * nums[n-3])\n ans[n-1] *= (nums[0] * nums[1] * ... * nums[n-2])\n\n * for index j\n ans[n-1] *= 1\n ans[n-2] *= nums[n-1]\n ans[n-3] *= (nums[n-1] * nums[n-2])\n ...\n ans[2] *= (nums[n-1] * nums[n-2] ... * nums[3])\n ans[1] *= (nums[n-1] * nums[n-2] ... * nums[2])\n ans[0] *= (nums[n-1] * nums[n-2] ... * nums[1])\n */\n\n return ans;\n}\n\nint main(){\n int arr[] = {1, 2, 3, 4};\n int size = sizeof(arr) / sizeof(int);\n int ret;\n int* res;\n int i;\n\n res = productExceptSelf(arr, size, &ret);\n\n for (i = 0; i < ret; i++) {\n printf("%d ", res[i]);\n }\n printf("\n");\n}\n" (preproc_include) "#include <stdio.h>\n" (#include) "#include" (system_lib_string) "<stdio.h>" (preproc_include) "#include <stdlib.h>\n" (#include) "#include" (system_lib_string) "<stdlib.h>" (comment) "/**\n * Return an array of size *returnSize.\n * Note: The returned array must be malloced, assume caller calls free().\n */" (function_definition) "int* productExceptSelf(int* nums, int numsSize, int* returnSize) {\n int* ans = malloc(sizeof(int) * numsSize);\n int k;\n\n for (k = 0; k < numsSize; k++) {\n ans[k] = 1;\n }\n\n *returnSize = numsSize;\n\n // i is the position of left product pointer, lp is left product\n // j is the position of right product pointer, rp is right product\n int i = 0;\n int j = numsSize - 1;\n int lp = 1;\n int rp = 1;\n\n for (; i < numsSize;) {\n // update ans elements\n ans[i] *= lp;\n ans[j] *= rp;\n\n lp *= nums[i++];\n rp *= nums[j--];\n }\n\n /*\n * for index i \n ans[0] *= 1\n ans[1] *= nums[0]\n ans[2] *= (nums[0] * nums[1])\n ...\n ans[n-3] *= (nums[0] * nums[1] * ... * nums[n-4])\n ans[n-2] *= (nums[0] * nums[1] * ... * nums[n-3])\n ans[n-1] *= (nums[0] * nums[1] * ... * nums[n-2])\n\n * for index j\n ans[n-1] *= 1\n ans[n-2] *= nums[n-1]\n ans[n-3] *= (nums[n-1] * nums[n-2])\n ...\n ans[2] *= (nums[n-1] * nums[n-2] ... * nums[3])\n ans[1] *= (nums[n-1] * nums[n-2] ... * nums[2])\n ans[0] *= (nums[n-1] * nums[n-2] ... * nums[1])\n */\n\n return ans;\n}" (primitive_type) "int" (pointer_declarator) "* productExceptSelf(int* nums, int numsSize, int* returnSize)" (*) "*" (function_declarator) "productExceptSelf(int* nums, int numsSize, int* returnSize)" (identifier) "productExceptSelf" (parameter_list) "(int* nums, int numsSize, int* returnSize)" (() "(" (parameter_declaration) "int* nums" (primitive_type) "int" (pointer_declarator) "* nums" (*) "*" (identifier) "nums" (,) "," (parameter_declaration) "int numsSize" (primitive_type) "int" (identifier) "numsSize" (,) "," (parameter_declaration) "int* returnSize" (primitive_type) "int" (pointer_declarator) "* returnSize" (*) "*" (identifier) "returnSize" ()) ")" (compound_statement) "{\n int* ans = malloc(sizeof(int) * numsSize);\n int k;\n\n for (k = 0; k < numsSize; k++) {\n ans[k] = 1;\n }\n\n *returnSize = numsSize;\n\n // i is the position of left product pointer, lp is left product\n // j is the position of right product pointer, rp is right product\n int i = 0;\n int j = numsSize - 1;\n int lp = 1;\n int rp = 1;\n\n for (; i < numsSize;) {\n // update ans elements\n ans[i] *= lp;\n ans[j] *= rp;\n\n lp *= nums[i++];\n rp *= nums[j--];\n }\n\n /*\n * for index i \n ans[0] *= 1\n ans[1] *= nums[0]\n ans[2] *= (nums[0] * nums[1])\n ...\n ans[n-3] *= (nums[0] * nums[1] * ... * nums[n-4])\n ans[n-2] *= (nums[0] * nums[1] * ... * nums[n-3])\n ans[n-1] *= (nums[0] * nums[1] * ... * nums[n-2])\n\n * for index j\n ans[n-1] *= 1\n ans[n-2] *= nums[n-1]\n ans[n-3] *= (nums[n-1] * nums[n-2])\n ...\n ans[2] *= (nums[n-1] * nums[n-2] ... * nums[3])\n ans[1] *= (nums[n-1] * nums[n-2] ... * nums[2])\n ans[0] *= (nums[n-1] * nums[n-2] ... * nums[1])\n */\n\n return ans;\n}" ({) "{" (declaration) "int* ans = malloc(sizeof(int) * numsSize);" (primitive_type) "int" (init_declarator) "* ans = malloc(sizeof(int) * numsSize)" (pointer_declarator) "* ans" (*) "*" (identifier) "ans" (=) "=" (call_expression) "malloc(sizeof(int) * numsSize)" (identifier) "malloc" (argument_list) "(sizeof(int) * numsSize)" (() "(" (binary_expression) "sizeof(int) * numsSize" (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (*) "*" (identifier) "numsSize" ()) ")" (;) ";" (declaration) "int k;" (primitive_type) "int" (identifier) "k" (;) ";" (for_statement) "for (k = 0; k < numsSize; k++) {\n ans[k] = 1;\n }" (for) "for" (() "(" (assignment_expression) "k = 0" (identifier) "k" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "k < numsSize" (identifier) "k" (<) "<" (identifier) "numsSize" (;) ";" (update_expression) "k++" (identifier) "k" (++) "++" ()) ")" (compound_statement) "{\n ans[k] = 1;\n }" ({) "{" (expression_statement) "ans[k] = 1;" (assignment_expression) "ans[k] = 1" (subscript_expression) "ans[k]" (identifier) "ans" ([) "[" (identifier) "k" (]) "]" (=) "=" (number_literal) "1" (;) ";" (}) "}" (expression_statement) "*returnSize = numsSize;" (assignment_expression) "*returnSize = numsSize" (pointer_expression) "*returnSize" (*) "*" (identifier) "returnSize" (=) "=" (identifier) "numsSize" (;) ";" (comment) "// i is the position of left product pointer, lp is left product" (comment) "// j is the position of right product pointer, rp is right product" (declaration) "int i = 0;" (primitive_type) "int" (init_declarator) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (declaration) "int j = numsSize - 1;" (primitive_type) "int" (init_declarator) "j = numsSize - 1" (identifier) "j" (=) "=" (binary_expression) "numsSize - 1" (identifier) "numsSize" (-) "-" (number_literal) "1" (;) ";" (declaration) "int lp = 1;" (primitive_type) "int" (init_declarator) "lp = 1" (identifier) "lp" (=) "=" (number_literal) "1" (;) ";" (declaration) "int rp = 1;" (primitive_type) "int" (init_declarator) "rp = 1" (identifier) "rp" (=) "=" (number_literal) "1" (;) ";" (for_statement) "for (; i < numsSize;) {\n // update ans elements\n ans[i] *= lp;\n ans[j] *= rp;\n\n lp *= nums[i++];\n rp *= nums[j--];\n }" (for) "for" (() "(" (;) ";" (binary_expression) "i < numsSize" (identifier) "i" (<) "<" (identifier) "numsSize" (;) ";" ()) ")" (compound_statement) "{\n // update ans elements\n ans[i] *= lp;\n ans[j] *= rp;\n\n lp *= nums[i++];\n rp *= nums[j--];\n }" ({) "{" (comment) "// update ans elements" (expression_statement) "ans[i] *= lp;" (assignment_expression) "ans[i] *= lp" (subscript_expression) "ans[i]" (identifier) "ans" ([) "[" (identifier) "i" (]) "]" (*=) "*=" (identifier) "lp" (;) ";" (expression_statement) "ans[j] *= rp;" (assignment_expression) "ans[j] *= rp" (subscript_expression) "ans[j]" (identifier) "ans" ([) "[" (identifier) "j" (]) "]" (*=) "*=" (identifier) "rp" (;) ";" (expression_statement) "lp *= nums[i++];" (assignment_expression) "lp *= nums[i++]" (identifier) "lp" (*=) "*=" (subscript_expression) "nums[i++]" (identifier) "nums" ([) "[" (update_expression) "i++" (identifier) "i" (++) "++" (]) "]" (;) ";" (expression_statement) "rp *= nums[j--];" (assignment_expression) "rp *= nums[j--]" (identifier) "rp" (*=) "*=" (subscript_expression) "nums[j--]" (identifier) "nums" ([) "[" (update_expression) "j--" (identifier) "j" (--) "--" (]) "]" (;) ";" (}) "}" (comment) "/*\n * for index i \n ans[0] *= 1\n ans[1] *= nums[0]\n ans[2] *= (nums[0] * nums[1])\n ...\n ans[n-3] *= (nums[0] * nums[1] * ... * nums[n-4])\n ans[n-2] *= (nums[0] * nums[1] * ... * nums[n-3])\n ans[n-1] *= (nums[0] * nums[1] * ... * nums[n-2])\n\n * for index j\n ans[n-1] *= 1\n ans[n-2] *= nums[n-1]\n ans[n-3] *= (nums[n-1] * nums[n-2])\n ...\n ans[2] *= (nums[n-1] * nums[n-2] ... * nums[3])\n ans[1] *= (nums[n-1] * nums[n-2] ... * nums[2])\n ans[0] *= (nums[n-1] * nums[n-2] ... * nums[1])\n */" (return_statement) "return ans;" (return) "return" (identifier) "ans" (;) ";" (}) "}" (function_definition) "int main(){\n int arr[] = {1, 2, 3, 4};\n int size = sizeof(arr) / sizeof(int);\n int ret;\n int* res;\n int i;\n\n res = productExceptSelf(arr, size, &ret);\n\n for (i = 0; i < ret; i++) {\n printf("%d ", res[i]);\n }\n printf("\n");\n}" (primitive_type) "int" (function_declarator) "main()" (identifier) "main" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n int arr[] = {1, 2, 3, 4};\n int size = sizeof(arr) / sizeof(int);\n int ret;\n int* res;\n int i;\n\n res = productExceptSelf(arr, size, &ret);\n\n for (i = 0; i < ret; i++) {\n printf("%d ", res[i]);\n }\n printf("\n");\n}" ({) "{" (declaration) "int arr[] = {1, 2, 3, 4};" (primitive_type) "int" (init_declarator) "arr[] = {1, 2, 3, 4}" (array_declarator) "arr[]" (identifier) "arr" ([) "[" (]) "]" (=) "=" (initializer_list) "{1, 2, 3, 4}" ({) "{" (number_literal) "1" (,) "," (number_literal) "2" (,) "," (number_literal) "3" (,) "," (number_literal) "4" (}) "}" (;) ";" (declaration) "int size = sizeof(arr) / sizeof(int);" (primitive_type) "int" (init_declarator) "size = sizeof(arr) / sizeof(int)" (identifier) "size" (=) "=" (binary_expression) "sizeof(arr) / sizeof(int)" (sizeof_expression) "sizeof(arr)" (sizeof) "sizeof" (parenthesized_expression) "(arr)" (() "(" (identifier) "arr" ()) ")" (/) "/" (sizeof_expression) "sizeof(int)" (sizeof) "sizeof" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) ")" (;) ";" (declaration) "int ret;" (primitive_type) "int" (identifier) "ret" (;) ";" (declaration) "int* res;" (primitive_type) "int" (pointer_declarator) "* res" (*) "*" (identifier) "res" (;) ";" (declaration) "int i;" (primitive_type) "int" (identifier) "i" (;) ";" (expression_statement) "res = productExceptSelf(arr, size, &ret);" (assignment_expression) "res = productExceptSelf(arr, size, &ret)" (identifier) "res" (=) "=" (call_expression) "productExceptSelf(arr, size, &ret)" (identifier) "productExceptSelf" (argument_list) "(arr, size, &ret)" (() "(" (identifier) "arr" (,) "," (identifier) "size" (,) "," (pointer_expression) "&ret" (&) "&" (identifier) "ret" ()) ")" (;) ";" (for_statement) "for (i = 0; i < ret; i++) {\n printf("%d ", res[i]);\n }" (for) "for" (() "(" (assignment_expression) "i = 0" (identifier) "i" (=) "=" (number_literal) "0" (;) ";" (binary_expression) "i < ret" (identifier) "i" (<) "<" (identifier) "ret" (;) ";" (update_expression) "i++" (identifier) "i" (++) "++" ()) ")" (compound_statement) "{\n printf("%d ", res[i]);\n }" ({) "{" (expression_statement) "printf("%d ", res[i]);" (call_expression) "printf("%d ", res[i])" (identifier) "printf" (argument_list) "("%d ", res[i])" (() "(" (string_literal) ""%d "" (") """ (string_content) "%d " (") """ (,) "," (subscript_expression) "res[i]" (identifier) "res" ([) "[" (identifier) "i" (]) "]" ()) ")" (;) ";" (}) "}" (expression_statement) "printf("\n");" (call_expression) "printf("\n")" (identifier) "printf" (argument_list) "("\n")" (() "(" (string_literal) ""\n"" (") """ (escape_sequence) "\n" (") """ ()) ")" (;) ";" (}) "}"
323
0
{"language": "c", "success": true, "metadata": {"lines": 58, "avg_line_length": 26.02, "nodes": 205, "errors": 0, "source_hash": "f84e12c3de83538d2de9c7fbb52a5f73bf8a8c44a62f400a46c30b967fe604be", "categorized_nodes": 132}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include <stdio.h>\n", "parent": null, "children": [1, 2], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 1, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 0, "column": 8}}, {"id": 2, "type": "system_lib_string", "text": "<stdio.h>", "parent": 0, "children": [], "start_point": {"row": 0, "column": 9}, "end_point": {"row": 0, "column": 18}}, {"id": 3, "type": "preproc_include", "text": "#include <stdlib.h>\n", "parent": null, "children": [4, 5], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 8}}, {"id": 5, "type": "system_lib_string", "text": "<stdlib.h>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "function_definition", "text": "int* productExceptSelf(int* nums, int numsSize, int* returnSize) {\n int* ans = malloc(sizeof(int) * numsSize);\n int k;\n\n for (k = 0; k < numsSize; k++) {\n ans[k] = 1;\n }\n\n *returnSize = numsSize;\n\n // i is the position of left product pointer, lp is left product\n // j is the position of right product pointer, rp is right product\n int i = 0;\n int j = numsSize - 1;\n int lp = 1;\n int rp = 1;\n\n for (; i < numsSize;) {\n // update ans elements\n ans[i] *= lp;\n ans[j] *= rp;\n\n lp *= nums[i++];\n rp *= nums[j--];\n }\n\n /*\n * for index i \n ans[0] *= 1\n ans[1] *= nums[0]\n ans[2] *= (nums[0] * nums[1])\n ...\n ans[n-3] *= (nums[0] * nums[1] * ... * nums[n-4])\n ans[n-2] *= (nums[0] * nums[1] * ... * nums[n-3])\n ans[n-1] *= (nums[0] * nums[1] * ... * nums[n-2])\n\n * for index j\n ans[n-1] *= 1\n ans[n-2] *= nums[n-1]\n ans[n-3] *= (nums[n-1] * nums[n-2])\n ...\n ans[2] *= (nums[n-1] * nums[n-2] ... * nums[3])\n ans[1] *= (nums[n-1] * nums[n-2] ... * nums[2])\n ans[0] *= (nums[n-1] * nums[n-2] ... * nums[1])\n */\n\n return ans;\n}", "parent": null, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 54, "column": 1}}, {"id": 7, "type": "primitive_type", "text": "int", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 3}}, {"id": 8, "type": "pointer_declarator", "text": "* productExceptSelf(int* nums, int numsSize, int* returnSize)", "parent": 6, "children": [9, 10], "start_point": {"row": 7, "column": 3}, "end_point": {"row": 7, "column": 64}}, {"id": 9, "type": "*", "text": "*", "parent": 8, "children": [], "start_point": {"row": 7, "column": 3}, "end_point": {"row": 7, "column": 4}}, {"id": 10, "type": "function_declarator", "text": "productExceptSelf(int* nums, int numsSize, int* returnSize)", "parent": 8, "children": [11, 12], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 64}}, {"id": 11, "type": "identifier", "text": "productExceptSelf", "parent": 10, "children": [], "start_point": {"row": 7, "column": 5}, "end_point": {"row": 7, "column": 22}}, {"id": 12, "type": "parameter_list", "text": "(int* nums, int numsSize, int* returnSize)", "parent": 10, "children": [13, 18, 21], "start_point": {"row": 7, "column": 22}, "end_point": {"row": 7, "column": 64}}, {"id": 13, "type": "parameter_declaration", "text": "int* nums", "parent": 12, "children": [14, 15], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 32}}, {"id": 14, "type": "primitive_type", "text": "int", "parent": 13, "children": [], "start_point": {"row": 7, "column": 23}, "end_point": {"row": 7, "column": 26}}, {"id": 15, "type": "pointer_declarator", "text": "* nums", "parent": 13, "children": [16, 17], "start_point": {"row": 7, "column": 26}, "end_point": {"row": 7, "column": 32}}, {"id": 16, "type": "*", "text": "*", "parent": 15, "children": [], "start_point": {"row": 7, "column": 26}, "end_point": {"row": 7, "column": 27}}, {"id": 17, "type": "identifier", "text": "nums", "parent": 15, "children": [], "start_point": {"row": 7, "column": 28}, "end_point": {"row": 7, "column": 32}}, {"id": 18, "type": "parameter_declaration", "text": "int numsSize", "parent": 12, "children": [19, 20], "start_point": {"row": 7, "column": 34}, "end_point": {"row": 7, "column": 46}}, {"id": 19, "type": "primitive_type", "text": "int", "parent": 18, "children": [], "start_point": {"row": 7, "column": 34}, "end_point": {"row": 7, "column": 37}}, {"id": 20, "type": "identifier", "text": "numsSize", "parent": 18, "children": [], "start_point": {"row": 7, "column": 38}, "end_point": {"row": 7, "column": 46}}, {"id": 21, "type": "parameter_declaration", "text": "int* returnSize", "parent": 12, "children": [22, 23], "start_point": {"row": 7, "column": 48}, "end_point": {"row": 7, "column": 63}}, {"id": 22, "type": "primitive_type", "text": "int", "parent": 21, "children": [], "start_point": {"row": 7, "column": 48}, "end_point": {"row": 7, "column": 51}}, {"id": 23, "type": "pointer_declarator", "text": "* returnSize", "parent": 21, "children": [24, 25], "start_point": {"row": 7, "column": 51}, "end_point": {"row": 7, "column": 63}}, {"id": 24, "type": "*", "text": "*", "parent": 23, "children": [], "start_point": {"row": 7, "column": 51}, "end_point": {"row": 7, "column": 52}}, {"id": 25, "type": "identifier", "text": "returnSize", "parent": 23, "children": [], "start_point": {"row": 7, "column": 53}, "end_point": {"row": 7, "column": 63}}, {"id": 26, "type": "declaration", "text": "int* ans = malloc(sizeof(int) * numsSize);", "parent": 6, "children": [27, 28], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 46}}, {"id": 27, "type": "primitive_type", "text": "int", "parent": 26, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 7}}, {"id": 28, "type": "init_declarator", "text": "* ans = malloc(sizeof(int) * numsSize)", "parent": 26, "children": [29, 32, 33], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 45}}, {"id": 29, "type": "pointer_declarator", "text": "* ans", "parent": 28, "children": [30, 31], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 12}}, {"id": 30, "type": "*", "text": "*", "parent": 29, "children": [], "start_point": {"row": 8, "column": 7}, "end_point": {"row": 8, "column": 8}}, {"id": 31, "type": "identifier", "text": "ans", "parent": 29, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 12}}, {"id": 32, "type": "=", "text": "=", "parent": 28, "children": [], "start_point": {"row": 8, "column": 13}, "end_point": {"row": 8, "column": 14}}, {"id": 33, "type": "call_expression", "text": "malloc(sizeof(int) * numsSize)", "parent": 28, "children": [34, 35], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 45}}, {"id": 34, "type": "identifier", "text": "malloc", "parent": 33, "children": [], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 21}}, {"id": 35, "type": "argument_list", "text": "(sizeof(int) * numsSize)", "parent": 33, "children": [36], "start_point": {"row": 8, "column": 21}, "end_point": {"row": 8, "column": 45}}, {"id": 36, "type": "binary_expression", "text": "sizeof(int) * numsSize", "parent": 35, "children": [37, 40, 41], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 44}}, {"id": 37, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 36, "children": [38], "start_point": {"row": 8, "column": 22}, "end_point": {"row": 8, "column": 33}}, {"id": 38, "type": "type_descriptor", "text": "int", "parent": 37, "children": [39], "start_point": {"row": 8, "column": 29}, "end_point": {"row": 8, "column": 32}}, {"id": 39, "type": "primitive_type", "text": "int", "parent": 38, "children": [], "start_point": {"row": 8, "column": 29}, "end_point": {"row": 8, "column": 32}}, {"id": 40, "type": "*", "text": "*", "parent": 36, "children": [], "start_point": {"row": 8, "column": 34}, "end_point": {"row": 8, "column": 35}}, {"id": 41, "type": "identifier", "text": "numsSize", "parent": 36, "children": [], "start_point": {"row": 8, "column": 36}, "end_point": {"row": 8, "column": 44}}, {"id": 42, "type": "declaration", "text": "int k;", "parent": 6, "children": [43, 44], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 10}}, {"id": 43, "type": "primitive_type", "text": "int", "parent": 42, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 7}}, {"id": 44, "type": "identifier", "text": "k", "parent": 42, "children": [], "start_point": {"row": 9, "column": 8}, "end_point": {"row": 9, "column": 9}}, {"id": 45, "type": "for_statement", "text": "for (k = 0; k < numsSize; k++) {\n ans[k] = 1;\n }", "parent": 6, "children": [46, 50, 54], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 13, "column": 5}}, {"id": 46, "type": "assignment_expression", "text": "k = 0", "parent": 45, "children": [47, 48, 49], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 14}}, {"id": 47, "type": "identifier", "text": "k", "parent": 46, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 10}}, {"id": 48, "type": "=", "text": "=", "parent": 46, "children": [], "start_point": {"row": 11, "column": 11}, "end_point": {"row": 11, "column": 12}}, {"id": 49, "type": "number_literal", "text": "0", "parent": 46, "children": [], "start_point": {"row": 11, "column": 13}, "end_point": {"row": 11, "column": 14}}, {"id": 50, "type": "binary_expression", "text": "k < numsSize", "parent": 45, "children": [51, 52, 53], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 28}}, {"id": 51, "type": "identifier", "text": "k", "parent": 50, "children": [], "start_point": {"row": 11, "column": 16}, "end_point": {"row": 11, "column": 17}}, {"id": 52, "type": "<", "text": "<", "parent": 50, "children": [], "start_point": {"row": 11, "column": 18}, "end_point": {"row": 11, "column": 19}}, {"id": 53, "type": "identifier", "text": "numsSize", "parent": 50, "children": [], "start_point": {"row": 11, "column": 20}, "end_point": {"row": 11, "column": 28}}, {"id": 54, "type": "update_expression", "text": "k++", "parent": 45, "children": [55, 56], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 33}}, {"id": 55, "type": "identifier", "text": "k", "parent": 54, "children": [], "start_point": {"row": 11, "column": 30}, "end_point": {"row": 11, "column": 31}}, {"id": 56, "type": "++", "text": "++", "parent": 54, "children": [], "start_point": {"row": 11, "column": 31}, "end_point": {"row": 11, "column": 33}}, {"id": 57, "type": "assignment_expression", "text": "ans[k] = 1", "parent": 45, "children": [58, 61, 62], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 18}}, {"id": 58, "type": "subscript_expression", "text": "ans[k]", "parent": 57, "children": [59, 60], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 14}}, {"id": 59, "type": "identifier", "text": "ans", "parent": 58, "children": [], "start_point": {"row": 12, "column": 8}, "end_point": {"row": 12, "column": 11}}, {"id": 60, "type": "identifier", "text": "k", "parent": 58, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 13}}, {"id": 61, "type": "=", "text": "=", "parent": 57, "children": [], "start_point": {"row": 12, "column": 15}, "end_point": {"row": 12, "column": 16}}, {"id": 62, "type": "number_literal", "text": "1", "parent": 57, "children": [], "start_point": {"row": 12, "column": 17}, "end_point": {"row": 12, "column": 18}}, {"id": 63, "type": "assignment_expression", "text": "*returnSize = numsSize", "parent": 6, "children": [64, 67, 68], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 26}}, {"id": 64, "type": "pointer_expression", "text": "*returnSize", "parent": 63, "children": [65, 66], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 15}}, {"id": 65, "type": "*", "text": "*", "parent": 64, "children": [], "start_point": {"row": 15, "column": 4}, "end_point": {"row": 15, "column": 5}}, {"id": 66, "type": "identifier", "text": "returnSize", "parent": 64, "children": [], "start_point": {"row": 15, "column": 5}, "end_point": {"row": 15, "column": 15}}, {"id": 67, "type": "=", "text": "=", "parent": 63, "children": [], "start_point": {"row": 15, "column": 16}, "end_point": {"row": 15, "column": 17}}, {"id": 68, "type": "identifier", "text": "numsSize", "parent": 63, "children": [], "start_point": {"row": 15, "column": 18}, "end_point": {"row": 15, "column": 26}}, {"id": 69, "type": "declaration", "text": "int i = 0;", "parent": 6, "children": [70, 71], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 14}}, {"id": 70, "type": "primitive_type", "text": "int", "parent": 69, "children": [], "start_point": {"row": 19, "column": 4}, "end_point": {"row": 19, "column": 7}}, {"id": 71, "type": "init_declarator", "text": "i = 0", "parent": 69, "children": [72, 73, 74], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 13}}, {"id": 72, "type": "identifier", "text": "i", "parent": 71, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 9}}, {"id": 73, "type": "=", "text": "=", "parent": 71, "children": [], "start_point": {"row": 19, "column": 10}, "end_point": {"row": 19, "column": 11}}, {"id": 74, "type": "number_literal", "text": "0", "parent": 71, "children": [], "start_point": {"row": 19, "column": 12}, "end_point": {"row": 19, "column": 13}}, {"id": 75, "type": "declaration", "text": "int j = numsSize - 1;", "parent": 6, "children": [76, 77], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 25}}, {"id": 76, "type": "primitive_type", "text": "int", "parent": 75, "children": [], "start_point": {"row": 20, "column": 4}, "end_point": {"row": 20, "column": 7}}, {"id": 77, "type": "init_declarator", "text": "j = numsSize - 1", "parent": 75, "children": [78, 79, 80], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 24}}, {"id": 78, "type": "identifier", "text": "j", "parent": 77, "children": [], "start_point": {"row": 20, "column": 8}, "end_point": {"row": 20, "column": 9}}, {"id": 79, "type": "=", "text": "=", "parent": 77, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 11}}, {"id": 80, "type": "binary_expression", "text": "numsSize - 1", "parent": 77, "children": [81, 82, 83], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 24}}, {"id": 81, "type": "identifier", "text": "numsSize", "parent": 80, "children": [], "start_point": {"row": 20, "column": 12}, "end_point": {"row": 20, "column": 20}}, {"id": 82, "type": "-", "text": "-", "parent": 80, "children": [], "start_point": {"row": 20, "column": 21}, "end_point": {"row": 20, "column": 22}}, {"id": 83, "type": "number_literal", "text": "1", "parent": 80, "children": [], "start_point": {"row": 20, "column": 23}, "end_point": {"row": 20, "column": 24}}, {"id": 84, "type": "declaration", "text": "int lp = 1;", "parent": 6, "children": [85, 86], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 15}}, {"id": 85, "type": "primitive_type", "text": "int", "parent": 84, "children": [], "start_point": {"row": 21, "column": 4}, "end_point": {"row": 21, "column": 7}}, {"id": 86, "type": "init_declarator", "text": "lp = 1", "parent": 84, "children": [87, 88, 89], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 14}}, {"id": 87, "type": "identifier", "text": "lp", "parent": 86, "children": [], "start_point": {"row": 21, "column": 8}, "end_point": {"row": 21, "column": 10}}, {"id": 88, "type": "=", "text": "=", "parent": 86, "children": [], "start_point": {"row": 21, "column": 11}, "end_point": {"row": 21, "column": 12}}, {"id": 89, "type": "number_literal", "text": "1", "parent": 86, "children": [], "start_point": {"row": 21, "column": 13}, "end_point": {"row": 21, "column": 14}}, {"id": 90, "type": "declaration", "text": "int rp = 1;", "parent": 6, "children": [91, 92], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 15}}, {"id": 91, "type": "primitive_type", "text": "int", "parent": 90, "children": [], "start_point": {"row": 22, "column": 4}, "end_point": {"row": 22, "column": 7}}, {"id": 92, "type": "init_declarator", "text": "rp = 1", "parent": 90, "children": [93, 94, 95], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 14}}, {"id": 93, "type": "identifier", "text": "rp", "parent": 92, "children": [], "start_point": {"row": 22, "column": 8}, "end_point": {"row": 22, "column": 10}}, {"id": 94, "type": "=", "text": "=", "parent": 92, "children": [], "start_point": {"row": 22, "column": 11}, "end_point": {"row": 22, "column": 12}}, {"id": 95, "type": "number_literal", "text": "1", "parent": 92, "children": [], "start_point": {"row": 22, "column": 13}, "end_point": {"row": 22, "column": 14}}, {"id": 96, "type": "for_statement", "text": "for (; i < numsSize;) {\n // update ans elements\n ans[i] *= lp;\n ans[j] *= rp;\n\n lp *= nums[i++];\n rp *= nums[j--];\n }", "parent": 6, "children": [97], "start_point": {"row": 24, "column": 4}, "end_point": {"row": 31, "column": 5}}, {"id": 97, "type": "binary_expression", "text": "i < numsSize", "parent": 96, "children": [98, 99, 100], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 23}}, {"id": 98, "type": "identifier", "text": "i", "parent": 97, "children": [], "start_point": {"row": 24, "column": 11}, "end_point": {"row": 24, "column": 12}}, {"id": 99, "type": "<", "text": "<", "parent": 97, "children": [], "start_point": {"row": 24, "column": 13}, "end_point": {"row": 24, "column": 14}}, {"id": 100, "type": "identifier", "text": "numsSize", "parent": 97, "children": [], "start_point": {"row": 24, "column": 15}, "end_point": {"row": 24, "column": 23}}, {"id": 101, "type": "assignment_expression", "text": "ans[i] *= lp", "parent": 96, "children": [102, 105, 106], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 20}}, {"id": 102, "type": "subscript_expression", "text": "ans[i]", "parent": 101, "children": [103, 104], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 14}}, {"id": 103, "type": "identifier", "text": "ans", "parent": 102, "children": [], "start_point": {"row": 26, "column": 8}, "end_point": {"row": 26, "column": 11}}, {"id": 104, "type": "identifier", "text": "i", "parent": 102, "children": [], "start_point": {"row": 26, "column": 12}, "end_point": {"row": 26, "column": 13}}, {"id": 105, "type": "*=", "text": "*=", "parent": 101, "children": [], "start_point": {"row": 26, "column": 15}, "end_point": {"row": 26, "column": 17}}, {"id": 106, "type": "identifier", "text": "lp", "parent": 101, "children": [], "start_point": {"row": 26, "column": 18}, "end_point": {"row": 26, "column": 20}}, {"id": 107, "type": "assignment_expression", "text": "ans[j] *= rp", "parent": 96, "children": [108, 111, 112], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 20}}, {"id": 108, "type": "subscript_expression", "text": "ans[j]", "parent": 107, "children": [109, 110], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 14}}, {"id": 109, "type": "identifier", "text": "ans", "parent": 108, "children": [], "start_point": {"row": 27, "column": 8}, "end_point": {"row": 27, "column": 11}}, {"id": 110, "type": "identifier", "text": "j", "parent": 108, "children": [], "start_point": {"row": 27, "column": 12}, "end_point": {"row": 27, "column": 13}}, {"id": 111, "type": "*=", "text": "*=", "parent": 107, "children": [], "start_point": {"row": 27, "column": 15}, "end_point": {"row": 27, "column": 17}}, {"id": 112, "type": "identifier", "text": "rp", "parent": 107, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 20}}, {"id": 113, "type": "assignment_expression", "text": "lp *= nums[i++]", "parent": 96, "children": [114, 115, 116], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 23}}, {"id": 114, "type": "identifier", "text": "lp", "parent": 113, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 10}}, {"id": 115, "type": "*=", "text": "*=", "parent": 113, "children": [], "start_point": {"row": 29, "column": 11}, "end_point": {"row": 29, "column": 13}}, {"id": 116, "type": "subscript_expression", "text": "nums[i++]", "parent": 113, "children": [117, 118], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 23}}, {"id": 117, "type": "identifier", "text": "nums", "parent": 116, "children": [], "start_point": {"row": 29, "column": 14}, "end_point": {"row": 29, "column": 18}}, {"id": 118, "type": "update_expression", "text": "i++", "parent": 116, "children": [119, 120], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 22}}, {"id": 119, "type": "identifier", "text": "i", "parent": 118, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 20}}, {"id": 120, "type": "++", "text": "++", "parent": 118, "children": [], "start_point": {"row": 29, "column": 20}, "end_point": {"row": 29, "column": 22}}, {"id": 121, "type": "assignment_expression", "text": "rp *= nums[j--]", "parent": 96, "children": [122, 123, 124], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 23}}, {"id": 122, "type": "identifier", "text": "rp", "parent": 121, "children": [], "start_point": {"row": 30, "column": 8}, "end_point": {"row": 30, "column": 10}}, {"id": 123, "type": "*=", "text": "*=", "parent": 121, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 13}}, {"id": 124, "type": "subscript_expression", "text": "nums[j--]", "parent": 121, "children": [125, 126], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 23}}, {"id": 125, "type": "identifier", "text": "nums", "parent": 124, "children": [], "start_point": {"row": 30, "column": 14}, "end_point": {"row": 30, "column": 18}}, {"id": 126, "type": "update_expression", "text": "j--", "parent": 124, "children": [127, 128], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 22}}, {"id": 127, "type": "identifier", "text": "j", "parent": 126, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 20}}, {"id": 128, "type": "--", "text": "--", "parent": 126, "children": [], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 22}}, {"id": 129, "type": "return_statement", "text": "return ans;", "parent": 6, "children": [130], "start_point": {"row": 53, "column": 4}, "end_point": {"row": 53, "column": 15}}, {"id": 130, "type": "identifier", "text": "ans", "parent": 129, "children": [], "start_point": {"row": 53, "column": 11}, "end_point": {"row": 53, "column": 14}}, {"id": 131, "type": "function_definition", "text": "int main(){\n int arr[] = {1, 2, 3, 4};\n int size = sizeof(arr) / sizeof(int);\n int ret;\n int* res;\n int i;\n\n res = productExceptSelf(arr, size, &ret);\n\n for (i = 0; i < ret; i++) {\n printf(\"%d \", res[i]);\n }\n printf(\"\\n\");\n}", "parent": null, "children": [132, 133], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 69, "column": 1}}, {"id": 132, "type": "primitive_type", "text": "int", "parent": 131, "children": [], "start_point": {"row": 56, "column": 0}, "end_point": {"row": 56, "column": 3}}, {"id": 133, "type": "function_declarator", "text": "main()", "parent": 131, "children": [134, 135], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 10}}, {"id": 134, "type": "identifier", "text": "main", "parent": 133, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 8}}, {"id": 135, "type": "parameter_list", "text": "()", "parent": 133, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 10}}, {"id": 136, "type": "declaration", "text": "int arr[] = {1, 2, 3, 4};", "parent": 131, "children": [137, 138], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 29}}, {"id": 137, "type": "primitive_type", "text": "int", "parent": 136, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 7}}, {"id": 138, "type": "init_declarator", "text": "arr[] = {1, 2, 3, 4}", "parent": 136, "children": [139, 141, 142], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 28}}, {"id": 139, "type": "array_declarator", "text": "arr[]", "parent": 138, "children": [140], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 13}}, {"id": 140, "type": "identifier", "text": "arr", "parent": 139, "children": [], "start_point": {"row": 57, "column": 8}, "end_point": {"row": 57, "column": 11}}, {"id": 141, "type": "=", "text": "=", "parent": 138, "children": [], "start_point": {"row": 57, "column": 14}, "end_point": {"row": 57, "column": 15}}, {"id": 142, "type": "initializer_list", "text": "{1, 2, 3, 4}", "parent": 138, "children": [143, 144, 145, 146], "start_point": {"row": 57, "column": 16}, "end_point": {"row": 57, "column": 28}}, {"id": 143, "type": "number_literal", "text": "1", "parent": 142, "children": [], "start_point": {"row": 57, "column": 17}, "end_point": {"row": 57, "column": 18}}, {"id": 144, "type": "number_literal", "text": "2", "parent": 142, "children": [], "start_point": {"row": 57, "column": 20}, "end_point": {"row": 57, "column": 21}}, {"id": 145, "type": "number_literal", "text": "3", "parent": 142, "children": [], "start_point": {"row": 57, "column": 23}, "end_point": {"row": 57, "column": 24}}, {"id": 146, "type": "number_literal", "text": "4", "parent": 142, "children": [], "start_point": {"row": 57, "column": 26}, "end_point": {"row": 57, "column": 27}}, {"id": 147, "type": "declaration", "text": "int size = sizeof(arr) / sizeof(int);", "parent": 131, "children": [148, 149], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 41}}, {"id": 148, "type": "primitive_type", "text": "int", "parent": 147, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 7}}, {"id": 149, "type": "init_declarator", "text": "size = sizeof(arr) / sizeof(int)", "parent": 147, "children": [150, 151, 152], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 40}}, {"id": 150, "type": "identifier", "text": "size", "parent": 149, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 12}}, {"id": 151, "type": "=", "text": "=", "parent": 149, "children": [], "start_point": {"row": 58, "column": 13}, "end_point": {"row": 58, "column": 14}}, {"id": 152, "type": "binary_expression", "text": "sizeof(arr) / sizeof(int)", "parent": 149, "children": [153, 156, 157], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 40}}, {"id": 153, "type": "sizeof_expression", "text": "sizeof(arr)", "parent": 152, "children": [154], "start_point": {"row": 58, "column": 15}, "end_point": {"row": 58, "column": 26}}, {"id": 154, "type": "parenthesized_expression", "text": "(arr)", "parent": 153, "children": [155], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 26}}, {"id": 155, "type": "identifier", "text": "arr", "parent": 154, "children": [], "start_point": {"row": 58, "column": 22}, "end_point": {"row": 58, "column": 25}}, {"id": 156, "type": "/", "text": "/", "parent": 152, "children": [], "start_point": {"row": 58, "column": 27}, "end_point": {"row": 58, "column": 28}}, {"id": 157, "type": "sizeof_expression", "text": "sizeof(int)", "parent": 152, "children": [158], "start_point": {"row": 58, "column": 29}, "end_point": {"row": 58, "column": 40}}, {"id": 158, "type": "type_descriptor", "text": "int", "parent": 157, "children": [159], "start_point": {"row": 58, "column": 36}, "end_point": {"row": 58, "column": 39}}, {"id": 159, "type": "primitive_type", "text": "int", "parent": 158, "children": [], "start_point": {"row": 58, "column": 36}, "end_point": {"row": 58, "column": 39}}, {"id": 160, "type": "declaration", "text": "int ret;", "parent": 131, "children": [161, 162], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 12}}, {"id": 161, "type": "primitive_type", "text": "int", "parent": 160, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 7}}, {"id": 162, "type": "identifier", "text": "ret", "parent": 160, "children": [], "start_point": {"row": 59, "column": 8}, "end_point": {"row": 59, "column": 11}}, {"id": 163, "type": "declaration", "text": "int* res;", "parent": 131, "children": [164, 165], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 13}}, {"id": 164, "type": "primitive_type", "text": "int", "parent": 163, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 7}}, {"id": 165, "type": "pointer_declarator", "text": "* res", "parent": 163, "children": [166, 167], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 12}}, {"id": 166, "type": "*", "text": "*", "parent": 165, "children": [], "start_point": {"row": 60, "column": 7}, "end_point": {"row": 60, "column": 8}}, {"id": 167, "type": "identifier", "text": "res", "parent": 165, "children": [], "start_point": {"row": 60, "column": 9}, "end_point": {"row": 60, "column": 12}}, {"id": 168, "type": "declaration", "text": "int i;", "parent": 131, "children": [169, 170], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 10}}, {"id": 169, "type": "primitive_type", "text": "int", "parent": 168, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 7}}, {"id": 170, "type": "identifier", "text": "i", "parent": 168, "children": [], "start_point": {"row": 61, "column": 8}, "end_point": {"row": 61, "column": 9}}, {"id": 171, "type": "assignment_expression", "text": "res = productExceptSelf(arr, size, &ret)", "parent": 131, "children": [172, 173, 174], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 44}}, {"id": 172, "type": "identifier", "text": "res", "parent": 171, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 7}}, {"id": 173, "type": "=", "text": "=", "parent": 171, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 9}}, {"id": 174, "type": "call_expression", "text": "productExceptSelf(arr, size, &ret)", "parent": 171, "children": [175, 176], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 44}}, {"id": 175, "type": "identifier", "text": "productExceptSelf", "parent": 174, "children": [], "start_point": {"row": 63, "column": 10}, "end_point": {"row": 63, "column": 27}}, {"id": 176, "type": "argument_list", "text": "(arr, size, &ret)", "parent": 174, "children": [177, 178, 179], "start_point": {"row": 63, "column": 27}, "end_point": {"row": 63, "column": 44}}, {"id": 177, "type": "identifier", "text": "arr", "parent": 176, "children": [], "start_point": {"row": 63, "column": 28}, "end_point": {"row": 63, "column": 31}}, {"id": 178, "type": "identifier", "text": "size", "parent": 176, "children": [], "start_point": {"row": 63, "column": 33}, "end_point": {"row": 63, "column": 37}}, {"id": 179, "type": "pointer_expression", "text": "&ret", "parent": 176, "children": [180], "start_point": {"row": 63, "column": 39}, "end_point": {"row": 63, "column": 43}}, {"id": 180, "type": "identifier", "text": "ret", "parent": 179, "children": [], "start_point": {"row": 63, "column": 40}, "end_point": {"row": 63, "column": 43}}, {"id": 181, "type": "for_statement", "text": "for (i = 0; i < ret; i++) {\n printf(\"%d \", res[i]);\n }", "parent": 131, "children": [182, 186, 190], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 67, "column": 5}}, {"id": 182, "type": "assignment_expression", "text": "i = 0", "parent": 181, "children": [183, 184, 185], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 14}}, {"id": 183, "type": "identifier", "text": "i", "parent": 182, "children": [], "start_point": {"row": 65, "column": 9}, "end_point": {"row": 65, "column": 10}}, {"id": 184, "type": "=", "text": "=", "parent": 182, "children": [], "start_point": {"row": 65, "column": 11}, "end_point": {"row": 65, "column": 12}}, {"id": 185, "type": "number_literal", "text": "0", "parent": 182, "children": [], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 14}}, {"id": 186, "type": "binary_expression", "text": "i < ret", "parent": 181, "children": [187, 188, 189], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 23}}, {"id": 187, "type": "identifier", "text": "i", "parent": 186, "children": [], "start_point": {"row": 65, "column": 16}, "end_point": {"row": 65, "column": 17}}, {"id": 188, "type": "<", "text": "<", "parent": 186, "children": [], "start_point": {"row": 65, "column": 18}, "end_point": {"row": 65, "column": 19}}, {"id": 189, "type": "identifier", "text": "ret", "parent": 186, "children": [], "start_point": {"row": 65, "column": 20}, "end_point": {"row": 65, "column": 23}}, {"id": 190, "type": "update_expression", "text": "i++", "parent": 181, "children": [191, 192], "start_point": {"row": 65, "column": 25}, "end_point": {"row": 65, "column": 28}}, {"id": 191, "type": "identifier", "text": "i", "parent": 190, "children": [], "start_point": {"row": 65, "column": 25}, "end_point": {"row": 65, "column": 26}}, {"id": 192, "type": "++", "text": "++", "parent": 190, "children": [], "start_point": {"row": 65, "column": 26}, "end_point": {"row": 65, "column": 28}}, {"id": 193, "type": "call_expression", "text": "printf(\"%d \", res[i])", "parent": 181, "children": [194, 195], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 29}}, {"id": 194, "type": "identifier", "text": "printf", "parent": 193, "children": [], "start_point": {"row": 66, "column": 8}, "end_point": {"row": 66, "column": 14}}, {"id": 195, "type": "argument_list", "text": "(\"%d \", res[i])", "parent": 193, "children": [196, 197], "start_point": {"row": 66, "column": 14}, "end_point": {"row": 66, "column": 29}}, {"id": 196, "type": "string_literal", "text": "\"%d \"", "parent": 195, "children": [], "start_point": {"row": 66, "column": 15}, "end_point": {"row": 66, "column": 20}}, {"id": 197, "type": "subscript_expression", "text": "res[i]", "parent": 195, "children": [198, 199], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 28}}, {"id": 198, "type": "identifier", "text": "res", "parent": 197, "children": [], "start_point": {"row": 66, "column": 22}, "end_point": {"row": 66, "column": 25}}, {"id": 199, "type": "identifier", "text": "i", "parent": 197, "children": [], "start_point": {"row": 66, "column": 26}, "end_point": {"row": 66, "column": 27}}, {"id": 200, "type": "call_expression", "text": "printf(\"\\n\")", "parent": 131, "children": [201, 202], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 16}}, {"id": 201, "type": "identifier", "text": "printf", "parent": 200, "children": [], "start_point": {"row": 68, "column": 4}, "end_point": {"row": 68, "column": 10}}, {"id": 202, "type": "argument_list", "text": "(\"\\n\")", "parent": 200, "children": [203], "start_point": {"row": 68, "column": 10}, "end_point": {"row": 68, "column": 16}}, {"id": 203, "type": "string_literal", "text": "\"\\n\"", "parent": 202, "children": [204], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 15}}, {"id": 204, "type": "escape_sequence", "text": "\\n", "parent": 203, "children": [], "start_point": {"row": 68, "column": 12}, "end_point": {"row": 68, "column": 14}}]}, "node_categories": {"declarations": {"functions": [6, 10, 131, 133], "variables": [13, 18, 21, 26, 42, 69, 75, 84, 90, 136, 147, 160, 163, 168], "classes": [], "imports": [0, 1, 3, 4], "modules": [], "enums": []}, "statements": {"expressions": [33, 36, 37, 50, 54, 58, 64, 80, 97, 102, 108, 116, 118, 124, 126, 152, 153, 154, 157, 174, 179, 186, 190, 193, 197, 200], "assignments": [46, 57, 63, 101, 107, 113, 121, 171, 182], "loops": [45, 96, 181], "conditionals": [11, 17, 20, 25, 31, 34, 41, 44, 47, 51, 53, 55, 59, 60, 66, 68, 72, 78, 81, 87, 93, 98, 100, 103, 104, 106, 109, 110, 112, 114, 117, 119, 122, 125, 127, 130, 134, 140, 150, 155, 162, 167, 170, 172, 175, 177, 178, 180, 183, 187, 189, 191, 194, 198, 199, 201], "returns": [129], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 5, 49, 62, 74, 83, 89, 95, 143, 144, 145, 146, 185, 196, 203], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 6, "universal_type": "function", "name": "numsSize,", "text_snippet": "int* productExceptSelf(int* nums, int numsSize, int* returnSize) {\n int* ans = malloc(sizeof(int)"}, {"node_id": 10, "universal_type": "function", "name": "numsSize,", "text_snippet": "productExceptSelf(int* nums, int numsSize, int* returnSize)"}, {"node_id": 131, "universal_type": "function", "name": "main", "text_snippet": "int main(){\n int arr[] = {1, 2, 3, 4};\n int size = sizeof(arr) / sizeof(int);\n int ret;\n "}, {"node_id": 133, "universal_type": "function", "name": "unknown", "text_snippet": "main()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include <stdio.h>\n"}, {"node_id": 1, "text": "#include"}, {"node_id": 3, "text": "#include <stdlib.h>\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#include <stdio.h>\n#include <stdlib.h>\n\n/**\n * Return an array of size *returnSize.\n * Note: The returned array must be malloced, assume caller calls free().\n */\nint* productExceptSelf(int* nums, int numsSize, int* returnSize) {\n int* ans = malloc(sizeof(int) * numsSize);\n int k;\n\n for (k = 0; k < numsSize; k++) {\n ans[k] = 1;\n }\n\n *returnSize = numsSize;\n\n // i is the position of left product pointer, lp is left product\n // j is the position of right product pointer, rp is right product\n int i = 0;\n int j = numsSize - 1;\n int lp = 1;\n int rp = 1;\n\n for (; i < numsSize;) {\n // update ans elements\n ans[i] *= lp;\n ans[j] *= rp;\n\n lp *= nums[i++];\n rp *= nums[j--];\n }\n\n /*\n * for index i \n ans[0] *= 1\n ans[1] *= nums[0]\n ans[2] *= (nums[0] * nums[1])\n ...\n ans[n-3] *= (nums[0] * nums[1] * ... * nums[n-4])\n ans[n-2] *= (nums[0] * nums[1] * ... * nums[n-3])\n ans[n-1] *= (nums[0] * nums[1] * ... * nums[n-2])\n\n * for index j\n ans[n-1] *= 1\n ans[n-2] *= nums[n-1]\n ans[n-3] *= (nums[n-1] * nums[n-2])\n ...\n ans[2] *= (nums[n-1] * nums[n-2] ... * nums[3])\n ans[1] *= (nums[n-1] * nums[n-2] ... * nums[2])\n ans[0] *= (nums[n-1] * nums[n-2] ... * nums[1])\n */\n\n return ans;\n}\n\nint main(){\n int arr[] = {1, 2, 3, 4};\n int size = sizeof(arr) / sizeof(int);\n int ret;\n int* res;\n int i;\n\n res = productExceptSelf(arr, size, &ret);\n\n for (i = 0; i < ret; i++) {\n printf(\"%d \", res[i]);\n }\n printf(\"\\n\");\n}\n"}
90
c
#pragma once #ifndef _ASSERT # include <assert.h> # include <signal.h> # include <pthread.h> # # define _ASSERT(exp) (void)((!!(exp)) || (fprintf( stderr, "ASSERT - %s line %d\n", __FILE__, __LINE__ ), pthread_kill(pthread_self(), SIGSTOP))) #endif
31.62
8
(translation_unit) "#pragma once\n\n#ifndef _ASSERT\n# include <assert.h>\n# include <signal.h>\n# include <pthread.h>\n#\n# define _ASSERT(exp) (void)((!!(exp)) || (fprintf( stderr, "ASSERT - %s line %d\n", __FILE__, __LINE__ ), pthread_kill(pthread_self(), SIGSTOP)))\n#endif\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_ifdef) "#ifndef _ASSERT\n# include <assert.h>\n# include <signal.h>\n# include <pthread.h>\n#\n# define _ASSERT(exp) (void)((!!(exp)) || (fprintf( stderr, "ASSERT - %s line %d\n", __FILE__, __LINE__ ), pthread_kill(pthread_self(), SIGSTOP)))\n#endif" (#ifndef) "#ifndef" (identifier) "_ASSERT" (preproc_include) "# include <assert.h>\n" (#include) "# include" (system_lib_string) "<assert.h>" (preproc_include) "# include <signal.h>\n" (#include) "# include" (system_lib_string) "<signal.h>" (preproc_include) "# include <pthread.h>\n" (#include) "# include" (system_lib_string) "<pthread.h>" (ERROR) "#" (ERROR) "#" (preproc_function_def) "# define _ASSERT(exp) (void)((!!(exp)) || (fprintf( stderr, "ASSERT - %s line %d\n", __FILE__, __LINE__ ), pthread_kill(pthread_self(), SIGSTOP)))\n" (#define) "# define" (identifier) "_ASSERT" (preproc_params) "(exp)" (() "(" (identifier) "exp" ()) ")" (preproc_arg) "(void)((!!(exp)) || (fprintf( stderr, "ASSERT - %s line %d\n", __FILE__, __LINE__ ), pthread_kill(pthread_self(), SIGSTOP)))" (#endif) "#endif"
27
2
{"language": "c", "success": true, "metadata": {"lines": 8, "avg_line_length": 31.62, "nodes": 24, "errors": 0, "source_hash": "491174e55a25530230a3564073a34f56be3ced193c1751aceca50e40e2d6e7f7", "categorized_nodes": 17}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_call", "text": "#pragma once\n", "parent": null, "children": [1, 2], "start_point": {"row": 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_ifdef", "text": "#ifndef\t_ASSERT\n# include <assert.h>\n# include <signal.h>\n# include <pthread.h>\n#\n# define _ASSERT(exp) (void)((!!(exp)) || (fprintf( stderr, \"ASSERT - %s line %d\\n\", __FILE__, __LINE__ ), pthread_kill(pthread_self(), SIGSTOP)))\n#endif", "parent": null, "children": [4, 5, 6, 9, 12, 15, 17, 23], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 8, "column": 6}}, {"id": 4, "type": "#ifndef", "text": "#ifndef", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 5, "type": "identifier", "text": "_ASSERT", "parent": 3, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 15}}, {"id": 6, "type": "preproc_include", "text": "# include <assert.h>\n", "parent": 3, "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": 12}}, {"id": 8, "type": "system_lib_string", "text": "<assert.h>", "parent": 6, "children": [], "start_point": {"row": 3, "column": 13}, "end_point": {"row": 3, "column": 23}}, {"id": 9, "type": "preproc_include", "text": "# include <signal.h>\n", "parent": 3, "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": 12}}, {"id": 11, "type": "system_lib_string", "text": "<signal.h>", "parent": 9, "children": [], "start_point": {"row": 4, "column": 13}, "end_point": {"row": 4, "column": 23}}, {"id": 12, "type": "preproc_include", "text": "# include <pthread.h>\n", "parent": 3, "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": 12}}, {"id": 14, "type": "system_lib_string", "text": "<pthread.h>", "parent": 12, "children": [], "start_point": {"row": 5, "column": 13}, "end_point": {"row": 5, "column": 24}}, {"id": 15, "type": "ERROR", "text": "#", "parent": 3, "children": [16], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 1}}, {"id": 16, "type": "ERROR", "text": "#", "parent": 15, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 1}}, {"id": 17, "type": "preproc_function_def", "text": "# define _ASSERT(exp) (void)((!!(exp)) || (fprintf( stderr, \"ASSERT - %s line %d\\n\", __FILE__, __LINE__ ), pthread_kill(pthread_self(), SIGSTOP)))\n", "parent": 3, "children": [18, 19, 20, 22], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 18, "type": "#define", "text": "# define", "parent": 17, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 11}}, {"id": 19, "type": "identifier", "text": "_ASSERT", "parent": 17, "children": [], "start_point": {"row": 7, "column": 12}, "end_point": {"row": 7, "column": 19}}, {"id": 20, "type": "preproc_params", "text": "(exp)", "parent": 17, "children": [21], "start_point": {"row": 7, "column": 19}, "end_point": {"row": 7, "column": 24}}, {"id": 21, "type": "identifier", "text": "exp", "parent": 20, "children": [], "start_point": {"row": 7, "column": 20}, "end_point": {"row": 7, "column": 23}}, {"id": 22, "type": "preproc_arg", "text": "(void)((!!(exp)) || (fprintf( stderr, \"ASSERT - %s line %d\\n\", __FILE__, __LINE__ ), pthread_kill(pthread_self(), SIGSTOP)))", "parent": 17, "children": [], "start_point": {"row": 7, "column": 25}, "end_point": {"row": 7, "column": 149}}, {"id": 23, "type": "#endif", "text": "#endif", "parent": 3, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 6}}]}, "node_categories": {"declarations": {"functions": [17], "variables": [], "classes": [], "imports": [6, 7, 9, 10, 12, 13], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [3, 4, 5, 19, 21, 23], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [8, 11, 14], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 17, "universal_type": "function", "name": "unknown", "text_snippet": "# define _ASSERT(exp) (void)((!!(exp)) || (fprintf( stderr, \"ASSERT - %s line %d\\n\", __FILE__, __"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "# include <assert.h>\n"}, {"node_id": 7, "text": "# include"}, {"node_id": 9, "text": "# include <signal.h>\n"}, {"node_id": 10, "text": "# include"}, {"node_id": 12, "text": "# include <pthread.h>\n"}, {"node_id": 13, "text": "# include"}]}, "original_source_code": "#pragma once\n\n#ifndef\t_ASSERT\n# include <assert.h>\n# include <signal.h>\n# include <pthread.h>\n#\n# define _ASSERT(exp) (void)((!!(exp)) || (fprintf( stderr, \"ASSERT - %s line %d\\n\", __FILE__, __LINE__ ), pthread_kill(pthread_self(), SIGSTOP)))\n#endif\n"}
91
c
#pragma once #include <string> #include "trigger_tools.h" #include "cpptoml.h" //TODO:: Add using macro in import * export component_world's code. // Add name in Component List // When Component Destroy or Save timing, U Can Use this Macro! // if registed this component in WorldsUpdateList, this _component are Saving data in file. // if u dont want save components data? dont call macro in that variable. // so that list can be import & export names value like {"type", "value"} // name = value name // value = name's value #define SAVE_VAR(type, var_name) \ {\ auto tmp = cpptoml::make_array(); \ tmp->push_back(std::string(#type)); \ std::ostringstream ss;\ ss << var_name;\ tmp->push_back(std::string(ss.str()));\ _tmp->insert(#var_name, tmp);\ } #define SAVE_TOML(var_name, var) \ {\ _tmp->insert(#var_name, var);\ } #define SAVE_VAR_INIT(type, var_name, var) var_name = var; SAVE_VAR(type, var_name); namespace trigger { class component { protected: std::shared_ptr<cpptoml::table> _params; std::shared_ptr<cpptoml::table> _tmp; public: float time_scale = 1.0f; bool active = true; component() { _tmp = cpptoml::make_table(); _params = cpptoml::make_table(); SAVE_VAR(float , time_scale); SAVE_VAR(bool, active); _params->insert(T_CLASS, _tmp); } auto get_params()->decltype(_params) { return _params; } virtual void update(float delta) noexcept {}; }; }
28.12
49
(translation_unit) "#pragma once\n#include <string>\n#include "trigger_tools.h"\n#include "cpptoml.h"\n\n//TODO:: Add using macro in import * export component_world's code. \n\n// Add name in Component List\n// When Component Destroy or Save timing, U Can Use this Macro!\n// if registed this component in WorldsUpdateList, this _component are Saving data in file.\n// if u dont want save components data? dont call macro in that variable.\n// so that list can be import & export names value like {"type", "value"}\n// name = value name\n// value = name's value\n#define SAVE_VAR(type, var_name) \\n{\\nauto tmp = cpptoml::make_array(); \\ntmp->push_back(std::string(#type)); \\nstd::ostringstream ss;\\nss << var_name;\\ntmp->push_back(std::string(ss.str()));\\n_tmp->insert(#var_name, tmp);\\n}\n\n#define SAVE_TOML(var_name, var) \\n{\\n_tmp->insert(#var_name, var);\\n}\n\n#define SAVE_VAR_INIT(type, var_name, var) var_name = var; SAVE_VAR(type, var_name);\n\nnamespace trigger\n{\n class component\n {\n protected:\n std::shared_ptr<cpptoml::table> _params;\n std::shared_ptr<cpptoml::table> _tmp;\n public:\n float time_scale = 1.0f;\n bool active = true;\n\n component()\n {\n _tmp = cpptoml::make_table();\n _params = cpptoml::make_table();\n \n SAVE_VAR(float , time_scale);\n SAVE_VAR(bool, active);\n\n _params->insert(T_CLASS, _tmp);\n }\n\n auto get_params()->decltype(_params) \n {\n return _params;\n }\n\n\n virtual void update(float delta) noexcept\n {};\n };\n}\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include <string>\n" (#include) "#include" (system_lib_string) "<string>" (preproc_include) "#include "trigger_tools.h"\n" (#include) "#include" (string_literal) ""trigger_tools.h"" (") """ (string_content) "trigger_tools.h" (") """ (preproc_include) "#include "cpptoml.h"\n" (#include) "#include" (string_literal) ""cpptoml.h"" (") """ (string_content) "cpptoml.h" (") """ (comment) "//TODO:: Add using macro in import * export component_world's code. " (comment) "// Add name in Component List" (comment) "// When Component Destroy or Save timing, U Can Use this Macro!" (comment) "// if registed this component in WorldsUpdateList, this _component are Saving data in file." (comment) "// if u dont want save components data? dont call macro in that variable." (comment) "// so that list can be import & export names value like {"type", "value"}" (comment) "// name = value name" (comment) "// value = name's value" (preproc_function_def) "#define SAVE_VAR(type, var_name) \\n{\\nauto tmp = cpptoml::make_array(); \\ntmp->push_back(std::string(#type)); \\nstd::ostringstream ss;\\nss << var_name;\\ntmp->push_back(std::string(ss.str()));\\n_tmp->insert(#var_name, tmp);\\n}\n" (#define) "#define" (identifier) "SAVE_VAR" (preproc_params) "(type, var_name)" (() "(" (identifier) "type" (,) "," (identifier) "var_name" ()) ")" (preproc_arg) "{\\nauto tmp = cpptoml::make_array(); \\ntmp->push_back(std::string(#type)); \\nstd::ostringstream ss;\\nss << var_name;\\ntmp->push_back(std::string(ss.str()));\\n_tmp->insert(#var_name, tmp);\\n}" (preproc_function_def) "#define SAVE_TOML(var_name, var) \\n{\\n_tmp->insert(#var_name, var);\\n}\n" (#define) "#define" (identifier) "SAVE_TOML" (preproc_params) "(var_name, var)" (() "(" (identifier) "var_name" (,) "," (identifier) "var" ()) ")" (preproc_arg) "{\\n_tmp->insert(#var_name, var);\\n}" (preproc_function_def) "#define SAVE_VAR_INIT(type, var_name, var) var_name = var; SAVE_VAR(type, var_name);\n" (#define) "#define" (identifier) "SAVE_VAR_INIT" (preproc_params) "(type, var_name, var)" (() "(" (identifier) "type" (,) "," (identifier) "var_name" (,) "," (identifier) "var" ()) ")" (preproc_arg) "var_name = var; SAVE_VAR(type, var_name);" (function_definition) "namespace trigger\n{\n class component\n {\n protected:\n std::shared_ptr<cpptoml::table> _params;\n std::shared_ptr<cpptoml::table> _tmp;\n public:\n float time_scale = 1.0f;\n bool active = true;\n\n component()\n {\n _tmp = cpptoml::make_table();\n _params = cpptoml::make_table();\n \n SAVE_VAR(float , time_scale);\n SAVE_VAR(bool, active);\n\n _params->insert(T_CLASS, _tmp);\n }\n\n auto get_params()->decltype(_params) \n {\n return _params;\n }\n\n\n virtual void update(float delta) noexcept\n {};\n };\n}" (type_identifier) "namespace" (identifier) "trigger" (compound_statement) "{\n class component\n {\n protected:\n std::shared_ptr<cpptoml::table> _params;\n std::shared_ptr<cpptoml::table> _tmp;\n public:\n float time_scale = 1.0f;\n bool active = true;\n\n component()\n {\n _tmp = cpptoml::make_table();\n _params = cpptoml::make_table();\n \n SAVE_VAR(float , time_scale);\n SAVE_VAR(bool, active);\n\n _params->insert(T_CLASS, _tmp);\n }\n\n auto get_params()->decltype(_params) \n {\n return _params;\n }\n\n\n virtual void update(float delta) noexcept\n {};\n };\n}" ({) "{" (function_definition) "class component\n {\n protected:\n std::shared_ptr<cpptoml::table> _params;\n std::shared_ptr<cpptoml::table> _tmp;\n public:\n float time_scale = 1.0f;\n bool active = true;\n\n component()\n {\n _tmp = cpptoml::make_table();\n _params = cpptoml::make_table();\n \n SAVE_VAR(float , time_scale);\n SAVE_VAR(bool, active);\n\n _params->insert(T_CLASS, _tmp);\n }\n\n auto get_params()->decltype(_params) \n {\n return _params;\n }\n\n\n virtual void update(float delta) noexcept\n {};\n }" (type_identifier) "class" (identifier) "component" (compound_statement) "{\n protected:\n std::shared_ptr<cpptoml::table> _params;\n std::shared_ptr<cpptoml::table> _tmp;\n public:\n float time_scale = 1.0f;\n bool active = true;\n\n component()\n {\n _tmp = cpptoml::make_table();\n _params = cpptoml::make_table();\n \n SAVE_VAR(float , time_scale);\n SAVE_VAR(bool, active);\n\n _params->insert(T_CLASS, _tmp);\n }\n\n auto get_params()->decltype(_params) \n {\n return _params;\n }\n\n\n virtual void update(float delta) noexcept\n {};\n }" ({) "{" (labeled_statement) "protected:\n std::shared_ptr<cpptoml::table> _params;" (statement_identifier) "protected" (:) ":" (labeled_statement) "std::shared_ptr<cpptoml::table> _params;" (statement_identifier) "std" (ERROR) "::shared_ptr<cpptoml:" (:) ":" (:) ":" (binary_expression) "shared_ptr<cpptoml" (identifier) "shared_ptr" (<) "<" (identifier) "cpptoml" (:) ":" (:) ":" (expression_statement) "table> _params;" (binary_expression) "table> _params" (identifier) "table" (>) ">" (identifier) "_params" (;) ";" (labeled_statement) "std::shared_ptr<cpptoml::table> _tmp;" (statement_identifier) "std" (ERROR) "::shared_ptr<cpptoml:" (:) ":" (:) ":" (binary_expression) "shared_ptr<cpptoml" (identifier) "shared_ptr" (<) "<" (identifier) "cpptoml" (:) ":" (:) ":" (expression_statement) "table> _tmp;" (binary_expression) "table> _tmp" (identifier) "table" (>) ">" (identifier) "_tmp" (;) ";" (labeled_statement) "public:\n float time_scale = 1.0f;" (statement_identifier) "public" (:) ":" (declaration) "float time_scale = 1.0f;" (primitive_type) "float" (init_declarator) "time_scale = 1.0f" (identifier) "time_scale" (=) "=" (number_literal) "1.0f" (;) ";" (declaration) "bool active = true;" (primitive_type) "bool" (init_declarator) "active = true" (identifier) "active" (=) "=" (true) "true" (;) ";" (expression_statement) "component()" (call_expression) "component()" (identifier) "component" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{\n _tmp = cpptoml::make_table();\n _params = cpptoml::make_table();\n \n SAVE_VAR(float , time_scale);\n SAVE_VAR(bool, active);\n\n _params->insert(T_CLASS, _tmp);\n }" ({) "{" (ERROR) "_tmp = cpptoml::" (assignment_expression) "_tmp = cpptoml" (identifier) "_tmp" (=) "=" (identifier) "cpptoml" (:) ":" (:) ":" (expression_statement) "make_table();" (call_expression) "make_table()" (identifier) "make_table" (argument_list) "()" (() "(" ()) ")" (;) ";" (ERROR) "_params = cpptoml::" (assignment_expression) "_params = cpptoml" (identifier) "_params" (=) "=" (identifier) "cpptoml" (:) ":" (:) ":" (expression_statement) "make_table();" (call_expression) "make_table()" (identifier) "make_table" (argument_list) "()" (() "(" ()) ")" (;) ";" (expression_statement) "SAVE_VAR(float , time_scale);" (call_expression) "SAVE_VAR(float , time_scale)" (identifier) "SAVE_VAR" (argument_list) "(float , time_scale)" (() "(" (identifier) "float" (,) "," (identifier) "time_scale" ()) ")" (;) ";" (expression_statement) "SAVE_VAR(bool, active);" (call_expression) "SAVE_VAR(bool, active)" (identifier) "SAVE_VAR" (argument_list) "(bool, active)" (() "(" (identifier) "bool" (,) "," (identifier) "active" ()) ")" (;) ";" (expression_statement) "_params->insert(T_CLASS, _tmp);" (call_expression) "_params->insert(T_CLASS, _tmp)" (field_expression) "_params->insert" (identifier) "_params" (->) "->" (field_identifier) "insert" (argument_list) "(T_CLASS, _tmp)" (() "(" (identifier) "T_CLASS" (,) "," (identifier) "_tmp" ()) ")" (;) ";" (}) "}" (function_definition) "auto get_params()->decltype(_params) \n {\n return _params;\n }\n\n\n virtual void update(float delta) noexcept\n {}" (storage_class_specifier) "auto" (auto) "auto" (macro_type_specifier) "get_params()->decltype(_params) \n {\n return _params;\n }\n\n\n virtual void update(float delta)" (identifier) "get_params" (() "(" (ERROR) ")->decltype(_params) \n {\n return _params;\n }\n\n\n virtual void" ()) ")" (->) "->" (macro_type_specifier) "decltype(_params)" (identifier) "decltype" (() "(" (type_descriptor) "_params" (type_identifier) "_params" ()) ")" ({) "{" (return) "return" (type_identifier) "_params" (;) ";" (}) "}" (type_identifier) "virtual" (identifier) "void" (type_descriptor) "update(float delta)" (type_identifier) "update" (abstract_function_declarator) "(float delta)" (parameter_list) "(float delta)" (() "(" (parameter_declaration) "float delta" (primitive_type) "float" (identifier) "delta" ()) ")" ()) "" (identifier) "noexcept" (compound_statement) "{}" ({) "{" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (expression_statement) ";" (;) ";" (}) "}"
236
5
{"language": "c", "success": true, "metadata": {"lines": 49, "avg_line_length": 28.12, "nodes": 130, "errors": 0, "source_hash": "7429b7389b991ad41723ad46322583db0508c3e09a7852b76a21d58ce4bbc51a", "categorized_nodes": 86}, "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 <string>\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": "<string>", "parent": 3, "children": [], "start_point": {"row": 1, "column": 9}, "end_point": {"row": 1, "column": 17}}, {"id": 6, "type": "preproc_include", "text": "#include \"trigger_tools.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": "\"trigger_tools.h\"", "parent": 6, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 26}}, {"id": 9, "type": "preproc_include", "text": "#include \"cpptoml.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": "\"cpptoml.h\"", "parent": 9, "children": [], "start_point": {"row": 3, "column": 9}, "end_point": {"row": 3, "column": 20}}, {"id": 12, "type": "preproc_function_def", "text": "#define SAVE_VAR(type, var_name) \\\n{\\\nauto tmp = cpptoml::make_array(); \\\ntmp->push_back(std::string(#type)); \\\nstd::ostringstream ss;\\\nss << var_name;\\\ntmp->push_back(std::string(ss.str()));\\\n_tmp->insert(#var_name, tmp);\\\n}\n", "parent": null, "children": [13, 14, 15, 18], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 23, "column": 0}}, {"id": 13, "type": "#define", "text": "#define", "parent": 12, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 7}}, {"id": 14, "type": "identifier", "text": "SAVE_VAR", "parent": 12, "children": [], "start_point": {"row": 14, "column": 8}, "end_point": {"row": 14, "column": 16}}, {"id": 15, "type": "preproc_params", "text": "(type, var_name)", "parent": 12, "children": [16, 17], "start_point": {"row": 14, "column": 16}, "end_point": {"row": 14, "column": 32}}, {"id": 16, "type": "identifier", "text": "type", "parent": 15, "children": [], "start_point": {"row": 14, "column": 17}, "end_point": {"row": 14, "column": 21}}, {"id": 17, "type": "identifier", "text": "var_name", "parent": 15, "children": [], "start_point": {"row": 14, "column": 23}, "end_point": {"row": 14, "column": 31}}, {"id": 18, "type": "preproc_arg", "text": "{\\\nauto tmp = cpptoml::make_array(); \\\ntmp->push_back(std::string(#type)); \\\nstd::ostringstream ss;\\\nss << var_name;\\\ntmp->push_back(std::string(ss.str()));\\\n_tmp->insert(#var_name, tmp);\\\n}", "parent": 12, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 22, "column": 1}}, {"id": 19, "type": "preproc_function_def", "text": "#define SAVE_TOML(var_name, var) \\\n{\\\n_tmp->insert(#var_name, var);\\\n}\n", "parent": null, "children": [20, 21, 22, 24], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 28, "column": 0}}, {"id": 20, "type": "#define", "text": "#define", "parent": 19, "children": [], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 7}}, {"id": 21, "type": "identifier", "text": "SAVE_TOML", "parent": 19, "children": [], "start_point": {"row": 24, "column": 8}, "end_point": {"row": 24, "column": 17}}, {"id": 22, "type": "preproc_params", "text": "(var_name, var)", "parent": 19, "children": [23], "start_point": {"row": 24, "column": 17}, "end_point": {"row": 24, "column": 32}}, {"id": 23, "type": "identifier", "text": "var_name", "parent": 22, "children": [], "start_point": {"row": 24, "column": 18}, "end_point": {"row": 24, "column": 26}}, {"id": 24, "type": "preproc_arg", "text": "{\\\n_tmp->insert(#var_name, var);\\\n}", "parent": 19, "children": [], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 27, "column": 1}}, {"id": 25, "type": "preproc_function_def", "text": "#define SAVE_VAR_INIT(type, var_name, var) var_name = var; SAVE_VAR(type, var_name);\n", "parent": null, "children": [26, 27, 28, 31], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 30, "column": 0}}, {"id": 26, "type": "#define", "text": "#define", "parent": 25, "children": [], "start_point": {"row": 29, "column": 0}, "end_point": {"row": 29, "column": 7}}, {"id": 27, "type": "identifier", "text": "SAVE_VAR_INIT", "parent": 25, "children": [], "start_point": {"row": 29, "column": 8}, "end_point": {"row": 29, "column": 21}}, {"id": 28, "type": "preproc_params", "text": "(type, var_name, var)", "parent": 25, "children": [29, 30], "start_point": {"row": 29, "column": 21}, "end_point": {"row": 29, "column": 42}}, {"id": 29, "type": "identifier", "text": "type", "parent": 28, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 26}}, {"id": 30, "type": "identifier", "text": "var_name", "parent": 28, "children": [], "start_point": {"row": 29, "column": 28}, "end_point": {"row": 29, "column": 36}}, {"id": 31, "type": "preproc_arg", "text": "var_name = var; SAVE_VAR(type, var_name);", "parent": 25, "children": [], "start_point": {"row": 29, "column": 43}, "end_point": {"row": 29, "column": 84}}, {"id": 32, "type": "function_definition", "text": "namespace trigger\n{\n\tclass component\n\t{\n\tprotected:\n\t\tstd::shared_ptr<cpptoml::table> _params;\n\t\tstd::shared_ptr<cpptoml::table> _tmp;\n\tpublic:\n\t\tfloat time_scale = 1.0f;\n\t\tbool active = true;\n\n\t\tcomponent()\n\t\t{\n\t\t\t_tmp = cpptoml::make_table();\n\t\t\t_params = cpptoml::make_table();\n\t\t\t\n\t\t\tSAVE_VAR(float , time_scale);\n\t\t\tSAVE_VAR(bool, active);\n\n\t\t\t_params->insert(T_CLASS, _tmp);\n\t\t}\n\n\t\tauto get_params()->decltype(_params) \n\t\t{\n\t\t\treturn _params;\n\t\t}\n\n\n\t\tvirtual void update(float delta) noexcept\n\t\t{};\n\t};\n}", "parent": null, "children": [33, 34], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 62, "column": 1}}, {"id": 33, "type": "type_identifier", "text": "namespace", "parent": 32, "children": [], "start_point": {"row": 31, "column": 0}, "end_point": {"row": 31, "column": 9}}, {"id": 34, "type": "identifier", "text": "trigger", "parent": 32, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 17}}, {"id": 35, "type": "function_definition", "text": "class component\n\t{\n\tprotected:\n\t\tstd::shared_ptr<cpptoml::table> _params;\n\t\tstd::shared_ptr<cpptoml::table> _tmp;\n\tpublic:\n\t\tfloat time_scale = 1.0f;\n\t\tbool active = true;\n\n\t\tcomponent()\n\t\t{\n\t\t\t_tmp = cpptoml::make_table();\n\t\t\t_params = cpptoml::make_table();\n\t\t\t\n\t\t\tSAVE_VAR(float , time_scale);\n\t\t\tSAVE_VAR(bool, active);\n\n\t\t\t_params->insert(T_CLASS, _tmp);\n\t\t}\n\n\t\tauto get_params()->decltype(_params) \n\t\t{\n\t\t\treturn _params;\n\t\t}\n\n\n\t\tvirtual void update(float delta) noexcept\n\t\t{};\n\t}", "parent": 32, "children": [36], "start_point": {"row": 33, "column": 1}, "end_point": {"row": 61, "column": 2}}, {"id": 36, "type": "identifier", "text": "component", "parent": 35, "children": [], "start_point": {"row": 33, "column": 7}, "end_point": {"row": 33, "column": 16}}, {"id": 37, "type": "labeled_statement", "text": "protected:\n\t\tstd::shared_ptr<cpptoml::table> _params;", "parent": 35, "children": [38], "start_point": {"row": 35, "column": 1}, "end_point": {"row": 36, "column": 42}}, {"id": 38, "type": "labeled_statement", "text": "std::shared_ptr<cpptoml::table> _params;", "parent": 37, "children": [39, 40], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 42}}, {"id": 39, "type": "statement_identifier", "text": "std", "parent": 38, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 5}}, {"id": 40, "type": "ERROR", "text": "::shared_ptr<cpptoml:", "parent": 38, "children": [41], "start_point": {"row": 36, "column": 5}, "end_point": {"row": 36, "column": 26}}, {"id": 41, "type": "binary_expression", "text": "shared_ptr<cpptoml", "parent": 40, "children": [42, 43, 44], "start_point": {"row": 36, "column": 7}, "end_point": {"row": 36, "column": 25}}, {"id": 42, "type": "identifier", "text": "shared_ptr", "parent": 41, "children": [], "start_point": {"row": 36, "column": 7}, "end_point": {"row": 36, "column": 17}}, {"id": 43, "type": "<", "text": "<", "parent": 41, "children": [], "start_point": {"row": 36, "column": 17}, "end_point": {"row": 36, "column": 18}}, {"id": 44, "type": "identifier", "text": "cpptoml", "parent": 41, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 25}}, {"id": 45, "type": "binary_expression", "text": "table> _params", "parent": 38, "children": [46, 47, 48], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 41}}, {"id": 46, "type": "identifier", "text": "table", "parent": 45, "children": [], "start_point": {"row": 36, "column": 27}, "end_point": {"row": 36, "column": 32}}, {"id": 47, "type": ">", "text": ">", "parent": 45, "children": [], "start_point": {"row": 36, "column": 32}, "end_point": {"row": 36, "column": 33}}, {"id": 48, "type": "identifier", "text": "_params", "parent": 45, "children": [], "start_point": {"row": 36, "column": 34}, "end_point": {"row": 36, "column": 41}}, {"id": 49, "type": "labeled_statement", "text": "std::shared_ptr<cpptoml::table> _tmp;", "parent": 35, "children": [50, 51], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 39}}, {"id": 50, "type": "statement_identifier", "text": "std", "parent": 49, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 5}}, {"id": 51, "type": "ERROR", "text": "::shared_ptr<cpptoml:", "parent": 49, "children": [52], "start_point": {"row": 37, "column": 5}, "end_point": {"row": 37, "column": 26}}, {"id": 52, "type": "binary_expression", "text": "shared_ptr<cpptoml", "parent": 51, "children": [53, 54, 55], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 25}}, {"id": 53, "type": "identifier", "text": "shared_ptr", "parent": 52, "children": [], "start_point": {"row": 37, "column": 7}, "end_point": {"row": 37, "column": 17}}, {"id": 54, "type": "<", "text": "<", "parent": 52, "children": [], "start_point": {"row": 37, "column": 17}, "end_point": {"row": 37, "column": 18}}, {"id": 55, "type": "identifier", "text": "cpptoml", "parent": 52, "children": [], "start_point": {"row": 37, "column": 18}, "end_point": {"row": 37, "column": 25}}, {"id": 56, "type": "binary_expression", "text": "table> _tmp", "parent": 49, "children": [57, 58, 59], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 38}}, {"id": 57, "type": "identifier", "text": "table", "parent": 56, "children": [], "start_point": {"row": 37, "column": 27}, "end_point": {"row": 37, "column": 32}}, {"id": 58, "type": ">", "text": ">", "parent": 56, "children": [], "start_point": {"row": 37, "column": 32}, "end_point": {"row": 37, "column": 33}}, {"id": 59, "type": "identifier", "text": "_tmp", "parent": 56, "children": [], "start_point": {"row": 37, "column": 34}, "end_point": {"row": 37, "column": 38}}, {"id": 60, "type": "labeled_statement", "text": "public:\n\t\tfloat time_scale = 1.0f;", "parent": 35, "children": [61], "start_point": {"row": 38, "column": 1}, "end_point": {"row": 39, "column": 26}}, {"id": 61, "type": "declaration", "text": "float time_scale = 1.0f;", "parent": 60, "children": [62, 63], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 26}}, {"id": 62, "type": "primitive_type", "text": "float", "parent": 61, "children": [], "start_point": {"row": 39, "column": 2}, "end_point": {"row": 39, "column": 7}}, {"id": 63, "type": "init_declarator", "text": "time_scale = 1.0f", "parent": 61, "children": [64, 65, 66], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 25}}, {"id": 64, "type": "identifier", "text": "time_scale", "parent": 63, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 18}}, {"id": 65, "type": "=", "text": "=", "parent": 63, "children": [], "start_point": {"row": 39, "column": 19}, "end_point": {"row": 39, "column": 20}}, {"id": 66, "type": "number_literal", "text": "1.0f", "parent": 63, "children": [], "start_point": {"row": 39, "column": 21}, "end_point": {"row": 39, "column": 25}}, {"id": 67, "type": "declaration", "text": "bool active = true;", "parent": 35, "children": [68, 69], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 21}}, {"id": 68, "type": "primitive_type", "text": "bool", "parent": 67, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 6}}, {"id": 69, "type": "init_declarator", "text": "active = true", "parent": 67, "children": [70, 71, 72], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 20}}, {"id": 70, "type": "identifier", "text": "active", "parent": 69, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 13}}, {"id": 71, "type": "=", "text": "=", "parent": 69, "children": [], "start_point": {"row": 40, "column": 14}, "end_point": {"row": 40, "column": 15}}, {"id": 72, "type": "true", "text": "true", "parent": 69, "children": [], "start_point": {"row": 40, "column": 16}, "end_point": {"row": 40, "column": 20}}, {"id": 73, "type": "call_expression", "text": "component()", "parent": 35, "children": [74, 75], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 13}}, {"id": 74, "type": "identifier", "text": "component", "parent": 73, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 11}}, {"id": 75, "type": "argument_list", "text": "()", "parent": 73, "children": [], "start_point": {"row": 42, "column": 11}, "end_point": {"row": 42, "column": 13}}, {"id": 76, "type": "ERROR", "text": "_tmp = cpptoml::", "parent": 35, "children": [77], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 19}}, {"id": 77, "type": "assignment_expression", "text": "_tmp = cpptoml", "parent": 76, "children": [78, 79, 80], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 17}}, {"id": 78, "type": "identifier", "text": "_tmp", "parent": 77, "children": [], "start_point": {"row": 44, "column": 3}, "end_point": {"row": 44, "column": 7}}, {"id": 79, "type": "=", "text": "=", "parent": 77, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 9}}, {"id": 80, "type": "identifier", "text": "cpptoml", "parent": 77, "children": [], "start_point": {"row": 44, "column": 10}, "end_point": {"row": 44, "column": 17}}, {"id": 81, "type": "call_expression", "text": "make_table()", "parent": 35, "children": [82, 83], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 31}}, {"id": 82, "type": "identifier", "text": "make_table", "parent": 81, "children": [], "start_point": {"row": 44, "column": 19}, "end_point": {"row": 44, "column": 29}}, {"id": 83, "type": "argument_list", "text": "()", "parent": 81, "children": [], "start_point": {"row": 44, "column": 29}, "end_point": {"row": 44, "column": 31}}, {"id": 84, "type": "ERROR", "text": "_params = cpptoml::", "parent": 35, "children": [85], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 22}}, {"id": 85, "type": "assignment_expression", "text": "_params = cpptoml", "parent": 84, "children": [86, 87, 88], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 20}}, {"id": 86, "type": "identifier", "text": "_params", "parent": 85, "children": [], "start_point": {"row": 45, "column": 3}, "end_point": {"row": 45, "column": 10}}, {"id": 87, "type": "=", "text": "=", "parent": 85, "children": [], "start_point": {"row": 45, "column": 11}, "end_point": {"row": 45, "column": 12}}, {"id": 88, "type": "identifier", "text": "cpptoml", "parent": 85, "children": [], "start_point": {"row": 45, "column": 13}, "end_point": {"row": 45, "column": 20}}, {"id": 89, "type": "call_expression", "text": "make_table()", "parent": 35, "children": [90, 91], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 34}}, {"id": 90, "type": "identifier", "text": "make_table", "parent": 89, "children": [], "start_point": {"row": 45, "column": 22}, "end_point": {"row": 45, "column": 32}}, {"id": 91, "type": "argument_list", "text": "()", "parent": 89, "children": [], "start_point": {"row": 45, "column": 32}, "end_point": {"row": 45, "column": 34}}, {"id": 92, "type": "call_expression", "text": "SAVE_VAR(float , time_scale)", "parent": 35, "children": [93, 94], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 31}}, {"id": 93, "type": "identifier", "text": "SAVE_VAR", "parent": 92, "children": [], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 47, "column": 11}}, {"id": 94, "type": "argument_list", "text": "(float , time_scale)", "parent": 92, "children": [95, 96], "start_point": {"row": 47, "column": 11}, "end_point": {"row": 47, "column": 31}}, {"id": 95, "type": "identifier", "text": "float", "parent": 94, "children": [], "start_point": {"row": 47, "column": 12}, "end_point": {"row": 47, "column": 17}}, {"id": 96, "type": "identifier", "text": "time_scale", "parent": 94, "children": [], "start_point": {"row": 47, "column": 20}, "end_point": {"row": 47, "column": 30}}, {"id": 97, "type": "call_expression", "text": "SAVE_VAR(bool, active)", "parent": 35, "children": [98, 99], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 48, "column": 25}}, {"id": 98, "type": "identifier", "text": "SAVE_VAR", "parent": 97, "children": [], "start_point": {"row": 48, "column": 3}, "end_point": {"row": 48, "column": 11}}, {"id": 99, "type": "argument_list", "text": "(bool, active)", "parent": 97, "children": [100, 101], "start_point": {"row": 48, "column": 11}, "end_point": {"row": 48, "column": 25}}, {"id": 100, "type": "identifier", "text": "bool", "parent": 99, "children": [], "start_point": {"row": 48, "column": 12}, "end_point": {"row": 48, "column": 16}}, {"id": 101, "type": "identifier", "text": "active", "parent": 99, "children": [], "start_point": {"row": 48, "column": 18}, "end_point": {"row": 48, "column": 24}}, {"id": 102, "type": "call_expression", "text": "_params->insert(T_CLASS, _tmp)", "parent": 35, "children": [103, 106], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 33}}, {"id": 103, "type": "field_expression", "text": "_params->insert", "parent": 102, "children": [104, 105], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 18}}, {"id": 104, "type": "identifier", "text": "_params", "parent": 103, "children": [], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 10}}, {"id": 105, "type": "field_identifier", "text": "insert", "parent": 103, "children": [], "start_point": {"row": 50, "column": 12}, "end_point": {"row": 50, "column": 18}}, {"id": 106, "type": "argument_list", "text": "(T_CLASS, _tmp)", "parent": 102, "children": [107, 108], "start_point": {"row": 50, "column": 18}, "end_point": {"row": 50, "column": 33}}, {"id": 107, "type": "identifier", "text": "T_CLASS", "parent": 106, "children": [], "start_point": {"row": 50, "column": 19}, "end_point": {"row": 50, "column": 26}}, {"id": 108, "type": "identifier", "text": "_tmp", "parent": 106, "children": [], "start_point": {"row": 50, "column": 28}, "end_point": {"row": 50, "column": 32}}, {"id": 109, "type": "function_definition", "text": "auto get_params()->decltype(_params) \n\t\t{\n\t\t\treturn _params;\n\t\t}\n\n\n\t\tvirtual void update(float delta) noexcept\n\t\t{}", "parent": 35, "children": [110, 112, 129], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 60, "column": 4}}, {"id": 110, "type": "storage_class_specifier", "text": "auto", "parent": 109, "children": [111], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 6}}, {"id": 111, "type": "auto", "text": "auto", "parent": 110, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 6}}, {"id": 112, "type": "macro_type_specifier", "text": "get_params()->decltype(_params) \n\t\t{\n\t\t\treturn _params;\n\t\t}\n\n\n\t\tvirtual void update(float delta)", "parent": 109, "children": [113, 114, 122], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 59, "column": 34}}, {"id": 113, "type": "identifier", "text": "get_params", "parent": 112, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 17}}, {"id": 114, "type": "ERROR", "text": ")->decltype(_params) \n\t\t{\n\t\t\treturn _params;\n\t\t}\n\n\n\t\tvirtual void", "parent": 112, "children": [115, 119, 120, 121], "start_point": {"row": 53, "column": 18}, "end_point": {"row": 59, "column": 14}}, {"id": 115, "type": "macro_type_specifier", "text": "decltype(_params)", "parent": 114, "children": [116, 117], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 38}}, {"id": 116, "type": "identifier", "text": "decltype", "parent": 115, "children": [], "start_point": {"row": 53, "column": 21}, "end_point": {"row": 53, "column": 29}}, {"id": 117, "type": "type_descriptor", "text": "_params", "parent": 115, "children": [118], "start_point": {"row": 53, "column": 30}, "end_point": {"row": 53, "column": 37}}, {"id": 118, "type": "type_identifier", "text": "_params", "parent": 117, "children": [], "start_point": {"row": 53, "column": 30}, "end_point": {"row": 53, "column": 37}}, {"id": 119, "type": "type_identifier", "text": "_params", "parent": 114, "children": [], "start_point": {"row": 55, "column": 10}, "end_point": {"row": 55, "column": 17}}, {"id": 120, "type": "type_identifier", "text": "virtual", "parent": 114, "children": [], "start_point": {"row": 59, "column": 2}, "end_point": {"row": 59, "column": 9}}, {"id": 121, "type": "identifier", "text": "void", "parent": 114, "children": [], "start_point": {"row": 59, "column": 10}, "end_point": {"row": 59, "column": 14}}, {"id": 122, "type": "type_descriptor", "text": "update(float delta)", "parent": 112, "children": [123, 124], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 34}}, {"id": 123, "type": "type_identifier", "text": "update", "parent": 122, "children": [], "start_point": {"row": 59, "column": 15}, "end_point": {"row": 59, "column": 21}}, {"id": 124, "type": "abstract_function_declarator", "text": "(float delta)", "parent": 122, "children": [125], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 34}}, {"id": 125, "type": "parameter_list", "text": "(float delta)", "parent": 124, "children": [126], "start_point": {"row": 59, "column": 21}, "end_point": {"row": 59, "column": 34}}, {"id": 126, "type": "parameter_declaration", "text": "float delta", "parent": 125, "children": [127, 128], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 33}}, {"id": 127, "type": "primitive_type", "text": "float", "parent": 126, "children": [], "start_point": {"row": 59, "column": 22}, "end_point": {"row": 59, "column": 27}}, {"id": 128, "type": "identifier", "text": "delta", "parent": 126, "children": [], "start_point": {"row": 59, "column": 28}, "end_point": {"row": 59, "column": 33}}, {"id": 129, "type": "identifier", "text": "noexcept", "parent": 109, "children": [], "start_point": {"row": 59, "column": 35}, "end_point": {"row": 59, "column": 43}}]}, "node_categories": {"declarations": {"functions": [12, 19, 25, 32, 35, 109, 124], "variables": [61, 67, 126], "classes": [110], "imports": [3, 4, 6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [41, 45, 52, 56, 73, 81, 89, 92, 97, 102, 103], "assignments": [77, 85], "loops": [], "conditionals": [14, 16, 17, 21, 23, 27, 29, 30, 33, 34, 36, 39, 42, 44, 46, 48, 50, 53, 55, 57, 59, 64, 70, 74, 78, 80, 82, 86, 88, 90, 93, 95, 96, 98, 100, 101, 104, 105, 107, 108, 112, 113, 115, 116, 118, 119, 120, 121, 123, 128, 129], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 8, 11, 66], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "unknown", "text_snippet": "#define SAVE_VAR(type, var_name) \\\n{\\\nauto tmp = cpptoml::make_array(); \\\ntmp->push_back(std::string"}, {"node_id": 19, "universal_type": "function", "name": "unknown", "text_snippet": "#define SAVE_TOML(var_name, var) \\\n{\\\n_tmp->insert(#var_name, var);\\\n}\n"}, {"node_id": 25, "universal_type": "function", "name": "unknown", "text_snippet": "#define SAVE_VAR_INIT(type, var_name, var) var_name = var; SAVE_VAR(type, var_name);\n"}, {"node_id": 32, "universal_type": "function", "name": "component", "text_snippet": "namespace trigger\n{\n\tclass component\n\t{\n\tprotected:\n\t\tstd::shared_ptr<cpptoml::table> _params;\n\t\tstd"}, {"node_id": 35, "universal_type": "function", "name": "component", "text_snippet": "class component\n\t{\n\tprotected:\n\t\tstd::shared_ptr<cpptoml::table> _params;\n\t\tstd::shared_ptr<cpptoml:"}, {"node_id": 109, "universal_type": "function", "name": "update", "text_snippet": "auto get_params()->decltype(_params) \n\t\t{\n\t\t\treturn _params;\n\t\t}\n\n\n\t\tvirtual void update(float delta"}, {"node_id": 124, "universal_type": "function", "name": "unknown", "text_snippet": "(float delta)"}], "class_declarations": [{"node_id": 110, "universal_type": "class", "name": "unknown", "text_snippet": "auto"}], "import_statements": [{"node_id": 3, "text": "#include <string>\n"}, {"node_id": 4, "text": "#include"}, {"node_id": 6, "text": "#include \"trigger_tools.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"cpptoml.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "#pragma once\n#include <string>\n#include \"trigger_tools.h\"\n#include \"cpptoml.h\"\n\n//TODO:: Add using macro in import * export component_world's code. \n\n// Add name in Component List\n// When Component Destroy or Save timing, U Can Use this Macro!\n// if registed this component in WorldsUpdateList, this _component are Saving data in file.\n// if u dont want save components data? dont call macro in that variable.\n// so that list can be import & export names value like {\"type\", \"value\"}\n// name = value name\n// value = name's value\n#define SAVE_VAR(type, var_name) \\\n{\\\nauto tmp = cpptoml::make_array(); \\\ntmp->push_back(std::string(#type)); \\\nstd::ostringstream ss;\\\nss << var_name;\\\ntmp->push_back(std::string(ss.str()));\\\n_tmp->insert(#var_name, tmp);\\\n}\n\n#define SAVE_TOML(var_name, var) \\\n{\\\n_tmp->insert(#var_name, var);\\\n}\n\n#define SAVE_VAR_INIT(type, var_name, var) var_name = var; SAVE_VAR(type, var_name);\n\nnamespace trigger\n{\n\tclass component\n\t{\n\tprotected:\n\t\tstd::shared_ptr<cpptoml::table> _params;\n\t\tstd::shared_ptr<cpptoml::table> _tmp;\n\tpublic:\n\t\tfloat time_scale = 1.0f;\n\t\tbool active = true;\n\n\t\tcomponent()\n\t\t{\n\t\t\t_tmp = cpptoml::make_table();\n\t\t\t_params = cpptoml::make_table();\n\t\t\t\n\t\t\tSAVE_VAR(float , time_scale);\n\t\t\tSAVE_VAR(bool, active);\n\n\t\t\t_params->insert(T_CLASS, _tmp);\n\t\t}\n\n\t\tauto get_params()->decltype(_params) \n\t\t{\n\t\t\treturn _params;\n\t\t}\n\n\n\t\tvirtual void update(float delta) noexcept\n\t\t{};\n\t};\n}\n"}
92
c
#pragma once #include "glm/glm.hpp" struct Particle { glm::vec3 pos; glm::vec3 speed; float life = 0.0f; // Remaining life of the particle. if <= 0: unused / dead. float squared_cam_distance = 1.0f; // -1.0 if dead bool operator<(const Particle& that) const { return this->life < that.life; } };
24.54
13
(translation_unit) "#pragma once\n\n#include "glm/glm.hpp"\n\nstruct Particle\n{\n glm::vec3 pos;\n glm::vec3 speed;\n float life = 0.0f; // Remaining life of the particle. if <= 0: unused / dead.\n float squared_cam_distance = 1.0f; // -1.0 if dead\n\n bool operator<(const Particle& that) const\n {\n return this->life < that.life;\n }\n};\n" (preproc_call) "#pragma once\n" (preproc_directive) "#pragma" (preproc_arg) "once" (preproc_include) "#include "glm/glm.hpp"\n" (#include) "#include" (string_literal) ""glm/glm.hpp"" (") """ (string_content) "glm/glm.hpp" (") """ (struct_specifier) "struct Particle\n{\n glm::vec3 pos;\n glm::vec3 speed;\n float life = 0.0f; // Remaining life of the particle. if <= 0: unused / dead.\n float squared_cam_distance = 1.0f; // -1.0 if dead\n\n bool operator<(const Particle& that) const\n {\n return this->life < that.life;\n }" (struct) "struct" (type_identifier) "Particle" (field_declaration_list) "{\n glm::vec3 pos;\n glm::vec3 speed;\n float life = 0.0f; // Remaining life of the particle. if <= 0: unused / dead.\n float squared_cam_distance = 1.0f; // -1.0 if dead\n\n bool operator<(const Particle& that) const\n {\n return this->life < that.life;\n }" ({) "{" (field_declaration) "glm::vec3 pos;" (type_identifier) "glm" (ERROR) "::vec3" (:) ":" (:) ":" (field_identifier) "vec3" (field_identifier) "pos" (;) ";" (field_declaration) "glm::vec3 speed;" (type_identifier) "glm" (ERROR) "::vec3" (:) ":" (:) ":" (field_identifier) "vec3" (field_identifier) "speed" (;) ";" (field_declaration) "float life = 0.0f;" (primitive_type) "float" (field_identifier) "life" (ERROR) "= 0.0f" (=) "=" (number_literal) "0.0f" (;) ";" (comment) "// Remaining life of the particle. if <= 0: unused / dead." (field_declaration) "float squared_cam_distance = 1.0f;" (primitive_type) "float" (field_identifier) "squared_cam_distance" (ERROR) "= 1.0f" (=) "=" (number_literal) "1.0f" (;) ";" (comment) "// -1.0 if dead" (ERROR) "bool operator<(const Particle& that)" (primitive_type) "bool" (field_identifier) "operator" (<) "<" (() "(" (type_qualifier) "const" (const) "const" (type_identifier) "Particle" (ERROR) "&" (&) "&" (field_identifier) "that" ()) ")" (field_declaration) "const\n {\n return this->life < that.life;" (type_qualifier) "const" (const) "const" (ERROR) "{\n return" ({) "{" (return) "return" (type_identifier) "this" (ERROR) "->life < that." (->) "->" (field_identifier) "life" (<) "<" (field_identifier) "that" (.) "." (field_identifier) "life" (;) ";" (}) "}" (ERROR) "}" (}) "}" (;) ";"
78
9
{"language": "c", "success": true, "metadata": {"lines": 13, "avg_line_length": 24.54, "nodes": 45, "errors": 0, "source_hash": "aa5e953a7075855e3327cfa0d41093152ef541a523fc734a04dfa82396f350a8", "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": 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 \"glm/glm.hpp\"\n", "parent": null, "children": [4, 5], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 3, "column": 0}}, {"id": 4, "type": "#include", "text": "#include", "parent": 3, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 8}}, {"id": 5, "type": "string_literal", "text": "\"glm/glm.hpp\"", "parent": 3, "children": [], "start_point": {"row": 2, "column": 9}, "end_point": {"row": 2, "column": 22}}, {"id": 6, "type": "struct_specifier", "text": "struct Particle\n{\n glm::vec3 pos;\n glm::vec3 speed;\n float life = 0.0f; // Remaining life of the particle. if <= 0: unused / dead.\n float squared_cam_distance = 1.0f; // -1.0 if dead\n\n bool operator<(const Particle& that) const\n {\n return this->life < that.life;\n }", "parent": null, "children": [7, 8], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 14, "column": 5}}, {"id": 7, "type": "struct", "text": "struct", "parent": 6, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 8, "type": "type_identifier", "text": "Particle", "parent": 6, "children": [], "start_point": {"row": 4, "column": 7}, "end_point": {"row": 4, "column": 15}}, {"id": 9, "type": "field_declaration", "text": "glm::vec3 pos;", "parent": 6, "children": [10, 11, 13], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 18}}, {"id": 10, "type": "type_identifier", "text": "glm", "parent": 9, "children": [], "start_point": {"row": 6, "column": 4}, "end_point": {"row": 6, "column": 7}}, {"id": 11, "type": "ERROR", "text": "::vec3", "parent": 9, "children": [12], "start_point": {"row": 6, "column": 7}, "end_point": {"row": 6, "column": 13}}, {"id": 12, "type": "field_identifier", "text": "vec3", "parent": 11, "children": [], "start_point": {"row": 6, "column": 9}, "end_point": {"row": 6, "column": 13}}, {"id": 13, "type": "field_identifier", "text": "pos", "parent": 9, "children": [], "start_point": {"row": 6, "column": 14}, "end_point": {"row": 6, "column": 17}}, {"id": 14, "type": "field_declaration", "text": "glm::vec3 speed;", "parent": 6, "children": [15, 16, 18], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 20}}, {"id": 15, "type": "type_identifier", "text": "glm", "parent": 14, "children": [], "start_point": {"row": 7, "column": 4}, "end_point": {"row": 7, "column": 7}}, {"id": 16, "type": "ERROR", "text": "::vec3", "parent": 14, "children": [17], "start_point": {"row": 7, "column": 7}, "end_point": {"row": 7, "column": 13}}, {"id": 17, "type": "field_identifier", "text": "vec3", "parent": 16, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 13}}, {"id": 18, "type": "field_identifier", "text": "speed", "parent": 14, "children": [], "start_point": {"row": 7, "column": 14}, "end_point": {"row": 7, "column": 19}}, {"id": 19, "type": "field_declaration", "text": "float life = 0.0f;", "parent": 6, "children": [20, 21, 22], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 22}}, {"id": 20, "type": "primitive_type", "text": "float", "parent": 19, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 9}}, {"id": 21, "type": "field_identifier", "text": "life", "parent": 19, "children": [], "start_point": {"row": 8, "column": 10}, "end_point": {"row": 8, "column": 14}}, {"id": 22, "type": "ERROR", "text": "= 0.0f", "parent": 19, "children": [23, 24], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 21}}, {"id": 23, "type": "=", "text": "=", "parent": 22, "children": [], "start_point": {"row": 8, "column": 15}, "end_point": {"row": 8, "column": 16}}, {"id": 24, "type": "number_literal", "text": "0.0f", "parent": 22, "children": [], "start_point": {"row": 8, "column": 17}, "end_point": {"row": 8, "column": 21}}, {"id": 25, "type": "field_declaration", "text": "float squared_cam_distance = 1.0f;", "parent": 6, "children": [26, 27, 28], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 38}}, {"id": 26, "type": "primitive_type", "text": "float", "parent": 25, "children": [], "start_point": {"row": 9, "column": 4}, "end_point": {"row": 9, "column": 9}}, {"id": 27, "type": "field_identifier", "text": "squared_cam_distance", "parent": 25, "children": [], "start_point": {"row": 9, "column": 10}, "end_point": {"row": 9, "column": 30}}, {"id": 28, "type": "ERROR", "text": "= 1.0f", "parent": 25, "children": [29, 30], "start_point": {"row": 9, "column": 31}, "end_point": {"row": 9, "column": 37}}, {"id": 29, "type": "=", "text": "=", "parent": 28, "children": [], "start_point": {"row": 9, "column": 31}, "end_point": {"row": 9, "column": 32}}, {"id": 30, "type": "number_literal", "text": "1.0f", "parent": 28, "children": [], "start_point": {"row": 9, "column": 33}, "end_point": {"row": 9, "column": 37}}, {"id": 31, "type": "ERROR", "text": "bool operator<(const Particle& that)", "parent": 6, "children": [32, 33, 34, 35, 36], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 40}}, {"id": 32, "type": "primitive_type", "text": "bool", "parent": 31, "children": [], "start_point": {"row": 11, "column": 4}, "end_point": {"row": 11, "column": 8}}, {"id": 33, "type": "field_identifier", "text": "operator", "parent": 31, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 17}}, {"id": 34, "type": "<", "text": "<", "parent": 31, "children": [], "start_point": {"row": 11, "column": 17}, "end_point": {"row": 11, "column": 18}}, {"id": 35, "type": "type_identifier", "text": "Particle", "parent": 31, "children": [], "start_point": {"row": 11, "column": 25}, "end_point": {"row": 11, "column": 33}}, {"id": 36, "type": "field_identifier", "text": "that", "parent": 31, "children": [], "start_point": {"row": 11, "column": 35}, "end_point": {"row": 11, "column": 39}}, {"id": 37, "type": "field_declaration", "text": "const\n {\n return this->life < that.life;", "parent": 6, "children": [38, 39, 40, 44], "start_point": {"row": 11, "column": 41}, "end_point": {"row": 13, "column": 38}}, {"id": 38, "type": "ERROR", "text": "{\n return", "parent": 37, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 13, "column": 14}}, {"id": 39, "type": "type_identifier", "text": "this", "parent": 37, "children": [], "start_point": {"row": 13, "column": 15}, "end_point": {"row": 13, "column": 19}}, {"id": 40, "type": "ERROR", "text": "->life < that.", "parent": 37, "children": [41, 42, 43], "start_point": {"row": 13, "column": 19}, "end_point": {"row": 13, "column": 33}}, {"id": 41, "type": "field_identifier", "text": "life", "parent": 40, "children": [], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 25}}, {"id": 42, "type": "<", "text": "<", "parent": 40, "children": [], "start_point": {"row": 13, "column": 26}, "end_point": {"row": 13, "column": 27}}, {"id": 43, "type": "field_identifier", "text": "that", "parent": 40, "children": [], "start_point": {"row": 13, "column": 28}, "end_point": {"row": 13, "column": 32}}, {"id": 44, "type": "field_identifier", "text": "life", "parent": 37, "children": [], "start_point": {"row": 13, "column": 33}, "end_point": {"row": 13, "column": 37}}]}, "node_categories": {"declarations": {"functions": [], "variables": [9, 14, 19, 25, 37], "classes": [6, 7], "imports": [3, 4], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [8, 10, 12, 13, 15, 17, 18, 21, 27, 33, 35, 36, 39, 41, 43, 44], "returns": [], "exceptions": []}, "expressions": {"calls": [0], "literals": [5, 24, 30], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [{"node_id": 6, "universal_type": "class", "name": "Particle", "text_snippet": "struct Particle\n{\n glm::vec3 pos;\n glm::vec3 speed;\n float life = 0.0f; // Remaining life o"}, {"node_id": 7, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": [{"node_id": 3, "text": "#include \"glm/glm.hpp\"\n"}, {"node_id": 4, "text": "#include"}]}, "original_source_code": "#pragma once\n\n#include \"glm/glm.hpp\"\n\nstruct Particle\n{\n glm::vec3 pos;\n glm::vec3 speed;\n float life = 0.0f; // Remaining life of the particle. if <= 0: unused / dead.\n float squared_cam_distance = 1.0f; // -1.0 if dead\n\n bool operator<(const Particle& that) const\n {\n return this->life < that.life;\n }\n};\n"}
93
c
#ifndef CGL_UTILS_H #define CGL_UTILS_H typedef struct cgl_point { float x; float y; } CGL_Point_t; int CGL_UTILS_ORIENTATION(CGL_Point_t a, CGL_Point_t b, CGL_Point_t p); #endif /* CGL_UTILS_H */
24.12
8
(translation_unit) "#ifndef CGL_UTILS_H\n#define CGL_UTILS_H\n\ntypedef struct cgl_point {\n float x;\n float y;\n} CGL_Point_t;\n\nint CGL_UTILS_ORIENTATION(CGL_Point_t a, CGL_Point_t b, CGL_Point_t p);\n\n#endif /* CGL_UTILS_H */\n" (preproc_ifdef) "#ifndef CGL_UTILS_H\n#define CGL_UTILS_H\n\ntypedef struct cgl_point {\n float x;\n float y;\n} CGL_Point_t;\n\nint CGL_UTILS_ORIENTATION(CGL_Point_t a, CGL_Point_t b, CGL_Point_t p);\n\n#endif" (#ifndef) "#ifndef" (identifier) "CGL_UTILS_H" (preproc_def) "#define CGL_UTILS_H\n" (#define) "#define" (identifier) "CGL_UTILS_H" (type_definition) "typedef struct cgl_point {\n float x;\n float y;\n} CGL_Point_t;" (typedef) "typedef" (struct_specifier) "struct cgl_point {\n float x;\n float y;\n}" (struct) "struct" (type_identifier) "cgl_point" (field_declaration_list) "{\n float x;\n float y;\n}" ({) "{" (field_declaration) "float x;" (primitive_type) "float" (field_identifier) "x" (;) ";" (field_declaration) "float y;" (primitive_type) "float" (field_identifier) "y" (;) ";" (}) "}" (type_identifier) "CGL_Point_t" (;) ";" (declaration) "int CGL_UTILS_ORIENTATION(CGL_Point_t a, CGL_Point_t b, CGL_Point_t p);" (primitive_type) "int" (function_declarator) "CGL_UTILS_ORIENTATION(CGL_Point_t a, CGL_Point_t b, CGL_Point_t p)" (identifier) "CGL_UTILS_ORIENTATION" (parameter_list) "(CGL_Point_t a, CGL_Point_t b, CGL_Point_t p)" (() "(" (parameter_declaration) "CGL_Point_t a" (type_identifier) "CGL_Point_t" (identifier) "a" (,) "," (parameter_declaration) "CGL_Point_t b" (type_identifier) "CGL_Point_t" (identifier) "b" (,) "," (parameter_declaration) "CGL_Point_t p" (type_identifier) "CGL_Point_t" (identifier) "p" ()) ")" (;) ";" (#endif) "#endif" (comment) "/* CGL_UTILS_H */"
46
0
{"language": "c", "success": true, "metadata": {"lines": 8, "avg_line_length": 24.12, "nodes": 33, "errors": 0, "source_hash": "93f843e929a07b647e619a09298b84d52d69488cbee296aca90ed3e66aa27720", "categorized_nodes": 26}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef CGL_UTILS_H\n#define CGL_UTILS_H\n\ntypedef struct cgl_point {\n float x;\n float y;\n} CGL_Point_t;\n\nint CGL_UTILS_ORIENTATION(CGL_Point_t a, CGL_Point_t b, CGL_Point_t p);\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 18, 32], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 10, "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": "CGL_UTILS_H", "parent": 0, "children": [], "start_point": {"row": 0, "column": 8}, "end_point": {"row": 0, "column": 19}}, {"id": 3, "type": "preproc_def", "text": "#define CGL_UTILS_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": "CGL_UTILS_H", "parent": 3, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 19}}, {"id": 6, "type": "type_definition", "text": "typedef struct cgl_point {\n float x;\n float y;\n} CGL_Point_t;", "parent": 0, "children": [7, 8, 17], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 6, "column": 14}}, {"id": 7, "type": "typedef", "text": "typedef", "parent": 6, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 8, "type": "struct_specifier", "text": "struct cgl_point {\n float x;\n float y;\n}", "parent": 6, "children": [9, 10], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 6, "column": 1}}, {"id": 9, "type": "struct", "text": "struct", "parent": 8, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 14}}, {"id": 10, "type": "type_identifier", "text": "cgl_point", "parent": 8, "children": [], "start_point": {"row": 3, "column": 15}, "end_point": {"row": 3, "column": 24}}, {"id": 11, "type": "field_declaration", "text": "float x;", "parent": 8, "children": [12, 13], "start_point": {"row": 4, "column": 2}, "end_point": {"row": 4, "column": 10}}, {"id": 12, "type": "primitive_type", "text": "float", "parent": 11, "children": [], "start_point": {"row": 4, "column": 2}, "end_point": {"row": 4, "column": 7}}, {"id": 13, "type": "field_identifier", "text": "x", "parent": 11, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 9}}, {"id": 14, "type": "field_declaration", "text": "float y;", "parent": 8, "children": [15, 16], "start_point": {"row": 5, "column": 2}, "end_point": {"row": 5, "column": 10}}, {"id": 15, "type": "primitive_type", "text": "float", "parent": 14, "children": [], "start_point": {"row": 5, "column": 2}, "end_point": {"row": 5, "column": 7}}, {"id": 16, "type": "field_identifier", "text": "y", "parent": 14, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 9}}, {"id": 17, "type": "type_identifier", "text": "CGL_Point_t", "parent": 6, "children": [], "start_point": {"row": 6, "column": 2}, "end_point": {"row": 6, "column": 13}}, {"id": 18, "type": "declaration", "text": "int CGL_UTILS_ORIENTATION(CGL_Point_t a, CGL_Point_t b, CGL_Point_t p);", "parent": 0, "children": [19, 20], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 71}}, {"id": 19, "type": "primitive_type", "text": "int", "parent": 18, "children": [], "start_point": {"row": 8, "column": 0}, "end_point": {"row": 8, "column": 3}}, {"id": 20, "type": "function_declarator", "text": "CGL_UTILS_ORIENTATION(CGL_Point_t a, CGL_Point_t b, CGL_Point_t p)", "parent": 18, "children": [21, 22], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 70}}, {"id": 21, "type": "identifier", "text": "CGL_UTILS_ORIENTATION", "parent": 20, "children": [], "start_point": {"row": 8, "column": 4}, "end_point": {"row": 8, "column": 25}}, {"id": 22, "type": "parameter_list", "text": "(CGL_Point_t a, CGL_Point_t b, CGL_Point_t p)", "parent": 20, "children": [23, 26, 29], "start_point": {"row": 8, "column": 25}, "end_point": {"row": 8, "column": 70}}, {"id": 23, "type": "parameter_declaration", "text": "CGL_Point_t a", "parent": 22, "children": [24, 25], "start_point": {"row": 8, "column": 26}, "end_point": {"row": 8, "column": 39}}, {"id": 24, "type": "type_identifier", "text": "CGL_Point_t", "parent": 23, "children": [], "start_point": {"row": 8, "column": 26}, "end_point": {"row": 8, "column": 37}}, {"id": 25, "type": "identifier", "text": "a", "parent": 23, "children": [], "start_point": {"row": 8, "column": 38}, "end_point": {"row": 8, "column": 39}}, {"id": 26, "type": "parameter_declaration", "text": "CGL_Point_t b", "parent": 22, "children": [27, 28], "start_point": {"row": 8, "column": 41}, "end_point": {"row": 8, "column": 54}}, {"id": 27, "type": "type_identifier", "text": "CGL_Point_t", "parent": 26, "children": [], "start_point": {"row": 8, "column": 41}, "end_point": {"row": 8, "column": 52}}, {"id": 28, "type": "identifier", "text": "b", "parent": 26, "children": [], "start_point": {"row": 8, "column": 53}, "end_point": {"row": 8, "column": 54}}, {"id": 29, "type": "parameter_declaration", "text": "CGL_Point_t p", "parent": 22, "children": [30, 31], "start_point": {"row": 8, "column": 56}, "end_point": {"row": 8, "column": 69}}, {"id": 30, "type": "type_identifier", "text": "CGL_Point_t", "parent": 29, "children": [], "start_point": {"row": 8, "column": 56}, "end_point": {"row": 8, "column": 67}}, {"id": 31, "type": "identifier", "text": "p", "parent": 29, "children": [], "start_point": {"row": 8, "column": 68}, "end_point": {"row": 8, "column": 69}}, {"id": 32, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 10, "column": 6}}]}, "node_categories": {"declarations": {"functions": [20], "variables": [6, 11, 14, 18, 23, 26, 29], "classes": [8, 9], "imports": [], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 10, 13, 16, 17, 21, 24, 25, 27, 28, 30, 31, 32], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 20, "universal_type": "function", "name": "unknown", "text_snippet": "CGL_UTILS_ORIENTATION(CGL_Point_t a, CGL_Point_t b, CGL_Point_t p)"}], "class_declarations": [{"node_id": 8, "universal_type": "class", "name": "cgl_point", "text_snippet": "struct cgl_point {\n float x;\n float y;\n}"}, {"node_id": 9, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}], "import_statements": []}, "original_source_code": "#ifndef CGL_UTILS_H\n#define CGL_UTILS_H\n\ntypedef struct cgl_point {\n float x;\n float y;\n} CGL_Point_t;\n\nint CGL_UTILS_ORIENTATION(CGL_Point_t a, CGL_Point_t b, CGL_Point_t p);\n\n#endif /* CGL_UTILS_H */\n"}
94
c
/* * ===================================================================================== * * Filename: ArrayQueue.h * * Description: * * Version: 1.0 * Created: 01/07/2015 11:29:19 AM * Revision: none * Compiler: gcc * * Author: <NAME> (bep), <EMAIL> * Organization: * * ===================================================================================== */ #include "Queue.h" #ifndef ARRAYQUEUE_H #define ARRAYQUEUE_H template <typename E> class ArrayQueue: public Queue<E> { private: int maxSize; int front; int rear; bool isFull; E *queueArray; public: ArrayQueue(int size = defaultSize) { maxSize = size; isFull = false; rear = 0; front = 1; queueArray = new E[maxSize]; } ~ArrayQueue() { delete [] queueArray; } void clear() { rear = 0; front = 1; } void enqueue(const E& it) { if (isFull) throw "Queue is full, cannot add item"; rear = (rear + 1) % maxSize; queueArray[rear] = it; if ( ((rear + 1) % maxSize) == front) isFull = true; } E dequeue() { if (length() == 0) throw "Queue is empty"; E it = queueArray[front]; front = (front + 1) % maxSize; return it; } const E& frontValue() const { if (length() == 0) throw "Queue is empty"; return queueArray[front]; } virtual int length() const { if (isFull) return maxSize; else return ((rear + maxSize) - front + 1) % maxSize; } }; #endif
20.3
70
(translation_unit) "/*\n * =====================================================================================\n *\n * Filename: ArrayQueue.h\n *\n * Description: \n *\n * Version: 1.0\n * Created: 01/07/2015 11:29:19 AM\n * Revision: none\n * Compiler: gcc\n *\n * Author: <NAME> (bep), <EMAIL>\n * Organization: \n *\n * =====================================================================================\n */\n#include "Queue.h"\n#ifndef ARRAYQUEUE_H\n#define ARRAYQUEUE_H\ntemplate <typename E> class ArrayQueue: public Queue<E> {\n private:\n int maxSize;\n int front;\n int rear;\n bool isFull;\n E *queueArray;\n\n public:\n ArrayQueue(int size = defaultSize) {\n maxSize = size;\n isFull = false;\n rear = 0;\n front = 1;\n queueArray = new E[maxSize];\n }\n\n ~ArrayQueue() {\n delete [] queueArray;\n }\n\n void clear() {\n rear = 0; \n front = 1;\n }\n\n void enqueue(const E& it) {\n if (isFull)\n throw "Queue is full, cannot add item";\n rear = (rear + 1) % maxSize;\n queueArray[rear] = it;\n if ( ((rear + 1) % maxSize) == front)\n isFull = true;\n }\n\n E dequeue() {\n if (length() == 0) \n throw "Queue is empty";\n E it = queueArray[front];\n front = (front + 1) % maxSize;\n return it;\n }\n\n const E& frontValue() const {\n if (length() == 0)\n throw "Queue is empty";\n return queueArray[front];\n }\n\n\n virtual int length() const {\n if (isFull) return maxSize;\n else return ((rear + maxSize) - front + 1) % maxSize;\n \n }\n};\n#endif\n" (comment) "/*\n * =====================================================================================\n *\n * Filename: ArrayQueue.h\n *\n * Description: \n *\n * Version: 1.0\n * Created: 01/07/2015 11:29:19 AM\n * Revision: none\n * Compiler: gcc\n *\n * Author: <NAME> (bep), <EMAIL>\n * Organization: \n *\n * =====================================================================================\n */" (preproc_include) "#include "Queue.h"\n" (#include) "#include" (string_literal) ""Queue.h"" (") """ (string_content) "Queue.h" (") """ (preproc_ifdef) "#ifndef ARRAYQUEUE_H\n#define ARRAYQUEUE_H\ntemplate <typename E> class ArrayQueue: public Queue<E> {\n private:\n int maxSize;\n int front;\n int rear;\n bool isFull;\n E *queueArray;\n\n public:\n ArrayQueue(int size = defaultSize) {\n maxSize = size;\n isFull = false;\n rear = 0;\n front = 1;\n queueArray = new E[maxSize];\n }\n\n ~ArrayQueue() {\n delete [] queueArray;\n }\n\n void clear() {\n rear = 0; \n front = 1;\n }\n\n void enqueue(const E& it) {\n if (isFull)\n throw "Queue is full, cannot add item";\n rear = (rear + 1) % maxSize;\n queueArray[rear] = it;\n if ( ((rear + 1) % maxSize) == front)\n isFull = true;\n }\n\n E dequeue() {\n if (length() == 0) \n throw "Queue is empty";\n E it = queueArray[front];\n front = (front + 1) % maxSize;\n return it;\n }\n\n const E& frontValue() const {\n if (length() == 0)\n throw "Queue is empty";\n return queueArray[front];\n }\n\n\n virtual int length() const {\n if (isFull) return maxSize;\n else return ((rear + maxSize) - front + 1) % maxSize;\n \n }\n};\n#endif" (#ifndef) "#ifndef" (identifier) "ARRAYQUEUE_H" (preproc_def) "#define ARRAYQUEUE_H\n" (#define) "#define" (identifier) "ARRAYQUEUE_H" (expression_statement) "template <typename E> class" (binary_expression) "template <typename E> class" (binary_expression) "template <typename" (identifier) "template" (<) "<" (identifier) "typename" (ERROR) "E" (identifier) "E" (>) ">" (identifier) "class" (;) "" (labeled_statement) "ArrayQueue: public Queue<E> {\n private:\n int maxSize;\n int front;\n int rear;\n bool isFull;\n E *queueArray;\n\n public:\n ArrayQueue(int size = defaultSize) {\n maxSize = size;\n isFull = false;\n rear = 0;\n front = 1;\n queueArray = new E[maxSize];\n }" (statement_identifier) "ArrayQueue" (:) ":" (ERROR) "public Queue<E>" (type_identifier) "public" (identifier) "Queue" (<) "<" (identifier) "E" (>) ">" (compound_statement) "{\n private:\n int maxSize;\n int front;\n int rear;\n bool isFull;\n E *queueArray;\n\n public:\n ArrayQueue(int size = defaultSize) {\n maxSize = size;\n isFull = false;\n rear = 0;\n front = 1;\n queueArray = new E[maxSize];\n }" ({) "{" (labeled_statement) "private:\n int maxSize;" (statement_identifier) "private" (:) ":" (declaration) "int maxSize;" (primitive_type) "int" (identifier) "maxSize" (;) ";" (declaration) "int front;" (primitive_type) "int" (identifier) "front" (;) ";" (declaration) "int rear;" (primitive_type) "int" (identifier) "rear" (;) ";" (declaration) "bool isFull;" (primitive_type) "bool" (identifier) "isFull" (;) ";" (declaration) "E *queueArray;" (type_identifier) "E" (pointer_declarator) "*queueArray" (*) "*" (identifier) "queueArray" (;) ";" (labeled_statement) "public:\n ArrayQueue(int size = defaultSize) {\n maxSize = size;" (statement_identifier) "public" (:) ":" (declaration) "ArrayQueue(int size = defaultSize) {\n maxSize = size;" (macro_type_specifier) "ArrayQueue(int" (identifier) "ArrayQueue" (() "(" (type_descriptor) "int" (primitive_type) "int" ()) "" (init_declarator) "size = defaultSize) {\n maxSize = size" (identifier) "size" (=) "=" (ERROR) "defaultSize) {" (identifier) "defaultSize" ()) ")" ({) "{" (assignment_expression) "maxSize = size" (identifier) "maxSize" (=) "=" (identifier) "size" (;) ";" (expression_statement) "isFull = false;" (assignment_expression) "isFull = false" (identifier) "isFull" (=) "=" (false) "false" (;) ";" (expression_statement) "rear = 0;" (assignment_expression) "rear = 0" (identifier) "rear" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "front = 1;" (assignment_expression) "front = 1" (identifier) "front" (=) "=" (number_literal) "1" (;) ";" (expression_statement) "queueArray = new E[maxSize];" (assignment_expression) "queueArray = new E[maxSize]" (identifier) "queueArray" (=) "=" (subscript_expression) "new E[maxSize]" (identifier) "new" (ERROR) "E" (identifier) "E" ([) "[" (identifier) "maxSize" (]) "]" (;) ";" (}) "}" (expression_statement) "~ArrayQueue()" (unary_expression) "~ArrayQueue()" (~) "~" (call_expression) "ArrayQueue()" (identifier) "ArrayQueue" (argument_list) "()" (() "(" ()) ")" (;) "" (compound_statement) "{\n delete [] queueArray;\n }" ({) "{" (expression_statement) "delete [] queueArray;" (subscript_expression) "delete [] queueArray" (identifier) "delete" ([) "[" (ERROR) "]" (]) "]" (identifier) "queueArray" (]) "" (;) ";" (}) "}" (function_definition) "void clear() {\n rear = 0; \n front = 1;\n }" (primitive_type) "void" (function_declarator) "clear()" (identifier) "clear" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n rear = 0; \n front = 1;\n }" ({) "{" (expression_statement) "rear = 0;" (assignment_expression) "rear = 0" (identifier) "rear" (=) "=" (number_literal) "0" (;) ";" (expression_statement) "front = 1;" (assignment_expression) "front = 1" (identifier) "front" (=) "=" (number_literal) "1" (;) ";" (}) "}" (function_definition) "void enqueue(const E& it) {\n if (isFull)\n throw "Queue is full, cannot add item";\n rear = (rear + 1) % maxSize;\n queueArray[rear] = it;\n if ( ((rear + 1) % maxSize) == front)\n isFull = true;\n }" (primitive_type) "void" (function_declarator) "enqueue(const E& it)" (identifier) "enqueue" (parameter_list) "(const E& it)" (() "(" (parameter_declaration) "const E& it" (type_qualifier) "const" (const) "const" (type_identifier) "E" (ERROR) "&" (&) "&" (identifier) "it" ()) ")" (compound_statement) "{\n if (isFull)\n throw "Queue is full, cannot add item";\n rear = (rear + 1) % maxSize;\n queueArray[rear] = it;\n if ( ((rear + 1) % maxSize) == front)\n isFull = true;\n }" ({) "{" (if_statement) "if (isFull)\n throw "Queue is full, cannot add item";" (if) "if" (parenthesized_expression) "(isFull)" (() "(" (identifier) "isFull" ()) ")" (expression_statement) "throw "Queue is full, cannot add item";" (concatenated_string) "throw "Queue is full, cannot add item"" (identifier) "throw" (string_literal) ""Queue is full, cannot add item"" (") """ (string_content) "Queue is full, cannot add item" (") """ (;) ";" (expression_statement) "rear = (rear + 1) % maxSize;" (assignment_expression) "rear = (rear + 1) % maxSize" (identifier) "rear" (=) "=" (binary_expression) "(rear + 1) % maxSize" (parenthesized_expression) "(rear + 1)" (() "(" (binary_expression) "rear + 1" (identifier) "rear" (+) "+" (number_literal) "1" ()) ")" (%) "%" (identifier) "maxSize" (;) ";" (expression_statement) "queueArray[rear] = it;" (assignment_expression) "queueArray[rear] = it" (subscript_expression) "queueArray[rear]" (identifier) "queueArray" ([) "[" (identifier) "rear" (]) "]" (=) "=" (identifier) "it" (;) ";" (if_statement) "if ( ((rear + 1) % maxSize) == front)\n isFull = true;" (if) "if" (parenthesized_expression) "( ((rear + 1) % maxSize) == front)" (() "(" (binary_expression) "((rear + 1) % maxSize) == front" (parenthesized_expression) "((rear + 1) % maxSize)" (() "(" (binary_expression) "(rear + 1) % maxSize" (parenthesized_expression) "(rear + 1)" (() "(" (binary_expression) "rear + 1" (identifier) "rear" (+) "+" (number_literal) "1" ()) ")" (%) "%" (identifier) "maxSize" ()) ")" (==) "==" (identifier) "front" ()) ")" (expression_statement) "isFull = true;" (assignment_expression) "isFull = true" (identifier) "isFull" (=) "=" (true) "true" (;) ";" (}) "}" (function_definition) "E dequeue() {\n if (length() == 0) \n throw "Queue is empty";\n E it = queueArray[front];\n front = (front + 1) % maxSize;\n return it;\n }" (type_identifier) "E" (function_declarator) "dequeue()" (identifier) "dequeue" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n if (length() == 0) \n throw "Queue is empty";\n E it = queueArray[front];\n front = (front + 1) % maxSize;\n return it;\n }" ({) "{" (if_statement) "if (length() == 0) \n throw "Queue is empty";" (if) "if" (parenthesized_expression) "(length() == 0)" (() "(" (binary_expression) "length() == 0" (call_expression) "length()" (identifier) "length" (argument_list) "()" (() "(" ()) ")" (==) "==" (number_literal) "0" ()) ")" (expression_statement) "throw "Queue is empty";" (concatenated_string) "throw "Queue is empty"" (identifier) "throw" (string_literal) ""Queue is empty"" (") """ (string_content) "Queue is empty" (") """ (;) ";" (declaration) "E it = queueArray[front];" (type_identifier) "E" (init_declarator) "it = queueArray[front]" (identifier) "it" (=) "=" (subscript_expression) "queueArray[front]" (identifier) "queueArray" ([) "[" (identifier) "front" (]) "]" (;) ";" (expression_statement) "front = (front + 1) % maxSize;" (assignment_expression) "front = (front + 1) % maxSize" (identifier) "front" (=) "=" (binary_expression) "(front + 1) % maxSize" (parenthesized_expression) "(front + 1)" (() "(" (binary_expression) "front + 1" (identifier) "front" (+) "+" (number_literal) "1" ()) ")" (%) "%" (identifier) "maxSize" (;) ";" (return_statement) "return it;" (return) "return" (identifier) "it" (;) ";" (}) "}" (declaration) "const E& frontValue() const {\n if (length() == 0)" (type_qualifier) "const" (const) "const" (type_identifier) "E" (ERROR) "& frontValue() const {\n if" (&) "&" (function_declarator) "frontValue()" (identifier) "frontValue" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" ({) "{" (if) "if" (parenthesized_declarator) "(length() == 0)" (() "(" (function_declarator) "length()" (identifier) "length" (parameter_list) "()" (() "(" ()) ")" (ERROR) "== 0" (==) "==" (number_literal) "0" ()) ")" (;) "" (expression_statement) "throw "Queue is empty";" (concatenated_string) "throw "Queue is empty"" (identifier) "throw" (string_literal) ""Queue is empty"" (") """ (string_content) "Queue is empty" (") """ (;) ";" (return_statement) "return queueArray[front];" (return) "return" (subscript_expression) "queueArray[front]" (identifier) "queueArray" ([) "[" (identifier) "front" (]) "]" (;) ";" (ERROR) "}\n\n\n virtual int length() const" (}) "}" (type_identifier) "virtual" (ERROR) "int" (identifier) "int" (function_declarator) "length()" (identifier) "length" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{\n if (isFull) return maxSize;\n else return ((rear + maxSize) - front + 1) % maxSize;\n \n }" ({) "{" (if_statement) "if (isFull) return maxSize;\n else return ((rear + maxSize) - front + 1) % maxSize;" (if) "if" (parenthesized_expression) "(isFull)" (() "(" (identifier) "isFull" ()) ")" (return_statement) "return maxSize;" (return) "return" (identifier) "maxSize" (;) ";" (else_clause) "else return ((rear + maxSize) - front + 1) % maxSize;" (else) "else" (return_statement) "return ((rear + maxSize) - front + 1) % maxSize;" (return) "return" (binary_expression) "((rear + maxSize) - front + 1) % maxSize" (parenthesized_expression) "((rear + maxSize) - front + 1)" (() "(" (binary_expression) "(rear + maxSize) - front + 1" (binary_expression) "(rear + maxSize) - front" (parenthesized_expression) "(rear + maxSize)" (() "(" (binary_expression) "rear + maxSize" (identifier) "rear" (+) "+" (identifier) "maxSize" ()) ")" (-) "-" (identifier) "front" (+) "+" (number_literal) "1" ()) ")" (%) "%" (identifier) "maxSize" (;) ";" (}) "}" (ERROR) "}" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif"
398
11
{"language": "c", "success": true, "metadata": {"lines": 70, "avg_line_length": 20.3, "nodes": 229, "errors": 0, "source_hash": "1d65fe75e2fb30bb56faec4997251ab443d92287d51a267c6635f2e9ba8589e7", "categorized_nodes": 161}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"Queue.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": "\"Queue.h\"", "parent": 0, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 18}}, {"id": 3, "type": "preproc_ifdef", "text": "#ifndef ARRAYQUEUE_H\n#define ARRAYQUEUE_H\ntemplate <typename E> class ArrayQueue: public Queue<E> {\n\tprivate:\n\t\tint maxSize;\n\t\tint front;\n\t\tint rear;\n\t\tbool isFull;\n\t\tE *queueArray;\n\n\tpublic:\n\t\tArrayQueue(int size = defaultSize) {\n\t\t\tmaxSize = size;\n\t\t\tisFull = false;\n\t\t\trear = 0;\n\t\t\tfront = 1;\n\t\t\tqueueArray = new E[maxSize];\n\t\t}\n\n\t\t~ArrayQueue() {\n\t\t\tdelete [] queueArray;\n\t\t}\n\n\t\tvoid clear() {\n\t\t\trear = 0; \n\t\t\tfront = 1;\n\t\t}\n\n\t\tvoid enqueue(const E& it) {\n\t\t\tif (isFull)\n\t\t\t\tthrow \"Queue is full, cannot add item\";\n\t\t\trear = (rear + 1) % maxSize;\n\t\t\tqueueArray[rear] = it;\n\t\t\tif ( ((rear + 1) % maxSize) == front)\n\t\t\t\tisFull = true;\n\t\t}\n\n\t\tE dequeue() {\n\t\t\tif (length() == 0) \n\t\t\t\tthrow \"Queue is empty\";\n\t\t\tE it = queueArray[front];\n\t\t\tfront = (front + 1) % maxSize;\n\t\t\treturn it;\n\t\t}\n\n\t\tconst E& frontValue() const {\n\t\t\tif (length() == 0)\n\t\t\t\tthrow \"Queue is empty\";\n\t\t\treturn queueArray[front];\n\t\t}\n\n\n\t\tvirtual int length() const {\n\t\t\tif (isFull) return maxSize;\n\t\t\telse return ((rear + maxSize) - front + 1) % maxSize;\n\t\t\t\n\t\t}\n};\n#endif", "parent": null, "children": [4, 5, 6, 17, 83, 96, 144, 180, 195, 199, 228], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 76, "column": 6}}, {"id": 4, "type": "#ifndef", "text": "#ifndef", "parent": 3, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 7}}, {"id": 5, "type": "identifier", "text": "ARRAYQUEUE_H", "parent": 3, "children": [], "start_point": {"row": 18, "column": 8}, "end_point": {"row": 18, "column": 20}}, {"id": 6, "type": "preproc_def", "text": "#define ARRAYQUEUE_H\n", "parent": 3, "children": [7, 8], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 20, "column": 0}}, {"id": 7, "type": "#define", "text": "#define", "parent": 6, "children": [], "start_point": {"row": 19, "column": 0}, "end_point": {"row": 19, "column": 7}}, {"id": 8, "type": "identifier", "text": "ARRAYQUEUE_H", "parent": 6, "children": [], "start_point": {"row": 19, "column": 8}, "end_point": {"row": 19, "column": 20}}, {"id": 9, "type": "binary_expression", "text": "template <typename E> class", "parent": 3, "children": [10, 14, 16], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 27}}, {"id": 10, "type": "binary_expression", "text": "template <typename", "parent": 9, "children": [11, 12, 13], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 18}}, {"id": 11, "type": "identifier", "text": "template", "parent": 10, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 12, "type": "<", "text": "<", "parent": 10, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 10}}, {"id": 13, "type": "identifier", "text": "typename", "parent": 10, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 18}}, {"id": 14, "type": "ERROR", "text": "E", "parent": 9, "children": [15], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 20}}, {"id": 15, "type": "identifier", "text": "E", "parent": 14, "children": [], "start_point": {"row": 20, "column": 19}, "end_point": {"row": 20, "column": 20}}, {"id": 16, "type": ">", "text": ">", "parent": 9, "children": [], "start_point": {"row": 20, "column": 20}, "end_point": {"row": 20, "column": 21}}, {"id": 17, "type": "labeled_statement", "text": "ArrayQueue: public Queue<E> {\n\tprivate:\n\t\tint maxSize;\n\t\tint front;\n\t\tint rear;\n\t\tbool isFull;\n\t\tE *queueArray;\n\n\tpublic:\n\t\tArrayQueue(int size = defaultSize) {\n\t\t\tmaxSize = size;\n\t\t\tisFull = false;\n\t\t\trear = 0;\n\t\t\tfront = 1;\n\t\t\tqueueArray = new E[maxSize];\n\t\t}", "parent": 3, "children": [18, 19], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 35, "column": 3}}, {"id": 18, "type": "statement_identifier", "text": "ArrayQueue", "parent": 17, "children": [], "start_point": {"row": 20, "column": 28}, "end_point": {"row": 20, "column": 38}}, {"id": 19, "type": "ERROR", "text": "public Queue<E>", "parent": 17, "children": [20, 21, 22, 23], "start_point": {"row": 20, "column": 40}, "end_point": {"row": 20, "column": 55}}, {"id": 20, "type": "identifier", "text": "Queue", "parent": 19, "children": [], "start_point": {"row": 20, "column": 47}, "end_point": {"row": 20, "column": 52}}, {"id": 21, "type": "<", "text": "<", "parent": 19, "children": [], "start_point": {"row": 20, "column": 52}, "end_point": {"row": 20, "column": 53}}, {"id": 22, "type": "identifier", "text": "E", "parent": 19, "children": [], "start_point": {"row": 20, "column": 53}, "end_point": {"row": 20, "column": 54}}, {"id": 23, "type": ">", "text": ">", "parent": 19, "children": [], "start_point": {"row": 20, "column": 54}, "end_point": {"row": 20, "column": 55}}, {"id": 24, "type": "labeled_statement", "text": "private:\n\t\tint maxSize;", "parent": 17, "children": [25], "start_point": {"row": 21, "column": 1}, "end_point": {"row": 22, "column": 14}}, {"id": 25, "type": "declaration", "text": "int maxSize;", "parent": 24, "children": [26, 27], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 14}}, {"id": 26, "type": "primitive_type", "text": "int", "parent": 25, "children": [], "start_point": {"row": 22, "column": 2}, "end_point": {"row": 22, "column": 5}}, {"id": 27, "type": "identifier", "text": "maxSize", "parent": 25, "children": [], "start_point": {"row": 22, "column": 6}, "end_point": {"row": 22, "column": 13}}, {"id": 28, "type": "declaration", "text": "int front;", "parent": 17, "children": [29, 30], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 12}}, {"id": 29, "type": "primitive_type", "text": "int", "parent": 28, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 5}}, {"id": 30, "type": "identifier", "text": "front", "parent": 28, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 11}}, {"id": 31, "type": "declaration", "text": "int rear;", "parent": 17, "children": [32, 33], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 11}}, {"id": 32, "type": "primitive_type", "text": "int", "parent": 31, "children": [], "start_point": {"row": 24, "column": 2}, "end_point": {"row": 24, "column": 5}}, {"id": 33, "type": "identifier", "text": "rear", "parent": 31, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 10}}, {"id": 34, "type": "declaration", "text": "bool isFull;", "parent": 17, "children": [35, 36], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 14}}, {"id": 35, "type": "primitive_type", "text": "bool", "parent": 34, "children": [], "start_point": {"row": 25, "column": 2}, "end_point": {"row": 25, "column": 6}}, {"id": 36, "type": "identifier", "text": "isFull", "parent": 34, "children": [], "start_point": {"row": 25, "column": 7}, "end_point": {"row": 25, "column": 13}}, {"id": 37, "type": "declaration", "text": "E *queueArray;", "parent": 17, "children": [38, 39], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 16}}, {"id": 38, "type": "type_identifier", "text": "E", "parent": 37, "children": [], "start_point": {"row": 26, "column": 2}, "end_point": {"row": 26, "column": 3}}, {"id": 39, "type": "pointer_declarator", "text": "*queueArray", "parent": 37, "children": [40, 41], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 15}}, {"id": 40, "type": "*", "text": "*", "parent": 39, "children": [], "start_point": {"row": 26, "column": 4}, "end_point": {"row": 26, "column": 5}}, {"id": 41, "type": "identifier", "text": "queueArray", "parent": 39, "children": [], "start_point": {"row": 26, "column": 5}, "end_point": {"row": 26, "column": 15}}, {"id": 42, "type": "labeled_statement", "text": "public:\n\t\tArrayQueue(int size = defaultSize) {\n\t\t\tmaxSize = size;", "parent": 17, "children": [43], "start_point": {"row": 28, "column": 1}, "end_point": {"row": 30, "column": 18}}, {"id": 43, "type": "declaration", "text": "ArrayQueue(int size = defaultSize) {\n\t\t\tmaxSize = size;", "parent": 42, "children": [44, 48], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 30, "column": 18}}, {"id": 44, "type": "macro_type_specifier", "text": "ArrayQueue(int", "parent": 43, "children": [45, 46], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 16}}, {"id": 45, "type": "identifier", "text": "ArrayQueue", "parent": 44, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 12}}, {"id": 46, "type": "type_descriptor", "text": "int", "parent": 44, "children": [47], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 16}}, {"id": 47, "type": "primitive_type", "text": "int", "parent": 46, "children": [], "start_point": {"row": 29, "column": 13}, "end_point": {"row": 29, "column": 16}}, {"id": 48, "type": "init_declarator", "text": "size = defaultSize) {\n\t\t\tmaxSize = size", "parent": 43, "children": [49, 50, 51, 53], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 30, "column": 17}}, {"id": 49, "type": "identifier", "text": "size", "parent": 48, "children": [], "start_point": {"row": 29, "column": 17}, "end_point": {"row": 29, "column": 21}}, {"id": 50, "type": "=", "text": "=", "parent": 48, "children": [], "start_point": {"row": 29, "column": 22}, "end_point": {"row": 29, "column": 23}}, {"id": 51, "type": "ERROR", "text": "defaultSize) {", "parent": 48, "children": [52], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 38}}, {"id": 52, "type": "identifier", "text": "defaultSize", "parent": 51, "children": [], "start_point": {"row": 29, "column": 24}, "end_point": {"row": 29, "column": 35}}, {"id": 53, "type": "assignment_expression", "text": "maxSize = size", "parent": 48, "children": [54, 55, 56], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 30, "column": 17}}, {"id": 54, "type": "identifier", "text": "maxSize", "parent": 53, "children": [], "start_point": {"row": 30, "column": 3}, "end_point": {"row": 30, "column": 10}}, {"id": 55, "type": "=", "text": "=", "parent": 53, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 12}}, {"id": 56, "type": "identifier", "text": "size", "parent": 53, "children": [], "start_point": {"row": 30, "column": 13}, "end_point": {"row": 30, "column": 17}}, {"id": 57, "type": "assignment_expression", "text": "isFull = false", "parent": 17, "children": [58, 59, 60], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 17}}, {"id": 58, "type": "identifier", "text": "isFull", "parent": 57, "children": [], "start_point": {"row": 31, "column": 3}, "end_point": {"row": 31, "column": 9}}, {"id": 59, "type": "=", "text": "=", "parent": 57, "children": [], "start_point": {"row": 31, "column": 10}, "end_point": {"row": 31, "column": 11}}, {"id": 60, "type": "false", "text": "false", "parent": 57, "children": [], "start_point": {"row": 31, "column": 12}, "end_point": {"row": 31, "column": 17}}, {"id": 61, "type": "assignment_expression", "text": "rear = 0", "parent": 17, "children": [62, 63, 64], "start_point": {"row": 32, "column": 3}, "end_point": {"row": 32, "column": 11}}, {"id": 62, "type": "identifier", "text": "rear", "parent": 61, "children": [], "start_point": {"row": 32, "column": 3}, "end_point": {"row": 32, "column": 7}}, {"id": 63, "type": "=", "text": "=", "parent": 61, "children": [], "start_point": {"row": 32, "column": 8}, "end_point": {"row": 32, "column": 9}}, {"id": 64, "type": "number_literal", "text": "0", "parent": 61, "children": [], "start_point": {"row": 32, "column": 10}, "end_point": {"row": 32, "column": 11}}, {"id": 65, "type": "assignment_expression", "text": "front = 1", "parent": 17, "children": [66, 67, 68], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 12}}, {"id": 66, "type": "identifier", "text": "front", "parent": 65, "children": [], "start_point": {"row": 33, "column": 3}, "end_point": {"row": 33, "column": 8}}, {"id": 67, "type": "=", "text": "=", "parent": 65, "children": [], "start_point": {"row": 33, "column": 9}, "end_point": {"row": 33, "column": 10}}, {"id": 68, "type": "number_literal", "text": "1", "parent": 65, "children": [], "start_point": {"row": 33, "column": 11}, "end_point": {"row": 33, "column": 12}}, {"id": 69, "type": "assignment_expression", "text": "queueArray = new E[maxSize]", "parent": 17, "children": [70, 71, 72], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 30}}, {"id": 70, "type": "identifier", "text": "queueArray", "parent": 69, "children": [], "start_point": {"row": 34, "column": 3}, "end_point": {"row": 34, "column": 13}}, {"id": 71, "type": "=", "text": "=", "parent": 69, "children": [], "start_point": {"row": 34, "column": 14}, "end_point": {"row": 34, "column": 15}}, {"id": 72, "type": "subscript_expression", "text": "new E[maxSize]", "parent": 69, "children": [73, 75], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 30}}, {"id": 73, "type": "ERROR", "text": "E", "parent": 72, "children": [74], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 21}}, {"id": 74, "type": "identifier", "text": "E", "parent": 73, "children": [], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 21}}, {"id": 75, "type": "identifier", "text": "maxSize", "parent": 72, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 29}}, {"id": 76, "type": "unary_expression", "text": "~ArrayQueue()", "parent": 3, "children": [77, 78], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 15}}, {"id": 77, "type": "~", "text": "~", "parent": 76, "children": [], "start_point": {"row": 37, "column": 2}, "end_point": {"row": 37, "column": 3}}, {"id": 78, "type": "call_expression", "text": "ArrayQueue()", "parent": 76, "children": [79, 80], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 15}}, {"id": 79, "type": "identifier", "text": "ArrayQueue", "parent": 78, "children": [], "start_point": {"row": 37, "column": 3}, "end_point": {"row": 37, "column": 13}}, {"id": 80, "type": "argument_list", "text": "()", "parent": 78, "children": [], "start_point": {"row": 37, "column": 13}, "end_point": {"row": 37, "column": 15}}, {"id": 81, "type": "subscript_expression", "text": "delete [] queueArray", "parent": 3, "children": [82], "start_point": {"row": 38, "column": 3}, "end_point": {"row": 38, "column": 23}}, {"id": 82, "type": "identifier", "text": "queueArray", "parent": 81, "children": [], "start_point": {"row": 38, "column": 13}, "end_point": {"row": 38, "column": 23}}, {"id": 83, "type": "function_definition", "text": "void clear() {\n\t\t\trear = 0; \n\t\t\tfront = 1;\n\t\t}", "parent": 3, "children": [84, 85], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 44, "column": 3}}, {"id": 84, "type": "primitive_type", "text": "void", "parent": 83, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 6}}, {"id": 85, "type": "function_declarator", "text": "clear()", "parent": 83, "children": [86, 87], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 14}}, {"id": 86, "type": "identifier", "text": "clear", "parent": 85, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 12}}, {"id": 87, "type": "parameter_list", "text": "()", "parent": 85, "children": [], "start_point": {"row": 41, "column": 12}, "end_point": {"row": 41, "column": 14}}, {"id": 88, "type": "assignment_expression", "text": "rear = 0", "parent": 83, "children": [89, 90, 91], "start_point": {"row": 42, "column": 3}, "end_point": {"row": 42, "column": 11}}, {"id": 89, "type": "identifier", "text": "rear", "parent": 88, "children": [], "start_point": {"row": 42, "column": 3}, "end_point": {"row": 42, "column": 7}}, {"id": 90, "type": "=", "text": "=", "parent": 88, "children": [], "start_point": {"row": 42, "column": 8}, "end_point": {"row": 42, "column": 9}}, {"id": 91, "type": "number_literal", "text": "0", "parent": 88, "children": [], "start_point": {"row": 42, "column": 10}, "end_point": {"row": 42, "column": 11}}, {"id": 92, "type": "assignment_expression", "text": "front = 1", "parent": 83, "children": [93, 94, 95], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 12}}, {"id": 93, "type": "identifier", "text": "front", "parent": 92, "children": [], "start_point": {"row": 43, "column": 3}, "end_point": {"row": 43, "column": 8}}, {"id": 94, "type": "=", "text": "=", "parent": 92, "children": [], "start_point": {"row": 43, "column": 9}, "end_point": {"row": 43, "column": 10}}, {"id": 95, "type": "number_literal", "text": "1", "parent": 92, "children": [], "start_point": {"row": 43, "column": 11}, "end_point": {"row": 43, "column": 12}}, {"id": 96, "type": "function_definition", "text": "void enqueue(const E& it) {\n\t\t\tif (isFull)\n\t\t\t\tthrow \"Queue is full, cannot add item\";\n\t\t\trear = (rear + 1) % maxSize;\n\t\t\tqueueArray[rear] = it;\n\t\t\tif ( ((rear + 1) % maxSize) == front)\n\t\t\t\tisFull = true;\n\t\t}", "parent": 3, "children": [97, 98], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 53, "column": 3}}, {"id": 97, "type": "primitive_type", "text": "void", "parent": 96, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 6}}, {"id": 98, "type": "function_declarator", "text": "enqueue(const E& it)", "parent": 96, "children": [99, 100], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 27}}, {"id": 99, "type": "identifier", "text": "enqueue", "parent": 98, "children": [], "start_point": {"row": 46, "column": 7}, "end_point": {"row": 46, "column": 14}}, {"id": 100, "type": "parameter_list", "text": "(const E& it)", "parent": 98, "children": [101], "start_point": {"row": 46, "column": 14}, "end_point": {"row": 46, "column": 27}}, {"id": 101, "type": "parameter_declaration", "text": "const E& it", "parent": 100, "children": [102, 103], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 26}}, {"id": 102, "type": "type_identifier", "text": "E", "parent": 101, "children": [], "start_point": {"row": 46, "column": 21}, "end_point": {"row": 46, "column": 22}}, {"id": 103, "type": "identifier", "text": "it", "parent": 101, "children": [], "start_point": {"row": 46, "column": 24}, "end_point": {"row": 46, "column": 26}}, {"id": 104, "type": "if_statement", "text": "if (isFull)\n\t\t\t\tthrow \"Queue is full, cannot add item\";", "parent": 96, "children": [105], "start_point": {"row": 47, "column": 3}, "end_point": {"row": 48, "column": 43}}, {"id": 105, "type": "parenthesized_expression", "text": "(isFull)", "parent": 104, "children": [106], "start_point": {"row": 47, "column": 6}, "end_point": {"row": 47, "column": 14}}, {"id": 106, "type": "identifier", "text": "isFull", "parent": 105, "children": [], "start_point": {"row": 47, "column": 7}, "end_point": {"row": 47, "column": 13}}, {"id": 107, "type": "concatenated_string", "text": "throw \"Queue is full, cannot add item\"", "parent": 104, "children": [108], "start_point": {"row": 48, "column": 4}, "end_point": {"row": 48, "column": 42}}, {"id": 108, "type": "string_literal", "text": "\"Queue is full, cannot add item\"", "parent": 107, "children": [], "start_point": {"row": 48, "column": 10}, "end_point": {"row": 48, "column": 42}}, {"id": 109, "type": "assignment_expression", "text": "rear = (rear + 1) % maxSize", "parent": 96, "children": [110, 111, 112], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 30}}, {"id": 110, "type": "identifier", "text": "rear", "parent": 109, "children": [], "start_point": {"row": 49, "column": 3}, "end_point": {"row": 49, "column": 7}}, {"id": 111, "type": "=", "text": "=", "parent": 109, "children": [], "start_point": {"row": 49, "column": 8}, "end_point": {"row": 49, "column": 9}}, {"id": 112, "type": "binary_expression", "text": "(rear + 1) % maxSize", "parent": 109, "children": [113, 118, 119], "start_point": {"row": 49, "column": 10}, "end_point": {"row": 49, "column": 30}}, {"id": 113, "type": "parenthesized_expression", "text": "(rear + 1)", "parent": 112, "children": [114], "start_point": {"row": 49, "column": 10}, "end_point": {"row": 49, "column": 20}}, {"id": 114, "type": "binary_expression", "text": "rear + 1", "parent": 113, "children": [115, 116, 117], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 19}}, {"id": 115, "type": "identifier", "text": "rear", "parent": 114, "children": [], "start_point": {"row": 49, "column": 11}, "end_point": {"row": 49, "column": 15}}, {"id": 116, "type": "+", "text": "+", "parent": 114, "children": [], "start_point": {"row": 49, "column": 16}, "end_point": {"row": 49, "column": 17}}, {"id": 117, "type": "number_literal", "text": "1", "parent": 114, "children": [], "start_point": {"row": 49, "column": 18}, "end_point": {"row": 49, "column": 19}}, {"id": 118, "type": "%", "text": "%", "parent": 112, "children": [], "start_point": {"row": 49, "column": 21}, "end_point": {"row": 49, "column": 22}}, {"id": 119, "type": "identifier", "text": "maxSize", "parent": 112, "children": [], "start_point": {"row": 49, "column": 23}, "end_point": {"row": 49, "column": 30}}, {"id": 120, "type": "assignment_expression", "text": "queueArray[rear] = it", "parent": 96, "children": [121, 124, 125], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 24}}, {"id": 121, "type": "subscript_expression", "text": "queueArray[rear]", "parent": 120, "children": [122, 123], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 19}}, {"id": 122, "type": "identifier", "text": "queueArray", "parent": 121, "children": [], "start_point": {"row": 50, "column": 3}, "end_point": {"row": 50, "column": 13}}, {"id": 123, "type": "identifier", "text": "rear", "parent": 121, "children": [], "start_point": {"row": 50, "column": 14}, "end_point": {"row": 50, "column": 18}}, {"id": 124, "type": "=", "text": "=", "parent": 120, "children": [], "start_point": {"row": 50, "column": 20}, "end_point": {"row": 50, "column": 21}}, {"id": 125, "type": "identifier", "text": "it", "parent": 120, "children": [], "start_point": {"row": 50, "column": 22}, "end_point": {"row": 50, "column": 24}}, {"id": 126, "type": "if_statement", "text": "if ( ((rear + 1) % maxSize) == front)\n\t\t\t\tisFull = true;", "parent": 96, "children": [127], "start_point": {"row": 51, "column": 3}, "end_point": {"row": 52, "column": 18}}, {"id": 127, "type": "parenthesized_expression", "text": "( ((rear + 1) % maxSize) == front)", "parent": 126, "children": [128], "start_point": {"row": 51, "column": 6}, "end_point": {"row": 51, "column": 40}}, {"id": 128, "type": "binary_expression", "text": "((rear + 1) % maxSize) == front", "parent": 127, "children": [129, 138, 139], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 39}}, {"id": 129, "type": "parenthesized_expression", "text": "((rear + 1) % maxSize)", "parent": 128, "children": [130], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 30}}, {"id": 130, "type": "binary_expression", "text": "(rear + 1) % maxSize", "parent": 129, "children": [131, 136, 137], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 29}}, {"id": 131, "type": "parenthesized_expression", "text": "(rear + 1)", "parent": 130, "children": [132], "start_point": {"row": 51, "column": 9}, "end_point": {"row": 51, "column": 19}}, {"id": 132, "type": "binary_expression", "text": "rear + 1", "parent": 131, "children": [133, 134, 135], "start_point": {"row": 51, "column": 10}, "end_point": {"row": 51, "column": 18}}, {"id": 133, "type": "identifier", "text": "rear", "parent": 132, "children": [], "start_point": {"row": 51, "column": 10}, "end_point": {"row": 51, "column": 14}}, {"id": 134, "type": "+", "text": "+", "parent": 132, "children": [], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 16}}, {"id": 135, "type": "number_literal", "text": "1", "parent": 132, "children": [], "start_point": {"row": 51, "column": 17}, "end_point": {"row": 51, "column": 18}}, {"id": 136, "type": "%", "text": "%", "parent": 130, "children": [], "start_point": {"row": 51, "column": 20}, "end_point": {"row": 51, "column": 21}}, {"id": 137, "type": "identifier", "text": "maxSize", "parent": 130, "children": [], "start_point": {"row": 51, "column": 22}, "end_point": {"row": 51, "column": 29}}, {"id": 138, "type": "==", "text": "==", "parent": 128, "children": [], "start_point": {"row": 51, "column": 31}, "end_point": {"row": 51, "column": 33}}, {"id": 139, "type": "identifier", "text": "front", "parent": 128, "children": [], "start_point": {"row": 51, "column": 34}, "end_point": {"row": 51, "column": 39}}, {"id": 140, "type": "assignment_expression", "text": "isFull = true", "parent": 126, "children": [141, 142, 143], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 17}}, {"id": 141, "type": "identifier", "text": "isFull", "parent": 140, "children": [], "start_point": {"row": 52, "column": 4}, "end_point": {"row": 52, "column": 10}}, {"id": 142, "type": "=", "text": "=", "parent": 140, "children": [], "start_point": {"row": 52, "column": 11}, "end_point": {"row": 52, "column": 12}}, {"id": 143, "type": "true", "text": "true", "parent": 140, "children": [], "start_point": {"row": 52, "column": 13}, "end_point": {"row": 52, "column": 17}}, {"id": 144, "type": "function_definition", "text": "E dequeue() {\n\t\t\tif (length() == 0) \n\t\t\t\tthrow \"Queue is empty\";\n\t\t\tE it = queueArray[front];\n\t\t\tfront = (front + 1) % maxSize;\n\t\t\treturn it;\n\t\t}", "parent": 3, "children": [145, 146], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 61, "column": 3}}, {"id": 145, "type": "type_identifier", "text": "E", "parent": 144, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 3}}, {"id": 146, "type": "function_declarator", "text": "dequeue()", "parent": 144, "children": [147, 148], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 13}}, {"id": 147, "type": "identifier", "text": "dequeue", "parent": 146, "children": [], "start_point": {"row": 55, "column": 4}, "end_point": {"row": 55, "column": 11}}, {"id": 148, "type": "parameter_list", "text": "()", "parent": 146, "children": [], "start_point": {"row": 55, "column": 11}, "end_point": {"row": 55, "column": 13}}, {"id": 149, "type": "if_statement", "text": "if (length() == 0) \n\t\t\t\tthrow \"Queue is empty\";", "parent": 144, "children": [150], "start_point": {"row": 56, "column": 3}, "end_point": {"row": 57, "column": 27}}, {"id": 150, "type": "parenthesized_expression", "text": "(length() == 0)", "parent": 149, "children": [151], "start_point": {"row": 56, "column": 6}, "end_point": {"row": 56, "column": 21}}, {"id": 151, "type": "binary_expression", "text": "length() == 0", "parent": 150, "children": [152, 155, 156], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 20}}, {"id": 152, "type": "call_expression", "text": "length()", "parent": 151, "children": [153, 154], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 15}}, {"id": 153, "type": "identifier", "text": "length", "parent": 152, "children": [], "start_point": {"row": 56, "column": 7}, "end_point": {"row": 56, "column": 13}}, {"id": 154, "type": "argument_list", "text": "()", "parent": 152, "children": [], "start_point": {"row": 56, "column": 13}, "end_point": {"row": 56, "column": 15}}, {"id": 155, "type": "==", "text": "==", "parent": 151, "children": [], "start_point": {"row": 56, "column": 16}, "end_point": {"row": 56, "column": 18}}, {"id": 156, "type": "number_literal", "text": "0", "parent": 151, "children": [], "start_point": {"row": 56, "column": 19}, "end_point": {"row": 56, "column": 20}}, {"id": 157, "type": "concatenated_string", "text": "throw \"Queue is empty\"", "parent": 149, "children": [158], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 26}}, {"id": 158, "type": "string_literal", "text": "\"Queue is empty\"", "parent": 157, "children": [], "start_point": {"row": 57, "column": 10}, "end_point": {"row": 57, "column": 26}}, {"id": 159, "type": "declaration", "text": "E it = queueArray[front];", "parent": 144, "children": [160, 161], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 28}}, {"id": 160, "type": "type_identifier", "text": "E", "parent": 159, "children": [], "start_point": {"row": 58, "column": 3}, "end_point": {"row": 58, "column": 4}}, {"id": 161, "type": "init_declarator", "text": "it = queueArray[front]", "parent": 159, "children": [162, 163, 164], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 27}}, {"id": 162, "type": "identifier", "text": "it", "parent": 161, "children": [], "start_point": {"row": 58, "column": 5}, "end_point": {"row": 58, "column": 7}}, {"id": 163, "type": "=", "text": "=", "parent": 161, "children": [], "start_point": {"row": 58, "column": 8}, "end_point": {"row": 58, "column": 9}}, {"id": 164, "type": "subscript_expression", "text": "queueArray[front]", "parent": 161, "children": [165, 166], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 27}}, {"id": 165, "type": "identifier", "text": "queueArray", "parent": 164, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 20}}, {"id": 166, "type": "identifier", "text": "front", "parent": 164, "children": [], "start_point": {"row": 58, "column": 21}, "end_point": {"row": 58, "column": 26}}, {"id": 167, "type": "assignment_expression", "text": "front = (front + 1) % maxSize", "parent": 144, "children": [168, 169, 170], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 32}}, {"id": 168, "type": "identifier", "text": "front", "parent": 167, "children": [], "start_point": {"row": 59, "column": 3}, "end_point": {"row": 59, "column": 8}}, {"id": 169, "type": "=", "text": "=", "parent": 167, "children": [], "start_point": {"row": 59, "column": 9}, "end_point": {"row": 59, "column": 10}}, {"id": 170, "type": "binary_expression", "text": "(front + 1) % maxSize", "parent": 167, "children": [171, 176, 177], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 32}}, {"id": 171, "type": "parenthesized_expression", "text": "(front + 1)", "parent": 170, "children": [172], "start_point": {"row": 59, "column": 11}, "end_point": {"row": 59, "column": 22}}, {"id": 172, "type": "binary_expression", "text": "front + 1", "parent": 171, "children": [173, 174, 175], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 21}}, {"id": 173, "type": "identifier", "text": "front", "parent": 172, "children": [], "start_point": {"row": 59, "column": 12}, "end_point": {"row": 59, "column": 17}}, {"id": 174, "type": "+", "text": "+", "parent": 172, "children": [], "start_point": {"row": 59, "column": 18}, "end_point": {"row": 59, "column": 19}}, {"id": 175, "type": "number_literal", "text": "1", "parent": 172, "children": [], "start_point": {"row": 59, "column": 20}, "end_point": {"row": 59, "column": 21}}, {"id": 176, "type": "%", "text": "%", "parent": 170, "children": [], "start_point": {"row": 59, "column": 23}, "end_point": {"row": 59, "column": 24}}, {"id": 177, "type": "identifier", "text": "maxSize", "parent": 170, "children": [], "start_point": {"row": 59, "column": 25}, "end_point": {"row": 59, "column": 32}}, {"id": 178, "type": "return_statement", "text": "return it;", "parent": 144, "children": [179], "start_point": {"row": 60, "column": 3}, "end_point": {"row": 60, "column": 13}}, {"id": 179, "type": "identifier", "text": "it", "parent": 178, "children": [], "start_point": {"row": 60, "column": 10}, "end_point": {"row": 60, "column": 12}}, {"id": 180, "type": "declaration", "text": "const E& frontValue() const {\n\t\t\tif (length() == 0)", "parent": 3, "children": [181, 182, 186], "start_point": {"row": 63, "column": 2}, "end_point": {"row": 64, "column": 21}}, {"id": 181, "type": "type_identifier", "text": "E", "parent": 180, "children": [], "start_point": {"row": 63, "column": 8}, "end_point": {"row": 63, "column": 9}}, {"id": 182, "type": "ERROR", "text": "& frontValue() const {\n\t\t\tif", "parent": 180, "children": [183], "start_point": {"row": 63, "column": 9}, "end_point": {"row": 64, "column": 5}}, {"id": 183, "type": "function_declarator", "text": "frontValue()", "parent": 182, "children": [184, 185], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 23}}, {"id": 184, "type": "identifier", "text": "frontValue", "parent": 183, "children": [], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 21}}, {"id": 185, "type": "parameter_list", "text": "()", "parent": 183, "children": [], "start_point": {"row": 63, "column": 21}, "end_point": {"row": 63, "column": 23}}, {"id": 186, "type": "parenthesized_declarator", "text": "(length() == 0)", "parent": 180, "children": [187, 190], "start_point": {"row": 64, "column": 6}, "end_point": {"row": 64, "column": 21}}, {"id": 187, "type": "function_declarator", "text": "length()", "parent": 186, "children": [188, 189], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 15}}, {"id": 188, "type": "identifier", "text": "length", "parent": 187, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 13}}, {"id": 189, "type": "parameter_list", "text": "()", "parent": 187, "children": [], "start_point": {"row": 64, "column": 13}, "end_point": {"row": 64, "column": 15}}, {"id": 190, "type": "ERROR", "text": "== 0", "parent": 186, "children": [191, 192], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 20}}, {"id": 191, "type": "==", "text": "==", "parent": 190, "children": [], "start_point": {"row": 64, "column": 16}, "end_point": {"row": 64, "column": 18}}, {"id": 192, "type": "number_literal", "text": "0", "parent": 190, "children": [], "start_point": {"row": 64, "column": 19}, "end_point": {"row": 64, "column": 20}}, {"id": 193, "type": "concatenated_string", "text": "throw \"Queue is empty\"", "parent": 3, "children": [194], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 26}}, {"id": 194, "type": "string_literal", "text": "\"Queue is empty\"", "parent": 193, "children": [], "start_point": {"row": 65, "column": 10}, "end_point": {"row": 65, "column": 26}}, {"id": 195, "type": "return_statement", "text": "return queueArray[front];", "parent": 3, "children": [196], "start_point": {"row": 66, "column": 3}, "end_point": {"row": 66, "column": 28}}, {"id": 196, "type": "subscript_expression", "text": "queueArray[front]", "parent": 195, "children": [197, 198], "start_point": {"row": 66, "column": 10}, "end_point": {"row": 66, "column": 27}}, {"id": 197, "type": "identifier", "text": "queueArray", "parent": 196, "children": [], "start_point": {"row": 66, "column": 10}, "end_point": {"row": 66, "column": 20}}, {"id": 198, "type": "identifier", "text": "front", "parent": 196, "children": [], "start_point": {"row": 66, "column": 21}, "end_point": {"row": 66, "column": 26}}, {"id": 199, "type": "ERROR", "text": "}\n\n\n\t\tvirtual int length() const", "parent": 3, "children": [200, 201, 203], "start_point": {"row": 67, "column": 2}, "end_point": {"row": 70, "column": 28}}, {"id": 200, "type": "type_identifier", "text": "virtual", "parent": 199, "children": [], "start_point": {"row": 70, "column": 2}, "end_point": {"row": 70, "column": 9}}, {"id": 201, "type": "ERROR", "text": "int", "parent": 199, "children": [202], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 13}}, {"id": 202, "type": "identifier", "text": "int", "parent": 201, "children": [], "start_point": {"row": 70, "column": 10}, "end_point": {"row": 70, "column": 13}}, {"id": 203, "type": "function_declarator", "text": "length()", "parent": 199, "children": [204, 205], "start_point": {"row": 70, "column": 14}, "end_point": {"row": 70, "column": 22}}, {"id": 204, "type": "identifier", "text": "length", "parent": 203, "children": [], "start_point": {"row": 70, "column": 14}, "end_point": {"row": 70, "column": 20}}, {"id": 205, "type": "parameter_list", "text": "()", "parent": 203, "children": [], "start_point": {"row": 70, "column": 20}, "end_point": {"row": 70, "column": 22}}, {"id": 206, "type": "if_statement", "text": "if (isFull) return maxSize;\n\t\t\telse return ((rear + maxSize) - front + 1) % maxSize;", "parent": 3, "children": [207, 209, 211], "start_point": {"row": 71, "column": 3}, "end_point": {"row": 72, "column": 56}}, {"id": 207, "type": "parenthesized_expression", "text": "(isFull)", "parent": 206, "children": [208], "start_point": {"row": 71, "column": 6}, "end_point": {"row": 71, "column": 14}}, {"id": 208, "type": "identifier", "text": "isFull", "parent": 207, "children": [], "start_point": {"row": 71, "column": 7}, "end_point": {"row": 71, "column": 13}}, {"id": 209, "type": "return_statement", "text": "return maxSize;", "parent": 206, "children": [210], "start_point": {"row": 71, "column": 15}, "end_point": {"row": 71, "column": 30}}, {"id": 210, "type": "identifier", "text": "maxSize", "parent": 209, "children": [], "start_point": {"row": 71, "column": 22}, "end_point": {"row": 71, "column": 29}}, {"id": 211, "type": "else_clause", "text": "else return ((rear + maxSize) - front + 1) % maxSize;", "parent": 206, "children": [212], "start_point": {"row": 72, "column": 3}, "end_point": {"row": 72, "column": 56}}, {"id": 212, "type": "return_statement", "text": "return ((rear + maxSize) - front + 1) % maxSize;", "parent": 211, "children": [213], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 56}}, {"id": 213, "type": "binary_expression", "text": "((rear + maxSize) - front + 1) % maxSize", "parent": 212, "children": [214, 226, 227], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 55}}, {"id": 214, "type": "parenthesized_expression", "text": "((rear + maxSize) - front + 1)", "parent": 213, "children": [215], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 45}}, {"id": 215, "type": "binary_expression", "text": "(rear + maxSize) - front + 1", "parent": 214, "children": [216, 224, 225], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 44}}, {"id": 216, "type": "binary_expression", "text": "(rear + maxSize) - front", "parent": 215, "children": [217, 222, 223], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 40}}, {"id": 217, "type": "parenthesized_expression", "text": "(rear + maxSize)", "parent": 216, "children": [218], "start_point": {"row": 72, "column": 16}, "end_point": {"row": 72, "column": 32}}, {"id": 218, "type": "binary_expression", "text": "rear + maxSize", "parent": 217, "children": [219, 220, 221], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 31}}, {"id": 219, "type": "identifier", "text": "rear", "parent": 218, "children": [], "start_point": {"row": 72, "column": 17}, "end_point": {"row": 72, "column": 21}}, {"id": 220, "type": "+", "text": "+", "parent": 218, "children": [], "start_point": {"row": 72, "column": 22}, "end_point": {"row": 72, "column": 23}}, {"id": 221, "type": "identifier", "text": "maxSize", "parent": 218, "children": [], "start_point": {"row": 72, "column": 24}, "end_point": {"row": 72, "column": 31}}, {"id": 222, "type": "-", "text": "-", "parent": 216, "children": [], "start_point": {"row": 72, "column": 33}, "end_point": {"row": 72, "column": 34}}, {"id": 223, "type": "identifier", "text": "front", "parent": 216, "children": [], "start_point": {"row": 72, "column": 35}, "end_point": {"row": 72, "column": 40}}, {"id": 224, "type": "+", "text": "+", "parent": 215, "children": [], "start_point": {"row": 72, "column": 41}, "end_point": {"row": 72, "column": 42}}, {"id": 225, "type": "number_literal", "text": "1", "parent": 215, "children": [], "start_point": {"row": 72, "column": 43}, "end_point": {"row": 72, "column": 44}}, {"id": 226, "type": "%", "text": "%", "parent": 213, "children": [], "start_point": {"row": 72, "column": 46}, "end_point": {"row": 72, "column": 47}}, {"id": 227, "type": "identifier", "text": "maxSize", "parent": 213, "children": [], "start_point": {"row": 72, "column": 48}, "end_point": {"row": 72, "column": 55}}, {"id": 228, "type": "#endif", "text": "#endif", "parent": 3, "children": [], "start_point": {"row": 76, "column": 0}, "end_point": {"row": 76, "column": 6}}]}, "node_categories": {"declarations": {"functions": [83, 85, 96, 98, 144, 146, 183, 187, 203], "variables": [25, 28, 31, 34, 37, 43, 101, 159, 180], "classes": [], "imports": [0, 1], "modules": [], "enums": []}, "statements": {"expressions": [9, 10, 72, 76, 78, 81, 105, 112, 113, 114, 121, 127, 128, 129, 130, 131, 132, 150, 151, 152, 164, 170, 171, 172, 196, 207, 213, 214, 215, 216, 217, 218], "assignments": [53, 57, 61, 65, 69, 88, 92, 109, 120, 140, 167], "loops": [], "conditionals": [3, 4, 5, 8, 11, 13, 15, 18, 20, 22, 27, 30, 33, 36, 38, 41, 44, 45, 49, 52, 54, 56, 58, 62, 66, 70, 74, 75, 79, 82, 86, 89, 93, 99, 102, 103, 104, 106, 110, 115, 119, 122, 123, 125, 126, 133, 137, 139, 141, 145, 147, 149, 153, 160, 162, 165, 166, 168, 173, 177, 179, 181, 184, 188, 197, 198, 200, 202, 204, 206, 208, 210, 219, 221, 223, 227, 228], "returns": [178, 195, 209, 212], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 64, 68, 91, 95, 107, 108, 117, 135, 156, 157, 158, 175, 192, 193, 194, 225], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 83, "universal_type": "function", "name": "clear", "text_snippet": "void clear() {\n\t\t\trear = 0; \n\t\t\tfront = 1;\n\t\t}"}, {"node_id": 85, "universal_type": "function", "name": "unknown", "text_snippet": "clear()"}, {"node_id": 96, "universal_type": "function", "name": "enqueue", "text_snippet": "void enqueue(const E& it) {\n\t\t\tif (isFull)\n\t\t\t\tthrow \"Queue is full, cannot add item\";\n\t\t\trear = (re"}, {"node_id": 98, "universal_type": "function", "name": "unknown", "text_snippet": "enqueue(const E& it)"}, {"node_id": 144, "universal_type": "function", "name": "unknown", "text_snippet": "E dequeue() {\n\t\t\tif (length() == 0) \n\t\t\t\tthrow \"Queue is empty\";\n\t\t\tE it = queueArray[front];\n\t\t\tfro"}, {"node_id": 146, "universal_type": "function", "name": "unknown", "text_snippet": "dequeue()"}, {"node_id": 183, "universal_type": "function", "name": "unknown", "text_snippet": "frontValue()"}, {"node_id": 187, "universal_type": "function", "name": "unknown", "text_snippet": "length()"}, {"node_id": 203, "universal_type": "function", "name": "unknown", "text_snippet": "length()"}], "class_declarations": [], "import_statements": [{"node_id": 0, "text": "#include \"Queue.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/*\n * =====================================================================================\n *\n * Filename: ArrayQueue.h\n *\n * Description: \n *\n * Version: 1.0\n * Created: 01/07/2015 11:29:19 AM\n * Revision: none\n * Compiler: gcc\n *\n * Author: <NAME> (bep), <EMAIL>\n * Organization: \n *\n * =====================================================================================\n */\n#include \"Queue.h\"\n#ifndef ARRAYQUEUE_H\n#define ARRAYQUEUE_H\ntemplate <typename E> class ArrayQueue: public Queue<E> {\n\tprivate:\n\t\tint maxSize;\n\t\tint front;\n\t\tint rear;\n\t\tbool isFull;\n\t\tE *queueArray;\n\n\tpublic:\n\t\tArrayQueue(int size = defaultSize) {\n\t\t\tmaxSize = size;\n\t\t\tisFull = false;\n\t\t\trear = 0;\n\t\t\tfront = 1;\n\t\t\tqueueArray = new E[maxSize];\n\t\t}\n\n\t\t~ArrayQueue() {\n\t\t\tdelete [] queueArray;\n\t\t}\n\n\t\tvoid clear() {\n\t\t\trear = 0; \n\t\t\tfront = 1;\n\t\t}\n\n\t\tvoid enqueue(const E& it) {\n\t\t\tif (isFull)\n\t\t\t\tthrow \"Queue is full, cannot add item\";\n\t\t\trear = (rear + 1) % maxSize;\n\t\t\tqueueArray[rear] = it;\n\t\t\tif ( ((rear + 1) % maxSize) == front)\n\t\t\t\tisFull = true;\n\t\t}\n\n\t\tE dequeue() {\n\t\t\tif (length() == 0) \n\t\t\t\tthrow \"Queue is empty\";\n\t\t\tE it = queueArray[front];\n\t\t\tfront = (front + 1) % maxSize;\n\t\t\treturn it;\n\t\t}\n\n\t\tconst E& frontValue() const {\n\t\t\tif (length() == 0)\n\t\t\t\tthrow \"Queue is empty\";\n\t\t\treturn queueArray[front];\n\t\t}\n\n\n\t\tvirtual int length() const {\n\t\t\tif (isFull) return maxSize;\n\t\t\telse return ((rear + maxSize) - front + 1) % maxSize;\n\t\t\t\n\t\t}\n};\n#endif\n"}
95
c
// Copyright 2020 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_HEAP_LOCAL_FACTORY_H_ #define V8_HEAP_LOCAL_FACTORY_H_ #include "src/base/logging.h" #include "src/common/globals.h" #include "src/handles/handles.h" #include "src/heap/factory-base.h" #include "src/heap/heap.h" #include "src/heap/read-only-heap.h" #include "src/heap/spaces.h" #include "src/objects/heap-object.h" #include "src/objects/map.h" #include "src/objects/objects.h" #include "src/objects/shared-function-info.h" #include "src/roots/roots.h" namespace v8 { namespace internal { class AstValueFactory; class AstRawString; class AstConsString; class LocalIsolate; class V8_EXPORT_PRIVATE LocalFactory : public FactoryBase<LocalFactory> { public: explicit LocalFactory(Isolate* isolate); ReadOnlyRoots read_only_roots() const { return roots_; } #define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name(); READ_ONLY_ROOT_LIST(ROOT_ACCESSOR) // AccessorInfos appear mutable, but they're actually not mutated once they // finish initializing. In particular, the root accessors are not mutated and // are safe to access (as long as the off-thread job doesn't try to mutate // them). ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR) #undef ROOT_ACCESSOR // The parser shouldn't allow the LocalFactory to get into a state where // it generates errors. Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); } Handle<Object> NewRangeError(MessageTemplate template_index) { UNREACHABLE(); } private: friend class FactoryBase<LocalFactory>; // ------ // Customization points for FactoryBase. HeapObject AllocateRaw(int size, AllocationType allocation, AllocationAlignment alignment = kTaggedAligned); LocalIsolate* isolate() { // Downcast to the privately inherited sub-class using c-style casts to // avoid undefined behavior (as static_cast cannot cast across private // bases). // NOLINTNEXTLINE (google-readability-casting) return (LocalIsolate*)this; // NOLINT(readability/casting) } // This is the real Isolate that will be used for allocating and accessing // external pointer entries when V8_SANDBOXED_EXTERNAL_POINTERS is enabled. Isolate* isolate_for_sandbox() { #ifdef V8_SANDBOXED_EXTERNAL_POINTERS return isolate_for_sandbox_; #else return nullptr; #endif // V8_SANDBOXED_EXTERNAL_POINTERS } inline bool CanAllocateInReadOnlySpace() { return false; } inline bool EmptyStringRootIsInitialized() { return true; } inline AllocationType AllocationTypeForInPlaceInternalizableString(); // ------ void AddToScriptList(Handle<Script> shared); // ------ ReadOnlyRoots roots_; #ifdef V8_SANDBOXED_EXTERNAL_POINTERS Isolate* isolate_for_sandbox_; #endif #ifdef DEBUG bool a_script_was_added_to_the_script_list_ = false; #endif }; } // namespace internal } // namespace v8 #endif // V8_HEAP_LOCAL_FACTORY_H_
36.8
80
(translation_unit) "// Copyright 2020 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef V8_HEAP_LOCAL_FACTORY_H_\n#define V8_HEAP_LOCAL_FACTORY_H_\n\n#include "src/base/logging.h"\n#include "src/common/globals.h"\n#include "src/handles/handles.h"\n#include "src/heap/factory-base.h"\n#include "src/heap/heap.h"\n#include "src/heap/read-only-heap.h"\n#include "src/heap/spaces.h"\n#include "src/objects/heap-object.h"\n#include "src/objects/map.h"\n#include "src/objects/objects.h"\n#include "src/objects/shared-function-info.h"\n#include "src/roots/roots.h"\n\nnamespace v8 {\nnamespace internal {\n\nclass AstValueFactory;\nclass AstRawString;\nclass AstConsString;\nclass LocalIsolate;\n\nclass V8_EXPORT_PRIVATE LocalFactory : public FactoryBase<LocalFactory> {\n public:\n explicit LocalFactory(Isolate* isolate);\n\n ReadOnlyRoots read_only_roots() const { return roots_; }\n\n#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutated once they\n // finish initializing. In particular, the root accessors are not mutated and\n // are safe to access (as long as the off-thread job doesn't try to mutate\n // them).\n ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)\n#undef ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); }\n Handle<Object> NewRangeError(MessageTemplate template_index) {\n UNREACHABLE();\n }\n\n private:\n friend class FactoryBase<LocalFactory>;\n\n // ------\n // Customization points for FactoryBase.\n HeapObject AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned);\n\n LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }\n\n // This is the real Isolate that will be used for allocating and accessing\n // external pointer entries when V8_SANDBOXED_EXTERNAL_POINTERS is enabled.\n Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }\n\n inline bool CanAllocateInReadOnlySpace() { return false; }\n inline bool EmptyStringRootIsInitialized() { return true; }\n inline AllocationType AllocationTypeForInPlaceInternalizableString();\n // ------\n\n void AddToScriptList(Handle<Script> shared);\n // ------\n\n ReadOnlyRoots roots_;\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n Isolate* isolate_for_sandbox_;\n#endif\n#ifdef DEBUG\n bool a_script_was_added_to_the_script_list_ = false;\n#endif\n};\n\n} // namespace internal\n} // namespace v8\n\n#endif // V8_HEAP_LOCAL_FACTORY_H_\n" (comment) "// Copyright 2020 the V8 project authors. All rights reserved." (comment) "// Use of this source code is governed by a BSD-style license that can be" (comment) "// found in the LICENSE file." (preproc_ifdef) "#ifndef V8_HEAP_LOCAL_FACTORY_H_\n#define V8_HEAP_LOCAL_FACTORY_H_\n\n#include "src/base/logging.h"\n#include "src/common/globals.h"\n#include "src/handles/handles.h"\n#include "src/heap/factory-base.h"\n#include "src/heap/heap.h"\n#include "src/heap/read-only-heap.h"\n#include "src/heap/spaces.h"\n#include "src/objects/heap-object.h"\n#include "src/objects/map.h"\n#include "src/objects/objects.h"\n#include "src/objects/shared-function-info.h"\n#include "src/roots/roots.h"\n\nnamespace v8 {\nnamespace internal {\n\nclass AstValueFactory;\nclass AstRawString;\nclass AstConsString;\nclass LocalIsolate;\n\nclass V8_EXPORT_PRIVATE LocalFactory : public FactoryBase<LocalFactory> {\n public:\n explicit LocalFactory(Isolate* isolate);\n\n ReadOnlyRoots read_only_roots() const { return roots_; }\n\n#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutated once they\n // finish initializing. In particular, the root accessors are not mutated and\n // are safe to access (as long as the off-thread job doesn't try to mutate\n // them).\n ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)\n#undef ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); }\n Handle<Object> NewRangeError(MessageTemplate template_index) {\n UNREACHABLE();\n }\n\n private:\n friend class FactoryBase<LocalFactory>;\n\n // ------\n // Customization points for FactoryBase.\n HeapObject AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned);\n\n LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }\n\n // This is the real Isolate that will be used for allocating and accessing\n // external pointer entries when V8_SANDBOXED_EXTERNAL_POINTERS is enabled.\n Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }\n\n inline bool CanAllocateInReadOnlySpace() { return false; }\n inline bool EmptyStringRootIsInitialized() { return true; }\n inline AllocationType AllocationTypeForInPlaceInternalizableString();\n // ------\n\n void AddToScriptList(Handle<Script> shared);\n // ------\n\n ReadOnlyRoots roots_;\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n Isolate* isolate_for_sandbox_;\n#endif\n#ifdef DEBUG\n bool a_script_was_added_to_the_script_list_ = false;\n#endif\n};\n\n} // namespace internal\n} // namespace v8\n\n#endif" (#ifndef) "#ifndef" (identifier) "V8_HEAP_LOCAL_FACTORY_H_" (preproc_def) "#define V8_HEAP_LOCAL_FACTORY_H_\n" (#define) "#define" (identifier) "V8_HEAP_LOCAL_FACTORY_H_" (preproc_include) "#include "src/base/logging.h"\n" (#include) "#include" (string_literal) ""src/base/logging.h"" (") """ (string_content) "src/base/logging.h" (") """ (preproc_include) "#include "src/common/globals.h"\n" (#include) "#include" (string_literal) ""src/common/globals.h"" (") """ (string_content) "src/common/globals.h" (") """ (preproc_include) "#include "src/handles/handles.h"\n" (#include) "#include" (string_literal) ""src/handles/handles.h"" (") """ (string_content) "src/handles/handles.h" (") """ (preproc_include) "#include "src/heap/factory-base.h"\n" (#include) "#include" (string_literal) ""src/heap/factory-base.h"" (") """ (string_content) "src/heap/factory-base.h" (") """ (preproc_include) "#include "src/heap/heap.h"\n" (#include) "#include" (string_literal) ""src/heap/heap.h"" (") """ (string_content) "src/heap/heap.h" (") """ (preproc_include) "#include "src/heap/read-only-heap.h"\n" (#include) "#include" (string_literal) ""src/heap/read-only-heap.h"" (") """ (string_content) "src/heap/read-only-heap.h" (") """ (preproc_include) "#include "src/heap/spaces.h"\n" (#include) "#include" (string_literal) ""src/heap/spaces.h"" (") """ (string_content) "src/heap/spaces.h" (") """ (preproc_include) "#include "src/objects/heap-object.h"\n" (#include) "#include" (string_literal) ""src/objects/heap-object.h"" (") """ (string_content) "src/objects/heap-object.h" (") """ (preproc_include) "#include "src/objects/map.h"\n" (#include) "#include" (string_literal) ""src/objects/map.h"" (") """ (string_content) "src/objects/map.h" (") """ (preproc_include) "#include "src/objects/objects.h"\n" (#include) "#include" (string_literal) ""src/objects/objects.h"" (") """ (string_content) "src/objects/objects.h" (") """ (preproc_include) "#include "src/objects/shared-function-info.h"\n" (#include) "#include" (string_literal) ""src/objects/shared-function-info.h"" (") """ (string_content) "src/objects/shared-function-info.h" (") """ (preproc_include) "#include "src/roots/roots.h"\n" (#include) "#include" (string_literal) ""src/roots/roots.h"" (") """ (string_content) "src/roots/roots.h" (") """ (function_definition) "namespace v8 {\nnamespace internal {\n\nclass AstValueFactory;\nclass AstRawString;\nclass AstConsString;\nclass LocalIsolate;\n\nclass V8_EXPORT_PRIVATE LocalFactory : public FactoryBase<LocalFactory> {\n public:\n explicit LocalFactory(Isolate* isolate);\n\n ReadOnlyRoots read_only_roots() const { return roots_; }\n\n#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutated once they\n // finish initializing. In particular, the root accessors are not mutated and\n // are safe to access (as long as the off-thread job doesn't try to mutate\n // them).\n ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)\n#undef ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); }\n Handle<Object> NewRangeError(MessageTemplate template_index) {\n UNREACHABLE();\n }\n\n private:\n friend class FactoryBase<LocalFactory>;\n\n // ------\n // Customization points for FactoryBase.\n HeapObject AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned);\n\n LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }\n\n // This is the real Isolate that will be used for allocating and accessing\n // external pointer entries when V8_SANDBOXED_EXTERNAL_POINTERS is enabled.\n Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }\n\n inline bool CanAllocateInReadOnlySpace() { return false; }\n inline bool EmptyStringRootIsInitialized() { return true; }\n inline AllocationType AllocationTypeForInPlaceInternalizableString();\n // ------\n\n void AddToScriptList(Handle<Script> shared);\n // ------\n\n ReadOnlyRoots roots_;\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n Isolate* isolate_for_sandbox_;\n#endif\n#ifdef DEBUG\n bool a_script_was_added_to_the_script_list_ = false;\n#endif\n};\n\n} // namespace internal\n}" (type_identifier) "namespace" (identifier) "v8" (compound_statement) "{\nnamespace internal {\n\nclass AstValueFactory;\nclass AstRawString;\nclass AstConsString;\nclass LocalIsolate;\n\nclass V8_EXPORT_PRIVATE LocalFactory : public FactoryBase<LocalFactory> {\n public:\n explicit LocalFactory(Isolate* isolate);\n\n ReadOnlyRoots read_only_roots() const { return roots_; }\n\n#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutated once they\n // finish initializing. In particular, the root accessors are not mutated and\n // are safe to access (as long as the off-thread job doesn't try to mutate\n // them).\n ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)\n#undef ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); }\n Handle<Object> NewRangeError(MessageTemplate template_index) {\n UNREACHABLE();\n }\n\n private:\n friend class FactoryBase<LocalFactory>;\n\n // ------\n // Customization points for FactoryBase.\n HeapObject AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned);\n\n LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }\n\n // This is the real Isolate that will be used for allocating and accessing\n // external pointer entries when V8_SANDBOXED_EXTERNAL_POINTERS is enabled.\n Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }\n\n inline bool CanAllocateInReadOnlySpace() { return false; }\n inline bool EmptyStringRootIsInitialized() { return true; }\n inline AllocationType AllocationTypeForInPlaceInternalizableString();\n // ------\n\n void AddToScriptList(Handle<Script> shared);\n // ------\n\n ReadOnlyRoots roots_;\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n Isolate* isolate_for_sandbox_;\n#endif\n#ifdef DEBUG\n bool a_script_was_added_to_the_script_list_ = false;\n#endif\n};\n\n} // namespace internal\n}" ({) "{" (function_definition) "namespace internal {\n\nclass AstValueFactory;\nclass AstRawString;\nclass AstConsString;\nclass LocalIsolate;\n\nclass V8_EXPORT_PRIVATE LocalFactory : public FactoryBase<LocalFactory> {\n public:\n explicit LocalFactory(Isolate* isolate);\n\n ReadOnlyRoots read_only_roots() const { return roots_; }\n\n#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutated once they\n // finish initializing. In particular, the root accessors are not mutated and\n // are safe to access (as long as the off-thread job doesn't try to mutate\n // them).\n ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)\n#undef ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); }\n Handle<Object> NewRangeError(MessageTemplate template_index) {\n UNREACHABLE();\n }\n\n private:\n friend class FactoryBase<LocalFactory>;\n\n // ------\n // Customization points for FactoryBase.\n HeapObject AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned);\n\n LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }\n\n // This is the real Isolate that will be used for allocating and accessing\n // external pointer entries when V8_SANDBOXED_EXTERNAL_POINTERS is enabled.\n Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }\n\n inline bool CanAllocateInReadOnlySpace() { return false; }\n inline bool EmptyStringRootIsInitialized() { return true; }\n inline AllocationType AllocationTypeForInPlaceInternalizableString();\n // ------\n\n void AddToScriptList(Handle<Script> shared);\n // ------\n\n ReadOnlyRoots roots_;\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n Isolate* isolate_for_sandbox_;\n#endif\n#ifdef DEBUG\n bool a_script_was_added_to_the_script_list_ = false;\n#endif\n};\n\n}" (type_identifier) "namespace" (identifier) "internal" (compound_statement) "{\n\nclass AstValueFactory;\nclass AstRawString;\nclass AstConsString;\nclass LocalIsolate;\n\nclass V8_EXPORT_PRIVATE LocalFactory : public FactoryBase<LocalFactory> {\n public:\n explicit LocalFactory(Isolate* isolate);\n\n ReadOnlyRoots read_only_roots() const { return roots_; }\n\n#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutated once they\n // finish initializing. In particular, the root accessors are not mutated and\n // are safe to access (as long as the off-thread job doesn't try to mutate\n // them).\n ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)\n#undef ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); }\n Handle<Object> NewRangeError(MessageTemplate template_index) {\n UNREACHABLE();\n }\n\n private:\n friend class FactoryBase<LocalFactory>;\n\n // ------\n // Customization points for FactoryBase.\n HeapObject AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned);\n\n LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }\n\n // This is the real Isolate that will be used for allocating and accessing\n // external pointer entries when V8_SANDBOXED_EXTERNAL_POINTERS is enabled.\n Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }\n\n inline bool CanAllocateInReadOnlySpace() { return false; }\n inline bool EmptyStringRootIsInitialized() { return true; }\n inline AllocationType AllocationTypeForInPlaceInternalizableString();\n // ------\n\n void AddToScriptList(Handle<Script> shared);\n // ------\n\n ReadOnlyRoots roots_;\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n Isolate* isolate_for_sandbox_;\n#endif\n#ifdef DEBUG\n bool a_script_was_added_to_the_script_list_ = false;\n#endif\n};\n\n}" ({) "{" (declaration) "class AstValueFactory;" (type_identifier) "class" (identifier) "AstValueFactory" (;) ";" (declaration) "class AstRawString;" (type_identifier) "class" (identifier) "AstRawString" (;) ";" (declaration) "class AstConsString;" (type_identifier) "class" (identifier) "AstConsString" (;) ";" (declaration) "class LocalIsolate;" (type_identifier) "class" (identifier) "LocalIsolate" (;) ";" (declaration) "class V8_EXPORT_PRIVATE" (type_identifier) "class" (identifier) "V8_EXPORT_PRIVATE" (;) "" (ERROR) "LocalFactory : public FactoryBase<LocalFactory>" (binary_expression) "LocalFactory : public FactoryBase<LocalFactory" (identifier) "LocalFactory" (ERROR) ": public FactoryBase" (:) ":" (type_identifier) "public" (identifier) "FactoryBase" (<) "<" (identifier) "LocalFactory" (>) ">" (compound_statement) "{\n public:\n explicit LocalFactory(Isolate* isolate);\n\n ReadOnlyRoots read_only_roots() const { return roots_; }\n\n#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutated once they\n // finish initializing. In particular, the root accessors are not mutated and\n // are safe to access (as long as the off-thread job doesn't try to mutate\n // them).\n ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)\n#undef ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); }\n Handle<Object> NewRangeError(MessageTemplate template_index) {\n UNREACHABLE();\n }\n\n private:\n friend class FactoryBase<LocalFactory>;\n\n // ------\n // Customization points for FactoryBase.\n HeapObject AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned);\n\n LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }\n\n // This is the real Isolate that will be used for allocating and accessing\n // external pointer entries when V8_SANDBOXED_EXTERNAL_POINTERS is enabled.\n Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }\n\n inline bool CanAllocateInReadOnlySpace() { return false; }\n inline bool EmptyStringRootIsInitialized() { return true; }\n inline AllocationType AllocationTypeForInPlaceInternalizableString();\n // ------\n\n void AddToScriptList(Handle<Script> shared);\n // ------\n\n ReadOnlyRoots roots_;\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n Isolate* isolate_for_sandbox_;\n#endif\n#ifdef DEBUG\n bool a_script_was_added_to_the_script_list_ = false;\n#endif\n}" ({) "{" (labeled_statement) "public:\n explicit LocalFactory(Isolate* isolate);" (statement_identifier) "public" (:) ":" (declaration) "explicit LocalFactory(Isolate* isolate);" (type_identifier) "explicit" (function_declarator) "LocalFactory(Isolate* isolate)" (identifier) "LocalFactory" (parameter_list) "(Isolate* isolate)" (() "(" (parameter_declaration) "Isolate* isolate" (type_identifier) "Isolate" (pointer_declarator) "* isolate" (*) "*" (identifier) "isolate" ()) ")" (;) ";" (ERROR) "ReadOnlyRoots read_only_roots() const" (type_identifier) "ReadOnlyRoots" (function_declarator) "read_only_roots()" (identifier) "read_only_roots" (parameter_list) "()" (() "(" ()) ")" (type_qualifier) "const" (const) "const" (compound_statement) "{ return roots_; }" ({) "{" (return_statement) "return roots_;" (return) "return" (identifier) "roots_" (;) ";" (}) "}" (preproc_function_def) "#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n" (#define) "#define" (identifier) "ROOT_ACCESSOR" (preproc_params) "(Type, name, CamelName)" (() "(" (identifier) "Type" (,) "," (identifier) "name" (,) "," (identifier) "CamelName" ()) ")" (preproc_arg) "inline Handle<Type> name();" (function_definition) "READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutated once they\n // finish initializing. In particular, the root accessors are not mutated and\n // are safe to access (as long as the off-thread job doesn't try to mutate\n // them).\n ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)\n#undef ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); }\n Handle<Object> NewRangeError(MessageTemplate template_index) {\n UNREACHABLE();\n }" (macro_type_specifier) "READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)" (identifier) "READ_ONLY_ROOT_LIST" (() "(" (type_descriptor) "ROOT_ACCESSOR" (type_identifier) "ROOT_ACCESSOR" ()) ")" (comment) "// AccessorInfos appear mutable, but they're actually not mutated once they" (comment) "// finish initializing. In particular, the root accessors are not mutated and" (comment) "// are safe to access (as long as the off-thread job doesn't try to mutate" (comment) "// them)." (function_declarator) "ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)" (identifier) "ACCESSOR_INFO_ROOT_LIST" (parameter_list) "(ROOT_ACCESSOR)" (() "(" (identifier) "ROOT_ACCESSOR" ()) ")" (ERROR) "#undef" (preproc_directive) "#undef" (declaration) "ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE();" (type_identifier) "ROOT_ACCESSOR" (comment) "// The parser shouldn't allow the LocalFactory to get into a state where" (comment) "// it generates errors." (ERROR) "Handle<Object> NewInvalidStringLengthError() {" (identifier) "Handle" (<) "<" (identifier) "Object" (>) ">" (function_declarator) "NewInvalidStringLengthError()" (identifier) "NewInvalidStringLengthError" (parameter_list) "()" (() "(" ()) ")" ({) "{" (function_declarator) "UNREACHABLE()" (identifier) "UNREACHABLE" (parameter_list) "()" (() "(" ()) ")" (;) ";" (ERROR) "}\n Handle<Object> NewRangeError(MessageTemplate template_index)" (}) "}" (type_identifier) "Handle" (ERROR) "<Object>" (<) "<" (identifier) "Object" (>) ">" (function_declarator) "NewRangeError(MessageTemplate template_index)" (identifier) "NewRangeError" (parameter_list) "(MessageTemplate template_index)" (() "(" (parameter_declaration) "MessageTemplate template_index" (type_identifier) "MessageTemplate" (identifier) "template_index" ()) ")" (compound_statement) "{\n UNREACHABLE();\n }" ({) "{" (expression_statement) "UNREACHABLE();" (call_expression) "UNREACHABLE()" (identifier) "UNREACHABLE" (argument_list) "()" (() "(" ()) ")" (;) ";" (}) "}" (labeled_statement) "private:\n friend class" (statement_identifier) "private" (:) ":" (declaration) "friend class" (type_identifier) "friend" (identifier) "class" (;) "" (expression_statement) "FactoryBase<LocalFactory>;" (binary_expression) "FactoryBase<LocalFactory>" (binary_expression) "FactoryBase<LocalFactory" (identifier) "FactoryBase" (<) "<" (identifier) "LocalFactory" (>) ">" (identifier) "" (;) ";" (comment) "// ------" (comment) "// Customization points for FactoryBase." (declaration) "HeapObject AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned);" (type_identifier) "HeapObject" (function_declarator) "AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned)" (identifier) "AllocateRaw" (parameter_list) "(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned)" (() "(" (parameter_declaration) "int size" (primitive_type) "int" (identifier) "size" (,) "," (parameter_declaration) "AllocationType allocation" (type_identifier) "AllocationType" (identifier) "allocation" (,) "," (parameter_declaration) "AllocationAlignment alignment = kTaggedAligned" (type_identifier) "AllocationAlignment" (ERROR) "alignment =" (identifier) "alignment" (=) "=" (identifier) "kTaggedAligned" ()) ")" (;) ";" (function_definition) "LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }" (type_identifier) "LocalIsolate" (pointer_declarator) "* isolate()" (*) "*" (function_declarator) "isolate()" (identifier) "isolate" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }" ({) "{" (comment) "// Downcast to the privately inherited sub-class using c-style casts to" (comment) "// avoid undefined behavior (as static_cast cannot cast across private" (comment) "// bases)." (comment) "// NOLINTNEXTLINE (google-readability-casting)" (return_statement) "return (LocalIsolate*)this;" (return) "return" (cast_expression) "(LocalIsolate*)this" (() "(" (type_descriptor) "LocalIsolate*" (type_identifier) "LocalIsolate" (abstract_pointer_declarator) "*" (*) "*" ()) ")" (identifier) "this" (;) ";" (comment) "// NOLINT(readability/casting)" (}) "}" (comment) "// This is the real Isolate that will be used for allocating and accessing" (comment) "// external pointer entries when V8_SANDBOXED_EXTERNAL_POINTERS is enabled." (function_definition) "Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }" (type_identifier) "Isolate" (pointer_declarator) "* isolate_for_sandbox()" (*) "*" (function_declarator) "isolate_for_sandbox()" (identifier) "isolate_for_sandbox" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }" ({) "{" (preproc_ifdef) "#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif" (#ifdef) "#ifdef" (identifier) "V8_SANDBOXED_EXTERNAL_POINTERS" (return_statement) "return isolate_for_sandbox_;" (return) "return" (identifier) "isolate_for_sandbox_" (;) ";" (preproc_else) "#else\n return nullptr;" (#else) "#else" (return_statement) "return nullptr;" (return) "return" (null) "nullptr" (nullptr) "nullptr" (;) ";" (#endif) "#endif" (comment) "// V8_SANDBOXED_EXTERNAL_POINTERS" (}) "}" (function_definition) "inline bool CanAllocateInReadOnlySpace() { return false; }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "bool" (function_declarator) "CanAllocateInReadOnlySpace()" (identifier) "CanAllocateInReadOnlySpace" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return false; }" ({) "{" (return_statement) "return false;" (return) "return" (false) "false" (;) ";" (}) "}" (function_definition) "inline bool EmptyStringRootIsInitialized() { return true; }" (storage_class_specifier) "inline" (inline) "inline" (primitive_type) "bool" (function_declarator) "EmptyStringRootIsInitialized()" (identifier) "EmptyStringRootIsInitialized" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{ return true; }" ({) "{" (return_statement) "return true;" (return) "return" (true) "true" (;) ";" (}) "}" (declaration) "inline AllocationType AllocationTypeForInPlaceInternalizableString();" (storage_class_specifier) "inline" (inline) "inline" (type_identifier) "AllocationType" (function_declarator) "AllocationTypeForInPlaceInternalizableString()" (identifier) "AllocationTypeForInPlaceInternalizableString" (parameter_list) "()" (() "(" ()) ")" (;) ";" (comment) "// ------" (declaration) "void AddToScriptList(Handle<Script> shared);" (primitive_type) "void" (function_declarator) "AddToScriptList(Handle<Script> shared)" (identifier) "AddToScriptList" (parameter_list) "(Handle<Script> shared)" (() "(" (parameter_declaration) "Handle<Script> shared" (type_identifier) "Handle" (ERROR) "<Script>" (<) "<" (identifier) "Script" (>) ">" (identifier) "shared" ()) ")" (;) ";" (comment) "// ------" (declaration) "ReadOnlyRoots roots_;" (type_identifier) "ReadOnlyRoots" (identifier) "roots_" (;) ";" (preproc_ifdef) "#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n Isolate* isolate_for_sandbox_;\n#endif" (#ifdef) "#ifdef" (identifier) "V8_SANDBOXED_EXTERNAL_POINTERS" (declaration) "Isolate* isolate_for_sandbox_;" (type_identifier) "Isolate" (pointer_declarator) "* isolate_for_sandbox_" (*) "*" (identifier) "isolate_for_sandbox_" (;) ";" (#endif) "#endif" (preproc_ifdef) "#ifdef DEBUG\n bool a_script_was_added_to_the_script_list_ = false;\n#endif" (#ifdef) "#ifdef" (identifier) "DEBUG" (declaration) "bool a_script_was_added_to_the_script_list_ = false;" (primitive_type) "bool" (init_declarator) "a_script_was_added_to_the_script_list_ = false" (identifier) "a_script_was_added_to_the_script_list_" (=) "=" (false) "false" (;) ";" (#endif) "#endif" (}) "}" (expression_statement) ";" (;) ";" (}) "}" (comment) "// namespace internal" (}) "}" (comment) "// namespace v8" (#endif) "#endif" (comment) "// V8_HEAP_LOCAL_FACTORY_H_"
424
9
{"language": "c", "success": true, "metadata": {"lines": 80, "avg_line_length": 36.8, "nodes": 250, "errors": 0, "source_hash": "22a29d96497c314facf590e74df2ba9dfbf8308afec84569aa71618b7b744f76", "categorized_nodes": 179}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef V8_HEAP_LOCAL_FACTORY_H_\n#define V8_HEAP_LOCAL_FACTORY_H_\n\n#include \"src/base/logging.h\"\n#include \"src/common/globals.h\"\n#include \"src/handles/handles.h\"\n#include \"src/heap/factory-base.h\"\n#include \"src/heap/heap.h\"\n#include \"src/heap/read-only-heap.h\"\n#include \"src/heap/spaces.h\"\n#include \"src/objects/heap-object.h\"\n#include \"src/objects/map.h\"\n#include \"src/objects/objects.h\"\n#include \"src/objects/shared-function-info.h\"\n#include \"src/roots/roots.h\"\n\nnamespace v8 {\nnamespace internal {\n\nclass AstValueFactory;\nclass AstRawString;\nclass AstConsString;\nclass LocalIsolate;\n\nclass V8_EXPORT_PRIVATE LocalFactory : public FactoryBase<LocalFactory> {\n public:\n explicit LocalFactory(Isolate* isolate);\n\n ReadOnlyRoots read_only_roots() const { return roots_; }\n\n#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutated once they\n // finish initializing. In particular, the root accessors are not mutated and\n // are safe to access (as long as the off-thread job doesn't try to mutate\n // them).\n ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)\n#undef ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); }\n Handle<Object> NewRangeError(MessageTemplate template_index) {\n UNREACHABLE();\n }\n\n private:\n friend class FactoryBase<LocalFactory>;\n\n // ------\n // Customization points for FactoryBase.\n HeapObject AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned);\n\n LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }\n\n // This is the real Isolate that will be used for allocating and accessing\n // external pointer entries when V8_SANDBOXED_EXTERNAL_POINTERS is enabled.\n Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }\n\n inline bool CanAllocateInReadOnlySpace() { return false; }\n inline bool EmptyStringRootIsInitialized() { return true; }\n inline AllocationType AllocationTypeForInPlaceInternalizableString();\n // ------\n\n void AddToScriptList(Handle<Script> shared);\n // ------\n\n ReadOnlyRoots roots_;\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n Isolate* isolate_for_sandbox_;\n#endif\n#ifdef DEBUG\n bool a_script_was_added_to_the_script_list_ = false;\n#endif\n};\n\n} // namespace internal\n} // namespace v8\n\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 249], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 96, "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": "V8_HEAP_LOCAL_FACTORY_H_", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 32}}, {"id": 3, "type": "preproc_def", "text": "#define V8_HEAP_LOCAL_FACTORY_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": "V8_HEAP_LOCAL_FACTORY_H_", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 32}}, {"id": 6, "type": "preproc_include", "text": "#include \"src/base/logging.h\"\n", "parent": 0, "children": [7, 8], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 8, "column": 0}}, {"id": 7, "type": "#include", "text": "#include", "parent": 6, "children": [], "start_point": {"row": 7, "column": 0}, "end_point": {"row": 7, "column": 8}}, {"id": 8, "type": "string_literal", "text": "\"src/base/logging.h\"", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 29}}, {"id": 9, "type": "preproc_include", "text": "#include \"src/common/globals.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": "\"src/common/globals.h\"", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 31}}, {"id": 12, "type": "preproc_include", "text": "#include \"src/handles/handles.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": "\"src/handles/handles.h\"", "parent": 12, "children": [], "start_point": {"row": 9, "column": 9}, "end_point": {"row": 9, "column": 32}}, {"id": 15, "type": "preproc_include", "text": "#include \"src/heap/factory-base.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": "\"src/heap/factory-base.h\"", "parent": 15, "children": [], "start_point": {"row": 10, "column": 9}, "end_point": {"row": 10, "column": 34}}, {"id": 18, "type": "preproc_include", "text": "#include \"src/heap/heap.h\"\n", "parent": 0, "children": [19, 20], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 12, "column": 0}}, {"id": 19, "type": "#include", "text": "#include", "parent": 18, "children": [], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 11, "column": 8}}, {"id": 20, "type": "string_literal", "text": "\"src/heap/heap.h\"", "parent": 18, "children": [], "start_point": {"row": 11, "column": 9}, "end_point": {"row": 11, "column": 26}}, {"id": 21, "type": "preproc_include", "text": "#include \"src/heap/read-only-heap.h\"\n", "parent": 0, "children": [22, 23], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 13, "column": 0}}, {"id": 22, "type": "#include", "text": "#include", "parent": 21, "children": [], "start_point": {"row": 12, "column": 0}, "end_point": {"row": 12, "column": 8}}, {"id": 23, "type": "string_literal", "text": "\"src/heap/read-only-heap.h\"", "parent": 21, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 36}}, {"id": 24, "type": "preproc_include", "text": "#include \"src/heap/spaces.h\"\n", "parent": 0, "children": [25, 26], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 14, "column": 0}}, {"id": 25, "type": "#include", "text": "#include", "parent": 24, "children": [], "start_point": {"row": 13, "column": 0}, "end_point": {"row": 13, "column": 8}}, {"id": 26, "type": "string_literal", "text": "\"src/heap/spaces.h\"", "parent": 24, "children": [], "start_point": {"row": 13, "column": 9}, "end_point": {"row": 13, "column": 28}}, {"id": 27, "type": "preproc_include", "text": "#include \"src/objects/heap-object.h\"\n", "parent": 0, "children": [28, 29], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 15, "column": 0}}, {"id": 28, "type": "#include", "text": "#include", "parent": 27, "children": [], "start_point": {"row": 14, "column": 0}, "end_point": {"row": 14, "column": 8}}, {"id": 29, "type": "string_literal", "text": "\"src/objects/heap-object.h\"", "parent": 27, "children": [], "start_point": {"row": 14, "column": 9}, "end_point": {"row": 14, "column": 36}}, {"id": 30, "type": "preproc_include", "text": "#include \"src/objects/map.h\"\n", "parent": 0, "children": [31, 32], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 16, "column": 0}}, {"id": 31, "type": "#include", "text": "#include", "parent": 30, "children": [], "start_point": {"row": 15, "column": 0}, "end_point": {"row": 15, "column": 8}}, {"id": 32, "type": "string_literal", "text": "\"src/objects/map.h\"", "parent": 30, "children": [], "start_point": {"row": 15, "column": 9}, "end_point": {"row": 15, "column": 28}}, {"id": 33, "type": "preproc_include", "text": "#include \"src/objects/objects.h\"\n", "parent": 0, "children": [34, 35], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 17, "column": 0}}, {"id": 34, "type": "#include", "text": "#include", "parent": 33, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 8}}, {"id": 35, "type": "string_literal", "text": "\"src/objects/objects.h\"", "parent": 33, "children": [], "start_point": {"row": 16, "column": 9}, "end_point": {"row": 16, "column": 32}}, {"id": 36, "type": "preproc_include", "text": "#include \"src/objects/shared-function-info.h\"\n", "parent": 0, "children": [37, 38], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 18, "column": 0}}, {"id": 37, "type": "#include", "text": "#include", "parent": 36, "children": [], "start_point": {"row": 17, "column": 0}, "end_point": {"row": 17, "column": 8}}, {"id": 38, "type": "string_literal", "text": "\"src/objects/shared-function-info.h\"", "parent": 36, "children": [], "start_point": {"row": 17, "column": 9}, "end_point": {"row": 17, "column": 45}}, {"id": 39, "type": "preproc_include", "text": "#include \"src/roots/roots.h\"\n", "parent": 0, "children": [40, 41], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 19, "column": 0}}, {"id": 40, "type": "#include", "text": "#include", "parent": 39, "children": [], "start_point": {"row": 18, "column": 0}, "end_point": {"row": 18, "column": 8}}, {"id": 41, "type": "string_literal", "text": "\"src/roots/roots.h\"", "parent": 39, "children": [], "start_point": {"row": 18, "column": 9}, "end_point": {"row": 18, "column": 28}}, {"id": 42, "type": "function_definition", "text": "namespace v8 {\nnamespace internal {\n\nclass AstValueFactory;\nclass AstRawString;\nclass AstConsString;\nclass LocalIsolate;\n\nclass V8_EXPORT_PRIVATE LocalFactory : public FactoryBase<LocalFactory> {\n public:\n explicit LocalFactory(Isolate* isolate);\n\n ReadOnlyRoots read_only_roots() const { return roots_; }\n\n#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutated once they\n // finish initializing. In particular, the root accessors are not mutated and\n // are safe to access (as long as the off-thread job doesn't try to mutate\n // them).\n ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)\n#undef ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); }\n Handle<Object> NewRangeError(MessageTemplate template_index) {\n UNREACHABLE();\n }\n\n private:\n friend class FactoryBase<LocalFactory>;\n\n // ------\n // Customization points for FactoryBase.\n HeapObject AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned);\n\n LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }\n\n // This is the real Isolate that will be used for allocating and accessing\n // external pointer entries when V8_SANDBOXED_EXTERNAL_POINTERS is enabled.\n Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }\n\n inline bool CanAllocateInReadOnlySpace() { return false; }\n inline bool EmptyStringRootIsInitialized() { return true; }\n inline AllocationType AllocationTypeForInPlaceInternalizableString();\n // ------\n\n void AddToScriptList(Handle<Script> shared);\n // ------\n\n ReadOnlyRoots roots_;\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n Isolate* isolate_for_sandbox_;\n#endif\n#ifdef DEBUG\n bool a_script_was_added_to_the_script_list_ = false;\n#endif\n};\n\n} // namespace internal\n}", "parent": 0, "children": [43, 44], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 94, "column": 1}}, {"id": 43, "type": "type_identifier", "text": "namespace", "parent": 42, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 9}}, {"id": 44, "type": "identifier", "text": "v8", "parent": 42, "children": [], "start_point": {"row": 20, "column": 10}, "end_point": {"row": 20, "column": 12}}, {"id": 45, "type": "function_definition", "text": "namespace internal {\n\nclass AstValueFactory;\nclass AstRawString;\nclass AstConsString;\nclass LocalIsolate;\n\nclass V8_EXPORT_PRIVATE LocalFactory : public FactoryBase<LocalFactory> {\n public:\n explicit LocalFactory(Isolate* isolate);\n\n ReadOnlyRoots read_only_roots() const { return roots_; }\n\n#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutated once they\n // finish initializing. In particular, the root accessors are not mutated and\n // are safe to access (as long as the off-thread job doesn't try to mutate\n // them).\n ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)\n#undef ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); }\n Handle<Object> NewRangeError(MessageTemplate template_index) {\n UNREACHABLE();\n }\n\n private:\n friend class FactoryBase<LocalFactory>;\n\n // ------\n // Customization points for FactoryBase.\n HeapObject AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned);\n\n LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }\n\n // This is the real Isolate that will be used for allocating and accessing\n // external pointer entries when V8_SANDBOXED_EXTERNAL_POINTERS is enabled.\n Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }\n\n inline bool CanAllocateInReadOnlySpace() { return false; }\n inline bool EmptyStringRootIsInitialized() { return true; }\n inline AllocationType AllocationTypeForInPlaceInternalizableString();\n // ------\n\n void AddToScriptList(Handle<Script> shared);\n // ------\n\n ReadOnlyRoots roots_;\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n Isolate* isolate_for_sandbox_;\n#endif\n#ifdef DEBUG\n bool a_script_was_added_to_the_script_list_ = false;\n#endif\n};\n\n}", "parent": 42, "children": [46, 47], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 93, "column": 1}}, {"id": 46, "type": "type_identifier", "text": "namespace", "parent": 45, "children": [], "start_point": {"row": 21, "column": 0}, "end_point": {"row": 21, "column": 9}}, {"id": 47, "type": "identifier", "text": "internal", "parent": 45, "children": [], "start_point": {"row": 21, "column": 10}, "end_point": {"row": 21, "column": 18}}, {"id": 48, "type": "declaration", "text": "class AstValueFactory;", "parent": 45, "children": [49], "start_point": {"row": 23, "column": 0}, "end_point": {"row": 23, "column": 22}}, {"id": 49, "type": "identifier", "text": "AstValueFactory", "parent": 48, "children": [], "start_point": {"row": 23, "column": 6}, "end_point": {"row": 23, "column": 21}}, {"id": 50, "type": "declaration", "text": "class AstRawString;", "parent": 45, "children": [51], "start_point": {"row": 24, "column": 0}, "end_point": {"row": 24, "column": 19}}, {"id": 51, "type": "identifier", "text": "AstRawString", "parent": 50, "children": [], "start_point": {"row": 24, "column": 6}, "end_point": {"row": 24, "column": 18}}, {"id": 52, "type": "declaration", "text": "class AstConsString;", "parent": 45, "children": [53], "start_point": {"row": 25, "column": 0}, "end_point": {"row": 25, "column": 20}}, {"id": 53, "type": "identifier", "text": "AstConsString", "parent": 52, "children": [], "start_point": {"row": 25, "column": 6}, "end_point": {"row": 25, "column": 19}}, {"id": 54, "type": "declaration", "text": "class LocalIsolate;", "parent": 45, "children": [55], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 19}}, {"id": 55, "type": "identifier", "text": "LocalIsolate", "parent": 54, "children": [], "start_point": {"row": 26, "column": 6}, "end_point": {"row": 26, "column": 18}}, {"id": 56, "type": "declaration", "text": "class V8_EXPORT_PRIVATE", "parent": 45, "children": [57], "start_point": {"row": 28, "column": 0}, "end_point": {"row": 28, "column": 23}}, {"id": 57, "type": "identifier", "text": "V8_EXPORT_PRIVATE", "parent": 56, "children": [], "start_point": {"row": 28, "column": 6}, "end_point": {"row": 28, "column": 23}}, {"id": 58, "type": "ERROR", "text": "LocalFactory : public FactoryBase<LocalFactory>", "parent": 45, "children": [59, 65], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 71}}, {"id": 59, "type": "binary_expression", "text": "LocalFactory : public FactoryBase<LocalFactory", "parent": 58, "children": [60, 61, 63, 64], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 70}}, {"id": 60, "type": "identifier", "text": "LocalFactory", "parent": 59, "children": [], "start_point": {"row": 28, "column": 24}, "end_point": {"row": 28, "column": 36}}, {"id": 61, "type": "ERROR", "text": ": public FactoryBase", "parent": 59, "children": [62], "start_point": {"row": 28, "column": 37}, "end_point": {"row": 28, "column": 57}}, {"id": 62, "type": "identifier", "text": "FactoryBase", "parent": 61, "children": [], "start_point": {"row": 28, "column": 46}, "end_point": {"row": 28, "column": 57}}, {"id": 63, "type": "<", "text": "<", "parent": 59, "children": [], "start_point": {"row": 28, "column": 57}, "end_point": {"row": 28, "column": 58}}, {"id": 64, "type": "identifier", "text": "LocalFactory", "parent": 59, "children": [], "start_point": {"row": 28, "column": 58}, "end_point": {"row": 28, "column": 70}}, {"id": 65, "type": ">", "text": ">", "parent": 58, "children": [], "start_point": {"row": 28, "column": 70}, "end_point": {"row": 28, "column": 71}}, {"id": 66, "type": "labeled_statement", "text": "public:\n explicit LocalFactory(Isolate* isolate);", "parent": 45, "children": [67], "start_point": {"row": 29, "column": 1}, "end_point": {"row": 30, "column": 42}}, {"id": 67, "type": "declaration", "text": "explicit LocalFactory(Isolate* isolate);", "parent": 66, "children": [68, 69], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 42}}, {"id": 68, "type": "type_identifier", "text": "explicit", "parent": 67, "children": [], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 10}}, {"id": 69, "type": "function_declarator", "text": "LocalFactory(Isolate* isolate)", "parent": 67, "children": [70, 71], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 41}}, {"id": 70, "type": "identifier", "text": "LocalFactory", "parent": 69, "children": [], "start_point": {"row": 30, "column": 11}, "end_point": {"row": 30, "column": 23}}, {"id": 71, "type": "parameter_list", "text": "(Isolate* isolate)", "parent": 69, "children": [72], "start_point": {"row": 30, "column": 23}, "end_point": {"row": 30, "column": 41}}, {"id": 72, "type": "parameter_declaration", "text": "Isolate* isolate", "parent": 71, "children": [73, 74], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 40}}, {"id": 73, "type": "type_identifier", "text": "Isolate", "parent": 72, "children": [], "start_point": {"row": 30, "column": 24}, "end_point": {"row": 30, "column": 31}}, {"id": 74, "type": "pointer_declarator", "text": "* isolate", "parent": 72, "children": [75, 76], "start_point": {"row": 30, "column": 31}, "end_point": {"row": 30, "column": 40}}, {"id": 75, "type": "*", "text": "*", "parent": 74, "children": [], "start_point": {"row": 30, "column": 31}, "end_point": {"row": 30, "column": 32}}, {"id": 76, "type": "identifier", "text": "isolate", "parent": 74, "children": [], "start_point": {"row": 30, "column": 33}, "end_point": {"row": 30, "column": 40}}, {"id": 77, "type": "ERROR", "text": "ReadOnlyRoots read_only_roots() const", "parent": 45, "children": [78, 79], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 39}}, {"id": 78, "type": "type_identifier", "text": "ReadOnlyRoots", "parent": 77, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 15}}, {"id": 79, "type": "function_declarator", "text": "read_only_roots()", "parent": 77, "children": [80, 81], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 33}}, {"id": 80, "type": "identifier", "text": "read_only_roots", "parent": 79, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 31}}, {"id": 81, "type": "parameter_list", "text": "()", "parent": 79, "children": [], "start_point": {"row": 32, "column": 31}, "end_point": {"row": 32, "column": 33}}, {"id": 82, "type": "return_statement", "text": "return roots_;", "parent": 45, "children": [83], "start_point": {"row": 32, "column": 42}, "end_point": {"row": 32, "column": 56}}, {"id": 83, "type": "identifier", "text": "roots_", "parent": 82, "children": [], "start_point": {"row": 32, "column": 49}, "end_point": {"row": 32, "column": 55}}, {"id": 84, "type": "preproc_function_def", "text": "#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n", "parent": 45, "children": [85, 86, 87, 91], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 35, "column": 0}}, {"id": 85, "type": "#define", "text": "#define", "parent": 84, "children": [], "start_point": {"row": 34, "column": 0}, "end_point": {"row": 34, "column": 7}}, {"id": 86, "type": "identifier", "text": "ROOT_ACCESSOR", "parent": 84, "children": [], "start_point": {"row": 34, "column": 8}, "end_point": {"row": 34, "column": 21}}, {"id": 87, "type": "preproc_params", "text": "(Type, name, CamelName)", "parent": 84, "children": [88, 89, 90], "start_point": {"row": 34, "column": 21}, "end_point": {"row": 34, "column": 44}}, {"id": 88, "type": "identifier", "text": "Type", "parent": 87, "children": [], "start_point": {"row": 34, "column": 22}, "end_point": {"row": 34, "column": 26}}, {"id": 89, "type": "identifier", "text": "name", "parent": 87, "children": [], "start_point": {"row": 34, "column": 28}, "end_point": {"row": 34, "column": 32}}, {"id": 90, "type": "identifier", "text": "CamelName", "parent": 87, "children": [], "start_point": {"row": 34, "column": 34}, "end_point": {"row": 34, "column": 43}}, {"id": 91, "type": "preproc_arg", "text": "inline Handle<Type> name();", "parent": 84, "children": [], "start_point": {"row": 34, "column": 45}, "end_point": {"row": 34, "column": 72}}, {"id": 92, "type": "function_definition", "text": "READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutated once they\n // finish initializing. In particular, the root accessors are not mutated and\n // are safe to access (as long as the off-thread job doesn't try to mutate\n // them).\n ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)\n#undef ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); }\n Handle<Object> NewRangeError(MessageTemplate template_index) {\n UNREACHABLE();\n }", "parent": 45, "children": [93, 97, 101, 103, 116], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 48, "column": 3}}, {"id": 93, "type": "macro_type_specifier", "text": "READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)", "parent": 92, "children": [94, 95], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 36}}, {"id": 94, "type": "identifier", "text": "READ_ONLY_ROOT_LIST", "parent": 93, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 21}}, {"id": 95, "type": "type_descriptor", "text": "ROOT_ACCESSOR", "parent": 93, "children": [96], "start_point": {"row": 35, "column": 22}, "end_point": {"row": 35, "column": 35}}, {"id": 96, "type": "type_identifier", "text": "ROOT_ACCESSOR", "parent": 95, "children": [], "start_point": {"row": 35, "column": 22}, "end_point": {"row": 35, "column": 35}}, {"id": 97, "type": "function_declarator", "text": "ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)", "parent": 92, "children": [98, 99], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 40}}, {"id": 98, "type": "identifier", "text": "ACCESSOR_INFO_ROOT_LIST", "parent": 97, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 25}}, {"id": 99, "type": "parameter_list", "text": "(ROOT_ACCESSOR)", "parent": 97, "children": [100], "start_point": {"row": 40, "column": 25}, "end_point": {"row": 40, "column": 40}}, {"id": 100, "type": "identifier", "text": "ROOT_ACCESSOR", "parent": 99, "children": [], "start_point": {"row": 40, "column": 26}, "end_point": {"row": 40, "column": 39}}, {"id": 101, "type": "ERROR", "text": "#undef", "parent": 92, "children": [102], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 6}}, {"id": 102, "type": "preproc_directive", "text": "#undef", "parent": 101, "children": [], "start_point": {"row": 41, "column": 0}, "end_point": {"row": 41, "column": 6}}, {"id": 103, "type": "declaration", "text": "ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE();", "parent": 92, "children": [104, 105, 113], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 45, "column": 63}}, {"id": 104, "type": "type_identifier", "text": "ROOT_ACCESSOR", "parent": 103, "children": [], "start_point": {"row": 41, "column": 7}, "end_point": {"row": 41, "column": 20}}, {"id": 105, "type": "ERROR", "text": "Handle<Object> NewInvalidStringLengthError() {", "parent": 103, "children": [106, 107, 108, 109, 110], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 48}}, {"id": 106, "type": "identifier", "text": "Handle", "parent": 105, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 8}}, {"id": 107, "type": "<", "text": "<", "parent": 105, "children": [], "start_point": {"row": 45, "column": 8}, "end_point": {"row": 45, "column": 9}}, {"id": 108, "type": "identifier", "text": "Object", "parent": 105, "children": [], "start_point": {"row": 45, "column": 9}, "end_point": {"row": 45, "column": 15}}, {"id": 109, "type": ">", "text": ">", "parent": 105, "children": [], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 16}}, {"id": 110, "type": "function_declarator", "text": "NewInvalidStringLengthError()", "parent": 105, "children": [111, 112], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 46}}, {"id": 111, "type": "identifier", "text": "NewInvalidStringLengthError", "parent": 110, "children": [], "start_point": {"row": 45, "column": 17}, "end_point": {"row": 45, "column": 44}}, {"id": 112, "type": "parameter_list", "text": "()", "parent": 110, "children": [], "start_point": {"row": 45, "column": 44}, "end_point": {"row": 45, "column": 46}}, {"id": 113, "type": "function_declarator", "text": "UNREACHABLE()", "parent": 103, "children": [114, 115], "start_point": {"row": 45, "column": 49}, "end_point": {"row": 45, "column": 62}}, {"id": 114, "type": "identifier", "text": "UNREACHABLE", "parent": 113, "children": [], "start_point": {"row": 45, "column": 49}, "end_point": {"row": 45, "column": 60}}, {"id": 115, "type": "parameter_list", "text": "()", "parent": 113, "children": [], "start_point": {"row": 45, "column": 60}, "end_point": {"row": 45, "column": 62}}, {"id": 116, "type": "ERROR", "text": "}\n Handle<Object> NewRangeError(MessageTemplate template_index)", "parent": 92, "children": [117, 118, 122], "start_point": {"row": 45, "column": 64}, "end_point": {"row": 46, "column": 62}}, {"id": 117, "type": "type_identifier", "text": "Handle", "parent": 116, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 8}}, {"id": 118, "type": "ERROR", "text": "<Object>", "parent": 116, "children": [119, 120, 121], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 16}}, {"id": 119, "type": "<", "text": "<", "parent": 118, "children": [], "start_point": {"row": 46, "column": 8}, "end_point": {"row": 46, "column": 9}}, {"id": 120, "type": "identifier", "text": "Object", "parent": 118, "children": [], "start_point": {"row": 46, "column": 9}, "end_point": {"row": 46, "column": 15}}, {"id": 121, "type": ">", "text": ">", "parent": 118, "children": [], "start_point": {"row": 46, "column": 15}, "end_point": {"row": 46, "column": 16}}, {"id": 122, "type": "function_declarator", "text": "NewRangeError(MessageTemplate template_index)", "parent": 116, "children": [123, 124], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 62}}, {"id": 123, "type": "identifier", "text": "NewRangeError", "parent": 122, "children": [], "start_point": {"row": 46, "column": 17}, "end_point": {"row": 46, "column": 30}}, {"id": 124, "type": "parameter_list", "text": "(MessageTemplate template_index)", "parent": 122, "children": [125], "start_point": {"row": 46, "column": 30}, "end_point": {"row": 46, "column": 62}}, {"id": 125, "type": "parameter_declaration", "text": "MessageTemplate template_index", "parent": 124, "children": [126, 127], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 61}}, {"id": 126, "type": "type_identifier", "text": "MessageTemplate", "parent": 125, "children": [], "start_point": {"row": 46, "column": 31}, "end_point": {"row": 46, "column": 46}}, {"id": 127, "type": "identifier", "text": "template_index", "parent": 125, "children": [], "start_point": {"row": 46, "column": 47}, "end_point": {"row": 46, "column": 61}}, {"id": 128, "type": "call_expression", "text": "UNREACHABLE()", "parent": 92, "children": [129, 130], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 17}}, {"id": 129, "type": "identifier", "text": "UNREACHABLE", "parent": 128, "children": [], "start_point": {"row": 47, "column": 4}, "end_point": {"row": 47, "column": 15}}, {"id": 130, "type": "argument_list", "text": "()", "parent": 128, "children": [], "start_point": {"row": 47, "column": 15}, "end_point": {"row": 47, "column": 17}}, {"id": 131, "type": "labeled_statement", "text": "private:\n friend class", "parent": 45, "children": [132], "start_point": {"row": 50, "column": 1}, "end_point": {"row": 51, "column": 14}}, {"id": 132, "type": "declaration", "text": "friend class", "parent": 131, "children": [133], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 14}}, {"id": 133, "type": "type_identifier", "text": "friend", "parent": 132, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 8}}, {"id": 134, "type": "binary_expression", "text": "FactoryBase<LocalFactory>", "parent": 45, "children": [135, 139, 140], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 40}}, {"id": 135, "type": "binary_expression", "text": "FactoryBase<LocalFactory", "parent": 134, "children": [136, 137, 138], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 39}}, {"id": 136, "type": "identifier", "text": "FactoryBase", "parent": 135, "children": [], "start_point": {"row": 51, "column": 15}, "end_point": {"row": 51, "column": 26}}, {"id": 137, "type": "<", "text": "<", "parent": 135, "children": [], "start_point": {"row": 51, "column": 26}, "end_point": {"row": 51, "column": 27}}, {"id": 138, "type": "identifier", "text": "LocalFactory", "parent": 135, "children": [], "start_point": {"row": 51, "column": 27}, "end_point": {"row": 51, "column": 39}}, {"id": 139, "type": ">", "text": ">", "parent": 134, "children": [], "start_point": {"row": 51, "column": 39}, "end_point": {"row": 51, "column": 40}}, {"id": 140, "type": "identifier", "text": "", "parent": 134, "children": [], "start_point": {"row": 51, "column": 40}, "end_point": {"row": 51, "column": 40}}, {"id": 141, "type": "declaration", "text": "HeapObject AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned);", "parent": 45, "children": [142, 143], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 56, "column": 73}}, {"id": 142, "type": "type_identifier", "text": "HeapObject", "parent": 141, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 12}}, {"id": 143, "type": "function_declarator", "text": "AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned)", "parent": 141, "children": [144, 145], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 56, "column": 72}}, {"id": 144, "type": "identifier", "text": "AllocateRaw", "parent": 143, "children": [], "start_point": {"row": 55, "column": 13}, "end_point": {"row": 55, "column": 24}}, {"id": 145, "type": "parameter_list", "text": "(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned)", "parent": 143, "children": [146, 149, 152], "start_point": {"row": 55, "column": 24}, "end_point": {"row": 56, "column": 72}}, {"id": 146, "type": "parameter_declaration", "text": "int size", "parent": 145, "children": [147, 148], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 33}}, {"id": 147, "type": "primitive_type", "text": "int", "parent": 146, "children": [], "start_point": {"row": 55, "column": 25}, "end_point": {"row": 55, "column": 28}}, {"id": 148, "type": "identifier", "text": "size", "parent": 146, "children": [], "start_point": {"row": 55, "column": 29}, "end_point": {"row": 55, "column": 33}}, {"id": 149, "type": "parameter_declaration", "text": "AllocationType allocation", "parent": 145, "children": [150, 151], "start_point": {"row": 55, "column": 35}, "end_point": {"row": 55, "column": 60}}, {"id": 150, "type": "type_identifier", "text": "AllocationType", "parent": 149, "children": [], "start_point": {"row": 55, "column": 35}, "end_point": {"row": 55, "column": 49}}, {"id": 151, "type": "identifier", "text": "allocation", "parent": 149, "children": [], "start_point": {"row": 55, "column": 50}, "end_point": {"row": 55, "column": 60}}, {"id": 152, "type": "parameter_declaration", "text": "AllocationAlignment alignment = kTaggedAligned", "parent": 145, "children": [153, 154, 157], "start_point": {"row": 56, "column": 25}, "end_point": {"row": 56, "column": 71}}, {"id": 153, "type": "type_identifier", "text": "AllocationAlignment", "parent": 152, "children": [], "start_point": {"row": 56, "column": 25}, "end_point": {"row": 56, "column": 44}}, {"id": 154, "type": "ERROR", "text": "alignment =", "parent": 152, "children": [155, 156], "start_point": {"row": 56, "column": 45}, "end_point": {"row": 56, "column": 56}}, {"id": 155, "type": "identifier", "text": "alignment", "parent": 154, "children": [], "start_point": {"row": 56, "column": 45}, "end_point": {"row": 56, "column": 54}}, {"id": 156, "type": "=", "text": "=", "parent": 154, "children": [], "start_point": {"row": 56, "column": 55}, "end_point": {"row": 56, "column": 56}}, {"id": 157, "type": "identifier", "text": "kTaggedAligned", "parent": 152, "children": [], "start_point": {"row": 56, "column": 57}, "end_point": {"row": 56, "column": 71}}, {"id": 158, "type": "function_definition", "text": "LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }", "parent": 45, "children": [159, 160], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 64, "column": 3}}, {"id": 159, "type": "type_identifier", "text": "LocalIsolate", "parent": 158, "children": [], "start_point": {"row": 58, "column": 2}, "end_point": {"row": 58, "column": 14}}, {"id": 160, "type": "pointer_declarator", "text": "* isolate()", "parent": 158, "children": [161, 162], "start_point": {"row": 58, "column": 14}, "end_point": {"row": 58, "column": 25}}, {"id": 161, "type": "*", "text": "*", "parent": 160, "children": [], "start_point": {"row": 58, "column": 14}, "end_point": {"row": 58, "column": 15}}, {"id": 162, "type": "function_declarator", "text": "isolate()", "parent": 160, "children": [163, 164], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 25}}, {"id": 163, "type": "identifier", "text": "isolate", "parent": 162, "children": [], "start_point": {"row": 58, "column": 16}, "end_point": {"row": 58, "column": 23}}, {"id": 164, "type": "parameter_list", "text": "()", "parent": 162, "children": [], "start_point": {"row": 58, "column": 23}, "end_point": {"row": 58, "column": 25}}, {"id": 165, "type": "return_statement", "text": "return (LocalIsolate*)this;", "parent": 158, "children": [166], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 31}}, {"id": 166, "type": "cast_expression", "text": "(LocalIsolate*)this", "parent": 165, "children": [167, 171], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 30}}, {"id": 167, "type": "type_descriptor", "text": "LocalIsolate*", "parent": 166, "children": [168, 169], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 25}}, {"id": 168, "type": "type_identifier", "text": "LocalIsolate", "parent": 167, "children": [], "start_point": {"row": 63, "column": 12}, "end_point": {"row": 63, "column": 24}}, {"id": 169, "type": "abstract_pointer_declarator", "text": "*", "parent": 167, "children": [170], "start_point": {"row": 63, "column": 24}, "end_point": {"row": 63, "column": 25}}, {"id": 170, "type": "*", "text": "*", "parent": 169, "children": [], "start_point": {"row": 63, "column": 24}, "end_point": {"row": 63, "column": 25}}, {"id": 171, "type": "identifier", "text": "this", "parent": 166, "children": [], "start_point": {"row": 63, "column": 26}, "end_point": {"row": 63, "column": 30}}, {"id": 172, "type": "function_definition", "text": "Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }", "parent": 45, "children": [173, 174], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 74, "column": 3}}, {"id": 173, "type": "type_identifier", "text": "Isolate", "parent": 172, "children": [], "start_point": {"row": 68, "column": 2}, "end_point": {"row": 68, "column": 9}}, {"id": 174, "type": "pointer_declarator", "text": "* isolate_for_sandbox()", "parent": 172, "children": [175, 176], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 32}}, {"id": 175, "type": "*", "text": "*", "parent": 174, "children": [], "start_point": {"row": 68, "column": 9}, "end_point": {"row": 68, "column": 10}}, {"id": 176, "type": "function_declarator", "text": "isolate_for_sandbox()", "parent": 174, "children": [177, 178], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 32}}, {"id": 177, "type": "identifier", "text": "isolate_for_sandbox", "parent": 176, "children": [], "start_point": {"row": 68, "column": 11}, "end_point": {"row": 68, "column": 30}}, {"id": 178, "type": "parameter_list", "text": "()", "parent": 176, "children": [], "start_point": {"row": 68, "column": 30}, "end_point": {"row": 68, "column": 32}}, {"id": 179, "type": "preproc_ifdef", "text": "#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif", "parent": 172, "children": [180, 181, 182, 184, 189], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 73, "column": 6}}, {"id": 180, "type": "#ifdef", "text": "#ifdef", "parent": 179, "children": [], "start_point": {"row": 69, "column": 0}, "end_point": {"row": 69, "column": 6}}, {"id": 181, "type": "identifier", "text": "V8_SANDBOXED_EXTERNAL_POINTERS", "parent": 179, "children": [], "start_point": {"row": 69, "column": 7}, "end_point": {"row": 69, "column": 37}}, {"id": 182, "type": "return_statement", "text": "return isolate_for_sandbox_;", "parent": 179, "children": [183], "start_point": {"row": 70, "column": 4}, "end_point": {"row": 70, "column": 32}}, {"id": 183, "type": "identifier", "text": "isolate_for_sandbox_", "parent": 182, "children": [], "start_point": {"row": 70, "column": 11}, "end_point": {"row": 70, "column": 31}}, {"id": 184, "type": "preproc_else", "text": "#else\n return nullptr;", "parent": 179, "children": [185, 186], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 72, "column": 19}}, {"id": 185, "type": "#else", "text": "#else", "parent": 184, "children": [], "start_point": {"row": 71, "column": 0}, "end_point": {"row": 71, "column": 5}}, {"id": 186, "type": "return_statement", "text": "return nullptr;", "parent": 184, "children": [187], "start_point": {"row": 72, "column": 4}, "end_point": {"row": 72, "column": 19}}, {"id": 187, "type": "null", "text": "nullptr", "parent": 186, "children": [188], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 18}}, {"id": 188, "type": "nullptr", "text": "nullptr", "parent": 187, "children": [], "start_point": {"row": 72, "column": 11}, "end_point": {"row": 72, "column": 18}}, {"id": 189, "type": "#endif", "text": "#endif", "parent": 179, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 6}}, {"id": 190, "type": "function_definition", "text": "inline bool CanAllocateInReadOnlySpace() { return false; }", "parent": 45, "children": [191, 193, 194], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 60}}, {"id": 191, "type": "storage_class_specifier", "text": "inline", "parent": 190, "children": [192], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 8}}, {"id": 192, "type": "inline", "text": "inline", "parent": 191, "children": [], "start_point": {"row": 76, "column": 2}, "end_point": {"row": 76, "column": 8}}, {"id": 193, "type": "primitive_type", "text": "bool", "parent": 190, "children": [], "start_point": {"row": 76, "column": 9}, "end_point": {"row": 76, "column": 13}}, {"id": 194, "type": "function_declarator", "text": "CanAllocateInReadOnlySpace()", "parent": 190, "children": [195, 196], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 42}}, {"id": 195, "type": "identifier", "text": "CanAllocateInReadOnlySpace", "parent": 194, "children": [], "start_point": {"row": 76, "column": 14}, "end_point": {"row": 76, "column": 40}}, {"id": 196, "type": "parameter_list", "text": "()", "parent": 194, "children": [], "start_point": {"row": 76, "column": 40}, "end_point": {"row": 76, "column": 42}}, {"id": 197, "type": "return_statement", "text": "return false;", "parent": 190, "children": [198], "start_point": {"row": 76, "column": 45}, "end_point": {"row": 76, "column": 58}}, {"id": 198, "type": "false", "text": "false", "parent": 197, "children": [], "start_point": {"row": 76, "column": 52}, "end_point": {"row": 76, "column": 57}}, {"id": 199, "type": "function_definition", "text": "inline bool EmptyStringRootIsInitialized() { return true; }", "parent": 45, "children": [200, 202, 203], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 61}}, {"id": 200, "type": "storage_class_specifier", "text": "inline", "parent": 199, "children": [201], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 8}}, {"id": 201, "type": "inline", "text": "inline", "parent": 200, "children": [], "start_point": {"row": 77, "column": 2}, "end_point": {"row": 77, "column": 8}}, {"id": 202, "type": "primitive_type", "text": "bool", "parent": 199, "children": [], "start_point": {"row": 77, "column": 9}, "end_point": {"row": 77, "column": 13}}, {"id": 203, "type": "function_declarator", "text": "EmptyStringRootIsInitialized()", "parent": 199, "children": [204, 205], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 44}}, {"id": 204, "type": "identifier", "text": "EmptyStringRootIsInitialized", "parent": 203, "children": [], "start_point": {"row": 77, "column": 14}, "end_point": {"row": 77, "column": 42}}, {"id": 205, "type": "parameter_list", "text": "()", "parent": 203, "children": [], "start_point": {"row": 77, "column": 42}, "end_point": {"row": 77, "column": 44}}, {"id": 206, "type": "return_statement", "text": "return true;", "parent": 199, "children": [207], "start_point": {"row": 77, "column": 47}, "end_point": {"row": 77, "column": 59}}, {"id": 207, "type": "true", "text": "true", "parent": 206, "children": [], "start_point": {"row": 77, "column": 54}, "end_point": {"row": 77, "column": 58}}, {"id": 208, "type": "declaration", "text": "inline AllocationType AllocationTypeForInPlaceInternalizableString();", "parent": 45, "children": [209, 211, 212], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 71}}, {"id": 209, "type": "storage_class_specifier", "text": "inline", "parent": 208, "children": [210], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 8}}, {"id": 210, "type": "inline", "text": "inline", "parent": 209, "children": [], "start_point": {"row": 78, "column": 2}, "end_point": {"row": 78, "column": 8}}, {"id": 211, "type": "type_identifier", "text": "AllocationType", "parent": 208, "children": [], "start_point": {"row": 78, "column": 9}, "end_point": {"row": 78, "column": 23}}, {"id": 212, "type": "function_declarator", "text": "AllocationTypeForInPlaceInternalizableString()", "parent": 208, "children": [213, 214], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 70}}, {"id": 213, "type": "identifier", "text": "AllocationTypeForInPlaceInternalizableString", "parent": 212, "children": [], "start_point": {"row": 78, "column": 24}, "end_point": {"row": 78, "column": 68}}, {"id": 214, "type": "parameter_list", "text": "()", "parent": 212, "children": [], "start_point": {"row": 78, "column": 68}, "end_point": {"row": 78, "column": 70}}, {"id": 215, "type": "declaration", "text": "void AddToScriptList(Handle<Script> shared);", "parent": 45, "children": [216, 217], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 46}}, {"id": 216, "type": "primitive_type", "text": "void", "parent": 215, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 6}}, {"id": 217, "type": "function_declarator", "text": "AddToScriptList(Handle<Script> shared)", "parent": 215, "children": [218, 219], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 45}}, {"id": 218, "type": "identifier", "text": "AddToScriptList", "parent": 217, "children": [], "start_point": {"row": 81, "column": 7}, "end_point": {"row": 81, "column": 22}}, {"id": 219, "type": "parameter_list", "text": "(Handle<Script> shared)", "parent": 217, "children": [220], "start_point": {"row": 81, "column": 22}, "end_point": {"row": 81, "column": 45}}, {"id": 220, "type": "parameter_declaration", "text": "Handle<Script> shared", "parent": 219, "children": [221, 222, 226], "start_point": {"row": 81, "column": 23}, "end_point": {"row": 81, "column": 44}}, {"id": 221, "type": "type_identifier", "text": "Handle", "parent": 220, "children": [], "start_point": {"row": 81, "column": 23}, "end_point": {"row": 81, "column": 29}}, {"id": 222, "type": "ERROR", "text": "<Script>", "parent": 220, "children": [223, 224, 225], "start_point": {"row": 81, "column": 29}, "end_point": {"row": 81, "column": 37}}, {"id": 223, "type": "<", "text": "<", "parent": 222, "children": [], "start_point": {"row": 81, "column": 29}, "end_point": {"row": 81, "column": 30}}, {"id": 224, "type": "identifier", "text": "Script", "parent": 222, "children": [], "start_point": {"row": 81, "column": 30}, "end_point": {"row": 81, "column": 36}}, {"id": 225, "type": ">", "text": ">", "parent": 222, "children": [], "start_point": {"row": 81, "column": 36}, "end_point": {"row": 81, "column": 37}}, {"id": 226, "type": "identifier", "text": "shared", "parent": 220, "children": [], "start_point": {"row": 81, "column": 38}, "end_point": {"row": 81, "column": 44}}, {"id": 227, "type": "declaration", "text": "ReadOnlyRoots roots_;", "parent": 45, "children": [228, 229], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 23}}, {"id": 228, "type": "type_identifier", "text": "ReadOnlyRoots", "parent": 227, "children": [], "start_point": {"row": 84, "column": 2}, "end_point": {"row": 84, "column": 15}}, {"id": 229, "type": "identifier", "text": "roots_", "parent": 227, "children": [], "start_point": {"row": 84, "column": 16}, "end_point": {"row": 84, "column": 22}}, {"id": 230, "type": "preproc_ifdef", "text": "#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n Isolate* isolate_for_sandbox_;\n#endif", "parent": 45, "children": [231, 232, 233, 238], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 87, "column": 6}}, {"id": 231, "type": "#ifdef", "text": "#ifdef", "parent": 230, "children": [], "start_point": {"row": 85, "column": 0}, "end_point": {"row": 85, "column": 6}}, {"id": 232, "type": "identifier", "text": "V8_SANDBOXED_EXTERNAL_POINTERS", "parent": 230, "children": [], "start_point": {"row": 85, "column": 7}, "end_point": {"row": 85, "column": 37}}, {"id": 233, "type": "declaration", "text": "Isolate* isolate_for_sandbox_;", "parent": 230, "children": [234, 235], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 32}}, {"id": 234, "type": "type_identifier", "text": "Isolate", "parent": 233, "children": [], "start_point": {"row": 86, "column": 2}, "end_point": {"row": 86, "column": 9}}, {"id": 235, "type": "pointer_declarator", "text": "* isolate_for_sandbox_", "parent": 233, "children": [236, 237], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 31}}, {"id": 236, "type": "*", "text": "*", "parent": 235, "children": [], "start_point": {"row": 86, "column": 9}, "end_point": {"row": 86, "column": 10}}, {"id": 237, "type": "identifier", "text": "isolate_for_sandbox_", "parent": 235, "children": [], "start_point": {"row": 86, "column": 11}, "end_point": {"row": 86, "column": 31}}, {"id": 238, "type": "#endif", "text": "#endif", "parent": 230, "children": [], "start_point": {"row": 87, "column": 0}, "end_point": {"row": 87, "column": 6}}, {"id": 239, "type": "preproc_ifdef", "text": "#ifdef DEBUG\n bool a_script_was_added_to_the_script_list_ = false;\n#endif", "parent": 45, "children": [240, 241, 242, 248], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 90, "column": 6}}, {"id": 240, "type": "#ifdef", "text": "#ifdef", "parent": 239, "children": [], "start_point": {"row": 88, "column": 0}, "end_point": {"row": 88, "column": 6}}, {"id": 241, "type": "identifier", "text": "DEBUG", "parent": 239, "children": [], "start_point": {"row": 88, "column": 7}, "end_point": {"row": 88, "column": 12}}, {"id": 242, "type": "declaration", "text": "bool a_script_was_added_to_the_script_list_ = false;", "parent": 239, "children": [243, 244], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 54}}, {"id": 243, "type": "primitive_type", "text": "bool", "parent": 242, "children": [], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 6}}, {"id": 244, "type": "init_declarator", "text": "a_script_was_added_to_the_script_list_ = false", "parent": 242, "children": [245, 246, 247], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 53}}, {"id": 245, "type": "identifier", "text": "a_script_was_added_to_the_script_list_", "parent": 244, "children": [], "start_point": {"row": 89, "column": 7}, "end_point": {"row": 89, "column": 45}}, {"id": 246, "type": "=", "text": "=", "parent": 244, "children": [], "start_point": {"row": 89, "column": 46}, "end_point": {"row": 89, "column": 47}}, {"id": 247, "type": "false", "text": "false", "parent": 244, "children": [], "start_point": {"row": 89, "column": 48}, "end_point": {"row": 89, "column": 53}}, {"id": 248, "type": "#endif", "text": "#endif", "parent": 239, "children": [], "start_point": {"row": 90, "column": 0}, "end_point": {"row": 90, "column": 6}}, {"id": 249, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 96, "column": 0}, "end_point": {"row": 96, "column": 6}}]}, "node_categories": {"declarations": {"functions": [42, 45, 69, 79, 84, 92, 97, 110, 113, 122, 143, 158, 162, 172, 176, 190, 194, 199, 203, 212, 217], "variables": [48, 50, 52, 54, 56, 67, 72, 103, 125, 132, 141, 146, 149, 152, 208, 215, 220, 227, 233, 242], "classes": [191, 200, 209], "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], "modules": [], "enums": []}, "statements": {"expressions": [59, 128, 134, 135, 166], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 43, 44, 46, 47, 49, 51, 53, 55, 57, 60, 62, 64, 68, 70, 73, 76, 78, 80, 83, 86, 88, 89, 90, 93, 94, 96, 98, 100, 104, 106, 108, 111, 114, 117, 120, 123, 126, 127, 129, 133, 136, 138, 140, 142, 144, 148, 150, 151, 153, 155, 157, 159, 163, 168, 171, 173, 177, 179, 180, 181, 183, 189, 195, 204, 211, 213, 218, 221, 224, 226, 228, 229, 230, 231, 232, 234, 237, 238, 239, 240, 241, 245, 248, 249], "returns": [82, 165, 182, 186, 197, 206], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 42, "universal_type": "function", "name": "AstValueFactory;", "text_snippet": "namespace v8 {\nnamespace internal {\n\nclass AstValueFactory;\nclass AstRawString;\nclass AstConsString;"}, {"node_id": 45, "universal_type": "function", "name": "AstValueFactory;", "text_snippet": "namespace internal {\n\nclass AstValueFactory;\nclass AstRawString;\nclass AstConsString;\nclass LocalIso"}, {"node_id": 69, "universal_type": "function", "name": "unknown", "text_snippet": "LocalFactory(Isolate* isolate)"}, {"node_id": 79, "universal_type": "function", "name": "unknown", "text_snippet": "read_only_roots()"}, {"node_id": 84, "universal_type": "function", "name": "unknown", "text_snippet": "#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n"}, {"node_id": 92, "universal_type": "function", "name": "unknown", "text_snippet": "READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutat"}, {"node_id": 97, "universal_type": "function", "name": "unknown", "text_snippet": "ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)"}, {"node_id": 110, "universal_type": "function", "name": "unknown", "text_snippet": "NewInvalidStringLengthError()"}, {"node_id": 113, "universal_type": "function", "name": "unknown", "text_snippet": "UNREACHABLE()"}, {"node_id": 122, "universal_type": "function", "name": "unknown", "text_snippet": "NewRangeError(MessageTemplate template_index)"}, {"node_id": 143, "universal_type": "function", "name": "unknown", "text_snippet": "AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignm"}, {"node_id": 158, "universal_type": "function", "name": "unknown", "text_snippet": "LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts t"}, {"node_id": 162, "universal_type": "function", "name": "unknown", "text_snippet": "isolate()"}, {"node_id": 172, "universal_type": "function", "name": "unknown", "text_snippet": "Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbo"}, {"node_id": 176, "universal_type": "function", "name": "unknown", "text_snippet": "isolate_for_sandbox()"}, {"node_id": 190, "universal_type": "function", "name": "CanAllocateInReadOnlySpace", "text_snippet": "inline bool CanAllocateInReadOnlySpace() { return false; }"}, {"node_id": 194, "universal_type": "function", "name": "unknown", "text_snippet": "CanAllocateInReadOnlySpace()"}, {"node_id": 199, "universal_type": "function", "name": "EmptyStringRootIsInitialized", "text_snippet": "inline bool EmptyStringRootIsInitialized() { return true; }"}, {"node_id": 203, "universal_type": "function", "name": "unknown", "text_snippet": "EmptyStringRootIsInitialized()"}, {"node_id": 212, "universal_type": "function", "name": "unknown", "text_snippet": "AllocationTypeForInPlaceInternalizableString()"}, {"node_id": 217, "universal_type": "function", "name": "unknown", "text_snippet": "AddToScriptList(Handle<Script> shared)"}], "class_declarations": [{"node_id": 191, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 200, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}, {"node_id": 209, "universal_type": "class", "name": "unknown", "text_snippet": "inline"}], "import_statements": [{"node_id": 6, "text": "#include \"src/base/logging.h\"\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"src/common/globals.h\"\n"}, {"node_id": 10, "text": "#include"}, {"node_id": 12, "text": "#include \"src/handles/handles.h\"\n"}, {"node_id": 13, "text": "#include"}, {"node_id": 15, "text": "#include \"src/heap/factory-base.h\"\n"}, {"node_id": 16, "text": "#include"}, {"node_id": 18, "text": "#include \"src/heap/heap.h\"\n"}, {"node_id": 19, "text": "#include"}, {"node_id": 21, "text": "#include \"src/heap/read-only-heap.h\"\n"}, {"node_id": 22, "text": "#include"}, {"node_id": 24, "text": "#include \"src/heap/spaces.h\"\n"}, {"node_id": 25, "text": "#include"}, {"node_id": 27, "text": "#include \"src/objects/heap-object.h\"\n"}, {"node_id": 28, "text": "#include"}, {"node_id": 30, "text": "#include \"src/objects/map.h\"\n"}, {"node_id": 31, "text": "#include"}, {"node_id": 33, "text": "#include \"src/objects/objects.h\"\n"}, {"node_id": 34, "text": "#include"}, {"node_id": 36, "text": "#include \"src/objects/shared-function-info.h\"\n"}, {"node_id": 37, "text": "#include"}, {"node_id": 39, "text": "#include \"src/roots/roots.h\"\n"}, {"node_id": 40, "text": "#include"}]}, "original_source_code": "// Copyright 2020 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef V8_HEAP_LOCAL_FACTORY_H_\n#define V8_HEAP_LOCAL_FACTORY_H_\n\n#include \"src/base/logging.h\"\n#include \"src/common/globals.h\"\n#include \"src/handles/handles.h\"\n#include \"src/heap/factory-base.h\"\n#include \"src/heap/heap.h\"\n#include \"src/heap/read-only-heap.h\"\n#include \"src/heap/spaces.h\"\n#include \"src/objects/heap-object.h\"\n#include \"src/objects/map.h\"\n#include \"src/objects/objects.h\"\n#include \"src/objects/shared-function-info.h\"\n#include \"src/roots/roots.h\"\n\nnamespace v8 {\nnamespace internal {\n\nclass AstValueFactory;\nclass AstRawString;\nclass AstConsString;\nclass LocalIsolate;\n\nclass V8_EXPORT_PRIVATE LocalFactory : public FactoryBase<LocalFactory> {\n public:\n explicit LocalFactory(Isolate* isolate);\n\n ReadOnlyRoots read_only_roots() const { return roots_; }\n\n#define ROOT_ACCESSOR(Type, name, CamelName) inline Handle<Type> name();\n READ_ONLY_ROOT_LIST(ROOT_ACCESSOR)\n // AccessorInfos appear mutable, but they're actually not mutated once they\n // finish initializing. In particular, the root accessors are not mutated and\n // are safe to access (as long as the off-thread job doesn't try to mutate\n // them).\n ACCESSOR_INFO_ROOT_LIST(ROOT_ACCESSOR)\n#undef ROOT_ACCESSOR\n\n // The parser shouldn't allow the LocalFactory to get into a state where\n // it generates errors.\n Handle<Object> NewInvalidStringLengthError() { UNREACHABLE(); }\n Handle<Object> NewRangeError(MessageTemplate template_index) {\n UNREACHABLE();\n }\n\n private:\n friend class FactoryBase<LocalFactory>;\n\n // ------\n // Customization points for FactoryBase.\n HeapObject AllocateRaw(int size, AllocationType allocation,\n AllocationAlignment alignment = kTaggedAligned);\n\n LocalIsolate* isolate() {\n // Downcast to the privately inherited sub-class using c-style casts to\n // avoid undefined behavior (as static_cast cannot cast across private\n // bases).\n // NOLINTNEXTLINE (google-readability-casting)\n return (LocalIsolate*)this; // NOLINT(readability/casting)\n }\n\n // This is the real Isolate that will be used for allocating and accessing\n // external pointer entries when V8_SANDBOXED_EXTERNAL_POINTERS is enabled.\n Isolate* isolate_for_sandbox() {\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n return isolate_for_sandbox_;\n#else\n return nullptr;\n#endif // V8_SANDBOXED_EXTERNAL_POINTERS\n }\n\n inline bool CanAllocateInReadOnlySpace() { return false; }\n inline bool EmptyStringRootIsInitialized() { return true; }\n inline AllocationType AllocationTypeForInPlaceInternalizableString();\n // ------\n\n void AddToScriptList(Handle<Script> shared);\n // ------\n\n ReadOnlyRoots roots_;\n#ifdef V8_SANDBOXED_EXTERNAL_POINTERS\n Isolate* isolate_for_sandbox_;\n#endif\n#ifdef DEBUG\n bool a_script_was_added_to_the_script_list_ = false;\n#endif\n};\n\n} // namespace internal\n} // namespace v8\n\n#endif // V8_HEAP_LOCAL_FACTORY_H_\n"}
96
c
// // Created by windyear_office on 18-4-5. // #ifndef HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H #define HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H #include <iostream> #include "fly_behavior.h" class FlyWithWings: public FlyBehavior{ public: void Fly(){ std::cout << "I can fly with wings! I am very happy!" << std::endl; } }; #endif //HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H
26.86
14
(translation_unit) "//\n// Created by windyear_office on 18-4-5.\n//\n\n#ifndef HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H\n#define HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H\n\n#include <iostream>\n#include "fly_behavior.h"\n\nclass FlyWithWings: public FlyBehavior{\npublic:\n void Fly(){\n std::cout << "I can fly with wings! I am very happy!" << std::endl;\n }\n};\n#endif //HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H\n" (comment) "//" (comment) "// Created by windyear_office on 18-4-5." (comment) "//" (preproc_ifdef) "#ifndef HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H\n#define HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H\n\n#include <iostream>\n#include "fly_behavior.h"\n\nclass FlyWithWings: public FlyBehavior{\npublic:\n void Fly(){\n std::cout << "I can fly with wings! I am very happy!" << std::endl;\n }\n};\n#endif" (#ifndef) "#ifndef" (identifier) "HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H" (preproc_def) "#define HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H\n" (#define) "#define" (identifier) "HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H" (preproc_include) "#include <iostream>\n" (#include) "#include" (system_lib_string) "<iostream>" (preproc_include) "#include "fly_behavior.h"\n" (#include) "#include" (string_literal) ""fly_behavior.h"" (") """ (string_content) "fly_behavior.h" (") """ (function_definition) "class FlyWithWings: public FlyBehavior{\npublic:\n void Fly(){\n std::cout << "I can fly with wings! I am very happy!" << std::endl;\n }\n}" (type_identifier) "class" (identifier) "FlyWithWings" (ERROR) ": public FlyBehavior" (:) ":" (identifier) "public" (identifier) "FlyBehavior" (compound_statement) "{\npublic:\n void Fly(){\n std::cout << "I can fly with wings! I am very happy!" << std::endl;\n }\n}" ({) "{" (labeled_statement) "public:\n void Fly(){\n std::cout << "I can fly with wings! I am very happy!" << std::endl;\n }" (statement_identifier) "public" (:) ":" (ERROR) "void Fly()" (primitive_type) "void" (function_declarator) "Fly()" (identifier) "Fly" (parameter_list) "()" (() "(" ()) ")" (compound_statement) "{\n std::cout << "I can fly with wings! I am very happy!" << std::endl;\n }" ({) "{" (labeled_statement) "std::cout << "I can fly with wings! I am very happy!" << std::endl;" (statement_identifier) "std" (ERROR) "::cout << "I can fly with wings! I am very happy!" << std:" (:) ":" (:) ":" (binary_expression) "cout << "I can fly with wings! I am very happy!" << std" (binary_expression) "cout << "I can fly with wings! I am very happy!"" (identifier) "cout" (<<) "<<" (string_literal) ""I can fly with wings! I am very happy!"" (") """ (string_content) "I can fly with wings! I am very happy!" (") """ (<<) "<<" (identifier) "std" (:) ":" (:) ":" (expression_statement) "endl;" (identifier) "endl" (;) ";" (}) "}" (}) "}" (expression_statement) ";" (;) ";" (#endif) "#endif" (comment) "//HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H"
66
3
{"language": "c", "success": true, "metadata": {"lines": 14, "avg_line_length": 26.86, "nodes": 34, "errors": 0, "source_hash": "5c434e86f175bd0fa8c0da0a691baffd5ab62baaa75411a4f54bea182a45349d", "categorized_nodes": 23}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_ifdef", "text": "#ifndef HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H\n#define HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H\n\n#include <iostream>\n#include \"fly_behavior.h\"\n\nclass FlyWithWings: public FlyBehavior{\npublic:\n void Fly(){\n std::cout << \"I can fly with wings! I am very happy!\" << std::endl;\n }\n};\n#endif", "parent": null, "children": [1, 2, 3, 6, 9, 12, 33], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 16, "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": "HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H", "parent": 0, "children": [], "start_point": {"row": 4, "column": 8}, "end_point": {"row": 4, "column": 48}}, {"id": 3, "type": "preproc_def", "text": "#define HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_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": "HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H", "parent": 3, "children": [], "start_point": {"row": 5, "column": 8}, "end_point": {"row": 5, "column": 48}}, {"id": 6, "type": "preproc_include", "text": "#include <iostream>\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": "<iostream>", "parent": 6, "children": [], "start_point": {"row": 7, "column": 9}, "end_point": {"row": 7, "column": 19}}, {"id": 9, "type": "preproc_include", "text": "#include \"fly_behavior.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": "\"fly_behavior.h\"", "parent": 9, "children": [], "start_point": {"row": 8, "column": 9}, "end_point": {"row": 8, "column": 25}}, {"id": 12, "type": "function_definition", "text": "class FlyWithWings: public FlyBehavior{\npublic:\n void Fly(){\n std::cout << \"I can fly with wings! I am very happy!\" << std::endl;\n }\n}", "parent": 0, "children": [13, 14], "start_point": {"row": 10, "column": 0}, "end_point": {"row": 15, "column": 1}}, {"id": 13, "type": "identifier", "text": "FlyWithWings", "parent": 12, "children": [], "start_point": {"row": 10, "column": 6}, "end_point": {"row": 10, "column": 18}}, {"id": 14, "type": "ERROR", "text": ": public FlyBehavior", "parent": 12, "children": [15], "start_point": {"row": 10, "column": 18}, "end_point": {"row": 10, "column": 38}}, {"id": 15, "type": "identifier", "text": "FlyBehavior", "parent": 14, "children": [], "start_point": {"row": 10, "column": 27}, "end_point": {"row": 10, "column": 38}}, {"id": 16, "type": "labeled_statement", "text": "public:\n void Fly(){\n std::cout << \"I can fly with wings! I am very happy!\" << std::endl;\n }", "parent": 12, "children": [17], "start_point": {"row": 11, "column": 0}, "end_point": {"row": 14, "column": 5}}, {"id": 17, "type": "ERROR", "text": "void Fly()", "parent": 16, "children": [18, 19], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 14}}, {"id": 18, "type": "primitive_type", "text": "void", "parent": 17, "children": [], "start_point": {"row": 12, "column": 4}, "end_point": {"row": 12, "column": 8}}, {"id": 19, "type": "function_declarator", "text": "Fly()", "parent": 17, "children": [20, 21], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 14}}, {"id": 20, "type": "identifier", "text": "Fly", "parent": 19, "children": [], "start_point": {"row": 12, "column": 9}, "end_point": {"row": 12, "column": 12}}, {"id": 21, "type": "parameter_list", "text": "()", "parent": 19, "children": [], "start_point": {"row": 12, "column": 12}, "end_point": {"row": 12, "column": 14}}, {"id": 22, "type": "labeled_statement", "text": "std::cout << \"I can fly with wings! I am very happy!\" << std::endl;", "parent": 16, "children": [23, 24], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 75}}, {"id": 23, "type": "statement_identifier", "text": "std", "parent": 22, "children": [], "start_point": {"row": 13, "column": 8}, "end_point": {"row": 13, "column": 11}}, {"id": 24, "type": "ERROR", "text": "::cout << \"I can fly with wings! I am very happy!\" << std:", "parent": 22, "children": [25], "start_point": {"row": 13, "column": 11}, "end_point": {"row": 13, "column": 69}}, {"id": 25, "type": "binary_expression", "text": "cout << \"I can fly with wings! I am very happy!\" << std", "parent": 24, "children": [26, 30, 31], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 68}}, {"id": 26, "type": "binary_expression", "text": "cout << \"I can fly with wings! I am very happy!\"", "parent": 25, "children": [27, 28, 29], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 61}}, {"id": 27, "type": "identifier", "text": "cout", "parent": 26, "children": [], "start_point": {"row": 13, "column": 13}, "end_point": {"row": 13, "column": 17}}, {"id": 28, "type": "<<", "text": "<<", "parent": 26, "children": [], "start_point": {"row": 13, "column": 18}, "end_point": {"row": 13, "column": 20}}, {"id": 29, "type": "string_literal", "text": "\"I can fly with wings! I am very happy!\"", "parent": 26, "children": [], "start_point": {"row": 13, "column": 21}, "end_point": {"row": 13, "column": 61}}, {"id": 30, "type": "<<", "text": "<<", "parent": 25, "children": [], "start_point": {"row": 13, "column": 62}, "end_point": {"row": 13, "column": 64}}, {"id": 31, "type": "identifier", "text": "std", "parent": 25, "children": [], "start_point": {"row": 13, "column": 65}, "end_point": {"row": 13, "column": 68}}, {"id": 32, "type": "identifier", "text": "endl", "parent": 22, "children": [], "start_point": {"row": 13, "column": 70}, "end_point": {"row": 13, "column": 74}}, {"id": 33, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 16, "column": 0}, "end_point": {"row": 16, "column": 6}}]}, "node_categories": {"declarations": {"functions": [12, 19], "variables": [], "classes": [], "imports": [6, 7, 9, 10], "modules": [], "enums": []}, "statements": {"expressions": [25, 26], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 5, 13, 15, 20, 23, 27, 31, 32, 33], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [8, 11, 29], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 12, "universal_type": "function", "name": "FlyWithWings:", "text_snippet": "class FlyWithWings: public FlyBehavior{\npublic:\n void Fly(){\n std::cout << \"I can fly with"}, {"node_id": 19, "universal_type": "function", "name": "unknown", "text_snippet": "Fly()"}], "class_declarations": [], "import_statements": [{"node_id": 6, "text": "#include <iostream>\n"}, {"node_id": 7, "text": "#include"}, {"node_id": 9, "text": "#include \"fly_behavior.h\"\n"}, {"node_id": 10, "text": "#include"}]}, "original_source_code": "//\n// Created by windyear_office on 18-4-5.\n//\n\n#ifndef HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H\n#define HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H\n\n#include <iostream>\n#include \"fly_behavior.h\"\n\nclass FlyWithWings: public FlyBehavior{\npublic:\n void Fly(){\n std::cout << \"I can fly with wings! I am very happy!\" << std::endl;\n }\n};\n#endif //HEADFIRSTDESIGNPATTERNS_FLY_WITH_WINGS_H\n"}
97
c
/* SKaMPI MPI-Benchmark Copyright 2003-2008 <NAME> Lehrstuhl Informatik fuer Naturwissenschaftler und Ingenieure Fakultaet fuer Informatik University of Karlsruhe This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "mpiversiontest.h" enum { MAX_NUMBER_PARAMS = 10 }; enum var_type { TYPE_INTEGER = 'i', TYPE_DOUBLE = 'f', TYPE_STRING = 's', TYPE_DATATYPE = 'd', TYPE_COMM = 'c', TYPE_OP = 'o', TYPE_INFO = 'h', TYPE_VOID = '0', TYPE_IARRAY = 'a', TYPE_DARRAY = 'e' }; typedef struct { int* v; int n; } IArray; typedef struct { MPI_Datatype *v; int n; } DArray; struct variable { enum var_type type; char *name; char *string_repr; int *ref_counter; /*int **ref_counters;*/ /* reference counters of array elements */ union { int intv; double doublev; char *stringv; MPI_Datatype datatypev; MPI_Comm commv; MPI_Op opv; IArray iarrv; DArray darrv; #ifdef USE_MPI_INFO MPI_Info infov; #endif } u; }; typedef void (*type_normal_fp)(struct variable *result, struct variable par[]); typedef void (*type_iterator_fp)(struct variable *result, struct variable par[], void **self); enum term_type { TERM_VALUE = 300, TERM_UNARY, TERM_BINARY, TERM_FUNC, TERM_ARRAY }; enum op_type { OP_ADD = 400, OP_SUB, OP_MULT, OP_DIV, OP_MOD, OP_LT, OP_LE, OP_GT, OP_GE, OP_EQ, OP_NEQ, OP_AND, OP_BAND, OP_OR, OP_BOR, OP_NOT, OP_BNOT }; enum meas_error { /* bitfield */ MEAS_OK = 0, MEAS_OUT_OF_BOUNDS = 1, MEAS_BUFFER_TOO_SMALL = 2 }; struct term { enum term_type type; /* enum var_type result_type; */ struct term *next; enum op_type op; struct term *left; struct term *right; struct variable *var; type_normal_fp init_fp, call_fp, finalize_fp; type_iterator_fp iterator_fp; char *interface; struct term *params; }; enum statement_type { ST_ASSIGNMENT = 500, ST_PRINT, ST_FLUSH, ST_MEASURE, ST_ARITHM_VAR, ST_LIST_VAR, ST_ITERATOR_VAR, ST_IF_THEN }; struct statement { enum statement_type type; struct statement *next; union { struct { struct variable *lval; struct term *rval; } assignment; struct { bool flush; struct term *val; } print; struct { struct term *comm; struct term *call; } measure; struct { struct variable *loopvar; bool refine; struct term *first; struct term *last; struct term *step; enum op_type op; struct term *multipleof; struct statement *body; } arithm_var; struct { struct variable *loopvar; struct term *term_list; struct statement *body; } list_var; struct { struct variable *loopvar; type_iterator_fp iterator_fp; struct term *par_list; char *interface; void *self; struct statement *body; } iterator_var; struct { struct term *condition; struct statement *then_body; struct statement *else_body; } if_then; } u; }; extern struct statement *statement_root; void increase_reference(struct variable *v); void decrease_reference(struct variable *v); void init_struct_variable(struct variable *v, enum var_type type, char *name, char *string_repr); struct variable *create_struct_variable(enum var_type type, char *name, char *string_repr); void free_variable(struct variable *v); void free_term(struct term *t); void evaluate_params(char *interface, struct term *source_params, struct variable *dest_params); void evaluate_term(struct variable *result, struct term *t); void execute_statement(struct statement *s); void store_int(struct variable *result, int i); void store_double(struct variable *result, double f); void store_string(struct variable *result, char *s); void store_datatype(struct variable *result, MPI_Datatype datatype); void store_comm(struct variable *result, MPI_Comm comm); void store_operator(struct variable *result, MPI_Op op); void store_iarray(struct variable* result, IArray iarr); void store_darray(struct variable* result, DArray darr); #ifdef USE_MPI_INFO void store_info(struct variable *result, MPI_Info info); #endif extern struct variable* loopvar_stack[10]; /* @@@@ */ extern int loopvar_stack_sp;
23.49
199
(translation_unit) "/* SKaMPI MPI-Benchmark\n\nCopyright 2003-2008 <NAME>\nLehrstuhl Informatik fuer Naturwissenschaftler und Ingenieure \nFakultaet fuer Informatik\nUniversity of Karlsruhe\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of version 2 of the GNU General Public License as\npublished by the Free Software Foundation\n\nThis program 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 this program; if not, write to the Free Software\nFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */\n\n#include "mpiversiontest.h"\n\nenum {\n MAX_NUMBER_PARAMS = 10\n};\n\nenum var_type {\n TYPE_INTEGER = 'i',\n TYPE_DOUBLE = 'f',\n TYPE_STRING = 's',\n TYPE_DATATYPE = 'd',\n TYPE_COMM = 'c',\n TYPE_OP = 'o',\n TYPE_INFO = 'h',\n TYPE_VOID = '0',\n TYPE_IARRAY = 'a',\n TYPE_DARRAY = 'e'\n};\n\ntypedef struct {\n int* v;\n int n;\n} IArray;\n\ntypedef struct {\n MPI_Datatype *v;\n int n;\n} DArray;\n\nstruct variable {\n enum var_type type;\n char *name;\n char *string_repr;\n int *ref_counter;\n /*int **ref_counters;*/ /* reference counters of array elements */\n union {\n int intv;\n double doublev;\n char *stringv;\n MPI_Datatype datatypev;\n MPI_Comm commv;\n MPI_Op opv;\n IArray iarrv;\n DArray darrv;\n#ifdef USE_MPI_INFO\n MPI_Info infov;\n#endif\n } u;\n};\n\n\n\ntypedef void (*type_normal_fp)(struct variable *result, struct variable par[]);\ntypedef void (*type_iterator_fp)(struct variable *result, \n struct variable par[], void **self);\n\n\n\nenum term_type {\n TERM_VALUE = 300,\n TERM_UNARY,\n TERM_BINARY,\n TERM_FUNC,\n TERM_ARRAY\n};\n\nenum op_type {\n OP_ADD = 400,\n OP_SUB,\n OP_MULT,\n OP_DIV,\n OP_MOD,\n OP_LT,\n OP_LE,\n OP_GT,\n OP_GE,\n OP_EQ,\n OP_NEQ,\n OP_AND,\n OP_BAND,\n OP_OR,\n OP_BOR,\n OP_NOT,\n OP_BNOT\n};\n \nenum meas_error { /* bitfield */\n MEAS_OK = 0,\n MEAS_OUT_OF_BOUNDS = 1,\n MEAS_BUFFER_TOO_SMALL = 2\n};\n\nstruct term {\n enum term_type type;\n /* enum var_type result_type; */\n struct term *next;\n\n enum op_type op;\n struct term *left;\n struct term *right;\n\n struct variable *var;\n \n type_normal_fp init_fp, call_fp, finalize_fp;\n type_iterator_fp iterator_fp;\n char *interface;\n \n struct term *params;\n};\n\n\nenum statement_type {\n ST_ASSIGNMENT = 500,\n ST_PRINT,\n ST_FLUSH,\n ST_MEASURE,\n ST_ARITHM_VAR,\n ST_LIST_VAR,\n ST_ITERATOR_VAR,\n ST_IF_THEN\n};\n\nstruct statement {\n enum statement_type type;\n struct statement *next;\n\n union {\n struct {\n struct variable *lval;\n struct term *rval;\n } assignment;\n\n struct {\n bool flush;\n struct term *val;\n } print;\n\n struct {\n struct term *comm;\n struct term *call;\n } measure;\n\n struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n } arithm_var;\n\n struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n } list_var;\n\n struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n } iterator_var;\n\n struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n } if_then;\n\n } u;\n};\n\n\nextern struct statement *statement_root;\n\nvoid increase_reference(struct variable *v); \nvoid decrease_reference(struct variable *v);\nvoid init_struct_variable(struct variable *v, \n enum var_type type, char *name, char *string_repr);\nstruct variable *create_struct_variable(enum var_type type, char *name, \n char *string_repr);\nvoid free_variable(struct variable *v);\n\n\nvoid free_term(struct term *t);\n\n\nvoid evaluate_params(char *interface, struct term *source_params,\n struct variable *dest_params);\nvoid evaluate_term(struct variable *result, struct term *t);\n\nvoid execute_statement(struct statement *s);\n\n\nvoid store_int(struct variable *result, int i);\nvoid store_double(struct variable *result, double f);\nvoid store_string(struct variable *result, char *s);\nvoid store_datatype(struct variable *result, MPI_Datatype datatype);\nvoid store_comm(struct variable *result, MPI_Comm comm);\nvoid store_operator(struct variable *result, MPI_Op op);\nvoid store_iarray(struct variable* result, IArray iarr);\nvoid store_darray(struct variable* result, DArray darr);\n#ifdef USE_MPI_INFO\nvoid store_info(struct variable *result, MPI_Info info);\n#endif\n\n\nextern struct variable* loopvar_stack[10]; /* @@@@ */\nextern int loopvar_stack_sp;\n" (comment) "/* SKaMPI MPI-Benchmark\n\nCopyright 2003-2008 <NAME>\nLehrstuhl Informatik fuer Naturwissenschaftler und Ingenieure \nFakultaet fuer Informatik\nUniversity of Karlsruhe\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of version 2 of the GNU General Public License as\npublished by the Free Software Foundation\n\nThis program 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 this program; if not, write to the Free Software\nFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */" (preproc_include) "#include "mpiversiontest.h"\n" (#include) "#include" (string_literal) ""mpiversiontest.h"" (") """ (string_content) "mpiversiontest.h" (") """ (enum_specifier) "enum {\n MAX_NUMBER_PARAMS = 10\n}" (enum) "enum" (enumerator_list) "{\n MAX_NUMBER_PARAMS = 10\n}" ({) "{" (enumerator) "MAX_NUMBER_PARAMS = 10" (identifier) "MAX_NUMBER_PARAMS" (=) "=" (number_literal) "10" (}) "}" (;) ";" (enum_specifier) "enum var_type {\n TYPE_INTEGER = 'i',\n TYPE_DOUBLE = 'f',\n TYPE_STRING = 's',\n TYPE_DATATYPE = 'd',\n TYPE_COMM = 'c',\n TYPE_OP = 'o',\n TYPE_INFO = 'h',\n TYPE_VOID = '0',\n TYPE_IARRAY = 'a',\n TYPE_DARRAY = 'e'\n}" (enum) "enum" (type_identifier) "var_type" (enumerator_list) "{\n TYPE_INTEGER = 'i',\n TYPE_DOUBLE = 'f',\n TYPE_STRING = 's',\n TYPE_DATATYPE = 'd',\n TYPE_COMM = 'c',\n TYPE_OP = 'o',\n TYPE_INFO = 'h',\n TYPE_VOID = '0',\n TYPE_IARRAY = 'a',\n TYPE_DARRAY = 'e'\n}" ({) "{" (enumerator) "TYPE_INTEGER = 'i'" (identifier) "TYPE_INTEGER" (=) "=" (char_literal) "'i'" (') "'" (character) "i" (') "'" (,) "," (enumerator) "TYPE_DOUBLE = 'f'" (identifier) "TYPE_DOUBLE" (=) "=" (char_literal) "'f'" (') "'" (character) "f" (') "'" (,) "," (enumerator) "TYPE_STRING = 's'" (identifier) "TYPE_STRING" (=) "=" (char_literal) "'s'" (') "'" (character) "s" (') "'" (,) "," (enumerator) "TYPE_DATATYPE = 'd'" (identifier) "TYPE_DATATYPE" (=) "=" (char_literal) "'d'" (') "'" (character) "d" (') "'" (,) "," (enumerator) "TYPE_COMM = 'c'" (identifier) "TYPE_COMM" (=) "=" (char_literal) "'c'" (') "'" (character) "c" (') "'" (,) "," (enumerator) "TYPE_OP = 'o'" (identifier) "TYPE_OP" (=) "=" (char_literal) "'o'" (') "'" (character) "o" (') "'" (,) "," (enumerator) "TYPE_INFO = 'h'" (identifier) "TYPE_INFO" (=) "=" (char_literal) "'h'" (') "'" (character) "h" (') "'" (,) "," (enumerator) "TYPE_VOID = '0'" (identifier) "TYPE_VOID" (=) "=" (char_literal) "'0'" (') "'" (character) "0" (') "'" (,) "," (enumerator) "TYPE_IARRAY = 'a'" (identifier) "TYPE_IARRAY" (=) "=" (char_literal) "'a'" (') "'" (character) "a" (') "'" (,) "," (enumerator) "TYPE_DARRAY = 'e'" (identifier) "TYPE_DARRAY" (=) "=" (char_literal) "'e'" (') "'" (character) "e" (') "'" (}) "}" (;) ";" (type_definition) "typedef struct {\n int* v;\n int n;\n} IArray;" (typedef) "typedef" (struct_specifier) "struct {\n int* v;\n int n;\n}" (struct) "struct" (field_declaration_list) "{\n int* v;\n int n;\n}" ({) "{" (field_declaration) "int* v;" (primitive_type) "int" (pointer_declarator) "* v" (*) "*" (field_identifier) "v" (;) ";" (field_declaration) "int n;" (primitive_type) "int" (field_identifier) "n" (;) ";" (}) "}" (type_identifier) "IArray" (;) ";" (type_definition) "typedef struct {\n MPI_Datatype *v;\n int n;\n} DArray;" (typedef) "typedef" (struct_specifier) "struct {\n MPI_Datatype *v;\n int n;\n}" (struct) "struct" (field_declaration_list) "{\n MPI_Datatype *v;\n int n;\n}" ({) "{" (field_declaration) "MPI_Datatype *v;" (type_identifier) "MPI_Datatype" (pointer_declarator) "*v" (*) "*" (field_identifier) "v" (;) ";" (field_declaration) "int n;" (primitive_type) "int" (field_identifier) "n" (;) ";" (}) "}" (type_identifier) "DArray" (;) ";" (struct_specifier) "struct variable {\n enum var_type type;\n char *name;\n char *string_repr;\n int *ref_counter;\n /*int **ref_counters;*/ /* reference counters of array elements */\n union {\n int intv;\n double doublev;\n char *stringv;\n MPI_Datatype datatypev;\n MPI_Comm commv;\n MPI_Op opv;\n IArray iarrv;\n DArray darrv;\n#ifdef USE_MPI_INFO\n MPI_Info infov;\n#endif\n } u;\n}" (struct) "struct" (type_identifier) "variable" (field_declaration_list) "{\n enum var_type type;\n char *name;\n char *string_repr;\n int *ref_counter;\n /*int **ref_counters;*/ /* reference counters of array elements */\n union {\n int intv;\n double doublev;\n char *stringv;\n MPI_Datatype datatypev;\n MPI_Comm commv;\n MPI_Op opv;\n IArray iarrv;\n DArray darrv;\n#ifdef USE_MPI_INFO\n MPI_Info infov;\n#endif\n } u;\n}" ({) "{" (field_declaration) "enum var_type type;" (enum_specifier) "enum var_type" (enum) "enum" (type_identifier) "var_type" (field_identifier) "type" (;) ";" (field_declaration) "char *name;" (primitive_type) "char" (pointer_declarator) "*name" (*) "*" (field_identifier) "name" (;) ";" (field_declaration) "char *string_repr;" (primitive_type) "char" (pointer_declarator) "*string_repr" (*) "*" (field_identifier) "string_repr" (;) ";" (field_declaration) "int *ref_counter;" (primitive_type) "int" (pointer_declarator) "*ref_counter" (*) "*" (field_identifier) "ref_counter" (;) ";" (comment) "/*int **ref_counters;*/" (comment) "/* reference counters of array elements */" (field_declaration) "union {\n int intv;\n double doublev;\n char *stringv;\n MPI_Datatype datatypev;\n MPI_Comm commv;\n MPI_Op opv;\n IArray iarrv;\n DArray darrv;\n#ifdef USE_MPI_INFO\n MPI_Info infov;\n#endif\n } u;" (union_specifier) "union {\n int intv;\n double doublev;\n char *stringv;\n MPI_Datatype datatypev;\n MPI_Comm commv;\n MPI_Op opv;\n IArray iarrv;\n DArray darrv;\n#ifdef USE_MPI_INFO\n MPI_Info infov;\n#endif\n }" (union) "union" (field_declaration_list) "{\n int intv;\n double doublev;\n char *stringv;\n MPI_Datatype datatypev;\n MPI_Comm commv;\n MPI_Op opv;\n IArray iarrv;\n DArray darrv;\n#ifdef USE_MPI_INFO\n MPI_Info infov;\n#endif\n }" ({) "{" (field_declaration) "int intv;" (primitive_type) "int" (field_identifier) "intv" (;) ";" (field_declaration) "double doublev;" (primitive_type) "double" (field_identifier) "doublev" (;) ";" (field_declaration) "char *stringv;" (primitive_type) "char" (pointer_declarator) "*stringv" (*) "*" (field_identifier) "stringv" (;) ";" (field_declaration) "MPI_Datatype datatypev;" (type_identifier) "MPI_Datatype" (field_identifier) "datatypev" (;) ";" (field_declaration) "MPI_Comm commv;" (type_identifier) "MPI_Comm" (field_identifier) "commv" (;) ";" (field_declaration) "MPI_Op opv;" (type_identifier) "MPI_Op" (field_identifier) "opv" (;) ";" (field_declaration) "IArray iarrv;" (type_identifier) "IArray" (field_identifier) "iarrv" (;) ";" (field_declaration) "DArray darrv;" (type_identifier) "DArray" (field_identifier) "darrv" (;) ";" (preproc_ifdef) "#ifdef USE_MPI_INFO\n MPI_Info infov;\n#endif" (#ifdef) "#ifdef" (identifier) "USE_MPI_INFO" (field_declaration) "MPI_Info infov;" (type_identifier) "MPI_Info" (field_identifier) "infov" (;) ";" (#endif) "#endif" (}) "}" (field_identifier) "u" (;) ";" (}) "}" (;) ";" (type_definition) "typedef void (*type_normal_fp)(struct variable *result, struct variable par[]);" (typedef) "typedef" (primitive_type) "void" (function_declarator) "(*type_normal_fp)(struct variable *result, struct variable par[])" (parenthesized_declarator) "(*type_normal_fp)" (() "(" (pointer_declarator) "*type_normal_fp" (*) "*" (type_identifier) "type_normal_fp" ()) ")" (parameter_list) "(struct variable *result, struct variable par[])" (() "(" (parameter_declaration) "struct variable *result" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*result" (*) "*" (identifier) "result" (,) "," (parameter_declaration) "struct variable par[]" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (array_declarator) "par[]" (identifier) "par" ([) "[" (]) "]" ()) ")" (;) ";" (type_definition) "typedef void (*type_iterator_fp)(struct variable *result, \n struct variable par[], void **self);" (typedef) "typedef" (primitive_type) "void" (function_declarator) "(*type_iterator_fp)(struct variable *result, \n struct variable par[], void **self)" (parenthesized_declarator) "(*type_iterator_fp)" (() "(" (pointer_declarator) "*type_iterator_fp" (*) "*" (type_identifier) "type_iterator_fp" ()) ")" (parameter_list) "(struct variable *result, \n struct variable par[], void **self)" (() "(" (parameter_declaration) "struct variable *result" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*result" (*) "*" (identifier) "result" (,) "," (parameter_declaration) "struct variable par[]" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (array_declarator) "par[]" (identifier) "par" ([) "[" (]) "]" (,) "," (parameter_declaration) "void **self" (primitive_type) "void" (pointer_declarator) "**self" (*) "*" (pointer_declarator) "*self" (*) "*" (identifier) "self" ()) ")" (;) ";" (enum_specifier) "enum term_type {\n TERM_VALUE = 300,\n TERM_UNARY,\n TERM_BINARY,\n TERM_FUNC,\n TERM_ARRAY\n}" (enum) "enum" (type_identifier) "term_type" (enumerator_list) "{\n TERM_VALUE = 300,\n TERM_UNARY,\n TERM_BINARY,\n TERM_FUNC,\n TERM_ARRAY\n}" ({) "{" (enumerator) "TERM_VALUE = 300" (identifier) "TERM_VALUE" (=) "=" (number_literal) "300" (,) "," (enumerator) "TERM_UNARY" (identifier) "TERM_UNARY" (,) "," (enumerator) "TERM_BINARY" (identifier) "TERM_BINARY" (,) "," (enumerator) "TERM_FUNC" (identifier) "TERM_FUNC" (,) "," (enumerator) "TERM_ARRAY" (identifier) "TERM_ARRAY" (}) "}" (;) ";" (enum_specifier) "enum op_type {\n OP_ADD = 400,\n OP_SUB,\n OP_MULT,\n OP_DIV,\n OP_MOD,\n OP_LT,\n OP_LE,\n OP_GT,\n OP_GE,\n OP_EQ,\n OP_NEQ,\n OP_AND,\n OP_BAND,\n OP_OR,\n OP_BOR,\n OP_NOT,\n OP_BNOT\n}" (enum) "enum" (type_identifier) "op_type" (enumerator_list) "{\n OP_ADD = 400,\n OP_SUB,\n OP_MULT,\n OP_DIV,\n OP_MOD,\n OP_LT,\n OP_LE,\n OP_GT,\n OP_GE,\n OP_EQ,\n OP_NEQ,\n OP_AND,\n OP_BAND,\n OP_OR,\n OP_BOR,\n OP_NOT,\n OP_BNOT\n}" ({) "{" (enumerator) "OP_ADD = 400" (identifier) "OP_ADD" (=) "=" (number_literal) "400" (,) "," (enumerator) "OP_SUB" (identifier) "OP_SUB" (,) "," (enumerator) "OP_MULT" (identifier) "OP_MULT" (,) "," (enumerator) "OP_DIV" (identifier) "OP_DIV" (,) "," (enumerator) "OP_MOD" (identifier) "OP_MOD" (,) "," (enumerator) "OP_LT" (identifier) "OP_LT" (,) "," (enumerator) "OP_LE" (identifier) "OP_LE" (,) "," (enumerator) "OP_GT" (identifier) "OP_GT" (,) "," (enumerator) "OP_GE" (identifier) "OP_GE" (,) "," (enumerator) "OP_EQ" (identifier) "OP_EQ" (,) "," (enumerator) "OP_NEQ" (identifier) "OP_NEQ" (,) "," (enumerator) "OP_AND" (identifier) "OP_AND" (,) "," (enumerator) "OP_BAND" (identifier) "OP_BAND" (,) "," (enumerator) "OP_OR" (identifier) "OP_OR" (,) "," (enumerator) "OP_BOR" (identifier) "OP_BOR" (,) "," (enumerator) "OP_NOT" (identifier) "OP_NOT" (,) "," (enumerator) "OP_BNOT" (identifier) "OP_BNOT" (}) "}" (;) ";" (enum_specifier) "enum meas_error { /* bitfield */\n MEAS_OK = 0,\n MEAS_OUT_OF_BOUNDS = 1,\n MEAS_BUFFER_TOO_SMALL = 2\n}" (enum) "enum" (type_identifier) "meas_error" (enumerator_list) "{ /* bitfield */\n MEAS_OK = 0,\n MEAS_OUT_OF_BOUNDS = 1,\n MEAS_BUFFER_TOO_SMALL = 2\n}" ({) "{" (comment) "/* bitfield */" (enumerator) "MEAS_OK = 0" (identifier) "MEAS_OK" (=) "=" (number_literal) "0" (,) "," (enumerator) "MEAS_OUT_OF_BOUNDS = 1" (identifier) "MEAS_OUT_OF_BOUNDS" (=) "=" (number_literal) "1" (,) "," (enumerator) "MEAS_BUFFER_TOO_SMALL = 2" (identifier) "MEAS_BUFFER_TOO_SMALL" (=) "=" (number_literal) "2" (}) "}" (;) ";" (struct_specifier) "struct term {\n enum term_type type;\n /* enum var_type result_type; */\n struct term *next;\n\n enum op_type op;\n struct term *left;\n struct term *right;\n\n struct variable *var;\n \n type_normal_fp init_fp, call_fp, finalize_fp;\n type_iterator_fp iterator_fp;\n char *interface;\n \n struct term *params;\n}" (struct) "struct" (type_identifier) "term" (field_declaration_list) "{\n enum term_type type;\n /* enum var_type result_type; */\n struct term *next;\n\n enum op_type op;\n struct term *left;\n struct term *right;\n\n struct variable *var;\n \n type_normal_fp init_fp, call_fp, finalize_fp;\n type_iterator_fp iterator_fp;\n char *interface;\n \n struct term *params;\n}" ({) "{" (field_declaration) "enum term_type type;" (enum_specifier) "enum term_type" (enum) "enum" (type_identifier) "term_type" (field_identifier) "type" (;) ";" (comment) "/* enum var_type result_type; */" (field_declaration) "struct term *next;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*next" (*) "*" (field_identifier) "next" (;) ";" (field_declaration) "enum op_type op;" (enum_specifier) "enum op_type" (enum) "enum" (type_identifier) "op_type" (field_identifier) "op" (;) ";" (field_declaration) "struct term *left;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*left" (*) "*" (field_identifier) "left" (;) ";" (field_declaration) "struct term *right;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*right" (*) "*" (field_identifier) "right" (;) ";" (field_declaration) "struct variable *var;" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*var" (*) "*" (field_identifier) "var" (;) ";" (field_declaration) "type_normal_fp init_fp, call_fp, finalize_fp;" (type_identifier) "type_normal_fp" (field_identifier) "init_fp" (,) "," (field_identifier) "call_fp" (,) "," (field_identifier) "finalize_fp" (;) ";" (field_declaration) "type_iterator_fp iterator_fp;" (type_identifier) "type_iterator_fp" (field_identifier) "iterator_fp" (;) ";" (field_declaration) "char *interface;" (primitive_type) "char" (pointer_declarator) "*interface" (*) "*" (field_identifier) "interface" (;) ";" (field_declaration) "struct term *params;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*params" (*) "*" (field_identifier) "params" (;) ";" (}) "}" (;) ";" (enum_specifier) "enum statement_type {\n ST_ASSIGNMENT = 500,\n ST_PRINT,\n ST_FLUSH,\n ST_MEASURE,\n ST_ARITHM_VAR,\n ST_LIST_VAR,\n ST_ITERATOR_VAR,\n ST_IF_THEN\n}" (enum) "enum" (type_identifier) "statement_type" (enumerator_list) "{\n ST_ASSIGNMENT = 500,\n ST_PRINT,\n ST_FLUSH,\n ST_MEASURE,\n ST_ARITHM_VAR,\n ST_LIST_VAR,\n ST_ITERATOR_VAR,\n ST_IF_THEN\n}" ({) "{" (enumerator) "ST_ASSIGNMENT = 500" (identifier) "ST_ASSIGNMENT" (=) "=" (number_literal) "500" (,) "," (enumerator) "ST_PRINT" (identifier) "ST_PRINT" (,) "," (enumerator) "ST_FLUSH" (identifier) "ST_FLUSH" (,) "," (enumerator) "ST_MEASURE" (identifier) "ST_MEASURE" (,) "," (enumerator) "ST_ARITHM_VAR" (identifier) "ST_ARITHM_VAR" (,) "," (enumerator) "ST_LIST_VAR" (identifier) "ST_LIST_VAR" (,) "," (enumerator) "ST_ITERATOR_VAR" (identifier) "ST_ITERATOR_VAR" (,) "," (enumerator) "ST_IF_THEN" (identifier) "ST_IF_THEN" (}) "}" (;) ";" (struct_specifier) "struct statement {\n enum statement_type type;\n struct statement *next;\n\n union {\n struct {\n struct variable *lval;\n struct term *rval;\n } assignment;\n\n struct {\n bool flush;\n struct term *val;\n } print;\n\n struct {\n struct term *comm;\n struct term *call;\n } measure;\n\n struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n } arithm_var;\n\n struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n } list_var;\n\n struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n } iterator_var;\n\n struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n } if_then;\n\n } u;\n}" (struct) "struct" (type_identifier) "statement" (field_declaration_list) "{\n enum statement_type type;\n struct statement *next;\n\n union {\n struct {\n struct variable *lval;\n struct term *rval;\n } assignment;\n\n struct {\n bool flush;\n struct term *val;\n } print;\n\n struct {\n struct term *comm;\n struct term *call;\n } measure;\n\n struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n } arithm_var;\n\n struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n } list_var;\n\n struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n } iterator_var;\n\n struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n } if_then;\n\n } u;\n}" ({) "{" (field_declaration) "enum statement_type type;" (enum_specifier) "enum statement_type" (enum) "enum" (type_identifier) "statement_type" (field_identifier) "type" (;) ";" (field_declaration) "struct statement *next;" (struct_specifier) "struct statement" (struct) "struct" (type_identifier) "statement" (pointer_declarator) "*next" (*) "*" (field_identifier) "next" (;) ";" (field_declaration) "union {\n struct {\n struct variable *lval;\n struct term *rval;\n } assignment;\n\n struct {\n bool flush;\n struct term *val;\n } print;\n\n struct {\n struct term *comm;\n struct term *call;\n } measure;\n\n struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n } arithm_var;\n\n struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n } list_var;\n\n struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n } iterator_var;\n\n struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n } if_then;\n\n } u;" (union_specifier) "union {\n struct {\n struct variable *lval;\n struct term *rval;\n } assignment;\n\n struct {\n bool flush;\n struct term *val;\n } print;\n\n struct {\n struct term *comm;\n struct term *call;\n } measure;\n\n struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n } arithm_var;\n\n struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n } list_var;\n\n struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n } iterator_var;\n\n struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n } if_then;\n\n }" (union) "union" (field_declaration_list) "{\n struct {\n struct variable *lval;\n struct term *rval;\n } assignment;\n\n struct {\n bool flush;\n struct term *val;\n } print;\n\n struct {\n struct term *comm;\n struct term *call;\n } measure;\n\n struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n } arithm_var;\n\n struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n } list_var;\n\n struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n } iterator_var;\n\n struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n } if_then;\n\n }" ({) "{" (field_declaration) "struct {\n struct variable *lval;\n struct term *rval;\n } assignment;" (struct_specifier) "struct {\n struct variable *lval;\n struct term *rval;\n }" (struct) "struct" (field_declaration_list) "{\n struct variable *lval;\n struct term *rval;\n }" ({) "{" (field_declaration) "struct variable *lval;" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*lval" (*) "*" (field_identifier) "lval" (;) ";" (field_declaration) "struct term *rval;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*rval" (*) "*" (field_identifier) "rval" (;) ";" (}) "}" (field_identifier) "assignment" (;) ";" (field_declaration) "struct {\n bool flush;\n struct term *val;\n } print;" (struct_specifier) "struct {\n bool flush;\n struct term *val;\n }" (struct) "struct" (field_declaration_list) "{\n bool flush;\n struct term *val;\n }" ({) "{" (field_declaration) "bool flush;" (primitive_type) "bool" (field_identifier) "flush" (;) ";" (field_declaration) "struct term *val;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*val" (*) "*" (field_identifier) "val" (;) ";" (}) "}" (field_identifier) "print" (;) ";" (field_declaration) "struct {\n struct term *comm;\n struct term *call;\n } measure;" (struct_specifier) "struct {\n struct term *comm;\n struct term *call;\n }" (struct) "struct" (field_declaration_list) "{\n struct term *comm;\n struct term *call;\n }" ({) "{" (field_declaration) "struct term *comm;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*comm" (*) "*" (field_identifier) "comm" (;) ";" (field_declaration) "struct term *call;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*call" (*) "*" (field_identifier) "call" (;) ";" (}) "}" (field_identifier) "measure" (;) ";" (field_declaration) "struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n } arithm_var;" (struct_specifier) "struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n }" (struct) "struct" (field_declaration_list) "{\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n }" ({) "{" (field_declaration) "struct variable *loopvar;" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*loopvar" (*) "*" (field_identifier) "loopvar" (;) ";" (field_declaration) "bool refine;" (primitive_type) "bool" (field_identifier) "refine" (;) ";" (field_declaration) "struct term *first;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*first" (*) "*" (field_identifier) "first" (;) ";" (field_declaration) "struct term *last;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*last" (*) "*" (field_identifier) "last" (;) ";" (field_declaration) "struct term *step;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*step" (*) "*" (field_identifier) "step" (;) ";" (field_declaration) "enum op_type op;" (enum_specifier) "enum op_type" (enum) "enum" (type_identifier) "op_type" (field_identifier) "op" (;) ";" (field_declaration) "struct term *multipleof;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*multipleof" (*) "*" (field_identifier) "multipleof" (;) ";" (field_declaration) "struct statement *body;" (struct_specifier) "struct statement" (struct) "struct" (type_identifier) "statement" (pointer_declarator) "*body" (*) "*" (field_identifier) "body" (;) ";" (}) "}" (field_identifier) "arithm_var" (;) ";" (field_declaration) "struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n } list_var;" (struct_specifier) "struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n }" (struct) "struct" (field_declaration_list) "{\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n }" ({) "{" (field_declaration) "struct variable *loopvar;" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*loopvar" (*) "*" (field_identifier) "loopvar" (;) ";" (field_declaration) "struct term *term_list;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*term_list" (*) "*" (field_identifier) "term_list" (;) ";" (field_declaration) "struct statement *body;" (struct_specifier) "struct statement" (struct) "struct" (type_identifier) "statement" (pointer_declarator) "*body" (*) "*" (field_identifier) "body" (;) ";" (}) "}" (field_identifier) "list_var" (;) ";" (field_declaration) "struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n } iterator_var;" (struct_specifier) "struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n }" (struct) "struct" (field_declaration_list) "{\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n }" ({) "{" (field_declaration) "struct variable *loopvar;" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*loopvar" (*) "*" (field_identifier) "loopvar" (;) ";" (field_declaration) "type_iterator_fp iterator_fp;" (type_identifier) "type_iterator_fp" (field_identifier) "iterator_fp" (;) ";" (field_declaration) "struct term *par_list;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*par_list" (*) "*" (field_identifier) "par_list" (;) ";" (field_declaration) "char *interface;" (primitive_type) "char" (pointer_declarator) "*interface" (*) "*" (field_identifier) "interface" (;) ";" (field_declaration) "void *self;" (primitive_type) "void" (pointer_declarator) "*self" (*) "*" (field_identifier) "self" (;) ";" (field_declaration) "struct statement *body;" (struct_specifier) "struct statement" (struct) "struct" (type_identifier) "statement" (pointer_declarator) "*body" (*) "*" (field_identifier) "body" (;) ";" (}) "}" (field_identifier) "iterator_var" (;) ";" (field_declaration) "struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n } if_then;" (struct_specifier) "struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n }" (struct) "struct" (field_declaration_list) "{\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n }" ({) "{" (field_declaration) "struct term *condition;" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*condition" (*) "*" (field_identifier) "condition" (;) ";" (field_declaration) "struct statement *then_body;" (struct_specifier) "struct statement" (struct) "struct" (type_identifier) "statement" (pointer_declarator) "*then_body" (*) "*" (field_identifier) "then_body" (;) ";" (field_declaration) "struct statement *else_body;" (struct_specifier) "struct statement" (struct) "struct" (type_identifier) "statement" (pointer_declarator) "*else_body" (*) "*" (field_identifier) "else_body" (;) ";" (}) "}" (field_identifier) "if_then" (;) ";" (}) "}" (field_identifier) "u" (;) ";" (}) "}" (;) ";" (declaration) "extern struct statement *statement_root;" (storage_class_specifier) "extern" (extern) "extern" (struct_specifier) "struct statement" (struct) "struct" (type_identifier) "statement" (pointer_declarator) "*statement_root" (*) "*" (identifier) "statement_root" (;) ";" (declaration) "void increase_reference(struct variable *v);" (primitive_type) "void" (function_declarator) "increase_reference(struct variable *v)" (identifier) "increase_reference" (parameter_list) "(struct variable *v)" (() "(" (parameter_declaration) "struct variable *v" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*v" (*) "*" (identifier) "v" ()) ")" (;) ";" (declaration) "void decrease_reference(struct variable *v);" (primitive_type) "void" (function_declarator) "decrease_reference(struct variable *v)" (identifier) "decrease_reference" (parameter_list) "(struct variable *v)" (() "(" (parameter_declaration) "struct variable *v" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*v" (*) "*" (identifier) "v" ()) ")" (;) ";" (declaration) "void init_struct_variable(struct variable *v, \n enum var_type type, char *name, char *string_repr);" (primitive_type) "void" (function_declarator) "init_struct_variable(struct variable *v, \n enum var_type type, char *name, char *string_repr)" (identifier) "init_struct_variable" (parameter_list) "(struct variable *v, \n enum var_type type, char *name, char *string_repr)" (() "(" (parameter_declaration) "struct variable *v" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*v" (*) "*" (identifier) "v" (,) "," (parameter_declaration) "enum var_type type" (enum_specifier) "enum var_type" (enum) "enum" (type_identifier) "var_type" (identifier) "type" (,) "," (parameter_declaration) "char *name" (primitive_type) "char" (pointer_declarator) "*name" (*) "*" (identifier) "name" (,) "," (parameter_declaration) "char *string_repr" (primitive_type) "char" (pointer_declarator) "*string_repr" (*) "*" (identifier) "string_repr" ()) ")" (;) ";" (declaration) "struct variable *create_struct_variable(enum var_type type, char *name, \n char *string_repr);" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*create_struct_variable(enum var_type type, char *name, \n char *string_repr)" (*) "*" (function_declarator) "create_struct_variable(enum var_type type, char *name, \n char *string_repr)" (identifier) "create_struct_variable" (parameter_list) "(enum var_type type, char *name, \n char *string_repr)" (() "(" (parameter_declaration) "enum var_type type" (enum_specifier) "enum var_type" (enum) "enum" (type_identifier) "var_type" (identifier) "type" (,) "," (parameter_declaration) "char *name" (primitive_type) "char" (pointer_declarator) "*name" (*) "*" (identifier) "name" (,) "," (parameter_declaration) "char *string_repr" (primitive_type) "char" (pointer_declarator) "*string_repr" (*) "*" (identifier) "string_repr" ()) ")" (;) ";" (declaration) "void free_variable(struct variable *v);" (primitive_type) "void" (function_declarator) "free_variable(struct variable *v)" (identifier) "free_variable" (parameter_list) "(struct variable *v)" (() "(" (parameter_declaration) "struct variable *v" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*v" (*) "*" (identifier) "v" ()) ")" (;) ";" (declaration) "void free_term(struct term *t);" (primitive_type) "void" (function_declarator) "free_term(struct term *t)" (identifier) "free_term" (parameter_list) "(struct term *t)" (() "(" (parameter_declaration) "struct term *t" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*t" (*) "*" (identifier) "t" ()) ")" (;) ";" (declaration) "void evaluate_params(char *interface, struct term *source_params,\n struct variable *dest_params);" (primitive_type) "void" (function_declarator) "evaluate_params(char *interface, struct term *source_params,\n struct variable *dest_params)" (identifier) "evaluate_params" (parameter_list) "(char *interface, struct term *source_params,\n struct variable *dest_params)" (() "(" (parameter_declaration) "char *interface" (primitive_type) "char" (pointer_declarator) "*interface" (*) "*" (identifier) "interface" (,) "," (parameter_declaration) "struct term *source_params" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*source_params" (*) "*" (identifier) "source_params" (,) "," (parameter_declaration) "struct variable *dest_params" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*dest_params" (*) "*" (identifier) "dest_params" ()) ")" (;) ";" (declaration) "void evaluate_term(struct variable *result, struct term *t);" (primitive_type) "void" (function_declarator) "evaluate_term(struct variable *result, struct term *t)" (identifier) "evaluate_term" (parameter_list) "(struct variable *result, struct term *t)" (() "(" (parameter_declaration) "struct variable *result" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*result" (*) "*" (identifier) "result" (,) "," (parameter_declaration) "struct term *t" (struct_specifier) "struct term" (struct) "struct" (type_identifier) "term" (pointer_declarator) "*t" (*) "*" (identifier) "t" ()) ")" (;) ";" (declaration) "void execute_statement(struct statement *s);" (primitive_type) "void" (function_declarator) "execute_statement(struct statement *s)" (identifier) "execute_statement" (parameter_list) "(struct statement *s)" (() "(" (parameter_declaration) "struct statement *s" (struct_specifier) "struct statement" (struct) "struct" (type_identifier) "statement" (pointer_declarator) "*s" (*) "*" (identifier) "s" ()) ")" (;) ";" (declaration) "void store_int(struct variable *result, int i);" (primitive_type) "void" (function_declarator) "store_int(struct variable *result, int i)" (identifier) "store_int" (parameter_list) "(struct variable *result, int i)" (() "(" (parameter_declaration) "struct variable *result" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*result" (*) "*" (identifier) "result" (,) "," (parameter_declaration) "int i" (primitive_type) "int" (identifier) "i" ()) ")" (;) ";" (declaration) "void store_double(struct variable *result, double f);" (primitive_type) "void" (function_declarator) "store_double(struct variable *result, double f)" (identifier) "store_double" (parameter_list) "(struct variable *result, double f)" (() "(" (parameter_declaration) "struct variable *result" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*result" (*) "*" (identifier) "result" (,) "," (parameter_declaration) "double f" (primitive_type) "double" (identifier) "f" ()) ")" (;) ";" (declaration) "void store_string(struct variable *result, char *s);" (primitive_type) "void" (function_declarator) "store_string(struct variable *result, char *s)" (identifier) "store_string" (parameter_list) "(struct variable *result, char *s)" (() "(" (parameter_declaration) "struct variable *result" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*result" (*) "*" (identifier) "result" (,) "," (parameter_declaration) "char *s" (primitive_type) "char" (pointer_declarator) "*s" (*) "*" (identifier) "s" ()) ")" (;) ";" (declaration) "void store_datatype(struct variable *result, MPI_Datatype datatype);" (primitive_type) "void" (function_declarator) "store_datatype(struct variable *result, MPI_Datatype datatype)" (identifier) "store_datatype" (parameter_list) "(struct variable *result, MPI_Datatype datatype)" (() "(" (parameter_declaration) "struct variable *result" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*result" (*) "*" (identifier) "result" (,) "," (parameter_declaration) "MPI_Datatype datatype" (type_identifier) "MPI_Datatype" (identifier) "datatype" ()) ")" (;) ";" (declaration) "void store_comm(struct variable *result, MPI_Comm comm);" (primitive_type) "void" (function_declarator) "store_comm(struct variable *result, MPI_Comm comm)" (identifier) "store_comm" (parameter_list) "(struct variable *result, MPI_Comm comm)" (() "(" (parameter_declaration) "struct variable *result" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*result" (*) "*" (identifier) "result" (,) "," (parameter_declaration) "MPI_Comm comm" (type_identifier) "MPI_Comm" (identifier) "comm" ()) ")" (;) ";" (declaration) "void store_operator(struct variable *result, MPI_Op op);" (primitive_type) "void" (function_declarator) "store_operator(struct variable *result, MPI_Op op)" (identifier) "store_operator" (parameter_list) "(struct variable *result, MPI_Op op)" (() "(" (parameter_declaration) "struct variable *result" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*result" (*) "*" (identifier) "result" (,) "," (parameter_declaration) "MPI_Op op" (type_identifier) "MPI_Op" (identifier) "op" ()) ")" (;) ";" (declaration) "void store_iarray(struct variable* result, IArray iarr);" (primitive_type) "void" (function_declarator) "store_iarray(struct variable* result, IArray iarr)" (identifier) "store_iarray" (parameter_list) "(struct variable* result, IArray iarr)" (() "(" (parameter_declaration) "struct variable* result" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "* result" (*) "*" (identifier) "result" (,) "," (parameter_declaration) "IArray iarr" (type_identifier) "IArray" (identifier) "iarr" ()) ")" (;) ";" (declaration) "void store_darray(struct variable* result, DArray darr);" (primitive_type) "void" (function_declarator) "store_darray(struct variable* result, DArray darr)" (identifier) "store_darray" (parameter_list) "(struct variable* result, DArray darr)" (() "(" (parameter_declaration) "struct variable* result" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "* result" (*) "*" (identifier) "result" (,) "," (parameter_declaration) "DArray darr" (type_identifier) "DArray" (identifier) "darr" ()) ")" (;) ";" (preproc_ifdef) "#ifdef USE_MPI_INFO\nvoid store_info(struct variable *result, MPI_Info info);\n#endif" (#ifdef) "#ifdef" (identifier) "USE_MPI_INFO" (declaration) "void store_info(struct variable *result, MPI_Info info);" (primitive_type) "void" (function_declarator) "store_info(struct variable *result, MPI_Info info)" (identifier) "store_info" (parameter_list) "(struct variable *result, MPI_Info info)" (() "(" (parameter_declaration) "struct variable *result" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "*result" (*) "*" (identifier) "result" (,) "," (parameter_declaration) "MPI_Info info" (type_identifier) "MPI_Info" (identifier) "info" ()) ")" (;) ";" (#endif) "#endif" (declaration) "extern struct variable* loopvar_stack[10];" (storage_class_specifier) "extern" (extern) "extern" (struct_specifier) "struct variable" (struct) "struct" (type_identifier) "variable" (pointer_declarator) "* loopvar_stack[10]" (*) "*" (array_declarator) "loopvar_stack[10]" (identifier) "loopvar_stack" ([) "[" (number_literal) "10" (]) "]" (;) ";" (comment) "/* @@@@ */" (declaration) "extern int loopvar_stack_sp;" (storage_class_specifier) "extern" (extern) "extern" (primitive_type) "int" (identifier) "loopvar_stack_sp" (;) ";"
1,179
0
{"language": "c", "success": true, "metadata": {"lines": 199, "avg_line_length": 23.49, "nodes": 906, "errors": 0, "source_hash": "cdf2ba241f7c4317b6cd255cbb6c1a28674293794c5f5f6678096a4fcd78e11e", "categorized_nodes": 646}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_include", "text": "#include \"mpiversiontest.h\"\n", "parent": null, "children": [1, 2], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 21, "column": 0}}, {"id": 1, "type": "#include", "text": "#include", "parent": 0, "children": [], "start_point": {"row": 20, "column": 0}, "end_point": {"row": 20, "column": 8}}, {"id": 2, "type": "string_literal", "text": "\"mpiversiontest.h\"", "parent": 0, "children": [], "start_point": {"row": 20, "column": 9}, "end_point": {"row": 20, "column": 27}}, {"id": 3, "type": "enum_specifier", "text": "enum {\n MAX_NUMBER_PARAMS = 10\n}", "parent": null, "children": [4, 5], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 24, "column": 1}}, {"id": 4, "type": "enum", "text": "enum", "parent": 3, "children": [], "start_point": {"row": 22, "column": 0}, "end_point": {"row": 22, "column": 4}}, {"id": 5, "type": "enumerator_list", "text": "{\n MAX_NUMBER_PARAMS = 10\n}", "parent": 3, "children": [6], "start_point": {"row": 22, "column": 5}, "end_point": {"row": 24, "column": 1}}, {"id": 6, "type": "enumerator", "text": "MAX_NUMBER_PARAMS = 10", "parent": 5, "children": [7, 8, 9], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 24}}, {"id": 7, "type": "identifier", "text": "MAX_NUMBER_PARAMS", "parent": 6, "children": [], "start_point": {"row": 23, "column": 2}, "end_point": {"row": 23, "column": 19}}, {"id": 8, "type": "=", "text": "=", "parent": 6, "children": [], "start_point": {"row": 23, "column": 20}, "end_point": {"row": 23, "column": 21}}, {"id": 9, "type": "number_literal", "text": "10", "parent": 6, "children": [], "start_point": {"row": 23, "column": 22}, "end_point": {"row": 23, "column": 24}}, {"id": 10, "type": "enum_specifier", "text": "enum var_type {\n TYPE_INTEGER = 'i',\n TYPE_DOUBLE = 'f',\n TYPE_STRING = 's',\n TYPE_DATATYPE = 'd',\n TYPE_COMM = 'c',\n TYPE_OP = 'o',\n TYPE_INFO = 'h',\n TYPE_VOID = '0',\n TYPE_IARRAY = 'a',\n TYPE_DARRAY = 'e'\n}", "parent": null, "children": [11, 12, 13], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 37, "column": 1}}, {"id": 11, "type": "enum", "text": "enum", "parent": 10, "children": [], "start_point": {"row": 26, "column": 0}, "end_point": {"row": 26, "column": 4}}, {"id": 12, "type": "type_identifier", "text": "var_type", "parent": 10, "children": [], "start_point": {"row": 26, "column": 5}, "end_point": {"row": 26, "column": 13}}, {"id": 13, "type": "enumerator_list", "text": "{\n TYPE_INTEGER = 'i',\n TYPE_DOUBLE = 'f',\n TYPE_STRING = 's',\n TYPE_DATATYPE = 'd',\n TYPE_COMM = 'c',\n TYPE_OP = 'o',\n TYPE_INFO = 'h',\n TYPE_VOID = '0',\n TYPE_IARRAY = 'a',\n TYPE_DARRAY = 'e'\n}", "parent": 10, "children": [14, 21, 28, 35, 42, 49, 56, 63, 70, 77], "start_point": {"row": 26, "column": 14}, "end_point": {"row": 37, "column": 1}}, {"id": 14, "type": "enumerator", "text": "TYPE_INTEGER = 'i'", "parent": 13, "children": [15, 16, 17], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 21}}, {"id": 15, "type": "identifier", "text": "TYPE_INTEGER", "parent": 14, "children": [], "start_point": {"row": 27, "column": 2}, "end_point": {"row": 27, "column": 14}}, {"id": 16, "type": "=", "text": "=", "parent": 14, "children": [], "start_point": {"row": 27, "column": 16}, "end_point": {"row": 27, "column": 17}}, {"id": 17, "type": "char_literal", "text": "'i'", "parent": 14, "children": [18, 19, 20], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 21}}, {"id": 18, "type": "'", "text": "'", "parent": 17, "children": [], "start_point": {"row": 27, "column": 18}, "end_point": {"row": 27, "column": 19}}, {"id": 19, "type": "character", "text": "i", "parent": 17, "children": [], "start_point": {"row": 27, "column": 19}, "end_point": {"row": 27, "column": 20}}, {"id": 20, "type": "'", "text": "'", "parent": 17, "children": [], "start_point": {"row": 27, "column": 20}, "end_point": {"row": 27, "column": 21}}, {"id": 21, "type": "enumerator", "text": "TYPE_DOUBLE = 'f'", "parent": 13, "children": [22, 23, 24], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 21}}, {"id": 22, "type": "identifier", "text": "TYPE_DOUBLE", "parent": 21, "children": [], "start_point": {"row": 28, "column": 2}, "end_point": {"row": 28, "column": 13}}, {"id": 23, "type": "=", "text": "=", "parent": 21, "children": [], "start_point": {"row": 28, "column": 16}, "end_point": {"row": 28, "column": 17}}, {"id": 24, "type": "char_literal", "text": "'f'", "parent": 21, "children": [25, 26, 27], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 21}}, {"id": 25, "type": "'", "text": "'", "parent": 24, "children": [], "start_point": {"row": 28, "column": 18}, "end_point": {"row": 28, "column": 19}}, {"id": 26, "type": "character", "text": "f", "parent": 24, "children": [], "start_point": {"row": 28, "column": 19}, "end_point": {"row": 28, "column": 20}}, {"id": 27, "type": "'", "text": "'", "parent": 24, "children": [], "start_point": {"row": 28, "column": 20}, "end_point": {"row": 28, "column": 21}}, {"id": 28, "type": "enumerator", "text": "TYPE_STRING = 's'", "parent": 13, "children": [29, 30, 31], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 21}}, {"id": 29, "type": "identifier", "text": "TYPE_STRING", "parent": 28, "children": [], "start_point": {"row": 29, "column": 2}, "end_point": {"row": 29, "column": 13}}, {"id": 30, "type": "=", "text": "=", "parent": 28, "children": [], "start_point": {"row": 29, "column": 16}, "end_point": {"row": 29, "column": 17}}, {"id": 31, "type": "char_literal", "text": "'s'", "parent": 28, "children": [32, 33, 34], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 21}}, {"id": 32, "type": "'", "text": "'", "parent": 31, "children": [], "start_point": {"row": 29, "column": 18}, "end_point": {"row": 29, "column": 19}}, {"id": 33, "type": "character", "text": "s", "parent": 31, "children": [], "start_point": {"row": 29, "column": 19}, "end_point": {"row": 29, "column": 20}}, {"id": 34, "type": "'", "text": "'", "parent": 31, "children": [], "start_point": {"row": 29, "column": 20}, "end_point": {"row": 29, "column": 21}}, {"id": 35, "type": "enumerator", "text": "TYPE_DATATYPE = 'd'", "parent": 13, "children": [36, 37, 38], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 21}}, {"id": 36, "type": "identifier", "text": "TYPE_DATATYPE", "parent": 35, "children": [], "start_point": {"row": 30, "column": 2}, "end_point": {"row": 30, "column": 15}}, {"id": 37, "type": "=", "text": "=", "parent": 35, "children": [], "start_point": {"row": 30, "column": 16}, "end_point": {"row": 30, "column": 17}}, {"id": 38, "type": "char_literal", "text": "'d'", "parent": 35, "children": [39, 40, 41], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 21}}, {"id": 39, "type": "'", "text": "'", "parent": 38, "children": [], "start_point": {"row": 30, "column": 18}, "end_point": {"row": 30, "column": 19}}, {"id": 40, "type": "character", "text": "d", "parent": 38, "children": [], "start_point": {"row": 30, "column": 19}, "end_point": {"row": 30, "column": 20}}, {"id": 41, "type": "'", "text": "'", "parent": 38, "children": [], "start_point": {"row": 30, "column": 20}, "end_point": {"row": 30, "column": 21}}, {"id": 42, "type": "enumerator", "text": "TYPE_COMM = 'c'", "parent": 13, "children": [43, 44, 45], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 21}}, {"id": 43, "type": "identifier", "text": "TYPE_COMM", "parent": 42, "children": [], "start_point": {"row": 31, "column": 2}, "end_point": {"row": 31, "column": 11}}, {"id": 44, "type": "=", "text": "=", "parent": 42, "children": [], "start_point": {"row": 31, "column": 16}, "end_point": {"row": 31, "column": 17}}, {"id": 45, "type": "char_literal", "text": "'c'", "parent": 42, "children": [46, 47, 48], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 21}}, {"id": 46, "type": "'", "text": "'", "parent": 45, "children": [], "start_point": {"row": 31, "column": 18}, "end_point": {"row": 31, "column": 19}}, {"id": 47, "type": "character", "text": "c", "parent": 45, "children": [], "start_point": {"row": 31, "column": 19}, "end_point": {"row": 31, "column": 20}}, {"id": 48, "type": "'", "text": "'", "parent": 45, "children": [], "start_point": {"row": 31, "column": 20}, "end_point": {"row": 31, "column": 21}}, {"id": 49, "type": "enumerator", "text": "TYPE_OP = 'o'", "parent": 13, "children": [50, 51, 52], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 21}}, {"id": 50, "type": "identifier", "text": "TYPE_OP", "parent": 49, "children": [], "start_point": {"row": 32, "column": 2}, "end_point": {"row": 32, "column": 9}}, {"id": 51, "type": "=", "text": "=", "parent": 49, "children": [], "start_point": {"row": 32, "column": 16}, "end_point": {"row": 32, "column": 17}}, {"id": 52, "type": "char_literal", "text": "'o'", "parent": 49, "children": [53, 54, 55], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 21}}, {"id": 53, "type": "'", "text": "'", "parent": 52, "children": [], "start_point": {"row": 32, "column": 18}, "end_point": {"row": 32, "column": 19}}, {"id": 54, "type": "character", "text": "o", "parent": 52, "children": [], "start_point": {"row": 32, "column": 19}, "end_point": {"row": 32, "column": 20}}, {"id": 55, "type": "'", "text": "'", "parent": 52, "children": [], "start_point": {"row": 32, "column": 20}, "end_point": {"row": 32, "column": 21}}, {"id": 56, "type": "enumerator", "text": "TYPE_INFO = 'h'", "parent": 13, "children": [57, 58, 59], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 21}}, {"id": 57, "type": "identifier", "text": "TYPE_INFO", "parent": 56, "children": [], "start_point": {"row": 33, "column": 2}, "end_point": {"row": 33, "column": 11}}, {"id": 58, "type": "=", "text": "=", "parent": 56, "children": [], "start_point": {"row": 33, "column": 16}, "end_point": {"row": 33, "column": 17}}, {"id": 59, "type": "char_literal", "text": "'h'", "parent": 56, "children": [60, 61, 62], "start_point": {"row": 33, "column": 18}, "end_point": {"row": 33, "column": 21}}, {"id": 60, "type": "'", "text": "'", "parent": 59, "children": [], "start_point": {"row": 33, "column": 18}, "end_point": {"row": 33, "column": 19}}, {"id": 61, "type": "character", "text": "h", "parent": 59, "children": [], "start_point": {"row": 33, "column": 19}, "end_point": {"row": 33, "column": 20}}, {"id": 62, "type": "'", "text": "'", "parent": 59, "children": [], "start_point": {"row": 33, "column": 20}, "end_point": {"row": 33, "column": 21}}, {"id": 63, "type": "enumerator", "text": "TYPE_VOID = '0'", "parent": 13, "children": [64, 65, 66], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 21}}, {"id": 64, "type": "identifier", "text": "TYPE_VOID", "parent": 63, "children": [], "start_point": {"row": 34, "column": 2}, "end_point": {"row": 34, "column": 11}}, {"id": 65, "type": "=", "text": "=", "parent": 63, "children": [], "start_point": {"row": 34, "column": 16}, "end_point": {"row": 34, "column": 17}}, {"id": 66, "type": "char_literal", "text": "'0'", "parent": 63, "children": [67, 68, 69], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 21}}, {"id": 67, "type": "'", "text": "'", "parent": 66, "children": [], "start_point": {"row": 34, "column": 18}, "end_point": {"row": 34, "column": 19}}, {"id": 68, "type": "character", "text": "0", "parent": 66, "children": [], "start_point": {"row": 34, "column": 19}, "end_point": {"row": 34, "column": 20}}, {"id": 69, "type": "'", "text": "'", "parent": 66, "children": [], "start_point": {"row": 34, "column": 20}, "end_point": {"row": 34, "column": 21}}, {"id": 70, "type": "enumerator", "text": "TYPE_IARRAY = 'a'", "parent": 13, "children": [71, 72, 73], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 21}}, {"id": 71, "type": "identifier", "text": "TYPE_IARRAY", "parent": 70, "children": [], "start_point": {"row": 35, "column": 2}, "end_point": {"row": 35, "column": 13}}, {"id": 72, "type": "=", "text": "=", "parent": 70, "children": [], "start_point": {"row": 35, "column": 16}, "end_point": {"row": 35, "column": 17}}, {"id": 73, "type": "char_literal", "text": "'a'", "parent": 70, "children": [74, 75, 76], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 21}}, {"id": 74, "type": "'", "text": "'", "parent": 73, "children": [], "start_point": {"row": 35, "column": 18}, "end_point": {"row": 35, "column": 19}}, {"id": 75, "type": "character", "text": "a", "parent": 73, "children": [], "start_point": {"row": 35, "column": 19}, "end_point": {"row": 35, "column": 20}}, {"id": 76, "type": "'", "text": "'", "parent": 73, "children": [], "start_point": {"row": 35, "column": 20}, "end_point": {"row": 35, "column": 21}}, {"id": 77, "type": "enumerator", "text": "TYPE_DARRAY = 'e'", "parent": 13, "children": [78, 79, 80], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 21}}, {"id": 78, "type": "identifier", "text": "TYPE_DARRAY", "parent": 77, "children": [], "start_point": {"row": 36, "column": 2}, "end_point": {"row": 36, "column": 13}}, {"id": 79, "type": "=", "text": "=", "parent": 77, "children": [], "start_point": {"row": 36, "column": 16}, "end_point": {"row": 36, "column": 17}}, {"id": 80, "type": "char_literal", "text": "'e'", "parent": 77, "children": [81, 82, 83], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 21}}, {"id": 81, "type": "'", "text": "'", "parent": 80, "children": [], "start_point": {"row": 36, "column": 18}, "end_point": {"row": 36, "column": 19}}, {"id": 82, "type": "character", "text": "e", "parent": 80, "children": [], "start_point": {"row": 36, "column": 19}, "end_point": {"row": 36, "column": 20}}, {"id": 83, "type": "'", "text": "'", "parent": 80, "children": [], "start_point": {"row": 36, "column": 20}, "end_point": {"row": 36, "column": 21}}, {"id": 84, "type": "type_definition", "text": "typedef struct {\n int* v;\n int n;\n} IArray;", "parent": null, "children": [85, 86, 96], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 42, "column": 9}}, {"id": 85, "type": "typedef", "text": "typedef", "parent": 84, "children": [], "start_point": {"row": 39, "column": 0}, "end_point": {"row": 39, "column": 7}}, {"id": 86, "type": "struct_specifier", "text": "struct {\n int* v;\n int n;\n}", "parent": 84, "children": [87], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 42, "column": 1}}, {"id": 87, "type": "struct", "text": "struct", "parent": 86, "children": [], "start_point": {"row": 39, "column": 8}, "end_point": {"row": 39, "column": 14}}, {"id": 88, "type": "field_declaration", "text": "int* v;", "parent": 86, "children": [89, 90], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 9}}, {"id": 89, "type": "primitive_type", "text": "int", "parent": 88, "children": [], "start_point": {"row": 40, "column": 2}, "end_point": {"row": 40, "column": 5}}, {"id": 90, "type": "pointer_declarator", "text": "* v", "parent": 88, "children": [91, 92], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 8}}, {"id": 91, "type": "*", "text": "*", "parent": 90, "children": [], "start_point": {"row": 40, "column": 5}, "end_point": {"row": 40, "column": 6}}, {"id": 92, "type": "field_identifier", "text": "v", "parent": 90, "children": [], "start_point": {"row": 40, "column": 7}, "end_point": {"row": 40, "column": 8}}, {"id": 93, "type": "field_declaration", "text": "int n;", "parent": 86, "children": [94, 95], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 8}}, {"id": 94, "type": "primitive_type", "text": "int", "parent": 93, "children": [], "start_point": {"row": 41, "column": 2}, "end_point": {"row": 41, "column": 5}}, {"id": 95, "type": "field_identifier", "text": "n", "parent": 93, "children": [], "start_point": {"row": 41, "column": 6}, "end_point": {"row": 41, "column": 7}}, {"id": 96, "type": "type_identifier", "text": "IArray", "parent": 84, "children": [], "start_point": {"row": 42, "column": 2}, "end_point": {"row": 42, "column": 8}}, {"id": 97, "type": "type_definition", "text": "typedef struct {\n MPI_Datatype *v;\n int n;\n} DArray;", "parent": null, "children": [98, 99, 109], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 47, "column": 9}}, {"id": 98, "type": "typedef", "text": "typedef", "parent": 97, "children": [], "start_point": {"row": 44, "column": 0}, "end_point": {"row": 44, "column": 7}}, {"id": 99, "type": "struct_specifier", "text": "struct {\n MPI_Datatype *v;\n int n;\n}", "parent": 97, "children": [100], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 47, "column": 1}}, {"id": 100, "type": "struct", "text": "struct", "parent": 99, "children": [], "start_point": {"row": 44, "column": 8}, "end_point": {"row": 44, "column": 14}}, {"id": 101, "type": "field_declaration", "text": "MPI_Datatype *v;", "parent": 99, "children": [102, 103], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 18}}, {"id": 102, "type": "type_identifier", "text": "MPI_Datatype", "parent": 101, "children": [], "start_point": {"row": 45, "column": 2}, "end_point": {"row": 45, "column": 14}}, {"id": 103, "type": "pointer_declarator", "text": "*v", "parent": 101, "children": [104, 105], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 17}}, {"id": 104, "type": "*", "text": "*", "parent": 103, "children": [], "start_point": {"row": 45, "column": 15}, "end_point": {"row": 45, "column": 16}}, {"id": 105, "type": "field_identifier", "text": "v", "parent": 103, "children": [], "start_point": {"row": 45, "column": 16}, "end_point": {"row": 45, "column": 17}}, {"id": 106, "type": "field_declaration", "text": "int n;", "parent": 99, "children": [107, 108], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 8}}, {"id": 107, "type": "primitive_type", "text": "int", "parent": 106, "children": [], "start_point": {"row": 46, "column": 2}, "end_point": {"row": 46, "column": 5}}, {"id": 108, "type": "field_identifier", "text": "n", "parent": 106, "children": [], "start_point": {"row": 46, "column": 6}, "end_point": {"row": 46, "column": 7}}, {"id": 109, "type": "type_identifier", "text": "DArray", "parent": 97, "children": [], "start_point": {"row": 47, "column": 2}, "end_point": {"row": 47, "column": 8}}, {"id": 110, "type": "struct_specifier", "text": "struct variable {\n enum var_type type;\n char *name;\n char *string_repr;\n int *ref_counter;\n /*int **ref_counters;*/ /* reference counters of array elements */\n union {\n int intv;\n double doublev;\n char *stringv;\n MPI_Datatype datatypev;\n MPI_Comm commv;\n MPI_Op opv;\n IArray iarrv;\n DArray darrv;\n#ifdef USE_MPI_INFO\n MPI_Info infov;\n#endif\n } u;\n}", "parent": null, "children": [111, 112], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 68, "column": 1}}, {"id": 111, "type": "struct", "text": "struct", "parent": 110, "children": [], "start_point": {"row": 49, "column": 0}, "end_point": {"row": 49, "column": 6}}, {"id": 112, "type": "type_identifier", "text": "variable", "parent": 110, "children": [], "start_point": {"row": 49, "column": 7}, "end_point": {"row": 49, "column": 15}}, {"id": 113, "type": "field_declaration", "text": "enum var_type type;", "parent": 110, "children": [114, 117], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 21}}, {"id": 114, "type": "enum_specifier", "text": "enum var_type", "parent": 113, "children": [115, 116], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 15}}, {"id": 115, "type": "enum", "text": "enum", "parent": 114, "children": [], "start_point": {"row": 50, "column": 2}, "end_point": {"row": 50, "column": 6}}, {"id": 116, "type": "type_identifier", "text": "var_type", "parent": 114, "children": [], "start_point": {"row": 50, "column": 7}, "end_point": {"row": 50, "column": 15}}, {"id": 117, "type": "field_identifier", "text": "type", "parent": 113, "children": [], "start_point": {"row": 50, "column": 16}, "end_point": {"row": 50, "column": 20}}, {"id": 118, "type": "field_declaration", "text": "char *name;", "parent": 110, "children": [119, 120], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 13}}, {"id": 119, "type": "primitive_type", "text": "char", "parent": 118, "children": [], "start_point": {"row": 51, "column": 2}, "end_point": {"row": 51, "column": 6}}, {"id": 120, "type": "pointer_declarator", "text": "*name", "parent": 118, "children": [121, 122], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 12}}, {"id": 121, "type": "*", "text": "*", "parent": 120, "children": [], "start_point": {"row": 51, "column": 7}, "end_point": {"row": 51, "column": 8}}, {"id": 122, "type": "field_identifier", "text": "name", "parent": 120, "children": [], "start_point": {"row": 51, "column": 8}, "end_point": {"row": 51, "column": 12}}, {"id": 123, "type": "field_declaration", "text": "char *string_repr;", "parent": 110, "children": [124, 125], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 20}}, {"id": 124, "type": "primitive_type", "text": "char", "parent": 123, "children": [], "start_point": {"row": 52, "column": 2}, "end_point": {"row": 52, "column": 6}}, {"id": 125, "type": "pointer_declarator", "text": "*string_repr", "parent": 123, "children": [126, 127], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 19}}, {"id": 126, "type": "*", "text": "*", "parent": 125, "children": [], "start_point": {"row": 52, "column": 7}, "end_point": {"row": 52, "column": 8}}, {"id": 127, "type": "field_identifier", "text": "string_repr", "parent": 125, "children": [], "start_point": {"row": 52, "column": 8}, "end_point": {"row": 52, "column": 19}}, {"id": 128, "type": "field_declaration", "text": "int *ref_counter;", "parent": 110, "children": [129, 130], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 19}}, {"id": 129, "type": "primitive_type", "text": "int", "parent": 128, "children": [], "start_point": {"row": 53, "column": 2}, "end_point": {"row": 53, "column": 5}}, {"id": 130, "type": "pointer_declarator", "text": "*ref_counter", "parent": 128, "children": [131, 132], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 18}}, {"id": 131, "type": "*", "text": "*", "parent": 130, "children": [], "start_point": {"row": 53, "column": 6}, "end_point": {"row": 53, "column": 7}}, {"id": 132, "type": "field_identifier", "text": "ref_counter", "parent": 130, "children": [], "start_point": {"row": 53, "column": 7}, "end_point": {"row": 53, "column": 18}}, {"id": 133, "type": "field_declaration", "text": "union {\n int intv;\n double doublev;\n char *stringv;\n MPI_Datatype datatypev;\n MPI_Comm commv;\n MPI_Op opv;\n IArray iarrv;\n DArray darrv;\n#ifdef USE_MPI_INFO\n MPI_Info infov;\n#endif\n } u;", "parent": 110, "children": [134, 169], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 67, "column": 6}}, {"id": 134, "type": "union_specifier", "text": "union {\n int intv;\n double doublev;\n char *stringv;\n MPI_Datatype datatypev;\n MPI_Comm commv;\n MPI_Op opv;\n IArray iarrv;\n DArray darrv;\n#ifdef USE_MPI_INFO\n MPI_Info infov;\n#endif\n }", "parent": 133, "children": [135], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 67, "column": 3}}, {"id": 135, "type": "union", "text": "union", "parent": 134, "children": [], "start_point": {"row": 55, "column": 2}, "end_point": {"row": 55, "column": 7}}, {"id": 136, "type": "field_declaration", "text": "int intv;", "parent": 134, "children": [137, 138], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 13}}, {"id": 137, "type": "primitive_type", "text": "int", "parent": 136, "children": [], "start_point": {"row": 56, "column": 4}, "end_point": {"row": 56, "column": 7}}, {"id": 138, "type": "field_identifier", "text": "intv", "parent": 136, "children": [], "start_point": {"row": 56, "column": 8}, "end_point": {"row": 56, "column": 12}}, {"id": 139, "type": "field_declaration", "text": "double doublev;", "parent": 134, "children": [140, 141], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 19}}, {"id": 140, "type": "primitive_type", "text": "double", "parent": 139, "children": [], "start_point": {"row": 57, "column": 4}, "end_point": {"row": 57, "column": 10}}, {"id": 141, "type": "field_identifier", "text": "doublev", "parent": 139, "children": [], "start_point": {"row": 57, "column": 11}, "end_point": {"row": 57, "column": 18}}, {"id": 142, "type": "field_declaration", "text": "char *stringv;", "parent": 134, "children": [143, 144], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 18}}, {"id": 143, "type": "primitive_type", "text": "char", "parent": 142, "children": [], "start_point": {"row": 58, "column": 4}, "end_point": {"row": 58, "column": 8}}, {"id": 144, "type": "pointer_declarator", "text": "*stringv", "parent": 142, "children": [145, 146], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 17}}, {"id": 145, "type": "*", "text": "*", "parent": 144, "children": [], "start_point": {"row": 58, "column": 9}, "end_point": {"row": 58, "column": 10}}, {"id": 146, "type": "field_identifier", "text": "stringv", "parent": 144, "children": [], "start_point": {"row": 58, "column": 10}, "end_point": {"row": 58, "column": 17}}, {"id": 147, "type": "field_declaration", "text": "MPI_Datatype datatypev;", "parent": 134, "children": [148, 149], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 27}}, {"id": 148, "type": "type_identifier", "text": "MPI_Datatype", "parent": 147, "children": [], "start_point": {"row": 59, "column": 4}, "end_point": {"row": 59, "column": 16}}, {"id": 149, "type": "field_identifier", "text": "datatypev", "parent": 147, "children": [], "start_point": {"row": 59, "column": 17}, "end_point": {"row": 59, "column": 26}}, {"id": 150, "type": "field_declaration", "text": "MPI_Comm commv;", "parent": 134, "children": [151, 152], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 19}}, {"id": 151, "type": "type_identifier", "text": "MPI_Comm", "parent": 150, "children": [], "start_point": {"row": 60, "column": 4}, "end_point": {"row": 60, "column": 12}}, {"id": 152, "type": "field_identifier", "text": "commv", "parent": 150, "children": [], "start_point": {"row": 60, "column": 13}, "end_point": {"row": 60, "column": 18}}, {"id": 153, "type": "field_declaration", "text": "MPI_Op opv;", "parent": 134, "children": [154, 155], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 15}}, {"id": 154, "type": "type_identifier", "text": "MPI_Op", "parent": 153, "children": [], "start_point": {"row": 61, "column": 4}, "end_point": {"row": 61, "column": 10}}, {"id": 155, "type": "field_identifier", "text": "opv", "parent": 153, "children": [], "start_point": {"row": 61, "column": 11}, "end_point": {"row": 61, "column": 14}}, {"id": 156, "type": "field_declaration", "text": "IArray iarrv;", "parent": 134, "children": [157, 158], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 17}}, {"id": 157, "type": "type_identifier", "text": "IArray", "parent": 156, "children": [], "start_point": {"row": 62, "column": 4}, "end_point": {"row": 62, "column": 10}}, {"id": 158, "type": "field_identifier", "text": "iarrv", "parent": 156, "children": [], "start_point": {"row": 62, "column": 11}, "end_point": {"row": 62, "column": 16}}, {"id": 159, "type": "field_declaration", "text": "DArray darrv;", "parent": 134, "children": [160, 161], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 17}}, {"id": 160, "type": "type_identifier", "text": "DArray", "parent": 159, "children": [], "start_point": {"row": 63, "column": 4}, "end_point": {"row": 63, "column": 10}}, {"id": 161, "type": "field_identifier", "text": "darrv", "parent": 159, "children": [], "start_point": {"row": 63, "column": 11}, "end_point": {"row": 63, "column": 16}}, {"id": 162, "type": "preproc_ifdef", "text": "#ifdef USE_MPI_INFO\n MPI_Info infov;\n#endif", "parent": 134, "children": [163, 164, 165, 168], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 66, "column": 6}}, {"id": 163, "type": "#ifdef", "text": "#ifdef", "parent": 162, "children": [], "start_point": {"row": 64, "column": 0}, "end_point": {"row": 64, "column": 6}}, {"id": 164, "type": "identifier", "text": "USE_MPI_INFO", "parent": 162, "children": [], "start_point": {"row": 64, "column": 7}, "end_point": {"row": 64, "column": 19}}, {"id": 165, "type": "field_declaration", "text": "MPI_Info infov;", "parent": 162, "children": [166, 167], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 19}}, {"id": 166, "type": "type_identifier", "text": "MPI_Info", "parent": 165, "children": [], "start_point": {"row": 65, "column": 4}, "end_point": {"row": 65, "column": 12}}, {"id": 167, "type": "field_identifier", "text": "infov", "parent": 165, "children": [], "start_point": {"row": 65, "column": 13}, "end_point": {"row": 65, "column": 18}}, {"id": 168, "type": "#endif", "text": "#endif", "parent": 162, "children": [], "start_point": {"row": 66, "column": 0}, "end_point": {"row": 66, "column": 6}}, {"id": 169, "type": "field_identifier", "text": "u", "parent": 133, "children": [], "start_point": {"row": 67, "column": 4}, "end_point": {"row": 67, "column": 5}}, {"id": 170, "type": "type_definition", "text": "typedef void (*type_normal_fp)(struct variable *result, struct variable par[]);", "parent": null, "children": [171, 172, 173], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 79}}, {"id": 171, "type": "typedef", "text": "typedef", "parent": 170, "children": [], "start_point": {"row": 72, "column": 0}, "end_point": {"row": 72, "column": 7}}, {"id": 172, "type": "primitive_type", "text": "void", "parent": 170, "children": [], "start_point": {"row": 72, "column": 8}, "end_point": {"row": 72, "column": 12}}, {"id": 173, "type": "function_declarator", "text": "(*type_normal_fp)(struct variable *result, struct variable par[])", "parent": 170, "children": [174, 178], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 78}}, {"id": 174, "type": "parenthesized_declarator", "text": "(*type_normal_fp)", "parent": 173, "children": [175], "start_point": {"row": 72, "column": 13}, "end_point": {"row": 72, "column": 30}}, {"id": 175, "type": "pointer_declarator", "text": "*type_normal_fp", "parent": 174, "children": [176, 177], "start_point": {"row": 72, "column": 14}, "end_point": {"row": 72, "column": 29}}, {"id": 176, "type": "*", "text": "*", "parent": 175, "children": [], "start_point": {"row": 72, "column": 14}, "end_point": {"row": 72, "column": 15}}, {"id": 177, "type": "type_identifier", "text": "type_normal_fp", "parent": 175, "children": [], "start_point": {"row": 72, "column": 15}, "end_point": {"row": 72, "column": 29}}, {"id": 178, "type": "parameter_list", "text": "(struct variable *result, struct variable par[])", "parent": 173, "children": [179, 186], "start_point": {"row": 72, "column": 30}, "end_point": {"row": 72, "column": 78}}, {"id": 179, "type": "parameter_declaration", "text": "struct variable *result", "parent": 178, "children": [180, 183], "start_point": {"row": 72, "column": 31}, "end_point": {"row": 72, "column": 54}}, {"id": 180, "type": "struct_specifier", "text": "struct variable", "parent": 179, "children": [181, 182], "start_point": {"row": 72, "column": 31}, "end_point": {"row": 72, "column": 46}}, {"id": 181, "type": "struct", "text": "struct", "parent": 180, "children": [], "start_point": {"row": 72, "column": 31}, "end_point": {"row": 72, "column": 37}}, {"id": 182, "type": "type_identifier", "text": "variable", "parent": 180, "children": [], "start_point": {"row": 72, "column": 38}, "end_point": {"row": 72, "column": 46}}, {"id": 183, "type": "pointer_declarator", "text": "*result", "parent": 179, "children": [184, 185], "start_point": {"row": 72, "column": 47}, "end_point": {"row": 72, "column": 54}}, {"id": 184, "type": "*", "text": "*", "parent": 183, "children": [], "start_point": {"row": 72, "column": 47}, "end_point": {"row": 72, "column": 48}}, {"id": 185, "type": "identifier", "text": "result", "parent": 183, "children": [], "start_point": {"row": 72, "column": 48}, "end_point": {"row": 72, "column": 54}}, {"id": 186, "type": "parameter_declaration", "text": "struct variable par[]", "parent": 178, "children": [187, 190], "start_point": {"row": 72, "column": 56}, "end_point": {"row": 72, "column": 77}}, {"id": 187, "type": "struct_specifier", "text": "struct variable", "parent": 186, "children": [188, 189], "start_point": {"row": 72, "column": 56}, "end_point": {"row": 72, "column": 71}}, {"id": 188, "type": "struct", "text": "struct", "parent": 187, "children": [], "start_point": {"row": 72, "column": 56}, "end_point": {"row": 72, "column": 62}}, {"id": 189, "type": "type_identifier", "text": "variable", "parent": 187, "children": [], "start_point": {"row": 72, "column": 63}, "end_point": {"row": 72, "column": 71}}, {"id": 190, "type": "array_declarator", "text": "par[]", "parent": 186, "children": [191], "start_point": {"row": 72, "column": 72}, "end_point": {"row": 72, "column": 77}}, {"id": 191, "type": "identifier", "text": "par", "parent": 190, "children": [], "start_point": {"row": 72, "column": 72}, "end_point": {"row": 72, "column": 75}}, {"id": 192, "type": "type_definition", "text": "typedef void (*type_iterator_fp)(struct variable *result, \n\t\t\t\t struct variable par[], void **self);", "parent": null, "children": [193, 194, 195], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 74, "column": 41}}, {"id": 193, "type": "typedef", "text": "typedef", "parent": 192, "children": [], "start_point": {"row": 73, "column": 0}, "end_point": {"row": 73, "column": 7}}, {"id": 194, "type": "primitive_type", "text": "void", "parent": 192, "children": [], "start_point": {"row": 73, "column": 8}, "end_point": {"row": 73, "column": 12}}, {"id": 195, "type": "function_declarator", "text": "(*type_iterator_fp)(struct variable *result, \n\t\t\t\t struct variable par[], void **self)", "parent": 192, "children": [196, 200], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 74, "column": 40}}, {"id": 196, "type": "parenthesized_declarator", "text": "(*type_iterator_fp)", "parent": 195, "children": [197], "start_point": {"row": 73, "column": 13}, "end_point": {"row": 73, "column": 32}}, {"id": 197, "type": "pointer_declarator", "text": "*type_iterator_fp", "parent": 196, "children": [198, 199], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 31}}, {"id": 198, "type": "*", "text": "*", "parent": 197, "children": [], "start_point": {"row": 73, "column": 14}, "end_point": {"row": 73, "column": 15}}, {"id": 199, "type": "type_identifier", "text": "type_iterator_fp", "parent": 197, "children": [], "start_point": {"row": 73, "column": 15}, "end_point": {"row": 73, "column": 31}}, {"id": 200, "type": "parameter_list", "text": "(struct variable *result, \n\t\t\t\t struct variable par[], void **self)", "parent": 195, "children": [201, 208, 214], "start_point": {"row": 73, "column": 32}, "end_point": {"row": 74, "column": 40}}, {"id": 201, "type": "parameter_declaration", "text": "struct variable *result", "parent": 200, "children": [202, 205], "start_point": {"row": 73, "column": 33}, "end_point": {"row": 73, "column": 56}}, {"id": 202, "type": "struct_specifier", "text": "struct variable", "parent": 201, "children": [203, 204], "start_point": {"row": 73, "column": 33}, "end_point": {"row": 73, "column": 48}}, {"id": 203, "type": "struct", "text": "struct", "parent": 202, "children": [], "start_point": {"row": 73, "column": 33}, "end_point": {"row": 73, "column": 39}}, {"id": 204, "type": "type_identifier", "text": "variable", "parent": 202, "children": [], "start_point": {"row": 73, "column": 40}, "end_point": {"row": 73, "column": 48}}, {"id": 205, "type": "pointer_declarator", "text": "*result", "parent": 201, "children": [206, 207], "start_point": {"row": 73, "column": 49}, "end_point": {"row": 73, "column": 56}}, {"id": 206, "type": "*", "text": "*", "parent": 205, "children": [], "start_point": {"row": 73, "column": 49}, "end_point": {"row": 73, "column": 50}}, {"id": 207, "type": "identifier", "text": "result", "parent": 205, "children": [], "start_point": {"row": 73, "column": 50}, "end_point": {"row": 73, "column": 56}}, {"id": 208, "type": "parameter_declaration", "text": "struct variable par[]", "parent": 200, "children": [209, 212], "start_point": {"row": 74, "column": 5}, "end_point": {"row": 74, "column": 26}}, {"id": 209, "type": "struct_specifier", "text": "struct variable", "parent": 208, "children": [210, 211], "start_point": {"row": 74, "column": 5}, "end_point": {"row": 74, "column": 20}}, {"id": 210, "type": "struct", "text": "struct", "parent": 209, "children": [], "start_point": {"row": 74, "column": 5}, "end_point": {"row": 74, "column": 11}}, {"id": 211, "type": "type_identifier", "text": "variable", "parent": 209, "children": [], "start_point": {"row": 74, "column": 12}, "end_point": {"row": 74, "column": 20}}, {"id": 212, "type": "array_declarator", "text": "par[]", "parent": 208, "children": [213], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 26}}, {"id": 213, "type": "identifier", "text": "par", "parent": 212, "children": [], "start_point": {"row": 74, "column": 21}, "end_point": {"row": 74, "column": 24}}, {"id": 214, "type": "parameter_declaration", "text": "void **self", "parent": 200, "children": [215, 216], "start_point": {"row": 74, "column": 28}, "end_point": {"row": 74, "column": 39}}, {"id": 215, "type": "primitive_type", "text": "void", "parent": 214, "children": [], "start_point": {"row": 74, "column": 28}, "end_point": {"row": 74, "column": 32}}, {"id": 216, "type": "pointer_declarator", "text": "**self", "parent": 214, "children": [217, 218], "start_point": {"row": 74, "column": 33}, "end_point": {"row": 74, "column": 39}}, {"id": 217, "type": "*", "text": "*", "parent": 216, "children": [], "start_point": {"row": 74, "column": 33}, "end_point": {"row": 74, "column": 34}}, {"id": 218, "type": "pointer_declarator", "text": "*self", "parent": 216, "children": [219, 220], "start_point": {"row": 74, "column": 34}, "end_point": {"row": 74, "column": 39}}, {"id": 219, "type": "*", "text": "*", "parent": 218, "children": [], "start_point": {"row": 74, "column": 34}, "end_point": {"row": 74, "column": 35}}, {"id": 220, "type": "identifier", "text": "self", "parent": 218, "children": [], "start_point": {"row": 74, "column": 35}, "end_point": {"row": 74, "column": 39}}, {"id": 221, "type": "enum_specifier", "text": "enum term_type {\n TERM_VALUE = 300,\n TERM_UNARY,\n TERM_BINARY,\n TERM_FUNC,\n TERM_ARRAY\n}", "parent": null, "children": [222, 223, 224], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 84, "column": 1}}, {"id": 222, "type": "enum", "text": "enum", "parent": 221, "children": [], "start_point": {"row": 78, "column": 0}, "end_point": {"row": 78, "column": 4}}, {"id": 223, "type": "type_identifier", "text": "term_type", "parent": 221, "children": [], "start_point": {"row": 78, "column": 5}, "end_point": {"row": 78, "column": 14}}, {"id": 224, "type": "enumerator_list", "text": "{\n TERM_VALUE = 300,\n TERM_UNARY,\n TERM_BINARY,\n TERM_FUNC,\n TERM_ARRAY\n}", "parent": 221, "children": [225, 229, 231, 233, 235], "start_point": {"row": 78, "column": 15}, "end_point": {"row": 84, "column": 1}}, {"id": 225, "type": "enumerator", "text": "TERM_VALUE = 300", "parent": 224, "children": [226, 227, 228], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 18}}, {"id": 226, "type": "identifier", "text": "TERM_VALUE", "parent": 225, "children": [], "start_point": {"row": 79, "column": 2}, "end_point": {"row": 79, "column": 12}}, {"id": 227, "type": "=", "text": "=", "parent": 225, "children": [], "start_point": {"row": 79, "column": 13}, "end_point": {"row": 79, "column": 14}}, {"id": 228, "type": "number_literal", "text": "300", "parent": 225, "children": [], "start_point": {"row": 79, "column": 15}, "end_point": {"row": 79, "column": 18}}, {"id": 229, "type": "enumerator", "text": "TERM_UNARY", "parent": 224, "children": [230], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 12}}, {"id": 230, "type": "identifier", "text": "TERM_UNARY", "parent": 229, "children": [], "start_point": {"row": 80, "column": 2}, "end_point": {"row": 80, "column": 12}}, {"id": 231, "type": "enumerator", "text": "TERM_BINARY", "parent": 224, "children": [232], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 13}}, {"id": 232, "type": "identifier", "text": "TERM_BINARY", "parent": 231, "children": [], "start_point": {"row": 81, "column": 2}, "end_point": {"row": 81, "column": 13}}, {"id": 233, "type": "enumerator", "text": "TERM_FUNC", "parent": 224, "children": [234], "start_point": {"row": 82, "column": 2}, "end_point": {"row": 82, "column": 11}}, {"id": 234, "type": "identifier", "text": "TERM_FUNC", "parent": 233, "children": [], "start_point": {"row": 82, "column": 2}, "end_point": {"row": 82, "column": 11}}, {"id": 235, "type": "enumerator", "text": "TERM_ARRAY", "parent": 224, "children": [236], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 12}}, {"id": 236, "type": "identifier", "text": "TERM_ARRAY", "parent": 235, "children": [], "start_point": {"row": 83, "column": 2}, "end_point": {"row": 83, "column": 12}}, {"id": 237, "type": "enum_specifier", "text": "enum op_type {\n OP_ADD = 400,\n OP_SUB,\n OP_MULT,\n OP_DIV,\n OP_MOD,\n OP_LT,\n OP_LE,\n OP_GT,\n OP_GE,\n OP_EQ,\n OP_NEQ,\n OP_AND,\n OP_BAND,\n OP_OR,\n OP_BOR,\n OP_NOT,\n OP_BNOT\n}", "parent": null, "children": [238, 239, 240], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 104, "column": 1}}, {"id": 238, "type": "enum", "text": "enum", "parent": 237, "children": [], "start_point": {"row": 86, "column": 0}, "end_point": {"row": 86, "column": 4}}, {"id": 239, "type": "type_identifier", "text": "op_type", "parent": 237, "children": [], "start_point": {"row": 86, "column": 5}, "end_point": {"row": 86, "column": 12}}, {"id": 240, "type": "enumerator_list", "text": "{\n OP_ADD = 400,\n OP_SUB,\n OP_MULT,\n OP_DIV,\n OP_MOD,\n OP_LT,\n OP_LE,\n OP_GT,\n OP_GE,\n OP_EQ,\n OP_NEQ,\n OP_AND,\n OP_BAND,\n OP_OR,\n OP_BOR,\n OP_NOT,\n OP_BNOT\n}", "parent": 237, "children": [241, 245, 247, 249, 251, 253, 255, 257, 259, 261, 263, 265, 267, 269, 271, 273, 275], "start_point": {"row": 86, "column": 13}, "end_point": {"row": 104, "column": 1}}, {"id": 241, "type": "enumerator", "text": "OP_ADD = 400", "parent": 240, "children": [242, 243, 244], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 14}}, {"id": 242, "type": "identifier", "text": "OP_ADD", "parent": 241, "children": [], "start_point": {"row": 87, "column": 2}, "end_point": {"row": 87, "column": 8}}, {"id": 243, "type": "=", "text": "=", "parent": 241, "children": [], "start_point": {"row": 87, "column": 9}, "end_point": {"row": 87, "column": 10}}, {"id": 244, "type": "number_literal", "text": "400", "parent": 241, "children": [], "start_point": {"row": 87, "column": 11}, "end_point": {"row": 87, "column": 14}}, {"id": 245, "type": "enumerator", "text": "OP_SUB", "parent": 240, "children": [246], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 8}}, {"id": 246, "type": "identifier", "text": "OP_SUB", "parent": 245, "children": [], "start_point": {"row": 88, "column": 2}, "end_point": {"row": 88, "column": 8}}, {"id": 247, "type": "enumerator", "text": "OP_MULT", "parent": 240, "children": [248], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 9}}, {"id": 248, "type": "identifier", "text": "OP_MULT", "parent": 247, "children": [], "start_point": {"row": 89, "column": 2}, "end_point": {"row": 89, "column": 9}}, {"id": 249, "type": "enumerator", "text": "OP_DIV", "parent": 240, "children": [250], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 8}}, {"id": 250, "type": "identifier", "text": "OP_DIV", "parent": 249, "children": [], "start_point": {"row": 90, "column": 2}, "end_point": {"row": 90, "column": 8}}, {"id": 251, "type": "enumerator", "text": "OP_MOD", "parent": 240, "children": [252], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 8}}, {"id": 252, "type": "identifier", "text": "OP_MOD", "parent": 251, "children": [], "start_point": {"row": 91, "column": 2}, "end_point": {"row": 91, "column": 8}}, {"id": 253, "type": "enumerator", "text": "OP_LT", "parent": 240, "children": [254], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 7}}, {"id": 254, "type": "identifier", "text": "OP_LT", "parent": 253, "children": [], "start_point": {"row": 92, "column": 2}, "end_point": {"row": 92, "column": 7}}, {"id": 255, "type": "enumerator", "text": "OP_LE", "parent": 240, "children": [256], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 7}}, {"id": 256, "type": "identifier", "text": "OP_LE", "parent": 255, "children": [], "start_point": {"row": 93, "column": 2}, "end_point": {"row": 93, "column": 7}}, {"id": 257, "type": "enumerator", "text": "OP_GT", "parent": 240, "children": [258], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 7}}, {"id": 258, "type": "identifier", "text": "OP_GT", "parent": 257, "children": [], "start_point": {"row": 94, "column": 2}, "end_point": {"row": 94, "column": 7}}, {"id": 259, "type": "enumerator", "text": "OP_GE", "parent": 240, "children": [260], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 7}}, {"id": 260, "type": "identifier", "text": "OP_GE", "parent": 259, "children": [], "start_point": {"row": 95, "column": 2}, "end_point": {"row": 95, "column": 7}}, {"id": 261, "type": "enumerator", "text": "OP_EQ", "parent": 240, "children": [262], "start_point": {"row": 96, "column": 2}, "end_point": {"row": 96, "column": 7}}, {"id": 262, "type": "identifier", "text": "OP_EQ", "parent": 261, "children": [], "start_point": {"row": 96, "column": 2}, "end_point": {"row": 96, "column": 7}}, {"id": 263, "type": "enumerator", "text": "OP_NEQ", "parent": 240, "children": [264], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 8}}, {"id": 264, "type": "identifier", "text": "OP_NEQ", "parent": 263, "children": [], "start_point": {"row": 97, "column": 2}, "end_point": {"row": 97, "column": 8}}, {"id": 265, "type": "enumerator", "text": "OP_AND", "parent": 240, "children": [266], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 8}}, {"id": 266, "type": "identifier", "text": "OP_AND", "parent": 265, "children": [], "start_point": {"row": 98, "column": 2}, "end_point": {"row": 98, "column": 8}}, {"id": 267, "type": "enumerator", "text": "OP_BAND", "parent": 240, "children": [268], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 9}}, {"id": 268, "type": "identifier", "text": "OP_BAND", "parent": 267, "children": [], "start_point": {"row": 99, "column": 2}, "end_point": {"row": 99, "column": 9}}, {"id": 269, "type": "enumerator", "text": "OP_OR", "parent": 240, "children": [270], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 7}}, {"id": 270, "type": "identifier", "text": "OP_OR", "parent": 269, "children": [], "start_point": {"row": 100, "column": 2}, "end_point": {"row": 100, "column": 7}}, {"id": 271, "type": "enumerator", "text": "OP_BOR", "parent": 240, "children": [272], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 8}}, {"id": 272, "type": "identifier", "text": "OP_BOR", "parent": 271, "children": [], "start_point": {"row": 101, "column": 2}, "end_point": {"row": 101, "column": 8}}, {"id": 273, "type": "enumerator", "text": "OP_NOT", "parent": 240, "children": [274], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 8}}, {"id": 274, "type": "identifier", "text": "OP_NOT", "parent": 273, "children": [], "start_point": {"row": 102, "column": 2}, "end_point": {"row": 102, "column": 8}}, {"id": 275, "type": "enumerator", "text": "OP_BNOT", "parent": 240, "children": [276], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 9}}, {"id": 276, "type": "identifier", "text": "OP_BNOT", "parent": 275, "children": [], "start_point": {"row": 103, "column": 2}, "end_point": {"row": 103, "column": 9}}, {"id": 277, "type": "enum_specifier", "text": "enum meas_error { /* bitfield */\n MEAS_OK = 0,\n MEAS_OUT_OF_BOUNDS = 1,\n MEAS_BUFFER_TOO_SMALL = 2\n}", "parent": null, "children": [278, 279, 280], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 110, "column": 1}}, {"id": 278, "type": "enum", "text": "enum", "parent": 277, "children": [], "start_point": {"row": 106, "column": 0}, "end_point": {"row": 106, "column": 4}}, {"id": 279, "type": "type_identifier", "text": "meas_error", "parent": 277, "children": [], "start_point": {"row": 106, "column": 5}, "end_point": {"row": 106, "column": 15}}, {"id": 280, "type": "enumerator_list", "text": "{ /* bitfield */\n MEAS_OK = 0,\n MEAS_OUT_OF_BOUNDS = 1,\n MEAS_BUFFER_TOO_SMALL = 2\n}", "parent": 277, "children": [281, 285, 289], "start_point": {"row": 106, "column": 16}, "end_point": {"row": 110, "column": 1}}, {"id": 281, "type": "enumerator", "text": "MEAS_OK = 0", "parent": 280, "children": [282, 283, 284], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 13}}, {"id": 282, "type": "identifier", "text": "MEAS_OK", "parent": 281, "children": [], "start_point": {"row": 107, "column": 2}, "end_point": {"row": 107, "column": 9}}, {"id": 283, "type": "=", "text": "=", "parent": 281, "children": [], "start_point": {"row": 107, "column": 10}, "end_point": {"row": 107, "column": 11}}, {"id": 284, "type": "number_literal", "text": "0", "parent": 281, "children": [], "start_point": {"row": 107, "column": 12}, "end_point": {"row": 107, "column": 13}}, {"id": 285, "type": "enumerator", "text": "MEAS_OUT_OF_BOUNDS = 1", "parent": 280, "children": [286, 287, 288], "start_point": {"row": 108, "column": 2}, "end_point": {"row": 108, "column": 24}}, {"id": 286, "type": "identifier", "text": "MEAS_OUT_OF_BOUNDS", "parent": 285, "children": [], "start_point": {"row": 108, "column": 2}, "end_point": {"row": 108, "column": 20}}, {"id": 287, "type": "=", "text": "=", "parent": 285, "children": [], "start_point": {"row": 108, "column": 21}, "end_point": {"row": 108, "column": 22}}, {"id": 288, "type": "number_literal", "text": "1", "parent": 285, "children": [], "start_point": {"row": 108, "column": 23}, "end_point": {"row": 108, "column": 24}}, {"id": 289, "type": "enumerator", "text": "MEAS_BUFFER_TOO_SMALL = 2", "parent": 280, "children": [290, 291, 292], "start_point": {"row": 109, "column": 2}, "end_point": {"row": 109, "column": 27}}, {"id": 290, "type": "identifier", "text": "MEAS_BUFFER_TOO_SMALL", "parent": 289, "children": [], "start_point": {"row": 109, "column": 2}, "end_point": {"row": 109, "column": 23}}, {"id": 291, "type": "=", "text": "=", "parent": 289, "children": [], "start_point": {"row": 109, "column": 24}, "end_point": {"row": 109, "column": 25}}, {"id": 292, "type": "number_literal", "text": "2", "parent": 289, "children": [], "start_point": {"row": 109, "column": 26}, "end_point": {"row": 109, "column": 27}}, {"id": 293, "type": "struct_specifier", "text": "struct term {\n enum term_type type;\n /* enum var_type result_type; */\n struct term *next;\n\n enum op_type op;\n struct term *left;\n struct term *right;\n\n struct variable *var;\n \n type_normal_fp init_fp, call_fp, finalize_fp;\n type_iterator_fp iterator_fp;\n char *interface;\n \n struct term *params;\n}", "parent": null, "children": [294, 295], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 128, "column": 1}}, {"id": 294, "type": "struct", "text": "struct", "parent": 293, "children": [], "start_point": {"row": 112, "column": 0}, "end_point": {"row": 112, "column": 6}}, {"id": 295, "type": "type_identifier", "text": "term", "parent": 293, "children": [], "start_point": {"row": 112, "column": 7}, "end_point": {"row": 112, "column": 11}}, {"id": 296, "type": "field_declaration", "text": "enum term_type type;", "parent": 293, "children": [297, 300], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 113, "column": 22}}, {"id": 297, "type": "enum_specifier", "text": "enum term_type", "parent": 296, "children": [298, 299], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 113, "column": 16}}, {"id": 298, "type": "enum", "text": "enum", "parent": 297, "children": [], "start_point": {"row": 113, "column": 2}, "end_point": {"row": 113, "column": 6}}, {"id": 299, "type": "type_identifier", "text": "term_type", "parent": 297, "children": [], "start_point": {"row": 113, "column": 7}, "end_point": {"row": 113, "column": 16}}, {"id": 300, "type": "field_identifier", "text": "type", "parent": 296, "children": [], "start_point": {"row": 113, "column": 17}, "end_point": {"row": 113, "column": 21}}, {"id": 301, "type": "field_declaration", "text": "struct term *next;", "parent": 293, "children": [302, 305], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 20}}, {"id": 302, "type": "struct_specifier", "text": "struct term", "parent": 301, "children": [303, 304], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 13}}, {"id": 303, "type": "struct", "text": "struct", "parent": 302, "children": [], "start_point": {"row": 115, "column": 2}, "end_point": {"row": 115, "column": 8}}, {"id": 304, "type": "type_identifier", "text": "term", "parent": 302, "children": [], "start_point": {"row": 115, "column": 9}, "end_point": {"row": 115, "column": 13}}, {"id": 305, "type": "pointer_declarator", "text": "*next", "parent": 301, "children": [306, 307], "start_point": {"row": 115, "column": 14}, "end_point": {"row": 115, "column": 19}}, {"id": 306, "type": "*", "text": "*", "parent": 305, "children": [], "start_point": {"row": 115, "column": 14}, "end_point": {"row": 115, "column": 15}}, {"id": 307, "type": "field_identifier", "text": "next", "parent": 305, "children": [], "start_point": {"row": 115, "column": 15}, "end_point": {"row": 115, "column": 19}}, {"id": 308, "type": "field_declaration", "text": "enum op_type op;", "parent": 293, "children": [309, 312], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 18}}, {"id": 309, "type": "enum_specifier", "text": "enum op_type", "parent": 308, "children": [310, 311], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 14}}, {"id": 310, "type": "enum", "text": "enum", "parent": 309, "children": [], "start_point": {"row": 117, "column": 2}, "end_point": {"row": 117, "column": 6}}, {"id": 311, "type": "type_identifier", "text": "op_type", "parent": 309, "children": [], "start_point": {"row": 117, "column": 7}, "end_point": {"row": 117, "column": 14}}, {"id": 312, "type": "field_identifier", "text": "op", "parent": 308, "children": [], "start_point": {"row": 117, "column": 15}, "end_point": {"row": 117, "column": 17}}, {"id": 313, "type": "field_declaration", "text": "struct term *left;", "parent": 293, "children": [314, 317], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 118, "column": 20}}, {"id": 314, "type": "struct_specifier", "text": "struct term", "parent": 313, "children": [315, 316], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 118, "column": 13}}, {"id": 315, "type": "struct", "text": "struct", "parent": 314, "children": [], "start_point": {"row": 118, "column": 2}, "end_point": {"row": 118, "column": 8}}, {"id": 316, "type": "type_identifier", "text": "term", "parent": 314, "children": [], "start_point": {"row": 118, "column": 9}, "end_point": {"row": 118, "column": 13}}, {"id": 317, "type": "pointer_declarator", "text": "*left", "parent": 313, "children": [318, 319], "start_point": {"row": 118, "column": 14}, "end_point": {"row": 118, "column": 19}}, {"id": 318, "type": "*", "text": "*", "parent": 317, "children": [], "start_point": {"row": 118, "column": 14}, "end_point": {"row": 118, "column": 15}}, {"id": 319, "type": "field_identifier", "text": "left", "parent": 317, "children": [], "start_point": {"row": 118, "column": 15}, "end_point": {"row": 118, "column": 19}}, {"id": 320, "type": "field_declaration", "text": "struct term *right;", "parent": 293, "children": [321, 324], "start_point": {"row": 119, "column": 2}, "end_point": {"row": 119, "column": 21}}, {"id": 321, "type": "struct_specifier", "text": "struct term", "parent": 320, "children": [322, 323], "start_point": {"row": 119, "column": 2}, "end_point": {"row": 119, "column": 13}}, {"id": 322, "type": "struct", "text": "struct", "parent": 321, "children": [], "start_point": {"row": 119, "column": 2}, "end_point": {"row": 119, "column": 8}}, {"id": 323, "type": "type_identifier", "text": "term", "parent": 321, "children": [], "start_point": {"row": 119, "column": 9}, "end_point": {"row": 119, "column": 13}}, {"id": 324, "type": "pointer_declarator", "text": "*right", "parent": 320, "children": [325, 326], "start_point": {"row": 119, "column": 14}, "end_point": {"row": 119, "column": 20}}, {"id": 325, "type": "*", "text": "*", "parent": 324, "children": [], "start_point": {"row": 119, "column": 14}, "end_point": {"row": 119, "column": 15}}, {"id": 326, "type": "field_identifier", "text": "right", "parent": 324, "children": [], "start_point": {"row": 119, "column": 15}, "end_point": {"row": 119, "column": 20}}, {"id": 327, "type": "field_declaration", "text": "struct variable *var;", "parent": 293, "children": [328, 331], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 23}}, {"id": 328, "type": "struct_specifier", "text": "struct variable", "parent": 327, "children": [329, 330], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 17}}, {"id": 329, "type": "struct", "text": "struct", "parent": 328, "children": [], "start_point": {"row": 121, "column": 2}, "end_point": {"row": 121, "column": 8}}, {"id": 330, "type": "type_identifier", "text": "variable", "parent": 328, "children": [], "start_point": {"row": 121, "column": 9}, "end_point": {"row": 121, "column": 17}}, {"id": 331, "type": "pointer_declarator", "text": "*var", "parent": 327, "children": [332], "start_point": {"row": 121, "column": 18}, "end_point": {"row": 121, "column": 22}}, {"id": 332, "type": "*", "text": "*", "parent": 331, "children": [], "start_point": {"row": 121, "column": 18}, "end_point": {"row": 121, "column": 19}}, {"id": 333, "type": "field_declaration", "text": "type_normal_fp init_fp, call_fp, finalize_fp;", "parent": 293, "children": [334, 335, 336, 337], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 47}}, {"id": 334, "type": "type_identifier", "text": "type_normal_fp", "parent": 333, "children": [], "start_point": {"row": 123, "column": 2}, "end_point": {"row": 123, "column": 16}}, {"id": 335, "type": "field_identifier", "text": "init_fp", "parent": 333, "children": [], "start_point": {"row": 123, "column": 17}, "end_point": {"row": 123, "column": 24}}, {"id": 336, "type": "field_identifier", "text": "call_fp", "parent": 333, "children": [], "start_point": {"row": 123, "column": 26}, "end_point": {"row": 123, "column": 33}}, {"id": 337, "type": "field_identifier", "text": "finalize_fp", "parent": 333, "children": [], "start_point": {"row": 123, "column": 35}, "end_point": {"row": 123, "column": 46}}, {"id": 338, "type": "field_declaration", "text": "type_iterator_fp iterator_fp;", "parent": 293, "children": [339, 340], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 31}}, {"id": 339, "type": "type_identifier", "text": "type_iterator_fp", "parent": 338, "children": [], "start_point": {"row": 124, "column": 2}, "end_point": {"row": 124, "column": 18}}, {"id": 340, "type": "field_identifier", "text": "iterator_fp", "parent": 338, "children": [], "start_point": {"row": 124, "column": 19}, "end_point": {"row": 124, "column": 30}}, {"id": 341, "type": "field_declaration", "text": "char *interface;", "parent": 293, "children": [342, 343], "start_point": {"row": 125, "column": 2}, "end_point": {"row": 125, "column": 18}}, {"id": 342, "type": "primitive_type", "text": "char", "parent": 341, "children": [], "start_point": {"row": 125, "column": 2}, "end_point": {"row": 125, "column": 6}}, {"id": 343, "type": "pointer_declarator", "text": "*interface", "parent": 341, "children": [344, 345], "start_point": {"row": 125, "column": 7}, "end_point": {"row": 125, "column": 17}}, {"id": 344, "type": "*", "text": "*", "parent": 343, "children": [], "start_point": {"row": 125, "column": 7}, "end_point": {"row": 125, "column": 8}}, {"id": 345, "type": "field_identifier", "text": "interface", "parent": 343, "children": [], "start_point": {"row": 125, "column": 8}, "end_point": {"row": 125, "column": 17}}, {"id": 346, "type": "field_declaration", "text": "struct term *params;", "parent": 293, "children": [347, 350], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 127, "column": 22}}, {"id": 347, "type": "struct_specifier", "text": "struct term", "parent": 346, "children": [348, 349], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 127, "column": 13}}, {"id": 348, "type": "struct", "text": "struct", "parent": 347, "children": [], "start_point": {"row": 127, "column": 2}, "end_point": {"row": 127, "column": 8}}, {"id": 349, "type": "type_identifier", "text": "term", "parent": 347, "children": [], "start_point": {"row": 127, "column": 9}, "end_point": {"row": 127, "column": 13}}, {"id": 350, "type": "pointer_declarator", "text": "*params", "parent": 346, "children": [351, 352], "start_point": {"row": 127, "column": 14}, "end_point": {"row": 127, "column": 21}}, {"id": 351, "type": "*", "text": "*", "parent": 350, "children": [], "start_point": {"row": 127, "column": 14}, "end_point": {"row": 127, "column": 15}}, {"id": 352, "type": "field_identifier", "text": "params", "parent": 350, "children": [], "start_point": {"row": 127, "column": 15}, "end_point": {"row": 127, "column": 21}}, {"id": 353, "type": "enum_specifier", "text": "enum statement_type {\n ST_ASSIGNMENT = 500,\n ST_PRINT,\n ST_FLUSH,\n ST_MEASURE,\n ST_ARITHM_VAR,\n ST_LIST_VAR,\n ST_ITERATOR_VAR,\n ST_IF_THEN\n}", "parent": null, "children": [354, 355, 356], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 140, "column": 1}}, {"id": 354, "type": "enum", "text": "enum", "parent": 353, "children": [], "start_point": {"row": 131, "column": 0}, "end_point": {"row": 131, "column": 4}}, {"id": 355, "type": "type_identifier", "text": "statement_type", "parent": 353, "children": [], "start_point": {"row": 131, "column": 5}, "end_point": {"row": 131, "column": 19}}, {"id": 356, "type": "enumerator_list", "text": "{\n ST_ASSIGNMENT = 500,\n ST_PRINT,\n ST_FLUSH,\n ST_MEASURE,\n ST_ARITHM_VAR,\n ST_LIST_VAR,\n ST_ITERATOR_VAR,\n ST_IF_THEN\n}", "parent": 353, "children": [357, 361, 363, 365, 367, 369, 371, 373], "start_point": {"row": 131, "column": 20}, "end_point": {"row": 140, "column": 1}}, {"id": 357, "type": "enumerator", "text": "ST_ASSIGNMENT = 500", "parent": 356, "children": [358, 359, 360], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 132, "column": 21}}, {"id": 358, "type": "identifier", "text": "ST_ASSIGNMENT", "parent": 357, "children": [], "start_point": {"row": 132, "column": 2}, "end_point": {"row": 132, "column": 15}}, {"id": 359, "type": "=", "text": "=", "parent": 357, "children": [], "start_point": {"row": 132, "column": 16}, "end_point": {"row": 132, "column": 17}}, {"id": 360, "type": "number_literal", "text": "500", "parent": 357, "children": [], "start_point": {"row": 132, "column": 18}, "end_point": {"row": 132, "column": 21}}, {"id": 361, "type": "enumerator", "text": "ST_PRINT", "parent": 356, "children": [362], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 133, "column": 10}}, {"id": 362, "type": "identifier", "text": "ST_PRINT", "parent": 361, "children": [], "start_point": {"row": 133, "column": 2}, "end_point": {"row": 133, "column": 10}}, {"id": 363, "type": "enumerator", "text": "ST_FLUSH", "parent": 356, "children": [364], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 10}}, {"id": 364, "type": "identifier", "text": "ST_FLUSH", "parent": 363, "children": [], "start_point": {"row": 134, "column": 2}, "end_point": {"row": 134, "column": 10}}, {"id": 365, "type": "enumerator", "text": "ST_MEASURE", "parent": 356, "children": [366], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 12}}, {"id": 366, "type": "identifier", "text": "ST_MEASURE", "parent": 365, "children": [], "start_point": {"row": 135, "column": 2}, "end_point": {"row": 135, "column": 12}}, {"id": 367, "type": "enumerator", "text": "ST_ARITHM_VAR", "parent": 356, "children": [368], "start_point": {"row": 136, "column": 2}, "end_point": {"row": 136, "column": 15}}, {"id": 368, "type": "identifier", "text": "ST_ARITHM_VAR", "parent": 367, "children": [], "start_point": {"row": 136, "column": 2}, "end_point": {"row": 136, "column": 15}}, {"id": 369, "type": "enumerator", "text": "ST_LIST_VAR", "parent": 356, "children": [370], "start_point": {"row": 137, "column": 2}, "end_point": {"row": 137, "column": 13}}, {"id": 370, "type": "identifier", "text": "ST_LIST_VAR", "parent": 369, "children": [], "start_point": {"row": 137, "column": 2}, "end_point": {"row": 137, "column": 13}}, {"id": 371, "type": "enumerator", "text": "ST_ITERATOR_VAR", "parent": 356, "children": [372], "start_point": {"row": 138, "column": 2}, "end_point": {"row": 138, "column": 17}}, {"id": 372, "type": "identifier", "text": "ST_ITERATOR_VAR", "parent": 371, "children": [], "start_point": {"row": 138, "column": 2}, "end_point": {"row": 138, "column": 17}}, {"id": 373, "type": "enumerator", "text": "ST_IF_THEN", "parent": 356, "children": [374], "start_point": {"row": 139, "column": 2}, "end_point": {"row": 139, "column": 12}}, {"id": 374, "type": "identifier", "text": "ST_IF_THEN", "parent": 373, "children": [], "start_point": {"row": 139, "column": 2}, "end_point": {"row": 139, "column": 12}}, {"id": 375, "type": "struct_specifier", "text": "struct statement {\n enum statement_type type;\n struct statement *next;\n\n union {\n struct {\n struct variable *lval;\n struct term *rval;\n } assignment;\n\n struct {\n bool flush;\n struct term *val;\n } print;\n\n struct {\n struct term *comm;\n struct term *call;\n } measure;\n\n struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n } arithm_var;\n\n struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n } list_var;\n\n struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n } iterator_var;\n\n struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n } if_then;\n\n } u;\n}", "parent": null, "children": [376, 377], "start_point": {"row": 142, "column": 0}, "end_point": {"row": 195, "column": 1}}, {"id": 376, "type": "struct", "text": "struct", "parent": 375, "children": [], "start_point": {"row": 142, "column": 0}, "end_point": {"row": 142, "column": 6}}, {"id": 377, "type": "type_identifier", "text": "statement", "parent": 375, "children": [], "start_point": {"row": 142, "column": 7}, "end_point": {"row": 142, "column": 16}}, {"id": 378, "type": "field_declaration", "text": "enum statement_type type;", "parent": 375, "children": [379, 382], "start_point": {"row": 143, "column": 2}, "end_point": {"row": 143, "column": 27}}, {"id": 379, "type": "enum_specifier", "text": "enum statement_type", "parent": 378, "children": [380, 381], "start_point": {"row": 143, "column": 2}, "end_point": {"row": 143, "column": 21}}, {"id": 380, "type": "enum", "text": "enum", "parent": 379, "children": [], "start_point": {"row": 143, "column": 2}, "end_point": {"row": 143, "column": 6}}, {"id": 381, "type": "type_identifier", "text": "statement_type", "parent": 379, "children": [], "start_point": {"row": 143, "column": 7}, "end_point": {"row": 143, "column": 21}}, {"id": 382, "type": "field_identifier", "text": "type", "parent": 378, "children": [], "start_point": {"row": 143, "column": 22}, "end_point": {"row": 143, "column": 26}}, {"id": 383, "type": "field_declaration", "text": "struct statement *next;", "parent": 375, "children": [384, 387], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 144, "column": 25}}, {"id": 384, "type": "struct_specifier", "text": "struct statement", "parent": 383, "children": [385, 386], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 144, "column": 18}}, {"id": 385, "type": "struct", "text": "struct", "parent": 384, "children": [], "start_point": {"row": 144, "column": 2}, "end_point": {"row": 144, "column": 8}}, {"id": 386, "type": "type_identifier", "text": "statement", "parent": 384, "children": [], "start_point": {"row": 144, "column": 9}, "end_point": {"row": 144, "column": 18}}, {"id": 387, "type": "pointer_declarator", "text": "*next", "parent": 383, "children": [388, 389], "start_point": {"row": 144, "column": 19}, "end_point": {"row": 144, "column": 24}}, {"id": 388, "type": "*", "text": "*", "parent": 387, "children": [], "start_point": {"row": 144, "column": 19}, "end_point": {"row": 144, "column": 20}}, {"id": 389, "type": "field_identifier", "text": "next", "parent": 387, "children": [], "start_point": {"row": 144, "column": 20}, "end_point": {"row": 144, "column": 24}}, {"id": 390, "type": "field_declaration", "text": "union {\n struct {\n struct variable *lval;\n struct term *rval;\n } assignment;\n\n struct {\n bool flush;\n struct term *val;\n } print;\n\n struct {\n struct term *comm;\n struct term *call;\n } measure;\n\n struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n } arithm_var;\n\n struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n } list_var;\n\n struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n } iterator_var;\n\n struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n } if_then;\n\n } u;", "parent": 375, "children": [391, 585], "start_point": {"row": 146, "column": 2}, "end_point": {"row": 194, "column": 6}}, {"id": 391, "type": "union_specifier", "text": "union {\n struct {\n struct variable *lval;\n struct term *rval;\n } assignment;\n\n struct {\n bool flush;\n struct term *val;\n } print;\n\n struct {\n struct term *comm;\n struct term *call;\n } measure;\n\n struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n } arithm_var;\n\n struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n } list_var;\n\n struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n } iterator_var;\n\n struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n } if_then;\n\n }", "parent": 390, "children": [392], "start_point": {"row": 146, "column": 2}, "end_point": {"row": 194, "column": 3}}, {"id": 392, "type": "union", "text": "union", "parent": 391, "children": [], "start_point": {"row": 146, "column": 2}, "end_point": {"row": 146, "column": 7}}, {"id": 393, "type": "field_declaration", "text": "struct {\n struct variable *lval;\n struct term *rval;\n } assignment;", "parent": 391, "children": [394, 410], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 150, "column": 17}}, {"id": 394, "type": "struct_specifier", "text": "struct {\n struct variable *lval;\n struct term *rval;\n }", "parent": 393, "children": [395], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 150, "column": 5}}, {"id": 395, "type": "struct", "text": "struct", "parent": 394, "children": [], "start_point": {"row": 147, "column": 4}, "end_point": {"row": 147, "column": 10}}, {"id": 396, "type": "field_declaration", "text": "struct variable *lval;", "parent": 394, "children": [397, 400], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 28}}, {"id": 397, "type": "struct_specifier", "text": "struct variable", "parent": 396, "children": [398, 399], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 21}}, {"id": 398, "type": "struct", "text": "struct", "parent": 397, "children": [], "start_point": {"row": 148, "column": 6}, "end_point": {"row": 148, "column": 12}}, {"id": 399, "type": "type_identifier", "text": "variable", "parent": 397, "children": [], "start_point": {"row": 148, "column": 13}, "end_point": {"row": 148, "column": 21}}, {"id": 400, "type": "pointer_declarator", "text": "*lval", "parent": 396, "children": [401, 402], "start_point": {"row": 148, "column": 22}, "end_point": {"row": 148, "column": 27}}, {"id": 401, "type": "*", "text": "*", "parent": 400, "children": [], "start_point": {"row": 148, "column": 22}, "end_point": {"row": 148, "column": 23}}, {"id": 402, "type": "field_identifier", "text": "lval", "parent": 400, "children": [], "start_point": {"row": 148, "column": 23}, "end_point": {"row": 148, "column": 27}}, {"id": 403, "type": "field_declaration", "text": "struct term *rval;", "parent": 394, "children": [404, 407], "start_point": {"row": 149, "column": 6}, "end_point": {"row": 149, "column": 24}}, {"id": 404, "type": "struct_specifier", "text": "struct term", "parent": 403, "children": [405, 406], "start_point": {"row": 149, "column": 6}, "end_point": {"row": 149, "column": 17}}, {"id": 405, "type": "struct", "text": "struct", "parent": 404, "children": [], "start_point": {"row": 149, "column": 6}, "end_point": {"row": 149, "column": 12}}, {"id": 406, "type": "type_identifier", "text": "term", "parent": 404, "children": [], "start_point": {"row": 149, "column": 13}, "end_point": {"row": 149, "column": 17}}, {"id": 407, "type": "pointer_declarator", "text": "*rval", "parent": 403, "children": [408, 409], "start_point": {"row": 149, "column": 18}, "end_point": {"row": 149, "column": 23}}, {"id": 408, "type": "*", "text": "*", "parent": 407, "children": [], "start_point": {"row": 149, "column": 18}, "end_point": {"row": 149, "column": 19}}, {"id": 409, "type": "field_identifier", "text": "rval", "parent": 407, "children": [], "start_point": {"row": 149, "column": 19}, "end_point": {"row": 149, "column": 23}}, {"id": 410, "type": "field_identifier", "text": "assignment", "parent": 393, "children": [], "start_point": {"row": 150, "column": 6}, "end_point": {"row": 150, "column": 16}}, {"id": 411, "type": "field_declaration", "text": "struct {\n bool flush;\n struct term *val;\n } print;", "parent": 391, "children": [412, 424], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 155, "column": 12}}, {"id": 412, "type": "struct_specifier", "text": "struct {\n bool flush;\n struct term *val;\n }", "parent": 411, "children": [413], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 155, "column": 5}}, {"id": 413, "type": "struct", "text": "struct", "parent": 412, "children": [], "start_point": {"row": 152, "column": 4}, "end_point": {"row": 152, "column": 10}}, {"id": 414, "type": "field_declaration", "text": "bool flush;", "parent": 412, "children": [415, 416], "start_point": {"row": 153, "column": 6}, "end_point": {"row": 153, "column": 17}}, {"id": 415, "type": "primitive_type", "text": "bool", "parent": 414, "children": [], "start_point": {"row": 153, "column": 6}, "end_point": {"row": 153, "column": 10}}, {"id": 416, "type": "field_identifier", "text": "flush", "parent": 414, "children": [], "start_point": {"row": 153, "column": 11}, "end_point": {"row": 153, "column": 16}}, {"id": 417, "type": "field_declaration", "text": "struct term *val;", "parent": 412, "children": [418, 421], "start_point": {"row": 154, "column": 6}, "end_point": {"row": 154, "column": 23}}, {"id": 418, "type": "struct_specifier", "text": "struct term", "parent": 417, "children": [419, 420], "start_point": {"row": 154, "column": 6}, "end_point": {"row": 154, "column": 17}}, {"id": 419, "type": "struct", "text": "struct", "parent": 418, "children": [], "start_point": {"row": 154, "column": 6}, "end_point": {"row": 154, "column": 12}}, {"id": 420, "type": "type_identifier", "text": "term", "parent": 418, "children": [], "start_point": {"row": 154, "column": 13}, "end_point": {"row": 154, "column": 17}}, {"id": 421, "type": "pointer_declarator", "text": "*val", "parent": 417, "children": [422, 423], "start_point": {"row": 154, "column": 18}, "end_point": {"row": 154, "column": 22}}, {"id": 422, "type": "*", "text": "*", "parent": 421, "children": [], "start_point": {"row": 154, "column": 18}, "end_point": {"row": 154, "column": 19}}, {"id": 423, "type": "field_identifier", "text": "val", "parent": 421, "children": [], "start_point": {"row": 154, "column": 19}, "end_point": {"row": 154, "column": 22}}, {"id": 424, "type": "field_identifier", "text": "print", "parent": 411, "children": [], "start_point": {"row": 155, "column": 6}, "end_point": {"row": 155, "column": 11}}, {"id": 425, "type": "field_declaration", "text": "struct {\n struct term *comm;\n struct term *call;\n } measure;", "parent": 391, "children": [426, 442], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 160, "column": 14}}, {"id": 426, "type": "struct_specifier", "text": "struct {\n struct term *comm;\n struct term *call;\n }", "parent": 425, "children": [427], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 160, "column": 5}}, {"id": 427, "type": "struct", "text": "struct", "parent": 426, "children": [], "start_point": {"row": 157, "column": 4}, "end_point": {"row": 157, "column": 10}}, {"id": 428, "type": "field_declaration", "text": "struct term *comm;", "parent": 426, "children": [429, 432], "start_point": {"row": 158, "column": 6}, "end_point": {"row": 158, "column": 24}}, {"id": 429, "type": "struct_specifier", "text": "struct term", "parent": 428, "children": [430, 431], "start_point": {"row": 158, "column": 6}, "end_point": {"row": 158, "column": 17}}, {"id": 430, "type": "struct", "text": "struct", "parent": 429, "children": [], "start_point": {"row": 158, "column": 6}, "end_point": {"row": 158, "column": 12}}, {"id": 431, "type": "type_identifier", "text": "term", "parent": 429, "children": [], "start_point": {"row": 158, "column": 13}, "end_point": {"row": 158, "column": 17}}, {"id": 432, "type": "pointer_declarator", "text": "*comm", "parent": 428, "children": [433, 434], "start_point": {"row": 158, "column": 18}, "end_point": {"row": 158, "column": 23}}, {"id": 433, "type": "*", "text": "*", "parent": 432, "children": [], "start_point": {"row": 158, "column": 18}, "end_point": {"row": 158, "column": 19}}, {"id": 434, "type": "field_identifier", "text": "comm", "parent": 432, "children": [], "start_point": {"row": 158, "column": 19}, "end_point": {"row": 158, "column": 23}}, {"id": 435, "type": "field_declaration", "text": "struct term *call;", "parent": 426, "children": [436, 439], "start_point": {"row": 159, "column": 6}, "end_point": {"row": 159, "column": 24}}, {"id": 436, "type": "struct_specifier", "text": "struct term", "parent": 435, "children": [437, 438], "start_point": {"row": 159, "column": 6}, "end_point": {"row": 159, "column": 17}}, {"id": 437, "type": "struct", "text": "struct", "parent": 436, "children": [], "start_point": {"row": 159, "column": 6}, "end_point": {"row": 159, "column": 12}}, {"id": 438, "type": "type_identifier", "text": "term", "parent": 436, "children": [], "start_point": {"row": 159, "column": 13}, "end_point": {"row": 159, "column": 17}}, {"id": 439, "type": "pointer_declarator", "text": "*call", "parent": 435, "children": [440, 441], "start_point": {"row": 159, "column": 18}, "end_point": {"row": 159, "column": 23}}, {"id": 440, "type": "*", "text": "*", "parent": 439, "children": [], "start_point": {"row": 159, "column": 18}, "end_point": {"row": 159, "column": 19}}, {"id": 441, "type": "field_identifier", "text": "call", "parent": 439, "children": [], "start_point": {"row": 159, "column": 19}, "end_point": {"row": 159, "column": 23}}, {"id": 442, "type": "field_identifier", "text": "measure", "parent": 425, "children": [], "start_point": {"row": 160, "column": 6}, "end_point": {"row": 160, "column": 13}}, {"id": 443, "type": "field_declaration", "text": "struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n } arithm_var;", "parent": 391, "children": [444, 496], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 171, "column": 17}}, {"id": 444, "type": "struct_specifier", "text": "struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n }", "parent": 443, "children": [445], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 171, "column": 5}}, {"id": 445, "type": "struct", "text": "struct", "parent": 444, "children": [], "start_point": {"row": 162, "column": 4}, "end_point": {"row": 162, "column": 10}}, {"id": 446, "type": "field_declaration", "text": "struct variable *loopvar;", "parent": 444, "children": [447, 450], "start_point": {"row": 163, "column": 6}, "end_point": {"row": 163, "column": 31}}, {"id": 447, "type": "struct_specifier", "text": "struct variable", "parent": 446, "children": [448, 449], "start_point": {"row": 163, "column": 6}, "end_point": {"row": 163, "column": 21}}, {"id": 448, "type": "struct", "text": "struct", "parent": 447, "children": [], "start_point": {"row": 163, "column": 6}, "end_point": {"row": 163, "column": 12}}, {"id": 449, "type": "type_identifier", "text": "variable", "parent": 447, "children": [], "start_point": {"row": 163, "column": 13}, "end_point": {"row": 163, "column": 21}}, {"id": 450, "type": "pointer_declarator", "text": "*loopvar", "parent": 446, "children": [451, 452], "start_point": {"row": 163, "column": 22}, "end_point": {"row": 163, "column": 30}}, {"id": 451, "type": "*", "text": "*", "parent": 450, "children": [], "start_point": {"row": 163, "column": 22}, "end_point": {"row": 163, "column": 23}}, {"id": 452, "type": "field_identifier", "text": "loopvar", "parent": 450, "children": [], "start_point": {"row": 163, "column": 23}, "end_point": {"row": 163, "column": 30}}, {"id": 453, "type": "field_declaration", "text": "bool refine;", "parent": 444, "children": [454, 455], "start_point": {"row": 164, "column": 6}, "end_point": {"row": 164, "column": 18}}, {"id": 454, "type": "primitive_type", "text": "bool", "parent": 453, "children": [], "start_point": {"row": 164, "column": 6}, "end_point": {"row": 164, "column": 10}}, {"id": 455, "type": "field_identifier", "text": "refine", "parent": 453, "children": [], "start_point": {"row": 164, "column": 11}, "end_point": {"row": 164, "column": 17}}, {"id": 456, "type": "field_declaration", "text": "struct term *first;", "parent": 444, "children": [457, 460], "start_point": {"row": 165, "column": 6}, "end_point": {"row": 165, "column": 25}}, {"id": 457, "type": "struct_specifier", "text": "struct term", "parent": 456, "children": [458, 459], "start_point": {"row": 165, "column": 6}, "end_point": {"row": 165, "column": 17}}, {"id": 458, "type": "struct", "text": "struct", "parent": 457, "children": [], "start_point": {"row": 165, "column": 6}, "end_point": {"row": 165, "column": 12}}, {"id": 459, "type": "type_identifier", "text": "term", "parent": 457, "children": [], "start_point": {"row": 165, "column": 13}, "end_point": {"row": 165, "column": 17}}, {"id": 460, "type": "pointer_declarator", "text": "*first", "parent": 456, "children": [461, 462], "start_point": {"row": 165, "column": 18}, "end_point": {"row": 165, "column": 24}}, {"id": 461, "type": "*", "text": "*", "parent": 460, "children": [], "start_point": {"row": 165, "column": 18}, "end_point": {"row": 165, "column": 19}}, {"id": 462, "type": "field_identifier", "text": "first", "parent": 460, "children": [], "start_point": {"row": 165, "column": 19}, "end_point": {"row": 165, "column": 24}}, {"id": 463, "type": "field_declaration", "text": "struct term *last;", "parent": 444, "children": [464, 467], "start_point": {"row": 166, "column": 6}, "end_point": {"row": 166, "column": 24}}, {"id": 464, "type": "struct_specifier", "text": "struct term", "parent": 463, "children": [465, 466], "start_point": {"row": 166, "column": 6}, "end_point": {"row": 166, "column": 17}}, {"id": 465, "type": "struct", "text": "struct", "parent": 464, "children": [], "start_point": {"row": 166, "column": 6}, "end_point": {"row": 166, "column": 12}}, {"id": 466, "type": "type_identifier", "text": "term", "parent": 464, "children": [], "start_point": {"row": 166, "column": 13}, "end_point": {"row": 166, "column": 17}}, {"id": 467, "type": "pointer_declarator", "text": "*last", "parent": 463, "children": [468, 469], "start_point": {"row": 166, "column": 18}, "end_point": {"row": 166, "column": 23}}, {"id": 468, "type": "*", "text": "*", "parent": 467, "children": [], "start_point": {"row": 166, "column": 18}, "end_point": {"row": 166, "column": 19}}, {"id": 469, "type": "field_identifier", "text": "last", "parent": 467, "children": [], "start_point": {"row": 166, "column": 19}, "end_point": {"row": 166, "column": 23}}, {"id": 470, "type": "field_declaration", "text": "struct term *step;", "parent": 444, "children": [471, 474], "start_point": {"row": 167, "column": 6}, "end_point": {"row": 167, "column": 24}}, {"id": 471, "type": "struct_specifier", "text": "struct term", "parent": 470, "children": [472, 473], "start_point": {"row": 167, "column": 6}, "end_point": {"row": 167, "column": 17}}, {"id": 472, "type": "struct", "text": "struct", "parent": 471, "children": [], "start_point": {"row": 167, "column": 6}, "end_point": {"row": 167, "column": 12}}, {"id": 473, "type": "type_identifier", "text": "term", "parent": 471, "children": [], "start_point": {"row": 167, "column": 13}, "end_point": {"row": 167, "column": 17}}, {"id": 474, "type": "pointer_declarator", "text": "*step", "parent": 470, "children": [475, 476], "start_point": {"row": 167, "column": 18}, "end_point": {"row": 167, "column": 23}}, {"id": 475, "type": "*", "text": "*", "parent": 474, "children": [], "start_point": {"row": 167, "column": 18}, "end_point": {"row": 167, "column": 19}}, {"id": 476, "type": "field_identifier", "text": "step", "parent": 474, "children": [], "start_point": {"row": 167, "column": 19}, "end_point": {"row": 167, "column": 23}}, {"id": 477, "type": "field_declaration", "text": "enum op_type op;", "parent": 444, "children": [478, 481], "start_point": {"row": 168, "column": 6}, "end_point": {"row": 168, "column": 22}}, {"id": 478, "type": "enum_specifier", "text": "enum op_type", "parent": 477, "children": [479, 480], "start_point": {"row": 168, "column": 6}, "end_point": {"row": 168, "column": 18}}, {"id": 479, "type": "enum", "text": "enum", "parent": 478, "children": [], "start_point": {"row": 168, "column": 6}, "end_point": {"row": 168, "column": 10}}, {"id": 480, "type": "type_identifier", "text": "op_type", "parent": 478, "children": [], "start_point": {"row": 168, "column": 11}, "end_point": {"row": 168, "column": 18}}, {"id": 481, "type": "field_identifier", "text": "op", "parent": 477, "children": [], "start_point": {"row": 168, "column": 19}, "end_point": {"row": 168, "column": 21}}, {"id": 482, "type": "field_declaration", "text": "struct term *multipleof;", "parent": 444, "children": [483, 486], "start_point": {"row": 169, "column": 6}, "end_point": {"row": 169, "column": 30}}, {"id": 483, "type": "struct_specifier", "text": "struct term", "parent": 482, "children": [484, 485], "start_point": {"row": 169, "column": 6}, "end_point": {"row": 169, "column": 17}}, {"id": 484, "type": "struct", "text": "struct", "parent": 483, "children": [], "start_point": {"row": 169, "column": 6}, "end_point": {"row": 169, "column": 12}}, {"id": 485, "type": "type_identifier", "text": "term", "parent": 483, "children": [], "start_point": {"row": 169, "column": 13}, "end_point": {"row": 169, "column": 17}}, {"id": 486, "type": "pointer_declarator", "text": "*multipleof", "parent": 482, "children": [487, 488], "start_point": {"row": 169, "column": 18}, "end_point": {"row": 169, "column": 29}}, {"id": 487, "type": "*", "text": "*", "parent": 486, "children": [], "start_point": {"row": 169, "column": 18}, "end_point": {"row": 169, "column": 19}}, {"id": 488, "type": "field_identifier", "text": "multipleof", "parent": 486, "children": [], "start_point": {"row": 169, "column": 19}, "end_point": {"row": 169, "column": 29}}, {"id": 489, "type": "field_declaration", "text": "struct statement *body;", "parent": 444, "children": [490, 493], "start_point": {"row": 170, "column": 6}, "end_point": {"row": 170, "column": 29}}, {"id": 490, "type": "struct_specifier", "text": "struct statement", "parent": 489, "children": [491, 492], "start_point": {"row": 170, "column": 6}, "end_point": {"row": 170, "column": 22}}, {"id": 491, "type": "struct", "text": "struct", "parent": 490, "children": [], "start_point": {"row": 170, "column": 6}, "end_point": {"row": 170, "column": 12}}, {"id": 492, "type": "type_identifier", "text": "statement", "parent": 490, "children": [], "start_point": {"row": 170, "column": 13}, "end_point": {"row": 170, "column": 22}}, {"id": 493, "type": "pointer_declarator", "text": "*body", "parent": 489, "children": [494, 495], "start_point": {"row": 170, "column": 23}, "end_point": {"row": 170, "column": 28}}, {"id": 494, "type": "*", "text": "*", "parent": 493, "children": [], "start_point": {"row": 170, "column": 23}, "end_point": {"row": 170, "column": 24}}, {"id": 495, "type": "field_identifier", "text": "body", "parent": 493, "children": [], "start_point": {"row": 170, "column": 24}, "end_point": {"row": 170, "column": 28}}, {"id": 496, "type": "field_identifier", "text": "arithm_var", "parent": 443, "children": [], "start_point": {"row": 171, "column": 6}, "end_point": {"row": 171, "column": 16}}, {"id": 497, "type": "field_declaration", "text": "struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n } list_var;", "parent": 391, "children": [498, 521], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 177, "column": 15}}, {"id": 498, "type": "struct_specifier", "text": "struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n }", "parent": 497, "children": [499], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 177, "column": 5}}, {"id": 499, "type": "struct", "text": "struct", "parent": 498, "children": [], "start_point": {"row": 173, "column": 4}, "end_point": {"row": 173, "column": 10}}, {"id": 500, "type": "field_declaration", "text": "struct variable *loopvar;", "parent": 498, "children": [501, 504], "start_point": {"row": 174, "column": 6}, "end_point": {"row": 174, "column": 31}}, {"id": 501, "type": "struct_specifier", "text": "struct variable", "parent": 500, "children": [502, 503], "start_point": {"row": 174, "column": 6}, "end_point": {"row": 174, "column": 21}}, {"id": 502, "type": "struct", "text": "struct", "parent": 501, "children": [], "start_point": {"row": 174, "column": 6}, "end_point": {"row": 174, "column": 12}}, {"id": 503, "type": "type_identifier", "text": "variable", "parent": 501, "children": [], "start_point": {"row": 174, "column": 13}, "end_point": {"row": 174, "column": 21}}, {"id": 504, "type": "pointer_declarator", "text": "*loopvar", "parent": 500, "children": [505, 506], "start_point": {"row": 174, "column": 22}, "end_point": {"row": 174, "column": 30}}, {"id": 505, "type": "*", "text": "*", "parent": 504, "children": [], "start_point": {"row": 174, "column": 22}, "end_point": {"row": 174, "column": 23}}, {"id": 506, "type": "field_identifier", "text": "loopvar", "parent": 504, "children": [], "start_point": {"row": 174, "column": 23}, "end_point": {"row": 174, "column": 30}}, {"id": 507, "type": "field_declaration", "text": "struct term *term_list;", "parent": 498, "children": [508, 511], "start_point": {"row": 175, "column": 6}, "end_point": {"row": 175, "column": 29}}, {"id": 508, "type": "struct_specifier", "text": "struct term", "parent": 507, "children": [509, 510], "start_point": {"row": 175, "column": 6}, "end_point": {"row": 175, "column": 17}}, {"id": 509, "type": "struct", "text": "struct", "parent": 508, "children": [], "start_point": {"row": 175, "column": 6}, "end_point": {"row": 175, "column": 12}}, {"id": 510, "type": "type_identifier", "text": "term", "parent": 508, "children": [], "start_point": {"row": 175, "column": 13}, "end_point": {"row": 175, "column": 17}}, {"id": 511, "type": "pointer_declarator", "text": "*term_list", "parent": 507, "children": [512, 513], "start_point": {"row": 175, "column": 18}, "end_point": {"row": 175, "column": 28}}, {"id": 512, "type": "*", "text": "*", "parent": 511, "children": [], "start_point": {"row": 175, "column": 18}, "end_point": {"row": 175, "column": 19}}, {"id": 513, "type": "field_identifier", "text": "term_list", "parent": 511, "children": [], "start_point": {"row": 175, "column": 19}, "end_point": {"row": 175, "column": 28}}, {"id": 514, "type": "field_declaration", "text": "struct statement *body;", "parent": 498, "children": [515, 518], "start_point": {"row": 176, "column": 6}, "end_point": {"row": 176, "column": 29}}, {"id": 515, "type": "struct_specifier", "text": "struct statement", "parent": 514, "children": [516, 517], "start_point": {"row": 176, "column": 6}, "end_point": {"row": 176, "column": 22}}, {"id": 516, "type": "struct", "text": "struct", "parent": 515, "children": [], "start_point": {"row": 176, "column": 6}, "end_point": {"row": 176, "column": 12}}, {"id": 517, "type": "type_identifier", "text": "statement", "parent": 515, "children": [], "start_point": {"row": 176, "column": 13}, "end_point": {"row": 176, "column": 22}}, {"id": 518, "type": "pointer_declarator", "text": "*body", "parent": 514, "children": [519, 520], "start_point": {"row": 176, "column": 23}, "end_point": {"row": 176, "column": 28}}, {"id": 519, "type": "*", "text": "*", "parent": 518, "children": [], "start_point": {"row": 176, "column": 23}, "end_point": {"row": 176, "column": 24}}, {"id": 520, "type": "field_identifier", "text": "body", "parent": 518, "children": [], "start_point": {"row": 176, "column": 24}, "end_point": {"row": 176, "column": 28}}, {"id": 521, "type": "field_identifier", "text": "list_var", "parent": 497, "children": [], "start_point": {"row": 177, "column": 6}, "end_point": {"row": 177, "column": 14}}, {"id": 522, "type": "field_declaration", "text": "struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n } iterator_var;", "parent": 391, "children": [523, 559], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 186, "column": 19}}, {"id": 523, "type": "struct_specifier", "text": "struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n }", "parent": 522, "children": [524], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 186, "column": 5}}, {"id": 524, "type": "struct", "text": "struct", "parent": 523, "children": [], "start_point": {"row": 179, "column": 4}, "end_point": {"row": 179, "column": 10}}, {"id": 525, "type": "field_declaration", "text": "struct variable *loopvar;", "parent": 523, "children": [526, 529], "start_point": {"row": 180, "column": 6}, "end_point": {"row": 180, "column": 31}}, {"id": 526, "type": "struct_specifier", "text": "struct variable", "parent": 525, "children": [527, 528], "start_point": {"row": 180, "column": 6}, "end_point": {"row": 180, "column": 21}}, {"id": 527, "type": "struct", "text": "struct", "parent": 526, "children": [], "start_point": {"row": 180, "column": 6}, "end_point": {"row": 180, "column": 12}}, {"id": 528, "type": "type_identifier", "text": "variable", "parent": 526, "children": [], "start_point": {"row": 180, "column": 13}, "end_point": {"row": 180, "column": 21}}, {"id": 529, "type": "pointer_declarator", "text": "*loopvar", "parent": 525, "children": [530, 531], "start_point": {"row": 180, "column": 22}, "end_point": {"row": 180, "column": 30}}, {"id": 530, "type": "*", "text": "*", "parent": 529, "children": [], "start_point": {"row": 180, "column": 22}, "end_point": {"row": 180, "column": 23}}, {"id": 531, "type": "field_identifier", "text": "loopvar", "parent": 529, "children": [], "start_point": {"row": 180, "column": 23}, "end_point": {"row": 180, "column": 30}}, {"id": 532, "type": "field_declaration", "text": "type_iterator_fp iterator_fp;", "parent": 523, "children": [533, 534], "start_point": {"row": 181, "column": 6}, "end_point": {"row": 181, "column": 35}}, {"id": 533, "type": "type_identifier", "text": "type_iterator_fp", "parent": 532, "children": [], "start_point": {"row": 181, "column": 6}, "end_point": {"row": 181, "column": 22}}, {"id": 534, "type": "field_identifier", "text": "iterator_fp", "parent": 532, "children": [], "start_point": {"row": 181, "column": 23}, "end_point": {"row": 181, "column": 34}}, {"id": 535, "type": "field_declaration", "text": "struct term *par_list;", "parent": 523, "children": [536, 539], "start_point": {"row": 182, "column": 6}, "end_point": {"row": 182, "column": 28}}, {"id": 536, "type": "struct_specifier", "text": "struct term", "parent": 535, "children": [537, 538], "start_point": {"row": 182, "column": 6}, "end_point": {"row": 182, "column": 17}}, {"id": 537, "type": "struct", "text": "struct", "parent": 536, "children": [], "start_point": {"row": 182, "column": 6}, "end_point": {"row": 182, "column": 12}}, {"id": 538, "type": "type_identifier", "text": "term", "parent": 536, "children": [], "start_point": {"row": 182, "column": 13}, "end_point": {"row": 182, "column": 17}}, {"id": 539, "type": "pointer_declarator", "text": "*par_list", "parent": 535, "children": [540, 541], "start_point": {"row": 182, "column": 18}, "end_point": {"row": 182, "column": 27}}, {"id": 540, "type": "*", "text": "*", "parent": 539, "children": [], "start_point": {"row": 182, "column": 18}, "end_point": {"row": 182, "column": 19}}, {"id": 541, "type": "field_identifier", "text": "par_list", "parent": 539, "children": [], "start_point": {"row": 182, "column": 19}, "end_point": {"row": 182, "column": 27}}, {"id": 542, "type": "field_declaration", "text": "char *interface;", "parent": 523, "children": [543, 544], "start_point": {"row": 183, "column": 6}, "end_point": {"row": 183, "column": 22}}, {"id": 543, "type": "primitive_type", "text": "char", "parent": 542, "children": [], "start_point": {"row": 183, "column": 6}, "end_point": {"row": 183, "column": 10}}, {"id": 544, "type": "pointer_declarator", "text": "*interface", "parent": 542, "children": [545, 546], "start_point": {"row": 183, "column": 11}, "end_point": {"row": 183, "column": 21}}, {"id": 545, "type": "*", "text": "*", "parent": 544, "children": [], "start_point": {"row": 183, "column": 11}, "end_point": {"row": 183, "column": 12}}, {"id": 546, "type": "field_identifier", "text": "interface", "parent": 544, "children": [], "start_point": {"row": 183, "column": 12}, "end_point": {"row": 183, "column": 21}}, {"id": 547, "type": "field_declaration", "text": "void *self;", "parent": 523, "children": [548, 549], "start_point": {"row": 184, "column": 6}, "end_point": {"row": 184, "column": 17}}, {"id": 548, "type": "primitive_type", "text": "void", "parent": 547, "children": [], "start_point": {"row": 184, "column": 6}, "end_point": {"row": 184, "column": 10}}, {"id": 549, "type": "pointer_declarator", "text": "*self", "parent": 547, "children": [550, 551], "start_point": {"row": 184, "column": 11}, "end_point": {"row": 184, "column": 16}}, {"id": 550, "type": "*", "text": "*", "parent": 549, "children": [], "start_point": {"row": 184, "column": 11}, "end_point": {"row": 184, "column": 12}}, {"id": 551, "type": "field_identifier", "text": "self", "parent": 549, "children": [], "start_point": {"row": 184, "column": 12}, "end_point": {"row": 184, "column": 16}}, {"id": 552, "type": "field_declaration", "text": "struct statement *body;", "parent": 523, "children": [553, 556], "start_point": {"row": 185, "column": 6}, "end_point": {"row": 185, "column": 29}}, {"id": 553, "type": "struct_specifier", "text": "struct statement", "parent": 552, "children": [554, 555], "start_point": {"row": 185, "column": 6}, "end_point": {"row": 185, "column": 22}}, {"id": 554, "type": "struct", "text": "struct", "parent": 553, "children": [], "start_point": {"row": 185, "column": 6}, "end_point": {"row": 185, "column": 12}}, {"id": 555, "type": "type_identifier", "text": "statement", "parent": 553, "children": [], "start_point": {"row": 185, "column": 13}, "end_point": {"row": 185, "column": 22}}, {"id": 556, "type": "pointer_declarator", "text": "*body", "parent": 552, "children": [557, 558], "start_point": {"row": 185, "column": 23}, "end_point": {"row": 185, "column": 28}}, {"id": 557, "type": "*", "text": "*", "parent": 556, "children": [], "start_point": {"row": 185, "column": 23}, "end_point": {"row": 185, "column": 24}}, {"id": 558, "type": "field_identifier", "text": "body", "parent": 556, "children": [], "start_point": {"row": 185, "column": 24}, "end_point": {"row": 185, "column": 28}}, {"id": 559, "type": "field_identifier", "text": "iterator_var", "parent": 522, "children": [], "start_point": {"row": 186, "column": 6}, "end_point": {"row": 186, "column": 18}}, {"id": 560, "type": "field_declaration", "text": "struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n } if_then;", "parent": 391, "children": [561, 584], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 192, "column": 14}}, {"id": 561, "type": "struct_specifier", "text": "struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n }", "parent": 560, "children": [562], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 192, "column": 5}}, {"id": 562, "type": "struct", "text": "struct", "parent": 561, "children": [], "start_point": {"row": 188, "column": 4}, "end_point": {"row": 188, "column": 10}}, {"id": 563, "type": "field_declaration", "text": "struct term *condition;", "parent": 561, "children": [564, 567], "start_point": {"row": 189, "column": 6}, "end_point": {"row": 189, "column": 29}}, {"id": 564, "type": "struct_specifier", "text": "struct term", "parent": 563, "children": [565, 566], "start_point": {"row": 189, "column": 6}, "end_point": {"row": 189, "column": 17}}, {"id": 565, "type": "struct", "text": "struct", "parent": 564, "children": [], "start_point": {"row": 189, "column": 6}, "end_point": {"row": 189, "column": 12}}, {"id": 566, "type": "type_identifier", "text": "term", "parent": 564, "children": [], "start_point": {"row": 189, "column": 13}, "end_point": {"row": 189, "column": 17}}, {"id": 567, "type": "pointer_declarator", "text": "*condition", "parent": 563, "children": [568, 569], "start_point": {"row": 189, "column": 18}, "end_point": {"row": 189, "column": 28}}, {"id": 568, "type": "*", "text": "*", "parent": 567, "children": [], "start_point": {"row": 189, "column": 18}, "end_point": {"row": 189, "column": 19}}, {"id": 569, "type": "field_identifier", "text": "condition", "parent": 567, "children": [], "start_point": {"row": 189, "column": 19}, "end_point": {"row": 189, "column": 28}}, {"id": 570, "type": "field_declaration", "text": "struct statement *then_body;", "parent": 561, "children": [571, 574], "start_point": {"row": 190, "column": 6}, "end_point": {"row": 190, "column": 34}}, {"id": 571, "type": "struct_specifier", "text": "struct statement", "parent": 570, "children": [572, 573], "start_point": {"row": 190, "column": 6}, "end_point": {"row": 190, "column": 22}}, {"id": 572, "type": "struct", "text": "struct", "parent": 571, "children": [], "start_point": {"row": 190, "column": 6}, "end_point": {"row": 190, "column": 12}}, {"id": 573, "type": "type_identifier", "text": "statement", "parent": 571, "children": [], "start_point": {"row": 190, "column": 13}, "end_point": {"row": 190, "column": 22}}, {"id": 574, "type": "pointer_declarator", "text": "*then_body", "parent": 570, "children": [575, 576], "start_point": {"row": 190, "column": 23}, "end_point": {"row": 190, "column": 33}}, {"id": 575, "type": "*", "text": "*", "parent": 574, "children": [], "start_point": {"row": 190, "column": 23}, "end_point": {"row": 190, "column": 24}}, {"id": 576, "type": "field_identifier", "text": "then_body", "parent": 574, "children": [], "start_point": {"row": 190, "column": 24}, "end_point": {"row": 190, "column": 33}}, {"id": 577, "type": "field_declaration", "text": "struct statement *else_body;", "parent": 561, "children": [578, 581], "start_point": {"row": 191, "column": 6}, "end_point": {"row": 191, "column": 34}}, {"id": 578, "type": "struct_specifier", "text": "struct statement", "parent": 577, "children": [579, 580], "start_point": {"row": 191, "column": 6}, "end_point": {"row": 191, "column": 22}}, {"id": 579, "type": "struct", "text": "struct", "parent": 578, "children": [], "start_point": {"row": 191, "column": 6}, "end_point": {"row": 191, "column": 12}}, {"id": 580, "type": "type_identifier", "text": "statement", "parent": 578, "children": [], "start_point": {"row": 191, "column": 13}, "end_point": {"row": 191, "column": 22}}, {"id": 581, "type": "pointer_declarator", "text": "*else_body", "parent": 577, "children": [582, 583], "start_point": {"row": 191, "column": 23}, "end_point": {"row": 191, "column": 33}}, {"id": 582, "type": "*", "text": "*", "parent": 581, "children": [], "start_point": {"row": 191, "column": 23}, "end_point": {"row": 191, "column": 24}}, {"id": 583, "type": "field_identifier", "text": "else_body", "parent": 581, "children": [], "start_point": {"row": 191, "column": 24}, "end_point": {"row": 191, "column": 33}}, {"id": 584, "type": "field_identifier", "text": "if_then", "parent": 560, "children": [], "start_point": {"row": 192, "column": 6}, "end_point": {"row": 192, "column": 13}}, {"id": 585, "type": "field_identifier", "text": "u", "parent": 390, "children": [], "start_point": {"row": 194, "column": 4}, "end_point": {"row": 194, "column": 5}}, {"id": 586, "type": "declaration", "text": "extern struct statement *statement_root;", "parent": null, "children": [587, 589, 592], "start_point": {"row": 198, "column": 0}, "end_point": {"row": 198, "column": 40}}, {"id": 587, "type": "storage_class_specifier", "text": "extern", "parent": 586, "children": [588], "start_point": {"row": 198, "column": 0}, "end_point": {"row": 198, "column": 6}}, {"id": 588, "type": "extern", "text": "extern", "parent": 587, "children": [], "start_point": {"row": 198, "column": 0}, "end_point": {"row": 198, "column": 6}}, {"id": 589, "type": "struct_specifier", "text": "struct statement", "parent": 586, "children": [590, 591], "start_point": {"row": 198, "column": 7}, "end_point": {"row": 198, "column": 23}}, {"id": 590, "type": "struct", "text": "struct", "parent": 589, "children": [], "start_point": {"row": 198, "column": 7}, "end_point": {"row": 198, "column": 13}}, {"id": 591, "type": "type_identifier", "text": "statement", "parent": 589, "children": [], "start_point": {"row": 198, "column": 14}, "end_point": {"row": 198, "column": 23}}, {"id": 592, "type": "pointer_declarator", "text": "*statement_root", "parent": 586, "children": [593, 594], "start_point": {"row": 198, "column": 24}, "end_point": {"row": 198, "column": 39}}, {"id": 593, "type": "*", "text": "*", "parent": 592, "children": [], "start_point": {"row": 198, "column": 24}, "end_point": {"row": 198, "column": 25}}, {"id": 594, "type": "identifier", "text": "statement_root", "parent": 592, "children": [], "start_point": {"row": 198, "column": 25}, "end_point": {"row": 198, "column": 39}}, {"id": 595, "type": "declaration", "text": "void increase_reference(struct variable *v);", "parent": null, "children": [596, 597], "start_point": {"row": 200, "column": 0}, "end_point": {"row": 200, "column": 44}}, {"id": 596, "type": "primitive_type", "text": "void", "parent": 595, "children": [], "start_point": {"row": 200, "column": 0}, "end_point": {"row": 200, "column": 4}}, {"id": 597, "type": "function_declarator", "text": "increase_reference(struct variable *v)", "parent": 595, "children": [598, 599], "start_point": {"row": 200, "column": 5}, "end_point": {"row": 200, "column": 43}}, {"id": 598, "type": "identifier", "text": "increase_reference", "parent": 597, "children": [], "start_point": {"row": 200, "column": 5}, "end_point": {"row": 200, "column": 23}}, {"id": 599, "type": "parameter_list", "text": "(struct variable *v)", "parent": 597, "children": [600], "start_point": {"row": 200, "column": 23}, "end_point": {"row": 200, "column": 43}}, {"id": 600, "type": "parameter_declaration", "text": "struct variable *v", "parent": 599, "children": [601, 604], "start_point": {"row": 200, "column": 24}, "end_point": {"row": 200, "column": 42}}, {"id": 601, "type": "struct_specifier", "text": "struct variable", "parent": 600, "children": [602, 603], "start_point": {"row": 200, "column": 24}, "end_point": {"row": 200, "column": 39}}, {"id": 602, "type": "struct", "text": "struct", "parent": 601, "children": [], "start_point": {"row": 200, "column": 24}, "end_point": {"row": 200, "column": 30}}, {"id": 603, "type": "type_identifier", "text": "variable", "parent": 601, "children": [], "start_point": {"row": 200, "column": 31}, "end_point": {"row": 200, "column": 39}}, {"id": 604, "type": "pointer_declarator", "text": "*v", "parent": 600, "children": [605, 606], "start_point": {"row": 200, "column": 40}, "end_point": {"row": 200, "column": 42}}, {"id": 605, "type": "*", "text": "*", "parent": 604, "children": [], "start_point": {"row": 200, "column": 40}, "end_point": {"row": 200, "column": 41}}, {"id": 606, "type": "identifier", "text": "v", "parent": 604, "children": [], "start_point": {"row": 200, "column": 41}, "end_point": {"row": 200, "column": 42}}, {"id": 607, "type": "declaration", "text": "void decrease_reference(struct variable *v);", "parent": null, "children": [608, 609], "start_point": {"row": 201, "column": 0}, "end_point": {"row": 201, "column": 44}}, {"id": 608, "type": "primitive_type", "text": "void", "parent": 607, "children": [], "start_point": {"row": 201, "column": 0}, "end_point": {"row": 201, "column": 4}}, {"id": 609, "type": "function_declarator", "text": "decrease_reference(struct variable *v)", "parent": 607, "children": [610, 611], "start_point": {"row": 201, "column": 5}, "end_point": {"row": 201, "column": 43}}, {"id": 610, "type": "identifier", "text": "decrease_reference", "parent": 609, "children": [], "start_point": {"row": 201, "column": 5}, "end_point": {"row": 201, "column": 23}}, {"id": 611, "type": "parameter_list", "text": "(struct variable *v)", "parent": 609, "children": [612], "start_point": {"row": 201, "column": 23}, "end_point": {"row": 201, "column": 43}}, {"id": 612, "type": "parameter_declaration", "text": "struct variable *v", "parent": 611, "children": [613, 616], "start_point": {"row": 201, "column": 24}, "end_point": {"row": 201, "column": 42}}, {"id": 613, "type": "struct_specifier", "text": "struct variable", "parent": 612, "children": [614, 615], "start_point": {"row": 201, "column": 24}, "end_point": {"row": 201, "column": 39}}, {"id": 614, "type": "struct", "text": "struct", "parent": 613, "children": [], "start_point": {"row": 201, "column": 24}, "end_point": {"row": 201, "column": 30}}, {"id": 615, "type": "type_identifier", "text": "variable", "parent": 613, "children": [], "start_point": {"row": 201, "column": 31}, "end_point": {"row": 201, "column": 39}}, {"id": 616, "type": "pointer_declarator", "text": "*v", "parent": 612, "children": [617, 618], "start_point": {"row": 201, "column": 40}, "end_point": {"row": 201, "column": 42}}, {"id": 617, "type": "*", "text": "*", "parent": 616, "children": [], "start_point": {"row": 201, "column": 40}, "end_point": {"row": 201, "column": 41}}, {"id": 618, "type": "identifier", "text": "v", "parent": 616, "children": [], "start_point": {"row": 201, "column": 41}, "end_point": {"row": 201, "column": 42}}, {"id": 619, "type": "declaration", "text": "void init_struct_variable(struct variable *v, \n\t\t\t enum var_type type, char *name, char *string_repr);", "parent": null, "children": [620, 621], "start_point": {"row": 202, "column": 0}, "end_point": {"row": 203, "column": 56}}, {"id": 620, "type": "primitive_type", "text": "void", "parent": 619, "children": [], "start_point": {"row": 202, "column": 0}, "end_point": {"row": 202, "column": 4}}, {"id": 621, "type": "function_declarator", "text": "init_struct_variable(struct variable *v, \n\t\t\t enum var_type type, char *name, char *string_repr)", "parent": 619, "children": [622, 623], "start_point": {"row": 202, "column": 5}, "end_point": {"row": 203, "column": 55}}, {"id": 622, "type": "identifier", "text": "init_struct_variable", "parent": 621, "children": [], "start_point": {"row": 202, "column": 5}, "end_point": {"row": 202, "column": 25}}, {"id": 623, "type": "parameter_list", "text": "(struct variable *v, \n\t\t\t enum var_type type, char *name, char *string_repr)", "parent": 621, "children": [624, 631, 636, 641], "start_point": {"row": 202, "column": 25}, "end_point": {"row": 203, "column": 55}}, {"id": 624, "type": "parameter_declaration", "text": "struct variable *v", "parent": 623, "children": [625, 628], "start_point": {"row": 202, "column": 26}, "end_point": {"row": 202, "column": 44}}, {"id": 625, "type": "struct_specifier", "text": "struct variable", "parent": 624, "children": [626, 627], "start_point": {"row": 202, "column": 26}, "end_point": {"row": 202, "column": 41}}, {"id": 626, "type": "struct", "text": "struct", "parent": 625, "children": [], "start_point": {"row": 202, "column": 26}, "end_point": {"row": 202, "column": 32}}, {"id": 627, "type": "type_identifier", "text": "variable", "parent": 625, "children": [], "start_point": {"row": 202, "column": 33}, "end_point": {"row": 202, "column": 41}}, {"id": 628, "type": "pointer_declarator", "text": "*v", "parent": 624, "children": [629, 630], "start_point": {"row": 202, "column": 42}, "end_point": {"row": 202, "column": 44}}, {"id": 629, "type": "*", "text": "*", "parent": 628, "children": [], "start_point": {"row": 202, "column": 42}, "end_point": {"row": 202, "column": 43}}, {"id": 630, "type": "identifier", "text": "v", "parent": 628, "children": [], "start_point": {"row": 202, "column": 43}, "end_point": {"row": 202, "column": 44}}, {"id": 631, "type": "parameter_declaration", "text": "enum var_type type", "parent": 623, "children": [632, 635], "start_point": {"row": 203, "column": 5}, "end_point": {"row": 203, "column": 23}}, {"id": 632, "type": "enum_specifier", "text": "enum var_type", "parent": 631, "children": [633, 634], "start_point": {"row": 203, "column": 5}, "end_point": {"row": 203, "column": 18}}, {"id": 633, "type": "enum", "text": "enum", "parent": 632, "children": [], "start_point": {"row": 203, "column": 5}, "end_point": {"row": 203, "column": 9}}, {"id": 634, "type": "type_identifier", "text": "var_type", "parent": 632, "children": [], "start_point": {"row": 203, "column": 10}, "end_point": {"row": 203, "column": 18}}, {"id": 635, "type": "identifier", "text": "type", "parent": 631, "children": [], "start_point": {"row": 203, "column": 19}, "end_point": {"row": 203, "column": 23}}, {"id": 636, "type": "parameter_declaration", "text": "char *name", "parent": 623, "children": [637, 638], "start_point": {"row": 203, "column": 25}, "end_point": {"row": 203, "column": 35}}, {"id": 637, "type": "primitive_type", "text": "char", "parent": 636, "children": [], "start_point": {"row": 203, "column": 25}, "end_point": {"row": 203, "column": 29}}, {"id": 638, "type": "pointer_declarator", "text": "*name", "parent": 636, "children": [639, 640], "start_point": {"row": 203, "column": 30}, "end_point": {"row": 203, "column": 35}}, {"id": 639, "type": "*", "text": "*", "parent": 638, "children": [], "start_point": {"row": 203, "column": 30}, "end_point": {"row": 203, "column": 31}}, {"id": 640, "type": "identifier", "text": "name", "parent": 638, "children": [], "start_point": {"row": 203, "column": 31}, "end_point": {"row": 203, "column": 35}}, {"id": 641, "type": "parameter_declaration", "text": "char *string_repr", "parent": 623, "children": [642, 643], "start_point": {"row": 203, "column": 37}, "end_point": {"row": 203, "column": 54}}, {"id": 642, "type": "primitive_type", "text": "char", "parent": 641, "children": [], "start_point": {"row": 203, "column": 37}, "end_point": {"row": 203, "column": 41}}, {"id": 643, "type": "pointer_declarator", "text": "*string_repr", "parent": 641, "children": [644, 645], "start_point": {"row": 203, "column": 42}, "end_point": {"row": 203, "column": 54}}, {"id": 644, "type": "*", "text": "*", "parent": 643, "children": [], "start_point": {"row": 203, "column": 42}, "end_point": {"row": 203, "column": 43}}, {"id": 645, "type": "identifier", "text": "string_repr", "parent": 643, "children": [], "start_point": {"row": 203, "column": 43}, "end_point": {"row": 203, "column": 54}}, {"id": 646, "type": "declaration", "text": "struct variable *create_struct_variable(enum var_type type, char *name, \n\t\t\t\t\tchar *string_repr);", "parent": null, "children": [647, 650], "start_point": {"row": 204, "column": 0}, "end_point": {"row": 205, "column": 24}}, {"id": 647, "type": "struct_specifier", "text": "struct variable", "parent": 646, "children": [648, 649], "start_point": {"row": 204, "column": 0}, "end_point": {"row": 204, "column": 15}}, {"id": 648, "type": "struct", "text": "struct", "parent": 647, "children": [], "start_point": {"row": 204, "column": 0}, "end_point": {"row": 204, "column": 6}}, {"id": 649, "type": "type_identifier", "text": "variable", "parent": 647, "children": [], "start_point": {"row": 204, "column": 7}, "end_point": {"row": 204, "column": 15}}, {"id": 650, "type": "pointer_declarator", "text": "*create_struct_variable(enum var_type type, char *name, \n\t\t\t\t\tchar *string_repr)", "parent": 646, "children": [651, 652], "start_point": {"row": 204, "column": 16}, "end_point": {"row": 205, "column": 23}}, {"id": 651, "type": "*", "text": "*", "parent": 650, "children": [], "start_point": {"row": 204, "column": 16}, "end_point": {"row": 204, "column": 17}}, {"id": 652, "type": "function_declarator", "text": "create_struct_variable(enum var_type type, char *name, \n\t\t\t\t\tchar *string_repr)", "parent": 650, "children": [653, 654], "start_point": {"row": 204, "column": 17}, "end_point": {"row": 205, "column": 23}}, {"id": 653, "type": "identifier", "text": "create_struct_variable", "parent": 652, "children": [], "start_point": {"row": 204, "column": 17}, "end_point": {"row": 204, "column": 39}}, {"id": 654, "type": "parameter_list", "text": "(enum var_type type, char *name, \n\t\t\t\t\tchar *string_repr)", "parent": 652, "children": [655, 660, 665], "start_point": {"row": 204, "column": 39}, "end_point": {"row": 205, "column": 23}}, {"id": 655, "type": "parameter_declaration", "text": "enum var_type type", "parent": 654, "children": [656, 659], "start_point": {"row": 204, "column": 40}, "end_point": {"row": 204, "column": 58}}, {"id": 656, "type": "enum_specifier", "text": "enum var_type", "parent": 655, "children": [657, 658], "start_point": {"row": 204, "column": 40}, "end_point": {"row": 204, "column": 53}}, {"id": 657, "type": "enum", "text": "enum", "parent": 656, "children": [], "start_point": {"row": 204, "column": 40}, "end_point": {"row": 204, "column": 44}}, {"id": 658, "type": "type_identifier", "text": "var_type", "parent": 656, "children": [], "start_point": {"row": 204, "column": 45}, "end_point": {"row": 204, "column": 53}}, {"id": 659, "type": "identifier", "text": "type", "parent": 655, "children": [], "start_point": {"row": 204, "column": 54}, "end_point": {"row": 204, "column": 58}}, {"id": 660, "type": "parameter_declaration", "text": "char *name", "parent": 654, "children": [661, 662], "start_point": {"row": 204, "column": 60}, "end_point": {"row": 204, "column": 70}}, {"id": 661, "type": "primitive_type", "text": "char", "parent": 660, "children": [], "start_point": {"row": 204, "column": 60}, "end_point": {"row": 204, "column": 64}}, {"id": 662, "type": "pointer_declarator", "text": "*name", "parent": 660, "children": [663, 664], "start_point": {"row": 204, "column": 65}, "end_point": {"row": 204, "column": 70}}, {"id": 663, "type": "*", "text": "*", "parent": 662, "children": [], "start_point": {"row": 204, "column": 65}, "end_point": {"row": 204, "column": 66}}, {"id": 664, "type": "identifier", "text": "name", "parent": 662, "children": [], "start_point": {"row": 204, "column": 66}, "end_point": {"row": 204, "column": 70}}, {"id": 665, "type": "parameter_declaration", "text": "char *string_repr", "parent": 654, "children": [666, 667], "start_point": {"row": 205, "column": 5}, "end_point": {"row": 205, "column": 22}}, {"id": 666, "type": "primitive_type", "text": "char", "parent": 665, "children": [], "start_point": {"row": 205, "column": 5}, "end_point": {"row": 205, "column": 9}}, {"id": 667, "type": "pointer_declarator", "text": "*string_repr", "parent": 665, "children": [668, 669], "start_point": {"row": 205, "column": 10}, "end_point": {"row": 205, "column": 22}}, {"id": 668, "type": "*", "text": "*", "parent": 667, "children": [], "start_point": {"row": 205, "column": 10}, "end_point": {"row": 205, "column": 11}}, {"id": 669, "type": "identifier", "text": "string_repr", "parent": 667, "children": [], "start_point": {"row": 205, "column": 11}, "end_point": {"row": 205, "column": 22}}, {"id": 670, "type": "declaration", "text": "void free_variable(struct variable *v);", "parent": null, "children": [671, 672], "start_point": {"row": 206, "column": 0}, "end_point": {"row": 206, "column": 39}}, {"id": 671, "type": "primitive_type", "text": "void", "parent": 670, "children": [], "start_point": {"row": 206, "column": 0}, "end_point": {"row": 206, "column": 4}}, {"id": 672, "type": "function_declarator", "text": "free_variable(struct variable *v)", "parent": 670, "children": [673, 674], "start_point": {"row": 206, "column": 5}, "end_point": {"row": 206, "column": 38}}, {"id": 673, "type": "identifier", "text": "free_variable", "parent": 672, "children": [], "start_point": {"row": 206, "column": 5}, "end_point": {"row": 206, "column": 18}}, {"id": 674, "type": "parameter_list", "text": "(struct variable *v)", "parent": 672, "children": [675], "start_point": {"row": 206, "column": 18}, "end_point": {"row": 206, "column": 38}}, {"id": 675, "type": "parameter_declaration", "text": "struct variable *v", "parent": 674, "children": [676, 679], "start_point": {"row": 206, "column": 19}, "end_point": {"row": 206, "column": 37}}, {"id": 676, "type": "struct_specifier", "text": "struct variable", "parent": 675, "children": [677, 678], "start_point": {"row": 206, "column": 19}, "end_point": {"row": 206, "column": 34}}, {"id": 677, "type": "struct", "text": "struct", "parent": 676, "children": [], "start_point": {"row": 206, "column": 19}, "end_point": {"row": 206, "column": 25}}, {"id": 678, "type": "type_identifier", "text": "variable", "parent": 676, "children": [], "start_point": {"row": 206, "column": 26}, "end_point": {"row": 206, "column": 34}}, {"id": 679, "type": "pointer_declarator", "text": "*v", "parent": 675, "children": [680, 681], "start_point": {"row": 206, "column": 35}, "end_point": {"row": 206, "column": 37}}, {"id": 680, "type": "*", "text": "*", "parent": 679, "children": [], "start_point": {"row": 206, "column": 35}, "end_point": {"row": 206, "column": 36}}, {"id": 681, "type": "identifier", "text": "v", "parent": 679, "children": [], "start_point": {"row": 206, "column": 36}, "end_point": {"row": 206, "column": 37}}, {"id": 682, "type": "declaration", "text": "void free_term(struct term *t);", "parent": null, "children": [683, 684], "start_point": {"row": 209, "column": 0}, "end_point": {"row": 209, "column": 31}}, {"id": 683, "type": "primitive_type", "text": "void", "parent": 682, "children": [], "start_point": {"row": 209, "column": 0}, "end_point": {"row": 209, "column": 4}}, {"id": 684, "type": "function_declarator", "text": "free_term(struct term *t)", "parent": 682, "children": [685, 686], "start_point": {"row": 209, "column": 5}, "end_point": {"row": 209, "column": 30}}, {"id": 685, "type": "identifier", "text": "free_term", "parent": 684, "children": [], "start_point": {"row": 209, "column": 5}, "end_point": {"row": 209, "column": 14}}, {"id": 686, "type": "parameter_list", "text": "(struct term *t)", "parent": 684, "children": [687], "start_point": {"row": 209, "column": 14}, "end_point": {"row": 209, "column": 30}}, {"id": 687, "type": "parameter_declaration", "text": "struct term *t", "parent": 686, "children": [688, 691], "start_point": {"row": 209, "column": 15}, "end_point": {"row": 209, "column": 29}}, {"id": 688, "type": "struct_specifier", "text": "struct term", "parent": 687, "children": [689, 690], "start_point": {"row": 209, "column": 15}, "end_point": {"row": 209, "column": 26}}, {"id": 689, "type": "struct", "text": "struct", "parent": 688, "children": [], "start_point": {"row": 209, "column": 15}, "end_point": {"row": 209, "column": 21}}, {"id": 690, "type": "type_identifier", "text": "term", "parent": 688, "children": [], "start_point": {"row": 209, "column": 22}, "end_point": {"row": 209, "column": 26}}, {"id": 691, "type": "pointer_declarator", "text": "*t", "parent": 687, "children": [692, 693], "start_point": {"row": 209, "column": 27}, "end_point": {"row": 209, "column": 29}}, {"id": 692, "type": "*", "text": "*", "parent": 691, "children": [], "start_point": {"row": 209, "column": 27}, "end_point": {"row": 209, "column": 28}}, {"id": 693, "type": "identifier", "text": "t", "parent": 691, "children": [], "start_point": {"row": 209, "column": 28}, "end_point": {"row": 209, "column": 29}}, {"id": 694, "type": "declaration", "text": "void evaluate_params(char *interface, struct term *source_params,\n\t\t struct variable *dest_params);", "parent": null, "children": [695, 696], "start_point": {"row": 212, "column": 0}, "end_point": {"row": 213, "column": 37}}, {"id": 695, "type": "primitive_type", "text": "void", "parent": 694, "children": [], "start_point": {"row": 212, "column": 0}, "end_point": {"row": 212, "column": 4}}, {"id": 696, "type": "function_declarator", "text": "evaluate_params(char *interface, struct term *source_params,\n\t\t struct variable *dest_params)", "parent": 694, "children": [697, 698], "start_point": {"row": 212, "column": 5}, "end_point": {"row": 213, "column": 36}}, {"id": 697, "type": "identifier", "text": "evaluate_params", "parent": 696, "children": [], "start_point": {"row": 212, "column": 5}, "end_point": {"row": 212, "column": 20}}, {"id": 698, "type": "parameter_list", "text": "(char *interface, struct term *source_params,\n\t\t struct variable *dest_params)", "parent": 696, "children": [699, 704, 711], "start_point": {"row": 212, "column": 20}, "end_point": {"row": 213, "column": 36}}, {"id": 699, "type": "parameter_declaration", "text": "char *interface", "parent": 698, "children": [700, 701], "start_point": {"row": 212, "column": 21}, "end_point": {"row": 212, "column": 36}}, {"id": 700, "type": "primitive_type", "text": "char", "parent": 699, "children": [], "start_point": {"row": 212, "column": 21}, "end_point": {"row": 212, "column": 25}}, {"id": 701, "type": "pointer_declarator", "text": "*interface", "parent": 699, "children": [702, 703], "start_point": {"row": 212, "column": 26}, "end_point": {"row": 212, "column": 36}}, {"id": 702, "type": "*", "text": "*", "parent": 701, "children": [], "start_point": {"row": 212, "column": 26}, "end_point": {"row": 212, "column": 27}}, {"id": 703, "type": "identifier", "text": "interface", "parent": 701, "children": [], "start_point": {"row": 212, "column": 27}, "end_point": {"row": 212, "column": 36}}, {"id": 704, "type": "parameter_declaration", "text": "struct term *source_params", "parent": 698, "children": [705, 708], "start_point": {"row": 212, "column": 38}, "end_point": {"row": 212, "column": 64}}, {"id": 705, "type": "struct_specifier", "text": "struct term", "parent": 704, "children": [706, 707], "start_point": {"row": 212, "column": 38}, "end_point": {"row": 212, "column": 49}}, {"id": 706, "type": "struct", "text": "struct", "parent": 705, "children": [], "start_point": {"row": 212, "column": 38}, "end_point": {"row": 212, "column": 44}}, {"id": 707, "type": "type_identifier", "text": "term", "parent": 705, "children": [], "start_point": {"row": 212, "column": 45}, "end_point": {"row": 212, "column": 49}}, {"id": 708, "type": "pointer_declarator", "text": "*source_params", "parent": 704, "children": [709, 710], "start_point": {"row": 212, "column": 50}, "end_point": {"row": 212, "column": 64}}, {"id": 709, "type": "*", "text": "*", "parent": 708, "children": [], "start_point": {"row": 212, "column": 50}, "end_point": {"row": 212, "column": 51}}, {"id": 710, "type": "identifier", "text": "source_params", "parent": 708, "children": [], "start_point": {"row": 212, "column": 51}, "end_point": {"row": 212, "column": 64}}, {"id": 711, "type": "parameter_declaration", "text": "struct variable *dest_params", "parent": 698, "children": [712, 715], "start_point": {"row": 213, "column": 7}, "end_point": {"row": 213, "column": 35}}, {"id": 712, "type": "struct_specifier", "text": "struct variable", "parent": 711, "children": [713, 714], "start_point": {"row": 213, "column": 7}, "end_point": {"row": 213, "column": 22}}, {"id": 713, "type": "struct", "text": "struct", "parent": 712, "children": [], "start_point": {"row": 213, "column": 7}, "end_point": {"row": 213, "column": 13}}, {"id": 714, "type": "type_identifier", "text": "variable", "parent": 712, "children": [], "start_point": {"row": 213, "column": 14}, "end_point": {"row": 213, "column": 22}}, {"id": 715, "type": "pointer_declarator", "text": "*dest_params", "parent": 711, "children": [716, 717], "start_point": {"row": 213, "column": 23}, "end_point": {"row": 213, "column": 35}}, {"id": 716, "type": "*", "text": "*", "parent": 715, "children": [], "start_point": {"row": 213, "column": 23}, "end_point": {"row": 213, "column": 24}}, {"id": 717, "type": "identifier", "text": "dest_params", "parent": 715, "children": [], "start_point": {"row": 213, "column": 24}, "end_point": {"row": 213, "column": 35}}, {"id": 718, "type": "declaration", "text": "void evaluate_term(struct variable *result, struct term *t);", "parent": null, "children": [719, 720], "start_point": {"row": 214, "column": 0}, "end_point": {"row": 214, "column": 60}}, {"id": 719, "type": "primitive_type", "text": "void", "parent": 718, "children": [], "start_point": {"row": 214, "column": 0}, "end_point": {"row": 214, "column": 4}}, {"id": 720, "type": "function_declarator", "text": "evaluate_term(struct variable *result, struct term *t)", "parent": 718, "children": [721, 722], "start_point": {"row": 214, "column": 5}, "end_point": {"row": 214, "column": 59}}, {"id": 721, "type": "identifier", "text": "evaluate_term", "parent": 720, "children": [], "start_point": {"row": 214, "column": 5}, "end_point": {"row": 214, "column": 18}}, {"id": 722, "type": "parameter_list", "text": "(struct variable *result, struct term *t)", "parent": 720, "children": [723, 730], "start_point": {"row": 214, "column": 18}, "end_point": {"row": 214, "column": 59}}, {"id": 723, "type": "parameter_declaration", "text": "struct variable *result", "parent": 722, "children": [724, 727], "start_point": {"row": 214, "column": 19}, "end_point": {"row": 214, "column": 42}}, {"id": 724, "type": "struct_specifier", "text": "struct variable", "parent": 723, "children": [725, 726], "start_point": {"row": 214, "column": 19}, "end_point": {"row": 214, "column": 34}}, {"id": 725, "type": "struct", "text": "struct", "parent": 724, "children": [], "start_point": {"row": 214, "column": 19}, "end_point": {"row": 214, "column": 25}}, {"id": 726, "type": "type_identifier", "text": "variable", "parent": 724, "children": [], "start_point": {"row": 214, "column": 26}, "end_point": {"row": 214, "column": 34}}, {"id": 727, "type": "pointer_declarator", "text": "*result", "parent": 723, "children": [728, 729], "start_point": {"row": 214, "column": 35}, "end_point": {"row": 214, "column": 42}}, {"id": 728, "type": "*", "text": "*", "parent": 727, "children": [], "start_point": {"row": 214, "column": 35}, "end_point": {"row": 214, "column": 36}}, {"id": 729, "type": "identifier", "text": "result", "parent": 727, "children": [], "start_point": {"row": 214, "column": 36}, "end_point": {"row": 214, "column": 42}}, {"id": 730, "type": "parameter_declaration", "text": "struct term *t", "parent": 722, "children": [731, 734], "start_point": {"row": 214, "column": 44}, "end_point": {"row": 214, "column": 58}}, {"id": 731, "type": "struct_specifier", "text": "struct term", "parent": 730, "children": [732, 733], "start_point": {"row": 214, "column": 44}, "end_point": {"row": 214, "column": 55}}, {"id": 732, "type": "struct", "text": "struct", "parent": 731, "children": [], "start_point": {"row": 214, "column": 44}, "end_point": {"row": 214, "column": 50}}, {"id": 733, "type": "type_identifier", "text": "term", "parent": 731, "children": [], "start_point": {"row": 214, "column": 51}, "end_point": {"row": 214, "column": 55}}, {"id": 734, "type": "pointer_declarator", "text": "*t", "parent": 730, "children": [735, 736], "start_point": {"row": 214, "column": 56}, "end_point": {"row": 214, "column": 58}}, {"id": 735, "type": "*", "text": "*", "parent": 734, "children": [], "start_point": {"row": 214, "column": 56}, "end_point": {"row": 214, "column": 57}}, {"id": 736, "type": "identifier", "text": "t", "parent": 734, "children": [], "start_point": {"row": 214, "column": 57}, "end_point": {"row": 214, "column": 58}}, {"id": 737, "type": "declaration", "text": "void execute_statement(struct statement *s);", "parent": null, "children": [738, 739], "start_point": {"row": 216, "column": 0}, "end_point": {"row": 216, "column": 44}}, {"id": 738, "type": "primitive_type", "text": "void", "parent": 737, "children": [], "start_point": {"row": 216, "column": 0}, "end_point": {"row": 216, "column": 4}}, {"id": 739, "type": "function_declarator", "text": "execute_statement(struct statement *s)", "parent": 737, "children": [740, 741], "start_point": {"row": 216, "column": 5}, "end_point": {"row": 216, "column": 43}}, {"id": 740, "type": "identifier", "text": "execute_statement", "parent": 739, "children": [], "start_point": {"row": 216, "column": 5}, "end_point": {"row": 216, "column": 22}}, {"id": 741, "type": "parameter_list", "text": "(struct statement *s)", "parent": 739, "children": [742], "start_point": {"row": 216, "column": 22}, "end_point": {"row": 216, "column": 43}}, {"id": 742, "type": "parameter_declaration", "text": "struct statement *s", "parent": 741, "children": [743, 746], "start_point": {"row": 216, "column": 23}, "end_point": {"row": 216, "column": 42}}, {"id": 743, "type": "struct_specifier", "text": "struct statement", "parent": 742, "children": [744, 745], "start_point": {"row": 216, "column": 23}, "end_point": {"row": 216, "column": 39}}, {"id": 744, "type": "struct", "text": "struct", "parent": 743, "children": [], "start_point": {"row": 216, "column": 23}, "end_point": {"row": 216, "column": 29}}, {"id": 745, "type": "type_identifier", "text": "statement", "parent": 743, "children": [], "start_point": {"row": 216, "column": 30}, "end_point": {"row": 216, "column": 39}}, {"id": 746, "type": "pointer_declarator", "text": "*s", "parent": 742, "children": [747, 748], "start_point": {"row": 216, "column": 40}, "end_point": {"row": 216, "column": 42}}, {"id": 747, "type": "*", "text": "*", "parent": 746, "children": [], "start_point": {"row": 216, "column": 40}, "end_point": {"row": 216, "column": 41}}, {"id": 748, "type": "identifier", "text": "s", "parent": 746, "children": [], "start_point": {"row": 216, "column": 41}, "end_point": {"row": 216, "column": 42}}, {"id": 749, "type": "declaration", "text": "void store_int(struct variable *result, int i);", "parent": null, "children": [750, 751], "start_point": {"row": 219, "column": 0}, "end_point": {"row": 219, "column": 47}}, {"id": 750, "type": "primitive_type", "text": "void", "parent": 749, "children": [], "start_point": {"row": 219, "column": 0}, "end_point": {"row": 219, "column": 4}}, {"id": 751, "type": "function_declarator", "text": "store_int(struct variable *result, int i)", "parent": 749, "children": [752, 753], "start_point": {"row": 219, "column": 5}, "end_point": {"row": 219, "column": 46}}, {"id": 752, "type": "identifier", "text": "store_int", "parent": 751, "children": [], "start_point": {"row": 219, "column": 5}, "end_point": {"row": 219, "column": 14}}, {"id": 753, "type": "parameter_list", "text": "(struct variable *result, int i)", "parent": 751, "children": [754, 761], "start_point": {"row": 219, "column": 14}, "end_point": {"row": 219, "column": 46}}, {"id": 754, "type": "parameter_declaration", "text": "struct variable *result", "parent": 753, "children": [755, 758], "start_point": {"row": 219, "column": 15}, "end_point": {"row": 219, "column": 38}}, {"id": 755, "type": "struct_specifier", "text": "struct variable", "parent": 754, "children": [756, 757], "start_point": {"row": 219, "column": 15}, "end_point": {"row": 219, "column": 30}}, {"id": 756, "type": "struct", "text": "struct", "parent": 755, "children": [], "start_point": {"row": 219, "column": 15}, "end_point": {"row": 219, "column": 21}}, {"id": 757, "type": "type_identifier", "text": "variable", "parent": 755, "children": [], "start_point": {"row": 219, "column": 22}, "end_point": {"row": 219, "column": 30}}, {"id": 758, "type": "pointer_declarator", "text": "*result", "parent": 754, "children": [759, 760], "start_point": {"row": 219, "column": 31}, "end_point": {"row": 219, "column": 38}}, {"id": 759, "type": "*", "text": "*", "parent": 758, "children": [], "start_point": {"row": 219, "column": 31}, "end_point": {"row": 219, "column": 32}}, {"id": 760, "type": "identifier", "text": "result", "parent": 758, "children": [], "start_point": {"row": 219, "column": 32}, "end_point": {"row": 219, "column": 38}}, {"id": 761, "type": "parameter_declaration", "text": "int i", "parent": 753, "children": [762, 763], "start_point": {"row": 219, "column": 40}, "end_point": {"row": 219, "column": 45}}, {"id": 762, "type": "primitive_type", "text": "int", "parent": 761, "children": [], "start_point": {"row": 219, "column": 40}, "end_point": {"row": 219, "column": 43}}, {"id": 763, "type": "identifier", "text": "i", "parent": 761, "children": [], "start_point": {"row": 219, "column": 44}, "end_point": {"row": 219, "column": 45}}, {"id": 764, "type": "declaration", "text": "void store_double(struct variable *result, double f);", "parent": null, "children": [765, 766], "start_point": {"row": 220, "column": 0}, "end_point": {"row": 220, "column": 53}}, {"id": 765, "type": "primitive_type", "text": "void", "parent": 764, "children": [], "start_point": {"row": 220, "column": 0}, "end_point": {"row": 220, "column": 4}}, {"id": 766, "type": "function_declarator", "text": "store_double(struct variable *result, double f)", "parent": 764, "children": [767, 768], "start_point": {"row": 220, "column": 5}, "end_point": {"row": 220, "column": 52}}, {"id": 767, "type": "identifier", "text": "store_double", "parent": 766, "children": [], "start_point": {"row": 220, "column": 5}, "end_point": {"row": 220, "column": 17}}, {"id": 768, "type": "parameter_list", "text": "(struct variable *result, double f)", "parent": 766, "children": [769, 776], "start_point": {"row": 220, "column": 17}, "end_point": {"row": 220, "column": 52}}, {"id": 769, "type": "parameter_declaration", "text": "struct variable *result", "parent": 768, "children": [770, 773], "start_point": {"row": 220, "column": 18}, "end_point": {"row": 220, "column": 41}}, {"id": 770, "type": "struct_specifier", "text": "struct variable", "parent": 769, "children": [771, 772], "start_point": {"row": 220, "column": 18}, "end_point": {"row": 220, "column": 33}}, {"id": 771, "type": "struct", "text": "struct", "parent": 770, "children": [], "start_point": {"row": 220, "column": 18}, "end_point": {"row": 220, "column": 24}}, {"id": 772, "type": "type_identifier", "text": "variable", "parent": 770, "children": [], "start_point": {"row": 220, "column": 25}, "end_point": {"row": 220, "column": 33}}, {"id": 773, "type": "pointer_declarator", "text": "*result", "parent": 769, "children": [774, 775], "start_point": {"row": 220, "column": 34}, "end_point": {"row": 220, "column": 41}}, {"id": 774, "type": "*", "text": "*", "parent": 773, "children": [], "start_point": {"row": 220, "column": 34}, "end_point": {"row": 220, "column": 35}}, {"id": 775, "type": "identifier", "text": "result", "parent": 773, "children": [], "start_point": {"row": 220, "column": 35}, "end_point": {"row": 220, "column": 41}}, {"id": 776, "type": "parameter_declaration", "text": "double f", "parent": 768, "children": [777, 778], "start_point": {"row": 220, "column": 43}, "end_point": {"row": 220, "column": 51}}, {"id": 777, "type": "primitive_type", "text": "double", "parent": 776, "children": [], "start_point": {"row": 220, "column": 43}, "end_point": {"row": 220, "column": 49}}, {"id": 778, "type": "identifier", "text": "f", "parent": 776, "children": [], "start_point": {"row": 220, "column": 50}, "end_point": {"row": 220, "column": 51}}, {"id": 779, "type": "declaration", "text": "void store_string(struct variable *result, char *s);", "parent": null, "children": [780, 781], "start_point": {"row": 221, "column": 0}, "end_point": {"row": 221, "column": 52}}, {"id": 780, "type": "primitive_type", "text": "void", "parent": 779, "children": [], "start_point": {"row": 221, "column": 0}, "end_point": {"row": 221, "column": 4}}, {"id": 781, "type": "function_declarator", "text": "store_string(struct variable *result, char *s)", "parent": 779, "children": [782, 783], "start_point": {"row": 221, "column": 5}, "end_point": {"row": 221, "column": 51}}, {"id": 782, "type": "identifier", "text": "store_string", "parent": 781, "children": [], "start_point": {"row": 221, "column": 5}, "end_point": {"row": 221, "column": 17}}, {"id": 783, "type": "parameter_list", "text": "(struct variable *result, char *s)", "parent": 781, "children": [784, 791], "start_point": {"row": 221, "column": 17}, "end_point": {"row": 221, "column": 51}}, {"id": 784, "type": "parameter_declaration", "text": "struct variable *result", "parent": 783, "children": [785, 788], "start_point": {"row": 221, "column": 18}, "end_point": {"row": 221, "column": 41}}, {"id": 785, "type": "struct_specifier", "text": "struct variable", "parent": 784, "children": [786, 787], "start_point": {"row": 221, "column": 18}, "end_point": {"row": 221, "column": 33}}, {"id": 786, "type": "struct", "text": "struct", "parent": 785, "children": [], "start_point": {"row": 221, "column": 18}, "end_point": {"row": 221, "column": 24}}, {"id": 787, "type": "type_identifier", "text": "variable", "parent": 785, "children": [], "start_point": {"row": 221, "column": 25}, "end_point": {"row": 221, "column": 33}}, {"id": 788, "type": "pointer_declarator", "text": "*result", "parent": 784, "children": [789, 790], "start_point": {"row": 221, "column": 34}, "end_point": {"row": 221, "column": 41}}, {"id": 789, "type": "*", "text": "*", "parent": 788, "children": [], "start_point": {"row": 221, "column": 34}, "end_point": {"row": 221, "column": 35}}, {"id": 790, "type": "identifier", "text": "result", "parent": 788, "children": [], "start_point": {"row": 221, "column": 35}, "end_point": {"row": 221, "column": 41}}, {"id": 791, "type": "parameter_declaration", "text": "char *s", "parent": 783, "children": [792, 793], "start_point": {"row": 221, "column": 43}, "end_point": {"row": 221, "column": 50}}, {"id": 792, "type": "primitive_type", "text": "char", "parent": 791, "children": [], "start_point": {"row": 221, "column": 43}, "end_point": {"row": 221, "column": 47}}, {"id": 793, "type": "pointer_declarator", "text": "*s", "parent": 791, "children": [794, 795], "start_point": {"row": 221, "column": 48}, "end_point": {"row": 221, "column": 50}}, {"id": 794, "type": "*", "text": "*", "parent": 793, "children": [], "start_point": {"row": 221, "column": 48}, "end_point": {"row": 221, "column": 49}}, {"id": 795, "type": "identifier", "text": "s", "parent": 793, "children": [], "start_point": {"row": 221, "column": 49}, "end_point": {"row": 221, "column": 50}}, {"id": 796, "type": "declaration", "text": "void store_datatype(struct variable *result, MPI_Datatype datatype);", "parent": null, "children": [797, 798], "start_point": {"row": 222, "column": 0}, "end_point": {"row": 222, "column": 68}}, {"id": 797, "type": "primitive_type", "text": "void", "parent": 796, "children": [], "start_point": {"row": 222, "column": 0}, "end_point": {"row": 222, "column": 4}}, {"id": 798, "type": "function_declarator", "text": "store_datatype(struct variable *result, MPI_Datatype datatype)", "parent": 796, "children": [799, 800], "start_point": {"row": 222, "column": 5}, "end_point": {"row": 222, "column": 67}}, {"id": 799, "type": "identifier", "text": "store_datatype", "parent": 798, "children": [], "start_point": {"row": 222, "column": 5}, "end_point": {"row": 222, "column": 19}}, {"id": 800, "type": "parameter_list", "text": "(struct variable *result, MPI_Datatype datatype)", "parent": 798, "children": [801, 808], "start_point": {"row": 222, "column": 19}, "end_point": {"row": 222, "column": 67}}, {"id": 801, "type": "parameter_declaration", "text": "struct variable *result", "parent": 800, "children": [802, 805], "start_point": {"row": 222, "column": 20}, "end_point": {"row": 222, "column": 43}}, {"id": 802, "type": "struct_specifier", "text": "struct variable", "parent": 801, "children": [803, 804], "start_point": {"row": 222, "column": 20}, "end_point": {"row": 222, "column": 35}}, {"id": 803, "type": "struct", "text": "struct", "parent": 802, "children": [], "start_point": {"row": 222, "column": 20}, "end_point": {"row": 222, "column": 26}}, {"id": 804, "type": "type_identifier", "text": "variable", "parent": 802, "children": [], "start_point": {"row": 222, "column": 27}, "end_point": {"row": 222, "column": 35}}, {"id": 805, "type": "pointer_declarator", "text": "*result", "parent": 801, "children": [806, 807], "start_point": {"row": 222, "column": 36}, "end_point": {"row": 222, "column": 43}}, {"id": 806, "type": "*", "text": "*", "parent": 805, "children": [], "start_point": {"row": 222, "column": 36}, "end_point": {"row": 222, "column": 37}}, {"id": 807, "type": "identifier", "text": "result", "parent": 805, "children": [], "start_point": {"row": 222, "column": 37}, "end_point": {"row": 222, "column": 43}}, {"id": 808, "type": "parameter_declaration", "text": "MPI_Datatype datatype", "parent": 800, "children": [809, 810], "start_point": {"row": 222, "column": 45}, "end_point": {"row": 222, "column": 66}}, {"id": 809, "type": "type_identifier", "text": "MPI_Datatype", "parent": 808, "children": [], "start_point": {"row": 222, "column": 45}, "end_point": {"row": 222, "column": 57}}, {"id": 810, "type": "identifier", "text": "datatype", "parent": 808, "children": [], "start_point": {"row": 222, "column": 58}, "end_point": {"row": 222, "column": 66}}, {"id": 811, "type": "declaration", "text": "void store_comm(struct variable *result, MPI_Comm comm);", "parent": null, "children": [812, 813], "start_point": {"row": 223, "column": 0}, "end_point": {"row": 223, "column": 56}}, {"id": 812, "type": "primitive_type", "text": "void", "parent": 811, "children": [], "start_point": {"row": 223, "column": 0}, "end_point": {"row": 223, "column": 4}}, {"id": 813, "type": "function_declarator", "text": "store_comm(struct variable *result, MPI_Comm comm)", "parent": 811, "children": [814, 815], "start_point": {"row": 223, "column": 5}, "end_point": {"row": 223, "column": 55}}, {"id": 814, "type": "identifier", "text": "store_comm", "parent": 813, "children": [], "start_point": {"row": 223, "column": 5}, "end_point": {"row": 223, "column": 15}}, {"id": 815, "type": "parameter_list", "text": "(struct variable *result, MPI_Comm comm)", "parent": 813, "children": [816, 823], "start_point": {"row": 223, "column": 15}, "end_point": {"row": 223, "column": 55}}, {"id": 816, "type": "parameter_declaration", "text": "struct variable *result", "parent": 815, "children": [817, 820], "start_point": {"row": 223, "column": 16}, "end_point": {"row": 223, "column": 39}}, {"id": 817, "type": "struct_specifier", "text": "struct variable", "parent": 816, "children": [818, 819], "start_point": {"row": 223, "column": 16}, "end_point": {"row": 223, "column": 31}}, {"id": 818, "type": "struct", "text": "struct", "parent": 817, "children": [], "start_point": {"row": 223, "column": 16}, "end_point": {"row": 223, "column": 22}}, {"id": 819, "type": "type_identifier", "text": "variable", "parent": 817, "children": [], "start_point": {"row": 223, "column": 23}, "end_point": {"row": 223, "column": 31}}, {"id": 820, "type": "pointer_declarator", "text": "*result", "parent": 816, "children": [821, 822], "start_point": {"row": 223, "column": 32}, "end_point": {"row": 223, "column": 39}}, {"id": 821, "type": "*", "text": "*", "parent": 820, "children": [], "start_point": {"row": 223, "column": 32}, "end_point": {"row": 223, "column": 33}}, {"id": 822, "type": "identifier", "text": "result", "parent": 820, "children": [], "start_point": {"row": 223, "column": 33}, "end_point": {"row": 223, "column": 39}}, {"id": 823, "type": "parameter_declaration", "text": "MPI_Comm comm", "parent": 815, "children": [824, 825], "start_point": {"row": 223, "column": 41}, "end_point": {"row": 223, "column": 54}}, {"id": 824, "type": "type_identifier", "text": "MPI_Comm", "parent": 823, "children": [], "start_point": {"row": 223, "column": 41}, "end_point": {"row": 223, "column": 49}}, {"id": 825, "type": "identifier", "text": "comm", "parent": 823, "children": [], "start_point": {"row": 223, "column": 50}, "end_point": {"row": 223, "column": 54}}, {"id": 826, "type": "declaration", "text": "void store_operator(struct variable *result, MPI_Op op);", "parent": null, "children": [827, 828], "start_point": {"row": 224, "column": 0}, "end_point": {"row": 224, "column": 56}}, {"id": 827, "type": "primitive_type", "text": "void", "parent": 826, "children": [], "start_point": {"row": 224, "column": 0}, "end_point": {"row": 224, "column": 4}}, {"id": 828, "type": "function_declarator", "text": "store_operator(struct variable *result, MPI_Op op)", "parent": 826, "children": [829, 830], "start_point": {"row": 224, "column": 5}, "end_point": {"row": 224, "column": 55}}, {"id": 829, "type": "identifier", "text": "store_operator", "parent": 828, "children": [], "start_point": {"row": 224, "column": 5}, "end_point": {"row": 224, "column": 19}}, {"id": 830, "type": "parameter_list", "text": "(struct variable *result, MPI_Op op)", "parent": 828, "children": [831, 838], "start_point": {"row": 224, "column": 19}, "end_point": {"row": 224, "column": 55}}, {"id": 831, "type": "parameter_declaration", "text": "struct variable *result", "parent": 830, "children": [832, 835], "start_point": {"row": 224, "column": 20}, "end_point": {"row": 224, "column": 43}}, {"id": 832, "type": "struct_specifier", "text": "struct variable", "parent": 831, "children": [833, 834], "start_point": {"row": 224, "column": 20}, "end_point": {"row": 224, "column": 35}}, {"id": 833, "type": "struct", "text": "struct", "parent": 832, "children": [], "start_point": {"row": 224, "column": 20}, "end_point": {"row": 224, "column": 26}}, {"id": 834, "type": "type_identifier", "text": "variable", "parent": 832, "children": [], "start_point": {"row": 224, "column": 27}, "end_point": {"row": 224, "column": 35}}, {"id": 835, "type": "pointer_declarator", "text": "*result", "parent": 831, "children": [836, 837], "start_point": {"row": 224, "column": 36}, "end_point": {"row": 224, "column": 43}}, {"id": 836, "type": "*", "text": "*", "parent": 835, "children": [], "start_point": {"row": 224, "column": 36}, "end_point": {"row": 224, "column": 37}}, {"id": 837, "type": "identifier", "text": "result", "parent": 835, "children": [], "start_point": {"row": 224, "column": 37}, "end_point": {"row": 224, "column": 43}}, {"id": 838, "type": "parameter_declaration", "text": "MPI_Op op", "parent": 830, "children": [839, 840], "start_point": {"row": 224, "column": 45}, "end_point": {"row": 224, "column": 54}}, {"id": 839, "type": "type_identifier", "text": "MPI_Op", "parent": 838, "children": [], "start_point": {"row": 224, "column": 45}, "end_point": {"row": 224, "column": 51}}, {"id": 840, "type": "identifier", "text": "op", "parent": 838, "children": [], "start_point": {"row": 224, "column": 52}, "end_point": {"row": 224, "column": 54}}, {"id": 841, "type": "declaration", "text": "void store_iarray(struct variable* result, IArray iarr);", "parent": null, "children": [842, 843], "start_point": {"row": 225, "column": 0}, "end_point": {"row": 225, "column": 56}}, {"id": 842, "type": "primitive_type", "text": "void", "parent": 841, "children": [], "start_point": {"row": 225, "column": 0}, "end_point": {"row": 225, "column": 4}}, {"id": 843, "type": "function_declarator", "text": "store_iarray(struct variable* result, IArray iarr)", "parent": 841, "children": [844, 845], "start_point": {"row": 225, "column": 5}, "end_point": {"row": 225, "column": 55}}, {"id": 844, "type": "identifier", "text": "store_iarray", "parent": 843, "children": [], "start_point": {"row": 225, "column": 5}, "end_point": {"row": 225, "column": 17}}, {"id": 845, "type": "parameter_list", "text": "(struct variable* result, IArray iarr)", "parent": 843, "children": [846, 853], "start_point": {"row": 225, "column": 17}, "end_point": {"row": 225, "column": 55}}, {"id": 846, "type": "parameter_declaration", "text": "struct variable* result", "parent": 845, "children": [847, 850], "start_point": {"row": 225, "column": 18}, "end_point": {"row": 225, "column": 41}}, {"id": 847, "type": "struct_specifier", "text": "struct variable", "parent": 846, "children": [848, 849], "start_point": {"row": 225, "column": 18}, "end_point": {"row": 225, "column": 33}}, {"id": 848, "type": "struct", "text": "struct", "parent": 847, "children": [], "start_point": {"row": 225, "column": 18}, "end_point": {"row": 225, "column": 24}}, {"id": 849, "type": "type_identifier", "text": "variable", "parent": 847, "children": [], "start_point": {"row": 225, "column": 25}, "end_point": {"row": 225, "column": 33}}, {"id": 850, "type": "pointer_declarator", "text": "* result", "parent": 846, "children": [851, 852], "start_point": {"row": 225, "column": 33}, "end_point": {"row": 225, "column": 41}}, {"id": 851, "type": "*", "text": "*", "parent": 850, "children": [], "start_point": {"row": 225, "column": 33}, "end_point": {"row": 225, "column": 34}}, {"id": 852, "type": "identifier", "text": "result", "parent": 850, "children": [], "start_point": {"row": 225, "column": 35}, "end_point": {"row": 225, "column": 41}}, {"id": 853, "type": "parameter_declaration", "text": "IArray iarr", "parent": 845, "children": [854, 855], "start_point": {"row": 225, "column": 43}, "end_point": {"row": 225, "column": 54}}, {"id": 854, "type": "type_identifier", "text": "IArray", "parent": 853, "children": [], "start_point": {"row": 225, "column": 43}, "end_point": {"row": 225, "column": 49}}, {"id": 855, "type": "identifier", "text": "iarr", "parent": 853, "children": [], "start_point": {"row": 225, "column": 50}, "end_point": {"row": 225, "column": 54}}, {"id": 856, "type": "declaration", "text": "void store_darray(struct variable* result, DArray darr);", "parent": null, "children": [857, 858], "start_point": {"row": 226, "column": 0}, "end_point": {"row": 226, "column": 56}}, {"id": 857, "type": "primitive_type", "text": "void", "parent": 856, "children": [], "start_point": {"row": 226, "column": 0}, "end_point": {"row": 226, "column": 4}}, {"id": 858, "type": "function_declarator", "text": "store_darray(struct variable* result, DArray darr)", "parent": 856, "children": [859, 860], "start_point": {"row": 226, "column": 5}, "end_point": {"row": 226, "column": 55}}, {"id": 859, "type": "identifier", "text": "store_darray", "parent": 858, "children": [], "start_point": {"row": 226, "column": 5}, "end_point": {"row": 226, "column": 17}}, {"id": 860, "type": "parameter_list", "text": "(struct variable* result, DArray darr)", "parent": 858, "children": [861, 868], "start_point": {"row": 226, "column": 17}, "end_point": {"row": 226, "column": 55}}, {"id": 861, "type": "parameter_declaration", "text": "struct variable* result", "parent": 860, "children": [862, 865], "start_point": {"row": 226, "column": 18}, "end_point": {"row": 226, "column": 41}}, {"id": 862, "type": "struct_specifier", "text": "struct variable", "parent": 861, "children": [863, 864], "start_point": {"row": 226, "column": 18}, "end_point": {"row": 226, "column": 33}}, {"id": 863, "type": "struct", "text": "struct", "parent": 862, "children": [], "start_point": {"row": 226, "column": 18}, "end_point": {"row": 226, "column": 24}}, {"id": 864, "type": "type_identifier", "text": "variable", "parent": 862, "children": [], "start_point": {"row": 226, "column": 25}, "end_point": {"row": 226, "column": 33}}, {"id": 865, "type": "pointer_declarator", "text": "* result", "parent": 861, "children": [866, 867], "start_point": {"row": 226, "column": 33}, "end_point": {"row": 226, "column": 41}}, {"id": 866, "type": "*", "text": "*", "parent": 865, "children": [], "start_point": {"row": 226, "column": 33}, "end_point": {"row": 226, "column": 34}}, {"id": 867, "type": "identifier", "text": "result", "parent": 865, "children": [], "start_point": {"row": 226, "column": 35}, "end_point": {"row": 226, "column": 41}}, {"id": 868, "type": "parameter_declaration", "text": "DArray darr", "parent": 860, "children": [869, 870], "start_point": {"row": 226, "column": 43}, "end_point": {"row": 226, "column": 54}}, {"id": 869, "type": "type_identifier", "text": "DArray", "parent": 868, "children": [], "start_point": {"row": 226, "column": 43}, "end_point": {"row": 226, "column": 49}}, {"id": 870, "type": "identifier", "text": "darr", "parent": 868, "children": [], "start_point": {"row": 226, "column": 50}, "end_point": {"row": 226, "column": 54}}, {"id": 871, "type": "preproc_ifdef", "text": "#ifdef USE_MPI_INFO\nvoid store_info(struct variable *result, MPI_Info info);\n#endif", "parent": null, "children": [872, 873, 874, 889], "start_point": {"row": 227, "column": 0}, "end_point": {"row": 229, "column": 6}}, {"id": 872, "type": "#ifdef", "text": "#ifdef", "parent": 871, "children": [], "start_point": {"row": 227, "column": 0}, "end_point": {"row": 227, "column": 6}}, {"id": 873, "type": "identifier", "text": "USE_MPI_INFO", "parent": 871, "children": [], "start_point": {"row": 227, "column": 7}, "end_point": {"row": 227, "column": 19}}, {"id": 874, "type": "declaration", "text": "void store_info(struct variable *result, MPI_Info info);", "parent": 871, "children": [875, 876], "start_point": {"row": 228, "column": 0}, "end_point": {"row": 228, "column": 56}}, {"id": 875, "type": "primitive_type", "text": "void", "parent": 874, "children": [], "start_point": {"row": 228, "column": 0}, "end_point": {"row": 228, "column": 4}}, {"id": 876, "type": "function_declarator", "text": "store_info(struct variable *result, MPI_Info info)", "parent": 874, "children": [877, 878], "start_point": {"row": 228, "column": 5}, "end_point": {"row": 228, "column": 55}}, {"id": 877, "type": "identifier", "text": "store_info", "parent": 876, "children": [], "start_point": {"row": 228, "column": 5}, "end_point": {"row": 228, "column": 15}}, {"id": 878, "type": "parameter_list", "text": "(struct variable *result, MPI_Info info)", "parent": 876, "children": [879, 886], "start_point": {"row": 228, "column": 15}, "end_point": {"row": 228, "column": 55}}, {"id": 879, "type": "parameter_declaration", "text": "struct variable *result", "parent": 878, "children": [880, 883], "start_point": {"row": 228, "column": 16}, "end_point": {"row": 228, "column": 39}}, {"id": 880, "type": "struct_specifier", "text": "struct variable", "parent": 879, "children": [881, 882], "start_point": {"row": 228, "column": 16}, "end_point": {"row": 228, "column": 31}}, {"id": 881, "type": "struct", "text": "struct", "parent": 880, "children": [], "start_point": {"row": 228, "column": 16}, "end_point": {"row": 228, "column": 22}}, {"id": 882, "type": "type_identifier", "text": "variable", "parent": 880, "children": [], "start_point": {"row": 228, "column": 23}, "end_point": {"row": 228, "column": 31}}, {"id": 883, "type": "pointer_declarator", "text": "*result", "parent": 879, "children": [884, 885], "start_point": {"row": 228, "column": 32}, "end_point": {"row": 228, "column": 39}}, {"id": 884, "type": "*", "text": "*", "parent": 883, "children": [], "start_point": {"row": 228, "column": 32}, "end_point": {"row": 228, "column": 33}}, {"id": 885, "type": "identifier", "text": "result", "parent": 883, "children": [], "start_point": {"row": 228, "column": 33}, "end_point": {"row": 228, "column": 39}}, {"id": 886, "type": "parameter_declaration", "text": "MPI_Info info", "parent": 878, "children": [887, 888], "start_point": {"row": 228, "column": 41}, "end_point": {"row": 228, "column": 54}}, {"id": 887, "type": "type_identifier", "text": "MPI_Info", "parent": 886, "children": [], "start_point": {"row": 228, "column": 41}, "end_point": {"row": 228, "column": 49}}, {"id": 888, "type": "identifier", "text": "info", "parent": 886, "children": [], "start_point": {"row": 228, "column": 50}, "end_point": {"row": 228, "column": 54}}, {"id": 889, "type": "#endif", "text": "#endif", "parent": 871, "children": [], "start_point": {"row": 229, "column": 0}, "end_point": {"row": 229, "column": 6}}, {"id": 890, "type": "declaration", "text": "extern struct variable* loopvar_stack[10];", "parent": null, "children": [891, 893, 896], "start_point": {"row": 232, "column": 0}, "end_point": {"row": 232, "column": 42}}, {"id": 891, "type": "storage_class_specifier", "text": "extern", "parent": 890, "children": [892], "start_point": {"row": 232, "column": 0}, "end_point": {"row": 232, "column": 6}}, {"id": 892, "type": "extern", "text": "extern", "parent": 891, "children": [], "start_point": {"row": 232, "column": 0}, "end_point": {"row": 232, "column": 6}}, {"id": 893, "type": "struct_specifier", "text": "struct variable", "parent": 890, "children": [894, 895], "start_point": {"row": 232, "column": 7}, "end_point": {"row": 232, "column": 22}}, {"id": 894, "type": "struct", "text": "struct", "parent": 893, "children": [], "start_point": {"row": 232, "column": 7}, "end_point": {"row": 232, "column": 13}}, {"id": 895, "type": "type_identifier", "text": "variable", "parent": 893, "children": [], "start_point": {"row": 232, "column": 14}, "end_point": {"row": 232, "column": 22}}, {"id": 896, "type": "pointer_declarator", "text": "* loopvar_stack[10]", "parent": 890, "children": [897, 898], "start_point": {"row": 232, "column": 22}, "end_point": {"row": 232, "column": 41}}, {"id": 897, "type": "*", "text": "*", "parent": 896, "children": [], "start_point": {"row": 232, "column": 22}, "end_point": {"row": 232, "column": 23}}, {"id": 898, "type": "array_declarator", "text": "loopvar_stack[10]", "parent": 896, "children": [899, 900], "start_point": {"row": 232, "column": 24}, "end_point": {"row": 232, "column": 41}}, {"id": 899, "type": "identifier", "text": "loopvar_stack", "parent": 898, "children": [], "start_point": {"row": 232, "column": 24}, "end_point": {"row": 232, "column": 37}}, {"id": 900, "type": "number_literal", "text": "10", "parent": 898, "children": [], "start_point": {"row": 232, "column": 38}, "end_point": {"row": 232, "column": 40}}, {"id": 901, "type": "declaration", "text": "extern int loopvar_stack_sp;", "parent": null, "children": [902, 904, 905], "start_point": {"row": 233, "column": 0}, "end_point": {"row": 233, "column": 28}}, {"id": 902, "type": "storage_class_specifier", "text": "extern", "parent": 901, "children": [903], "start_point": {"row": 233, "column": 0}, "end_point": {"row": 233, "column": 6}}, {"id": 903, "type": "extern", "text": "extern", "parent": 902, "children": [], "start_point": {"row": 233, "column": 0}, "end_point": {"row": 233, "column": 6}}, {"id": 904, "type": "primitive_type", "text": "int", "parent": 901, "children": [], "start_point": {"row": 233, "column": 7}, "end_point": {"row": 233, "column": 10}}, {"id": 905, "type": "identifier", "text": "loopvar_stack_sp", "parent": 901, "children": [], "start_point": {"row": 233, "column": 11}, "end_point": {"row": 233, "column": 27}}]}, "node_categories": {"declarations": {"functions": [173, 195, 597, 609, 621, 652, 672, 684, 696, 720, 739, 751, 766, 781, 798, 813, 828, 843, 858, 876], "variables": [84, 88, 93, 97, 101, 106, 113, 118, 123, 128, 133, 136, 139, 142, 147, 150, 153, 156, 159, 165, 170, 179, 186, 192, 201, 208, 214, 296, 301, 308, 313, 320, 327, 333, 338, 341, 346, 378, 383, 390, 393, 396, 403, 411, 414, 417, 425, 428, 435, 443, 446, 453, 456, 463, 470, 477, 482, 489, 497, 500, 507, 514, 522, 525, 532, 535, 542, 547, 552, 560, 563, 570, 577, 586, 595, 600, 607, 612, 619, 624, 631, 636, 641, 646, 655, 660, 665, 670, 675, 682, 687, 694, 699, 704, 711, 718, 723, 730, 737, 742, 749, 754, 761, 764, 769, 776, 779, 784, 791, 796, 801, 808, 811, 816, 823, 826, 831, 838, 841, 846, 853, 856, 861, 868, 874, 879, 886, 890, 901], "classes": [86, 87, 99, 100, 110, 111, 134, 135, 180, 181, 187, 188, 202, 203, 209, 210, 293, 294, 302, 303, 314, 315, 321, 322, 328, 329, 347, 348, 375, 376, 384, 385, 391, 392, 394, 395, 397, 398, 404, 405, 412, 413, 418, 419, 426, 427, 429, 430, 436, 437, 444, 445, 447, 448, 457, 458, 464, 465, 471, 472, 483, 484, 490, 491, 498, 499, 501, 502, 508, 509, 515, 516, 523, 524, 526, 527, 536, 537, 553, 554, 561, 562, 564, 565, 571, 572, 578, 579, 587, 589, 590, 601, 602, 613, 614, 625, 626, 647, 648, 676, 677, 688, 689, 705, 706, 712, 713, 724, 725, 731, 732, 743, 744, 755, 756, 770, 771, 785, 786, 802, 803, 817, 818, 832, 833, 847, 848, 862, 863, 880, 881, 891, 893, 894, 902], "imports": [0, 1], "modules": [], "enums": [3, 4, 5, 6, 10, 11, 13, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 114, 115, 221, 222, 224, 225, 229, 231, 233, 235, 237, 238, 240, 241, 245, 247, 249, 251, 253, 255, 257, 259, 261, 263, 265, 267, 269, 271, 273, 275, 277, 278, 280, 281, 285, 289, 297, 298, 309, 310, 353, 354, 356, 357, 361, 363, 365, 367, 369, 371, 373, 379, 380, 478, 479, 632, 633, 656, 657]}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [7, 12, 15, 22, 29, 36, 43, 50, 57, 64, 71, 78, 92, 95, 96, 102, 105, 108, 109, 112, 116, 117, 122, 127, 132, 138, 141, 146, 148, 149, 151, 152, 154, 155, 157, 158, 160, 161, 162, 163, 164, 166, 167, 168, 169, 177, 182, 185, 189, 191, 199, 204, 207, 211, 213, 220, 223, 226, 230, 232, 234, 236, 239, 242, 246, 248, 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 279, 282, 286, 290, 295, 299, 300, 304, 307, 311, 312, 316, 319, 323, 326, 330, 334, 335, 336, 337, 339, 340, 345, 349, 352, 355, 358, 362, 364, 366, 368, 370, 372, 374, 377, 381, 382, 386, 389, 399, 402, 406, 409, 410, 416, 420, 423, 424, 431, 434, 438, 441, 442, 449, 452, 455, 459, 462, 466, 469, 473, 476, 480, 481, 485, 488, 492, 495, 496, 503, 506, 510, 513, 517, 520, 521, 528, 531, 533, 534, 538, 541, 546, 551, 555, 558, 559, 566, 569, 573, 576, 580, 583, 584, 585, 591, 594, 598, 603, 606, 610, 615, 618, 622, 627, 630, 634, 635, 640, 645, 649, 653, 658, 659, 664, 669, 673, 678, 681, 685, 690, 693, 697, 703, 707, 710, 714, 717, 721, 726, 729, 733, 736, 740, 745, 748, 752, 757, 760, 763, 767, 772, 775, 778, 782, 787, 790, 795, 799, 804, 807, 809, 810, 814, 819, 822, 824, 825, 829, 834, 837, 839, 840, 844, 849, 852, 854, 855, 859, 864, 867, 869, 870, 871, 872, 873, 877, 882, 885, 887, 888, 889, 895, 899, 905], "returns": [], "exceptions": []}, "expressions": {"calls": [], "literals": [2, 9, 17, 24, 31, 38, 45, 52, 59, 66, 73, 80, 228, 244, 284, 288, 292, 360, 900], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [{"node_id": 173, "universal_type": "function", "name": "variable", "text_snippet": "(*type_normal_fp)(struct variable *result, struct variable par[])"}, {"node_id": 195, "universal_type": "function", "name": "variable", "text_snippet": "(*type_iterator_fp)(struct variable *result, \n\t\t\t\t struct variable par[], void **self)"}, {"node_id": 597, "universal_type": "function", "name": "unknown", "text_snippet": "increase_reference(struct variable *v)"}, {"node_id": 609, "universal_type": "function", "name": "unknown", "text_snippet": "decrease_reference(struct variable *v)"}, {"node_id": 621, "universal_type": "function", "name": "unknown", "text_snippet": "init_struct_variable(struct variable *v, \n\t\t\t enum var_type type, char *name, char *string_repr)"}, {"node_id": 652, "universal_type": "function", "name": "unknown", "text_snippet": "create_struct_variable(enum var_type type, char *name, \n\t\t\t\t\tchar *string_repr)"}, {"node_id": 672, "universal_type": "function", "name": "unknown", "text_snippet": "free_variable(struct variable *v)"}, {"node_id": 684, "universal_type": "function", "name": "unknown", "text_snippet": "free_term(struct term *t)"}, {"node_id": 696, "universal_type": "function", "name": "term", "text_snippet": "evaluate_params(char *interface, struct term *source_params,\n\t\t struct variable *dest_params)"}, {"node_id": 720, "universal_type": "function", "name": "term", "text_snippet": "evaluate_term(struct variable *result, struct term *t)"}, {"node_id": 739, "universal_type": "function", "name": "unknown", "text_snippet": "execute_statement(struct statement *s)"}, {"node_id": 751, "universal_type": "function", "name": "i)", "text_snippet": "store_int(struct variable *result, int i)"}, {"node_id": 766, "universal_type": "function", "name": "unknown", "text_snippet": "store_double(struct variable *result, double f)"}, {"node_id": 781, "universal_type": "function", "name": "unknown", "text_snippet": "store_string(struct variable *result, char *s)"}, {"node_id": 798, "universal_type": "function", "name": "unknown", "text_snippet": "store_datatype(struct variable *result, MPI_Datatype datatype)"}, {"node_id": 813, "universal_type": "function", "name": "unknown", "text_snippet": "store_comm(struct variable *result, MPI_Comm comm)"}, {"node_id": 828, "universal_type": "function", "name": "unknown", "text_snippet": "store_operator(struct variable *result, MPI_Op op)"}, {"node_id": 843, "universal_type": "function", "name": "unknown", "text_snippet": "store_iarray(struct variable* result, IArray iarr)"}, {"node_id": 858, "universal_type": "function", "name": "unknown", "text_snippet": "store_darray(struct variable* result, DArray darr)"}, {"node_id": 876, "universal_type": "function", "name": "unknown", "text_snippet": "store_info(struct variable *result, MPI_Info info)"}], "class_declarations": [{"node_id": 86, "universal_type": "class", "name": "{", "text_snippet": "struct {\n int* v;\n int n;\n}"}, {"node_id": 87, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 99, "universal_type": "class", "name": "{", "text_snippet": "struct {\n MPI_Datatype *v;\n int n;\n}"}, {"node_id": 100, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 110, "universal_type": "class", "name": "variable", "text_snippet": "struct variable {\n enum var_type type;\n char *name;\n char *string_repr;\n int *ref_counter;\n /*i"}, {"node_id": 111, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 134, "universal_type": "class", "name": "{", "text_snippet": "union {\n int intv;\n double doublev;\n char *stringv;\n MPI_Datatype datatypev;\n MPI_Com"}, {"node_id": 135, "universal_type": "class", "name": "unknown", "text_snippet": "union"}, {"node_id": 180, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 181, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 187, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 188, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 202, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 203, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 209, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 210, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 293, "universal_type": "class", "name": "term", "text_snippet": "struct term {\n enum term_type type;\n /* enum var_type result_type; */\n struct term *next;\n\n en"}, {"node_id": 294, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 302, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 303, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 314, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 315, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 321, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 322, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 328, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 329, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 347, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 348, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 375, "universal_type": "class", "name": "statement", "text_snippet": "struct statement {\n enum statement_type type;\n struct statement *next;\n\n union {\n struct {\n "}, {"node_id": 376, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 384, "universal_type": "class", "name": "statement", "text_snippet": "struct statement"}, {"node_id": 385, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 391, "universal_type": "class", "name": "{", "text_snippet": "union {\n struct {\n struct variable *lval;\n struct term *rval;\n } assignment;\n\n st"}, {"node_id": 392, "universal_type": "class", "name": "unknown", "text_snippet": "union"}, {"node_id": 394, "universal_type": "class", "name": "{", "text_snippet": "struct {\n struct variable *lval;\n struct term *rval;\n }"}, {"node_id": 395, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 397, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 398, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 404, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 405, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 412, "universal_type": "class", "name": "{", "text_snippet": "struct {\n bool flush;\n struct term *val;\n }"}, {"node_id": 413, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 418, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 419, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 426, "universal_type": "class", "name": "{", "text_snippet": "struct {\n struct term *comm;\n struct term *call;\n }"}, {"node_id": 427, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 429, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 430, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 436, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 437, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 444, "universal_type": "class", "name": "{", "text_snippet": "struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct t"}, {"node_id": 445, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 447, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 448, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 457, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 458, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 464, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 465, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 471, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 472, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 483, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 484, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 490, "universal_type": "class", "name": "statement", "text_snippet": "struct statement"}, {"node_id": 491, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 498, "universal_type": "class", "name": "{", "text_snippet": "struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;"}, {"node_id": 499, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 501, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 502, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 508, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 509, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 515, "universal_type": "class", "name": "statement", "text_snippet": "struct statement"}, {"node_id": 516, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 523, "universal_type": "class", "name": "{", "text_snippet": "struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_"}, {"node_id": 524, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 526, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 527, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 536, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 537, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 553, "universal_type": "class", "name": "statement", "text_snippet": "struct statement"}, {"node_id": 554, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 561, "universal_type": "class", "name": "{", "text_snippet": "struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *el"}, {"node_id": 562, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 564, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 565, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 571, "universal_type": "class", "name": "statement", "text_snippet": "struct statement"}, {"node_id": 572, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 578, "universal_type": "class", "name": "statement", "text_snippet": "struct statement"}, {"node_id": 579, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 587, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 589, "universal_type": "class", "name": "statement", "text_snippet": "struct statement"}, {"node_id": 590, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 601, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 602, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 613, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 614, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 625, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 626, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 647, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 648, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 676, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 677, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 688, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 689, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 705, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 706, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 712, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 713, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 724, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 725, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 731, "universal_type": "class", "name": "term", "text_snippet": "struct term"}, {"node_id": 732, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 743, "universal_type": "class", "name": "statement", "text_snippet": "struct statement"}, {"node_id": 744, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 755, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 756, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 770, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 771, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 785, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 786, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 802, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 803, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 817, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 818, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 832, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 833, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 847, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 848, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 862, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 863, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 880, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 881, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 891, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}, {"node_id": 893, "universal_type": "class", "name": "variable", "text_snippet": "struct variable"}, {"node_id": 894, "universal_type": "class", "name": "unknown", "text_snippet": "struct"}, {"node_id": 902, "universal_type": "class", "name": "unknown", "text_snippet": "extern"}], "import_statements": [{"node_id": 0, "text": "#include \"mpiversiontest.h\"\n"}, {"node_id": 1, "text": "#include"}]}, "original_source_code": "/* SKaMPI MPI-Benchmark\n\nCopyright 2003-2008 <NAME>\nLehrstuhl Informatik fuer Naturwissenschaftler und Ingenieure \nFakultaet fuer Informatik\nUniversity of Karlsruhe\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of version 2 of the GNU General Public License as\npublished by the Free Software Foundation\n\nThis program 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 this program; if not, write to the Free Software\nFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */\n\n#include \"mpiversiontest.h\"\n\nenum {\n MAX_NUMBER_PARAMS = 10\n};\n\nenum var_type {\n TYPE_INTEGER = 'i',\n TYPE_DOUBLE = 'f',\n TYPE_STRING = 's',\n TYPE_DATATYPE = 'd',\n TYPE_COMM = 'c',\n TYPE_OP = 'o',\n TYPE_INFO = 'h',\n TYPE_VOID = '0',\n TYPE_IARRAY = 'a',\n TYPE_DARRAY = 'e'\n};\n\ntypedef struct {\n int* v;\n int n;\n} IArray;\n\ntypedef struct {\n MPI_Datatype *v;\n int n;\n} DArray;\n\nstruct variable {\n enum var_type type;\n char *name;\n char *string_repr;\n int *ref_counter;\n /*int **ref_counters;*/ /* reference counters of array elements */\n union {\n int intv;\n double doublev;\n char *stringv;\n MPI_Datatype datatypev;\n MPI_Comm commv;\n MPI_Op opv;\n IArray iarrv;\n DArray darrv;\n#ifdef USE_MPI_INFO\n MPI_Info infov;\n#endif\n } u;\n};\n\n\n\ntypedef void (*type_normal_fp)(struct variable *result, struct variable par[]);\ntypedef void (*type_iterator_fp)(struct variable *result, \n\t\t\t\t struct variable par[], void **self);\n\n\n\nenum term_type {\n TERM_VALUE = 300,\n TERM_UNARY,\n TERM_BINARY,\n TERM_FUNC,\n TERM_ARRAY\n};\n\nenum op_type {\n OP_ADD = 400,\n OP_SUB,\n OP_MULT,\n OP_DIV,\n OP_MOD,\n OP_LT,\n OP_LE,\n OP_GT,\n OP_GE,\n OP_EQ,\n OP_NEQ,\n OP_AND,\n OP_BAND,\n OP_OR,\n OP_BOR,\n OP_NOT,\n OP_BNOT\n};\n \nenum meas_error { /* bitfield */\n MEAS_OK = 0,\n MEAS_OUT_OF_BOUNDS = 1,\n MEAS_BUFFER_TOO_SMALL = 2\n};\n\nstruct term {\n enum term_type type;\n /* enum var_type result_type; */\n struct term *next;\n\n enum op_type op;\n struct term *left;\n struct term *right;\n\n struct variable *var;\n \n type_normal_fp init_fp, call_fp, finalize_fp;\n type_iterator_fp iterator_fp;\n char *interface;\n \n struct term *params;\n};\n\n\nenum statement_type {\n ST_ASSIGNMENT = 500,\n ST_PRINT,\n ST_FLUSH,\n ST_MEASURE,\n ST_ARITHM_VAR,\n ST_LIST_VAR,\n ST_ITERATOR_VAR,\n ST_IF_THEN\n};\n\nstruct statement {\n enum statement_type type;\n struct statement *next;\n\n union {\n struct {\n struct variable *lval;\n struct term *rval;\n } assignment;\n\n struct {\n bool flush;\n struct term *val;\n } print;\n\n struct {\n struct term *comm;\n struct term *call;\n } measure;\n\n struct {\n struct variable *loopvar;\n bool refine;\n struct term *first;\n struct term *last;\n struct term *step;\n enum op_type op;\n struct term *multipleof;\n struct statement *body;\n } arithm_var;\n\n struct {\n struct variable *loopvar;\n struct term *term_list;\n struct statement *body;\n } list_var;\n\n struct {\n struct variable *loopvar;\n type_iterator_fp iterator_fp;\n struct term *par_list;\n char *interface;\n void *self;\n struct statement *body;\n } iterator_var;\n\n struct {\n struct term *condition;\n struct statement *then_body;\n struct statement *else_body;\n } if_then;\n\n } u;\n};\n\n\nextern struct statement *statement_root;\n\nvoid increase_reference(struct variable *v); \nvoid decrease_reference(struct variable *v);\nvoid init_struct_variable(struct variable *v, \n\t\t\t enum var_type type, char *name, char *string_repr);\nstruct variable *create_struct_variable(enum var_type type, char *name, \n\t\t\t\t\tchar *string_repr);\nvoid free_variable(struct variable *v);\n\n\nvoid free_term(struct term *t);\n\n\nvoid evaluate_params(char *interface, struct term *source_params,\n\t\t struct variable *dest_params);\nvoid evaluate_term(struct variable *result, struct term *t);\n\nvoid execute_statement(struct statement *s);\n\n\nvoid store_int(struct variable *result, int i);\nvoid store_double(struct variable *result, double f);\nvoid store_string(struct variable *result, char *s);\nvoid store_datatype(struct variable *result, MPI_Datatype datatype);\nvoid store_comm(struct variable *result, MPI_Comm comm);\nvoid store_operator(struct variable *result, MPI_Op op);\nvoid store_iarray(struct variable* result, IArray iarr);\nvoid store_darray(struct variable* result, DArray darr);\n#ifdef USE_MPI_INFO\nvoid store_info(struct variable *result, MPI_Info info);\n#endif\n\n\nextern struct variable* loopvar_stack[10]; /* @@@@ */\nextern int loopvar_stack_sp;\n"}
98
c
#if PLATFORM_WINDOWS #pragma warning(pop) #ifndef UE4_MINIMAL_WINDOWS_INCLUDE #define UE4_MINIMAL_WINDOWS_INCLUDE #endif #include "Windows/AllowWindowsPlatformTypes.h" #endif
24
7
(translation_unit) "#if PLATFORM_WINDOWS\n#pragma warning(pop)\n#ifndef UE4_MINIMAL_WINDOWS_INCLUDE\n#define UE4_MINIMAL_WINDOWS_INCLUDE\n#endif\n#include "Windows/AllowWindowsPlatformTypes.h"\n#endif" (preproc_if) "#if PLATFORM_WINDOWS\n#pragma warning(pop)\n#ifndef UE4_MINIMAL_WINDOWS_INCLUDE\n#define UE4_MINIMAL_WINDOWS_INCLUDE\n#endif\n#include "Windows/AllowWindowsPlatformTypes.h"\n#endif" (#if) "#if" (identifier) "PLATFORM_WINDOWS" ( ) "\n" (preproc_call) "#pragma warning(pop)\n" (preproc_directive) "#pragma" (preproc_arg) "warning(pop)" (preproc_ifdef) "#ifndef UE4_MINIMAL_WINDOWS_INCLUDE\n#define UE4_MINIMAL_WINDOWS_INCLUDE\n#endif" (#ifndef) "#ifndef" (identifier) "UE4_MINIMAL_WINDOWS_INCLUDE" (preproc_def) "#define UE4_MINIMAL_WINDOWS_INCLUDE\n" (#define) "#define" (identifier) "UE4_MINIMAL_WINDOWS_INCLUDE" (#endif) "#endif" (preproc_include) "#include "Windows/AllowWindowsPlatformTypes.h"\n" (#include) "#include" (string_literal) ""Windows/AllowWindowsPlatformTypes.h"" (") """ (string_content) "Windows/AllowWindowsPlatformTypes.h" (") """ (#endif) "#endif"
22
0
{"language": "c", "success": true, "metadata": {"lines": 7, "avg_line_length": 24.0, "nodes": 18, "errors": 0, "source_hash": "83922af3459ddad56d2bc47c346a131d1ed357c65a3d5f417599adadbb1a6b88", "categorized_nodes": 13}, "ast": {"root": "translation_unit", "nodes": [{"id": 0, "type": "preproc_if", "text": "#if PLATFORM_WINDOWS\n#pragma warning(pop)\n#ifndef UE4_MINIMAL_WINDOWS_INCLUDE\n#define UE4_MINIMAL_WINDOWS_INCLUDE\n#endif\n#include \"Windows/AllowWindowsPlatformTypes.h\"\n#endif", "parent": null, "children": [1, 2, 3, 4, 7, 14, 17], "start_point": {"row": 0, "column": 0}, "end_point": {"row": 6, "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": "identifier", "text": "PLATFORM_WINDOWS", "parent": 0, "children": [], "start_point": {"row": 0, "column": 4}, "end_point": {"row": 0, "column": 20}}, {"id": 3, "type": "\n", "text": "\n", "parent": 0, "children": [], "start_point": {"row": 0, "column": 20}, "end_point": {"row": 1, "column": 0}}, {"id": 4, "type": "preproc_call", "text": "#pragma warning(pop)\n", "parent": 0, "children": [5, 6], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 2, "column": 0}}, {"id": 5, "type": "preproc_directive", "text": "#pragma", "parent": 4, "children": [], "start_point": {"row": 1, "column": 0}, "end_point": {"row": 1, "column": 7}}, {"id": 6, "type": "preproc_arg", "text": "warning(pop)", "parent": 4, "children": [], "start_point": {"row": 1, "column": 8}, "end_point": {"row": 1, "column": 20}}, {"id": 7, "type": "preproc_ifdef", "text": "#ifndef UE4_MINIMAL_WINDOWS_INCLUDE\n#define UE4_MINIMAL_WINDOWS_INCLUDE\n#endif", "parent": 0, "children": [8, 9, 10, 13], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 8, "type": "#ifndef", "text": "#ifndef", "parent": 7, "children": [], "start_point": {"row": 2, "column": 0}, "end_point": {"row": 2, "column": 7}}, {"id": 9, "type": "identifier", "text": "UE4_MINIMAL_WINDOWS_INCLUDE", "parent": 7, "children": [], "start_point": {"row": 2, "column": 8}, "end_point": {"row": 2, "column": 35}}, {"id": 10, "type": "preproc_def", "text": "#define UE4_MINIMAL_WINDOWS_INCLUDE\n", "parent": 7, "children": [11, 12], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 4, "column": 0}}, {"id": 11, "type": "#define", "text": "#define", "parent": 10, "children": [], "start_point": {"row": 3, "column": 0}, "end_point": {"row": 3, "column": 7}}, {"id": 12, "type": "identifier", "text": "UE4_MINIMAL_WINDOWS_INCLUDE", "parent": 10, "children": [], "start_point": {"row": 3, "column": 8}, "end_point": {"row": 3, "column": 35}}, {"id": 13, "type": "#endif", "text": "#endif", "parent": 7, "children": [], "start_point": {"row": 4, "column": 0}, "end_point": {"row": 4, "column": 6}}, {"id": 14, "type": "preproc_include", "text": "#include \"Windows/AllowWindowsPlatformTypes.h\"\n", "parent": 0, "children": [15, 16], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 6, "column": 0}}, {"id": 15, "type": "#include", "text": "#include", "parent": 14, "children": [], "start_point": {"row": 5, "column": 0}, "end_point": {"row": 5, "column": 8}}, {"id": 16, "type": "string_literal", "text": "\"Windows/AllowWindowsPlatformTypes.h\"", "parent": 14, "children": [], "start_point": {"row": 5, "column": 9}, "end_point": {"row": 5, "column": 46}}, {"id": 17, "type": "#endif", "text": "#endif", "parent": 0, "children": [], "start_point": {"row": 6, "column": 0}, "end_point": {"row": 6, "column": 6}}]}, "node_categories": {"declarations": {"functions": [], "variables": [], "classes": [], "imports": [14, 15], "modules": [], "enums": []}, "statements": {"expressions": [], "assignments": [], "loops": [], "conditionals": [0, 1, 2, 7, 8, 9, 12, 13, 17], "returns": [], "exceptions": []}, "expressions": {"calls": [4], "literals": [16], "identifiers": [], "binary_operations": [], "unary_operations": [], "member_access": []}}, "cross_language_map": {"function_declarations": [], "class_declarations": [], "import_statements": [{"node_id": 14, "text": "#include \"Windows/AllowWindowsPlatformTypes.h\"\n"}, {"node_id": 15, "text": "#include"}]}, "original_source_code": "#if PLATFORM_WINDOWS\n#pragma warning(pop)\n#ifndef UE4_MINIMAL_WINDOWS_INCLUDE\n#define UE4_MINIMAL_WINDOWS_INCLUDE\n#endif\n#include \"Windows/AllowWindowsPlatformTypes.h\"\n#endif"}
99